diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 01e21128..4962ddee 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,15 +8,17 @@ jobs: strategy: matrix: - go: ['1.19', '1.20'] + go: ['1.20', '1.21'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - cache: true + + - name: Install dependencies + run: go mod vendor - name: golangci-lint uses: reviewdog/action-golangci-lint@v2 @@ -34,7 +36,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - if: matrix.go == '1.20' + if: matrix.go == '1.21' with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.txt @@ -44,7 +46,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: nosborn/github-action-markdown-cli@v3.2.0 with: @@ -65,4 +67,4 @@ jobs: workdir: ./doc/ github_token: ${{ secrets.github_token }} reporter: github-pr-review - level: warning \ No newline at end of file + level: warning diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 31008c8e..58418234 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,13 +12,13 @@ jobs: version: ${{ steps.tag.outputs.tag }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: '^1.19' + go-version: '^1.21' - name: Tag id: tag @@ -33,28 +33,22 @@ jobs: needs: [tag] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: '^1.19' + go-version: '^1.21' - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Install dependencies + run: go mod vendor - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: distribution: goreleaser - version: latest + version: latest args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/vendor/github.com/K-Phoen/sdk/.gitignore b/vendor/github.com/K-Phoen/sdk/.gitignore deleted file mode 100644 index 54dea6e0..00000000 --- a/vendor/github.com/K-Phoen/sdk/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - -# Tests -coverage.out - -# IDE -.idea \ No newline at end of file diff --git a/vendor/github.com/K-Phoen/sdk/LICENSE b/vendor/github.com/K-Phoen/sdk/LICENSE deleted file mode 100644 index 9c8f3ea0..00000000 --- a/vendor/github.com/K-Phoen/sdk/LICENSE +++ /dev/null @@ -1,201 +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. \ No newline at end of file diff --git a/vendor/github.com/K-Phoen/sdk/README.md b/vendor/github.com/K-Phoen/sdk/README.md deleted file mode 100644 index 241e7702..00000000 --- a/vendor/github.com/K-Phoen/sdk/README.md +++ /dev/null @@ -1,138 +0,0 @@ - - -# Grafana SDK [![Go Report Card](https://goreportcard.com/badge/github.com/K-Phoen/sdk)](https://goreportcard.com/report/github.com/K-Phoen/sdk) - -SDK for Go language offers a library for interacting with -[Grafana](http://grafana.org) server from Go applications. It -realizes many of -[HTTP REST API](https://grafana.com/docs/grafana/latest/http_api/) calls for -administration, client, organizations. Beside of them it allows -creating of Grafana objects (dashboards, panels, datasources) locally -and manipulating them for constructing dashboards programmatically. -It would be helpful for massive operations on a large set of -Grafana objects. - -It was made foremost for -[autograf](https://github.com/grafana-tools/autograf) project but -later separated from it and moved to this new repository because the -library is useful per se. - -## Library design principles - -1. SDK offers client functionality so it covers Grafana REST API with - its requests and responses as close as possible. -1. SDK maps Grafana objects (dashboard, row, panel, datasource) to - similar Go structures but not follows exactly all Grafana - abstractions. -1. It doesn't use any logger, instead API functions could return errors - where it need. -1. Prefere no external deps except Go stdlib. -1. Cover SDK calls with unit tests. - -## Examples [![GoDoc](https://godoc.org/github.com/K-Phoen/sdk?status.svg)](https://godoc.org/github.com/K-Phoen/sdk) - -```go - board := sdk.NewBoard("Sample dashboard title") - board.ID = 1 - board.Time.From = "now-30m" - board.Time.To = "now" - row1 := board.AddRow("Sample row title") - row1.Add(sdk.NewGraph("Sample graph")) - graph := sdk.NewGraph("Sample graph 2") - target := sdk.Target{ - RefID: "A", - Datasource: "Sample Source 1", - Expr: "sample request 1"} - graph.AddTarget(&target) - row1.Add(graph) - grafanaURL := "http://grafana.host" - c := sdk.NewClient(grafanaURL, "grafana-api-key", sdk.DefaultHTTPClient) - response, err := c.SetDashboard(context.TODO() ,*board, sdk.SetDashboardParams{ - Overwrite: false, - }) - if err != nil { - fmt.Printf("error on uploading dashboard %s", board.Title) - } else { - fmt.Printf("dashboard URL: %v", grafanaURL+*response.URL) - } -``` - -The library includes several demo apps for showing API usage: - -* [backup-dashboards](cmd/backup-dashboards) — saves all your dashboards as JSON-files. -* [backup-datasources](cmd/backup-datasources) — saves all your datasources as JSON-files. -* [import-datasources](cmd/import-datasources) — imports datasources from JSON-files. -* [import-dashboards](cmd/import-dashboards) — imports dashboards from JSON-files. - -You need Grafana API key with _admin rights_ for using these utilities. - -## Installation [![Build Status](https://travis-ci.org/K-Phoen/sdk.svg?branch=master)](https://travis-ci.org/K-Phoen/sdk) - -Of course Go development environment should be set up first. Then: - - go get github.com/K-Phoen/sdk - -Dependency packages have included into -distro. [govendor](https://github.com/kardianos/govendor) utility used -for vendoring. The single dependency now is: - - go get github.com/gosimple/slug - -The "slugify" for URLs is a simple task but this package used in -Grafana server so it used in the SDK for the compatibility reasons. - -## Status of REST API realization [![Coverage Status](https://coveralls.io/repos/github/K-Phoen/sdk/badge.svg?branch=master)](https://coveralls.io/github/K-Phoen/sdk?branch=master) - -Work on full API implementation still in progress. Currently -implemented only create/update/delete operations for dashboards and -datasources. State of support for misc API parts noted below. - -| API | Status | -|-----------------------------|---------------------------| -| Authorization | API tokens and Basic Auth | -| Annotations | partially | -| Dashboards | partially | -| Datasources | + | -| Alert notification channels | + | -| Organization (current) | partially | -| Organizations | partially | -| Users | partially | -| User (actual) | partially | -| Snapshots | partially | -| Frontend settings | - | -| Admin | partially | - -There is no exact roadmap. The integration tests are being run against the -following Grafana versions: - -* [6.7.1](./travis.yml) -* [6.6.2](/.travis.yml) -* [6.5.3](/.travis.yml) -* [6.4.5](/.travis.yml) - -With the following Go versions: - -* 1.14.x -* 1.13.x -* 1.12.x -* 1.11.x - -I still have interest to this library development but not always have -time for it. So I gladly accept new contributions. Drop an issue or -[contact me](grafov@gmail.com). - -## Licence - -Distributed under Apache v2.0. All rights belong to the SDK -authors. There is no authors list yet, you can see the full list of -the contributors in the git history. Official repository is -https://github.com/K-Phoen/sdk - -## Collection of Grafana tools in Golang - -* [github.com/nytm/go-grafana-api](https://github.com/nytm/go-grafana-api) — a golang client of Grafana project currently that realizes parts of the REST API, used for the Grafana Terraform provider. -* [github.com/adejoux/grafanaclient](https://github.com/adejoux/grafanaclient) — API to manage Grafana 2.0 datasources and dashboards. It lacks features from 2.5 and later Grafana versions. -* [github.com/mgit-at/grafana-backup](https://github.com/mgit-at/grafana-backup) — just saves dashboards localy. -* [github.com/raintank/memo](https://github.com/raintank/memo) — send slack mentions to Grafana annotations. -* [github.com/retzkek/grafctl](https://github.com/retzkek/grafctl) — backup/restore/track dashboards with git. -* [github.com/grafana/grizzly](https://github.com/grafana/grizzly) — manage Grafana dashboards via CLI and libsonnet/jsonnet diff --git a/vendor/github.com/K-Phoen/sdk/alert-manager.go b/vendor/github.com/K-Phoen/sdk/alert-manager.go deleted file mode 100644 index 56b5bb76..00000000 --- a/vendor/github.com/K-Phoen/sdk/alert-manager.go +++ /dev/null @@ -1,77 +0,0 @@ -package sdk - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - - ॐ तारे तुत्तारे तुरे स्व -*/ - -type AlertManager struct { - Config AlertManagerConfig `json:"alertmanager_config"` - TemplateFiles MessageTemplate `json:"template_files"` -} - -type ContactPoint struct { - Name string `json:"name"` - GrafanaManagedReceivers []ContactPointType `json:"grafana_managed_receiver_configs,omitempty"` -} - -type ContactPointType struct { - UID string `json:"uid,omitempty"` - Name string `json:"name"` - Type string `json:"type"` - DisableResolveMessage bool `json:"disableResolveMessage"` - Settings map[string]interface{} `json:"settings"` - SecureSettings map[string]interface{} `json:"secureSettings,omitempty"` -} - -type AlertManagerConfig struct { - Receivers []ContactPoint `json:"receivers"` - Route NotificationPolicies `json:"route"` - Templates []string `json:"templates"` -} - -// Map of template name → template -type MessageTemplate map[string]string - -type NotificationPolicies struct { - // Default alert receiver - Receiver string `json:"receiver"` - - // Default group bys - GroupBy []string `json:"group_by,omitempty"` - - // Default timing settings - GroupInterval string `json:"group_interval,omitempty"` - GroupWait string `json:"group_wait,omitempty"` - RepeatInterval string `json:"repeat_interval,omitempty"` - - // Routing policies - Routes []NotificationRoutingPolicy `json:"routes,omitempty"` -} - -type NotificationRoutingPolicy struct { - // Alert receiver - Receiver string `json:"receiver"` - // Default timing settings overrides - GroupInterval string `json:"group_interval,omitempty"` - GroupWait string `json:"group_wait,omitempty"` - RepeatInterval string `json:"repeat_interval,omitempty"` - - ObjectMatchers []AlertObjectMatcher `json:"object_matchers"` -} - -type AlertObjectMatcher [3]string diff --git a/vendor/github.com/K-Phoen/sdk/alert.go b/vendor/github.com/K-Phoen/sdk/alert.go deleted file mode 100644 index f8996580..00000000 --- a/vendor/github.com/K-Phoen/sdk/alert.go +++ /dev/null @@ -1,118 +0,0 @@ -package sdk - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - - ॐ तारे तुत्तारे तुरे स्व -*/ - -type Alert struct { - Name string `json:"name"` - Interval string `json:"interval"` - Rules []AlertRule `json:"rules"` -} - -type AlertRule struct { - For string `json:"for"` - GrafanaAlert *GrafanaAlert `json:"grafana_alert,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - Labels map[string]string `json:"labels,omitempty"` -} - -type GrafanaAlert struct { - Title string `json:"title"` - Condition string `json:"condition"` - NoDataState string `json:"no_data_state"` - ExecutionErrorState string `json:"exec_err_state,omitempty"` - Data []AlertQuery `json:"data"` -} - -type AlertQuery struct { - RefID string `json:"refId"` - QueryType string `json:"queryType"` - RelativeTimeRange *AlertRelativeTimeRange `json:"relativeTimeRange,omitempty"` - DatasourceUID string `json:"datasourceUid"` - Model AlertModel `json:"model"` -} - -type AlertRelativeTimeRange struct { - From int `json:"from"` // seconds - To int `json:"to"` // seconds -} - -type AlertModel struct { - RefID string `json:"refId,omitempty"` - QueryType string `json:"queryType,omitempty"` - Type string `json:"type,omitempty"` - Expr string `json:"expr,omitempty"` - Format string `json:"format,omitempty"` - LegendFormat string `json:"legendFormat,omitempty"` - Datasource AlertDatasourceRef `json:"datasource"` - Interval string `json:"interval,omitempty"` - IntervalMs int `json:"intervalMs,omitempty"` - Hide *bool `json:"hide,omitempty"` - Conditions []AlertCondition `json:"conditions,omitempty"` - - // For Graphite - Target string `json:"target,omitempty"` - - // For Stackdriver - MetricQuery *StackdriverAlertQuery `json:"metricQuery,omitempty"` -} - -type StackdriverAlertQuery struct { - ProjectName string `json:"projectName,omitempty"` - AlignOptions []StackdriverAlignOptions `json:"alignOptions,omitempty"` - AliasBy string `json:"aliasBy,omitempty"` - MetricType string `json:"metricType,omitempty"` - MetricKind string `json:"metricKind,omitempty"` - Filters []string `json:"filters,omitempty"` - AlignmentPeriod string `json:"alignmentPeriod,omitempty"` - CrossSeriesReducer string `json:"crossSeriesReducer,omitempty"` - PerSeriesAligner string `json:"perSeriesAligner,omitempty"` - ValueType string `json:"valueType,omitempty"` - Preprocessor string `json:"preprocessor,omitempty"` - GroupBys []string `json:"groupBys,omitempty"` -} - -type AlertDatasourceRef struct { - UID string `json:"uid"` - Type string `json:"type"` -} - -type AlertCondition struct { - Type string `json:"type,omitempty"` - Evaluator AlertEvaluator `json:"evaluator,omitempty"` - Operator AlertOperator `json:"operator,omitempty"` - Query AlertConditionQueryRef `json:"query,omitempty"` - Reducer AlertReducer `json:"reducer,omitempty"` -} -type AlertConditionQueryRef struct { - Params []string `json:"params,omitempty"` -} -type AlertEvaluator struct { - Params []float64 `json:"params,omitempty"` - Type string `json:"type,omitempty"` -} - -type AlertOperator struct { - Type string `json:"type,omitempty"` -} - -type AlertReducer struct { - Params []string `json:"params,omitempty"` - Type string `json:"type,omitempty"` -} diff --git a/vendor/github.com/K-Phoen/sdk/board.go b/vendor/github.com/K-Phoen/sdk/board.go deleted file mode 100644 index 2e8fdafc..00000000 --- a/vendor/github.com/K-Phoen/sdk/board.go +++ /dev/null @@ -1,240 +0,0 @@ -package sdk - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - - ॐ तारे तुत्तारे तुरे स्व -*/ - -import ( - "bytes" - "encoding/json" - "strings" - - "github.com/gosimple/slug" -) - -var ( - boardID uint -) - -// Constants for templating -const ( - TemplatingHideNone = iota - TemplatingHideLabel - TemplatingHideVariable -) - -type ( - // Board represents Grafana dashboard. - Board struct { - ID uint `json:"id,omitempty"` - UID string `json:"uid,omitempty"` - Slug string `json:"slug"` - Title string `json:"title"` - OriginalTitle string `json:"originalTitle"` - Tags []string `json:"tags"` - Style string `json:"style"` - Timezone string `json:"timezone"` - Editable bool `json:"editable"` - HideControls bool `json:"hideControls" graf:"hide-controls"` - SharedCrosshair bool `json:"sharedCrosshair" graf:"shared-crosshair"` - Panels []*Panel `json:"panels"` - Rows []*Row `json:"rows"` - Templating Templating `json:"templating"` - Annotations struct { - List []Annotation `json:"list"` - } `json:"annotations"` - Refresh *BoolString `json:"refresh,omitempty"` - SchemaVersion uint `json:"schemaVersion"` - Version uint `json:"version"` - Links []Link `json:"links"` - Time Time `json:"time"` - Timepicker Timepicker `json:"timepicker"` - GraphTooltip int `json:"graphTooltip,omitempty"` - } - Time struct { - From string `json:"from"` - To string `json:"to"` - } - Timepicker struct { - Now *bool `json:"now,omitempty"` - RefreshIntervals []string `json:"refresh_intervals"` - TimeOptions []string `json:"time_options"` - } - Templating struct { - List []TemplateVar `json:"list"` - } - TemplateVar struct { - Name string `json:"name"` - Type string `json:"type"` - Auto bool `json:"auto,omitempty"` - AutoCount *int `json:"auto_count,omitempty"` - Datasource *DatasourceRef `json:"datasource"` - Refresh BoolInt `json:"refresh"` - Options []Option `json:"options"` - IncludeAll bool `json:"includeAll"` - AllFormat string `json:"allFormat"` - AllValue string `json:"allValue"` - Multi bool `json:"multi"` - MultiFormat string `json:"multiFormat"` - Query interface{} `json:"query"` - Regex string `json:"regex"` - Current Current `json:"current"` - Label string `json:"label"` - Hide uint8 `json:"hide"` - Sort int `json:"sort"` - } - // for templateVar - Option struct { - Text string `json:"text"` - Value string `json:"value"` - Selected bool `json:"selected"` - } - // for templateVar - Current struct { - Tags []*string `json:"tags,omitempty"` - Text *StringSliceString `json:"text"` - Value interface{} `json:"value"` // TODO select more precise type - } - Annotation struct { - Name string `json:"name"` - Datasource *DatasourceRef `json:"datasource"` - ShowLine bool `json:"showLine"` - IconColor string `json:"iconColor"` - LineColor string `json:"lineColor"` - IconSize uint `json:"iconSize"` - Enable bool `json:"enable"` - Query string `json:"query"` - Expr string `json:"expr"` - Step string `json:"step"` - TextField string `json:"textField"` - TextFormat string `json:"textFormat"` - TitleFormat string `json:"titleFormat"` - TagsField string `json:"tagsField"` - Tags []string `json:"tags"` - TagKeys string `json:"tagKeys"` - Type string `json:"type"` - } - // Link represents link to another dashboard or external weblink - Link struct { - Title string `json:"title"` - Type string `json:"type"` - AsDropdown *bool `json:"asDropdown,omitempty"` - DashURI *string `json:"dashUri,omitempty"` - Dashboard *string `json:"dashboard,omitempty"` - Icon *string `json:"icon,omitempty"` - IncludeVars bool `json:"includeVars"` - KeepTime *bool `json:"keepTime,omitempty"` - Params *string `json:"params,omitempty"` - Tags []string `json:"tags,omitempty"` - TargetBlank *bool `json:"targetBlank,omitempty"` - Tooltip *string `json:"tooltip,omitempty"` - URL *string `json:"url,omitempty"` - } -) - -// Height of rows maybe passed as number (ex 200) or -// as string (ex "200px") or empty string -type Height string - -func (h *Height) UnmarshalJSON(raw []byte) error { - if raw == nil || bytes.Equal(raw, []byte(`"null"`)) { - return nil - } - if raw[0] != '"' { - tmp := []byte{'"'} - raw = append(tmp, raw...) - raw = append(raw, byte('"')) - } - var tmp string - err := json.Unmarshal(raw, &tmp) - *h = Height(tmp) - return err -} - -func NewBoard(title string) *Board { - boardID++ - return &Board{ - ID: boardID, - Title: title, - Style: "dark", - Timezone: "browser", - Editable: true, - HideControls: false, - Rows: []*Row{}, - } -} - -func (b *Board) AddLink(link Link) { - b.Links = append(b.Links, link) -} - -func (b *Board) RemoveTags(tags ...string) { - // order might change after removing the tags - for _, toRemoveTag := range tags { - tagLen := len(b.Tags) - for i, tag := range b.Tags { - if tag == toRemoveTag { - b.Tags[tagLen-1], b.Tags[i] = b.Tags[i], b.Tags[tagLen-1] - b.Tags = b.Tags[:tagLen-1] - break - } - } - } -} - -func (b *Board) AddTags(tags ...string) { - tagFound := make(map[string]bool, len(b.Tags)) - for _, tag := range b.Tags { - tagFound[tag] = true - } - for _, tag := range tags { - if tagFound[tag] { - continue - } - b.Tags = append(b.Tags, tag) - tagFound[tag] = true - } -} - -func (b *Board) HasTag(tag string) bool { - for _, t := range b.Tags { - if t == tag { - return true - } - } - return false -} - -func (b *Board) AddRow(title string) *Row { - if title == "" { - title = "New row" - } - row := &Row{ - Title: title, - Collapse: false, - Editable: true, - Height: "250px", - } - b.Rows = append(b.Rows, row) - return row -} - -func (b *Board) UpdateSlug() string { - b.Slug = strings.ToLower(slug.Make(b.Title)) - return b.Slug -} diff --git a/vendor/github.com/K-Phoen/sdk/custom-types.go b/vendor/github.com/K-Phoen/sdk/custom-types.go deleted file mode 100644 index bbad4f93..00000000 --- a/vendor/github.com/K-Phoen/sdk/custom-types.go +++ /dev/null @@ -1,235 +0,0 @@ -package sdk - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - - ॐ तारे तुत्तारे तुरे स्व -*/ - -import ( - "bytes" - "encoding/json" - "errors" - "strconv" - "strings" -) - -type BoolString struct { - Flag bool - Value string -} - -func (s *BoolString) UnmarshalJSON(raw []byte) error { - if raw == nil || bytes.Equal(raw, []byte(`"null"`)) { - return nil - } - var ( - tmp string - err error - ) - if raw[0] != '"' { - if bytes.Equal(raw, []byte("true")) { - s.Flag = true - return nil - } - if bytes.Equal(raw, []byte("false")) { - return nil - } - return errors.New("bad boolean value provided") - } - if err = json.Unmarshal(raw, &tmp); err != nil { - return err - } - s.Value = tmp - return nil -} - -func (s BoolString) MarshalJSON() ([]byte, error) { - if s.Value != "" { - var buf bytes.Buffer - buf.WriteRune('"') - buf.WriteString(s.Value) - buf.WriteRune('"') - return buf.Bytes(), nil - } - return strconv.AppendBool([]byte{}, s.Flag), nil -} - -type BoolInt struct { - Flag bool - Value *int64 -} - -func (s *BoolInt) UnmarshalJSON(raw []byte) error { - if raw == nil || bytes.Equal(raw, []byte(`"null"`)) { - return nil - } - var ( - tmp int64 - err error - ) - if tmp, err = strconv.ParseInt(string(raw), 10, 64); err != nil { - if bytes.Equal(raw, []byte("true")) { - s.Flag = true - return nil - } - if bytes.Equal(raw, []byte("false")) { - return nil - } - return errors.New("bad value provided") - } - s.Value = &tmp - return nil -} - -func (s BoolInt) MarshalJSON() ([]byte, error) { - if s.Value != nil { - return strconv.AppendInt([]byte{}, *s.Value, 10), nil - } - return strconv.AppendBool([]byte{}, s.Flag), nil -} - -func NewIntString(i int64) *IntString { - return &IntString{ - Value: i, - Valid: true, - } -} - -// IntString represents special type for json values that could be strings or ints: 100 or "100" -type IntString struct { - Value int64 - Valid bool -} - -// UnmarshalJSON implements custom unmarshalling for IntString type -func (v *IntString) UnmarshalJSON(raw []byte) error { - if raw == nil || bytes.Equal(raw, []byte(`"null"`)) || bytes.Equal(raw, []byte(`""`)) { - return nil - } - - strVal := string(raw) - if rune(raw[0]) == '"' { - strVal = strings.Trim(strVal, `"`) - } - - i, err := strconv.ParseInt(strVal, 10, 64) - if err != nil { - return err - } - - v.Value = i - v.Valid = true - - return nil -} - -// MarshalJSON implements custom marshalling for IntString type -func (v *IntString) MarshalJSON() ([]byte, error) { - if v.Valid { - strVal := strconv.FormatInt(v.Value, 10) - return []byte(strVal), nil - } - - return []byte(`"null"`), nil -} - -func NewFloatString(i float64) *FloatString { - return &FloatString{ - Value: i, - Valid: true, - } -} - -// FloatString represents special type for json values that could be strings or ints: 100 or "100" -type FloatString struct { - Value float64 - Valid bool -} - -// UnmarshalJSON implements custom unmarshalling for FloatString type -func (v *FloatString) UnmarshalJSON(raw []byte) error { - if raw == nil || bytes.Equal(raw, []byte(`"null"`)) || bytes.Equal(raw, []byte(`""`)) { - return nil - } - - strVal := string(raw) - if rune(raw[0]) == '"' { - strVal = strings.Trim(strVal, `"`) - } - - i, err := strconv.ParseFloat(strVal, 64) - if err != nil { - return err - } - - v.Value = i - v.Valid = true - - return nil -} - -// MarshalJSON implements custom marshalling for FloatString type -func (v *FloatString) MarshalJSON() ([]byte, error) { - if v.Valid { - strVal := strconv.FormatFloat(v.Value, 'g', -1, 64) - return []byte(strVal), nil - } - - return []byte(`"null"`), nil -} - -// StringSliceString represents special type for json values that could be -// strings or slice of strings: "something" or ["something"]. -type StringSliceString struct { - Value []string - Valid bool -} - -// UnmarshalJSON implements custom unmarshalling for StringSliceString type. -func (v *StringSliceString) UnmarshalJSON(raw []byte) error { - if raw == nil || bytes.Equal(raw, []byte(`"null"`)) { - return nil - } - - // First try with string. - var str string - if err := json.Unmarshal(raw, &str); err == nil { - v.Value = []string{str} - v.Valid = true - return nil - } - - // Lastly try with string slice. - var strSlice []string - err := json.Unmarshal(raw, &strSlice) - if err != nil { - return err - } - - v.Value = strSlice - v.Valid = true - return nil -} - -// MarshalJSON implements custom marshalling for StringSliceString type. -func (v *StringSliceString) MarshalJSON() ([]byte, error) { - if !v.Valid { - return []byte(`"null"`), nil - } - - return json.Marshal(v.Value) -} diff --git a/vendor/github.com/K-Phoen/sdk/datasource.go b/vendor/github.com/K-Phoen/sdk/datasource.go deleted file mode 100644 index 94efbe53..00000000 --- a/vendor/github.com/K-Phoen/sdk/datasource.go +++ /dev/null @@ -1,89 +0,0 @@ -package sdk - -import ( - "encoding/json" -) - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - ॐ तारे तुत्तारे तुरे स्व -*/ - -// Datasource as described in the doc -// http://docs.grafana.org/reference/http_api/#get-all-datasources -type Datasource struct { - ID uint `json:"id"` - OrgID uint `json:"orgId"` - Name string `json:"name"` - Type string `json:"type"` - Access string `json:"access"` // direct or proxy - URL string `json:"url"` - Password *string `json:"password,omitempty"` - User *string `json:"user,omitempty"` - Database *string `json:"database,omitempty"` - BasicAuth *bool `json:"basicAuth,omitempty"` - BasicAuthUser *string `json:"basicAuthUser,omitempty"` - BasicAuthPassword *string `json:"basicAuthPassword,omitempty"` - WithCredentials bool `json:"withCredentials"` - IsDefault bool `json:"isDefault"` - JSONData interface{} `json:"jsonData"` - SecureJSONData interface{} `json:"secureJsonData"` -} - -// Datasource type as described in -// http://docs.grafana.org/reference/http_api/#available-data-source-types -type DatasourceType struct { - Metrics bool `json:"metrics"` - Module string `json:"module"` - Name string `json:"name"` - Partials struct { - Query string `json:"query"` - } `json:"datasource"` - PluginType string `json:"pluginType"` - ServiceName string `json:"serviceName"` - Type string `json:"type"` -} - -// DatasourceRef is used to reference a datasource from panels, queries, etc. -type DatasourceRef struct { - // Type describes the type of the datasource, like "prometheus", "graphite", etc. - // Datasources of the same type should support same queries. - // If Type is empty in an unmarshaled DatasourceRef, check the LegacyName field. - Type string `json:"type"` - // UID is the uid of the specific datasource this references to. - UID string `json:"UID"` - // LegacyName is the old way of referencing a datasource by its name, replaced in Grafana v8.4.3 by Type and UID referencing. - // If datasource is encoded as a string, then it's unmarshaled into this LegacyName field (Type and UID will be empty). - // If LegacyName is not empty, then this DatasourceRef will be marshaled as a string, ignoring the values of Type and UID. - LegacyName string `json:"-"` -} - -func (ref DatasourceRef) MarshalJSON() ([]byte, error) { - if ref.LegacyName != "" { - return json.Marshal(ref.LegacyName) - } - type plain DatasourceRef - return json.Marshal(plain(ref)) -} - -func (ref *DatasourceRef) UnmarshalJSON(data []byte) error { - type plain DatasourceRef - err := json.Unmarshal(data, (*plain)(ref)) - if err != nil { - if err := json.Unmarshal(data, &ref.LegacyName); err == nil { - // We could check here if it's `-- Mixed --` and in that case set ref.Type="mixed". - return nil - } - } - return err -} diff --git a/vendor/github.com/K-Phoen/sdk/panel.go b/vendor/github.com/K-Phoen/sdk/panel.go deleted file mode 100644 index 4d672194..00000000 --- a/vendor/github.com/K-Phoen/sdk/panel.go +++ /dev/null @@ -1,1341 +0,0 @@ -package sdk - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - - ॐ तारे तुत्तारे तुरे स्व -*/ - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" -) - -// Each panel may be one of these types. -const ( - CustomType panelType = iota - DashlistType - GraphType - TableType - TextType - PluginlistType - AlertlistType - SinglestatType - StatType - RowType - BarGaugeType - HeatmapType - TimeseriesType - LogsType - GaugeType -) - -const MixedSource = "-- Mixed --" - -type RepeatDirection string - -const ( - RepeatDirectionVertical RepeatDirection = "v" - RepeatDirectionHorizontal RepeatDirection = "h" -) - -type ( - // Panel represents panels of different types defined in Grafana. - Panel struct { - CommonPanel - // Should be initialized only one type of panels. - // OfType field defines which of types below will be used. - *GraphPanel - *TablePanel - *TextPanel - *SinglestatPanel - *StatPanel - *DashlistPanel - *PluginlistPanel - *RowPanel - *AlertlistPanel - *BarGaugePanel - *HeatmapPanel - *TimeseriesPanel - *LogsPanel - *GaugePanel - *CustomPanel - } - panelType int8 - CommonPanel struct { - Datasource *DatasourceRef `json:"datasource,omitempty"` // metrics - Editable bool `json:"editable"` - Error bool `json:"error"` - GridPos struct { - H *int `json:"h,omitempty"` - W *int `json:"w,omitempty"` - X *int `json:"x,omitempty"` - Y *int `json:"y,omitempty"` - } `json:"gridPos,omitempty"` - Height interface{} `json:"height,omitempty"` // general - HideTimeOverride *bool `json:"hideTimeOverride,omitempty"` - ID uint `json:"id"` - IsNew bool `json:"isNew"` - Links []Link `json:"links,omitempty"` // general - MinSpan *float32 `json:"minSpan,omitempty"` // templating options - OfType panelType `json:"-"` // it required for defining type of the panel - Renderer *string `json:"renderer,omitempty"` // display styles - Repeat *string `json:"repeat,omitempty"` // templating options - RepeatDirection *RepeatDirection `json:"repeatDirection,omitempty"` - - // RepeatIteration *int64 `json:"repeatIteration,omitempty"` - RepeatPanelID *uint `json:"repeatPanelId,omitempty"` - ScopedVars map[string]struct { - Selected bool `json:"selected"` - Text string `json:"text"` - Value string `json:"value"` - } `json:"scopedVars,omitempty"` - Span float32 `json:"span"` // general - Title string `json:"title"` // general - Description *string `json:"description,omitempty"` // general - Transparent bool `json:"transparent"` - Type string `json:"type"` - } - GraphPanel struct { - AliasColors interface{} `json:"aliasColors"` // XXX - Bars bool `json:"bars"` - DashLength *uint `json:"dashLength,omitempty"` - Dashes *bool `json:"dashes,omitempty"` - Decimals *int `json:"decimals,omitempty"` - Fill int `json:"fill"` - // Grid grid `json:"grid"` obsoleted in 4.1 by xaxis and yaxis - - Legend Legend `json:"legend,omitempty"` - LeftYAxisLabel *string `json:"leftYAxisLabel,omitempty"` - Lines bool `json:"lines"` - Linewidth uint `json:"linewidth"` - NullPointMode string `json:"nullPointMode"` - Percentage bool `json:"percentage"` - Pointradius float32 `json:"pointradius"` - Points bool `json:"points"` - RightYAxisLabel *string `json:"rightYAxisLabel,omitempty"` - SeriesOverrides []SeriesOverride `json:"seriesOverrides,omitempty"` - SpaceLength *uint `json:"spaceLength,omitempty"` - Stack bool `json:"stack"` - SteppedLine bool `json:"steppedLine"` - Targets []Target `json:"targets,omitempty"` - Thresholds []Threshold `json:"thresholds,omitempty"` - TimeFrom *string `json:"timeFrom,omitempty"` - TimeShift *string `json:"timeShift,omitempty"` - Tooltip Tooltip `json:"tooltip"` - XAxis bool `json:"x-axis,omitempty"` - YAxis bool `json:"y-axis,omitempty"` - YFormats []string `json:"y_formats,omitempty"` - Xaxis Axis `json:"xaxis"` // was added in Grafana 4.x? - Yaxes []Axis `json:"yaxes"` // was added in Grafana 4.x? - FieldConfig *FieldConfig `json:"fieldConfig,omitempty"` - } - FieldConfig struct { - Defaults FieldConfigDefaults `json:"defaults"` - Overrides []FieldConfigOverride `json:"overrides"` - } - Options struct { - Orientation string `json:"orientation"` - TextMode string `json:"textMode"` - ColorMode string `json:"colorMode"` - GraphMode string `json:"graphMode"` - JustifyMode string `json:"justifyMode"` - DisplayMode string `json:"displayMode"` - Content string `json:"content"` - Mode string `json:"mode"` - ReduceOptions ReduceOptions `json:"reduceOptions"` - Text *TextOptions `json:"text,omitempty"` - } - TextOptions struct { - ValueSize int `json:"valueSize,omitempty"` - TitleSize int `json:"titleSize,omitempty"` - } - ReduceOptions struct { - Values bool `json:"values"` - Fields string `json:"fields"` - Calcs []string `json:"calcs"` - } - Threshold struct { - // the alert threshold value, we do not omitempty, since 0 is a valid - // threshold - Value float32 `json:"value"` - // critical, warning, ok, custom - ColorMode string `json:"colorMode,omitempty"` - // gt or lt - Op string `json:"op,omitempty"` - Fill bool `json:"fill"` - Line bool `json:"line"` - // hexadecimal color (e.g. #629e51, only when ColorMode is "custom") - FillColor string `json:"fillColor,omitempty"` - // hexadecimal color (e.g. #629e51, only when ColorMode is "custom") - LineColor string `json:"lineColor,omitempty"` - // left or right - Yaxis string `json:"yaxis,omitempty"` - } - - Tooltip struct { - Shared bool `json:"shared"` - ValueType string `json:"value_type"` - MsResolution bool `json:"msResolution,omitempty"` // was added in Grafana 3.x - Sort int `json:"sort,omitempty"` - } - TablePanel struct { - Columns []Column `json:"columns"` - Sort *Sort `json:"sort,omitempty"` - Styles []ColumnStyle `json:"styles"` - Transform string `json:"transform"` - Targets []Target `json:"targets,omitempty"` - Scroll bool `json:"scroll"` // from grafana 3.x - } - TextPanel struct { - Content string `json:"content"` - Mode string `json:"mode"` - PageSize uint `json:"pageSize"` - Scroll bool `json:"scroll"` - ShowHeader bool `json:"showHeader"` - Sort Sort `json:"sort"` - Styles []ColumnStyle `json:"styles"` - FieldConfig FieldConfig `json:"fieldConfig"` - Options struct { - Content string `json:"content"` - Mode string `json:"mode"` - } `json:"options"` - } - SinglestatPanel struct { - Colors []string `json:"colors"` - ColorValue bool `json:"colorValue"` - ColorBackground bool `json:"colorBackground"` - Decimals int `json:"decimals"` - Format string `json:"format"` - Gauge Gauge `json:"gauge,omitempty"` - MappingType *uint `json:"mappingType,omitempty"` - MappingTypes []*MapType `json:"mappingTypes,omitempty"` - MaxDataPoints *IntString `json:"maxDataPoints,omitempty"` - NullPointMode string `json:"nullPointMode"` - Postfix *string `json:"postfix,omitempty"` - PostfixFontSize *string `json:"postfixFontSize,omitempty"` - Prefix *string `json:"prefix,omitempty"` - PrefixFontSize *string `json:"prefixFontSize,omitempty"` - RangeMaps []*RangeMap `json:"rangeMaps,omitempty"` - SparkLine SparkLine `json:"sparkline,omitempty"` - Targets []Target `json:"targets,omitempty"` - Thresholds string `json:"thresholds"` - ValueFontSize string `json:"valueFontSize"` - ValueMaps []ValueMap `json:"valueMaps"` - ValueName string `json:"valueName"` - } - StatPanel struct { - Targets []Target `json:"targets,omitempty"` - Options StatOptions `json:"options"` - FieldConfig FieldConfig `json:"fieldConfig"` - } - StatOptions struct { - Orientation string `json:"orientation"` - TextMode string `json:"textMode"` - ColorMode string `json:"colorMode"` - GraphMode string `json:"graphMode"` - JustifyMode string `json:"justifyMode"` - ReduceOptions ReduceOptions `json:"reduceOptions"` - Text *TextOptions `json:"text,omitempty"` - } - DashlistPanel struct { - Mode string `json:"mode"` - Query string `json:"query"` - Tags []string `json:"tags"` - FolderID int `json:"folderId"` - Limit int `json:"limit"` - Headings bool `json:"headings"` - Recent bool `json:"recent"` - Search bool `json:"search"` - Starred bool `json:"starred"` - } - PluginlistPanel struct { - Limit int `json:"limit,omitempty"` - } - AlertlistPanel struct { - OnlyAlertsOnDashboard bool `json:"onlyAlertsOnDashboard"` - Show string `json:"show"` - SortOrder int `json:"sortOrder"` - Limit int `json:"limit"` - StateFilter []string `json:"stateFilter"` - NameFilter string `json:"nameFilter,omitempty"` - DashboardTags []string `json:"dashboardTags,omitempty"` - } - BarGaugePanel struct { - Options Options `json:"options"` - Targets []Target `json:"targets,omitempty"` - FieldConfig FieldConfig `json:"fieldConfig"` - } - RowPanel struct { - Panels []Panel `json:"panels"` - Collapsed bool `json:"collapsed"` - } - HeatmapPanel struct { - Cards struct { - CardPadding *float64 `json:"cardPadding"` - CardRound *float64 `json:"cardRound"` - } `json:"cards"` - Color struct { - CardColor string `json:"cardColor"` - ColorScale string `json:"colorScale"` - ColorScheme string `json:"colorScheme"` - Exponent float64 `json:"exponent"` - Min *float64 `json:"min,omitempty"` - Max *float64 `json:"max,omitempty"` - Mode string `json:"mode"` - } `json:"color"` - DataFormat string `json:"dataFormat"` - HideZeroBuckets bool `json:"hideZeroBuckets"` - HighlightCards bool `json:"highlightCards"` - Legend struct { - Show bool `json:"show"` - } `json:"legend"` - ReverseYBuckets bool `json:"reverseYBuckets"` - Targets []Target `json:"targets,omitempty"` - Tooltip struct { - Show bool `json:"show"` - ShowHistogram bool `json:"showHistogram"` - } `json:"tooltip"` - TooltipDecimals int `json:"tooltipDecimals"` - XAxis struct { - Show bool `json:"show"` - } `json:"xAxis"` - XBucketNumber *float64 `json:"xBucketNumber"` - XBucketSize *string `json:"xBucketSize"` - YAxis struct { - Decimals *int `json:"decimals"` - Format string `json:"format"` - LogBase int `json:"logBase"` - Show bool `json:"show"` - Max *string `json:"max"` - Min *string `json:"min"` - SplitFactor *float64 `json:"splitFactor"` - } `json:"yAxis"` - YBucketBound string `json:"yBucketBound"` - YBucketNumber *float64 `json:"yBucketNumber"` - YBucketSize *float64 `json:"yBucketSize"` - } - TimeseriesPanel struct { - Targets []Target `json:"targets,omitempty"` - Options TimeseriesOptions `json:"options"` - FieldConfig FieldConfig `json:"fieldConfig"` - } - TimeseriesOptions struct { - Legend TimeseriesLegendOptions `json:"legend,omitempty"` - Tooltip TimeseriesTooltipOptions `json:"tooltip,omitempty"` - } - TimeseriesLegendOptions struct { - Calcs []string `json:"calcs"` - Show *bool `json:"showLegend,omitempty"` - DisplayMode string `json:"displayMode"` - Placement string `json:"placement"` - } - TimeseriesTooltipOptions struct { - Mode string `json:"mode"` - } - FieldConfigDefaults struct { - Unit string `json:"unit"` - NoValue string `json:"noValue,omitempty"` - Decimals *int `json:"decimals,omitempty"` - Min *float64 `json:"min,omitempty"` - Max *float64 `json:"max,omitempty"` - Color FieldConfigColor `json:"color"` - Thresholds Thresholds `json:"thresholds"` - Custom FieldConfigCustom `json:"custom"` - Links []Link `json:"links,omitempty"` - } - FieldConfigOverrideProperty struct { - ID string `json:"id"` - Value interface{} `json:"value"` - } - FieldConfigOverride struct { - Matcher struct { - ID string `json:"id"` - Options string `json:"options"` - } `json:"matcher"` - Properties []FieldConfigOverrideProperty `json:"properties"` - } - FieldConfigCustom struct { - AxisLabel string `json:"axisLabel,omitempty"` - AxisPlacement string `json:"axisPlacement"` - AxisSoftMin *int `json:"axisSoftMin,omitempty"` - AxisSoftMax *int `json:"axisSoftMax,omitempty"` - BarAlignment int `json:"barAlignment"` - DrawStyle string `json:"drawStyle"` - FillOpacity int `json:"fillOpacity"` - GradientMode string `json:"gradientMode"` - LineInterpolation string `json:"lineInterpolation"` - LineWidth int `json:"lineWidth"` - PointSize int `json:"pointSize"` - ShowPoints string `json:"showPoints"` - SpanNulls bool `json:"spanNulls"` - HideFrom struct { - Legend bool `json:"legend"` - Tooltip bool `json:"tooltip"` - Viz bool `json:"viz"` - } `json:"hideFrom"` - LineStyle struct { - Fill string `json:"fill"` - } `json:"lineStyle"` - ScaleDistribution struct { - Type string `json:"type"` - Log int `json:"log,omitempty"` - } `json:"scaleDistribution"` - Stacking struct { - Group string `json:"group"` - Mode string `json:"mode"` - } `json:"stacking"` - ThresholdsStyle struct { - Mode string `json:"mode"` - } `json:"thresholdsStyle"` - } - Thresholds struct { - Mode string `json:"mode"` - Steps []ThresholdStep `json:"steps"` - } - ThresholdStep struct { - Color string `json:"color"` - Value *float64 `json:"value"` - } - FieldConfigColor struct { - Mode string `json:"mode"` - FixedColor string `json:"fixedColor,omitempty"` - SeriesBy string `json:"seriesBy,omitempty"` - } - LogsPanel struct { - Targets []Target `json:"targets,omitempty"` - Options LogsOptions `json:"options,omitempty"` - } - LogsOptions struct { - DedupStrategy string `json:"dedupStrategy"` - WrapLogMessage bool `json:"wrapLogMessage"` - ShowTime bool `json:"showTime"` - ShowLabels bool `json:"showLabels"` - ShowCommonLabels bool `json:"showCommonLabels"` - PrettifyLogMessage bool `json:"prettifyLogMessage"` - SortOrder string `json:"sortOrder"` - EnableLogDetails bool `json:"enableLogDetails"` - } - GaugePanel struct { - Targets []Target `json:"targets,omitempty"` - Options StatOptions `json:"options"` - FieldConfig FieldConfig `json:"fieldConfig"` - } - CustomPanel map[string]interface{} -) - -// for a graph panel -type ( - Axis struct { - Format string `json:"format"` - LogBase int `json:"logBase"` - Decimals int `json:"decimals,omitempty"` - Max *FloatString `json:"max,omitempty"` - Min *FloatString `json:"min,omitempty"` - Show bool `json:"show"` - Label string `json:"label,omitempty"` - } - SeriesOverride struct { - Alias string `json:"alias"` - Bars *bool `json:"bars,omitempty"` - Color *string `json:"color,omitempty"` - Dashes *bool `json:"dashes,omitempty"` - Fill *int `json:"fill,omitempty"` - FillBelowTo *string `json:"fillBelowTo,omitempty"` - Legend *bool `json:"legend,omitempty"` - Lines *bool `json:"lines,omitempty"` - LineWidth *int `json:"linewidth,omitempty"` - Stack *BoolString `json:"stack,omitempty"` - Transform *string `json:"transform,omitempty"` - YAxis *int `json:"yaxis,omitempty"` - ZIndex *int `json:"zindex,omitempty"` - NullPointMode *string `json:"nullPointMode,omitempty"` - } - Sort struct { - Col int `json:"col"` - Desc bool `json:"desc"` - } - Legend struct { - AlignAsTable bool `json:"alignAsTable"` - Avg bool `json:"avg"` - Current bool `json:"current"` - HideEmpty bool `json:"hideEmpty"` - HideZero bool `json:"hideZero"` - Max bool `json:"max"` - Min bool `json:"min"` - RightSide bool `json:"rightSide"` - Show bool `json:"show"` - SideWidth *uint `json:"sideWidth,omitempty"` - Total bool `json:"total"` - Values bool `json:"values"` - } -) - -// for a table -type ( - Column struct { - TextType string `json:"text"` - Value string `json:"value"` - } - ColumnStyle struct { - Alias *string `json:"alias"` - DateFormat *string `json:"dateFormat,omitempty"` - Pattern string `json:"pattern"` - Type string `json:"type"` - ColorMode *string `json:"colorMode,omitempty"` - Colors *[]string `json:"colors,omitempty"` - Decimals *int `json:"decimals,omitempty"` - Thresholds *[]string `json:"thresholds,omitempty"` - Unit *string `json:"unit,omitempty"` - MappingType int `json:"mappingType,omitempty"` - ValueMaps []ValueMap `json:"valueMaps,omitempty"` - Link bool `json:"link,omitempty"` - LinkTooltip *string `json:"linkTooltip,omitempty"` - LinkUrl *string `json:"linkUrl,omitempty"` - LinkTargetBlank bool `json:"linkTargetBlank,omitempty"` - } -) - -// for a stat -type ( - ValueMap struct { - Op string `json:"op"` - TextType string `json:"text"` - Value string `json:"value"` - } - Gauge struct { - MaxValue float32 `json:"maxValue"` - MinValue float32 `json:"minValue"` - Show bool `json:"show"` - ThresholdLabels bool `json:"thresholdLabels"` - ThresholdMarkers bool `json:"thresholdMarkers"` - } - SparkLine struct { - FillColor *string `json:"fillColor,omitempty"` - Full bool `json:"full,omitempty"` - LineColor *string `json:"lineColor,omitempty"` - Show bool `json:"show,omitempty"` - YMin *float64 `json:"ymin,omitempty"` - YMax *float64 `json:"ymax,omitempty"` - } -) - -// for an any panel -type Target struct { - RefID string `json:"refId"` - Datasource *DatasourceRef `json:"datasource,omitempty"` - Hide bool `json:"hide,omitempty"` - - // For PostgreSQL - Table string `json:"table,omitempty"` - TimeColumn string `json:"timeColumn,omitempty"` - MetricColumn string `json:"metricColumn,omitempty"` - RawSql string `json:"rawSql,omitempty"` - Select [][]struct { - Params []string `json:"params,omitempty"` - Type string `json:"type,omitempty"` - } `json:"select,omitempty"` - Where []struct { - Type string `json:"type,omitempty"` - Name string `json:"name,omitempty"` - Params []string `json:"params,omitempty"` - Datatype string `json:"datatype,omitempty"` - } `json:"where,omitempty"` - Group []struct { - Type string `json:"type,omitempty"` - Params []string `json:"params,omitempty"` - } `json:"group,omitempty"` - - // For Prometheus - Expr string `json:"expr,omitempty"` - IntervalFactor int `json:"intervalFactor,omitempty"` - Interval string `json:"interval,omitempty"` - Step int `json:"step,omitempty"` - LegendFormat string `json:"legendFormat,omitempty"` - Instant bool `json:"instant,omitempty"` - Format string `json:"format,omitempty"` - - // For InfluxDB - Measurement string `json:"measurement,omitempty"` - - // For Elasticsearch - DsType *string `json:"dsType,omitempty"` - Metrics []struct { - ID string `json:"id"` - Field string `json:"field"` - Type string `json:"type"` - } `json:"metrics,omitempty"` - Query string `json:"query,omitempty"` - Alias string `json:"alias,omitempty"` - RawQuery bool `json:"rawQuery,omitempty"` - TimeField string `json:"timeField,omitempty"` - BucketAggs []struct { - ID string `json:"id"` - Field string `json:"field"` - Type string `json:"type"` - Settings struct { - Interval string `json:"interval,omitempty"` - MinDocCount interface{} `json:"min_doc_count"` - Order string `json:"order,omitempty"` - OrderBy string `json:"orderBy,omitempty"` - Size string `json:"size,omitempty"` - } `json:"settings"` - } `json:"bucketAggs,omitempty"` - - // For Graphite - Target string `json:"target,omitempty"` - - // For CloudWatch - Namespace string `json:"namespace,omitempty"` - MetricName string `json:"metricName,omitempty"` - Statistics []string `json:"statistics,omitempty"` - Dimensions map[string]string `json:"dimensions,omitempty"` - Period string `json:"period,omitempty"` - Region string `json:"region,omitempty"` - - // For the Stackdriver data source. Find out more information at - // https:/grafana.com/docs/grafana/v6.0/features/datasources/stackdriver/ - ProjectName string `json:"projectName,omitempty"` - AlignOptions []StackdriverAlignOptions `json:"alignOptions,omitempty"` - AliasBy string `json:"aliasBy,omitempty"` - MetricType string `json:"metricType,omitempty"` - MetricKind string `json:"metricKind,omitempty"` - Filters []string `json:"filters,omitempty"` - AlignmentPeriod string `json:"alignmentPeriod,omitempty"` - CrossSeriesReducer string `json:"crossSeriesReducer,omitempty"` - PerSeriesAligner string `json:"perSeriesAligner,omitempty"` - ValueType string `json:"valueType,omitempty"` - Preprocessor string `json:"preprocessor,omitempty"` - GroupBys []string `json:"groupBys,omitempty"` - Tags []struct { - Key string `json:"key,omitempty"` - Operator string `json:"operator,omitempty"` - Value string `json:"value,omitempty"` - } `json:"tags,omitempty"` -} - -// StackdriverAlignOptions defines the list of alignment options shown in -// Grafana during query configuration. -type StackdriverAlignOptions struct { - Expanded bool `json:"expanded"` - Label string `json:"label"` - Options []StackdriverAlignOption `json:"options"` -} - -// StackdriverAlignOption defines a single alignment option shown in Grafana -// during query configuration. -type StackdriverAlignOption struct { - Label string `json:"label"` - MetricKinds []string `json:"metricKinds"` - Text string `json:"text"` - Value string `json:"value"` - ValueTypes []string `json:"valueTypes"` -} - -type MapType struct { - Name *string `json:"name,omitempty"` - Value *int `json:"value,omitempty"` -} - -type RangeMap struct { - From *string `json:"from,omitempty"` - Text *string `json:"text,omitempty"` - To *string `json:"to,omitempty"` -} - -// NewDashlist initializes panel with a dashlist panel. -func NewDashlist(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: DashlistType, - Title: title, - Type: "dashlist", - Renderer: &render, - IsNew: true}, - DashlistPanel: &DashlistPanel{}} -} - -// NewGraph initializes panel with a graph panel. -func NewGraph(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: GraphType, - Title: title, - Type: "graph", - Renderer: &render, - Span: 12, - IsNew: true}, - GraphPanel: &GraphPanel{ - NullPointMode: "connected", - Pointradius: 5, - XAxis: true, - YAxis: true, - }} -} - -// NewTimeseries initializes panel with a timeseries panel. -func NewTimeseries(title string) *Panel { - if title == "" { - title = "Panel Title" - } - - return &Panel{ - CommonPanel: CommonPanel{ - OfType: TimeseriesType, - Title: title, - Type: "timeseries", - Span: 12, - IsNew: true, - }, - TimeseriesPanel: &TimeseriesPanel{ - FieldConfig: FieldConfig{ - Defaults: FieldConfigDefaults{ - Color: FieldConfigColor{ - Mode: "palette-classic", - FixedColor: "green", - SeriesBy: "last", - }, - }, - }, - }, - } -} - -// NewLogs initializes a new panel as a Logs panel. -func NewLogs(title string) *Panel { - if title == "" { - title = "Panel Title" - } - - return &Panel{ - CommonPanel: CommonPanel{ - OfType: LogsType, - Title: title, - Type: "logs", - Span: 12, - IsNew: true, - }, - LogsPanel: &LogsPanel{}, - } -} - -// NewGauge initializes a new panel as a Gauge panel. -func NewGauge(title string) *Panel { - if title == "" { - title = "Panel Title" - } - - return &Panel{ - CommonPanel: CommonPanel{ - OfType: GaugeType, - Title: title, - Type: "gauge", - Span: 12, - IsNew: true, - }, - GaugePanel: &GaugePanel{ - Options: StatOptions{ - GraphMode: "none", - ReduceOptions: ReduceOptions{ - Calcs: []string{"lastNotNull"}, - }, - Text: &TextOptions{}, - }, - FieldConfig: FieldConfig{ - Defaults: FieldConfigDefaults{ - Color: FieldConfigColor{ - Mode: "thresholds", - FixedColor: "green", - SeriesBy: "last", - }, - }, - }, - }, - } -} - -// NewTable initializes panel with a table panel. -func NewTable(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: TableType, - Title: title, - Type: "table", - Renderer: &render, - IsNew: true}, - TablePanel: &TablePanel{}} -} - -// NewText initializes panel with a text panel. -func NewText(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: TextType, - Title: title, - Type: "text", - Renderer: &render, - IsNew: true}, - TextPanel: &TextPanel{}} -} - -// NewSinglestat initializes panel with a singlestat panel. -func NewSinglestat(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: SinglestatType, - Title: title, - Type: "singlestat", - Renderer: &render, - IsNew: true}, - SinglestatPanel: &SinglestatPanel{}} -} - -// NewStat initializes panel with a stat panel. -func NewStat(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: StatType, - Title: title, - Type: "stat", - Renderer: &render, - IsNew: true, - }, - StatPanel: &StatPanel{ - Options: StatOptions{ - GraphMode: "none", - ReduceOptions: ReduceOptions{ - Calcs: []string{"lastNotNull"}, - }, - Text: &TextOptions{}, - }, - FieldConfig: FieldConfig{ - Defaults: FieldConfigDefaults{ - Color: FieldConfigColor{ - Mode: "thresholds", - FixedColor: "green", - SeriesBy: "last", - }, - }, - }, - }, - } -} - -// NewPluginlist initializes panel with a stat panel. -func NewPluginlist(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: PluginlistType, - Title: title, - Type: "pluginlist", - Renderer: &render, - IsNew: true}, - PluginlistPanel: &PluginlistPanel{}} -} - -func NewAlertlist(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: AlertlistType, - Title: title, - Type: "alertlist", - Renderer: &render, - IsNew: true}, - AlertlistPanel: &AlertlistPanel{}} -} - -func NewHeatmap(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: HeatmapType, - Title: title, - Type: "heatmap", - Renderer: &render, - IsNew: true}, - HeatmapPanel: &HeatmapPanel{}} -} - -// NewCustom initializes panel with a stat panel. -func NewCustom(title string) *Panel { - if title == "" { - title = "Panel Title" - } - render := "flot" - return &Panel{ - CommonPanel: CommonPanel{ - OfType: CustomType, - Title: title, - Type: "singlestat", - Renderer: &render, - IsNew: true}, - CustomPanel: &CustomPanel{}} -} - -// ResetTargets delete all targets defined for a panel. -func (p *Panel) ResetTargets() { - switch p.OfType { - case GraphType: - p.GraphPanel.Targets = nil - case SinglestatType: - p.SinglestatPanel.Targets = nil - case StatType: - p.StatPanel.Targets = nil - case TableType: - p.TablePanel.Targets = nil - case BarGaugeType: - p.BarGaugePanel.Targets = nil - case HeatmapType: - p.HeatmapPanel.Targets = nil - case TimeseriesType: - p.TimeseriesPanel.Targets = nil - case LogsType: - p.LogsPanel.Targets = nil - case GaugeType: - p.GaugePanel.Targets = nil - } -} - -// AddTarget adds a new target as defined in the argument -// but with refId letter incremented. Value of refID from -// the argument will be used only if no target with such -// value already exists. -func (p *Panel) AddTarget(t *Target) { - switch p.OfType { - case GraphType: - p.GraphPanel.Targets = append(p.GraphPanel.Targets, *t) - case SinglestatType: - p.SinglestatPanel.Targets = append(p.SinglestatPanel.Targets, *t) - case StatType: - p.StatPanel.Targets = append(p.StatPanel.Targets, *t) - case TableType: - p.TablePanel.Targets = append(p.TablePanel.Targets, *t) - case HeatmapType: - p.HeatmapPanel.Targets = append(p.HeatmapPanel.Targets, *t) - case TimeseriesType: - p.TimeseriesPanel.Targets = append(p.TimeseriesPanel.Targets, *t) - case LogsType: - p.LogsPanel.Targets = append(p.LogsPanel.Targets, *t) - case GaugeType: - p.GaugePanel.Targets = append(p.GaugePanel.Targets, *t) - } - // TODO check for existing refID -} - -// SetTarget updates a target if target with such refId exists -// or creates a new one. -func (p *Panel) SetTarget(t *Target) { - setTarget := func(t *Target, targets *[]Target) { - for i, target := range *targets { - if t.RefID == target.RefID { - (*targets)[i] = *t - return - } - } - (*targets) = append((*targets), *t) - } - switch p.OfType { - case GraphType: - setTarget(t, &p.GraphPanel.Targets) - case SinglestatType: - setTarget(t, &p.SinglestatPanel.Targets) - case StatType: - setTarget(t, &p.StatPanel.Targets) - case TableType: - setTarget(t, &p.TablePanel.Targets) - case HeatmapType: - setTarget(t, &p.HeatmapPanel.Targets) - case TimeseriesType: - setTarget(t, &p.TimeseriesPanel.Targets) - case LogsType: - setTarget(t, &p.LogsPanel.Targets) - case GaugeType: - setTarget(t, &p.GaugePanel.Targets) - } -} - -// MapDatasources on all existing targets for the panel. -func (p *Panel) RepeatDatasourcesForEachTarget(dsNames ...string) { - repeatDS := func(dsNames []string, targets *[]Target) { - var refID = "A" - originalTargets := *targets - cleanedTargets := make([]Target, 0, len(originalTargets)*len(dsNames)) - *targets = cleanedTargets - for _, target := range originalTargets { - for _, ds := range dsNames { - newTarget := target - newTarget.RefID = refID - newTarget.Datasource = &DatasourceRef{LegacyName: ds} - refID = incRefID(refID) - *targets = append(*targets, newTarget) - } - } - } - switch p.OfType { - case GraphType: - repeatDS(dsNames, &p.GraphPanel.Targets) - case SinglestatType: - repeatDS(dsNames, &p.SinglestatPanel.Targets) - case StatType: - repeatDS(dsNames, &p.StatPanel.Targets) - case TableType: - repeatDS(dsNames, &p.TablePanel.Targets) - case HeatmapType: - repeatDS(dsNames, &p.HeatmapPanel.Targets) - case TimeseriesType: - repeatDS(dsNames, &p.TimeseriesPanel.Targets) - case LogsType: - repeatDS(dsNames, &p.LogsPanel.Targets) - case GaugeType: - repeatDS(dsNames, &p.GaugePanel.Targets) - } -} - -// RepeatTargetsForDatasources repeats all existing targets for a panel -// for all provided in the argument datasources. Existing datasources of -// targets are ignored. -func (p *Panel) RepeatTargetsForDatasources(dsNames ...string) { - repeatTarget := func(dsNames []string, targets *[]Target) { - var lastRefID string - lenTargets := len(*targets) - for i, name := range dsNames { - if i < lenTargets { - (*targets)[i].Datasource = &DatasourceRef{LegacyName: name} - lastRefID = (*targets)[i].RefID - } else { - newTarget := (*targets)[i%lenTargets] - lastRefID = incRefID(lastRefID) - newTarget.RefID = lastRefID - newTarget.Datasource = &DatasourceRef{LegacyName: name} - *targets = append(*targets, newTarget) - } - } - } - switch p.OfType { - case GraphType: - repeatTarget(dsNames, &p.GraphPanel.Targets) - case SinglestatType: - repeatTarget(dsNames, &p.SinglestatPanel.Targets) - case StatType: - repeatTarget(dsNames, &p.StatPanel.Targets) - case TableType: - repeatTarget(dsNames, &p.TablePanel.Targets) - case HeatmapType: - repeatTarget(dsNames, &p.HeatmapPanel.Targets) - case TimeseriesType: - repeatTarget(dsNames, &p.TimeseriesPanel.Targets) - case LogsType: - repeatTarget(dsNames, &p.LogsPanel.Targets) - case GaugeType: - repeatTarget(dsNames, &p.GaugePanel.Targets) - } -} - -// GetTargets iterates over all panel targets. It just returns nil if -// no targets defined for panel of concrete type. -func (p *Panel) GetTargets() *[]Target { - switch p.OfType { - case GraphType: - return &p.GraphPanel.Targets - case SinglestatType: - return &p.SinglestatPanel.Targets - case StatType: - return &p.StatPanel.Targets - case TableType: - return &p.TablePanel.Targets - case BarGaugeType: - return &p.BarGaugePanel.Targets - case HeatmapType: - return &p.HeatmapPanel.Targets - case TimeseriesType: - return &p.TimeseriesPanel.Targets - case LogsType: - return &p.LogsPanel.Targets - case GaugeType: - return &p.GaugePanel.Targets - default: - return nil - } -} - -type probePanel struct { - CommonPanel - // json.RawMessage -} - -func (p *Panel) UnmarshalJSON(b []byte) error { - var probe probePanel - var err error - - if err = json.Unmarshal(b, &probe); err != nil { - return err - } - - p.CommonPanel = probe.CommonPanel - switch probe.Type { - case "graph": - var graph GraphPanel - p.OfType = GraphType - if err = json.Unmarshal(b, &graph); err == nil { - p.GraphPanel = &graph - } - case "table": - var table TablePanel - p.OfType = TableType - if err = json.Unmarshal(b, &table); err == nil { - p.TablePanel = &table - } - case "text": - var text TextPanel - p.OfType = TextType - if err = json.Unmarshal(b, &text); err == nil { - p.TextPanel = &text - } - case "singlestat": - var singlestat SinglestatPanel - p.OfType = SinglestatType - if err = json.Unmarshal(b, &singlestat); err == nil { - p.SinglestatPanel = &singlestat - } - case "stat": - var stat StatPanel - p.OfType = StatType - if err = json.Unmarshal(b, &stat); err == nil { - p.StatPanel = &stat - } - case "dashlist": - var dashlist DashlistPanel - p.OfType = DashlistType - if err = json.Unmarshal(b, &dashlist); err == nil { - p.DashlistPanel = &dashlist - } - case "bargauge": - var bargauge BarGaugePanel - p.OfType = BarGaugeType - if err = json.Unmarshal(b, &bargauge); err == nil { - p.BarGaugePanel = &bargauge - } - case "heatmap": - var heatmap HeatmapPanel - p.OfType = HeatmapType - if err = json.Unmarshal(b, &heatmap); err == nil { - p.HeatmapPanel = &heatmap - } - case "timeseries": - var timeseries TimeseriesPanel - p.OfType = TimeseriesType - if err = json.Unmarshal(b, ×eries); err == nil { - p.TimeseriesPanel = ×eries - } - case "logs": - var logs LogsPanel - p.OfType = LogsType - if err = json.Unmarshal(b, &logs); err == nil { - p.LogsPanel = &logs - } - case "gauge": - var gauge GaugePanel - p.OfType = GaugeType - if err = json.Unmarshal(b, &gauge); err == nil { - p.GaugePanel = &gauge - } - case "row": - var rowpanel RowPanel - p.OfType = RowType - if err = json.Unmarshal(b, &rowpanel); err == nil { - p.RowPanel = &rowpanel - } - default: - var custom = make(CustomPanel) - p.OfType = CustomType - if err = json.Unmarshal(b, &custom); err == nil { - p.CustomPanel = &custom - } - } - - if err != nil && (probe.Title != "" || probe.Type != "") { - err = fmt.Errorf("%w (panel %q of type %q)", err, probe.Title, probe.Type) - } - - return err -} - -func (p *Panel) MarshalJSON() ([]byte, error) { - switch p.OfType { - case GraphType: - var outGraph = struct { - CommonPanel - GraphPanel - }{p.CommonPanel, *p.GraphPanel} - return json.Marshal(outGraph) - case TableType: - var outTable = struct { - CommonPanel - TablePanel - }{p.CommonPanel, *p.TablePanel} - return json.Marshal(outTable) - case TextType: - var outText = struct { - CommonPanel - TextPanel - }{p.CommonPanel, *p.TextPanel} - return json.Marshal(outText) - case SinglestatType: - var outSinglestat = struct { - CommonPanel - SinglestatPanel - }{p.CommonPanel, *p.SinglestatPanel} - return json.Marshal(outSinglestat) - case StatType: - var outSinglestat = struct { - CommonPanel - StatPanel - }{p.CommonPanel, *p.StatPanel} - return json.Marshal(outSinglestat) - case DashlistType: - var outDashlist = struct { - CommonPanel - DashlistPanel - }{p.CommonPanel, *p.DashlistPanel} - return json.Marshal(outDashlist) - case BarGaugeType: - var outBarGauge = struct { - CommonPanel - BarGaugePanel - }{p.CommonPanel, *p.BarGaugePanel} - return json.Marshal(outBarGauge) - case PluginlistType: - var outPluginlist = struct { - CommonPanel - PluginlistPanel - }{p.CommonPanel, *p.PluginlistPanel} - return json.Marshal(outPluginlist) - case AlertlistType: - var outAlertlist = struct { - CommonPanel - AlertlistPanel - }{p.CommonPanel, *p.AlertlistPanel} - return json.Marshal(outAlertlist) - case RowType: - var outRow = struct { - CommonPanel - RowPanel - }{p.CommonPanel, *p.RowPanel} - return json.Marshal(outRow) - case HeatmapType: - var outHeatmap = struct { - CommonPanel - HeatmapPanel - }{p.CommonPanel, *p.HeatmapPanel} - return json.Marshal(outHeatmap) - case TimeseriesType: - var outTimeseries = struct { - CommonPanel - TimeseriesPanel - }{p.CommonPanel, *p.TimeseriesPanel} - return json.Marshal(outTimeseries) - case LogsType: - var outLogs = struct { - CommonPanel - LogsPanel - }{p.CommonPanel, *p.LogsPanel} - return json.Marshal(outLogs) - case GaugeType: - var outGauge = struct { - CommonPanel - GaugePanel - }{p.CommonPanel, *p.GaugePanel} - return json.Marshal(outGauge) - case CustomType: - var outCustom = customPanelOutput{ - p.CommonPanel, - *p.CustomPanel, - } - return json.Marshal(outCustom) - } - return nil, errors.New("can't marshal unknown panel type") -} - -type customPanelOutput struct { - CommonPanel - CustomPanel -} - -func (c customPanelOutput) MarshalJSON() ([]byte, error) { - b, err := json.Marshal(c.CommonPanel) - if err != nil { - return b, err - } - // Append custom keys to marshalled CommonPanel. - buf := bytes.NewBuffer(b[:len(b)-1]) - - for k, v := range c.CustomPanel { - buf.WriteString(`,"`) - buf.WriteString(k) - buf.WriteString(`":`) - b, err := json.Marshal(v) - if err != nil { - return b, err - } - buf.Write(b) - } - buf.WriteString("}") - return buf.Bytes(), nil -} - -func incRefID(refID string) string { - firstLetter := refID[0] - ordinal := int(firstLetter) - ordinal++ - return string(rune(ordinal)) -} diff --git a/vendor/github.com/K-Phoen/sdk/row.go b/vendor/github.com/K-Phoen/sdk/row.go deleted file mode 100644 index e196df43..00000000 --- a/vendor/github.com/K-Phoen/sdk/row.go +++ /dev/null @@ -1,95 +0,0 @@ -package sdk - -/* - Copyright 2016 Alexander I.Grafov - Copyright 2016-2019 The Grafana SDK 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. - - ॐ तारे तुत्तारे तुरे स्व -*/ - -// Row represents single row of Grafana dashboard. -type Row struct { - Title string `json:"title"` - ShowTitle bool `json:"showTitle"` - Collapse bool `json:"collapse"` - Editable bool `json:"editable"` - Height Height `json:"height"` - Panels []Panel `json:"panels"` - Repeat *string `json:"repeat"` -} - -var lastPanelID uint - -func (r *Row) Add(panel *Panel) { - lastPanelID++ - panel.ID = lastPanelID - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddDashlist(data *DashlistPanel) { - lastPanelID++ - panel := NewDashlist("") - panel.ID = lastPanelID - panel.DashlistPanel = data - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddGraph(data *GraphPanel) { - lastPanelID++ - panel := NewGraph("") - panel.ID = lastPanelID - panel.GraphPanel = data - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddTable(data *TablePanel) { - lastPanelID++ - panel := NewTable("") - panel.ID = lastPanelID - panel.TablePanel = data - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddText(data *TextPanel) { - lastPanelID++ - panel := NewText("") - panel.ID = lastPanelID - panel.TextPanel = data - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddStat(data *StatPanel) { - lastPanelID++ - panel := NewStat("") - panel.ID = lastPanelID - panel.StatPanel = data - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddSinglestat(data *SinglestatPanel) { - lastPanelID++ - panel := NewSinglestat("") - panel.ID = lastPanelID - panel.SinglestatPanel = data - r.Panels = append(r.Panels, *panel) -} - -func (r *Row) AddCustom(data *CustomPanel) { - lastPanelID++ - panel := NewCustom("") - panel.ID = lastPanelID - panel.CustomPanel = data - r.Panels = append(r.Panels, *panel) -} diff --git a/vendor/github.com/blang/semver/.travis.yml b/vendor/github.com/blang/semver/.travis.yml deleted file mode 100644 index 102fb9a6..00000000 --- a/vendor/github.com/blang/semver/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go -matrix: - include: - - go: 1.4.3 - - go: 1.5.4 - - go: 1.6.3 - - go: 1.7 - - go: tip - allow_failures: - - go: tip -install: -- go get golang.org/x/tools/cmd/cover -- go get github.com/mattn/goveralls -script: -- echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci - -repotoken $COVERALLS_TOKEN -- echo "Build examples" ; cd examples && go build -- echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .) -env: - global: - secure: HroGEAUQpVq9zX1b1VIkraLiywhGbzvNnTZq2TMxgK7JHP8xqNplAeF1izrR2i4QLL9nsY+9WtYss4QuPvEtZcVHUobw6XnL6radF7jS1LgfYZ9Y7oF+zogZ2I5QUMRLGA7rcxQ05s7mKq3XZQfeqaNts4bms/eZRefWuaFZbkw= diff --git a/vendor/github.com/blang/semver/LICENSE b/vendor/github.com/blang/semver/LICENSE deleted file mode 100644 index 5ba5c86f..00000000 --- a/vendor/github.com/blang/semver/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2014 Benedikt Lang - -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/blang/semver/README.md b/vendor/github.com/blang/semver/README.md deleted file mode 100644 index 08b2e4a3..00000000 --- a/vendor/github.com/blang/semver/README.md +++ /dev/null @@ -1,194 +0,0 @@ -semver for golang [![Build Status](https://travis-ci.org/blang/semver.svg?branch=master)](https://travis-ci.org/blang/semver) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master) -====== - -semver is a [Semantic Versioning](http://semver.org/) library written in golang. It fully covers spec version `2.0.0`. - -Usage ------ -```bash -$ go get github.com/blang/semver -``` -Note: Always vendor your dependencies or fix on a specific version tag. - -```go -import github.com/blang/semver -v1, err := semver.Make("1.0.0-beta") -v2, err := semver.Make("2.0.0-beta") -v1.Compare(v2) -``` - -Also check the [GoDocs](http://godoc.org/github.com/blang/semver). - -Why should I use this lib? ------ - -- Fully spec compatible -- No reflection -- No regex -- Fully tested (Coverage >99%) -- Readable parsing/validation errors -- Fast (See [Benchmarks](#benchmarks)) -- Only Stdlib -- Uses values instead of pointers -- Many features, see below - - -Features ------ - -- Parsing and validation at all levels -- Comparator-like comparisons -- Compare Helper Methods -- InPlace manipulation -- Ranges `>=1.0.0 <2.0.0 || >=3.0.0 !3.0.1-beta.1` -- Wildcards `>=1.x`, `<=2.5.x` -- Sortable (implements sort.Interface) -- database/sql compatible (sql.Scanner/Valuer) -- encoding/json compatible (json.Marshaler/Unmarshaler) - -Ranges ------- - -A `Range` is a set of conditions which specify which versions satisfy the range. - -A condition is composed of an operator and a version. The supported operators are: - -- `<1.0.0` Less than `1.0.0` -- `<=1.0.0` Less than or equal to `1.0.0` -- `>1.0.0` Greater than `1.0.0` -- `>=1.0.0` Greater than or equal to `1.0.0` -- `1.0.0`, `=1.0.0`, `==1.0.0` Equal to `1.0.0` -- `!1.0.0`, `!=1.0.0` Not equal to `1.0.0`. Excludes version `1.0.0`. - -Note that spaces between the operator and the version will be gracefully tolerated. - -A `Range` can link multiple `Ranges` separated by space: - -Ranges can be linked by logical AND: - - - `>1.0.0 <2.0.0` would match between both ranges, so `1.1.1` and `1.8.7` but not `1.0.0` or `2.0.0` - - `>1.0.0 <3.0.0 !2.0.3-beta.2` would match every version between `1.0.0` and `3.0.0` except `2.0.3-beta.2` - -Ranges can also be linked by logical OR: - - - `<2.0.0 || >=3.0.0` would match `1.x.x` and `3.x.x` but not `2.x.x` - -AND has a higher precedence than OR. It's not possible to use brackets. - -Ranges can be combined by both AND and OR - - - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` - -Range usage: - -``` -v, err := semver.Parse("1.2.3") -range, err := semver.ParseRange(">1.0.0 <2.0.0 || >=3.0.0") -if range(v) { - //valid -} - -``` - -Example ------ - -Have a look at full examples in [examples/main.go](examples/main.go) - -```go -import github.com/blang/semver - -v, err := semver.Make("0.0.1-alpha.preview+123.github") -fmt.Printf("Major: %d\n", v.Major) -fmt.Printf("Minor: %d\n", v.Minor) -fmt.Printf("Patch: %d\n", v.Patch) -fmt.Printf("Pre: %s\n", v.Pre) -fmt.Printf("Build: %s\n", v.Build) - -// Prerelease versions array -if len(v.Pre) > 0 { - fmt.Println("Prerelease versions:") - for i, pre := range v.Pre { - fmt.Printf("%d: %q\n", i, pre) - } -} - -// Build meta data array -if len(v.Build) > 0 { - fmt.Println("Build meta data:") - for i, build := range v.Build { - fmt.Printf("%d: %q\n", i, build) - } -} - -v001, err := semver.Make("0.0.1") -// Compare using helpers: v.GT(v2), v.LT, v.GTE, v.LTE -v001.GT(v) == true -v.LT(v001) == true -v.GTE(v) == true -v.LTE(v) == true - -// Or use v.Compare(v2) for comparisons (-1, 0, 1): -v001.Compare(v) == 1 -v.Compare(v001) == -1 -v.Compare(v) == 0 - -// Manipulate Version in place: -v.Pre[0], err = semver.NewPRVersion("beta") -if err != nil { - fmt.Printf("Error parsing pre release version: %q", err) -} - -fmt.Println("\nValidate versions:") -v.Build[0] = "?" - -err = v.Validate() -if err != nil { - fmt.Printf("Validation failed: %s\n", err) -} -``` - - -Benchmarks ------ - - BenchmarkParseSimple-4 5000000 390 ns/op 48 B/op 1 allocs/op - BenchmarkParseComplex-4 1000000 1813 ns/op 256 B/op 7 allocs/op - BenchmarkParseAverage-4 1000000 1171 ns/op 163 B/op 4 allocs/op - BenchmarkStringSimple-4 20000000 119 ns/op 16 B/op 1 allocs/op - BenchmarkStringLarger-4 10000000 206 ns/op 32 B/op 2 allocs/op - BenchmarkStringComplex-4 5000000 324 ns/op 80 B/op 3 allocs/op - BenchmarkStringAverage-4 5000000 273 ns/op 53 B/op 2 allocs/op - BenchmarkValidateSimple-4 200000000 9.33 ns/op 0 B/op 0 allocs/op - BenchmarkValidateComplex-4 3000000 469 ns/op 0 B/op 0 allocs/op - BenchmarkValidateAverage-4 5000000 256 ns/op 0 B/op 0 allocs/op - BenchmarkCompareSimple-4 100000000 11.8 ns/op 0 B/op 0 allocs/op - BenchmarkCompareComplex-4 50000000 30.8 ns/op 0 B/op 0 allocs/op - BenchmarkCompareAverage-4 30000000 41.5 ns/op 0 B/op 0 allocs/op - BenchmarkSort-4 3000000 419 ns/op 256 B/op 2 allocs/op - BenchmarkRangeParseSimple-4 2000000 850 ns/op 192 B/op 5 allocs/op - BenchmarkRangeParseAverage-4 1000000 1677 ns/op 400 B/op 10 allocs/op - BenchmarkRangeParseComplex-4 300000 5214 ns/op 1440 B/op 30 allocs/op - BenchmarkRangeMatchSimple-4 50000000 25.6 ns/op 0 B/op 0 allocs/op - BenchmarkRangeMatchAverage-4 30000000 56.4 ns/op 0 B/op 0 allocs/op - BenchmarkRangeMatchComplex-4 10000000 153 ns/op 0 B/op 0 allocs/op - -See benchmark cases at [semver_test.go](semver_test.go) - - -Motivation ------ - -I simply couldn't find any lib supporting the full spec. Others were just wrong or used reflection and regex which i don't like. - - -Contribution ------ - -Feel free to make a pull request. For bigger changes create a issue first to discuss about it. - - -License ------ - -See [LICENSE](LICENSE) file. diff --git a/vendor/github.com/blang/semver/json.go b/vendor/github.com/blang/semver/json.go deleted file mode 100644 index a74bf7c4..00000000 --- a/vendor/github.com/blang/semver/json.go +++ /dev/null @@ -1,23 +0,0 @@ -package semver - -import ( - "encoding/json" -) - -// MarshalJSON implements the encoding/json.Marshaler interface. -func (v Version) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalJSON implements the encoding/json.Unmarshaler interface. -func (v *Version) UnmarshalJSON(data []byte) (err error) { - var versionString string - - if err = json.Unmarshal(data, &versionString); err != nil { - return - } - - *v, err = Parse(versionString) - - return -} diff --git a/vendor/github.com/blang/semver/package.json b/vendor/github.com/blang/semver/package.json deleted file mode 100644 index 1cf8ebdd..00000000 --- a/vendor/github.com/blang/semver/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "blang", - "bugs": { - "URL": "https://github.com/blang/semver/issues", - "url": "https://github.com/blang/semver/issues" - }, - "gx": { - "dvcsimport": "github.com/blang/semver" - }, - "gxVersion": "0.10.0", - "language": "go", - "license": "MIT", - "name": "semver", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.5.1" -} - diff --git a/vendor/github.com/blang/semver/range.go b/vendor/github.com/blang/semver/range.go deleted file mode 100644 index fca406d4..00000000 --- a/vendor/github.com/blang/semver/range.go +++ /dev/null @@ -1,416 +0,0 @@ -package semver - -import ( - "fmt" - "strconv" - "strings" - "unicode" -) - -type wildcardType int - -const ( - noneWildcard wildcardType = iota - majorWildcard wildcardType = 1 - minorWildcard wildcardType = 2 - patchWildcard wildcardType = 3 -) - -func wildcardTypefromInt(i int) wildcardType { - switch i { - case 1: - return majorWildcard - case 2: - return minorWildcard - case 3: - return patchWildcard - default: - return noneWildcard - } -} - -type comparator func(Version, Version) bool - -var ( - compEQ comparator = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == 0 - } - compNE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) != 0 - } - compGT = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == 1 - } - compGE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) >= 0 - } - compLT = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == -1 - } - compLE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) <= 0 - } -) - -type versionRange struct { - v Version - c comparator -} - -// rangeFunc creates a Range from the given versionRange. -func (vr *versionRange) rangeFunc() Range { - return Range(func(v Version) bool { - return vr.c(v, vr.v) - }) -} - -// Range represents a range of versions. -// A Range can be used to check if a Version satisfies it: -// -// range, err := semver.ParseRange(">1.0.0 <2.0.0") -// range(semver.MustParse("1.1.1") // returns true -type Range func(Version) bool - -// OR combines the existing Range with another Range using logical OR. -func (rf Range) OR(f Range) Range { - return Range(func(v Version) bool { - return rf(v) || f(v) - }) -} - -// AND combines the existing Range with another Range using logical AND. -func (rf Range) AND(f Range) Range { - return Range(func(v Version) bool { - return rf(v) && f(v) - }) -} - -// ParseRange parses a range and returns a Range. -// If the range could not be parsed an error is returned. -// -// Valid ranges are: -// - "<1.0.0" -// - "<=1.0.0" -// - ">1.0.0" -// - ">=1.0.0" -// - "1.0.0", "=1.0.0", "==1.0.0" -// - "!1.0.0", "!=1.0.0" -// -// A Range can consist of multiple ranges separated by space: -// Ranges can be linked by logical AND: -// - ">1.0.0 <2.0.0" would match between both ranges, so "1.1.1" and "1.8.7" but not "1.0.0" or "2.0.0" -// - ">1.0.0 <3.0.0 !2.0.3-beta.2" would match every version between 1.0.0 and 3.0.0 except 2.0.3-beta.2 -// -// Ranges can also be linked by logical OR: -// - "<2.0.0 || >=3.0.0" would match "1.x.x" and "3.x.x" but not "2.x.x" -// -// AND has a higher precedence than OR. It's not possible to use brackets. -// -// Ranges can be combined by both AND and OR -// -// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` -func ParseRange(s string) (Range, error) { - parts := splitAndTrim(s) - orParts, err := splitORParts(parts) - if err != nil { - return nil, err - } - expandedParts, err := expandWildcardVersion(orParts) - if err != nil { - return nil, err - } - var orFn Range - for _, p := range expandedParts { - var andFn Range - for _, ap := range p { - opStr, vStr, err := splitComparatorVersion(ap) - if err != nil { - return nil, err - } - vr, err := buildVersionRange(opStr, vStr) - if err != nil { - return nil, fmt.Errorf("Could not parse Range %q: %s", ap, err) - } - rf := vr.rangeFunc() - - // Set function - if andFn == nil { - andFn = rf - } else { // Combine with existing function - andFn = andFn.AND(rf) - } - } - if orFn == nil { - orFn = andFn - } else { - orFn = orFn.OR(andFn) - } - - } - return orFn, nil -} - -// splitORParts splits the already cleaned parts by '||'. -// Checks for invalid positions of the operator and returns an -// error if found. -func splitORParts(parts []string) ([][]string, error) { - var ORparts [][]string - last := 0 - for i, p := range parts { - if p == "||" { - if i == 0 { - return nil, fmt.Errorf("First element in range is '||'") - } - ORparts = append(ORparts, parts[last:i]) - last = i + 1 - } - } - if last == len(parts) { - return nil, fmt.Errorf("Last element in range is '||'") - } - ORparts = append(ORparts, parts[last:]) - return ORparts, nil -} - -// buildVersionRange takes a slice of 2: operator and version -// and builds a versionRange, otherwise an error. -func buildVersionRange(opStr, vStr string) (*versionRange, error) { - c := parseComparator(opStr) - if c == nil { - return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, "")) - } - v, err := Parse(vStr) - if err != nil { - return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err) - } - - return &versionRange{ - v: v, - c: c, - }, nil - -} - -// inArray checks if a byte is contained in an array of bytes -func inArray(s byte, list []byte) bool { - for _, el := range list { - if el == s { - return true - } - } - return false -} - -// splitAndTrim splits a range string by spaces and cleans whitespaces -func splitAndTrim(s string) (result []string) { - last := 0 - var lastChar byte - excludeFromSplit := []byte{'>', '<', '='} - for i := 0; i < len(s); i++ { - if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) { - if last < i-1 { - result = append(result, s[last:i]) - } - last = i + 1 - } else if s[i] != ' ' { - lastChar = s[i] - } - } - if last < len(s)-1 { - result = append(result, s[last:]) - } - - for i, v := range result { - result[i] = strings.Replace(v, " ", "", -1) - } - - // parts := strings.Split(s, " ") - // for _, x := range parts { - // if s := strings.TrimSpace(x); len(s) != 0 { - // result = append(result, s) - // } - // } - return -} - -// splitComparatorVersion splits the comparator from the version. -// Input must be free of leading or trailing spaces. -func splitComparatorVersion(s string) (string, string, error) { - i := strings.IndexFunc(s, unicode.IsDigit) - if i == -1 { - return "", "", fmt.Errorf("Could not get version from string: %q", s) - } - return strings.TrimSpace(s[0:i]), s[i:], nil -} - -// getWildcardType will return the type of wildcard that the -// passed version contains -func getWildcardType(vStr string) wildcardType { - parts := strings.Split(vStr, ".") - nparts := len(parts) - wildcard := parts[nparts-1] - - possibleWildcardType := wildcardTypefromInt(nparts) - if wildcard == "x" { - return possibleWildcardType - } - - return noneWildcard -} - -// createVersionFromWildcard will convert a wildcard version -// into a regular version, replacing 'x's with '0's, handling -// special cases like '1.x.x' and '1.x' -func createVersionFromWildcard(vStr string) string { - // handle 1.x.x - vStr2 := strings.Replace(vStr, ".x.x", ".x", 1) - vStr2 = strings.Replace(vStr2, ".x", ".0", 1) - parts := strings.Split(vStr2, ".") - - // handle 1.x - if len(parts) == 2 { - return vStr2 + ".0" - } - - return vStr2 -} - -// incrementMajorVersion will increment the major version -// of the passed version -func incrementMajorVersion(vStr string) (string, error) { - parts := strings.Split(vStr, ".") - i, err := strconv.Atoi(parts[0]) - if err != nil { - return "", err - } - parts[0] = strconv.Itoa(i + 1) - - return strings.Join(parts, "."), nil -} - -// incrementMajorVersion will increment the minor version -// of the passed version -func incrementMinorVersion(vStr string) (string, error) { - parts := strings.Split(vStr, ".") - i, err := strconv.Atoi(parts[1]) - if err != nil { - return "", err - } - parts[1] = strconv.Itoa(i + 1) - - return strings.Join(parts, "."), nil -} - -// expandWildcardVersion will expand wildcards inside versions -// following these rules: -// -// * when dealing with patch wildcards: -// >= 1.2.x will become >= 1.2.0 -// <= 1.2.x will become < 1.3.0 -// > 1.2.x will become >= 1.3.0 -// < 1.2.x will become < 1.2.0 -// != 1.2.x will become < 1.2.0 >= 1.3.0 -// -// * when dealing with minor wildcards: -// >= 1.x will become >= 1.0.0 -// <= 1.x will become < 2.0.0 -// > 1.x will become >= 2.0.0 -// < 1.0 will become < 1.0.0 -// != 1.x will become < 1.0.0 >= 2.0.0 -// -// * when dealing with wildcards without -// version operator: -// 1.2.x will become >= 1.2.0 < 1.3.0 -// 1.x will become >= 1.0.0 < 2.0.0 -func expandWildcardVersion(parts [][]string) ([][]string, error) { - var expandedParts [][]string - for _, p := range parts { - var newParts []string - for _, ap := range p { - if strings.Index(ap, "x") != -1 { - opStr, vStr, err := splitComparatorVersion(ap) - if err != nil { - return nil, err - } - - versionWildcardType := getWildcardType(vStr) - flatVersion := createVersionFromWildcard(vStr) - - var resultOperator string - var shouldIncrementVersion bool - switch opStr { - case ">": - resultOperator = ">=" - shouldIncrementVersion = true - case ">=": - resultOperator = ">=" - case "<": - resultOperator = "<" - case "<=": - resultOperator = "<" - shouldIncrementVersion = true - case "", "=", "==": - newParts = append(newParts, ">="+flatVersion) - resultOperator = "<" - shouldIncrementVersion = true - case "!=", "!": - newParts = append(newParts, "<"+flatVersion) - resultOperator = ">=" - shouldIncrementVersion = true - } - - var resultVersion string - if shouldIncrementVersion { - switch versionWildcardType { - case patchWildcard: - resultVersion, _ = incrementMinorVersion(flatVersion) - case minorWildcard: - resultVersion, _ = incrementMajorVersion(flatVersion) - } - } else { - resultVersion = flatVersion - } - - ap = resultOperator + resultVersion - } - newParts = append(newParts, ap) - } - expandedParts = append(expandedParts, newParts) - } - - return expandedParts, nil -} - -func parseComparator(s string) comparator { - switch s { - case "==": - fallthrough - case "": - fallthrough - case "=": - return compEQ - case ">": - return compGT - case ">=": - return compGE - case "<": - return compLT - case "<=": - return compLE - case "!": - fallthrough - case "!=": - return compNE - } - - return nil -} - -// MustParseRange is like ParseRange but panics if the range cannot be parsed. -func MustParseRange(s string) Range { - r, err := ParseRange(s) - if err != nil { - panic(`semver: ParseRange(` + s + `): ` + err.Error()) - } - return r -} diff --git a/vendor/github.com/blang/semver/semver.go b/vendor/github.com/blang/semver/semver.go deleted file mode 100644 index 8ee0842e..00000000 --- a/vendor/github.com/blang/semver/semver.go +++ /dev/null @@ -1,418 +0,0 @@ -package semver - -import ( - "errors" - "fmt" - "strconv" - "strings" -) - -const ( - numbers string = "0123456789" - alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" - alphanum = alphas + numbers -) - -// SpecVersion is the latest fully supported spec version of semver -var SpecVersion = Version{ - Major: 2, - Minor: 0, - Patch: 0, -} - -// Version represents a semver compatible version -type Version struct { - Major uint64 - Minor uint64 - Patch uint64 - Pre []PRVersion - Build []string //No Precendence -} - -// Version to string -func (v Version) String() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - - if len(v.Pre) > 0 { - b = append(b, '-') - b = append(b, v.Pre[0].String()...) - - for _, pre := range v.Pre[1:] { - b = append(b, '.') - b = append(b, pre.String()...) - } - } - - if len(v.Build) > 0 { - b = append(b, '+') - b = append(b, v.Build[0]...) - - for _, build := range v.Build[1:] { - b = append(b, '.') - b = append(b, build...) - } - } - - return string(b) -} - -// Equals checks if v is equal to o. -func (v Version) Equals(o Version) bool { - return (v.Compare(o) == 0) -} - -// EQ checks if v is equal to o. -func (v Version) EQ(o Version) bool { - return (v.Compare(o) == 0) -} - -// NE checks if v is not equal to o. -func (v Version) NE(o Version) bool { - return (v.Compare(o) != 0) -} - -// GT checks if v is greater than o. -func (v Version) GT(o Version) bool { - return (v.Compare(o) == 1) -} - -// GTE checks if v is greater than or equal to o. -func (v Version) GTE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// GE checks if v is greater than or equal to o. -func (v Version) GE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// LT checks if v is less than o. -func (v Version) LT(o Version) bool { - return (v.Compare(o) == -1) -} - -// LTE checks if v is less than or equal to o. -func (v Version) LTE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// LE checks if v is less than or equal to o. -func (v Version) LE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// Compare compares Versions v to o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v Version) Compare(o Version) int { - if v.Major != o.Major { - if v.Major > o.Major { - return 1 - } - return -1 - } - if v.Minor != o.Minor { - if v.Minor > o.Minor { - return 1 - } - return -1 - } - if v.Patch != o.Patch { - if v.Patch > o.Patch { - return 1 - } - return -1 - } - - // Quick comparison if a version has no prerelease versions - if len(v.Pre) == 0 && len(o.Pre) == 0 { - return 0 - } else if len(v.Pre) == 0 && len(o.Pre) > 0 { - return 1 - } else if len(v.Pre) > 0 && len(o.Pre) == 0 { - return -1 - } - - i := 0 - for ; i < len(v.Pre) && i < len(o.Pre); i++ { - if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { - continue - } else if comp == 1 { - return 1 - } else { - return -1 - } - } - - // If all pr versions are the equal but one has further prversion, this one greater - if i == len(v.Pre) && i == len(o.Pre) { - return 0 - } else if i == len(v.Pre) && i < len(o.Pre) { - return -1 - } else { - return 1 - } - -} - -// Validate validates v and returns error in case -func (v Version) Validate() error { - // Major, Minor, Patch already validated using uint64 - - for _, pre := range v.Pre { - if !pre.IsNum { //Numeric prerelease versions already uint64 - if len(pre.VersionStr) == 0 { - return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) - } - if !containsOnly(pre.VersionStr, alphanum) { - return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) - } - } - } - - for _, build := range v.Build { - if len(build) == 0 { - return fmt.Errorf("Build meta data can not be empty %q", build) - } - if !containsOnly(build, alphanum) { - return fmt.Errorf("Invalid character(s) found in build meta data %q", build) - } - } - - return nil -} - -// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error -func New(s string) (vp *Version, err error) { - v, err := Parse(s) - vp = &v - return -} - -// Make is an alias for Parse, parses version string and returns a validated Version or error -func Make(s string) (Version, error) { - return Parse(s) -} - -// ParseTolerant allows for certain version specifications that do not strictly adhere to semver -// specs to be parsed by this library. It does so by normalizing versions before passing them to -// Parse(). It currently trims spaces, removes a "v" prefix, and adds a 0 patch number to versions -// with only major and minor components specified -func ParseTolerant(s string) (Version, error) { - s = strings.TrimSpace(s) - s = strings.TrimPrefix(s, "v") - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - if len(parts) < 3 { - if strings.ContainsAny(parts[len(parts)-1], "+-") { - return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") - } - for len(parts) < 3 { - parts = append(parts, "0") - } - s = strings.Join(parts, ".") - } - - return Parse(s) -} - -// Parse parses version string and returns a validated Version or error -func Parse(s string) (Version, error) { - if len(s) == 0 { - return Version{}, errors.New("Version string empty") - } - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - if len(parts) != 3 { - return Version{}, errors.New("No Major.Minor.Patch elements found") - } - - // Major - if !containsOnly(parts[0], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) - } - if hasLeadingZeroes(parts[0]) { - return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) - } - major, err := strconv.ParseUint(parts[0], 10, 64) - if err != nil { - return Version{}, err - } - - // Minor - if !containsOnly(parts[1], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) - } - if hasLeadingZeroes(parts[1]) { - return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) - } - minor, err := strconv.ParseUint(parts[1], 10, 64) - if err != nil { - return Version{}, err - } - - v := Version{} - v.Major = major - v.Minor = minor - - var build, prerelease []string - patchStr := parts[2] - - if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { - build = strings.Split(patchStr[buildIndex+1:], ".") - patchStr = patchStr[:buildIndex] - } - - if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { - prerelease = strings.Split(patchStr[preIndex+1:], ".") - patchStr = patchStr[:preIndex] - } - - if !containsOnly(patchStr, numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) - } - if hasLeadingZeroes(patchStr) { - return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) - } - patch, err := strconv.ParseUint(patchStr, 10, 64) - if err != nil { - return Version{}, err - } - - v.Patch = patch - - // Prerelease - for _, prstr := range prerelease { - parsedPR, err := NewPRVersion(prstr) - if err != nil { - return Version{}, err - } - v.Pre = append(v.Pre, parsedPR) - } - - // Build meta data - for _, str := range build { - if len(str) == 0 { - return Version{}, errors.New("Build meta data is empty") - } - if !containsOnly(str, alphanum) { - return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) - } - v.Build = append(v.Build, str) - } - - return v, nil -} - -// MustParse is like Parse but panics if the version cannot be parsed. -func MustParse(s string) Version { - v, err := Parse(s) - if err != nil { - panic(`semver: Parse(` + s + `): ` + err.Error()) - } - return v -} - -// PRVersion represents a PreRelease Version -type PRVersion struct { - VersionStr string - VersionNum uint64 - IsNum bool -} - -// NewPRVersion creates a new valid prerelease version -func NewPRVersion(s string) (PRVersion, error) { - if len(s) == 0 { - return PRVersion{}, errors.New("Prerelease is empty") - } - v := PRVersion{} - if containsOnly(s, numbers) { - if hasLeadingZeroes(s) { - return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) - } - num, err := strconv.ParseUint(s, 10, 64) - - // Might never be hit, but just in case - if err != nil { - return PRVersion{}, err - } - v.VersionNum = num - v.IsNum = true - } else if containsOnly(s, alphanum) { - v.VersionStr = s - v.IsNum = false - } else { - return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) - } - return v, nil -} - -// IsNumeric checks if prerelease-version is numeric -func (v PRVersion) IsNumeric() bool { - return v.IsNum -} - -// Compare compares two PreRelease Versions v and o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v PRVersion) Compare(o PRVersion) int { - if v.IsNum && !o.IsNum { - return -1 - } else if !v.IsNum && o.IsNum { - return 1 - } else if v.IsNum && o.IsNum { - if v.VersionNum == o.VersionNum { - return 0 - } else if v.VersionNum > o.VersionNum { - return 1 - } else { - return -1 - } - } else { // both are Alphas - if v.VersionStr == o.VersionStr { - return 0 - } else if v.VersionStr > o.VersionStr { - return 1 - } else { - return -1 - } - } -} - -// PreRelease version to string -func (v PRVersion) String() string { - if v.IsNum { - return strconv.FormatUint(v.VersionNum, 10) - } - return v.VersionStr -} - -func containsOnly(s string, set string) bool { - return strings.IndexFunc(s, func(r rune) bool { - return !strings.ContainsRune(set, r) - }) == -1 -} - -func hasLeadingZeroes(s string) bool { - return len(s) > 1 && s[0] == '0' -} - -// NewBuildVersion creates a new valid build version -func NewBuildVersion(s string) (string, error) { - if len(s) == 0 { - return "", errors.New("Buildversion is empty") - } - if !containsOnly(s, alphanum) { - return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) - } - return s, nil -} diff --git a/vendor/github.com/blang/semver/sort.go b/vendor/github.com/blang/semver/sort.go deleted file mode 100644 index e18f8808..00000000 --- a/vendor/github.com/blang/semver/sort.go +++ /dev/null @@ -1,28 +0,0 @@ -package semver - -import ( - "sort" -) - -// Versions represents multiple versions. -type Versions []Version - -// Len returns length of version collection -func (s Versions) Len() int { - return len(s) -} - -// Swap swaps two versions inside the collection by its indices -func (s Versions) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Less checks if version at index i is less than version at index j -func (s Versions) Less(i, j int) bool { - return s[i].LT(s[j]) -} - -// Sort sorts a slice of versions -func Sort(versions []Version) { - sort.Sort(Versions(versions)) -} diff --git a/vendor/github.com/blang/semver/sql.go b/vendor/github.com/blang/semver/sql.go deleted file mode 100644 index eb4d8026..00000000 --- a/vendor/github.com/blang/semver/sql.go +++ /dev/null @@ -1,30 +0,0 @@ -package semver - -import ( - "database/sql/driver" - "fmt" -) - -// Scan implements the database/sql.Scanner interface. -func (v *Version) Scan(src interface{}) (err error) { - var str string - switch src := src.(type) { - case string: - str = src - case []byte: - str = string(src) - default: - return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) - } - - if t, err := Parse(str); err == nil { - *v = t - } - - return -} - -// Value implements the database/sql/driver.Valuer interface. -func (v Version) Value() (driver.Value, error) { - return v.String(), nil -} diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE deleted file mode 100644 index bc52e96f..00000000 --- a/vendor/github.com/davecgh/go-spew/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2012-2016 Dave Collins - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go deleted file mode 100644 index 79299478..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2015-2016 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when the code is not running on Google App Engine, compiled by GopherJS, and -// "-tags safe" is not added to the go build command line. The "disableunsafe" -// tag is deprecated and thus should not be used. -// Go versions prior to 1.4 are disabled because they use a different layout -// for interfaces which make the implementation of unsafeReflectValue more complex. -// +build !js,!appengine,!safe,!disableunsafe,go1.4 - -package spew - -import ( - "reflect" - "unsafe" -) - -const ( - // UnsafeDisabled is a build-time constant which specifies whether or - // not access to the unsafe package is available. - UnsafeDisabled = false - - // ptrSize is the size of a pointer on the current arch. - ptrSize = unsafe.Sizeof((*byte)(nil)) -) - -type flag uintptr - -var ( - // flagRO indicates whether the value field of a reflect.Value - // is read-only. - flagRO flag - - // flagAddr indicates whether the address of the reflect.Value's - // value may be taken. - flagAddr flag -) - -// flagKindMask holds the bits that make up the kind -// part of the flags field. In all the supported versions, -// it is in the lower 5 bits. -const flagKindMask = flag(0x1f) - -// Different versions of Go have used different -// bit layouts for the flags type. This table -// records the known combinations. -var okFlags = []struct { - ro, addr flag -}{{ - // From Go 1.4 to 1.5 - ro: 1 << 5, - addr: 1 << 7, -}, { - // Up to Go tip. - ro: 1<<5 | 1<<6, - addr: 1 << 8, -}} - -var flagValOffset = func() uintptr { - field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") - if !ok { - panic("reflect.Value has no flag field") - } - return field.Offset -}() - -// flagField returns a pointer to the flag field of a reflect.Value. -func flagField(v *reflect.Value) *flag { - return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset)) -} - -// unsafeReflectValue converts the passed reflect.Value into a one that bypasses -// the typical safety restrictions preventing access to unaddressable and -// unexported data. It works by digging the raw pointer to the underlying -// value out of the protected value and generating a new unprotected (unsafe) -// reflect.Value to it. -// -// This allows us to check for implementations of the Stringer and error -// interfaces to be used for pretty printing ordinarily unaddressable and -// inaccessible values such as unexported struct fields. -func unsafeReflectValue(v reflect.Value) reflect.Value { - if !v.IsValid() || (v.CanInterface() && v.CanAddr()) { - return v - } - flagFieldPtr := flagField(&v) - *flagFieldPtr &^= flagRO - *flagFieldPtr |= flagAddr - return v -} - -// Sanity checks against future reflect package changes -// to the type or semantics of the Value.flag field. -func init() { - field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") - if !ok { - panic("reflect.Value has no flag field") - } - if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() { - panic("reflect.Value flag field has changed kind") - } - type t0 int - var t struct { - A t0 - // t0 will have flagEmbedRO set. - t0 - // a will have flagStickyRO set - a t0 - } - vA := reflect.ValueOf(t).FieldByName("A") - va := reflect.ValueOf(t).FieldByName("a") - vt0 := reflect.ValueOf(t).FieldByName("t0") - - // Infer flagRO from the difference between the flags - // for the (otherwise identical) fields in t. - flagPublic := *flagField(&vA) - flagWithRO := *flagField(&va) | *flagField(&vt0) - flagRO = flagPublic ^ flagWithRO - - // Infer flagAddr from the difference between a value - // taken from a pointer and not. - vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A") - flagNoPtr := *flagField(&vA) - flagPtr := *flagField(&vPtrA) - flagAddr = flagNoPtr ^ flagPtr - - // Check that the inferred flags tally with one of the known versions. - for _, f := range okFlags { - if flagRO == f.ro && flagAddr == f.addr { - return - } - } - panic("reflect.Value read-only flag has changed semantics") -} diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go deleted file mode 100644 index 205c28d6..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2015-2016 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when the code is running on Google App Engine, compiled by GopherJS, or -// "-tags safe" is added to the go build command line. The "disableunsafe" -// tag is deprecated and thus should not be used. -// +build js appengine safe disableunsafe !go1.4 - -package spew - -import "reflect" - -const ( - // UnsafeDisabled is a build-time constant which specifies whether or - // not access to the unsafe package is available. - UnsafeDisabled = true -) - -// unsafeReflectValue typically converts the passed reflect.Value into a one -// that bypasses the typical safety restrictions preventing access to -// unaddressable and unexported data. However, doing this relies on access to -// the unsafe package. This is a stub version which simply returns the passed -// reflect.Value when the unsafe package is not available. -func unsafeReflectValue(v reflect.Value) reflect.Value { - return v -} diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go deleted file mode 100644 index 1be8ce94..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "fmt" - "io" - "reflect" - "sort" - "strconv" -) - -// Some constants in the form of bytes to avoid string overhead. This mirrors -// the technique used in the fmt package. -var ( - panicBytes = []byte("(PANIC=") - plusBytes = []byte("+") - iBytes = []byte("i") - trueBytes = []byte("true") - falseBytes = []byte("false") - interfaceBytes = []byte("(interface {})") - commaNewlineBytes = []byte(",\n") - newlineBytes = []byte("\n") - openBraceBytes = []byte("{") - openBraceNewlineBytes = []byte("{\n") - closeBraceBytes = []byte("}") - asteriskBytes = []byte("*") - colonBytes = []byte(":") - colonSpaceBytes = []byte(": ") - openParenBytes = []byte("(") - closeParenBytes = []byte(")") - spaceBytes = []byte(" ") - pointerChainBytes = []byte("->") - nilAngleBytes = []byte("") - maxNewlineBytes = []byte("\n") - maxShortBytes = []byte("") - circularBytes = []byte("") - circularShortBytes = []byte("") - invalidAngleBytes = []byte("") - openBracketBytes = []byte("[") - closeBracketBytes = []byte("]") - percentBytes = []byte("%") - precisionBytes = []byte(".") - openAngleBytes = []byte("<") - closeAngleBytes = []byte(">") - openMapBytes = []byte("map[") - closeMapBytes = []byte("]") - lenEqualsBytes = []byte("len=") - capEqualsBytes = []byte("cap=") -) - -// hexDigits is used to map a decimal value to a hex digit. -var hexDigits = "0123456789abcdef" - -// catchPanic handles any panics that might occur during the handleMethods -// calls. -func catchPanic(w io.Writer, v reflect.Value) { - if err := recover(); err != nil { - w.Write(panicBytes) - fmt.Fprintf(w, "%v", err) - w.Write(closeParenBytes) - } -} - -// handleMethods attempts to call the Error and String methods on the underlying -// type the passed reflect.Value represents and outputes the result to Writer w. -// -// It handles panics in any called methods by catching and displaying the error -// as the formatted value. -func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) { - // We need an interface to check if the type implements the error or - // Stringer interface. However, the reflect package won't give us an - // interface on certain things like unexported struct fields in order - // to enforce visibility rules. We use unsafe, when it's available, - // to bypass these restrictions since this package does not mutate the - // values. - if !v.CanInterface() { - if UnsafeDisabled { - return false - } - - v = unsafeReflectValue(v) - } - - // Choose whether or not to do error and Stringer interface lookups against - // the base type or a pointer to the base type depending on settings. - // Technically calling one of these methods with a pointer receiver can - // mutate the value, however, types which choose to satisify an error or - // Stringer interface with a pointer receiver should not be mutating their - // state inside these interface methods. - if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() { - v = unsafeReflectValue(v) - } - if v.CanAddr() { - v = v.Addr() - } - - // Is it an error or Stringer? - switch iface := v.Interface().(type) { - case error: - defer catchPanic(w, v) - if cs.ContinueOnMethod { - w.Write(openParenBytes) - w.Write([]byte(iface.Error())) - w.Write(closeParenBytes) - w.Write(spaceBytes) - return false - } - - w.Write([]byte(iface.Error())) - return true - - case fmt.Stringer: - defer catchPanic(w, v) - if cs.ContinueOnMethod { - w.Write(openParenBytes) - w.Write([]byte(iface.String())) - w.Write(closeParenBytes) - w.Write(spaceBytes) - return false - } - w.Write([]byte(iface.String())) - return true - } - return false -} - -// printBool outputs a boolean value as true or false to Writer w. -func printBool(w io.Writer, val bool) { - if val { - w.Write(trueBytes) - } else { - w.Write(falseBytes) - } -} - -// printInt outputs a signed integer value to Writer w. -func printInt(w io.Writer, val int64, base int) { - w.Write([]byte(strconv.FormatInt(val, base))) -} - -// printUint outputs an unsigned integer value to Writer w. -func printUint(w io.Writer, val uint64, base int) { - w.Write([]byte(strconv.FormatUint(val, base))) -} - -// printFloat outputs a floating point value using the specified precision, -// which is expected to be 32 or 64bit, to Writer w. -func printFloat(w io.Writer, val float64, precision int) { - w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision))) -} - -// printComplex outputs a complex value using the specified float precision -// for the real and imaginary parts to Writer w. -func printComplex(w io.Writer, c complex128, floatPrecision int) { - r := real(c) - w.Write(openParenBytes) - w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision))) - i := imag(c) - if i >= 0 { - w.Write(plusBytes) - } - w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision))) - w.Write(iBytes) - w.Write(closeParenBytes) -} - -// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' -// prefix to Writer w. -func printHexPtr(w io.Writer, p uintptr) { - // Null pointer. - num := uint64(p) - if num == 0 { - w.Write(nilAngleBytes) - return - } - - // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix - buf := make([]byte, 18) - - // It's simpler to construct the hex string right to left. - base := uint64(16) - i := len(buf) - 1 - for num >= base { - buf[i] = hexDigits[num%base] - num /= base - i-- - } - buf[i] = hexDigits[num] - - // Add '0x' prefix. - i-- - buf[i] = 'x' - i-- - buf[i] = '0' - - // Strip unused leading bytes. - buf = buf[i:] - w.Write(buf) -} - -// valuesSorter implements sort.Interface to allow a slice of reflect.Value -// elements to be sorted. -type valuesSorter struct { - values []reflect.Value - strings []string // either nil or same len and values - cs *ConfigState -} - -// newValuesSorter initializes a valuesSorter instance, which holds a set of -// surrogate keys on which the data should be sorted. It uses flags in -// ConfigState to decide if and how to populate those surrogate keys. -func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface { - vs := &valuesSorter{values: values, cs: cs} - if canSortSimply(vs.values[0].Kind()) { - return vs - } - if !cs.DisableMethods { - vs.strings = make([]string, len(values)) - for i := range vs.values { - b := bytes.Buffer{} - if !handleMethods(cs, &b, vs.values[i]) { - vs.strings = nil - break - } - vs.strings[i] = b.String() - } - } - if vs.strings == nil && cs.SpewKeys { - vs.strings = make([]string, len(values)) - for i := range vs.values { - vs.strings[i] = Sprintf("%#v", vs.values[i].Interface()) - } - } - return vs -} - -// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted -// directly, or whether it should be considered for sorting by surrogate keys -// (if the ConfigState allows it). -func canSortSimply(kind reflect.Kind) bool { - // This switch parallels valueSortLess, except for the default case. - switch kind { - case reflect.Bool: - return true - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - return true - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - return true - case reflect.Float32, reflect.Float64: - return true - case reflect.String: - return true - case reflect.Uintptr: - return true - case reflect.Array: - return true - } - return false -} - -// Len returns the number of values in the slice. It is part of the -// sort.Interface implementation. -func (s *valuesSorter) Len() int { - return len(s.values) -} - -// Swap swaps the values at the passed indices. It is part of the -// sort.Interface implementation. -func (s *valuesSorter) Swap(i, j int) { - s.values[i], s.values[j] = s.values[j], s.values[i] - if s.strings != nil { - s.strings[i], s.strings[j] = s.strings[j], s.strings[i] - } -} - -// valueSortLess returns whether the first value should sort before the second -// value. It is used by valueSorter.Less as part of the sort.Interface -// implementation. -func valueSortLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Bool: - return !a.Bool() && b.Bool() - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - return a.Int() < b.Int() - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - return a.Uint() < b.Uint() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.String: - return a.String() < b.String() - case reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Array: - // Compare the contents of both arrays. - l := a.Len() - for i := 0; i < l; i++ { - av := a.Index(i) - bv := b.Index(i) - if av.Interface() == bv.Interface() { - continue - } - return valueSortLess(av, bv) - } - } - return a.String() < b.String() -} - -// Less returns whether the value at index i should sort before the -// value at index j. It is part of the sort.Interface implementation. -func (s *valuesSorter) Less(i, j int) bool { - if s.strings == nil { - return valueSortLess(s.values[i], s.values[j]) - } - return s.strings[i] < s.strings[j] -} - -// sortValues is a sort function that handles both native types and any type that -// can be converted to error or Stringer. Other inputs are sorted according to -// their Value.String() value to ensure display stability. -func sortValues(values []reflect.Value, cs *ConfigState) { - if len(values) == 0 { - return - } - sort.Sort(newValuesSorter(values, cs)) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go deleted file mode 100644 index 2e3d22f3..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/config.go +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "fmt" - "io" - "os" -) - -// ConfigState houses the configuration options used by spew to format and -// display values. There is a global instance, Config, that is used to control -// all top-level Formatter and Dump functionality. Each ConfigState instance -// provides methods equivalent to the top-level functions. -// -// The zero value for ConfigState provides no indentation. You would typically -// want to set it to a space or a tab. -// -// Alternatively, you can use NewDefaultConfig to get a ConfigState instance -// with default settings. See the documentation of NewDefaultConfig for default -// values. -type ConfigState struct { - // Indent specifies the string to use for each indentation level. The - // global config instance that all top-level functions use set this to a - // single space by default. If you would like more indentation, you might - // set this to a tab with "\t" or perhaps two spaces with " ". - Indent string - - // MaxDepth controls the maximum number of levels to descend into nested - // data structures. The default, 0, means there is no limit. - // - // NOTE: Circular data structures are properly detected, so it is not - // necessary to set this value unless you specifically want to limit deeply - // nested data structures. - MaxDepth int - - // DisableMethods specifies whether or not error and Stringer interfaces are - // invoked for types that implement them. - DisableMethods bool - - // DisablePointerMethods specifies whether or not to check for and invoke - // error and Stringer interfaces on types which only accept a pointer - // receiver when the current type is not a pointer. - // - // NOTE: This might be an unsafe action since calling one of these methods - // with a pointer receiver could technically mutate the value, however, - // in practice, types which choose to satisify an error or Stringer - // interface with a pointer receiver should not be mutating their state - // inside these interface methods. As a result, this option relies on - // access to the unsafe package, so it will not have any effect when - // running in environments without access to the unsafe package such as - // Google App Engine or with the "safe" build tag specified. - DisablePointerMethods bool - - // DisablePointerAddresses specifies whether to disable the printing of - // pointer addresses. This is useful when diffing data structures in tests. - DisablePointerAddresses bool - - // DisableCapacities specifies whether to disable the printing of capacities - // for arrays, slices, maps and channels. This is useful when diffing - // data structures in tests. - DisableCapacities bool - - // ContinueOnMethod specifies whether or not recursion should continue once - // a custom error or Stringer interface is invoked. The default, false, - // means it will print the results of invoking the custom error or Stringer - // interface and return immediately instead of continuing to recurse into - // the internals of the data type. - // - // NOTE: This flag does not have any effect if method invocation is disabled - // via the DisableMethods or DisablePointerMethods options. - ContinueOnMethod bool - - // SortKeys specifies map keys should be sorted before being printed. Use - // this to have a more deterministic, diffable output. Note that only - // native types (bool, int, uint, floats, uintptr and string) and types - // that support the error or Stringer interfaces (if methods are - // enabled) are supported, with other types sorted according to the - // reflect.Value.String() output which guarantees display stability. - SortKeys bool - - // SpewKeys specifies that, as a last resort attempt, map keys should - // be spewed to strings and sorted by those strings. This is only - // considered if SortKeys is true. - SpewKeys bool -} - -// Config is the active configuration of the top-level functions. -// The configuration can be changed by modifying the contents of spew.Config. -var Config = ConfigState{Indent: " "} - -// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the formatted string as a value that satisfies error. See NewFormatter -// for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) { - return fmt.Errorf(format, c.convertArgs(a)...) -} - -// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprint(w, c.convertArgs(a)...) -} - -// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - return fmt.Fprintf(w, format, c.convertArgs(a)...) -} - -// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it -// passed with a Formatter interface returned by c.NewFormatter. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprintln(w, c.convertArgs(a)...) -} - -// Print is a wrapper for fmt.Print that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Print(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Print(a ...interface{}) (n int, err error) { - return fmt.Print(c.convertArgs(a)...) -} - -// Printf is a wrapper for fmt.Printf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) { - return fmt.Printf(format, c.convertArgs(a)...) -} - -// Println is a wrapper for fmt.Println that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Println(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Println(a ...interface{}) (n int, err error) { - return fmt.Println(c.convertArgs(a)...) -} - -// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Sprint(a ...interface{}) string { - return fmt.Sprint(c.convertArgs(a)...) -} - -// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, c.convertArgs(a)...) -} - -// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it -// were passed with a Formatter interface returned by c.NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Sprintln(a ...interface{}) string { - return fmt.Sprintln(c.convertArgs(a)...) -} - -/* -NewFormatter returns a custom formatter that satisfies the fmt.Formatter -interface. As a result, it integrates cleanly with standard fmt package -printing functions. The formatter is useful for inline printing of smaller data -types similar to the standard %v format specifier. - -The custom formatter only responds to the %v (most compact), %+v (adds pointer -addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb -combinations. Any other verbs such as %x and %q will be sent to the the -standard fmt package for formatting. In addition, the custom formatter ignores -the width and precision arguments (however they will still work on the format -specifiers not handled by the custom formatter). - -Typically this function shouldn't be called directly. It is much easier to make -use of the custom formatter by calling one of the convenience functions such as -c.Printf, c.Println, or c.Printf. -*/ -func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter { - return newFormatter(c, v) -} - -// Fdump formats and displays the passed arguments to io.Writer w. It formats -// exactly the same as Dump. -func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) { - fdump(c, w, a...) -} - -/* -Dump displays the passed parameters to standard out with newlines, customizable -indentation, and additional debug information such as complete types and all -pointer addresses used to indirect to the final value. It provides the -following features over the built-in printing facilities provided by the fmt -package: - - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output - -The configuration options are controlled by modifying the public members -of c. See ConfigState for options documentation. - -See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to -get the formatted result as a string. -*/ -func (c *ConfigState) Dump(a ...interface{}) { - fdump(c, os.Stdout, a...) -} - -// Sdump returns a string with the passed arguments formatted exactly the same -// as Dump. -func (c *ConfigState) Sdump(a ...interface{}) string { - var buf bytes.Buffer - fdump(c, &buf, a...) - return buf.String() -} - -// convertArgs accepts a slice of arguments and returns a slice of the same -// length with each argument converted to a spew Formatter interface using -// the ConfigState associated with s. -func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) { - formatters = make([]interface{}, len(args)) - for index, arg := range args { - formatters[index] = newFormatter(c, arg) - } - return formatters -} - -// NewDefaultConfig returns a ConfigState with the following default settings. -// -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false -func NewDefaultConfig() *ConfigState { - return &ConfigState{Indent: " "} -} diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go deleted file mode 100644 index aacaac6f..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/doc.go +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* -Package spew implements a deep pretty printer for Go data structures to aid in -debugging. - -A quick overview of the additional features spew provides over the built-in -printing facilities for Go data types are as follows: - - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) - -There are two different approaches spew allows for dumping Go data structures: - - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt - -Quick Start - -This section demonstrates how to quickly get started with spew. See the -sections below for further details on formatting and configuration options. - -To dump a variable with full newlines, indentation, type, and pointer -information use Dump, Fdump, or Sdump: - spew.Dump(myVar1, myVar2, ...) - spew.Fdump(someWriter, myVar1, myVar2, ...) - str := spew.Sdump(myVar1, myVar2, ...) - -Alternatively, if you would prefer to use format strings with a compacted inline -printing style, use the convenience wrappers Printf, Fprintf, etc with -%v (most compact), %+v (adds pointer addresses), %#v (adds types), or -%#+v (adds types and pointer addresses): - spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - -Configuration Options - -Configuration of spew is handled by fields in the ConfigState type. For -convenience, all of the top-level functions use a global state available -via the spew.Config global. - -It is also possible to create a ConfigState instance that provides methods -equivalent to the top-level functions. This allows concurrent configuration -options. See the ConfigState documentation for more details. - -The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage - -Simply call spew.Dump with a list of variables you want to dump: - - spew.Dump(myVar1, myVar2, ...) - -You may also call spew.Fdump if you would prefer to output to an arbitrary -io.Writer. For example, to dump to standard error: - - spew.Fdump(os.Stderr, myVar1, myVar2, ...) - -A third option is to call spew.Sdump to get the formatted output as a string: - - str := spew.Sdump(myVar1, myVar2, ...) - -Sample Dump Output - -See the Dump example for details on the setup of the types and variables being -shown here. - - (main.Foo) { - unexportedField: (*main.Bar)(0xf84002e210)({ - flag: (main.Flag) flagTwo, - data: (uintptr) - }), - ExportedField: (map[interface {}]interface {}) (len=1) { - (string) (len=3) "one": (bool) true - } - } - -Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C -command as shown. - ([]uint8) (len=32 cap=32) { - 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - 00000020 31 32 |12| - } - -Custom Formatter - -Spew provides a custom formatter that implements the fmt.Formatter interface -so that it integrates cleanly with standard fmt package printing functions. The -formatter is useful for inline printing of smaller data types similar to the -standard %v format specifier. - -The custom formatter only responds to the %v (most compact), %+v (adds pointer -addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb -combinations. Any other verbs such as %x and %q will be sent to the the -standard fmt package for formatting. In addition, the custom formatter ignores -the width and precision arguments (however they will still work on the format -specifiers not handled by the custom formatter). - -Custom Formatter Usage - -The simplest way to make use of the spew custom formatter is to call one of the -convenience functions such as spew.Printf, spew.Println, or spew.Printf. The -functions have syntax you are most likely already familiar with: - - spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - spew.Println(myVar, myVar2) - spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - -See the Index for the full list convenience functions. - -Sample Formatter Output - -Double pointer to a uint8: - %v: <**>5 - %+v: <**>(0xf8400420d0->0xf8400420c8)5 - %#v: (**uint8)5 - %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 - -Pointer to circular struct with a uint8 field and a pointer to itself: - %v: <*>{1 <*>} - %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} - %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} - %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} - -See the Printf example for details on the setup of variables being shown -here. - -Errors - -Since it is possible for custom Stringer/error interfaces to panic, spew -detects them and handles them internally by printing the panic information -inline with the output. Since spew is intended to provide deep pretty printing -capabilities on structures, it intentionally does not return any errors. -*/ -package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go deleted file mode 100644 index f78d89fc..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "encoding/hex" - "fmt" - "io" - "os" - "reflect" - "regexp" - "strconv" - "strings" -) - -var ( - // uint8Type is a reflect.Type representing a uint8. It is used to - // convert cgo types to uint8 slices for hexdumping. - uint8Type = reflect.TypeOf(uint8(0)) - - // cCharRE is a regular expression that matches a cgo char. - // It is used to detect character arrays to hexdump them. - cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`) - - // cUnsignedCharRE is a regular expression that matches a cgo unsigned - // char. It is used to detect unsigned character arrays to hexdump - // them. - cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`) - - // cUint8tCharRE is a regular expression that matches a cgo uint8_t. - // It is used to detect uint8_t arrays to hexdump them. - cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`) -) - -// dumpState contains information about the state of a dump operation. -type dumpState struct { - w io.Writer - depth int - pointers map[uintptr]int - ignoreNextType bool - ignoreNextIndent bool - cs *ConfigState -} - -// indent performs indentation according to the depth level and cs.Indent -// option. -func (d *dumpState) indent() { - if d.ignoreNextIndent { - d.ignoreNextIndent = false - return - } - d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth)) -} - -// unpackValue returns values inside of non-nil interfaces when possible. -// This is useful for data types like structs, arrays, slices, and maps which -// can contain varying types packed inside an interface. -func (d *dumpState) unpackValue(v reflect.Value) reflect.Value { - if v.Kind() == reflect.Interface && !v.IsNil() { - v = v.Elem() - } - return v -} - -// dumpPtr handles formatting of pointers by indirecting them as necessary. -func (d *dumpState) dumpPtr(v reflect.Value) { - // Remove pointers at or below the current depth from map used to detect - // circular refs. - for k, depth := range d.pointers { - if depth >= d.depth { - delete(d.pointers, k) - } - } - - // Keep list of all dereferenced pointers to show later. - pointerChain := make([]uintptr, 0) - - // Figure out how many levels of indirection there are by dereferencing - // pointers and unpacking interfaces down the chain while detecting circular - // references. - nilFound := false - cycleFound := false - indirects := 0 - ve := v - for ve.Kind() == reflect.Ptr { - if ve.IsNil() { - nilFound = true - break - } - indirects++ - addr := ve.Pointer() - pointerChain = append(pointerChain, addr) - if pd, ok := d.pointers[addr]; ok && pd < d.depth { - cycleFound = true - indirects-- - break - } - d.pointers[addr] = d.depth - - ve = ve.Elem() - if ve.Kind() == reflect.Interface { - if ve.IsNil() { - nilFound = true - break - } - ve = ve.Elem() - } - } - - // Display type information. - d.w.Write(openParenBytes) - d.w.Write(bytes.Repeat(asteriskBytes, indirects)) - d.w.Write([]byte(ve.Type().String())) - d.w.Write(closeParenBytes) - - // Display pointer information. - if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 { - d.w.Write(openParenBytes) - for i, addr := range pointerChain { - if i > 0 { - d.w.Write(pointerChainBytes) - } - printHexPtr(d.w, addr) - } - d.w.Write(closeParenBytes) - } - - // Display dereferenced value. - d.w.Write(openParenBytes) - switch { - case nilFound: - d.w.Write(nilAngleBytes) - - case cycleFound: - d.w.Write(circularBytes) - - default: - d.ignoreNextType = true - d.dump(ve) - } - d.w.Write(closeParenBytes) -} - -// dumpSlice handles formatting of arrays and slices. Byte (uint8 under -// reflection) arrays and slices are dumped in hexdump -C fashion. -func (d *dumpState) dumpSlice(v reflect.Value) { - // Determine whether this type should be hex dumped or not. Also, - // for types which should be hexdumped, try to use the underlying data - // first, then fall back to trying to convert them to a uint8 slice. - var buf []uint8 - doConvert := false - doHexDump := false - numEntries := v.Len() - if numEntries > 0 { - vt := v.Index(0).Type() - vts := vt.String() - switch { - // C types that need to be converted. - case cCharRE.MatchString(vts): - fallthrough - case cUnsignedCharRE.MatchString(vts): - fallthrough - case cUint8tCharRE.MatchString(vts): - doConvert = true - - // Try to use existing uint8 slices and fall back to converting - // and copying if that fails. - case vt.Kind() == reflect.Uint8: - // We need an addressable interface to convert the type - // to a byte slice. However, the reflect package won't - // give us an interface on certain things like - // unexported struct fields in order to enforce - // visibility rules. We use unsafe, when available, to - // bypass these restrictions since this package does not - // mutate the values. - vs := v - if !vs.CanInterface() || !vs.CanAddr() { - vs = unsafeReflectValue(vs) - } - if !UnsafeDisabled { - vs = vs.Slice(0, numEntries) - - // Use the existing uint8 slice if it can be - // type asserted. - iface := vs.Interface() - if slice, ok := iface.([]uint8); ok { - buf = slice - doHexDump = true - break - } - } - - // The underlying data needs to be converted if it can't - // be type asserted to a uint8 slice. - doConvert = true - } - - // Copy and convert the underlying type if needed. - if doConvert && vt.ConvertibleTo(uint8Type) { - // Convert and copy each element into a uint8 byte - // slice. - buf = make([]uint8, numEntries) - for i := 0; i < numEntries; i++ { - vv := v.Index(i) - buf[i] = uint8(vv.Convert(uint8Type).Uint()) - } - doHexDump = true - } - } - - // Hexdump the entire slice as needed. - if doHexDump { - indent := strings.Repeat(d.cs.Indent, d.depth) - str := indent + hex.Dump(buf) - str = strings.Replace(str, "\n", "\n"+indent, -1) - str = strings.TrimRight(str, d.cs.Indent) - d.w.Write([]byte(str)) - return - } - - // Recursively call dump for each item. - for i := 0; i < numEntries; i++ { - d.dump(d.unpackValue(v.Index(i))) - if i < (numEntries - 1) { - d.w.Write(commaNewlineBytes) - } else { - d.w.Write(newlineBytes) - } - } -} - -// dump is the main workhorse for dumping a value. It uses the passed reflect -// value to figure out what kind of object we are dealing with and formats it -// appropriately. It is a recursive function, however circular data structures -// are detected and handled properly. -func (d *dumpState) dump(v reflect.Value) { - // Handle invalid reflect values immediately. - kind := v.Kind() - if kind == reflect.Invalid { - d.w.Write(invalidAngleBytes) - return - } - - // Handle pointers specially. - if kind == reflect.Ptr { - d.indent() - d.dumpPtr(v) - return - } - - // Print type information unless already handled elsewhere. - if !d.ignoreNextType { - d.indent() - d.w.Write(openParenBytes) - d.w.Write([]byte(v.Type().String())) - d.w.Write(closeParenBytes) - d.w.Write(spaceBytes) - } - d.ignoreNextType = false - - // Display length and capacity if the built-in len and cap functions - // work with the value's kind and the len/cap itself is non-zero. - valueLen, valueCap := 0, 0 - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.Chan: - valueLen, valueCap = v.Len(), v.Cap() - case reflect.Map, reflect.String: - valueLen = v.Len() - } - if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 { - d.w.Write(openParenBytes) - if valueLen != 0 { - d.w.Write(lenEqualsBytes) - printInt(d.w, int64(valueLen), 10) - } - if !d.cs.DisableCapacities && valueCap != 0 { - if valueLen != 0 { - d.w.Write(spaceBytes) - } - d.w.Write(capEqualsBytes) - printInt(d.w, int64(valueCap), 10) - } - d.w.Write(closeParenBytes) - d.w.Write(spaceBytes) - } - - // Call Stringer/error interfaces if they exist and the handle methods flag - // is enabled - if !d.cs.DisableMethods { - if (kind != reflect.Invalid) && (kind != reflect.Interface) { - if handled := handleMethods(d.cs, d.w, v); handled { - return - } - } - } - - switch kind { - case reflect.Invalid: - // Do nothing. We should never get here since invalid has already - // been handled above. - - case reflect.Bool: - printBool(d.w, v.Bool()) - - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - printInt(d.w, v.Int(), 10) - - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - printUint(d.w, v.Uint(), 10) - - case reflect.Float32: - printFloat(d.w, v.Float(), 32) - - case reflect.Float64: - printFloat(d.w, v.Float(), 64) - - case reflect.Complex64: - printComplex(d.w, v.Complex(), 32) - - case reflect.Complex128: - printComplex(d.w, v.Complex(), 64) - - case reflect.Slice: - if v.IsNil() { - d.w.Write(nilAngleBytes) - break - } - fallthrough - - case reflect.Array: - d.w.Write(openBraceNewlineBytes) - d.depth++ - if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { - d.indent() - d.w.Write(maxNewlineBytes) - } else { - d.dumpSlice(v) - } - d.depth-- - d.indent() - d.w.Write(closeBraceBytes) - - case reflect.String: - d.w.Write([]byte(strconv.Quote(v.String()))) - - case reflect.Interface: - // The only time we should get here is for nil interfaces due to - // unpackValue calls. - if v.IsNil() { - d.w.Write(nilAngleBytes) - } - - case reflect.Ptr: - // Do nothing. We should never get here since pointers have already - // been handled above. - - case reflect.Map: - // nil maps should be indicated as different than empty maps - if v.IsNil() { - d.w.Write(nilAngleBytes) - break - } - - d.w.Write(openBraceNewlineBytes) - d.depth++ - if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { - d.indent() - d.w.Write(maxNewlineBytes) - } else { - numEntries := v.Len() - keys := v.MapKeys() - if d.cs.SortKeys { - sortValues(keys, d.cs) - } - for i, key := range keys { - d.dump(d.unpackValue(key)) - d.w.Write(colonSpaceBytes) - d.ignoreNextIndent = true - d.dump(d.unpackValue(v.MapIndex(key))) - if i < (numEntries - 1) { - d.w.Write(commaNewlineBytes) - } else { - d.w.Write(newlineBytes) - } - } - } - d.depth-- - d.indent() - d.w.Write(closeBraceBytes) - - case reflect.Struct: - d.w.Write(openBraceNewlineBytes) - d.depth++ - if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { - d.indent() - d.w.Write(maxNewlineBytes) - } else { - vt := v.Type() - numFields := v.NumField() - for i := 0; i < numFields; i++ { - d.indent() - vtf := vt.Field(i) - d.w.Write([]byte(vtf.Name)) - d.w.Write(colonSpaceBytes) - d.ignoreNextIndent = true - d.dump(d.unpackValue(v.Field(i))) - if i < (numFields - 1) { - d.w.Write(commaNewlineBytes) - } else { - d.w.Write(newlineBytes) - } - } - } - d.depth-- - d.indent() - d.w.Write(closeBraceBytes) - - case reflect.Uintptr: - printHexPtr(d.w, uintptr(v.Uint())) - - case reflect.UnsafePointer, reflect.Chan, reflect.Func: - printHexPtr(d.w, v.Pointer()) - - // There were not any other types at the time this code was written, but - // fall back to letting the default fmt package handle it in case any new - // types are added. - default: - if v.CanInterface() { - fmt.Fprintf(d.w, "%v", v.Interface()) - } else { - fmt.Fprintf(d.w, "%v", v.String()) - } - } -} - -// fdump is a helper function to consolidate the logic from the various public -// methods which take varying writers and config states. -func fdump(cs *ConfigState, w io.Writer, a ...interface{}) { - for _, arg := range a { - if arg == nil { - w.Write(interfaceBytes) - w.Write(spaceBytes) - w.Write(nilAngleBytes) - w.Write(newlineBytes) - continue - } - - d := dumpState{w: w, cs: cs} - d.pointers = make(map[uintptr]int) - d.dump(reflect.ValueOf(arg)) - d.w.Write(newlineBytes) - } -} - -// Fdump formats and displays the passed arguments to io.Writer w. It formats -// exactly the same as Dump. -func Fdump(w io.Writer, a ...interface{}) { - fdump(&Config, w, a...) -} - -// Sdump returns a string with the passed arguments formatted exactly the same -// as Dump. -func Sdump(a ...interface{}) string { - var buf bytes.Buffer - fdump(&Config, &buf, a...) - return buf.String() -} - -/* -Dump displays the passed parameters to standard out with newlines, customizable -indentation, and additional debug information such as complete types and all -pointer addresses used to indirect to the final value. It provides the -following features over the built-in printing facilities provided by the fmt -package: - - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output - -The configuration options are controlled by an exported package global, -spew.Config. See ConfigState for options documentation. - -See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to -get the formatted result as a string. -*/ -func Dump(a ...interface{}) { - fdump(&Config, os.Stdout, a...) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go deleted file mode 100644 index b04edb7d..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/format.go +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "fmt" - "reflect" - "strconv" - "strings" -) - -// supportedFlags is a list of all the character flags supported by fmt package. -const supportedFlags = "0-+# " - -// formatState implements the fmt.Formatter interface and contains information -// about the state of a formatting operation. The NewFormatter function can -// be used to get a new Formatter which can be used directly as arguments -// in standard fmt package printing calls. -type formatState struct { - value interface{} - fs fmt.State - depth int - pointers map[uintptr]int - ignoreNextType bool - cs *ConfigState -} - -// buildDefaultFormat recreates the original format string without precision -// and width information to pass in to fmt.Sprintf in the case of an -// unrecognized type. Unless new types are added to the language, this -// function won't ever be called. -func (f *formatState) buildDefaultFormat() (format string) { - buf := bytes.NewBuffer(percentBytes) - - for _, flag := range supportedFlags { - if f.fs.Flag(int(flag)) { - buf.WriteRune(flag) - } - } - - buf.WriteRune('v') - - format = buf.String() - return format -} - -// constructOrigFormat recreates the original format string including precision -// and width information to pass along to the standard fmt package. This allows -// automatic deferral of all format strings this package doesn't support. -func (f *formatState) constructOrigFormat(verb rune) (format string) { - buf := bytes.NewBuffer(percentBytes) - - for _, flag := range supportedFlags { - if f.fs.Flag(int(flag)) { - buf.WriteRune(flag) - } - } - - if width, ok := f.fs.Width(); ok { - buf.WriteString(strconv.Itoa(width)) - } - - if precision, ok := f.fs.Precision(); ok { - buf.Write(precisionBytes) - buf.WriteString(strconv.Itoa(precision)) - } - - buf.WriteRune(verb) - - format = buf.String() - return format -} - -// unpackValue returns values inside of non-nil interfaces when possible and -// ensures that types for values which have been unpacked from an interface -// are displayed when the show types flag is also set. -// This is useful for data types like structs, arrays, slices, and maps which -// can contain varying types packed inside an interface. -func (f *formatState) unpackValue(v reflect.Value) reflect.Value { - if v.Kind() == reflect.Interface { - f.ignoreNextType = false - if !v.IsNil() { - v = v.Elem() - } - } - return v -} - -// formatPtr handles formatting of pointers by indirecting them as necessary. -func (f *formatState) formatPtr(v reflect.Value) { - // Display nil if top level pointer is nil. - showTypes := f.fs.Flag('#') - if v.IsNil() && (!showTypes || f.ignoreNextType) { - f.fs.Write(nilAngleBytes) - return - } - - // Remove pointers at or below the current depth from map used to detect - // circular refs. - for k, depth := range f.pointers { - if depth >= f.depth { - delete(f.pointers, k) - } - } - - // Keep list of all dereferenced pointers to possibly show later. - pointerChain := make([]uintptr, 0) - - // Figure out how many levels of indirection there are by derferencing - // pointers and unpacking interfaces down the chain while detecting circular - // references. - nilFound := false - cycleFound := false - indirects := 0 - ve := v - for ve.Kind() == reflect.Ptr { - if ve.IsNil() { - nilFound = true - break - } - indirects++ - addr := ve.Pointer() - pointerChain = append(pointerChain, addr) - if pd, ok := f.pointers[addr]; ok && pd < f.depth { - cycleFound = true - indirects-- - break - } - f.pointers[addr] = f.depth - - ve = ve.Elem() - if ve.Kind() == reflect.Interface { - if ve.IsNil() { - nilFound = true - break - } - ve = ve.Elem() - } - } - - // Display type or indirection level depending on flags. - if showTypes && !f.ignoreNextType { - f.fs.Write(openParenBytes) - f.fs.Write(bytes.Repeat(asteriskBytes, indirects)) - f.fs.Write([]byte(ve.Type().String())) - f.fs.Write(closeParenBytes) - } else { - if nilFound || cycleFound { - indirects += strings.Count(ve.Type().String(), "*") - } - f.fs.Write(openAngleBytes) - f.fs.Write([]byte(strings.Repeat("*", indirects))) - f.fs.Write(closeAngleBytes) - } - - // Display pointer information depending on flags. - if f.fs.Flag('+') && (len(pointerChain) > 0) { - f.fs.Write(openParenBytes) - for i, addr := range pointerChain { - if i > 0 { - f.fs.Write(pointerChainBytes) - } - printHexPtr(f.fs, addr) - } - f.fs.Write(closeParenBytes) - } - - // Display dereferenced value. - switch { - case nilFound: - f.fs.Write(nilAngleBytes) - - case cycleFound: - f.fs.Write(circularShortBytes) - - default: - f.ignoreNextType = true - f.format(ve) - } -} - -// format is the main workhorse for providing the Formatter interface. It -// uses the passed reflect value to figure out what kind of object we are -// dealing with and formats it appropriately. It is a recursive function, -// however circular data structures are detected and handled properly. -func (f *formatState) format(v reflect.Value) { - // Handle invalid reflect values immediately. - kind := v.Kind() - if kind == reflect.Invalid { - f.fs.Write(invalidAngleBytes) - return - } - - // Handle pointers specially. - if kind == reflect.Ptr { - f.formatPtr(v) - return - } - - // Print type information unless already handled elsewhere. - if !f.ignoreNextType && f.fs.Flag('#') { - f.fs.Write(openParenBytes) - f.fs.Write([]byte(v.Type().String())) - f.fs.Write(closeParenBytes) - } - f.ignoreNextType = false - - // Call Stringer/error interfaces if they exist and the handle methods - // flag is enabled. - if !f.cs.DisableMethods { - if (kind != reflect.Invalid) && (kind != reflect.Interface) { - if handled := handleMethods(f.cs, f.fs, v); handled { - return - } - } - } - - switch kind { - case reflect.Invalid: - // Do nothing. We should never get here since invalid has already - // been handled above. - - case reflect.Bool: - printBool(f.fs, v.Bool()) - - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - printInt(f.fs, v.Int(), 10) - - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - printUint(f.fs, v.Uint(), 10) - - case reflect.Float32: - printFloat(f.fs, v.Float(), 32) - - case reflect.Float64: - printFloat(f.fs, v.Float(), 64) - - case reflect.Complex64: - printComplex(f.fs, v.Complex(), 32) - - case reflect.Complex128: - printComplex(f.fs, v.Complex(), 64) - - case reflect.Slice: - if v.IsNil() { - f.fs.Write(nilAngleBytes) - break - } - fallthrough - - case reflect.Array: - f.fs.Write(openBracketBytes) - f.depth++ - if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { - f.fs.Write(maxShortBytes) - } else { - numEntries := v.Len() - for i := 0; i < numEntries; i++ { - if i > 0 { - f.fs.Write(spaceBytes) - } - f.ignoreNextType = true - f.format(f.unpackValue(v.Index(i))) - } - } - f.depth-- - f.fs.Write(closeBracketBytes) - - case reflect.String: - f.fs.Write([]byte(v.String())) - - case reflect.Interface: - // The only time we should get here is for nil interfaces due to - // unpackValue calls. - if v.IsNil() { - f.fs.Write(nilAngleBytes) - } - - case reflect.Ptr: - // Do nothing. We should never get here since pointers have already - // been handled above. - - case reflect.Map: - // nil maps should be indicated as different than empty maps - if v.IsNil() { - f.fs.Write(nilAngleBytes) - break - } - - f.fs.Write(openMapBytes) - f.depth++ - if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { - f.fs.Write(maxShortBytes) - } else { - keys := v.MapKeys() - if f.cs.SortKeys { - sortValues(keys, f.cs) - } - for i, key := range keys { - if i > 0 { - f.fs.Write(spaceBytes) - } - f.ignoreNextType = true - f.format(f.unpackValue(key)) - f.fs.Write(colonBytes) - f.ignoreNextType = true - f.format(f.unpackValue(v.MapIndex(key))) - } - } - f.depth-- - f.fs.Write(closeMapBytes) - - case reflect.Struct: - numFields := v.NumField() - f.fs.Write(openBraceBytes) - f.depth++ - if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { - f.fs.Write(maxShortBytes) - } else { - vt := v.Type() - for i := 0; i < numFields; i++ { - if i > 0 { - f.fs.Write(spaceBytes) - } - vtf := vt.Field(i) - if f.fs.Flag('+') || f.fs.Flag('#') { - f.fs.Write([]byte(vtf.Name)) - f.fs.Write(colonBytes) - } - f.format(f.unpackValue(v.Field(i))) - } - } - f.depth-- - f.fs.Write(closeBraceBytes) - - case reflect.Uintptr: - printHexPtr(f.fs, uintptr(v.Uint())) - - case reflect.UnsafePointer, reflect.Chan, reflect.Func: - printHexPtr(f.fs, v.Pointer()) - - // There were not any other types at the time this code was written, but - // fall back to letting the default fmt package handle it if any get added. - default: - format := f.buildDefaultFormat() - if v.CanInterface() { - fmt.Fprintf(f.fs, format, v.Interface()) - } else { - fmt.Fprintf(f.fs, format, v.String()) - } - } -} - -// Format satisfies the fmt.Formatter interface. See NewFormatter for usage -// details. -func (f *formatState) Format(fs fmt.State, verb rune) { - f.fs = fs - - // Use standard formatting for verbs that are not v. - if verb != 'v' { - format := f.constructOrigFormat(verb) - fmt.Fprintf(fs, format, f.value) - return - } - - if f.value == nil { - if fs.Flag('#') { - fs.Write(interfaceBytes) - } - fs.Write(nilAngleBytes) - return - } - - f.format(reflect.ValueOf(f.value)) -} - -// newFormatter is a helper function to consolidate the logic from the various -// public methods which take varying config states. -func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter { - fs := &formatState{value: v, cs: cs} - fs.pointers = make(map[uintptr]int) - return fs -} - -/* -NewFormatter returns a custom formatter that satisfies the fmt.Formatter -interface. As a result, it integrates cleanly with standard fmt package -printing functions. The formatter is useful for inline printing of smaller data -types similar to the standard %v format specifier. - -The custom formatter only responds to the %v (most compact), %+v (adds pointer -addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb -combinations. Any other verbs such as %x and %q will be sent to the the -standard fmt package for formatting. In addition, the custom formatter ignores -the width and precision arguments (however they will still work on the format -specifiers not handled by the custom formatter). - -Typically this function shouldn't be called directly. It is much easier to make -use of the custom formatter by calling one of the convenience functions such as -Printf, Println, or Fprintf. -*/ -func NewFormatter(v interface{}) fmt.Formatter { - return newFormatter(&Config, v) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go deleted file mode 100644 index 32c0e338..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/spew.go +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "fmt" - "io" -) - -// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the formatted string as a value that satisfies error. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Errorf(format string, a ...interface{}) (err error) { - return fmt.Errorf(format, convertArgs(a)...) -} - -// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b)) -func Fprint(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprint(w, convertArgs(a)...) -} - -// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - return fmt.Fprintf(w, format, convertArgs(a)...) -} - -// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it -// passed with a default Formatter interface returned by NewFormatter. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b)) -func Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprintln(w, convertArgs(a)...) -} - -// Print is a wrapper for fmt.Print that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b)) -func Print(a ...interface{}) (n int, err error) { - return fmt.Print(convertArgs(a)...) -} - -// Printf is a wrapper for fmt.Printf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Printf(format string, a ...interface{}) (n int, err error) { - return fmt.Printf(format, convertArgs(a)...) -} - -// Println is a wrapper for fmt.Println that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b)) -func Println(a ...interface{}) (n int, err error) { - return fmt.Println(convertArgs(a)...) -} - -// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b)) -func Sprint(a ...interface{}) string { - return fmt.Sprint(convertArgs(a)...) -} - -// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, convertArgs(a)...) -} - -// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it -// were passed with a default Formatter interface returned by NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b)) -func Sprintln(a ...interface{}) string { - return fmt.Sprintln(convertArgs(a)...) -} - -// convertArgs accepts a slice of arguments and returns a slice of the same -// length with each argument converted to a default spew Formatter interface. -func convertArgs(args []interface{}) (formatters []interface{}) { - formatters = make([]interface{}, len(args)) - for index, arg := range args { - formatters[index] = NewFormatter(arg) - } - return formatters -} diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS deleted file mode 100644 index 15167cd7..00000000 --- a/vendor/github.com/golang/protobuf/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS deleted file mode 100644 index 1c4577e9..00000000 --- a/vendor/github.com/golang/protobuf/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 0f646931..00000000 --- a/vendor/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2010 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/golang/protobuf/proto/buffer.go b/vendor/github.com/golang/protobuf/proto/buffer.go deleted file mode 100644 index e810e6fe..00000000 --- a/vendor/github.com/golang/protobuf/proto/buffer.go +++ /dev/null @@ -1,324 +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 proto - -import ( - "errors" - "fmt" - - "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - WireVarint = 0 - WireFixed32 = 5 - WireFixed64 = 1 - WireBytes = 2 - WireStartGroup = 3 - WireEndGroup = 4 -) - -// EncodeVarint returns the varint encoded bytes of v. -func EncodeVarint(v uint64) []byte { - return protowire.AppendVarint(nil, v) -} - -// SizeVarint returns the length of the varint encoded bytes of v. -// This is equal to len(EncodeVarint(v)). -func SizeVarint(v uint64) int { - return protowire.SizeVarint(v) -} - -// DecodeVarint parses a varint encoded integer from b, -// returning the integer value and the length of the varint. -// It returns (0, 0) if there is a parse error. -func DecodeVarint(b []byte) (uint64, int) { - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, 0 - } - return v, n -} - -// Buffer is a buffer for encoding and decoding the protobuf wire format. -// It may be reused between invocations to reduce memory usage. -type Buffer struct { - buf []byte - idx int - deterministic bool -} - -// NewBuffer allocates a new Buffer initialized with buf, -// where the contents of buf are considered the unread portion of the buffer. -func NewBuffer(buf []byte) *Buffer { - return &Buffer{buf: buf} -} - -// SetDeterministic specifies whether to use deterministic serialization. -// -// Deterministic serialization guarantees that for a given binary, equal -// messages will always be serialized to the same bytes. This implies: -// -// - Repeated serialization of a message will return the same bytes. -// - Different processes of the same binary (which may be executing on -// different machines) will serialize equal messages to the same bytes. -// -// Note that the deterministic serialization is NOT canonical across -// languages. It is not guaranteed to remain stable over time. It is unstable -// across different builds with schema changes due to unknown fields. -// Users who need canonical serialization (e.g., persistent storage in a -// canonical form, fingerprinting, etc.) should define their own -// canonicalization specification and implement their own serializer rather -// than relying on this API. -// -// If deterministic serialization is requested, map entries will be sorted -// by keys in lexographical order. This is an implementation detail and -// subject to change. -func (b *Buffer) SetDeterministic(deterministic bool) { - b.deterministic = deterministic -} - -// SetBuf sets buf as the internal buffer, -// where the contents of buf are considered the unread portion of the buffer. -func (b *Buffer) SetBuf(buf []byte) { - b.buf = buf - b.idx = 0 -} - -// Reset clears the internal buffer of all written and unread data. -func (b *Buffer) Reset() { - b.buf = b.buf[:0] - b.idx = 0 -} - -// Bytes returns the internal buffer. -func (b *Buffer) Bytes() []byte { - return b.buf -} - -// Unread returns the unread portion of the buffer. -func (b *Buffer) Unread() []byte { - return b.buf[b.idx:] -} - -// Marshal appends the wire-format encoding of m to the buffer. -func (b *Buffer) Marshal(m Message) error { - var err error - b.buf, err = marshalAppend(b.buf, m, b.deterministic) - return err -} - -// Unmarshal parses the wire-format message in the buffer and -// places the decoded results in m. -// It does not reset m before unmarshaling. -func (b *Buffer) Unmarshal(m Message) error { - err := UnmarshalMerge(b.Unread(), m) - b.idx = len(b.buf) - return err -} - -type unknownFields struct{ XXX_unrecognized protoimpl.UnknownFields } - -func (m *unknownFields) String() string { panic("not implemented") } -func (m *unknownFields) Reset() { panic("not implemented") } -func (m *unknownFields) ProtoMessage() { panic("not implemented") } - -// DebugPrint dumps the encoded bytes of b with a header and footer including s -// to stdout. This is only intended for debugging. -func (*Buffer) DebugPrint(s string, b []byte) { - m := MessageReflect(new(unknownFields)) - m.SetUnknown(b) - b, _ = prototext.MarshalOptions{AllowPartial: true, Indent: "\t"}.Marshal(m.Interface()) - fmt.Printf("==== %s ====\n%s==== %s ====\n", s, b, s) -} - -// EncodeVarint appends an unsigned varint encoding to the buffer. -func (b *Buffer) EncodeVarint(v uint64) error { - b.buf = protowire.AppendVarint(b.buf, v) - return nil -} - -// EncodeZigzag32 appends a 32-bit zig-zag varint encoding to the buffer. -func (b *Buffer) EncodeZigzag32(v uint64) error { - return b.EncodeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) -} - -// EncodeZigzag64 appends a 64-bit zig-zag varint encoding to the buffer. -func (b *Buffer) EncodeZigzag64(v uint64) error { - return b.EncodeVarint(uint64((uint64(v) << 1) ^ uint64((int64(v) >> 63)))) -} - -// EncodeFixed32 appends a 32-bit little-endian integer to the buffer. -func (b *Buffer) EncodeFixed32(v uint64) error { - b.buf = protowire.AppendFixed32(b.buf, uint32(v)) - return nil -} - -// EncodeFixed64 appends a 64-bit little-endian integer to the buffer. -func (b *Buffer) EncodeFixed64(v uint64) error { - b.buf = protowire.AppendFixed64(b.buf, uint64(v)) - return nil -} - -// EncodeRawBytes appends a length-prefixed raw bytes to the buffer. -func (b *Buffer) EncodeRawBytes(v []byte) error { - b.buf = protowire.AppendBytes(b.buf, v) - return nil -} - -// EncodeStringBytes appends a length-prefixed raw bytes to the buffer. -// It does not validate whether v contains valid UTF-8. -func (b *Buffer) EncodeStringBytes(v string) error { - b.buf = protowire.AppendString(b.buf, v) - return nil -} - -// EncodeMessage appends a length-prefixed encoded message to the buffer. -func (b *Buffer) EncodeMessage(m Message) error { - var err error - b.buf = protowire.AppendVarint(b.buf, uint64(Size(m))) - b.buf, err = marshalAppend(b.buf, m, b.deterministic) - return err -} - -// DecodeVarint consumes an encoded unsigned varint from the buffer. -func (b *Buffer) DecodeVarint() (uint64, error) { - v, n := protowire.ConsumeVarint(b.buf[b.idx:]) - if n < 0 { - return 0, protowire.ParseError(n) - } - b.idx += n - return uint64(v), nil -} - -// DecodeZigzag32 consumes an encoded 32-bit zig-zag varint from the buffer. -func (b *Buffer) DecodeZigzag32() (uint64, error) { - v, err := b.DecodeVarint() - if err != nil { - return 0, err - } - return uint64((uint32(v) >> 1) ^ uint32((int32(v&1)<<31)>>31)), nil -} - -// DecodeZigzag64 consumes an encoded 64-bit zig-zag varint from the buffer. -func (b *Buffer) DecodeZigzag64() (uint64, error) { - v, err := b.DecodeVarint() - if err != nil { - return 0, err - } - return uint64((uint64(v) >> 1) ^ uint64((int64(v&1)<<63)>>63)), nil -} - -// DecodeFixed32 consumes a 32-bit little-endian integer from the buffer. -func (b *Buffer) DecodeFixed32() (uint64, error) { - v, n := protowire.ConsumeFixed32(b.buf[b.idx:]) - if n < 0 { - return 0, protowire.ParseError(n) - } - b.idx += n - return uint64(v), nil -} - -// DecodeFixed64 consumes a 64-bit little-endian integer from the buffer. -func (b *Buffer) DecodeFixed64() (uint64, error) { - v, n := protowire.ConsumeFixed64(b.buf[b.idx:]) - if n < 0 { - return 0, protowire.ParseError(n) - } - b.idx += n - return uint64(v), nil -} - -// DecodeRawBytes consumes a length-prefixed raw bytes from the buffer. -// If alloc is specified, it returns a copy the raw bytes -// rather than a sub-slice of the buffer. -func (b *Buffer) DecodeRawBytes(alloc bool) ([]byte, error) { - v, n := protowire.ConsumeBytes(b.buf[b.idx:]) - if n < 0 { - return nil, protowire.ParseError(n) - } - b.idx += n - if alloc { - v = append([]byte(nil), v...) - } - return v, nil -} - -// DecodeStringBytes consumes a length-prefixed raw bytes from the buffer. -// It does not validate whether the raw bytes contain valid UTF-8. -func (b *Buffer) DecodeStringBytes() (string, error) { - v, n := protowire.ConsumeString(b.buf[b.idx:]) - if n < 0 { - return "", protowire.ParseError(n) - } - b.idx += n - return v, nil -} - -// DecodeMessage consumes a length-prefixed message from the buffer. -// It does not reset m before unmarshaling. -func (b *Buffer) DecodeMessage(m Message) error { - v, err := b.DecodeRawBytes(false) - if err != nil { - return err - } - return UnmarshalMerge(v, m) -} - -// DecodeGroup consumes a message group from the buffer. -// It assumes that the start group marker has already been consumed and -// consumes all bytes until (and including the end group marker). -// It does not reset m before unmarshaling. -func (b *Buffer) DecodeGroup(m Message) error { - v, n, err := consumeGroup(b.buf[b.idx:]) - if err != nil { - return err - } - b.idx += n - return UnmarshalMerge(v, m) -} - -// consumeGroup parses b until it finds an end group marker, returning -// the raw bytes of the message (excluding the end group marker) and the -// the total length of the message (including the end group marker). -func consumeGroup(b []byte) ([]byte, int, error) { - b0 := b - depth := 1 // assume this follows a start group marker - for { - _, wtyp, tagLen := protowire.ConsumeTag(b) - if tagLen < 0 { - return nil, 0, protowire.ParseError(tagLen) - } - b = b[tagLen:] - - var valLen int - switch wtyp { - case protowire.VarintType: - _, valLen = protowire.ConsumeVarint(b) - case protowire.Fixed32Type: - _, valLen = protowire.ConsumeFixed32(b) - case protowire.Fixed64Type: - _, valLen = protowire.ConsumeFixed64(b) - case protowire.BytesType: - _, valLen = protowire.ConsumeBytes(b) - case protowire.StartGroupType: - depth++ - case protowire.EndGroupType: - depth-- - default: - return nil, 0, errors.New("proto: cannot parse reserved wire type") - } - if valLen < 0 { - return nil, 0, protowire.ParseError(valLen) - } - b = b[valLen:] - - if depth == 0 { - return b0[:len(b0)-len(b)-tagLen], len(b0) - len(b), nil - } - } -} diff --git a/vendor/github.com/golang/protobuf/proto/defaults.go b/vendor/github.com/golang/protobuf/proto/defaults.go deleted file mode 100644 index d399bf06..00000000 --- a/vendor/github.com/golang/protobuf/proto/defaults.go +++ /dev/null @@ -1,63 +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 proto - -import ( - "google.golang.org/protobuf/reflect/protoreflect" -) - -// SetDefaults sets unpopulated scalar fields to their default values. -// Fields within a oneof are not set even if they have a default value. -// SetDefaults is recursively called upon any populated message fields. -func SetDefaults(m Message) { - if m != nil { - setDefaults(MessageReflect(m)) - } -} - -func setDefaults(m protoreflect.Message) { - fds := m.Descriptor().Fields() - for i := 0; i < fds.Len(); i++ { - fd := fds.Get(i) - if !m.Has(fd) { - if fd.HasDefault() && fd.ContainingOneof() == nil { - v := fd.Default() - if fd.Kind() == protoreflect.BytesKind { - v = protoreflect.ValueOf(append([]byte(nil), v.Bytes()...)) // copy the default bytes - } - m.Set(fd, v) - } - continue - } - } - - m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - switch { - // Handle singular message. - case fd.Cardinality() != protoreflect.Repeated: - if fd.Message() != nil { - setDefaults(m.Get(fd).Message()) - } - // Handle list of messages. - case fd.IsList(): - if fd.Message() != nil { - ls := m.Get(fd).List() - for i := 0; i < ls.Len(); i++ { - setDefaults(ls.Get(i).Message()) - } - } - // Handle map of messages. - case fd.IsMap(): - if fd.MapValue().Message() != nil { - ms := m.Get(fd).Map() - ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool { - setDefaults(v.Message()) - return true - }) - } - } - return true - }) -} diff --git a/vendor/github.com/golang/protobuf/proto/deprecated.go b/vendor/github.com/golang/protobuf/proto/deprecated.go deleted file mode 100644 index e8db57e0..00000000 --- a/vendor/github.com/golang/protobuf/proto/deprecated.go +++ /dev/null @@ -1,113 +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. - -package proto - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" - - protoV2 "google.golang.org/protobuf/proto" -) - -var ( - // Deprecated: No longer returned. - ErrNil = errors.New("proto: Marshal called with nil") - - // Deprecated: No longer returned. - ErrTooLarge = errors.New("proto: message encodes to over 2 GB") - - // Deprecated: No longer returned. - ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") -) - -// Deprecated: Do not use. -type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 } - -// Deprecated: Do not use. -func GetStats() Stats { return Stats{} } - -// Deprecated: Do not use. -func MarshalMessageSet(interface{}) ([]byte, error) { - return nil, errors.New("proto: not implemented") -} - -// Deprecated: Do not use. -func UnmarshalMessageSet([]byte, interface{}) error { - return errors.New("proto: not implemented") -} - -// Deprecated: Do not use. -func MarshalMessageSetJSON(interface{}) ([]byte, error) { - return nil, errors.New("proto: not implemented") -} - -// Deprecated: Do not use. -func UnmarshalMessageSetJSON([]byte, interface{}) error { - return errors.New("proto: not implemented") -} - -// Deprecated: Do not use. -func RegisterMessageSetType(Message, int32, string) {} - -// Deprecated: Do not use. -func EnumName(m map[int32]string, v int32) string { - s, ok := m[v] - if ok { - return s - } - return strconv.Itoa(int(v)) -} - -// Deprecated: Do not use. -func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { - if data[0] == '"' { - // New style: enums are strings. - var repr string - if err := json.Unmarshal(data, &repr); err != nil { - return -1, err - } - val, ok := m[repr] - if !ok { - return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) - } - return val, nil - } - // Old style: enums are ints. - var val int32 - if err := json.Unmarshal(data, &val); err != nil { - return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) - } - return val, nil -} - -// Deprecated: Do not use; this type existed for intenal-use only. -type InternalMessageInfo struct{} - -// Deprecated: Do not use; this method existed for intenal-use only. -func (*InternalMessageInfo) DiscardUnknown(m Message) { - DiscardUnknown(m) -} - -// Deprecated: Do not use; this method existed for intenal-use only. -func (*InternalMessageInfo) Marshal(b []byte, m Message, deterministic bool) ([]byte, error) { - return protoV2.MarshalOptions{Deterministic: deterministic}.MarshalAppend(b, MessageV2(m)) -} - -// Deprecated: Do not use; this method existed for intenal-use only. -func (*InternalMessageInfo) Merge(dst, src Message) { - protoV2.Merge(MessageV2(dst), MessageV2(src)) -} - -// Deprecated: Do not use; this method existed for intenal-use only. -func (*InternalMessageInfo) Size(m Message) int { - return protoV2.Size(MessageV2(m)) -} - -// Deprecated: Do not use; this method existed for intenal-use only. -func (*InternalMessageInfo) Unmarshal(m Message, b []byte) error { - return protoV2.UnmarshalOptions{Merge: true}.Unmarshal(b, MessageV2(m)) -} diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go deleted file mode 100644 index 2187e877..00000000 --- a/vendor/github.com/golang/protobuf/proto/discard.go +++ /dev/null @@ -1,58 +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 proto - -import ( - "google.golang.org/protobuf/reflect/protoreflect" -) - -// DiscardUnknown recursively discards all unknown fields from this message -// and all embedded messages. -// -// When unmarshaling a message with unrecognized fields, the tags and values -// of such fields are preserved in the Message. This allows a later call to -// marshal to be able to produce a message that continues to have those -// unrecognized fields. To avoid this, DiscardUnknown is used to -// explicitly clear the unknown fields after unmarshaling. -func DiscardUnknown(m Message) { - if m != nil { - discardUnknown(MessageReflect(m)) - } -} - -func discardUnknown(m protoreflect.Message) { - m.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool { - switch { - // Handle singular message. - case fd.Cardinality() != protoreflect.Repeated: - if fd.Message() != nil { - discardUnknown(m.Get(fd).Message()) - } - // Handle list of messages. - case fd.IsList(): - if fd.Message() != nil { - ls := m.Get(fd).List() - for i := 0; i < ls.Len(); i++ { - discardUnknown(ls.Get(i).Message()) - } - } - // Handle map of messages. - case fd.IsMap(): - if fd.MapValue().Message() != nil { - ms := m.Get(fd).Map() - ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool { - discardUnknown(v.Message()) - return true - }) - } - } - return true - }) - - // Discard unknown fields. - if len(m.GetUnknown()) > 0 { - m.SetUnknown(nil) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go deleted file mode 100644 index 42fc120c..00000000 --- a/vendor/github.com/golang/protobuf/proto/extensions.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2010 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 proto - -import ( - "errors" - "fmt" - "reflect" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoiface" - "google.golang.org/protobuf/runtime/protoimpl" -) - -type ( - // ExtensionDesc represents an extension descriptor and - // is used to interact with an extension field in a message. - // - // Variables of this type are generated in code by protoc-gen-go. - ExtensionDesc = protoimpl.ExtensionInfo - - // ExtensionRange represents a range of message extensions. - // Used in code generated by protoc-gen-go. - ExtensionRange = protoiface.ExtensionRangeV1 - - // Deprecated: Do not use; this is an internal type. - Extension = protoimpl.ExtensionFieldV1 - - // Deprecated: Do not use; this is an internal type. - XXX_InternalExtensions = protoimpl.ExtensionFields -) - -// ErrMissingExtension reports whether the extension was not present. -var ErrMissingExtension = errors.New("proto: missing extension") - -var errNotExtendable = errors.New("proto: not an extendable proto.Message") - -// HasExtension reports whether the extension field is present in m -// either as an explicitly populated field or as an unknown field. -func HasExtension(m Message, xt *ExtensionDesc) (has bool) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() { - return false - } - - // Check whether any populated known field matches the field number. - xtd := xt.TypeDescriptor() - if isValidExtension(mr.Descriptor(), xtd) { - has = mr.Has(xtd) - } else { - mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { - has = int32(fd.Number()) == xt.Field - return !has - }) - } - - // Check whether any unknown field matches the field number. - for b := mr.GetUnknown(); !has && len(b) > 0; { - num, _, n := protowire.ConsumeField(b) - has = int32(num) == xt.Field - b = b[n:] - } - return has -} - -// ClearExtension removes the extension field from m -// either as an explicitly populated field or as an unknown field. -func ClearExtension(m Message, xt *ExtensionDesc) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() { - return - } - - xtd := xt.TypeDescriptor() - if isValidExtension(mr.Descriptor(), xtd) { - mr.Clear(xtd) - } else { - mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { - if int32(fd.Number()) == xt.Field { - mr.Clear(fd) - return false - } - return true - }) - } - clearUnknown(mr, fieldNum(xt.Field)) -} - -// ClearAllExtensions clears all extensions from m. -// This includes populated fields and unknown fields in the extension range. -func ClearAllExtensions(m Message) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() { - return - } - - mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { - if fd.IsExtension() { - mr.Clear(fd) - } - return true - }) - clearUnknown(mr, mr.Descriptor().ExtensionRanges()) -} - -// GetExtension retrieves a proto2 extended field from m. -// -// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), -// then GetExtension parses the encoded field and returns a Go value of the specified type. -// If the field is not present, then the default value is returned (if one is specified), -// otherwise ErrMissingExtension is reported. -// -// If the descriptor is type incomplete (i.e., ExtensionDesc.ExtensionType is nil), -// then GetExtension returns the raw encoded bytes for the extension field. -func GetExtension(m Message, xt *ExtensionDesc) (interface{}, error) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 { - return nil, errNotExtendable - } - - // Retrieve the unknown fields for this extension field. - var bo protoreflect.RawFields - for bi := mr.GetUnknown(); len(bi) > 0; { - num, _, n := protowire.ConsumeField(bi) - if int32(num) == xt.Field { - bo = append(bo, bi[:n]...) - } - bi = bi[n:] - } - - // For type incomplete descriptors, only retrieve the unknown fields. - if xt.ExtensionType == nil { - return []byte(bo), nil - } - - // If the extension field only exists as unknown fields, unmarshal it. - // This is rarely done since proto.Unmarshal eagerly unmarshals extensions. - xtd := xt.TypeDescriptor() - if !isValidExtension(mr.Descriptor(), xtd) { - return nil, fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m) - } - if !mr.Has(xtd) && len(bo) > 0 { - m2 := mr.New() - if err := (proto.UnmarshalOptions{ - Resolver: extensionResolver{xt}, - }.Unmarshal(bo, m2.Interface())); err != nil { - return nil, err - } - if m2.Has(xtd) { - mr.Set(xtd, m2.Get(xtd)) - clearUnknown(mr, fieldNum(xt.Field)) - } - } - - // Check whether the message has the extension field set or a default. - var pv protoreflect.Value - switch { - case mr.Has(xtd): - pv = mr.Get(xtd) - case xtd.HasDefault(): - pv = xtd.Default() - default: - return nil, ErrMissingExtension - } - - v := xt.InterfaceOf(pv) - rv := reflect.ValueOf(v) - if isScalarKind(rv.Kind()) { - rv2 := reflect.New(rv.Type()) - rv2.Elem().Set(rv) - v = rv2.Interface() - } - return v, nil -} - -// extensionResolver is a custom extension resolver that stores a single -// extension type that takes precedence over the global registry. -type extensionResolver struct{ xt protoreflect.ExtensionType } - -func (r extensionResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) { - if xtd := r.xt.TypeDescriptor(); xtd.FullName() == field { - return r.xt, nil - } - return protoregistry.GlobalTypes.FindExtensionByName(field) -} - -func (r extensionResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) { - if xtd := r.xt.TypeDescriptor(); xtd.ContainingMessage().FullName() == message && xtd.Number() == field { - return r.xt, nil - } - return protoregistry.GlobalTypes.FindExtensionByNumber(message, field) -} - -// GetExtensions returns a list of the extensions values present in m, -// corresponding with the provided list of extension descriptors, xts. -// If an extension is missing in m, the corresponding value is nil. -func GetExtensions(m Message, xts []*ExtensionDesc) ([]interface{}, error) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() { - return nil, errNotExtendable - } - - vs := make([]interface{}, len(xts)) - for i, xt := range xts { - v, err := GetExtension(m, xt) - if err != nil { - if err == ErrMissingExtension { - continue - } - return vs, err - } - vs[i] = v - } - return vs, nil -} - -// SetExtension sets an extension field in m to the provided value. -func SetExtension(m Message, xt *ExtensionDesc, v interface{}) error { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 { - return errNotExtendable - } - - rv := reflect.ValueOf(v) - if reflect.TypeOf(v) != reflect.TypeOf(xt.ExtensionType) { - return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", v, xt.ExtensionType) - } - if rv.Kind() == reflect.Ptr { - if rv.IsNil() { - return fmt.Errorf("proto: SetExtension called with nil value of type %T", v) - } - if isScalarKind(rv.Elem().Kind()) { - v = rv.Elem().Interface() - } - } - - xtd := xt.TypeDescriptor() - if !isValidExtension(mr.Descriptor(), xtd) { - return fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m) - } - mr.Set(xtd, xt.ValueOf(v)) - clearUnknown(mr, fieldNum(xt.Field)) - return nil -} - -// SetRawExtension inserts b into the unknown fields of m. -// -// Deprecated: Use Message.ProtoReflect.SetUnknown instead. -func SetRawExtension(m Message, fnum int32, b []byte) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() { - return - } - - // Verify that the raw field is valid. - for b0 := b; len(b0) > 0; { - num, _, n := protowire.ConsumeField(b0) - if int32(num) != fnum { - panic(fmt.Sprintf("mismatching field number: got %d, want %d", num, fnum)) - } - b0 = b0[n:] - } - - ClearExtension(m, &ExtensionDesc{Field: fnum}) - mr.SetUnknown(append(mr.GetUnknown(), b...)) -} - -// ExtensionDescs returns a list of extension descriptors found in m, -// containing descriptors for both populated extension fields in m and -// also unknown fields of m that are in the extension range. -// For the later case, an type incomplete descriptor is provided where only -// the ExtensionDesc.Field field is populated. -// The order of the extension descriptors is undefined. -func ExtensionDescs(m Message) ([]*ExtensionDesc, error) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 { - return nil, errNotExtendable - } - - // Collect a set of known extension descriptors. - extDescs := make(map[protoreflect.FieldNumber]*ExtensionDesc) - mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - if fd.IsExtension() { - xt := fd.(protoreflect.ExtensionTypeDescriptor) - if xd, ok := xt.Type().(*ExtensionDesc); ok { - extDescs[fd.Number()] = xd - } - } - return true - }) - - // Collect a set of unknown extension descriptors. - extRanges := mr.Descriptor().ExtensionRanges() - for b := mr.GetUnknown(); len(b) > 0; { - num, _, n := protowire.ConsumeField(b) - if extRanges.Has(num) && extDescs[num] == nil { - extDescs[num] = nil - } - b = b[n:] - } - - // Transpose the set of descriptors into a list. - var xts []*ExtensionDesc - for num, xt := range extDescs { - if xt == nil { - xt = &ExtensionDesc{Field: int32(num)} - } - xts = append(xts, xt) - } - return xts, nil -} - -// isValidExtension reports whether xtd is a valid extension descriptor for md. -func isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool { - return xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number()) -} - -// isScalarKind reports whether k is a protobuf scalar kind (except bytes). -// This function exists for historical reasons since the representation of -// scalars differs between v1 and v2, where v1 uses *T and v2 uses T. -func isScalarKind(k reflect.Kind) bool { - switch k { - case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: - return true - default: - return false - } -} - -// clearUnknown removes unknown fields from m where remover.Has reports true. -func clearUnknown(m protoreflect.Message, remover interface { - Has(protoreflect.FieldNumber) bool -}) { - var bo protoreflect.RawFields - for bi := m.GetUnknown(); len(bi) > 0; { - num, _, n := protowire.ConsumeField(bi) - if !remover.Has(num) { - bo = append(bo, bi[:n]...) - } - bi = bi[n:] - } - if bi := m.GetUnknown(); len(bi) != len(bo) { - m.SetUnknown(bo) - } -} - -type fieldNum protoreflect.FieldNumber - -func (n1 fieldNum) Has(n2 protoreflect.FieldNumber) bool { - return protoreflect.FieldNumber(n1) == n2 -} diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go deleted file mode 100644 index dcdc2202..00000000 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright 2010 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 proto - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "sync" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoimpl" -) - -// StructProperties represents protocol buffer type information for a -// generated protobuf message in the open-struct API. -// -// Deprecated: Do not use. -type StructProperties struct { - // Prop are the properties for each field. - // - // Fields belonging to a oneof are stored in OneofTypes instead, with a - // single Properties representing the parent oneof held here. - // - // The order of Prop matches the order of fields in the Go struct. - // Struct fields that are not related to protobufs have a "XXX_" prefix - // in the Properties.Name and must be ignored by the user. - Prop []*Properties - - // OneofTypes contains information about the oneof fields in this message. - // It is keyed by the protobuf field name. - OneofTypes map[string]*OneofProperties -} - -// Properties represents the type information for a protobuf message field. -// -// Deprecated: Do not use. -type Properties struct { - // Name is a placeholder name with little meaningful semantic value. - // If the name has an "XXX_" prefix, the entire Properties must be ignored. - Name string - // OrigName is the protobuf field name or oneof name. - OrigName string - // JSONName is the JSON name for the protobuf field. - JSONName string - // Enum is a placeholder name for enums. - // For historical reasons, this is neither the Go name for the enum, - // nor the protobuf name for the enum. - Enum string // Deprecated: Do not use. - // Weak contains the full name of the weakly referenced message. - Weak string - // Wire is a string representation of the wire type. - Wire string - // WireType is the protobuf wire type for the field. - WireType int - // Tag is the protobuf field number. - Tag int - // Required reports whether this is a required field. - Required bool - // Optional reports whether this is a optional field. - Optional bool - // Repeated reports whether this is a repeated field. - Repeated bool - // Packed reports whether this is a packed repeated field of scalars. - Packed bool - // Proto3 reports whether this field operates under the proto3 syntax. - Proto3 bool - // Oneof reports whether this field belongs within a oneof. - Oneof bool - - // Default is the default value in string form. - Default string - // HasDefault reports whether the field has a default value. - HasDefault bool - - // MapKeyProp is the properties for the key field for a map field. - MapKeyProp *Properties - // MapValProp is the properties for the value field for a map field. - MapValProp *Properties -} - -// OneofProperties represents the type information for a protobuf oneof. -// -// Deprecated: Do not use. -type OneofProperties struct { - // Type is a pointer to the generated wrapper type for the field value. - // This is nil for messages that are not in the open-struct API. - Type reflect.Type - // Field is the index into StructProperties.Prop for the containing oneof. - Field int - // Prop is the properties for the field. - Prop *Properties -} - -// String formats the properties in the protobuf struct field tag style. -func (p *Properties) String() string { - s := p.Wire - s += "," + strconv.Itoa(p.Tag) - if p.Required { - s += ",req" - } - if p.Optional { - s += ",opt" - } - if p.Repeated { - s += ",rep" - } - if p.Packed { - s += ",packed" - } - s += ",name=" + p.OrigName - if p.JSONName != "" { - s += ",json=" + p.JSONName - } - if len(p.Enum) > 0 { - s += ",enum=" + p.Enum - } - if len(p.Weak) > 0 { - s += ",weak=" + p.Weak - } - if p.Proto3 { - s += ",proto3" - } - if p.Oneof { - s += ",oneof" - } - if p.HasDefault { - s += ",def=" + p.Default - } - return s -} - -// Parse populates p by parsing a string in the protobuf struct field tag style. -func (p *Properties) Parse(tag string) { - // For example: "bytes,49,opt,name=foo,def=hello!" - for len(tag) > 0 { - i := strings.IndexByte(tag, ',') - if i < 0 { - i = len(tag) - } - switch s := tag[:i]; { - case strings.HasPrefix(s, "name="): - p.OrigName = s[len("name="):] - case strings.HasPrefix(s, "json="): - p.JSONName = s[len("json="):] - case strings.HasPrefix(s, "enum="): - p.Enum = s[len("enum="):] - case strings.HasPrefix(s, "weak="): - p.Weak = s[len("weak="):] - case strings.Trim(s, "0123456789") == "": - n, _ := strconv.ParseUint(s, 10, 32) - p.Tag = int(n) - case s == "opt": - p.Optional = true - case s == "req": - p.Required = true - case s == "rep": - p.Repeated = true - case s == "varint" || s == "zigzag32" || s == "zigzag64": - p.Wire = s - p.WireType = WireVarint - case s == "fixed32": - p.Wire = s - p.WireType = WireFixed32 - case s == "fixed64": - p.Wire = s - p.WireType = WireFixed64 - case s == "bytes": - p.Wire = s - p.WireType = WireBytes - case s == "group": - p.Wire = s - p.WireType = WireStartGroup - case s == "packed": - p.Packed = true - case s == "proto3": - p.Proto3 = true - case s == "oneof": - p.Oneof = true - case strings.HasPrefix(s, "def="): - // The default tag is special in that everything afterwards is the - // default regardless of the presence of commas. - p.HasDefault = true - p.Default, i = tag[len("def="):], len(tag) - } - tag = strings.TrimPrefix(tag[i:], ",") - } -} - -// Init populates the properties from a protocol buffer struct tag. -// -// Deprecated: Do not use. -func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { - p.Name = name - p.OrigName = name - if tag == "" { - return - } - p.Parse(tag) - - if typ != nil && typ.Kind() == reflect.Map { - p.MapKeyProp = new(Properties) - p.MapKeyProp.Init(nil, "Key", f.Tag.Get("protobuf_key"), nil) - p.MapValProp = new(Properties) - p.MapValProp.Init(nil, "Value", f.Tag.Get("protobuf_val"), nil) - } -} - -var propertiesCache sync.Map // map[reflect.Type]*StructProperties - -// GetProperties returns the list of properties for the type represented by t, -// which must be a generated protocol buffer message in the open-struct API, -// where protobuf message fields are represented by exported Go struct fields. -// -// Deprecated: Use protobuf reflection instead. -func GetProperties(t reflect.Type) *StructProperties { - if p, ok := propertiesCache.Load(t); ok { - return p.(*StructProperties) - } - p, _ := propertiesCache.LoadOrStore(t, newProperties(t)) - return p.(*StructProperties) -} - -func newProperties(t reflect.Type) *StructProperties { - if t.Kind() != reflect.Struct { - panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t)) - } - - var hasOneof bool - prop := new(StructProperties) - - // Construct a list of properties for each field in the struct. - for i := 0; i < t.NumField(); i++ { - p := new(Properties) - f := t.Field(i) - tagField := f.Tag.Get("protobuf") - p.Init(f.Type, f.Name, tagField, &f) - - tagOneof := f.Tag.Get("protobuf_oneof") - if tagOneof != "" { - hasOneof = true - p.OrigName = tagOneof - } - - // Rename unrelated struct fields with the "XXX_" prefix since so much - // user code simply checks for this to exclude special fields. - if tagField == "" && tagOneof == "" && !strings.HasPrefix(p.Name, "XXX_") { - p.Name = "XXX_" + p.Name - p.OrigName = "XXX_" + p.OrigName - } else if p.Weak != "" { - p.Name = p.OrigName // avoid possible "XXX_" prefix on weak field - } - - prop.Prop = append(prop.Prop, p) - } - - // Construct a mapping of oneof field names to properties. - if hasOneof { - var oneofWrappers []interface{} - if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok { - oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[3].Interface().([]interface{}) - } - if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok { - oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0].Interface().([]interface{}) - } - if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(protoreflect.ProtoMessage); ok { - if m, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *protoimpl.MessageInfo }); ok { - oneofWrappers = m.ProtoMessageInfo().OneofWrappers - } - } - - prop.OneofTypes = make(map[string]*OneofProperties) - for _, wrapper := range oneofWrappers { - p := &OneofProperties{ - Type: reflect.ValueOf(wrapper).Type(), // *T - Prop: new(Properties), - } - f := p.Type.Elem().Field(0) - p.Prop.Name = f.Name - p.Prop.Parse(f.Tag.Get("protobuf")) - - // Determine the struct field that contains this oneof. - // Each wrapper is assignable to exactly one parent field. - var foundOneof bool - for i := 0; i < t.NumField() && !foundOneof; i++ { - if p.Type.AssignableTo(t.Field(i).Type) { - p.Field = i - foundOneof = true - } - } - if !foundOneof { - panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t)) - } - prop.OneofTypes[p.Prop.OrigName] = p - } - } - - return prop -} - -func (sp *StructProperties) Len() int { return len(sp.Prop) } -func (sp *StructProperties) Less(i, j int) bool { return false } -func (sp *StructProperties) Swap(i, j int) { return } diff --git a/vendor/github.com/golang/protobuf/proto/proto.go b/vendor/github.com/golang/protobuf/proto/proto.go deleted file mode 100644 index 5aee89c3..00000000 --- a/vendor/github.com/golang/protobuf/proto/proto.go +++ /dev/null @@ -1,167 +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 proto provides functionality for handling protocol buffer messages. -// In particular, it provides marshaling and unmarshaling between a protobuf -// message and the binary wire format. -// -// See https://developers.google.com/protocol-buffers/docs/gotutorial for -// more information. -// -// Deprecated: Use the "google.golang.org/protobuf/proto" package instead. -package proto - -import ( - protoV2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" - "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - ProtoPackageIsVersion1 = true - ProtoPackageIsVersion2 = true - ProtoPackageIsVersion3 = true - ProtoPackageIsVersion4 = true -) - -// GeneratedEnum is any enum type generated by protoc-gen-go -// which is a named int32 kind. -// This type exists for documentation purposes. -type GeneratedEnum interface{} - -// GeneratedMessage is any message type generated by protoc-gen-go -// which is a pointer to a named struct kind. -// This type exists for documentation purposes. -type GeneratedMessage interface{} - -// Message is a protocol buffer message. -// -// This is the v1 version of the message interface and is marginally better -// than an empty interface as it lacks any method to programatically interact -// with the contents of the message. -// -// A v2 message is declared in "google.golang.org/protobuf/proto".Message and -// exposes protobuf reflection as a first-class feature of the interface. -// -// To convert a v1 message to a v2 message, use the MessageV2 function. -// To convert a v2 message to a v1 message, use the MessageV1 function. -type Message = protoiface.MessageV1 - -// MessageV1 converts either a v1 or v2 message to a v1 message. -// It returns nil if m is nil. -func MessageV1(m GeneratedMessage) protoiface.MessageV1 { - return protoimpl.X.ProtoMessageV1Of(m) -} - -// MessageV2 converts either a v1 or v2 message to a v2 message. -// It returns nil if m is nil. -func MessageV2(m GeneratedMessage) protoV2.Message { - return protoimpl.X.ProtoMessageV2Of(m) -} - -// MessageReflect returns a reflective view for a message. -// It returns nil if m is nil. -func MessageReflect(m Message) protoreflect.Message { - return protoimpl.X.MessageOf(m) -} - -// Marshaler is implemented by messages that can marshal themselves. -// This interface is used by the following functions: Size, Marshal, -// Buffer.Marshal, and Buffer.EncodeMessage. -// -// Deprecated: Do not implement. -type Marshaler interface { - // Marshal formats the encoded bytes of the message. - // It should be deterministic and emit valid protobuf wire data. - // The caller takes ownership of the returned buffer. - Marshal() ([]byte, error) -} - -// Unmarshaler is implemented by messages that can unmarshal themselves. -// This interface is used by the following functions: Unmarshal, UnmarshalMerge, -// Buffer.Unmarshal, Buffer.DecodeMessage, and Buffer.DecodeGroup. -// -// Deprecated: Do not implement. -type Unmarshaler interface { - // Unmarshal parses the encoded bytes of the protobuf wire input. - // The provided buffer is only valid for during method call. - // It should not reset the receiver message. - Unmarshal([]byte) error -} - -// Merger is implemented by messages that can merge themselves. -// This interface is used by the following functions: Clone and Merge. -// -// Deprecated: Do not implement. -type Merger interface { - // Merge merges the contents of src into the receiver message. - // It clones all data structures in src such that it aliases no mutable - // memory referenced by src. - Merge(src Message) -} - -// RequiredNotSetError is an error type returned when -// marshaling or unmarshaling a message with missing required fields. -type RequiredNotSetError struct { - err error -} - -func (e *RequiredNotSetError) Error() string { - if e.err != nil { - return e.err.Error() - } - return "proto: required field not set" -} -func (e *RequiredNotSetError) RequiredNotSet() bool { - return true -} - -func checkRequiredNotSet(m protoV2.Message) error { - if err := protoV2.CheckInitialized(m); err != nil { - return &RequiredNotSetError{err: err} - } - return nil -} - -// Clone returns a deep copy of src. -func Clone(src Message) Message { - return MessageV1(protoV2.Clone(MessageV2(src))) -} - -// Merge merges src into dst, which must be messages of the same type. -// -// Populated scalar fields in src are copied to dst, while populated -// singular messages in src are merged into dst by recursively calling Merge. -// The elements of every list field in src is appended to the corresponded -// list fields in dst. The entries of every map field in src is copied into -// the corresponding map field in dst, possibly replacing existing entries. -// The unknown fields of src are appended to the unknown fields of dst. -func Merge(dst, src Message) { - protoV2.Merge(MessageV2(dst), MessageV2(src)) -} - -// Equal reports whether two messages are equal. -// If two messages marshal to the same bytes under deterministic serialization, -// then Equal is guaranteed to report true. -// -// Two messages are equal if they are the same protobuf message type, -// have the same set of populated known and extension field values, -// and the same set of unknown fields values. -// -// Scalar values are compared with the equivalent of the == operator in Go, -// except bytes values which are compared using bytes.Equal and -// floating point values which specially treat NaNs as equal. -// Message values are compared by recursively calling Equal. -// Lists are equal if each element value is also equal. -// Maps are equal if they have the same set of keys, where the pair of values -// for each key is also equal. -func Equal(x, y Message) bool { - return protoV2.Equal(MessageV2(x), MessageV2(y)) -} - -func isMessageSet(md protoreflect.MessageDescriptor) bool { - ms, ok := md.(interface{ IsMessageSet() bool }) - return ok && ms.IsMessageSet() -} diff --git a/vendor/github.com/golang/protobuf/proto/registry.go b/vendor/github.com/golang/protobuf/proto/registry.go deleted file mode 100644 index 066b4323..00000000 --- a/vendor/github.com/golang/protobuf/proto/registry.go +++ /dev/null @@ -1,317 +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 proto - -import ( - "bytes" - "compress/gzip" - "fmt" - "io/ioutil" - "reflect" - "strings" - "sync" - - "google.golang.org/protobuf/reflect/protodesc" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoimpl" -) - -// filePath is the path to the proto source file. -type filePath = string // e.g., "google/protobuf/descriptor.proto" - -// fileDescGZIP is the compressed contents of the encoded FileDescriptorProto. -type fileDescGZIP = []byte - -var fileCache sync.Map // map[filePath]fileDescGZIP - -// RegisterFile is called from generated code to register the compressed -// FileDescriptorProto with the file path for a proto source file. -// -// Deprecated: Use protoregistry.GlobalFiles.RegisterFile instead. -func RegisterFile(s filePath, d fileDescGZIP) { - // Decompress the descriptor. - zr, err := gzip.NewReader(bytes.NewReader(d)) - if err != nil { - panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err)) - } - b, err := ioutil.ReadAll(zr) - if err != nil { - panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err)) - } - - // Construct a protoreflect.FileDescriptor from the raw descriptor. - // Note that DescBuilder.Build automatically registers the constructed - // file descriptor with the v2 registry. - protoimpl.DescBuilder{RawDescriptor: b}.Build() - - // Locally cache the raw descriptor form for the file. - fileCache.Store(s, d) -} - -// FileDescriptor returns the compressed FileDescriptorProto given the file path -// for a proto source file. It returns nil if not found. -// -// Deprecated: Use protoregistry.GlobalFiles.FindFileByPath instead. -func FileDescriptor(s filePath) fileDescGZIP { - if v, ok := fileCache.Load(s); ok { - return v.(fileDescGZIP) - } - - // Find the descriptor in the v2 registry. - var b []byte - if fd, _ := protoregistry.GlobalFiles.FindFileByPath(s); fd != nil { - b, _ = Marshal(protodesc.ToFileDescriptorProto(fd)) - } - - // Locally cache the raw descriptor form for the file. - if len(b) > 0 { - v, _ := fileCache.LoadOrStore(s, protoimpl.X.CompressGZIP(b)) - return v.(fileDescGZIP) - } - return nil -} - -// enumName is the name of an enum. For historical reasons, the enum name is -// neither the full Go name nor the full protobuf name of the enum. -// The name is the dot-separated combination of just the proto package that the -// enum is declared within followed by the Go type name of the generated enum. -type enumName = string // e.g., "my.proto.package.GoMessage_GoEnum" - -// enumsByName maps enum values by name to their numeric counterpart. -type enumsByName = map[string]int32 - -// enumsByNumber maps enum values by number to their name counterpart. -type enumsByNumber = map[int32]string - -var enumCache sync.Map // map[enumName]enumsByName -var numFilesCache sync.Map // map[protoreflect.FullName]int - -// RegisterEnum is called from the generated code to register the mapping of -// enum value names to enum numbers for the enum identified by s. -// -// Deprecated: Use protoregistry.GlobalTypes.RegisterEnum instead. -func RegisterEnum(s enumName, _ enumsByNumber, m enumsByName) { - if _, ok := enumCache.Load(s); ok { - panic("proto: duplicate enum registered: " + s) - } - enumCache.Store(s, m) - - // This does not forward registration to the v2 registry since this API - // lacks sufficient information to construct a complete v2 enum descriptor. -} - -// EnumValueMap returns the mapping from enum value names to enum numbers for -// the enum of the given name. It returns nil if not found. -// -// Deprecated: Use protoregistry.GlobalTypes.FindEnumByName instead. -func EnumValueMap(s enumName) enumsByName { - if v, ok := enumCache.Load(s); ok { - return v.(enumsByName) - } - - // Check whether the cache is stale. If the number of files in the current - // package differs, then it means that some enums may have been recently - // registered upstream that we do not know about. - var protoPkg protoreflect.FullName - if i := strings.LastIndexByte(s, '.'); i >= 0 { - protoPkg = protoreflect.FullName(s[:i]) - } - v, _ := numFilesCache.Load(protoPkg) - numFiles, _ := v.(int) - if protoregistry.GlobalFiles.NumFilesByPackage(protoPkg) == numFiles { - return nil // cache is up-to-date; was not found earlier - } - - // Update the enum cache for all enums declared in the given proto package. - numFiles = 0 - protoregistry.GlobalFiles.RangeFilesByPackage(protoPkg, func(fd protoreflect.FileDescriptor) bool { - walkEnums(fd, func(ed protoreflect.EnumDescriptor) { - name := protoimpl.X.LegacyEnumName(ed) - if _, ok := enumCache.Load(name); !ok { - m := make(enumsByName) - evs := ed.Values() - for i := evs.Len() - 1; i >= 0; i-- { - ev := evs.Get(i) - m[string(ev.Name())] = int32(ev.Number()) - } - enumCache.LoadOrStore(name, m) - } - }) - numFiles++ - return true - }) - numFilesCache.Store(protoPkg, numFiles) - - // Check cache again for enum map. - if v, ok := enumCache.Load(s); ok { - return v.(enumsByName) - } - return nil -} - -// walkEnums recursively walks all enums declared in d. -func walkEnums(d interface { - Enums() protoreflect.EnumDescriptors - Messages() protoreflect.MessageDescriptors -}, f func(protoreflect.EnumDescriptor)) { - eds := d.Enums() - for i := eds.Len() - 1; i >= 0; i-- { - f(eds.Get(i)) - } - mds := d.Messages() - for i := mds.Len() - 1; i >= 0; i-- { - walkEnums(mds.Get(i), f) - } -} - -// messageName is the full name of protobuf message. -type messageName = string - -var messageTypeCache sync.Map // map[messageName]reflect.Type - -// RegisterType is called from generated code to register the message Go type -// for a message of the given name. -// -// Deprecated: Use protoregistry.GlobalTypes.RegisterMessage instead. -func RegisterType(m Message, s messageName) { - mt := protoimpl.X.LegacyMessageTypeOf(m, protoreflect.FullName(s)) - if err := protoregistry.GlobalTypes.RegisterMessage(mt); err != nil { - panic(err) - } - messageTypeCache.Store(s, reflect.TypeOf(m)) -} - -// RegisterMapType is called from generated code to register the Go map type -// for a protobuf message representing a map entry. -// -// Deprecated: Do not use. -func RegisterMapType(m interface{}, s messageName) { - t := reflect.TypeOf(m) - if t.Kind() != reflect.Map { - panic(fmt.Sprintf("invalid map kind: %v", t)) - } - if _, ok := messageTypeCache.Load(s); ok { - panic(fmt.Errorf("proto: duplicate proto message registered: %s", s)) - } - messageTypeCache.Store(s, t) -} - -// MessageType returns the message type for a named message. -// It returns nil if not found. -// -// Deprecated: Use protoregistry.GlobalTypes.FindMessageByName instead. -func MessageType(s messageName) reflect.Type { - if v, ok := messageTypeCache.Load(s); ok { - return v.(reflect.Type) - } - - // Derive the message type from the v2 registry. - var t reflect.Type - if mt, _ := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(s)); mt != nil { - t = messageGoType(mt) - } - - // If we could not get a concrete type, it is possible that it is a - // pseudo-message for a map entry. - if t == nil { - d, _ := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(s)) - if md, _ := d.(protoreflect.MessageDescriptor); md != nil && md.IsMapEntry() { - kt := goTypeForField(md.Fields().ByNumber(1)) - vt := goTypeForField(md.Fields().ByNumber(2)) - t = reflect.MapOf(kt, vt) - } - } - - // Locally cache the message type for the given name. - if t != nil { - v, _ := messageTypeCache.LoadOrStore(s, t) - return v.(reflect.Type) - } - return nil -} - -func goTypeForField(fd protoreflect.FieldDescriptor) reflect.Type { - switch k := fd.Kind(); k { - case protoreflect.EnumKind: - if et, _ := protoregistry.GlobalTypes.FindEnumByName(fd.Enum().FullName()); et != nil { - return enumGoType(et) - } - return reflect.TypeOf(protoreflect.EnumNumber(0)) - case protoreflect.MessageKind, protoreflect.GroupKind: - if mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()); mt != nil { - return messageGoType(mt) - } - return reflect.TypeOf((*protoreflect.Message)(nil)).Elem() - default: - return reflect.TypeOf(fd.Default().Interface()) - } -} - -func enumGoType(et protoreflect.EnumType) reflect.Type { - return reflect.TypeOf(et.New(0)) -} - -func messageGoType(mt protoreflect.MessageType) reflect.Type { - return reflect.TypeOf(MessageV1(mt.Zero().Interface())) -} - -// MessageName returns the full protobuf name for the given message type. -// -// Deprecated: Use protoreflect.MessageDescriptor.FullName instead. -func MessageName(m Message) messageName { - if m == nil { - return "" - } - if m, ok := m.(interface{ XXX_MessageName() messageName }); ok { - return m.XXX_MessageName() - } - return messageName(protoimpl.X.MessageDescriptorOf(m).FullName()) -} - -// RegisterExtension is called from the generated code to register -// the extension descriptor. -// -// Deprecated: Use protoregistry.GlobalTypes.RegisterExtension instead. -func RegisterExtension(d *ExtensionDesc) { - if err := protoregistry.GlobalTypes.RegisterExtension(d); err != nil { - panic(err) - } -} - -type extensionsByNumber = map[int32]*ExtensionDesc - -var extensionCache sync.Map // map[messageName]extensionsByNumber - -// RegisteredExtensions returns a map of the registered extensions for the -// provided protobuf message, indexed by the extension field number. -// -// Deprecated: Use protoregistry.GlobalTypes.RangeExtensionsByMessage instead. -func RegisteredExtensions(m Message) extensionsByNumber { - // Check whether the cache is stale. If the number of extensions for - // the given message differs, then it means that some extensions were - // recently registered upstream that we do not know about. - s := MessageName(m) - v, _ := extensionCache.Load(s) - xs, _ := v.(extensionsByNumber) - if protoregistry.GlobalTypes.NumExtensionsByMessage(protoreflect.FullName(s)) == len(xs) { - return xs // cache is up-to-date - } - - // Cache is stale, re-compute the extensions map. - xs = make(extensionsByNumber) - protoregistry.GlobalTypes.RangeExtensionsByMessage(protoreflect.FullName(s), func(xt protoreflect.ExtensionType) bool { - if xd, ok := xt.(*ExtensionDesc); ok { - xs[int32(xt.TypeDescriptor().Number())] = xd - } else { - // TODO: This implies that the protoreflect.ExtensionType is a - // custom type not generated by protoc-gen-go. We could try and - // convert the type to an ExtensionDesc. - } - return true - }) - extensionCache.Store(s, xs) - return xs -} diff --git a/vendor/github.com/golang/protobuf/proto/text_decode.go b/vendor/github.com/golang/protobuf/proto/text_decode.go deleted file mode 100644 index 47eb3e44..00000000 --- a/vendor/github.com/golang/protobuf/proto/text_decode.go +++ /dev/null @@ -1,801 +0,0 @@ -// Copyright 2010 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 proto - -import ( - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "unicode/utf8" - - "google.golang.org/protobuf/encoding/prototext" - protoV2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -const wrapTextUnmarshalV2 = false - -// ParseError is returned by UnmarshalText. -type ParseError struct { - Message string - - // Deprecated: Do not use. - Line, Offset int -} - -func (e *ParseError) Error() string { - if wrapTextUnmarshalV2 { - return e.Message - } - if e.Line == 1 { - return fmt.Sprintf("line 1.%d: %v", e.Offset, e.Message) - } - return fmt.Sprintf("line %d: %v", e.Line, e.Message) -} - -// UnmarshalText parses a proto text formatted string into m. -func UnmarshalText(s string, m Message) error { - if u, ok := m.(encoding.TextUnmarshaler); ok { - return u.UnmarshalText([]byte(s)) - } - - m.Reset() - mi := MessageV2(m) - - if wrapTextUnmarshalV2 { - err := prototext.UnmarshalOptions{ - AllowPartial: true, - }.Unmarshal([]byte(s), mi) - if err != nil { - return &ParseError{Message: err.Error()} - } - return checkRequiredNotSet(mi) - } else { - if err := newTextParser(s).unmarshalMessage(mi.ProtoReflect(), ""); err != nil { - return err - } - return checkRequiredNotSet(mi) - } -} - -type textParser struct { - s string // remaining input - done bool // whether the parsing is finished (success or error) - backed bool // whether back() was called - offset, line int - cur token -} - -type token struct { - value string - err *ParseError - line int // line number - offset int // byte number from start of input, not start of line - unquoted string // the unquoted version of value, if it was a quoted string -} - -func newTextParser(s string) *textParser { - p := new(textParser) - p.s = s - p.line = 1 - p.cur.line = 1 - return p -} - -func (p *textParser) unmarshalMessage(m protoreflect.Message, terminator string) (err error) { - md := m.Descriptor() - fds := md.Fields() - - // A struct is a sequence of "name: value", terminated by one of - // '>' or '}', or the end of the input. A name may also be - // "[extension]" or "[type/url]". - // - // The whole struct can also be an expanded Any message, like: - // [type/url] < ... struct contents ... > - seen := make(map[protoreflect.FieldNumber]bool) - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - if tok.value == "[" { - if err := p.unmarshalExtensionOrAny(m, seen); err != nil { - return err - } - continue - } - - // This is a normal, non-extension field. - name := protoreflect.Name(tok.value) - fd := fds.ByName(name) - switch { - case fd == nil: - gd := fds.ByName(protoreflect.Name(strings.ToLower(string(name)))) - if gd != nil && gd.Kind() == protoreflect.GroupKind && gd.Message().Name() == name { - fd = gd - } - case fd.Kind() == protoreflect.GroupKind && fd.Message().Name() != name: - fd = nil - case fd.IsWeak() && fd.Message().IsPlaceholder(): - fd = nil - } - if fd == nil { - typeName := string(md.FullName()) - if m, ok := m.Interface().(Message); ok { - t := reflect.TypeOf(m) - if t.Kind() == reflect.Ptr { - typeName = t.Elem().String() - } - } - return p.errorf("unknown field name %q in %v", name, typeName) - } - if od := fd.ContainingOneof(); od != nil && m.WhichOneof(od) != nil { - return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, od.Name()) - } - if fd.Cardinality() != protoreflect.Repeated && seen[fd.Number()] { - return p.errorf("non-repeated field %q was repeated", fd.Name()) - } - seen[fd.Number()] = true - - // Consume any colon. - if err := p.checkForColon(fd); err != nil { - return err - } - - // Parse into the field. - v := m.Get(fd) - if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) { - v = m.Mutable(fd) - } - if v, err = p.unmarshalValue(v, fd); err != nil { - return err - } - m.Set(fd, v) - - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - } - return nil -} - -func (p *textParser) unmarshalExtensionOrAny(m protoreflect.Message, seen map[protoreflect.FieldNumber]bool) error { - name, err := p.consumeExtensionOrAnyName() - if err != nil { - return err - } - - // If it contains a slash, it's an Any type URL. - if slashIdx := strings.LastIndex(name, "/"); slashIdx >= 0 { - tok := p.next() - if tok.err != nil { - return tok.err - } - // consume an optional colon - if tok.value == ":" { - tok = p.next() - if tok.err != nil { - return tok.err - } - } - - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - - mt, err := protoregistry.GlobalTypes.FindMessageByURL(name) - if err != nil { - return p.errorf("unrecognized message %q in google.protobuf.Any", name[slashIdx+len("/"):]) - } - m2 := mt.New() - if err := p.unmarshalMessage(m2, terminator); err != nil { - return err - } - b, err := protoV2.Marshal(m2.Interface()) - if err != nil { - return p.errorf("failed to marshal message of type %q: %v", name[slashIdx+len("/"):], err) - } - - urlFD := m.Descriptor().Fields().ByName("type_url") - valFD := m.Descriptor().Fields().ByName("value") - if seen[urlFD.Number()] { - return p.errorf("Any message unpacked multiple times, or %q already set", urlFD.Name()) - } - if seen[valFD.Number()] { - return p.errorf("Any message unpacked multiple times, or %q already set", valFD.Name()) - } - m.Set(urlFD, protoreflect.ValueOfString(name)) - m.Set(valFD, protoreflect.ValueOfBytes(b)) - seen[urlFD.Number()] = true - seen[valFD.Number()] = true - return nil - } - - xname := protoreflect.FullName(name) - xt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname) - if xt == nil && isMessageSet(m.Descriptor()) { - xt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append("message_set_extension")) - } - if xt == nil { - return p.errorf("unrecognized extension %q", name) - } - fd := xt.TypeDescriptor() - if fd.ContainingMessage().FullName() != m.Descriptor().FullName() { - return p.errorf("extension field %q does not extend message %q", name, m.Descriptor().FullName()) - } - - if err := p.checkForColon(fd); err != nil { - return err - } - - v := m.Get(fd) - if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) { - v = m.Mutable(fd) - } - v, err = p.unmarshalValue(v, fd) - if err != nil { - return err - } - m.Set(fd, v) - return p.consumeOptionalSeparator() -} - -func (p *textParser) unmarshalValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { - tok := p.next() - if tok.err != nil { - return v, tok.err - } - if tok.value == "" { - return v, p.errorf("unexpected EOF") - } - - switch { - case fd.IsList(): - lv := v.List() - var err error - if tok.value == "[" { - // Repeated field with list notation, like [1,2,3]. - for { - vv := lv.NewElement() - vv, err = p.unmarshalSingularValue(vv, fd) - if err != nil { - return v, err - } - lv.Append(vv) - - tok := p.next() - if tok.err != nil { - return v, tok.err - } - if tok.value == "]" { - break - } - if tok.value != "," { - return v, p.errorf("Expected ']' or ',' found %q", tok.value) - } - } - return v, nil - } - - // One value of the repeated field. - p.back() - vv := lv.NewElement() - vv, err = p.unmarshalSingularValue(vv, fd) - if err != nil { - return v, err - } - lv.Append(vv) - return v, nil - case fd.IsMap(): - // The map entry should be this sequence of tokens: - // < key : KEY value : VALUE > - // However, implementations may omit key or value, and technically - // we should support them in any order. - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return v, p.errorf("expected '{' or '<', found %q", tok.value) - } - - keyFD := fd.MapKey() - valFD := fd.MapValue() - - mv := v.Map() - kv := keyFD.Default() - vv := mv.NewValue() - for { - tok := p.next() - if tok.err != nil { - return v, tok.err - } - if tok.value == terminator { - break - } - var err error - switch tok.value { - case "key": - if err := p.consumeToken(":"); err != nil { - return v, err - } - if kv, err = p.unmarshalSingularValue(kv, keyFD); err != nil { - return v, err - } - if err := p.consumeOptionalSeparator(); err != nil { - return v, err - } - case "value": - if err := p.checkForColon(valFD); err != nil { - return v, err - } - if vv, err = p.unmarshalSingularValue(vv, valFD); err != nil { - return v, err - } - if err := p.consumeOptionalSeparator(); err != nil { - return v, err - } - default: - p.back() - return v, p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) - } - } - mv.Set(kv.MapKey(), vv) - return v, nil - default: - p.back() - return p.unmarshalSingularValue(v, fd) - } -} - -func (p *textParser) unmarshalSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { - tok := p.next() - if tok.err != nil { - return v, tok.err - } - if tok.value == "" { - return v, p.errorf("unexpected EOF") - } - - switch fd.Kind() { - case protoreflect.BoolKind: - switch tok.value { - case "true", "1", "t", "True": - return protoreflect.ValueOfBool(true), nil - case "false", "0", "f", "False": - return protoreflect.ValueOfBool(false), nil - } - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { - return protoreflect.ValueOfInt32(int32(x)), nil - } - - // The C++ parser accepts large positive hex numbers that uses - // two's complement arithmetic to represent negative numbers. - // This feature is here for backwards compatibility with C++. - if strings.HasPrefix(tok.value, "0x") { - if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - return protoreflect.ValueOfInt32(int32(-(int64(^x) + 1))), nil - } - } - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { - return protoreflect.ValueOfInt64(int64(x)), nil - } - - // The C++ parser accepts large positive hex numbers that uses - // two's complement arithmetic to represent negative numbers. - // This feature is here for backwards compatibility with C++. - if strings.HasPrefix(tok.value, "0x") { - if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { - return protoreflect.ValueOfInt64(int64(-(int64(^x) + 1))), nil - } - } - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - return protoreflect.ValueOfUint32(uint32(x)), nil - } - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { - return protoreflect.ValueOfUint64(uint64(x)), nil - } - case protoreflect.FloatKind: - // Ignore 'f' for compatibility with output generated by C++, - // but don't remove 'f' when the value is "-inf" or "inf". - v := tok.value - if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" { - v = v[:len(v)-len("f")] - } - if x, err := strconv.ParseFloat(v, 32); err == nil { - return protoreflect.ValueOfFloat32(float32(x)), nil - } - case protoreflect.DoubleKind: - // Ignore 'f' for compatibility with output generated by C++, - // but don't remove 'f' when the value is "-inf" or "inf". - v := tok.value - if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" { - v = v[:len(v)-len("f")] - } - if x, err := strconv.ParseFloat(v, 64); err == nil { - return protoreflect.ValueOfFloat64(float64(x)), nil - } - case protoreflect.StringKind: - if isQuote(tok.value[0]) { - return protoreflect.ValueOfString(tok.unquoted), nil - } - case protoreflect.BytesKind: - if isQuote(tok.value[0]) { - return protoreflect.ValueOfBytes([]byte(tok.unquoted)), nil - } - case protoreflect.EnumKind: - if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { - return protoreflect.ValueOfEnum(protoreflect.EnumNumber(x)), nil - } - vd := fd.Enum().Values().ByName(protoreflect.Name(tok.value)) - if vd != nil { - return protoreflect.ValueOfEnum(vd.Number()), nil - } - case protoreflect.MessageKind, protoreflect.GroupKind: - var terminator string - switch tok.value { - case "{": - terminator = "}" - case "<": - terminator = ">" - default: - return v, p.errorf("expected '{' or '<', found %q", tok.value) - } - err := p.unmarshalMessage(v.Message(), terminator) - return v, err - default: - panic(fmt.Sprintf("invalid kind %v", fd.Kind())) - } - return v, p.errorf("invalid %v: %v", fd.Kind(), tok.value) -} - -// Consume a ':' from the input stream (if the next token is a colon), -// returning an error if a colon is needed but not present. -func (p *textParser) checkForColon(fd protoreflect.FieldDescriptor) *ParseError { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ":" { - if fd.Message() == nil { - return p.errorf("expected ':', found %q", tok.value) - } - p.back() - } - return nil -} - -// consumeExtensionOrAnyName consumes an extension name or an Any type URL and -// the following ']'. It returns the name or URL consumed. -func (p *textParser) consumeExtensionOrAnyName() (string, error) { - tok := p.next() - if tok.err != nil { - return "", tok.err - } - - // If extension name or type url is quoted, it's a single token. - if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { - name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) - if err != nil { - return "", err - } - return name, p.consumeToken("]") - } - - // Consume everything up to "]" - var parts []string - for tok.value != "]" { - parts = append(parts, tok.value) - tok = p.next() - if tok.err != nil { - return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) - } - if p.done && tok.value != "]" { - return "", p.errorf("unclosed type_url or extension name") - } - } - return strings.Join(parts, ""), nil -} - -// consumeOptionalSeparator consumes an optional semicolon or comma. -// It is used in unmarshalMessage to provide backward compatibility. -func (p *textParser) consumeOptionalSeparator() error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ";" && tok.value != "," { - p.back() - } - return nil -} - -func (p *textParser) errorf(format string, a ...interface{}) *ParseError { - pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} - p.cur.err = pe - p.done = true - return pe -} - -func (p *textParser) skipWhitespace() { - i := 0 - for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { - if p.s[i] == '#' { - // comment; skip to end of line or input - for i < len(p.s) && p.s[i] != '\n' { - i++ - } - if i == len(p.s) { - break - } - } - if p.s[i] == '\n' { - p.line++ - } - i++ - } - p.offset += i - p.s = p.s[i:len(p.s)] - if len(p.s) == 0 { - p.done = true - } -} - -func (p *textParser) advance() { - // Skip whitespace - p.skipWhitespace() - if p.done { - return - } - - // Start of non-whitespace - p.cur.err = nil - p.cur.offset, p.cur.line = p.offset, p.line - p.cur.unquoted = "" - switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': - // Single symbol - p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] - case '"', '\'': - // Quoted string - i := 1 - for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { - if p.s[i] == '\\' && i+1 < len(p.s) { - // skip escaped char - i++ - } - i++ - } - if i >= len(p.s) || p.s[i] != p.s[0] { - p.errorf("unmatched quote") - return - } - unq, err := unquoteC(p.s[1:i], rune(p.s[0])) - if err != nil { - p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) - return - } - p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] - p.cur.unquoted = unq - default: - i := 0 - for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { - i++ - } - if i == 0 { - p.errorf("unexpected byte %#x", p.s[0]) - return - } - p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] - } - p.offset += len(p.cur.value) -} - -// Back off the parser by one token. Can only be done between calls to next(). -// It makes the next advance() a no-op. -func (p *textParser) back() { p.backed = true } - -// Advances the parser and returns the new current token. -func (p *textParser) next() *token { - if p.backed || p.done { - p.backed = false - return &p.cur - } - p.advance() - if p.done { - p.cur.value = "" - } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { - // Look for multiple quoted strings separated by whitespace, - // and concatenate them. - cat := p.cur - for { - p.skipWhitespace() - if p.done || !isQuote(p.s[0]) { - break - } - p.advance() - if p.cur.err != nil { - return &p.cur - } - cat.value += " " + p.cur.value - cat.unquoted += p.cur.unquoted - } - p.done = false // parser may have seen EOF, but we want to return cat - p.cur = cat - } - return &p.cur -} - -func (p *textParser) consumeToken(s string) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != s { - p.back() - return p.errorf("expected %q, found %q", s, tok.value) - } - return nil -} - -var errBadUTF8 = errors.New("proto: bad UTF-8") - -func unquoteC(s string, quote rune) (string, error) { - // This is based on C++'s tokenizer.cc. - // Despite its name, this is *not* parsing C syntax. - // For instance, "\0" is an invalid quoted string. - - // Avoid allocation in trivial cases. - simple := true - for _, r := range s { - if r == '\\' || r == quote { - simple = false - break - } - } - if simple { - return s, nil - } - - buf := make([]byte, 0, 3*len(s)/2) - for len(s) > 0 { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", errBadUTF8 - } - s = s[n:] - if r != '\\' { - if r < utf8.RuneSelf { - buf = append(buf, byte(r)) - } else { - buf = append(buf, string(r)...) - } - continue - } - - ch, tail, err := unescape(s) - if err != nil { - return "", err - } - buf = append(buf, ch...) - s = tail - } - return string(buf), nil -} - -func unescape(s string) (ch string, tail string, err error) { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", "", errBadUTF8 - } - s = s[n:] - switch r { - case 'a': - return "\a", s, nil - case 'b': - return "\b", s, nil - case 'f': - return "\f", s, nil - case 'n': - return "\n", s, nil - case 'r': - return "\r", s, nil - case 't': - return "\t", s, nil - case 'v': - return "\v", s, nil - case '?': - return "?", s, nil // trigraph workaround - case '\'', '"', '\\': - return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7': - if len(s) < 2 { - return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) - } - ss := string(r) + s[:2] - s = s[2:] - i, err := strconv.ParseUint(ss, 8, 8) - if err != nil { - return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) - } - return string([]byte{byte(i)}), s, nil - case 'x', 'X', 'u', 'U': - var n int - switch r { - case 'x', 'X': - n = 2 - case 'u': - n = 4 - case 'U': - n = 8 - } - if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) - } - ss := s[:n] - s = s[n:] - i, err := strconv.ParseUint(ss, 16, 64) - if err != nil { - return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) - } - if r == 'x' || r == 'X' { - return string([]byte{byte(i)}), s, nil - } - if i > utf8.MaxRune { - return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) - } - return string(rune(i)), s, nil - } - return "", "", fmt.Errorf(`unknown escape \%c`, r) -} - -func isIdentOrNumberChar(c byte) bool { - switch { - case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': - return true - case '0' <= c && c <= '9': - return true - } - switch c { - case '-', '+', '.', '_': - return true - } - return false -} - -func isWhitespace(c byte) bool { - switch c { - case ' ', '\t', '\n', '\r': - return true - } - return false -} - -func isQuote(c byte) bool { - switch c { - case '"', '\'': - return true - } - return false -} diff --git a/vendor/github.com/golang/protobuf/proto/text_encode.go b/vendor/github.com/golang/protobuf/proto/text_encode.go deleted file mode 100644 index a31134ee..00000000 --- a/vendor/github.com/golang/protobuf/proto/text_encode.go +++ /dev/null @@ -1,560 +0,0 @@ -// Copyright 2010 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 proto - -import ( - "bytes" - "encoding" - "fmt" - "io" - "math" - "sort" - "strings" - - "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -const wrapTextMarshalV2 = false - -// TextMarshaler is a configurable text format marshaler. -type TextMarshaler struct { - Compact bool // use compact text format (one line) - ExpandAny bool // expand google.protobuf.Any messages of known types -} - -// Marshal writes the proto text format of m to w. -func (tm *TextMarshaler) Marshal(w io.Writer, m Message) error { - b, err := tm.marshal(m) - if len(b) > 0 { - if _, err := w.Write(b); err != nil { - return err - } - } - return err -} - -// Text returns a proto text formatted string of m. -func (tm *TextMarshaler) Text(m Message) string { - b, _ := tm.marshal(m) - return string(b) -} - -func (tm *TextMarshaler) marshal(m Message) ([]byte, error) { - mr := MessageReflect(m) - if mr == nil || !mr.IsValid() { - return []byte(""), nil - } - - if wrapTextMarshalV2 { - if m, ok := m.(encoding.TextMarshaler); ok { - return m.MarshalText() - } - - opts := prototext.MarshalOptions{ - AllowPartial: true, - EmitUnknown: true, - } - if !tm.Compact { - opts.Indent = " " - } - if !tm.ExpandAny { - opts.Resolver = (*protoregistry.Types)(nil) - } - return opts.Marshal(mr.Interface()) - } else { - w := &textWriter{ - compact: tm.Compact, - expandAny: tm.ExpandAny, - complete: true, - } - - if m, ok := m.(encoding.TextMarshaler); ok { - b, err := m.MarshalText() - if err != nil { - return nil, err - } - w.Write(b) - return w.buf, nil - } - - err := w.writeMessage(mr) - return w.buf, err - } -} - -var ( - defaultTextMarshaler = TextMarshaler{} - compactTextMarshaler = TextMarshaler{Compact: true} -) - -// MarshalText writes the proto text format of m to w. -func MarshalText(w io.Writer, m Message) error { return defaultTextMarshaler.Marshal(w, m) } - -// MarshalTextString returns a proto text formatted string of m. -func MarshalTextString(m Message) string { return defaultTextMarshaler.Text(m) } - -// CompactText writes the compact proto text format of m to w. -func CompactText(w io.Writer, m Message) error { return compactTextMarshaler.Marshal(w, m) } - -// CompactTextString returns a compact proto text formatted string of m. -func CompactTextString(m Message) string { return compactTextMarshaler.Text(m) } - -var ( - newline = []byte("\n") - endBraceNewline = []byte("}\n") - posInf = []byte("inf") - negInf = []byte("-inf") - nan = []byte("nan") -) - -// textWriter is an io.Writer that tracks its indentation level. -type textWriter struct { - compact bool // same as TextMarshaler.Compact - expandAny bool // same as TextMarshaler.ExpandAny - complete bool // whether the current position is a complete line - indent int // indentation level; never negative - buf []byte -} - -func (w *textWriter) Write(p []byte) (n int, _ error) { - newlines := bytes.Count(p, newline) - if newlines == 0 { - if !w.compact && w.complete { - w.writeIndent() - } - w.buf = append(w.buf, p...) - w.complete = false - return len(p), nil - } - - frags := bytes.SplitN(p, newline, newlines+1) - if w.compact { - for i, frag := range frags { - if i > 0 { - w.buf = append(w.buf, ' ') - n++ - } - w.buf = append(w.buf, frag...) - n += len(frag) - } - return n, nil - } - - for i, frag := range frags { - if w.complete { - w.writeIndent() - } - w.buf = append(w.buf, frag...) - n += len(frag) - if i+1 < len(frags) { - w.buf = append(w.buf, '\n') - n++ - } - } - w.complete = len(frags[len(frags)-1]) == 0 - return n, nil -} - -func (w *textWriter) WriteByte(c byte) error { - if w.compact && c == '\n' { - c = ' ' - } - if !w.compact && w.complete { - w.writeIndent() - } - w.buf = append(w.buf, c) - w.complete = c == '\n' - return nil -} - -func (w *textWriter) writeName(fd protoreflect.FieldDescriptor) { - if !w.compact && w.complete { - w.writeIndent() - } - w.complete = false - - if fd.Kind() != protoreflect.GroupKind { - w.buf = append(w.buf, fd.Name()...) - w.WriteByte(':') - } else { - // Use message type name for group field name. - w.buf = append(w.buf, fd.Message().Name()...) - } - - if !w.compact { - w.WriteByte(' ') - } -} - -func requiresQuotes(u string) bool { - // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. - for _, ch := range u { - switch { - case ch == '.' || ch == '/' || ch == '_': - continue - case '0' <= ch && ch <= '9': - continue - case 'A' <= ch && ch <= 'Z': - continue - case 'a' <= ch && ch <= 'z': - continue - default: - return true - } - } - return false -} - -// writeProto3Any writes an expanded google.protobuf.Any message. -// -// It returns (false, nil) if sv value can't be unmarshaled (e.g. because -// required messages are not linked in). -// -// It returns (true, error) when sv was written in expanded format or an error -// was encountered. -func (w *textWriter) writeProto3Any(m protoreflect.Message) (bool, error) { - md := m.Descriptor() - fdURL := md.Fields().ByName("type_url") - fdVal := md.Fields().ByName("value") - - url := m.Get(fdURL).String() - mt, err := protoregistry.GlobalTypes.FindMessageByURL(url) - if err != nil { - return false, nil - } - - b := m.Get(fdVal).Bytes() - m2 := mt.New() - if err := proto.Unmarshal(b, m2.Interface()); err != nil { - return false, nil - } - w.Write([]byte("[")) - if requiresQuotes(url) { - w.writeQuotedString(url) - } else { - w.Write([]byte(url)) - } - if w.compact { - w.Write([]byte("]:<")) - } else { - w.Write([]byte("]: <\n")) - w.indent++ - } - if err := w.writeMessage(m2); err != nil { - return true, err - } - if w.compact { - w.Write([]byte("> ")) - } else { - w.indent-- - w.Write([]byte(">\n")) - } - return true, nil -} - -func (w *textWriter) writeMessage(m protoreflect.Message) error { - md := m.Descriptor() - if w.expandAny && md.FullName() == "google.protobuf.Any" { - if canExpand, err := w.writeProto3Any(m); canExpand { - return err - } - } - - fds := md.Fields() - for i := 0; i < fds.Len(); { - fd := fds.Get(i) - if od := fd.ContainingOneof(); od != nil { - fd = m.WhichOneof(od) - i += od.Fields().Len() - } else { - i++ - } - if fd == nil || !m.Has(fd) { - continue - } - - switch { - case fd.IsList(): - lv := m.Get(fd).List() - for j := 0; j < lv.Len(); j++ { - w.writeName(fd) - v := lv.Get(j) - if err := w.writeSingularValue(v, fd); err != nil { - return err - } - w.WriteByte('\n') - } - case fd.IsMap(): - kfd := fd.MapKey() - vfd := fd.MapValue() - mv := m.Get(fd).Map() - - type entry struct{ key, val protoreflect.Value } - var entries []entry - mv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { - entries = append(entries, entry{k.Value(), v}) - return true - }) - sort.Slice(entries, func(i, j int) bool { - switch kfd.Kind() { - case protoreflect.BoolKind: - return !entries[i].key.Bool() && entries[j].key.Bool() - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - return entries[i].key.Int() < entries[j].key.Int() - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - return entries[i].key.Uint() < entries[j].key.Uint() - case protoreflect.StringKind: - return entries[i].key.String() < entries[j].key.String() - default: - panic("invalid kind") - } - }) - for _, entry := range entries { - w.writeName(fd) - w.WriteByte('<') - if !w.compact { - w.WriteByte('\n') - } - w.indent++ - w.writeName(kfd) - if err := w.writeSingularValue(entry.key, kfd); err != nil { - return err - } - w.WriteByte('\n') - w.writeName(vfd) - if err := w.writeSingularValue(entry.val, vfd); err != nil { - return err - } - w.WriteByte('\n') - w.indent-- - w.WriteByte('>') - w.WriteByte('\n') - } - default: - w.writeName(fd) - if err := w.writeSingularValue(m.Get(fd), fd); err != nil { - return err - } - w.WriteByte('\n') - } - } - - if b := m.GetUnknown(); len(b) > 0 { - w.writeUnknownFields(b) - } - return w.writeExtensions(m) -} - -func (w *textWriter) writeSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) error { - switch fd.Kind() { - case protoreflect.FloatKind, protoreflect.DoubleKind: - switch vf := v.Float(); { - case math.IsInf(vf, +1): - w.Write(posInf) - case math.IsInf(vf, -1): - w.Write(negInf) - case math.IsNaN(vf): - w.Write(nan) - default: - fmt.Fprint(w, v.Interface()) - } - case protoreflect.StringKind: - // NOTE: This does not validate UTF-8 for historical reasons. - w.writeQuotedString(string(v.String())) - case protoreflect.BytesKind: - w.writeQuotedString(string(v.Bytes())) - case protoreflect.MessageKind, protoreflect.GroupKind: - var bra, ket byte = '<', '>' - if fd.Kind() == protoreflect.GroupKind { - bra, ket = '{', '}' - } - w.WriteByte(bra) - if !w.compact { - w.WriteByte('\n') - } - w.indent++ - m := v.Message() - if m2, ok := m.Interface().(encoding.TextMarshaler); ok { - b, err := m2.MarshalText() - if err != nil { - return err - } - w.Write(b) - } else { - w.writeMessage(m) - } - w.indent-- - w.WriteByte(ket) - case protoreflect.EnumKind: - if ev := fd.Enum().Values().ByNumber(v.Enum()); ev != nil { - fmt.Fprint(w, ev.Name()) - } else { - fmt.Fprint(w, v.Enum()) - } - default: - fmt.Fprint(w, v.Interface()) - } - return nil -} - -// writeQuotedString writes a quoted string in the protocol buffer text format. -func (w *textWriter) writeQuotedString(s string) { - w.WriteByte('"') - for i := 0; i < len(s); i++ { - switch c := s[i]; c { - case '\n': - w.buf = append(w.buf, `\n`...) - case '\r': - w.buf = append(w.buf, `\r`...) - case '\t': - w.buf = append(w.buf, `\t`...) - case '"': - w.buf = append(w.buf, `\"`...) - case '\\': - w.buf = append(w.buf, `\\`...) - default: - if isPrint := c >= 0x20 && c < 0x7f; isPrint { - w.buf = append(w.buf, c) - } else { - w.buf = append(w.buf, fmt.Sprintf(`\%03o`, c)...) - } - } - } - w.WriteByte('"') -} - -func (w *textWriter) writeUnknownFields(b []byte) { - if !w.compact { - fmt.Fprintf(w, "/* %d unknown bytes */\n", len(b)) - } - - for len(b) > 0 { - num, wtyp, n := protowire.ConsumeTag(b) - if n < 0 { - return - } - b = b[n:] - - if wtyp == protowire.EndGroupType { - w.indent-- - w.Write(endBraceNewline) - continue - } - fmt.Fprint(w, num) - if wtyp != protowire.StartGroupType { - w.WriteByte(':') - } - if !w.compact || wtyp == protowire.StartGroupType { - w.WriteByte(' ') - } - switch wtyp { - case protowire.VarintType: - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return - } - b = b[n:] - fmt.Fprint(w, v) - case protowire.Fixed32Type: - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return - } - b = b[n:] - fmt.Fprint(w, v) - case protowire.Fixed64Type: - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return - } - b = b[n:] - fmt.Fprint(w, v) - case protowire.BytesType: - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return - } - b = b[n:] - fmt.Fprintf(w, "%q", v) - case protowire.StartGroupType: - w.WriteByte('{') - w.indent++ - default: - fmt.Fprintf(w, "/* unknown wire type %d */", wtyp) - } - w.WriteByte('\n') - } -} - -// writeExtensions writes all the extensions in m. -func (w *textWriter) writeExtensions(m protoreflect.Message) error { - md := m.Descriptor() - if md.ExtensionRanges().Len() == 0 { - return nil - } - - type ext struct { - desc protoreflect.FieldDescriptor - val protoreflect.Value - } - var exts []ext - m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - if fd.IsExtension() { - exts = append(exts, ext{fd, v}) - } - return true - }) - sort.Slice(exts, func(i, j int) bool { - return exts[i].desc.Number() < exts[j].desc.Number() - }) - - for _, ext := range exts { - // For message set, use the name of the message as the extension name. - name := string(ext.desc.FullName()) - if isMessageSet(ext.desc.ContainingMessage()) { - name = strings.TrimSuffix(name, ".message_set_extension") - } - - if !ext.desc.IsList() { - if err := w.writeSingularExtension(name, ext.val, ext.desc); err != nil { - return err - } - } else { - lv := ext.val.List() - for i := 0; i < lv.Len(); i++ { - if err := w.writeSingularExtension(name, lv.Get(i), ext.desc); err != nil { - return err - } - } - } - } - return nil -} - -func (w *textWriter) writeSingularExtension(name string, v protoreflect.Value, fd protoreflect.FieldDescriptor) error { - fmt.Fprintf(w, "[%s]:", name) - if !w.compact { - w.WriteByte(' ') - } - if err := w.writeSingularValue(v, fd); err != nil { - return err - } - w.WriteByte('\n') - return nil -} - -func (w *textWriter) writeIndent() { - if !w.complete { - return - } - for i := 0; i < w.indent*2; i++ { - w.buf = append(w.buf, ' ') - } - w.complete = false -} diff --git a/vendor/github.com/golang/protobuf/proto/wire.go b/vendor/github.com/golang/protobuf/proto/wire.go deleted file mode 100644 index d7c28da5..00000000 --- a/vendor/github.com/golang/protobuf/proto/wire.go +++ /dev/null @@ -1,78 +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 proto - -import ( - protoV2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoiface" -) - -// Size returns the size in bytes of the wire-format encoding of m. -func Size(m Message) int { - if m == nil { - return 0 - } - mi := MessageV2(m) - return protoV2.Size(mi) -} - -// Marshal returns the wire-format encoding of m. -func Marshal(m Message) ([]byte, error) { - b, err := marshalAppend(nil, m, false) - if b == nil { - b = zeroBytes - } - return b, err -} - -var zeroBytes = make([]byte, 0, 0) - -func marshalAppend(buf []byte, m Message, deterministic bool) ([]byte, error) { - if m == nil { - return nil, ErrNil - } - mi := MessageV2(m) - nbuf, err := protoV2.MarshalOptions{ - Deterministic: deterministic, - AllowPartial: true, - }.MarshalAppend(buf, mi) - if err != nil { - return buf, err - } - if len(buf) == len(nbuf) { - if !mi.ProtoReflect().IsValid() { - return buf, ErrNil - } - } - return nbuf, checkRequiredNotSet(mi) -} - -// Unmarshal parses a wire-format message in b and places the decoded results in m. -// -// Unmarshal resets m before starting to unmarshal, so any existing data in m is always -// removed. Use UnmarshalMerge to preserve and append to existing data. -func Unmarshal(b []byte, m Message) error { - m.Reset() - return UnmarshalMerge(b, m) -} - -// UnmarshalMerge parses a wire-format message in b and places the decoded results in m. -func UnmarshalMerge(b []byte, m Message) error { - mi := MessageV2(m) - out, err := protoV2.UnmarshalOptions{ - AllowPartial: true, - Merge: true, - }.UnmarshalState(protoiface.UnmarshalInput{ - Buf: b, - Message: mi.ProtoReflect(), - }) - if err != nil { - return err - } - if out.Flags&protoiface.UnmarshalInitialized > 0 { - return nil - } - return checkRequiredNotSet(mi) -} diff --git a/vendor/github.com/golang/protobuf/proto/wrappers.go b/vendor/github.com/golang/protobuf/proto/wrappers.go deleted file mode 100644 index 398e3485..00000000 --- a/vendor/github.com/golang/protobuf/proto/wrappers.go +++ /dev/null @@ -1,34 +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 proto - -// Bool stores v in a new bool value and returns a pointer to it. -func Bool(v bool) *bool { return &v } - -// Int stores v in a new int32 value and returns a pointer to it. -// -// Deprecated: Use Int32 instead. -func Int(v int) *int32 { return Int32(int32(v)) } - -// Int32 stores v in a new int32 value and returns a pointer to it. -func Int32(v int32) *int32 { return &v } - -// Int64 stores v in a new int64 value and returns a pointer to it. -func Int64(v int64) *int64 { return &v } - -// Uint32 stores v in a new uint32 value and returns a pointer to it. -func Uint32(v uint32) *uint32 { return &v } - -// Uint64 stores v in a new uint64 value and returns a pointer to it. -func Uint64(v uint64) *uint64 { return &v } - -// Float32 stores v in a new float32 value and returns a pointer to it. -func Float32(v float32) *float32 { return &v } - -// Float64 stores v in a new float64 value and returns a pointer to it. -func Float64(v float64) *float64 { return &v } - -// String stores v in a new string value and returns a pointer to it. -func String(v string) *string { return &v } diff --git a/vendor/github.com/google/go-github/v30/AUTHORS b/vendor/github.com/google/go-github/v30/AUTHORS deleted file mode 100644 index 4dd8d21b..00000000 --- a/vendor/github.com/google/go-github/v30/AUTHORS +++ /dev/null @@ -1,288 +0,0 @@ -# This is the official list of go-github authors for copyright purposes. -# -# This does not necessarily list everyone who has contributed code, since in -# some cases, their employer may be the copyright holder. To see the full list -# of contributors, see the revision history in source control or -# https://github.com/google/go-github/graphs/contributors. -# -# Authors who wish to be recognized in this file should add themselves (or -# their employer, as appropriate). - -178inaba -413x -Abhinav Gupta -adrienzieba -Ahmed Hagy -Aidan Steele -Ainsley Chong -Akeda Bagus -Akhil Mohan -Alec Thomas -Aleks Clark -Alex Bramley -Alex Orr -Alexander Harkness -Allen Sun -Amey Sakhadeo -Anders Janmyr -Andreas Garnæs -Andrew Ryabchun -Andy Grunwald -Andy Hume -Andy Lindeman -anjanashenoy -Anshuman Bhartiya -Antoine -Antoine Pelisse -Anubha Kushwaha -appilon -Aravind -Arda Kuyumcu -Arıl Bozoluk -Austin Dizzy -Ben Batha -Benjamen Keroack -Beshr Kayali -Beyang Liu -Billy Lynch -Björn Häuser -Brad Harris -Brad Moylan -Bradley Falzon -Brandon Cook -Brian Egizi -Bryan Boreham -Cami Diez -Carl Johnson -Carlos Alexandro Becker -Carlos Tadeu Panato Junior -chandresh-pancholi -Charles Fenwick Elliott -Charlie Yan -Chris King -Chris Raborg -Chris Roche -Chris Schaefer -chrisforrette -Christian Muehlhaeuser -Christoph Sassenberg -Colin Misare -Craig Peterson -Cristian Maglie -Daehyeok Mun -Daniel Leavitt -Daniel Nilsson -Daoq -Dave Du Cros -Dave Henderson -Dave Protasowski -David Deng -David Jannotta -David Ji -David Lopez Reyes -Davide Zipeto -Dennis Webb -Dhi Aurrahman -Diego Lapiduz -Dmitri Shuralyov -dmnlk -Don Petersen -Doug Turner -Drew Fradette -Eivind -Eli Uriegas -Elliott Beach -Emerson Wood -eperm -Erick Fejta -erwinvaneyk -Evan Elias -Fabrice -Felix Geisendörfer -Filippo Valsorda -Florian Forster -Francesc Gil -Francis -Francisco Guimarães -Fredrik Jönsson -Garrett Squire -George Kontridze -Georgy Buranov -Glen Mailer -Gnahz -Google Inc. -Grachev Mikhail -griffin_stewie -Guillaume Jacquet -Guz Alexander -Guðmundur Bjarni Ólafsson -Hanno Hecker -Hari haran -haya14busa -haya14busa -Huy Tr -huydx -i2bskn -Ioannis Georgoulas -Isao Jonas -isqua -Jameel Haffejee -James Cockbain -Jan Kosecki -Javier Campanini -Jens Rantil -Jeremy Morris -Jesse Newland -Jihoon Chung -Jimmi Dyson -Joan Saum -Joe Tsai -John Barton -John Engelman -Jordan Brockopp -Jordan Sussman -Joshua Bezaleel Abednego -JP Phillips -jpbelanger-mtl -Juan Basso -Julien Garcia Gonzalez -Julien Rostand -Junya Kono -Justin Abrahms -Jusung Lee -jzhoucliqr -kadern0 -Katrina Owen -Kautilya Tripathi -Keita Urashima -Kevin Burke -Konrad Malawski -Kookheon Kwon -Krzysztof Kowalczyk -Kshitij Saraogi -kyokomi -Laurent Verdoïa -Liam Galvin -Lovro Mažgon -Lucas Alcantara -Luke Evers -Luke Kysow -Luke Roberts -Luke Young -lynn [they] -Maksim Zhylinski -Mark Tareshawty -Martin-Louis Bright -Martins Sipenko -Marwan Sulaiman -Masayuki Izumi -Mat Geist -Matt -Matt Brender -Matt Gaunt -Matt Landis -Maxime Bury -Michael Spiegel -Michael Tiller -Michał Glapa -Nadav Kaner -Nathan VanBenschoten -Navaneeth Suresh -Neil O'Toole -Nick Miyake -Nick Spragg -Nikhita Raghunath -Noah Zoschke -ns-cweber -Ole Orhagen -Oleg Kovalov -Ondřej Kupka -Palash Nigam -Panagiotis Moustafellos -Parham Alvani -Parker Moore -parkhyukjun89 -Patrick DeVivo -Patrick Marabeas -Pavel Shtanko -Pete Wagner -Petr Shevtsov -Pierre Carrier -Piotr Zurek -Qais Patankar -Quang Le Hong -Quentin Leffray -Quinn Slack -Rackspace US, Inc. -Radek Simko -Radliński Ignacy -Rajat Jindal -Rajendra arora -Ranbir Singh -Ravi Shekhar Jethani -RaviTeja Pothana -rc1140 -Red Hat, Inc. -Ricco Førgaard -Rob Figueiredo -Rohit Upadhyay -Ronak Jain -Ruben Vereecken -Ryan Leung -Ryan Lower -Ryo Nakao -Safwan Olaimat -Sahil Dua -saisi -Sam Minnée -Sandeep Sukhani -Sander Knape -Sander van Harmelen -Sanket Payghan -Sarasa Kisaragi -Sean Wang -Sebastian Mandrean -Sebastian Mæland Pedersen -Sergey Romanov -Sergio Garcia -Sevki -Shagun Khemka -shakeelrao -Shawn Catanzarite -Shawn Smith -Shibasis Patel -Shrikrishna Singh -sona-tar -SoundCloud, Ltd. -Sridhar Mocherla -SriVignessh Pss -Stefan Sedich -Stian Eikeland -Suhaib Mujahid -Szymon Kodrebski -Takayuki Watanabe -Taketoshi Fujiwara -Tasya Aditya Rukmana -Thomas Bruyelle -Timothée Peignier -tkhandel -Trey Tacon -ttacon -Vaibhav Singh -Varadarajan Aravamudhan -Victor Castell -Victor Vrantchan -vikkyomkar -Vlad Ungureanu -Wasim Thabraze -Will Maier -Willem D'Haeseleer -William Bailey -William Cooke -xibz -Yann Malet -Yannick Utard -Yicheng Qin -Yosuke Akatsuka -Yumikiyo Osanai -Zach Latta diff --git a/vendor/github.com/google/go-github/v30/LICENSE b/vendor/github.com/google/go-github/v30/LICENSE deleted file mode 100644 index 28b6486f..00000000 --- a/vendor/github.com/google/go-github/v30/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The go-github AUTHORS. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/google/go-github/v30/github/actions.go b/vendor/github.com/google/go-github/v30/github/actions.go deleted file mode 100644 index f9f7f8ee..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2020 The go-github 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 github - -// ActionsService handles communication with the actions related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/actions/ -type ActionsService service diff --git a/vendor/github.com/google/go-github/v30/github/actions_artifacts.go b/vendor/github.com/google/go-github/v30/github/actions_artifacts.go deleted file mode 100644 index 17358495..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions_artifacts.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2020 The go-github 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 github - -import ( - "context" - "fmt" - "net/http" - "net/url" -) - -// Artifact reprents a GitHub artifact. Artifacts allow sharing -// data between jobs in a workflow and provide storage for data -// once a workflow is complete. -// -// GitHub API docs: https://developer.github.com/v3/actions/artifacts/ -type Artifact struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Name *string `json:"name,omitempty"` - SizeInBytes *int64 `json:"size_in_bytes,omitempty"` - ArchiveDownloadURL *string `json:"archive_download_url,omitempty"` - Expired *bool `json:"expired,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - ExpiresAt *Timestamp `json:"expires_at,omitempty"` -} - -// ArtifactList represents a list of GitHub artifacts. -// -// GitHub API docs: https://developer.github.com/v3/actions/artifacts/ -type ArtifactList struct { - TotalCount *int64 `json:"total_count,omitempty"` - Artifacts []*Artifact `json:"artifacts,omitempty"` -} - -// ListWorkflowRunArtifacts lists all artifacts that belong to a workflow run. -// -// GitHub API docs: https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts -func (s *ActionsService) ListWorkflowRunArtifacts(ctx context.Context, owner, repo string, runID int64, opts *ListOptions) (*ArtifactList, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/artifacts", owner, repo, runID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - artifactList := new(ArtifactList) - resp, err := s.client.Do(ctx, req, artifactList) - if err != nil { - return nil, resp, err - } - - return artifactList, resp, nil -} - -// GetArtifact gets a specific artifact for a workflow run. -// -// GitHub API docs: https://developer.github.com/v3/actions/artifacts/#get-an-artifact -func (s *ActionsService) GetArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Artifact, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/artifacts/%v", owner, repo, artifactID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - artifact := new(Artifact) - resp, err := s.client.Do(ctx, req, artifact) - if err != nil { - return nil, resp, err - } - - return artifact, resp, nil -} - -// DownloadArtifact gets a redirect URL to download an archive for a repository. -// -// GitHub API docs: https://developer.github.com/v3/actions/artifacts/#download-an-artifact -func (s *ActionsService) DownloadArtifact(ctx context.Context, owner, repo string, artifactID int64, followRedirects bool) (*url.URL, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/artifacts/%v/zip", owner, repo, artifactID) - - resp, err := s.getDownloadArtifactFromURL(ctx, u, followRedirects) - if err != nil { - return nil, nil, err - } - - if resp.StatusCode != http.StatusFound { - return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status) - } - parsedURL, err := url.Parse(resp.Header.Get("Location")) - return parsedURL, newResponse(resp), nil -} - -func (s *ActionsService) getDownloadArtifactFromURL(ctx context.Context, u string, followRedirects bool) (*http.Response, error) { - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, err - } - - var resp *http.Response - // Use http.DefaultTransport if no custom Transport is configured - req = withContext(ctx, req) - if s.client.client.Transport == nil { - resp, err = http.DefaultTransport.RoundTrip(req) - } else { - resp, err = s.client.client.Transport.RoundTrip(req) - } - if err != nil { - return nil, err - } - resp.Body.Close() - - // If redirect response is returned, follow it - if followRedirects && resp.StatusCode == http.StatusMovedPermanently { - u = resp.Header.Get("Location") - resp, err = s.getDownloadArtifactFromURL(ctx, u, false) - } - return resp, err -} - -// DeleteArtifact deletes a workflow run artifact. -// -// GitHub API docs: https://developer.github.com/v3/actions/artifacts/#delete-an-artifact -func (s *ActionsService) DeleteArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/artifacts/%v", owner, repo, artifactID) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/actions_runners.go b/vendor/github.com/google/go-github/v30/github/actions_runners.go deleted file mode 100644 index bab39631..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions_runners.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2020 The go-github 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 github - -import ( - "context" - "fmt" -) - -// RunnerApplicationDownload represents a binary for the self-hosted runner application that can be downloaded. -type RunnerApplicationDownload struct { - OS *string `json:"os,omitempty"` - Architecture *string `json:"architecture,omitempty"` - DownloadURL *string `json:"download_url,omitempty"` - Filename *string `json:"filename,omitempty"` -} - -// ListRunnerApplicationDownloads lists self-hosted runner application binaries that can be downloaded and run. -// -// GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#list-downloads-for-the-self-hosted-runner-application -func (s *ActionsService) ListRunnerApplicationDownloads(ctx context.Context, owner, repo string) ([]*RunnerApplicationDownload, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runners/downloads", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var rads []*RunnerApplicationDownload - resp, err := s.client.Do(ctx, req, &rads) - if err != nil { - return nil, resp, err - } - - return rads, resp, nil -} - -// RegistrationToken represents a token that can be used to add a self-hosted runner to a repository. -type RegistrationToken struct { - Token *string `json:"token,omitempty"` - ExpiresAt *Timestamp `json:"expires_at,omitempty"` -} - -// CreateRegistrationToken creates a token that can be used to add a self-hosted runner. -// -// GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#create-a-registration-token -func (s *ActionsService) CreateRegistrationToken(ctx context.Context, owner, repo string) (*RegistrationToken, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runners/registration-token", owner, repo) - - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - registrationToken := new(RegistrationToken) - resp, err := s.client.Do(ctx, req, registrationToken) - if err != nil { - return nil, resp, err - } - - return registrationToken, resp, nil -} - -// Runner represents a self-hosted runner registered with a repository. -type Runner struct { - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - OS *string `json:"os,omitempty"` - Status *string `json:"status,omitempty"` -} - -// ListRunners lists all the self-hosted runners for a repository. -// -// GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#list-self-hosted-runners-for-a-repository -func (s *ActionsService) ListRunners(ctx context.Context, owner, repo string, opts *ListOptions) ([]*Runner, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runners", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var runners []*Runner - resp, err := s.client.Do(ctx, req, &runners) - if err != nil { - return nil, resp, err - } - - return runners, resp, nil -} - -// GetRunner gets a specific self-hosted runner for a repository using its runner ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#get-a-self-hosted-runner -func (s *ActionsService) GetRunner(ctx context.Context, owner, repo string, runnerID int64) (*Runner, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runners/%v", owner, repo, runnerID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - runner := new(Runner) - resp, err := s.client.Do(ctx, req, runner) - if err != nil { - return nil, resp, err - } - - return runner, resp, nil -} - -// RemoveToken represents a token that can be used to remove a self-hosted runner from a repository. -type RemoveToken struct { - Token *string `json:"token,omitempty"` - ExpiresAt *Timestamp `json:"expires_at,omitempty"` -} - -// CreateRemoveToken creates a token that can be used to remove a self-hosted runner from a repository. -// -// GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#create-a-remove-token -func (s *ActionsService) CreateRemoveToken(ctx context.Context, owner, repo string) (*RemoveToken, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runners/remove-token", owner, repo) - - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - removeToken := new(RemoveToken) - resp, err := s.client.Do(ctx, req, removeToken) - if err != nil { - return nil, resp, err - } - - return removeToken, resp, nil -} - -// RemoveRunner forces the removal of a self-hosted runner in a repository using the runner id. -// -// GitHub API docs: https://developer.github.com/v3/actions/self_hosted_runners/#remove-a-self-hosted-runner -func (s *ActionsService) RemoveRunner(ctx context.Context, owner, repo string, runnerID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runners/%v", owner, repo, runnerID) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/actions_secrets.go b/vendor/github.com/google/go-github/v30/github/actions_secrets.go deleted file mode 100644 index 1640b5a0..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions_secrets.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2020 The go-github 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 github - -import ( - "context" - "fmt" -) - -// PublicKey represents the public key that should be used to encrypt secrets. -type PublicKey struct { - KeyID *string `json:"key_id"` - Key *string `json:"key"` -} - -// GetPublicKey gets a public key that should be used for secret encryption. -// -// GitHub API docs: https://developer.github.com/v3/actions/secrets/#get-your-public-key -func (s *ActionsService) GetPublicKey(ctx context.Context, owner, repo string) (*PublicKey, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/secrets/public-key", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - pubKey := new(PublicKey) - resp, err := s.client.Do(ctx, req, pubKey) - if err != nil { - return nil, resp, err - } - - return pubKey, resp, nil -} - -// Secret represents a repository action secret. -type Secret struct { - Name string `json:"name"` - CreatedAt Timestamp `json:"created_at"` - UpdatedAt Timestamp `json:"updated_at"` -} - -// Secrets represents one item from the ListSecrets response. -type Secrets struct { - TotalCount int `json:"total_count"` - Secrets []*Secret `json:"secrets"` -} - -// ListSecrets lists all secrets available in a repository -// without revealing their encrypted values. -// -// GitHub API docs: https://developer.github.com/v3/actions/secrets/#list-secrets-for-a-repository -func (s *ActionsService) ListSecrets(ctx context.Context, owner, repo string, opts *ListOptions) (*Secrets, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/actions/secrets", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - secrets := new(Secrets) - resp, err := s.client.Do(ctx, req, &secrets) - if err != nil { - return nil, resp, err - } - - return secrets, resp, nil -} - -// GetSecret gets a single secret without revealing its encrypted value. -// -// GitHub API docs: https://developer.github.com/v3/actions/secrets/#get-a-secret -func (s *ActionsService) GetSecret(ctx context.Context, owner, repo, name string) (*Secret, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/secrets/%v", owner, repo, name) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - secret := new(Secret) - resp, err := s.client.Do(ctx, req, secret) - if err != nil { - return nil, resp, err - } - - return secret, resp, nil -} - -// EncryptedSecret represents a secret that is encrypted using a public key. -// -// The value of EncryptedValue must be your secret, encrypted with -// LibSodium (see documentation here: https://libsodium.gitbook.io/doc/bindings_for_other_languages) -// using the public key retrieved using the GetPublicKey method. -type EncryptedSecret struct { - Name string `json:"-"` - KeyID string `json:"key_id"` - EncryptedValue string `json:"encrypted_value"` -} - -// CreateOrUpdateSecret creates or updates a secret with an encrypted value. -// -// GitHub API docs: https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository -func (s *ActionsService) CreateOrUpdateSecret(ctx context.Context, owner, repo string, eSecret *EncryptedSecret) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/secrets/%v", owner, repo, eSecret.Name) - - req, err := s.client.NewRequest("PUT", u, eSecret) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// DeleteSecret deletes a secret in a repository using the secret name. -// -// GitHub API docs: https://developer.github.com/v3/actions/secrets/#delete-a-secret-from-a-repository -func (s *ActionsService) DeleteSecret(ctx context.Context, owner, repo, name string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/secrets/%v", owner, repo, name) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/actions_workflow_jobs.go b/vendor/github.com/google/go-github/v30/github/actions_workflow_jobs.go deleted file mode 100644 index 8cb7c6aa..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions_workflow_jobs.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2020 The go-github 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 github - -import ( - "context" - "fmt" - "net/http" - "net/url" -) - -// TaskStep represents a single task step from a sequence of tasks of a job. -type TaskStep struct { - Name *string `json:"name,omitempty"` - Status *string `json:"status,omitempty"` - Conclusion *string `json:"conclusion,omitempty"` - Number *int64 `json:"number,omitempty"` - StartedAt *Timestamp `json:"started_at,omitempty"` - CompletedAt *Timestamp `json:"completed_at,omitempty"` -} - -// WorkflowJob represents a repository action workflow job. -type WorkflowJob struct { - ID *int64 `json:"id,omitempty"` - RunID *int64 `json:"run_id,omitempty"` - RunURL *string `json:"run_url,omitempty"` - NodeID *string `json:"node_id,omitempty"` - HeadSHA *string `json:"head_sha,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Status *string `json:"status,omitempty"` - Conclusion *string `json:"conclusion,omitempty"` - StartedAt *Timestamp `json:"started_at,omitempty"` - CompletedAt *Timestamp `json:"completed_at,omitempty"` - Name *string `json:"name,omitempty"` - Steps []*TaskStep `json:"steps,omitempty"` - CheckRunURL *string `json:"check_run_url,omitempty"` -} - -// Jobs represents a slice of repository action workflow job. -type Jobs struct { - TotalCount *int `json:"total_count,omitempty"` - Jobs []*WorkflowJob `json:"jobs,omitempty"` -} - -// ListWorkflowJobsOptions specifies optional parameters to ListWorkflowJobs. -type ListWorkflowJobsOptions struct { - // Filter specifies how jobs should be filtered by their completed_at timestamp. - // Possible values are: - // latest - Returns jobs from the most recent execution of the workflow run - // all - Returns all jobs for a workflow run, including from old executions of the workflow run - // - // Default value is "latest". - Filter string `url:"filter,omitempty"` - ListOptions -} - -// ListWorkflowJobs lists all jobs for a workflow run. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_jobs/#list-jobs-for-a-workflow-run -func (s *ActionsService) ListWorkflowJobs(ctx context.Context, owner, repo string, runID int64, opts *ListWorkflowJobsOptions) (*Jobs, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/actions/runs/%v/jobs", owner, repo, runID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - jobs := new(Jobs) - resp, err := s.client.Do(ctx, req, &jobs) - if err != nil { - return nil, resp, err - } - - return jobs, resp, nil -} - -// GetWorkflowJobByID gets a specific job in a workflow run by ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_jobs/#list-jobs-for-a-workflow-run -func (s *ActionsService) GetWorkflowJobByID(ctx context.Context, owner, repo string, jobID int64) (*WorkflowJob, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/jobs/%v", owner, repo, jobID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - job := new(WorkflowJob) - resp, err := s.client.Do(ctx, req, job) - if err != nil { - return nil, resp, err - } - - return job, resp, nil -} - -// GetWorkflowJobLogs gets a redirect URL to download a plain text file of logs for a workflow job. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_jobs/#list-workflow-job-logs -func (s *ActionsService) GetWorkflowJobLogs(ctx context.Context, owner, repo string, jobID int64, followRedirects bool) (*url.URL, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/jobs/%v/logs", owner, repo, jobID) - - resp, err := s.getWorkflowLogsFromURL(ctx, u, followRedirects) - if err != nil { - return nil, nil, err - } - - if resp.StatusCode != http.StatusFound { - return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status) - } - parsedURL, err := url.Parse(resp.Header.Get("Location")) - return parsedURL, newResponse(resp), err -} - -func (s *ActionsService) getWorkflowLogsFromURL(ctx context.Context, u string, followRedirects bool) (*http.Response, error) { - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, err - } - - var resp *http.Response - // Use http.DefaultTransport if no custom Transport is configured - req = withContext(ctx, req) - if s.client.client.Transport == nil { - resp, err = http.DefaultTransport.RoundTrip(req) - } else { - resp, err = s.client.client.Transport.RoundTrip(req) - } - if err != nil { - return nil, err - } - resp.Body.Close() - - // If redirect response is returned, follow it - if followRedirects && resp.StatusCode == http.StatusMovedPermanently { - u = resp.Header.Get("Location") - resp, err = s.getWorkflowLogsFromURL(ctx, u, false) - } - return resp, err - -} diff --git a/vendor/github.com/google/go-github/v30/github/actions_workflow_runs.go b/vendor/github.com/google/go-github/v30/github/actions_workflow_runs.go deleted file mode 100644 index b365bb1c..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions_workflow_runs.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright 2020 The go-github 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 github - -import ( - "context" - "fmt" - "net/http" - "net/url" -) - -// WorkflowRun represents a repository action workflow run. -type WorkflowRun struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - HeadBranch *string `json:"head_branch,omitempty"` - HeadSHA *string `json:"head_sha,omitempty"` - RunNumber *int `json:"run_number,omitempty"` - Event *string `json:"event,omitempty"` - Status *string `json:"status,omitempty"` - Conclusion *string `json:"conclusion,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - PullRequests []*PullRequest `json:"pull_requests,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - JobsURL *string `json:"jobs_url,omitempty"` - LogsURL *string `json:"logs_url,omitempty"` - CheckSuiteURL *string `json:"check_suite_url,omitempty"` - ArtifactsURL *string `json:"artifacts_url,omitempty"` - CancelURL *string `json:"cancel_url,omitempty"` - RerunURL *string `json:"rerun_url,omitempty"` - HeadCommit *HeadCommit `json:"head_commit,omitempty"` - WorkflowURL *string `json:"workflow_url,omitempty"` - Repository *Repository `json:"repository,omitempty"` - HeadRepository *Repository `json:"head_repository,omitempty"` -} - -// WorkflowRuns represents a slice of repository action workflow run. -type WorkflowRuns struct { - TotalCount *int `json:"total_count,omitempty"` - WorkflowRuns []*WorkflowRun `json:"workflow_runs,omitempty"` -} - -// ListWorkflowRunsOptions specifies optional parameters to ListWorkflowRuns. -type ListWorkflowRunsOptions struct { - Actor string `url:"actor,omitempty"` - Branch string `url:"branch,omitempty"` - Event string `url:"event,omitempty"` - Status string `url:"status,omitempty"` - ListOptions -} - -func (s *ActionsService) listWorkflowRuns(ctx context.Context, endpoint string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) { - u, err := addOptions(endpoint, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - runs := new(WorkflowRuns) - resp, err := s.client.Do(ctx, req, &runs) - if err != nil { - return nil, resp, err - } - - return runs, resp, nil -} - -// ListWorkflowRunsByID lists all workflow runs by workflow ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#list-workflow-runs -func (s *ActionsService) ListWorkflowRunsByID(ctx context.Context, owner, repo string, workflowID int64, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/actions/workflows/%v/runs", owner, repo, workflowID) - return s.listWorkflowRuns(ctx, u, opts) -} - -// ListWorkflowRunsByFileName lists all workflow runs by workflow file name. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#list-workflow-runs -func (s *ActionsService) ListWorkflowRunsByFileName(ctx context.Context, owner, repo, workflowFileName string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/actions/workflows/%v/runs", owner, repo, workflowFileName) - return s.listWorkflowRuns(ctx, u, opts) -} - -// ListRepositoryWorkflowRuns lists all workflow runs for a repository. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#list-repository-workflow-runs -func (s *ActionsService) ListRepositoryWorkflowRuns(ctx context.Context, owner, repo string, opts *ListOptions) (*WorkflowRuns, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/actions/runs", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - runs := new(WorkflowRuns) - resp, err := s.client.Do(ctx, req, &runs) - if err != nil { - return nil, resp, err - } - - return runs, resp, nil -} - -// GetWorkflowRunByID gets a specific workflow run by ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#get-a-workflow-run -func (s *ActionsService) GetWorkflowRunByID(ctx context.Context, owner, repo string, runID int64) (*WorkflowRun, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runs/%v", owner, repo, runID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - run := new(WorkflowRun) - resp, err := s.client.Do(ctx, req, run) - if err != nil { - return nil, resp, err - } - - return run, resp, nil -} - -// RerunWorkflow re-runs a workflow by ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#re-run-a-workflow -func (s *ActionsService) RerunWorkflowByID(ctx context.Context, owner, repo string, runID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/rerun", owner, repo, runID) - - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// CancelWorkflowRunByID cancels a workflow run by ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#cancel-a-workflow-run -func (s *ActionsService) CancelWorkflowRunByID(ctx context.Context, owner, repo string, runID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/cancel", owner, repo, runID) - - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// GetWorkflowRunLogs gets a redirect URL to download a plain text file of logs for a workflow run. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#list-workflow-run-logs -func (s *ActionsService) GetWorkflowRunLogs(ctx context.Context, owner, repo string, runID int64, followRedirects bool) (*url.URL, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/runs/%v/logs", owner, repo, runID) - - resp, err := s.getWorkflowLogsFromURL(ctx, u, followRedirects) - if err != nil { - return nil, nil, err - } - - if resp.StatusCode != http.StatusFound { - return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status) - } - parsedURL, err := url.Parse(resp.Header.Get("Location")) - return parsedURL, newResponse(resp), err -} diff --git a/vendor/github.com/google/go-github/v30/github/actions_workflows.go b/vendor/github.com/google/go-github/v30/github/actions_workflows.go deleted file mode 100644 index 9743f507..00000000 --- a/vendor/github.com/google/go-github/v30/github/actions_workflows.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2020 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Workflow represents a repository action workflow. -type Workflow struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - State *string `json:"state,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - BadgeURL *string `json:"badge_url,omitempty"` -} - -// Workflows represents a slice of repository action workflows. -type Workflows struct { - TotalCount *int `json:"total_count,omitempty"` - Workflows []*Workflow `json:"workflows,omitempty"` -} - -// ListWorkflows lists all workflows in a repository. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflows/#list-repository-workflows -func (s *ActionsService) ListWorkflows(ctx context.Context, owner, repo string, opts *ListOptions) (*Workflows, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/actions/workflows", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - workflows := new(Workflows) - resp, err := s.client.Do(ctx, req, &workflows) - if err != nil { - return nil, resp, err - } - - return workflows, resp, nil -} - -// GetWorkflowByID gets a specific workflow by ID. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflows/#get-a-workflow -func (s *ActionsService) GetWorkflowByID(ctx context.Context, owner, repo string, workflowID int64) (*Workflow, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/workflows/%v", owner, repo, workflowID) - - return s.getWorkflow(ctx, u) -} - -// GetWorkflowByFileName gets a specific workflow by file name. -// -// GitHub API docs: https://developer.github.com/v3/actions/workflows/#get-a-workflow -func (s *ActionsService) GetWorkflowByFileName(ctx context.Context, owner, repo, workflowFileName string) (*Workflow, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/actions/workflows/%v", owner, repo, workflowFileName) - - return s.getWorkflow(ctx, u) -} - -func (s *ActionsService) getWorkflow(ctx context.Context, url string) (*Workflow, *Response, error) { - req, err := s.client.NewRequest("GET", url, nil) - if err != nil { - return nil, nil, err - } - - workflow := new(Workflow) - resp, err := s.client.Do(ctx, req, workflow) - if err != nil { - return nil, resp, err - } - - return workflow, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/activity.go b/vendor/github.com/google/go-github/v30/github/activity.go deleted file mode 100644 index f6336fcc..00000000 --- a/vendor/github.com/google/go-github/v30/github/activity.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import "context" - -// ActivityService handles communication with the activity related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/activity/ -type ActivityService service - -// FeedLink represents a link to a related resource. -type FeedLink struct { - HRef *string `json:"href,omitempty"` - Type *string `json:"type,omitempty"` -} - -// Feeds represents timeline resources in Atom format. -type Feeds struct { - TimelineURL *string `json:"timeline_url,omitempty"` - UserURL *string `json:"user_url,omitempty"` - CurrentUserPublicURL *string `json:"current_user_public_url,omitempty"` - CurrentUserURL *string `json:"current_user_url,omitempty"` - CurrentUserActorURL *string `json:"current_user_actor_url,omitempty"` - CurrentUserOrganizationURL *string `json:"current_user_organization_url,omitempty"` - CurrentUserOrganizationURLs []string `json:"current_user_organization_urls,omitempty"` - Links *struct { - Timeline *FeedLink `json:"timeline,omitempty"` - User *FeedLink `json:"user,omitempty"` - CurrentUserPublic *FeedLink `json:"current_user_public,omitempty"` - CurrentUser *FeedLink `json:"current_user,omitempty"` - CurrentUserActor *FeedLink `json:"current_user_actor,omitempty"` - CurrentUserOrganization *FeedLink `json:"current_user_organization,omitempty"` - CurrentUserOrganizations []*FeedLink `json:"current_user_organizations,omitempty"` - } `json:"_links,omitempty"` -} - -// ListFeeds lists all the feeds available to the authenticated user. -// -// GitHub provides several timeline resources in Atom format: -// Timeline: The GitHub global public timeline -// User: The public timeline for any user, using URI template -// Current user public: The public timeline for the authenticated user -// Current user: The private timeline for the authenticated user -// Current user actor: The private timeline for activity created by the -// authenticated user -// Current user organizations: The private timeline for the organizations -// the authenticated user is a member of. -// -// Note: Private feeds are only returned when authenticating via Basic Auth -// since current feed URIs use the older, non revocable auth tokens. -func (s *ActivityService) ListFeeds(ctx context.Context) (*Feeds, *Response, error) { - req, err := s.client.NewRequest("GET", "feeds", nil) - if err != nil { - return nil, nil, err - } - - f := &Feeds{} - resp, err := s.client.Do(ctx, req, f) - if err != nil { - return nil, resp, err - } - - return f, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/activity_events.go b/vendor/github.com/google/go-github/v30/github/activity_events.go deleted file mode 100644 index 115bcc97..00000000 --- a/vendor/github.com/google/go-github/v30/github/activity_events.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListEvents drinks from the firehose of all public events across GitHub. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events -func (s *ActivityService) ListEvents(ctx context.Context, opts *ListOptions) ([]*Event, *Response, error) { - u, err := addOptions("events", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListRepositoryEvents lists events for a repository. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-repository-events -func (s *ActivityService) ListRepositoryEvents(ctx context.Context, owner, repo string, opts *ListOptions) ([]*Event, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/events", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListIssueEventsForRepository lists issue events for a repository. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository -func (s *ActivityService) ListIssueEventsForRepository(ctx context.Context, owner, repo string, opts *ListOptions) ([]*IssueEvent, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/events", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*IssueEvent - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListEventsForRepoNetwork lists public events for a network of repositories. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories -func (s *ActivityService) ListEventsForRepoNetwork(ctx context.Context, owner, repo string, opts *ListOptions) ([]*Event, *Response, error) { - u := fmt.Sprintf("networks/%v/%v/events", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListEventsForOrganization lists public events for an organization. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization -func (s *ActivityService) ListEventsForOrganization(ctx context.Context, org string, opts *ListOptions) ([]*Event, *Response, error) { - u := fmt.Sprintf("orgs/%v/events", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListEventsPerformedByUser lists the events performed by a user. If publicOnly is -// true, only public events will be returned. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user -func (s *ActivityService) ListEventsPerformedByUser(ctx context.Context, user string, publicOnly bool, opts *ListOptions) ([]*Event, *Response, error) { - var u string - if publicOnly { - u = fmt.Sprintf("users/%v/events/public", user) - } else { - u = fmt.Sprintf("users/%v/events", user) - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListEventsReceivedByUser lists the events received by a user. If publicOnly is -// true, only public events will be returned. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received -func (s *ActivityService) ListEventsReceivedByUser(ctx context.Context, user string, publicOnly bool, opts *ListOptions) ([]*Event, *Response, error) { - var u string - if publicOnly { - u = fmt.Sprintf("users/%v/received_events/public", user) - } else { - u = fmt.Sprintf("users/%v/received_events", user) - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListUserEventsForOrganization provides the user’s organization dashboard. You -// must be authenticated as the user to view this. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization -func (s *ActivityService) ListUserEventsForOrganization(ctx context.Context, org, user string, opts *ListOptions) ([]*Event, *Response, error) { - u := fmt.Sprintf("users/%v/events/orgs/%v", user, org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*Event - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/activity_notifications.go b/vendor/github.com/google/go-github/v30/github/activity_notifications.go deleted file mode 100644 index 983da6f8..00000000 --- a/vendor/github.com/google/go-github/v30/github/activity_notifications.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// Notification identifies a GitHub notification for a user. -type Notification struct { - ID *string `json:"id,omitempty"` - Repository *Repository `json:"repository,omitempty"` - Subject *NotificationSubject `json:"subject,omitempty"` - - // Reason identifies the event that triggered the notification. - // - // GitHub API docs: https://developer.github.com/v3/activity/notifications/#notification-reasons - Reason *string `json:"reason,omitempty"` - - Unread *bool `json:"unread,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - LastReadAt *time.Time `json:"last_read_at,omitempty"` - URL *string `json:"url,omitempty"` -} - -// NotificationSubject identifies the subject of a notification. -type NotificationSubject struct { - Title *string `json:"title,omitempty"` - URL *string `json:"url,omitempty"` - LatestCommentURL *string `json:"latest_comment_url,omitempty"` - Type *string `json:"type,omitempty"` -} - -// NotificationListOptions specifies the optional parameters to the -// ActivityService.ListNotifications method. -type NotificationListOptions struct { - All bool `url:"all,omitempty"` - Participating bool `url:"participating,omitempty"` - Since time.Time `url:"since,omitempty"` - Before time.Time `url:"before,omitempty"` - - ListOptions -} - -// ListNotifications lists all notifications for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#list-your-notifications -func (s *ActivityService) ListNotifications(ctx context.Context, opts *NotificationListOptions) ([]*Notification, *Response, error) { - u := fmt.Sprintf("notifications") - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var notifications []*Notification - resp, err := s.client.Do(ctx, req, ¬ifications) - if err != nil { - return nil, resp, err - } - - return notifications, resp, nil -} - -// ListRepositoryNotifications lists all notifications in a given repository -// for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository -func (s *ActivityService) ListRepositoryNotifications(ctx context.Context, owner, repo string, opts *NotificationListOptions) ([]*Notification, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/notifications", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var notifications []*Notification - resp, err := s.client.Do(ctx, req, ¬ifications) - if err != nil { - return nil, resp, err - } - - return notifications, resp, nil -} - -type markReadOptions struct { - LastReadAt time.Time `json:"last_read_at,omitempty"` -} - -// MarkNotificationsRead marks all notifications up to lastRead as read. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#mark-as-read -func (s *ActivityService) MarkNotificationsRead(ctx context.Context, lastRead time.Time) (*Response, error) { - opts := &markReadOptions{ - LastReadAt: lastRead, - } - req, err := s.client.NewRequest("PUT", "notifications", opts) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// MarkRepositoryNotificationsRead marks all notifications up to lastRead in -// the specified repository as read. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository -func (s *ActivityService) MarkRepositoryNotificationsRead(ctx context.Context, owner, repo string, lastRead time.Time) (*Response, error) { - opts := &markReadOptions{ - LastReadAt: lastRead, - } - u := fmt.Sprintf("repos/%v/%v/notifications", owner, repo) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// GetThread gets the specified notification thread. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#view-a-single-thread -func (s *ActivityService) GetThread(ctx context.Context, id string) (*Notification, *Response, error) { - u := fmt.Sprintf("notifications/threads/%v", id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - notification := new(Notification) - resp, err := s.client.Do(ctx, req, notification) - if err != nil { - return nil, resp, err - } - - return notification, resp, nil -} - -// MarkThreadRead marks the specified thread as read. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read -func (s *ActivityService) MarkThreadRead(ctx context.Context, id string) (*Response, error) { - u := fmt.Sprintf("notifications/threads/%v", id) - - req, err := s.client.NewRequest("PATCH", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// GetThreadSubscription checks to see if the authenticated user is subscribed -// to a thread. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription -func (s *ActivityService) GetThreadSubscription(ctx context.Context, id string) (*Subscription, *Response, error) { - u := fmt.Sprintf("notifications/threads/%v/subscription", id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - sub := new(Subscription) - resp, err := s.client.Do(ctx, req, sub) - if err != nil { - return nil, resp, err - } - - return sub, resp, nil -} - -// SetThreadSubscription sets the subscription for the specified thread for the -// authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription -func (s *ActivityService) SetThreadSubscription(ctx context.Context, id string, subscription *Subscription) (*Subscription, *Response, error) { - u := fmt.Sprintf("notifications/threads/%v/subscription", id) - - req, err := s.client.NewRequest("PUT", u, subscription) - if err != nil { - return nil, nil, err - } - - sub := new(Subscription) - resp, err := s.client.Do(ctx, req, sub) - if err != nil { - return nil, resp, err - } - - return sub, resp, nil -} - -// DeleteThreadSubscription deletes the subscription for the specified thread -// for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription -func (s *ActivityService) DeleteThreadSubscription(ctx context.Context, id string) (*Response, error) { - u := fmt.Sprintf("notifications/threads/%v/subscription", id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/activity_star.go b/vendor/github.com/google/go-github/v30/github/activity_star.go deleted file mode 100644 index 1e9850f9..00000000 --- a/vendor/github.com/google/go-github/v30/github/activity_star.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "strings" -) - -// StarredRepository is returned by ListStarred. -type StarredRepository struct { - StarredAt *Timestamp `json:"starred_at,omitempty"` - Repository *Repository `json:"repo,omitempty"` -} - -// Stargazer represents a user that has starred a repository. -type Stargazer struct { - StarredAt *Timestamp `json:"starred_at,omitempty"` - User *User `json:"user,omitempty"` -} - -// ListStargazers lists people who have starred the specified repo. -// -// GitHub API docs: https://developer.github.com/v3/activity/starring/#list-stargazers -func (s *ActivityService) ListStargazers(ctx context.Context, owner, repo string, opts *ListOptions) ([]*Stargazer, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/stargazers", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeStarringPreview) - - var stargazers []*Stargazer - resp, err := s.client.Do(ctx, req, &stargazers) - if err != nil { - return nil, resp, err - } - - return stargazers, resp, nil -} - -// ActivityListStarredOptions specifies the optional parameters to the -// ActivityService.ListStarred method. -type ActivityListStarredOptions struct { - // How to sort the repository list. Possible values are: created, updated, - // pushed, full_name. Default is "full_name". - Sort string `url:"sort,omitempty"` - - // Direction in which to sort repositories. Possible values are: asc, desc. - // Default is "asc" when sort is "full_name", otherwise default is "desc". - Direction string `url:"direction,omitempty"` - - ListOptions -} - -// ListStarred lists all the repos starred by a user. Passing the empty string -// will list the starred repositories for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred -func (s *ActivityService) ListStarred(ctx context.Context, user string, opts *ActivityListStarredOptions) ([]*StarredRepository, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/starred", user) - } else { - u = "user/starred" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when APIs fully launch - acceptHeaders := []string{mediaTypeStarringPreview, mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var repos []*StarredRepository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// IsStarred checks if a repository is starred by authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository -func (s *ActivityService) IsStarred(ctx context.Context, owner, repo string) (bool, *Response, error) { - u := fmt.Sprintf("user/starred/%v/%v", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - resp, err := s.client.Do(ctx, req, nil) - starred, err := parseBoolResponse(err) - return starred, resp, err -} - -// Star a repository as the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/starring/#star-a-repository -func (s *ActivityService) Star(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("user/starred/%v/%v", owner, repo) - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// Unstar a repository as the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/starring/#unstar-a-repository -func (s *ActivityService) Unstar(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("user/starred/%v/%v", owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/activity_watching.go b/vendor/github.com/google/go-github/v30/github/activity_watching.go deleted file mode 100644 index 608647a6..00000000 --- a/vendor/github.com/google/go-github/v30/github/activity_watching.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Subscription identifies a repository or thread subscription. -type Subscription struct { - Subscribed *bool `json:"subscribed,omitempty"` - Ignored *bool `json:"ignored,omitempty"` - Reason *string `json:"reason,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - URL *string `json:"url,omitempty"` - - // only populated for repository subscriptions - RepositoryURL *string `json:"repository_url,omitempty"` - - // only populated for thread subscriptions - ThreadURL *string `json:"thread_url,omitempty"` -} - -// ListWatchers lists watchers of a particular repo. -// -// GitHub API docs: https://developer.github.com/v3/activity/watching/#list-watchers -func (s *ActivityService) ListWatchers(ctx context.Context, owner, repo string, opts *ListOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/subscribers", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var watchers []*User - resp, err := s.client.Do(ctx, req, &watchers) - if err != nil { - return nil, resp, err - } - - return watchers, resp, nil -} - -// ListWatched lists the repositories the specified user is watching. Passing -// the empty string will fetch watched repos for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/activity/watching/#list-repositories-being-watched -func (s *ActivityService) ListWatched(ctx context.Context, user string, opts *ListOptions) ([]*Repository, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/subscriptions", user) - } else { - u = "user/subscriptions" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var watched []*Repository - resp, err := s.client.Do(ctx, req, &watched) - if err != nil { - return nil, resp, err - } - - return watched, resp, nil -} - -// GetRepositorySubscription returns the subscription for the specified -// repository for the authenticated user. If the authenticated user is not -// watching the repository, a nil Subscription is returned. -// -// GitHub API docs: https://developer.github.com/v3/activity/watching/#get-a-repository-subscription -func (s *ActivityService) GetRepositorySubscription(ctx context.Context, owner, repo string) (*Subscription, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/subscription", owner, repo) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - sub := new(Subscription) - resp, err := s.client.Do(ctx, req, sub) - if err != nil { - // if it's just a 404, don't return that as an error - _, err = parseBoolResponse(err) - return nil, resp, err - } - - return sub, resp, nil -} - -// SetRepositorySubscription sets the subscription for the specified repository -// for the authenticated user. -// -// To watch a repository, set subscription.Subscribed to true. -// To ignore notifications made within a repository, set subscription.Ignored to true. -// To stop watching a repository, use DeleteRepositorySubscription. -// -// GitHub API docs: https://developer.github.com/v3/activity/watching/#set-a-repository-subscription -func (s *ActivityService) SetRepositorySubscription(ctx context.Context, owner, repo string, subscription *Subscription) (*Subscription, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/subscription", owner, repo) - - req, err := s.client.NewRequest("PUT", u, subscription) - if err != nil { - return nil, nil, err - } - - sub := new(Subscription) - resp, err := s.client.Do(ctx, req, sub) - if err != nil { - return nil, resp, err - } - - return sub, resp, nil -} - -// DeleteRepositorySubscription deletes the subscription for the specified -// repository for the authenticated user. -// -// This is used to stop watching a repository. To control whether or not to -// receive notifications from a repository, use SetRepositorySubscription. -// -// GitHub API docs: https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription -func (s *ActivityService) DeleteRepositorySubscription(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("repos/%s/%s/subscription", owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/admin.go b/vendor/github.com/google/go-github/v30/github/admin.go deleted file mode 100644 index 31cd1fa2..00000000 --- a/vendor/github.com/google/go-github/v30/github/admin.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" -) - -// AdminService handles communication with the admin related methods of the -// GitHub API. These API routes are normally only accessible for GitHub -// Enterprise installations. -// -// GitHub API docs: https://developer.github.com/v3/enterprise/ -type AdminService service - -// TeamLDAPMapping represents the mapping between a GitHub team and an LDAP group. -type TeamLDAPMapping struct { - ID *int64 `json:"id,omitempty"` - LDAPDN *string `json:"ldap_dn,omitempty"` - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - Slug *string `json:"slug,omitempty"` - Description *string `json:"description,omitempty"` - Privacy *string `json:"privacy,omitempty"` - Permission *string `json:"permission,omitempty"` - - MembersURL *string `json:"members_url,omitempty"` - RepositoriesURL *string `json:"repositories_url,omitempty"` -} - -func (m TeamLDAPMapping) String() string { - return Stringify(m) -} - -// UserLDAPMapping represents the mapping between a GitHub user and an LDAP user. -type UserLDAPMapping struct { - ID *int64 `json:"id,omitempty"` - LDAPDN *string `json:"ldap_dn,omitempty"` - Login *string `json:"login,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - GravatarID *string `json:"gravatar_id,omitempty"` - Type *string `json:"type,omitempty"` - SiteAdmin *bool `json:"site_admin,omitempty"` - - URL *string `json:"url,omitempty"` - EventsURL *string `json:"events_url,omitempty"` - FollowingURL *string `json:"following_url,omitempty"` - FollowersURL *string `json:"followers_url,omitempty"` - GistsURL *string `json:"gists_url,omitempty"` - OrganizationsURL *string `json:"organizations_url,omitempty"` - ReceivedEventsURL *string `json:"received_events_url,omitempty"` - ReposURL *string `json:"repos_url,omitempty"` - StarredURL *string `json:"starred_url,omitempty"` - SubscriptionsURL *string `json:"subscriptions_url,omitempty"` -} - -func (m UserLDAPMapping) String() string { - return Stringify(m) -} - -// Enterprise represents the GitHub enterprise profile. -type Enterprise struct { - ID *int `json:"id,omitempty"` - Slug *string `json:"slug,omitempty"` - Name *string `json:"name,omitempty"` - NodeID *string `json:"node_id,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - Description *string `json:"description,omitempty"` - WebsiteURL *string `json:"website_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` -} - -func (m Enterprise) String() string { - return Stringify(m) -} - -// UpdateUserLDAPMapping updates the mapping between a GitHub user and an LDAP user. -// -// GitHub API docs: https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user -func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error) { - u := fmt.Sprintf("admin/ldap/users/%v/mapping", user) - req, err := s.client.NewRequest("PATCH", u, mapping) - if err != nil { - return nil, nil, err - } - - m := new(UserLDAPMapping) - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group. -// -// GitHub API docs: https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team -func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { - u := fmt.Sprintf("admin/ldap/teams/%v/mapping", team) - req, err := s.client.NewRequest("PATCH", u, mapping) - if err != nil { - return nil, nil, err - } - - m := new(TeamLDAPMapping) - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/admin_orgs.go b/vendor/github.com/google/go-github/v30/github/admin_orgs.go deleted file mode 100644 index f0638310..00000000 --- a/vendor/github.com/google/go-github/v30/github/admin_orgs.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2019 The go-github 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 github - -import "context" - -// createOrgRequest is a subset of Organization and is used internally -// by CreateOrg to pass only the known fields for the endpoint. -type createOrgRequest struct { - Login *string `json:"login,omitempty"` - Admin *string `json:"admin,omitempty"` -} - -// CreateOrg creates a new organization in GitHub Enterprise. -// -// Note that only a subset of the org fields are used and org must -// not be nil. -// -// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/orgs/#create-an-organization -func (s *AdminService) CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error) { - u := "admin/organizations" - - orgReq := &createOrgRequest{ - Login: org.Login, - Admin: &admin, - } - - req, err := s.client.NewRequest("POST", u, orgReq) - if err != nil { - return nil, nil, err - } - - o := new(Organization) - resp, err := s.client.Do(ctx, req, o) - if err != nil { - return nil, resp, err - } - - return o, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/admin_stats.go b/vendor/github.com/google/go-github/v30/github/admin_stats.go deleted file mode 100644 index dabefde3..00000000 --- a/vendor/github.com/google/go-github/v30/github/admin_stats.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// AdminStats represents a variety of stats of a GitHub Enterprise -// installation. -type AdminStats struct { - Issues *IssueStats `json:"issues,omitempty"` - Hooks *HookStats `json:"hooks,omitempty"` - Milestones *MilestoneStats `json:"milestones,omitempty"` - Orgs *OrgStats `json:"orgs,omitempty"` - Comments *CommentStats `json:"comments,omitempty"` - Pages *PageStats `json:"pages,omitempty"` - Users *UserStats `json:"users,omitempty"` - Gists *GistStats `json:"gists,omitempty"` - Pulls *PullStats `json:"pulls,omitempty"` - Repos *RepoStats `json:"repos,omitempty"` -} - -func (s AdminStats) String() string { - return Stringify(s) -} - -// IssueStats represents the number of total, open and closed issues. -type IssueStats struct { - TotalIssues *int `json:"total_issues,omitempty"` - OpenIssues *int `json:"open_issues,omitempty"` - ClosedIssues *int `json:"closed_issues,omitempty"` -} - -func (s IssueStats) String() string { - return Stringify(s) -} - -// HookStats represents the number of total, active and inactive hooks. -type HookStats struct { - TotalHooks *int `json:"total_hooks,omitempty"` - ActiveHooks *int `json:"active_hooks,omitempty"` - InactiveHooks *int `json:"inactive_hooks,omitempty"` -} - -func (s HookStats) String() string { - return Stringify(s) -} - -// MilestoneStats represents the number of total, open and close milestones. -type MilestoneStats struct { - TotalMilestones *int `json:"total_milestones,omitempty"` - OpenMilestones *int `json:"open_milestones,omitempty"` - ClosedMilestones *int `json:"closed_milestones,omitempty"` -} - -func (s MilestoneStats) String() string { - return Stringify(s) -} - -// OrgStats represents the number of total, disabled organizations and the team -// and team member count. -type OrgStats struct { - TotalOrgs *int `json:"total_orgs,omitempty"` - DisabledOrgs *int `json:"disabled_orgs,omitempty"` - TotalTeams *int `json:"total_teams,omitempty"` - TotalTeamMembers *int `json:"total_team_members,omitempty"` -} - -func (s OrgStats) String() string { - return Stringify(s) -} - -// CommentStats represents the number of total comments on commits, gists, issues -// and pull requests. -type CommentStats struct { - TotalCommitComments *int `json:"total_commit_comments,omitempty"` - TotalGistComments *int `json:"total_gist_comments,omitempty"` - TotalIssueComments *int `json:"total_issue_comments,omitempty"` - TotalPullRequestComments *int `json:"total_pull_request_comments,omitempty"` -} - -func (s CommentStats) String() string { - return Stringify(s) -} - -// PageStats represents the total number of github pages. -type PageStats struct { - TotalPages *int `json:"total_pages,omitempty"` -} - -func (s PageStats) String() string { - return Stringify(s) -} - -// UserStats represents the number of total, admin and suspended users. -type UserStats struct { - TotalUsers *int `json:"total_users,omitempty"` - AdminUsers *int `json:"admin_users,omitempty"` - SuspendedUsers *int `json:"suspended_users,omitempty"` -} - -func (s UserStats) String() string { - return Stringify(s) -} - -// GistStats represents the number of total, private and public gists. -type GistStats struct { - TotalGists *int `json:"total_gists,omitempty"` - PrivateGists *int `json:"private_gists,omitempty"` - PublicGists *int `json:"public_gists,omitempty"` -} - -func (s GistStats) String() string { - return Stringify(s) -} - -// PullStats represents the number of total, merged, mergable and unmergeable -// pull-requests. -type PullStats struct { - TotalPulls *int `json:"total_pulls,omitempty"` - MergedPulls *int `json:"merged_pulls,omitempty"` - MergablePulls *int `json:"mergeable_pulls,omitempty"` - UnmergablePulls *int `json:"unmergeable_pulls,omitempty"` -} - -func (s PullStats) String() string { - return Stringify(s) -} - -// RepoStats represents the number of total, root, fork, organization repositories -// together with the total number of pushes and wikis. -type RepoStats struct { - TotalRepos *int `json:"total_repos,omitempty"` - RootRepos *int `json:"root_repos,omitempty"` - ForkRepos *int `json:"fork_repos,omitempty"` - OrgRepos *int `json:"org_repos,omitempty"` - TotalPushes *int `json:"total_pushes,omitempty"` - TotalWikis *int `json:"total_wikis,omitempty"` -} - -func (s RepoStats) String() string { - return Stringify(s) -} - -// GetAdminStats returns a variety of metrics about a GitHub Enterprise -// installation. -// -// Please note that this is only available to site administrators, -// otherwise it will error with a 404 not found (instead of 401 or 403). -// -// GitHub API docs: https://developer.github.com/v3/enterprise-admin/admin_stats/ -func (s *AdminService) GetAdminStats(ctx context.Context) (*AdminStats, *Response, error) { - u := fmt.Sprintf("enterprise/stats/all") - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - m := new(AdminStats) - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/admin_users.go b/vendor/github.com/google/go-github/v30/github/admin_users.go deleted file mode 100644 index d756a77e..00000000 --- a/vendor/github.com/google/go-github/v30/github/admin_users.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2019 The go-github 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 github - -import ( - "context" - "fmt" -) - -// createUserRequest is a subset of User and is used internally -// by CreateUser to pass only the known fields for the endpoint. -type createUserRequest struct { - Login *string `json:"login,omitempty"` - Email *string `json:"email,omitempty"` -} - -// CreateUser creates a new user in GitHub Enterprise. -// -// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#create-a-new-user -func (s *AdminService) CreateUser(ctx context.Context, login, email string) (*User, *Response, error) { - u := "admin/users" - - userReq := &createUserRequest{ - Login: &login, - Email: &email, - } - - req, err := s.client.NewRequest("POST", u, userReq) - if err != nil { - return nil, nil, err - } - - var user User - resp, err := s.client.Do(ctx, req, &user) - if err != nil { - return nil, resp, err - } - - return &user, resp, nil -} - -// DeleteUser deletes a user in GitHub Enterprise. -// -// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-a-user -func (s *AdminService) DeleteUser(ctx context.Context, username string) (*Response, error) { - u := "admin/users/" + username - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - if err != nil { - return resp, err - } - - return resp, nil -} - -// ImpersonateUserOptions represents the scoping for the OAuth token. -type ImpersonateUserOptions struct { - Scopes []string `json:"scopes,omitempty"` -} - -// OAuthAPP represents the GitHub Site Administrator OAuth app. -type OAuthAPP struct { - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - ClientID *string `json:"client_id,omitempty"` -} - -func (s OAuthAPP) String() string { - return Stringify(s) -} - -// UserAuthorization represents the impersonation response. -type UserAuthorization struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Scopes []string `json:"scopes,omitempty"` - Token *string `json:"token,omitempty"` - TokenLastEight *string `json:"token_last_eight,omitempty"` - HashedToken *string `json:"hashed_token,omitempty"` - App *OAuthAPP `json:"app,omitempty"` - Note *string `json:"note,omitempty"` - NoteURL *string `json:"note_url,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - Fingerprint *string `json:"fingerprint,omitempty"` -} - -// CreateUserImpersonation creates an impersonation OAuth token. -// -// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#create-an-impersonation-oauth-token -func (s *AdminService) CreateUserImpersonation(ctx context.Context, username string, opts *ImpersonateUserOptions) (*UserAuthorization, *Response, error) { - u := fmt.Sprintf("admin/users/%s/authorizations", username) - - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - a := new(UserAuthorization) - resp, err := s.client.Do(ctx, req, a) - if err != nil { - return nil, resp, err - } - - return a, resp, nil -} - -// DeleteUserImpersonation deletes an impersonation OAuth token. -// -// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-an-impersonation-oauth-token -func (s *AdminService) DeleteUserImpersonation(ctx context.Context, username string) (*Response, error) { - u := fmt.Sprintf("admin/users/%s/authorizations", username) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - if err != nil { - return resp, err - } - - return resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/apps.go b/vendor/github.com/google/go-github/v30/github/apps.go deleted file mode 100644 index 75d9177f..00000000 --- a/vendor/github.com/google/go-github/v30/github/apps.go +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// AppsService provides access to the installation related functions -// in the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/apps/ -type AppsService service - -// App represents a GitHub App. -type App struct { - ID *int64 `json:"id,omitempty"` - Slug *string `json:"slug,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Owner *User `json:"owner,omitempty"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - ExternalURL *string `json:"external_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Permissions *InstallationPermissions `json:"permissions,omitempty"` - Events []string `json:"events,omitempty"` -} - -// InstallationToken represents an installation token. -type InstallationToken struct { - Token *string `json:"token,omitempty"` - ExpiresAt *time.Time `json:"expires_at,omitempty"` - Permissions *InstallationPermissions `json:"permissions,omitempty"` - Repositories []*Repository `json:"repositories,omitempty"` -} - -// InstallationTokenOptions allow restricting a token's access to specific repositories. -type InstallationTokenOptions struct { - // The IDs of the repositories that the installation token can access. - // Providing repository IDs restricts the access of an installation token to specific repositories. - RepositoryIDs []int64 `json:"repository_ids,omitempty"` - - // The permissions granted to the access token. - // The permissions object includes the permission names and their access type. - Permissions *InstallationPermissions `json:"permissions,omitempty"` -} - -// InstallationPermissions lists the repository and organization permissions for an installation. -// -// Permission names taken from: -// https://developer.github.com/v3/apps/permissions/ -// https://developer.github.com/enterprise/v3/apps/permissions/ -type InstallationPermissions struct { - Administration *string `json:"administration,omitempty"` - Blocking *string `json:"blocking,omitempty"` - Checks *string `json:"checks,omitempty"` - Contents *string `json:"contents,omitempty"` - ContentReferences *string `json:"content_references,omitempty"` - Deployments *string `json:"deployments,omitempty"` - Emails *string `json:"emails,omitempty"` - Followers *string `json:"followers,omitempty"` - Issues *string `json:"issues,omitempty"` - Metadata *string `json:"metadata,omitempty"` - Members *string `json:"members,omitempty"` - OrganizationAdministration *string `json:"organization_administration,omitempty"` - OrganizationHooks *string `json:"organization_hooks,omitempty"` - OrganizationPlan *string `json:"organization_plan,omitempty"` - OrganizationPreReceiveHooks *string `json:"organization_pre_receive_hooks,omitempty"` - OrganizationProjects *string `json:"organization_projects,omitempty"` - OrganizationUserBlocking *string `json:"organization_user_blocking,omitempty"` - Packages *string `json:"packages,omitempty"` - Pages *string `json:"pages,omitempty"` - PullRequests *string `json:"pull_requests,omitempty"` - RepositoryHooks *string `json:"repository_hooks,omitempty"` - RepositoryProjects *string `json:"repository_projects,omitempty"` - RepositoryPreReceiveHooks *string `json:"repository_pre_receive_hooks,omitempty"` - SingleFile *string `json:"single_file,omitempty"` - Statuses *string `json:"statuses,omitempty"` - TeamDiscussions *string `json:"team_discussions,omitempty"` - VulnerabilityAlerts *string `json:"vulnerability_alerts,omitempty"` -} - -// Installation represents a GitHub Apps installation. -type Installation struct { - ID *int64 `json:"id,omitempty"` - AppID *int64 `json:"app_id,omitempty"` - TargetID *int64 `json:"target_id,omitempty"` - Account *User `json:"account,omitempty"` - AccessTokensURL *string `json:"access_tokens_url,omitempty"` - RepositoriesURL *string `json:"repositories_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - TargetType *string `json:"target_type,omitempty"` - SingleFileName *string `json:"single_file_name,omitempty"` - RepositorySelection *string `json:"repository_selection,omitempty"` - Events []string `json:"events,omitempty"` - Permissions *InstallationPermissions `json:"permissions,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` -} - -// Attachment represents a GitHub Apps attachment. -type Attachment struct { - ID *int64 `json:"id,omitempty"` - Title *string `json:"title,omitempty"` - Body *string `json:"body,omitempty"` -} - -func (i Installation) String() string { - return Stringify(i) -} - -// Get a single GitHub App. Passing the empty string will get -// the authenticated GitHub App. -// -// Note: appSlug is just the URL-friendly name of your GitHub App. -// You can find this on the settings page for your GitHub App -// (e.g., https://github.com/settings/apps/:app_slug). -// -// GitHub API docs: https://developer.github.com/v3/apps/#get-a-single-github-app -func (s *AppsService) Get(ctx context.Context, appSlug string) (*App, *Response, error) { - var u string - if appSlug != "" { - u = fmt.Sprintf("apps/%v", appSlug) - } else { - u = "app" - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - app := new(App) - resp, err := s.client.Do(ctx, req, app) - if err != nil { - return nil, resp, err - } - - return app, resp, nil -} - -// ListInstallations lists the installations that the current GitHub App has. -// -// GitHub API docs: https://developer.github.com/v3/apps/#list-installations -func (s *AppsService) ListInstallations(ctx context.Context, opts *ListOptions) ([]*Installation, *Response, error) { - u, err := addOptions("app/installations", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - var i []*Installation - resp, err := s.client.Do(ctx, req, &i) - if err != nil { - return nil, resp, err - } - - return i, resp, nil -} - -// GetInstallation returns the specified installation. -// -// GitHub API docs: https://developer.github.com/v3/apps/#get-a-single-installation -func (s *AppsService) GetInstallation(ctx context.Context, id int64) (*Installation, *Response, error) { - return s.getInstallation(ctx, fmt.Sprintf("app/installations/%v", id)) -} - -// ListUserInstallations lists installations that are accessible to the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/apps/#list-installations-for-user -func (s *AppsService) ListUserInstallations(ctx context.Context, opts *ListOptions) ([]*Installation, *Response, error) { - u, err := addOptions("user/installations", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - var i struct { - Installations []*Installation `json:"installations"` - } - resp, err := s.client.Do(ctx, req, &i) - if err != nil { - return nil, resp, err - } - - return i.Installations, resp, nil -} - -// CreateInstallationToken creates a new installation token. -// -// GitHub API docs: https://developer.github.com/v3/apps/#create-a-new-installation-token -func (s *AppsService) CreateInstallationToken(ctx context.Context, id int64, opts *InstallationTokenOptions) (*InstallationToken, *Response, error) { - u := fmt.Sprintf("app/installations/%v/access_tokens", id) - - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - t := new(InstallationToken) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// CreateAttachment creates a new attachment on user comment containing a url. -// -// GitHub API docs: https://developer.github.com/v3/apps/#create-a-content-attachment -func (s *AppsService) CreateAttachment(ctx context.Context, contentReferenceID int64, title, body string) (*Attachment, *Response, error) { - u := fmt.Sprintf("content_references/%v/attachments", contentReferenceID) - payload := &Attachment{Title: String(title), Body: String(body)} - req, err := s.client.NewRequest("POST", u, payload) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Attachment{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// FindOrganizationInstallation finds the organization's installation information. -// -// GitHub API docs: https://developer.github.com/v3/apps/#get-an-organization-installation -func (s *AppsService) FindOrganizationInstallation(ctx context.Context, org string) (*Installation, *Response, error) { - return s.getInstallation(ctx, fmt.Sprintf("orgs/%v/installation", org)) -} - -// FindRepositoryInstallation finds the repository's installation information. -// -// GitHub API docs: https://developer.github.com/v3/apps/#get-a-repository-installation -func (s *AppsService) FindRepositoryInstallation(ctx context.Context, owner, repo string) (*Installation, *Response, error) { - return s.getInstallation(ctx, fmt.Sprintf("repos/%v/%v/installation", owner, repo)) -} - -// FindRepositoryInstallationByID finds the repository's installation information. -// -// Note: FindRepositoryInstallationByID uses the undocumented GitHub API endpoint /repositories/:id/installation. -func (s *AppsService) FindRepositoryInstallationByID(ctx context.Context, id int64) (*Installation, *Response, error) { - return s.getInstallation(ctx, fmt.Sprintf("repositories/%d/installation", id)) -} - -// FindUserInstallation finds the user's installation information. -// -// GitHub API docs: https://developer.github.com/v3/apps/#get-a-user-installation -func (s *AppsService) FindUserInstallation(ctx context.Context, user string) (*Installation, *Response, error) { - return s.getInstallation(ctx, fmt.Sprintf("users/%v/installation", user)) -} - -func (s *AppsService) getInstallation(ctx context.Context, url string) (*Installation, *Response, error) { - req, err := s.client.NewRequest("GET", url, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - i := new(Installation) - resp, err := s.client.Do(ctx, req, i) - if err != nil { - return nil, resp, err - } - - return i, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/apps_installation.go b/vendor/github.com/google/go-github/v30/github/apps_installation.go deleted file mode 100644 index 59a90c15..00000000 --- a/vendor/github.com/google/go-github/v30/github/apps_installation.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListRepos lists the repositories that are accessible to the authenticated installation. -// -// GitHub API docs: https://developer.github.com/v3/apps/installations/#list-repositories -func (s *AppsService) ListRepos(ctx context.Context, opts *ListOptions) ([]*Repository, *Response, error) { - u, err := addOptions("installation/repositories", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - var r struct { - Repositories []*Repository `json:"repositories"` - } - resp, err := s.client.Do(ctx, req, &r) - if err != nil { - return nil, resp, err - } - - return r.Repositories, resp, nil -} - -// ListUserRepos lists repositories that are accessible -// to the authenticated user for an installation. -// -// GitHub API docs: https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation -func (s *AppsService) ListUserRepos(ctx context.Context, id int64, opts *ListOptions) ([]*Repository, *Response, error) { - u := fmt.Sprintf("user/installations/%v/repositories", id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - var r struct { - Repositories []*Repository `json:"repositories"` - } - resp, err := s.client.Do(ctx, req, &r) - if err != nil { - return nil, resp, err - } - - return r.Repositories, resp, nil -} - -// AddRepository adds a single repository to an installation. -// -// GitHub API docs: https://developer.github.com/v3/apps/installations/#add-repository-to-installation -func (s *AppsService) AddRepository(ctx context.Context, instID, repoID int64) (*Repository, *Response, error) { - u := fmt.Sprintf("user/installations/%v/repositories/%v", instID, repoID) - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, nil, err - } - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - r := new(Repository) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// RemoveRepository removes a single repository from an installation. -// -// GitHub docs: https://developer.github.com/v3/apps/installations/#remove-repository-from-installation -func (s *AppsService) RemoveRepository(ctx context.Context, instID, repoID int64) (*Response, error) { - u := fmt.Sprintf("user/installations/%v/repositories/%v", instID, repoID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - return s.client.Do(ctx, req, nil) -} - -// RevokeInstallationToken revokes an installation token. -// -// GitHub docs: https://developer.github.com/v3/apps/installations/#revoke-an-installation-token -func (s *AppsService) RevokeInstallationToken(ctx context.Context) (*Response, error) { - u := "installation/token" - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - req.Header.Set("Accept", mediaTypeRevokeTokenPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/apps_manifest.go b/vendor/github.com/google/go-github/v30/github/apps_manifest.go deleted file mode 100644 index 8d6ab3c8..00000000 --- a/vendor/github.com/google/go-github/v30/github/apps_manifest.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2019 The go-github 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 github - -import ( - "context" - "fmt" -) - -const ( - mediaTypeAppManifestPreview = "application/vnd.github.fury-preview+json" -) - -// AppConfig describes the configuration of a GitHub App. -type AppConfig struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Owner *User `json:"owner,omitempty"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - ExternalURL *string `json:"external_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - ClientID *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` - WebhookSecret *string `json:"webhook_secret,omitempty"` - PEM *string `json:"pem,omitempty"` -} - -// CompleteAppManifest completes the App manifest handshake flow for the given -// code. -// -// GitHub API docs: https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration -func (s *AppsService) CompleteAppManifest(ctx context.Context, code string) (*AppConfig, *Response, error) { - u := fmt.Sprintf("app-manifests/%s/conversions", code) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - req.Header.Set("Accept", mediaTypeAppManifestPreview) - - cfg := new(AppConfig) - resp, err := s.client.Do(ctx, req, cfg) - if err != nil { - return nil, resp, err - } - - return cfg, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/apps_marketplace.go b/vendor/github.com/google/go-github/v30/github/apps_marketplace.go deleted file mode 100644 index 053d451d..00000000 --- a/vendor/github.com/google/go-github/v30/github/apps_marketplace.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// MarketplaceService handles communication with the marketplace related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/apps/marketplace/ -type MarketplaceService struct { - client *Client - // Stubbed controls whether endpoints that return stubbed data are used - // instead of production endpoints. Stubbed data is fake data that's useful - // for testing your GitHub Apps. Stubbed data is hard-coded and will not - // change based on actual subscriptions. - // - // GitHub API docs: https://developer.github.com/v3/apps/marketplace/ - Stubbed bool -} - -// MarketplacePlan represents a GitHub Apps Marketplace Listing Plan. -type MarketplacePlan struct { - URL *string `json:"url,omitempty"` - AccountsURL *string `json:"accounts_url,omitempty"` - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - MonthlyPriceInCents *int `json:"monthly_price_in_cents,omitempty"` - YearlyPriceInCents *int `json:"yearly_price_in_cents,omitempty"` - // The pricing model for this listing. Can be one of "flat-rate", "per-unit", or "free". - PriceModel *string `json:"price_model,omitempty"` - UnitName *string `json:"unit_name,omitempty"` - Bullets *[]string `json:"bullets,omitempty"` - // State can be one of the values "draft" or "published". - State *string `json:"state,omitempty"` - HasFreeTrial *bool `json:"has_free_trial,omitempty"` -} - -// MarketplacePurchase represents a GitHub Apps Marketplace Purchase. -type MarketplacePurchase struct { - // BillingCycle can be one of the values "yearly", "monthly" or nil. - BillingCycle *string `json:"billing_cycle,omitempty"` - NextBillingDate *Timestamp `json:"next_billing_date,omitempty"` - UnitCount *int `json:"unit_count,omitempty"` - Plan *MarketplacePlan `json:"plan,omitempty"` - Account *MarketplacePlanAccount `json:"account,omitempty"` - OnFreeTrial *bool `json:"on_free_trial,omitempty"` - FreeTrialEndsOn *Timestamp `json:"free_trial_ends_on,omitempty"` -} - -// MarketplacePendingChange represents a pending change to a GitHub Apps Marketplace Plan. -type MarketplacePendingChange struct { - EffectiveDate *Timestamp `json:"effective_date,omitempty"` - UnitCount *int `json:"unit_count,omitempty"` - ID *int64 `json:"id,omitempty"` - Plan *MarketplacePlan `json:"plan,omitempty"` -} - -// MarketplacePlanAccount represents a GitHub Account (user or organization) on a specific plan. -type MarketplacePlanAccount struct { - URL *string `json:"url,omitempty"` - Type *string `json:"type,omitempty"` - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Login *string `json:"login,omitempty"` - Email *string `json:"email,omitempty"` - OrganizationBillingEmail *string `json:"organization_billing_email,omitempty"` - MarketplacePurchase *MarketplacePurchase `json:"marketplace_purchase,omitempty"` - MarketplacePendingChange *MarketplacePendingChange `json:"marketplace_pending_change,omitempty"` -} - -// ListPlans lists all plans for your Marketplace listing. -// -// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing -func (s *MarketplaceService) ListPlans(ctx context.Context, opts *ListOptions) ([]*MarketplacePlan, *Response, error) { - uri := s.marketplaceURI("plans") - u, err := addOptions(uri, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var plans []*MarketplacePlan - resp, err := s.client.Do(ctx, req, &plans) - if err != nil { - return nil, resp, err - } - - return plans, resp, nil -} - -// ListPlanAccountsForPlan lists all GitHub accounts (user or organization) on a specific plan. -// -// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan -func (s *MarketplaceService) ListPlanAccountsForPlan(ctx context.Context, planID int64, opts *ListOptions) ([]*MarketplacePlanAccount, *Response, error) { - uri := s.marketplaceURI(fmt.Sprintf("plans/%v/accounts", planID)) - u, err := addOptions(uri, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var accounts []*MarketplacePlanAccount - resp, err := s.client.Do(ctx, req, &accounts) - if err != nil { - return nil, resp, err - } - - return accounts, resp, nil -} - -// ListPlanAccountsForAccount lists all GitHub accounts (user or organization) associated with an account. -// -// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing -func (s *MarketplaceService) ListPlanAccountsForAccount(ctx context.Context, accountID int64, opts *ListOptions) ([]*MarketplacePlanAccount, *Response, error) { - uri := s.marketplaceURI(fmt.Sprintf("accounts/%v", accountID)) - u, err := addOptions(uri, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var accounts []*MarketplacePlanAccount - resp, err := s.client.Do(ctx, req, &accounts) - if err != nil { - return nil, resp, err - } - - return accounts, resp, nil -} - -// ListMarketplacePurchasesForUser lists all GitHub marketplace purchases made by a user. -// -// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases -func (s *MarketplaceService) ListMarketplacePurchasesForUser(ctx context.Context, opts *ListOptions) ([]*MarketplacePurchase, *Response, error) { - uri := "user/marketplace_purchases" - if s.Stubbed { - uri = "user/marketplace_purchases/stubbed" - } - - u, err := addOptions(uri, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var purchases []*MarketplacePurchase - resp, err := s.client.Do(ctx, req, &purchases) - if err != nil { - return nil, resp, err - } - return purchases, resp, nil -} - -func (s *MarketplaceService) marketplaceURI(endpoint string) string { - url := "marketplace_listing" - if s.Stubbed { - url = "marketplace_listing/stubbed" - } - return url + "/" + endpoint -} diff --git a/vendor/github.com/google/go-github/v30/github/authorizations.go b/vendor/github.com/google/go-github/v30/github/authorizations.go deleted file mode 100644 index 7447e2fb..00000000 --- a/vendor/github.com/google/go-github/v30/github/authorizations.go +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright 2015 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Scope models a GitHub authorization scope. -// -// GitHub API docs: https://developer.github.com/v3/oauth/#scopes -type Scope string - -// This is the set of scopes for GitHub API V3 -const ( - ScopeNone Scope = "(no scope)" // REVISIT: is this actually returned, or just a documentation artifact? - ScopeUser Scope = "user" - ScopeUserEmail Scope = "user:email" - ScopeUserFollow Scope = "user:follow" - ScopePublicRepo Scope = "public_repo" - ScopeRepo Scope = "repo" - ScopeRepoDeployment Scope = "repo_deployment" - ScopeRepoStatus Scope = "repo:status" - ScopeDeleteRepo Scope = "delete_repo" - ScopeNotifications Scope = "notifications" - ScopeGist Scope = "gist" - ScopeReadRepoHook Scope = "read:repo_hook" - ScopeWriteRepoHook Scope = "write:repo_hook" - ScopeAdminRepoHook Scope = "admin:repo_hook" - ScopeAdminOrgHook Scope = "admin:org_hook" - ScopeReadOrg Scope = "read:org" - ScopeWriteOrg Scope = "write:org" - ScopeAdminOrg Scope = "admin:org" - ScopeReadPublicKey Scope = "read:public_key" - ScopeWritePublicKey Scope = "write:public_key" - ScopeAdminPublicKey Scope = "admin:public_key" - ScopeReadGPGKey Scope = "read:gpg_key" - ScopeWriteGPGKey Scope = "write:gpg_key" - ScopeAdminGPGKey Scope = "admin:gpg_key" -) - -// AuthorizationsService handles communication with the authorization related -// methods of the GitHub API. -// -// This service requires HTTP Basic Authentication; it cannot be accessed using -// an OAuth token. -// -// GitHub API docs: https://developer.github.com/v3/oauth_authorizations/ -type AuthorizationsService service - -// Authorization represents an individual GitHub authorization. -type Authorization struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Scopes []Scope `json:"scopes,omitempty"` - Token *string `json:"token,omitempty"` - TokenLastEight *string `json:"token_last_eight,omitempty"` - HashedToken *string `json:"hashed_token,omitempty"` - App *AuthorizationApp `json:"app,omitempty"` - Note *string `json:"note,omitempty"` - NoteURL *string `json:"note_url,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - Fingerprint *string `json:"fingerprint,omitempty"` - - // User is only populated by the Check and Reset methods. - User *User `json:"user,omitempty"` -} - -func (a Authorization) String() string { - return Stringify(a) -} - -// AuthorizationApp represents an individual GitHub app (in the context of authorization). -type AuthorizationApp struct { - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - ClientID *string `json:"client_id,omitempty"` -} - -func (a AuthorizationApp) String() string { - return Stringify(a) -} - -// Grant represents an OAuth application that has been granted access to an account. -type Grant struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - App *AuthorizationApp `json:"app,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Scopes []string `json:"scopes,omitempty"` -} - -func (g Grant) String() string { - return Stringify(g) -} - -// AuthorizationRequest represents a request to create an authorization. -type AuthorizationRequest struct { - Scopes []Scope `json:"scopes,omitempty"` - Note *string `json:"note,omitempty"` - NoteURL *string `json:"note_url,omitempty"` - ClientID *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` - Fingerprint *string `json:"fingerprint,omitempty"` -} - -func (a AuthorizationRequest) String() string { - return Stringify(a) -} - -// AuthorizationUpdateRequest represents a request to update an authorization. -// -// Note that for any one update, you must only provide one of the "scopes" -// fields. That is, you may provide only one of "Scopes", or "AddScopes", or -// "RemoveScopes". -// -// GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization -type AuthorizationUpdateRequest struct { - Scopes []string `json:"scopes,omitempty"` - AddScopes []string `json:"add_scopes,omitempty"` - RemoveScopes []string `json:"remove_scopes,omitempty"` - Note *string `json:"note,omitempty"` - NoteURL *string `json:"note_url,omitempty"` - Fingerprint *string `json:"fingerprint,omitempty"` -} - -func (a AuthorizationUpdateRequest) String() string { - return Stringify(a) -} - -// Check if an OAuth token is valid for a specific app. -// -// Note that this operation requires the use of BasicAuth, but where the -// username is the OAuth application clientID, and the password is its -// clientSecret. Invalid tokens will return a 404 Not Found. -// -// The returned Authorization.User field will be populated. -// -// GitHub API docs: https://developer.github.com/v3/apps/oauth_applications/#check-a-token -func (s *AuthorizationsService) Check(ctx context.Context, clientID, accessToken string) (*Authorization, *Response, error) { - u := fmt.Sprintf("applications/%v/token", clientID) - - reqBody := &struct { - AccessToken string `json:"access_token"` - }{AccessToken: accessToken} - - req, err := s.client.NewRequest("POST", u, reqBody) - if err != nil { - return nil, nil, err - } - req.Header.Set("Accept", mediaTypeOAuthAppPreview) - - a := new(Authorization) - resp, err := s.client.Do(ctx, req, a) - if err != nil { - return nil, resp, err - } - - return a, resp, nil -} - -// Reset is used to reset a valid OAuth token without end user involvement. -// Applications must save the "token" property in the response, because changes -// take effect immediately. -// -// Note that this operation requires the use of BasicAuth, but where the -// username is the OAuth application clientID, and the password is its -// clientSecret. Invalid tokens will return a 404 Not Found. -// -// The returned Authorization.User field will be populated. -// -// GitHub API docs: https://developer.github.com/v3/apps/oauth_applications/#reset-a-token -func (s *AuthorizationsService) Reset(ctx context.Context, clientID, accessToken string) (*Authorization, *Response, error) { - u := fmt.Sprintf("applications/%v/token", clientID) - - reqBody := &struct { - AccessToken string `json:"access_token"` - }{AccessToken: accessToken} - - req, err := s.client.NewRequest("PATCH", u, reqBody) - if err != nil { - return nil, nil, err - } - req.Header.Set("Accept", mediaTypeOAuthAppPreview) - - a := new(Authorization) - resp, err := s.client.Do(ctx, req, a) - if err != nil { - return nil, resp, err - } - - return a, resp, nil -} - -// Revoke an authorization for an application. -// -// Note that this operation requires the use of BasicAuth, but where the -// username is the OAuth application clientID, and the password is its -// clientSecret. Invalid tokens will return a 404 Not Found. -// -// GitHub API docs: https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token -func (s *AuthorizationsService) Revoke(ctx context.Context, clientID, accessToken string) (*Response, error) { - u := fmt.Sprintf("applications/%v/token", clientID) - - reqBody := &struct { - AccessToken string `json:"access_token"` - }{AccessToken: accessToken} - - req, err := s.client.NewRequest("DELETE", u, reqBody) - if err != nil { - return nil, err - } - req.Header.Set("Accept", mediaTypeOAuthAppPreview) - - return s.client.Do(ctx, req, nil) -} - -// DeleteGrant deletes an OAuth application grant. Deleting an application's -// grant will also delete all OAuth tokens associated with the application for -// the user. -// -// GitHub API docs: https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization -func (s *AuthorizationsService) DeleteGrant(ctx context.Context, clientID, accessToken string) (*Response, error) { - u := fmt.Sprintf("applications/%v/grant", clientID) - - reqBody := &struct { - AccessToken string `json:"access_token"` - }{AccessToken: accessToken} - - req, err := s.client.NewRequest("DELETE", u, reqBody) - if err != nil { - return nil, err - } - req.Header.Set("Accept", mediaTypeOAuthAppPreview) - - return s.client.Do(ctx, req, nil) -} - -// CreateImpersonation creates an impersonation OAuth token. -// -// This requires admin permissions. With the returned Authorization.Token -// you can e.g. create or delete a user's public SSH key. NOTE: creating a -// new token automatically revokes an existing one. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#create-an-impersonation-oauth-token -func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, username string, authReq *AuthorizationRequest) (*Authorization, *Response, error) { - u := fmt.Sprintf("admin/users/%v/authorizations", username) - req, err := s.client.NewRequest("POST", u, authReq) - if err != nil { - return nil, nil, err - } - - a := new(Authorization) - resp, err := s.client.Do(ctx, req, a) - if err != nil { - return nil, resp, err - } - return a, resp, nil -} - -// DeleteImpersonation deletes an impersonation OAuth token. -// -// NOTE: there can be only one at a time. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-an-impersonation-oauth-token -func (s *AuthorizationsService) DeleteImpersonation(ctx context.Context, username string) (*Response, error) { - u := fmt.Sprintf("admin/users/%v/authorizations", username) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/checks.go b/vendor/github.com/google/go-github/v30/github/checks.go deleted file mode 100644 index 67b7e770..00000000 --- a/vendor/github.com/google/go-github/v30/github/checks.go +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ChecksService provides access to the Checks API in the -// GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/checks/ -type ChecksService service - -// CheckRun represents a GitHub check run on a repository associated with a GitHub app. -type CheckRun struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - HeadSHA *string `json:"head_sha,omitempty"` - ExternalID *string `json:"external_id,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - DetailsURL *string `json:"details_url,omitempty"` - Status *string `json:"status,omitempty"` - Conclusion *string `json:"conclusion,omitempty"` - StartedAt *Timestamp `json:"started_at,omitempty"` - CompletedAt *Timestamp `json:"completed_at,omitempty"` - Output *CheckRunOutput `json:"output,omitempty"` - Name *string `json:"name,omitempty"` - CheckSuite *CheckSuite `json:"check_suite,omitempty"` - App *App `json:"app,omitempty"` - PullRequests []*PullRequest `json:"pull_requests,omitempty"` -} - -// CheckRunOutput represents the output of a CheckRun. -type CheckRunOutput struct { - Title *string `json:"title,omitempty"` - Summary *string `json:"summary,omitempty"` - Text *string `json:"text,omitempty"` - AnnotationsCount *int `json:"annotations_count,omitempty"` - AnnotationsURL *string `json:"annotations_url,omitempty"` - Annotations []*CheckRunAnnotation `json:"annotations,omitempty"` - Images []*CheckRunImage `json:"images,omitempty"` -} - -// CheckRunAnnotation represents an annotation object for a CheckRun output. -type CheckRunAnnotation struct { - Path *string `json:"path,omitempty"` - StartLine *int `json:"start_line,omitempty"` - EndLine *int `json:"end_line,omitempty"` - StartColumn *int `json:"start_column,omitempty"` - EndColumn *int `json:"end_column,omitempty"` - AnnotationLevel *string `json:"annotation_level,omitempty"` - Message *string `json:"message,omitempty"` - Title *string `json:"title,omitempty"` - RawDetails *string `json:"raw_details,omitempty"` -} - -// CheckRunImage represents an image object for a CheckRun output. -type CheckRunImage struct { - Alt *string `json:"alt,omitempty"` - ImageURL *string `json:"image_url,omitempty"` - Caption *string `json:"caption,omitempty"` -} - -// CheckSuite represents a suite of check runs. -type CheckSuite struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - HeadBranch *string `json:"head_branch,omitempty"` - HeadSHA *string `json:"head_sha,omitempty"` - URL *string `json:"url,omitempty"` - BeforeSHA *string `json:"before,omitempty"` - AfterSHA *string `json:"after,omitempty"` - Status *string `json:"status,omitempty"` - Conclusion *string `json:"conclusion,omitempty"` - App *App `json:"app,omitempty"` - Repository *Repository `json:"repository,omitempty"` - PullRequests []*PullRequest `json:"pull_requests,omitempty"` - - // The following fields are only populated by Webhook events. - HeadCommit *Commit `json:"head_commit,omitempty"` -} - -func (c CheckRun) String() string { - return Stringify(c) -} - -func (c CheckSuite) String() string { - return Stringify(c) -} - -// GetCheckRun gets a check-run for a repository. -// -// GitHub API docs: https://developer.github.com/v3/checks/runs/#get-a-single-check-run -func (s *ChecksService) GetCheckRun(ctx context.Context, owner, repo string, checkRunID int64) (*CheckRun, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-runs/%v", owner, repo, checkRunID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - checkRun := new(CheckRun) - resp, err := s.client.Do(ctx, req, checkRun) - if err != nil { - return nil, resp, err - } - - return checkRun, resp, nil -} - -// GetCheckSuite gets a single check suite. -// -// GitHub API docs: https://developer.github.com/v3/checks/suites/#get-a-single-check-suite -func (s *ChecksService) GetCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64) (*CheckSuite, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-suites/%v", owner, repo, checkSuiteID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - checkSuite := new(CheckSuite) - resp, err := s.client.Do(ctx, req, checkSuite) - if err != nil { - return nil, resp, err - } - - return checkSuite, resp, nil -} - -// CreateCheckRunOptions sets up parameters needed to create a CheckRun. -type CreateCheckRunOptions struct { - Name string `json:"name"` // The name of the check (e.g., "code-coverage"). (Required.) - HeadSHA string `json:"head_sha"` // The SHA of the commit. (Required.) - DetailsURL *string `json:"details_url,omitempty"` // The URL of the integrator's site that has the full details of the check. (Optional.) - ExternalID *string `json:"external_id,omitempty"` // A reference for the run on the integrator's system. (Optional.) - Status *string `json:"status,omitempty"` // The current status. Can be one of "queued", "in_progress", or "completed". Default: "queued". (Optional.) - Conclusion *string `json:"conclusion,omitempty"` // Can be one of "success", "failure", "neutral", "cancelled", "timed_out", or "action_required". (Optional. Required if you provide a status of "completed".) - StartedAt *Timestamp `json:"started_at,omitempty"` // The time that the check run began. (Optional.) - CompletedAt *Timestamp `json:"completed_at,omitempty"` // The time the check completed. (Optional. Required if you provide conclusion.) - Output *CheckRunOutput `json:"output,omitempty"` // Provide descriptive details about the run. (Optional) - Actions []*CheckRunAction `json:"actions,omitempty"` // Possible further actions the integrator can perform, which a user may trigger. (Optional.) -} - -// CheckRunAction exposes further actions the integrator can perform, which a user may trigger. -type CheckRunAction struct { - Label string `json:"label"` // The text to be displayed on a button in the web UI. The maximum size is 20 characters. (Required.) - Description string `json:"description"` // A short explanation of what this action would do. The maximum size is 40 characters. (Required.) - Identifier string `json:"identifier"` // A reference for the action on the integrator's system. The maximum size is 20 characters. (Required.) -} - -// CreateCheckRun creates a check run for repository. -// -// GitHub API docs: https://developer.github.com/v3/checks/runs/#create-a-check-run -func (s *ChecksService) CreateCheckRun(ctx context.Context, owner, repo string, opts CreateCheckRunOptions) (*CheckRun, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-runs", owner, repo) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - checkRun := new(CheckRun) - resp, err := s.client.Do(ctx, req, checkRun) - if err != nil { - return nil, resp, err - } - - return checkRun, resp, nil -} - -// UpdateCheckRunOptions sets up parameters needed to update a CheckRun. -type UpdateCheckRunOptions struct { - Name string `json:"name"` // The name of the check (e.g., "code-coverage"). (Required.) - HeadSHA *string `json:"head_sha,omitempty"` // The SHA of the commit. (Optional.) - DetailsURL *string `json:"details_url,omitempty"` // The URL of the integrator's site that has the full details of the check. (Optional.) - ExternalID *string `json:"external_id,omitempty"` // A reference for the run on the integrator's system. (Optional.) - Status *string `json:"status,omitempty"` // The current status. Can be one of "queued", "in_progress", or "completed". Default: "queued". (Optional.) - Conclusion *string `json:"conclusion,omitempty"` // Can be one of "success", "failure", "neutral", "cancelled", "timed_out", or "action_required". (Optional. Required if you provide a status of "completed".) - CompletedAt *Timestamp `json:"completed_at,omitempty"` // The time the check completed. (Optional. Required if you provide conclusion.) - Output *CheckRunOutput `json:"output,omitempty"` // Provide descriptive details about the run. (Optional) - Actions []*CheckRunAction `json:"actions,omitempty"` // Possible further actions the integrator can perform, which a user may trigger. (Optional.) -} - -// UpdateCheckRun updates a check run for a specific commit in a repository. -// -// GitHub API docs: https://developer.github.com/v3/checks/runs/#update-a-check-run -func (s *ChecksService) UpdateCheckRun(ctx context.Context, owner, repo string, checkRunID int64, opts UpdateCheckRunOptions) (*CheckRun, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-runs/%v", owner, repo, checkRunID) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - checkRun := new(CheckRun) - resp, err := s.client.Do(ctx, req, checkRun) - if err != nil { - return nil, resp, err - } - - return checkRun, resp, nil -} - -// ListCheckRunAnnotations lists the annotations for a check run. -// -// GitHub API docs: https://developer.github.com/v3/checks/runs/#list-annotations-for-a-check-run -func (s *ChecksService) ListCheckRunAnnotations(ctx context.Context, owner, repo string, checkRunID int64, opts *ListOptions) ([]*CheckRunAnnotation, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-runs/%v/annotations", owner, repo, checkRunID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - var checkRunAnnotations []*CheckRunAnnotation - resp, err := s.client.Do(ctx, req, &checkRunAnnotations) - if err != nil { - return nil, resp, err - } - - return checkRunAnnotations, resp, nil -} - -// ListCheckRunsOptions represents parameters to list check runs. -type ListCheckRunsOptions struct { - CheckName *string `url:"check_name,omitempty"` // Returns check runs with the specified name. - Status *string `url:"status,omitempty"` // Returns check runs with the specified status. Can be one of "queued", "in_progress", or "completed". - Filter *string `url:"filter,omitempty"` // Filters check runs by their completed_at timestamp. Can be one of "latest" (returning the most recent check runs) or "all". Default: "latest" - - ListOptions -} - -// ListCheckRunsResults represents the result of a check run list. -type ListCheckRunsResults struct { - Total *int `json:"total_count,omitempty"` - CheckRuns []*CheckRun `json:"check_runs,omitempty"` -} - -// ListCheckRunsForRef lists check runs for a specific ref. -// -// GitHub API docs: https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref -func (s *ChecksService) ListCheckRunsForRef(ctx context.Context, owner, repo, ref string, opts *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/check-runs", owner, repo, refURLEscape(ref)) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - var checkRunResults *ListCheckRunsResults - resp, err := s.client.Do(ctx, req, &checkRunResults) - if err != nil { - return nil, resp, err - } - - return checkRunResults, resp, nil -} - -// ListCheckRunsCheckSuite lists check runs for a check suite. -// -// GitHub API docs: https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite -func (s *ChecksService) ListCheckRunsCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64, opts *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-suites/%v/check-runs", owner, repo, checkSuiteID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - var checkRunResults *ListCheckRunsResults - resp, err := s.client.Do(ctx, req, &checkRunResults) - if err != nil { - return nil, resp, err - } - - return checkRunResults, resp, nil -} - -// ListCheckSuiteOptions represents parameters to list check suites. -type ListCheckSuiteOptions struct { - CheckName *string `url:"check_name,omitempty"` // Filters checks suites by the name of the check run. - AppID *int `url:"app_id,omitempty"` // Filters check suites by GitHub App id. - - ListOptions -} - -// ListCheckSuiteResults represents the result of a check run list. -type ListCheckSuiteResults struct { - Total *int `json:"total_count,omitempty"` - CheckSuites []*CheckSuite `json:"check_suites,omitempty"` -} - -// ListCheckSuitesForRef lists check suite for a specific ref. -// -// GitHub API docs: https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref -func (s *ChecksService) ListCheckSuitesForRef(ctx context.Context, owner, repo, ref string, opts *ListCheckSuiteOptions) (*ListCheckSuiteResults, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/check-suites", owner, repo, refURLEscape(ref)) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - var checkSuiteResults *ListCheckSuiteResults - resp, err := s.client.Do(ctx, req, &checkSuiteResults) - if err != nil { - return nil, resp, err - } - - return checkSuiteResults, resp, nil -} - -// AutoTriggerCheck enables or disables automatic creation of CheckSuite events upon pushes to the repository. -type AutoTriggerCheck struct { - AppID *int64 `json:"app_id,omitempty"` // The id of the GitHub App. (Required.) - Setting *bool `json:"setting,omitempty"` // Set to "true" to enable automatic creation of CheckSuite events upon pushes to the repository, or "false" to disable them. Default: "true" (Required.) -} - -// CheckSuitePreferenceOptions set options for check suite preferences for a repository. -type CheckSuitePreferenceOptions struct { - AutoTriggerChecks []*AutoTriggerCheck `json:"auto_trigger_checks,omitempty"` // A slice of auto trigger checks that can be set for a check suite in a repository. -} - -// CheckSuitePreferenceResults represents the results of the preference set operation. -type CheckSuitePreferenceResults struct { - Preferences *PreferenceList `json:"preferences,omitempty"` - Repository *Repository `json:"repository,omitempty"` -} - -// PreferenceList represents a list of auto trigger checks for repository -type PreferenceList struct { - AutoTriggerChecks []*AutoTriggerCheck `json:"auto_trigger_checks,omitempty"` // A slice of auto trigger checks that can be set for a check suite in a repository. -} - -// SetCheckSuitePreferences changes the default automatic flow when creating check suites. -// -// GitHub API docs: https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository -func (s *ChecksService) SetCheckSuitePreferences(ctx context.Context, owner, repo string, opts CheckSuitePreferenceOptions) (*CheckSuitePreferenceResults, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-suites/preferences", owner, repo) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - var checkSuitePrefResults *CheckSuitePreferenceResults - resp, err := s.client.Do(ctx, req, &checkSuitePrefResults) - if err != nil { - return nil, resp, err - } - - return checkSuitePrefResults, resp, nil -} - -// CreateCheckSuiteOptions sets up parameters to manually create a check suites -type CreateCheckSuiteOptions struct { - HeadSHA string `json:"head_sha"` // The sha of the head commit. (Required.) - HeadBranch *string `json:"head_branch,omitempty"` // The name of the head branch where the code changes are implemented. -} - -// CreateCheckSuite manually creates a check suite for a repository. -// -// GitHub API docs: https://developer.github.com/v3/checks/suites/#create-a-check-suite -func (s *ChecksService) CreateCheckSuite(ctx context.Context, owner, repo string, opts CreateCheckSuiteOptions) (*CheckSuite, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-suites", owner, repo) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - checkSuite := new(CheckSuite) - resp, err := s.client.Do(ctx, req, checkSuite) - if err != nil { - return nil, resp, err - } - - return checkSuite, resp, nil -} - -// ReRequestCheckSuite triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. -// -// GitHub API docs: https://developer.github.com/v3/checks/suites/#rerequest-check-suite -func (s *ChecksService) ReRequestCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/check-suites/%v/rerequest", owner, repo, checkSuiteID) - - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, err - } - - req.Header.Set("Accept", mediaTypeCheckRunsPreview) - - resp, err := s.client.Do(ctx, req, nil) - return resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/doc.go b/vendor/github.com/google/go-github/v30/github/doc.go deleted file mode 100644 index bad4821b..00000000 --- a/vendor/github.com/google/go-github/v30/github/doc.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2013 The go-github 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 github provides a client for using the GitHub API. - -Usage: - - import "github.com/google/go-github/v30/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) - import "github.com/google/go-github/github" // with go modules disabled - -Construct a new GitHub client, then use the various services on the client to -access different parts of the GitHub API. For example: - - client := github.NewClient(nil) - - // list all organizations for user "willnorris" - orgs, _, err := client.Organizations.List(ctx, "willnorris", nil) - -Some API methods have optional parameters that can be passed. For example: - - client := github.NewClient(nil) - - // list public repositories for org "github" - opt := &github.RepositoryListByOrgOptions{Type: "public"} - repos, _, err := client.Repositories.ListByOrg(ctx, "github", opt) - -The services of a client divide the API into logical chunks and correspond to -the structure of the GitHub API documentation at -https://developer.github.com/v3/. - -NOTE: Using the https://godoc.org/context package, one can easily -pass cancelation signals and deadlines to various services of the client for -handling a request. In case there is no context available, then context.Background() -can be used as a starting point. - -For more sample code snippets, head over to the https://github.com/google/go-github/tree/master/example directory. - -Authentication - -The go-github library does not directly handle authentication. Instead, when -creating a new client, pass an http.Client that can handle authentication for -you. The easiest and recommended way to do this is using the golang.org/x/oauth2 -library, but you can always use any other library that provides an http.Client. -If you have an OAuth2 access token (for example, a personal API token), you can -use it with the oauth2 library using: - - import "golang.org/x/oauth2" - - func main() { - ctx := context.Background() - ts := oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: "... your access token ..."}, - ) - tc := oauth2.NewClient(ctx, ts) - - client := github.NewClient(tc) - - // list all repositories for the authenticated user - repos, _, err := client.Repositories.List(ctx, "", nil) - } - -Note that when using an authenticated Client, all calls made by the client will -include the specified OAuth token. Therefore, authenticated clients should -almost never be shared between different users. - -See the oauth2 docs for complete instructions on using that library. - -For API methods that require HTTP Basic Authentication, use the -BasicAuthTransport. - -GitHub Apps authentication can be provided by the -https://github.com/bradleyfalzon/ghinstallation package. - - import "github.com/bradleyfalzon/ghinstallation" - - func main() { - // Wrap the shared transport for use with the integration ID 1 authenticating with installation ID 99. - itr, err := ghinstallation.NewKeyFromFile(http.DefaultTransport, 1, 99, "2016-10-19.private-key.pem") - if err != nil { - // Handle error. - } - - // Use installation transport with client - client := github.NewClient(&http.Client{Transport: itr}) - - // Use client... - } - -Rate Limiting - -GitHub imposes a rate limit on all API clients. Unauthenticated clients are -limited to 60 requests per hour, while authenticated clients can make up to -5,000 requests per hour. The Search API has a custom rate limit. Unauthenticated -clients are limited to 10 requests per minute, while authenticated clients -can make up to 30 requests per minute. To receive the higher rate limit when -making calls that are not issued on behalf of a user, -use UnauthenticatedRateLimitedTransport. - -The returned Response.Rate value contains the rate limit information -from the most recent API call. If a recent enough response isn't -available, you can use RateLimits to fetch the most up-to-date rate -limit data for the client. - -To detect an API rate limit error, you can check if its type is *github.RateLimitError: - - repos, _, err := client.Repositories.List(ctx, "", nil) - if _, ok := err.(*github.RateLimitError); ok { - log.Println("hit rate limit") - } - -Learn more about GitHub rate limiting at -https://developer.github.com/v3/#rate-limiting. - -Accepted Status - -Some endpoints may return a 202 Accepted status code, meaning that the -information required is not yet ready and was scheduled to be gathered on -the GitHub side. Methods known to behave like this are documented specifying -this behavior. - -To detect this condition of error, you can check if its type is -*github.AcceptedError: - - stats, _, err := client.Repositories.ListContributorsStats(ctx, org, repo) - if _, ok := err.(*github.AcceptedError); ok { - log.Println("scheduled on GitHub side") - } - -Conditional Requests - -The GitHub API has good support for conditional requests which will help -prevent you from burning through your rate limit, as well as help speed up your -application. go-github does not handle conditional requests directly, but is -instead designed to work with a caching http.Transport. We recommend using -https://github.com/gregjones/httpcache for that. - -Learn more about GitHub conditional requests at -https://developer.github.com/v3/#conditional-requests. - -Creating and Updating Resources - -All structs for GitHub resources use pointer values for all non-repeated fields. -This allows distinguishing between unset fields and those set to a zero-value. -Helper functions have been provided to easily create these pointers for string, -bool, and int values. For example: - - // create a new private repository named "foo" - repo := &github.Repository{ - Name: github.String("foo"), - Private: github.Bool(true), - } - client.Repositories.Create(ctx, "", repo) - -Users who have worked with protocol buffers should find this pattern familiar. - -Pagination - -All requests for resource collections (repos, pull requests, issues, etc.) -support pagination. Pagination options are described in the -github.ListOptions struct and passed to the list methods directly or as an -embedded type of a more specific list options struct (for example -github.PullRequestListOptions). Pages information is available via the -github.Response struct. - - client := github.NewClient(nil) - - opt := &github.RepositoryListByOrgOptions{ - ListOptions: github.ListOptions{PerPage: 10}, - } - // get all pages of results - var allRepos []*github.Repository - for { - repos, resp, err := client.Repositories.ListByOrg(ctx, "github", opt) - if err != nil { - return err - } - allRepos = append(allRepos, repos...) - if resp.NextPage == 0 { - break - } - opt.Page = resp.NextPage - } - -*/ -package github diff --git a/vendor/github.com/google/go-github/v30/github/event.go b/vendor/github.com/google/go-github/v30/github/event.go deleted file mode 100644 index 848fa6da..00000000 --- a/vendor/github.com/google/go-github/v30/github/event.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "encoding/json" - "time" -) - -// Event represents a GitHub event. -type Event struct { - Type *string `json:"type,omitempty"` - Public *bool `json:"public,omitempty"` - RawPayload *json.RawMessage `json:"payload,omitempty"` - Repo *Repository `json:"repo,omitempty"` - Actor *User `json:"actor,omitempty"` - Org *Organization `json:"org,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ID *string `json:"id,omitempty"` -} - -func (e Event) String() string { - return Stringify(e) -} - -// ParsePayload parses the event payload. For recognized event types, -// a value of the corresponding struct type will be returned. -func (e *Event) ParsePayload() (payload interface{}, err error) { - switch *e.Type { - case "CheckRunEvent": - payload = &CheckRunEvent{} - case "CheckSuiteEvent": - payload = &CheckSuiteEvent{} - case "CommitCommentEvent": - payload = &CommitCommentEvent{} - case "CreateEvent": - payload = &CreateEvent{} - case "DeleteEvent": - payload = &DeleteEvent{} - case "DeployKeyEvent": - payload = &DeployKeyEvent{} - case "DeploymentEvent": - payload = &DeploymentEvent{} - case "DeploymentStatusEvent": - payload = &DeploymentStatusEvent{} - case "ForkEvent": - payload = &ForkEvent{} - case "GitHubAppAuthorizationEvent": - payload = &GitHubAppAuthorizationEvent{} - case "GollumEvent": - payload = &GollumEvent{} - case "InstallationEvent": - payload = &InstallationEvent{} - case "InstallationRepositoriesEvent": - payload = &InstallationRepositoriesEvent{} - case "IssueCommentEvent": - payload = &IssueCommentEvent{} - case "IssuesEvent": - payload = &IssuesEvent{} - case "LabelEvent": - payload = &LabelEvent{} - case "MarketplacePurchaseEvent": - payload = &MarketplacePurchaseEvent{} - case "MemberEvent": - payload = &MemberEvent{} - case "MembershipEvent": - payload = &MembershipEvent{} - case "MetaEvent": - payload = &MetaEvent{} - case "MilestoneEvent": - payload = &MilestoneEvent{} - case "OrganizationEvent": - payload = &OrganizationEvent{} - case "OrgBlockEvent": - payload = &OrgBlockEvent{} - case "PageBuildEvent": - payload = &PageBuildEvent{} - case "PingEvent": - payload = &PingEvent{} - case "ProjectEvent": - payload = &ProjectEvent{} - case "ProjectCardEvent": - payload = &ProjectCardEvent{} - case "ProjectColumnEvent": - payload = &ProjectColumnEvent{} - case "PublicEvent": - payload = &PublicEvent{} - case "PullRequestEvent": - payload = &PullRequestEvent{} - case "PullRequestReviewEvent": - payload = &PullRequestReviewEvent{} - case "PullRequestReviewCommentEvent": - payload = &PullRequestReviewCommentEvent{} - case "PushEvent": - payload = &PushEvent{} - case "ReleaseEvent": - payload = &ReleaseEvent{} - case "RepositoryEvent": - payload = &RepositoryEvent{} - case "RepositoryDispatchEvent": - payload = &RepositoryDispatchEvent{} - case "RepositoryVulnerabilityAlertEvent": - payload = &RepositoryVulnerabilityAlertEvent{} - case "StarEvent": - payload = &StarEvent{} - case "StatusEvent": - payload = &StatusEvent{} - case "TeamEvent": - payload = &TeamEvent{} - case "TeamAddEvent": - payload = &TeamAddEvent{} - case "UserEvent": - payload = &UserEvent{} - case "WatchEvent": - payload = &WatchEvent{} - } - err = json.Unmarshal(*e.RawPayload, &payload) - return payload, err -} - -// Payload returns the parsed event payload. For recognized event types, -// a value of the corresponding struct type will be returned. -// -// Deprecated: Use ParsePayload instead, which returns an error -// rather than panics if JSON unmarshaling raw payload fails. -func (e *Event) Payload() (payload interface{}) { - var err error - payload, err = e.ParsePayload() - if err != nil { - panic(err) - } - return payload -} diff --git a/vendor/github.com/google/go-github/v30/github/event_types.go b/vendor/github.com/google/go-github/v30/github/event_types.go deleted file mode 100644 index 2c18de6c..00000000 --- a/vendor/github.com/google/go-github/v30/github/event_types.go +++ /dev/null @@ -1,928 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// These event types are shared between the Events API and used as Webhook payloads. - -package github - -import "encoding/json" - -// RequestedAction is included in a CheckRunEvent when a user has invoked an action, -// i.e. when the CheckRunEvent's Action field is "requested_action". -type RequestedAction struct { - Identifier string `json:"identifier"` // The integrator reference of the action requested by the user. -} - -// CheckRunEvent is triggered when a check run is "created", "updated", or "rerequested". -// The Webhook event name is "check_run". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#checkrunevent -type CheckRunEvent struct { - CheckRun *CheckRun `json:"check_run,omitempty"` - // The action performed. Possible values are: "created", "updated", "rerequested" or "requested_action". - Action *string `json:"action,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` - - // The action requested by the user. Populated when the Action is "requested_action". - RequestedAction *RequestedAction `json:"requested_action,omitempty"` // -} - -// CheckSuiteEvent is triggered when a check suite is "completed", "requested", or "rerequested". -// The Webhook event name is "check_suite". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#checksuiteevent -type CheckSuiteEvent struct { - CheckSuite *CheckSuite `json:"check_suite,omitempty"` - // The action performed. Possible values are: "completed", "requested" or "rerequested". - Action *string `json:"action,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// CommitCommentEvent is triggered when a commit comment is created. -// The Webhook event name is "commit_comment". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#commitcommentevent -type CommitCommentEvent struct { - Comment *RepositoryComment `json:"comment,omitempty"` - - // The following fields are only populated by Webhook events. - Action *string `json:"action,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// CreateEvent represents a created repository, branch, or tag. -// The Webhook event name is "create". -// -// Note: webhooks will not receive this event for created repositories. -// Additionally, webhooks will not receive this event for tags if more -// than three tags are pushed at once. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#createevent -type CreateEvent struct { - Ref *string `json:"ref,omitempty"` - // RefType is the object that was created. Possible values are: "repository", "branch", "tag". - RefType *string `json:"ref_type,omitempty"` - MasterBranch *string `json:"master_branch,omitempty"` - Description *string `json:"description,omitempty"` - - // The following fields are only populated by Webhook events. - PusherType *string `json:"pusher_type,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// DeleteEvent represents a deleted branch or tag. -// The Webhook event name is "delete". -// -// Note: webhooks will not receive this event for tags if more than three tags -// are deleted at once. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#deleteevent -type DeleteEvent struct { - Ref *string `json:"ref,omitempty"` - // RefType is the object that was deleted. Possible values are: "branch", "tag". - RefType *string `json:"ref_type,omitempty"` - - // The following fields are only populated by Webhook events. - PusherType *string `json:"pusher_type,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// DeployKeyEvent is triggered when a deploy key is added or removed from a repository. -// The Webhook event name is "deploy_key". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#deploykeyevent -type DeployKeyEvent struct { - // Action is the action that was performed. Possible values are: - // "created" or "deleted". - Action *string `json:"action,omitempty"` - - // The deploy key resource. - Key *Key `json:"key,omitempty"` -} - -// DeploymentEvent represents a deployment. -// The Webhook event name is "deployment". -// -// Events of this type are not visible in timelines, they are only used to trigger hooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#deploymentevent -type DeploymentEvent struct { - Deployment *Deployment `json:"deployment,omitempty"` - Repo *Repository `json:"repository,omitempty"` - - // The following fields are only populated by Webhook events. - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// DeploymentStatusEvent represents a deployment status. -// The Webhook event name is "deployment_status". -// -// Events of this type are not visible in timelines, they are only used to trigger hooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#deploymentstatusevent -type DeploymentStatusEvent struct { - Deployment *Deployment `json:"deployment,omitempty"` - DeploymentStatus *DeploymentStatus `json:"deployment_status,omitempty"` - Repo *Repository `json:"repository,omitempty"` - - // The following fields are only populated by Webhook events. - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// ForkEvent is triggered when a user forks a repository. -// The Webhook event name is "fork". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#forkevent -type ForkEvent struct { - // Forkee is the created repository. - Forkee *Repository `json:"forkee,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// GitHubAppAuthorizationEvent is triggered when a user's authorization for a -// GitHub Application is revoked. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent -type GitHubAppAuthorizationEvent struct { - // The action performed. Possible value is: "revoked". - Action *string `json:"action,omitempty"` - - // The following fields are only populated by Webhook events. - Sender *User `json:"sender,omitempty"` -} - -// Page represents a single Wiki page. -type Page struct { - PageName *string `json:"page_name,omitempty"` - Title *string `json:"title,omitempty"` - Summary *string `json:"summary,omitempty"` - Action *string `json:"action,omitempty"` - SHA *string `json:"sha,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` -} - -// GollumEvent is triggered when a Wiki page is created or updated. -// The Webhook event name is "gollum". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#gollumevent -type GollumEvent struct { - Pages []*Page `json:"pages,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// EditChange represents the changes when an issue, pull request, or comment has -// been edited. -type EditChange struct { - Title *struct { - From *string `json:"from,omitempty"` - } `json:"title,omitempty"` - Body *struct { - From *string `json:"from,omitempty"` - } `json:"body,omitempty"` -} - -// ProjectChange represents the changes when a project has been edited. -type ProjectChange struct { - Name *struct { - From *string `json:"from,omitempty"` - } `json:"name,omitempty"` - Body *struct { - From *string `json:"from,omitempty"` - } `json:"body,omitempty"` -} - -// ProjectCardChange represents the changes when a project card has been edited. -type ProjectCardChange struct { - Note *struct { - From *string `json:"from,omitempty"` - } `json:"note,omitempty"` -} - -// ProjectColumnChange represents the changes when a project column has been edited. -type ProjectColumnChange struct { - Name *struct { - From *string `json:"from,omitempty"` - } `json:"name,omitempty"` -} - -// TeamChange represents the changes when a team has been edited. -type TeamChange struct { - Description *struct { - From *string `json:"from,omitempty"` - } `json:"description,omitempty"` - Name *struct { - From *string `json:"from,omitempty"` - } `json:"name,omitempty"` - Privacy *struct { - From *string `json:"from,omitempty"` - } `json:"privacy,omitempty"` - Repository *struct { - Permissions *struct { - From *struct { - Admin *bool `json:"admin,omitempty"` - Pull *bool `json:"pull,omitempty"` - Push *bool `json:"push,omitempty"` - } `json:"from,omitempty"` - } `json:"permissions,omitempty"` - } `json:"repository,omitempty"` -} - -// InstallationEvent is triggered when a GitHub App has been installed or uninstalled. -// The Webhook event name is "installation". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#installationevent -type InstallationEvent struct { - // The action that was performed. Can be either "created" or "deleted". - Action *string `json:"action,omitempty"` - Repositories []*Repository `json:"repositories,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// InstallationRepositoriesEvent is triggered when a repository is added or -// removed from an installation. The Webhook event name is "installation_repositories". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent -type InstallationRepositoriesEvent struct { - // The action that was performed. Can be either "added" or "removed". - Action *string `json:"action,omitempty"` - RepositoriesAdded []*Repository `json:"repositories_added,omitempty"` - RepositoriesRemoved []*Repository `json:"repositories_removed,omitempty"` - RepositorySelection *string `json:"repository_selection,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// IssueCommentEvent is triggered when an issue comment is created on an issue -// or pull request. -// The Webhook event name is "issue_comment". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#issuecommentevent -type IssueCommentEvent struct { - // Action is the action that was performed on the comment. - // Possible values are: "created", "edited", "deleted". - Action *string `json:"action,omitempty"` - Issue *Issue `json:"issue,omitempty"` - Comment *IssueComment `json:"comment,omitempty"` - - // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// IssuesEvent is triggered when an issue is opened, edited, deleted, transferred, -// pinned, unpinned, closed, reopened, assigned, unassigned, labeled, unlabeled, -// locked, unlocked, milestoned, or demilestoned. -// The Webhook event name is "issues". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#issuesevent -type IssuesEvent struct { - // Action is the action that was performed. Possible values are: "opened", - // "edited", "deleted", "transferred", "pinned", "unpinned", "closed", "reopened", - // "assigned", "unassigned", "labeled", "unlabeled", "locked", "unlocked", - // "milestoned", or "demilestoned". - Action *string `json:"action,omitempty"` - Issue *Issue `json:"issue,omitempty"` - Assignee *User `json:"assignee,omitempty"` - Label *Label `json:"label,omitempty"` - - // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// LabelEvent is triggered when a repository's label is created, edited, or deleted. -// The Webhook event name is "label" -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#labelevent -type LabelEvent struct { - // Action is the action that was performed. Possible values are: - // "created", "edited", "deleted" - Action *string `json:"action,omitempty"` - Label *Label `json:"label,omitempty"` - - // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// MarketplacePurchaseEvent is triggered when a user purchases, cancels, or changes -// their GitHub Marketplace plan. -// Webhook event name "marketplace_purchase". -// -// Github API docs: https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent -type MarketplacePurchaseEvent struct { - // Action is the action that was performed. Possible values are: - // "purchased", "cancelled", "pending_change", "pending_change_cancelled", "changed". - Action *string `json:"action,omitempty"` - - // The following fields are only populated by Webhook events. - EffectiveDate *Timestamp `json:"effective_date,omitempty"` - MarketplacePurchase *MarketplacePurchase `json:"marketplace_purchase,omitempty"` - PreviousMarketplacePurchase *MarketplacePurchase `json:"previous_marketplace_purchase,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// MemberEvent is triggered when a user is added as a collaborator to a repository. -// The Webhook event name is "member". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#memberevent -type MemberEvent struct { - // Action is the action that was performed. Possible value is: "added". - Action *string `json:"action,omitempty"` - Member *User `json:"member,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// MembershipEvent is triggered when a user is added or removed from a team. -// The Webhook event name is "membership". -// -// Events of this type are not visible in timelines, they are only used to -// trigger organization webhooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#membershipevent -type MembershipEvent struct { - // Action is the action that was performed. Possible values are: "added", "removed". - Action *string `json:"action,omitempty"` - // Scope is the scope of the membership. Possible value is: "team". - Scope *string `json:"scope,omitempty"` - Member *User `json:"member,omitempty"` - Team *Team `json:"team,omitempty"` - - // The following fields are only populated by Webhook events. - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// MetaEvent is triggered when the webhook that this event is configured on is deleted. -// This event will only listen for changes to the particular hook the event is installed on. -// Therefore, it must be selected for each hook that you'd like to receive meta events for. -// The Webhook event name is "meta". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#metaevent -type MetaEvent struct { - // Action is the action that was performed. Possible value is: "deleted". - Action *string `json:"action,omitempty"` - // The ID of the modified webhook. - HookID *int64 `json:"hook_id,omitempty"` - // The modified webhook. - // This will contain different keys based on the type of webhook it is: repository, - // organization, business, app, or GitHub Marketplace. - Hook *Hook `json:"hook,omitempty"` -} - -// MilestoneEvent is triggered when a milestone is created, closed, opened, edited, or deleted. -// The Webhook event name is "milestone". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#milestoneevent -type MilestoneEvent struct { - // Action is the action that was performed. Possible values are: - // "created", "closed", "opened", "edited", "deleted" - Action *string `json:"action,omitempty"` - Milestone *Milestone `json:"milestone,omitempty"` - - // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Org *Organization `json:"organization,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// OrganizationEvent is triggered when an organization is deleted and renamed, and when a user is added, -// removed, or invited to an organization. -// Events of this type are not visible in timelines. These events are only used to trigger organization hooks. -// Webhook event name is "organization". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#organizationevent -type OrganizationEvent struct { - // Action is the action that was performed. - // Possible values are: "deleted", "renamed", "member_added", "member_removed", or "member_invited". - Action *string `json:"action,omitempty"` - - // Invitation is the invitation for the user or email if the action is "member_invited". - Invitation *Invitation `json:"invitation,omitempty"` - - // Membership is the membership between the user and the organization. - // Not present when the action is "member_invited". - Membership *Membership `json:"membership,omitempty"` - - Organization *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// OrgBlockEvent is triggered when an organization blocks or unblocks a user. -// The Webhook event name is "org_block". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#orgblockevent -type OrgBlockEvent struct { - // Action is the action that was performed. - // Can be "blocked" or "unblocked". - Action *string `json:"action,omitempty"` - BlockedUser *User `json:"blocked_user,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - - // The following fields are only populated by Webhook events. - Installation *Installation `json:"installation,omitempty"` -} - -// PageBuildEvent represents an attempted build of a GitHub Pages site, whether -// successful or not. -// The Webhook event name is "page_build". -// -// This event is triggered on push to a GitHub Pages enabled branch (gh-pages -// for project pages, master for user and organization pages). -// -// Events of this type are not visible in timelines, they are only used to trigger hooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pagebuildevent -type PageBuildEvent struct { - Build *PagesBuild `json:"build,omitempty"` - - // The following fields are only populated by Webhook events. - ID *int64 `json:"id,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// PingEvent is triggered when a Webhook is added to GitHub. -// -// GitHub API docs: https://developer.github.com/webhooks/#ping-event -type PingEvent struct { - // Random string of GitHub zen. - Zen *string `json:"zen,omitempty"` - // The ID of the webhook that triggered the ping. - HookID *int64 `json:"hook_id,omitempty"` - // The webhook configuration. - Hook *Hook `json:"hook,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// ProjectEvent is triggered when project is created, modified or deleted. -// The webhook event name is "project". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#projectevent -type ProjectEvent struct { - Action *string `json:"action,omitempty"` - Changes *ProjectChange `json:"changes,omitempty"` - Project *Project `json:"project,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// ProjectCardEvent is triggered when a project card is created, updated, moved, converted to an issue, or deleted. -// The webhook event name is "project_card". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#projectcardevent -type ProjectCardEvent struct { - Action *string `json:"action,omitempty"` - Changes *ProjectCardChange `json:"changes,omitempty"` - AfterID *int64 `json:"after_id,omitempty"` - ProjectCard *ProjectCard `json:"project_card,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// ProjectColumnEvent is triggered when a project column is created, updated, moved, or deleted. -// The webhook event name is "project_column". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#projectcolumnevent -type ProjectColumnEvent struct { - Action *string `json:"action,omitempty"` - Changes *ProjectColumnChange `json:"changes,omitempty"` - AfterID *int64 `json:"after_id,omitempty"` - ProjectColumn *ProjectColumn `json:"project_column,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// PublicEvent is triggered when a private repository is open sourced. -// According to GitHub: "Without a doubt: the best GitHub event." -// The Webhook event name is "public". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#publicevent -type PublicEvent struct { - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// PullRequestEvent is triggered when a pull request is assigned, unassigned, labeled, -// unlabeled, opened, edited, closed, reopened, synchronize, ready_for_review, -// locked, unlocked, a pull request review is requested, or a review request is removed. -// The Webhook event name is "pull_request". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pullrequestevent -type PullRequestEvent struct { - // Action is the action that was performed. Possible values are: - // "assigned", "unassigned", "review_requested", "review_request_removed", "labeled", "unlabeled", - // "opened", "edited", "closed", "ready_for_review", "locked", "unlocked", or "reopened". - // If the action is "closed" and the "merged" key is "false", the pull request was closed with unmerged commits. - // If the action is "closed" and the "merged" key is "true", the pull request was merged. - // While webhooks are also triggered when a pull request is synchronized, Events API timelines - // don't include pull request events with the "synchronize" action. - Action *string `json:"action,omitempty"` - Assignee *User `json:"assignee,omitempty"` - Number *int `json:"number,omitempty"` - PullRequest *PullRequest `json:"pull_request,omitempty"` - - // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - // RequestedReviewer is populated in "review_requested", "review_request_removed" event deliveries. - // A request affecting multiple reviewers at once is split into multiple - // such event deliveries, each with a single, different RequestedReviewer. - RequestedReviewer *User `json:"requested_reviewer,omitempty"` - // In the event that a team is requested instead of a user, "requested_team" gets sent in place of - // "requested_user" with the same delivery behavior. - RequestedTeam *Team `json:"requested_team,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` - Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries. - - // The following field is only present when the webhook is triggered on - // a repository belonging to an organization. - Organization *Organization `json:"organization,omitempty"` - - // The following fields are only populated when the Action is "synchronize". - Before *string `json:"before,omitempty"` - After *string `json:"after,omitempty"` -} - -// PullRequestReviewEvent is triggered when a review is submitted on a pull -// request. -// The Webhook event name is "pull_request_review". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent -type PullRequestReviewEvent struct { - // Action is always "submitted". - Action *string `json:"action,omitempty"` - Review *PullRequestReview `json:"review,omitempty"` - PullRequest *PullRequest `json:"pull_request,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` - - // The following field is only present when the webhook is triggered on - // a repository belonging to an organization. - Organization *Organization `json:"organization,omitempty"` -} - -// PullRequestReviewCommentEvent is triggered when a comment is created on a -// portion of the unified diff of a pull request. -// The Webhook event name is "pull_request_review_comment". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent -type PullRequestReviewCommentEvent struct { - // Action is the action that was performed on the comment. - // Possible values are: "created", "edited", "deleted". - Action *string `json:"action,omitempty"` - PullRequest *PullRequest `json:"pull_request,omitempty"` - Comment *PullRequestComment `json:"comment,omitempty"` - - // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// PushEvent represents a git push to a GitHub repository. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pushevent -type PushEvent struct { - PushID *int64 `json:"push_id,omitempty"` - Head *string `json:"head,omitempty"` - Ref *string `json:"ref,omitempty"` - Size *int `json:"size,omitempty"` - Commits []*HeadCommit `json:"commits,omitempty"` - Before *string `json:"before,omitempty"` - DistinctSize *int `json:"distinct_size,omitempty"` - - // The following fields are only populated by Webhook events. - After *string `json:"after,omitempty"` - Created *bool `json:"created,omitempty"` - Deleted *bool `json:"deleted,omitempty"` - Forced *bool `json:"forced,omitempty"` - BaseRef *string `json:"base_ref,omitempty"` - Compare *string `json:"compare,omitempty"` - Repo *PushEventRepository `json:"repository,omitempty"` - HeadCommit *HeadCommit `json:"head_commit,omitempty"` - Pusher *User `json:"pusher,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -func (p PushEvent) String() string { - return Stringify(p) -} - -// HeadCommit represents a git commit in a GitHub PushEvent. -type HeadCommit struct { - Message *string `json:"message,omitempty"` - Author *CommitAuthor `json:"author,omitempty"` - URL *string `json:"url,omitempty"` - Distinct *bool `json:"distinct,omitempty"` - - // The following fields are only populated by Events API. - SHA *string `json:"sha,omitempty"` - - // The following fields are only populated by Webhook events. - ID *string `json:"id,omitempty"` - TreeID *string `json:"tree_id,omitempty"` - Timestamp *Timestamp `json:"timestamp,omitempty"` - Committer *CommitAuthor `json:"committer,omitempty"` - Added []string `json:"added,omitempty"` - Removed []string `json:"removed,omitempty"` - Modified []string `json:"modified,omitempty"` -} - -func (p HeadCommit) String() string { - return Stringify(p) -} - -// PushEventRepository represents the repo object in a PushEvent payload. -type PushEventRepository struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Name *string `json:"name,omitempty"` - FullName *string `json:"full_name,omitempty"` - Owner *User `json:"owner,omitempty"` - Private *bool `json:"private,omitempty"` - Description *string `json:"description,omitempty"` - Fork *bool `json:"fork,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PushedAt *Timestamp `json:"pushed_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Homepage *string `json:"homepage,omitempty"` - PullsURL *string `json:"pulls_url,omitempty"` - Size *int `json:"size,omitempty"` - StargazersCount *int `json:"stargazers_count,omitempty"` - WatchersCount *int `json:"watchers_count,omitempty"` - Language *string `json:"language,omitempty"` - HasIssues *bool `json:"has_issues,omitempty"` - HasDownloads *bool `json:"has_downloads,omitempty"` - HasWiki *bool `json:"has_wiki,omitempty"` - HasPages *bool `json:"has_pages,omitempty"` - ForksCount *int `json:"forks_count,omitempty"` - Archived *bool `json:"archived,omitempty"` - Disabled *bool `json:"disabled,omitempty"` - OpenIssuesCount *int `json:"open_issues_count,omitempty"` - DefaultBranch *string `json:"default_branch,omitempty"` - MasterBranch *string `json:"master_branch,omitempty"` - Organization *string `json:"organization,omitempty"` - URL *string `json:"url,omitempty"` - ArchiveURL *string `json:"archive_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - StatusesURL *string `json:"statuses_url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - SSHURL *string `json:"ssh_url,omitempty"` - CloneURL *string `json:"clone_url,omitempty"` - SVNURL *string `json:"svn_url,omitempty"` -} - -// PushEventRepoOwner is a basic representation of user/org in a PushEvent payload. -type PushEventRepoOwner struct { - Name *string `json:"name,omitempty"` - Email *string `json:"email,omitempty"` -} - -// ReleaseEvent is triggered when a release is published, unpublished, created, -// edited, deleted, or prereleased. -// The Webhook event name is "release". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#releaseevent -type ReleaseEvent struct { - // Action is the action that was performed. Possible values are: "published", "unpublished", - // "created", "edited", "deleted", or "prereleased". - Action *string `json:"action,omitempty"` - Release *RepositoryRelease `json:"release,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// RepositoryEvent is triggered when a repository is created, archived, unarchived, -// renamed, edited, transferred, made public, or made private. Organization hooks are -// also trigerred when a repository is deleted. -// The Webhook event name is "repository". -// -// Events of this type are not visible in timelines, they are only used to -// trigger organization webhooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#repositoryevent -type RepositoryEvent struct { - // Action is the action that was performed. Possible values are: "created", - // "deleted" (organization hooks only), "archived", "unarchived", "edited", "renamed", - // "transferred", "publicized", or "privatized". - Action *string `json:"action,omitempty"` - Repo *Repository `json:"repository,omitempty"` - - // The following fields are only populated by Webhook events. - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// RepositoryDispatchEvent is triggered when a client sends a POST request to the repository dispatch event endpoint. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#repositorydispatchevent -type RepositoryDispatchEvent struct { - // Action is the event_type that submitted with the repository dispatch payload. Value can be any string. - Action *string `json:"action,omitempty"` - Branch *string `json:"branch,omitempty"` - ClientPayload json.RawMessage `json:"client_payload,omitempty"` - Repo *Repository `json:"repository,omitempty"` - - // The following fields are only populated by Webhook events. - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// RepositoryVulnerabilityAlertEvent is triggered when a security alert is created, dismissed, or resolved. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent -type RepositoryVulnerabilityAlertEvent struct { - // Action is the action that was performed. Possible values are: "create", "dismiss", "resolve". - Action *string `json:"action,omitempty"` - - //The security alert of the vulnerable dependency. - Alert *struct { - ID *int64 `json:"id,omitempty"` - AffectedRange *string `json:"affected_range,omitempty"` - AffectedPackageName *string `json:"affected_package_name,omitempty"` - ExternalReference *string `json:"external_reference,omitempty"` - ExternalIdentifier *string `json:"external_identifier,omitempty"` - FixedIn *string `json:"fixed_in,omitempty"` - Dismisser *User `json:"dismisser,omitempty"` - DismissReason *string `json:"dismiss_reason,omitempty"` - DismissedAt *Timestamp `json:"dismissed_at,omitempty"` - } `json:"alert,omitempty"` -} - -// StarEvent is triggered when a star is added or removed from a repository. -// The Webhook event name is "star". -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#starevent -type StarEvent struct { - // Action is the action that was performed. Possible values are: "created" or "deleted". - Action *string `json:"action,omitempty"` - - // StarredAt is the time the star was created. It will be null for the "deleted" action. - StarredAt *Timestamp `json:"starred_at,omitempty"` -} - -// StatusEvent is triggered when the status of a Git commit changes. -// The Webhook event name is "status". -// -// Events of this type are not visible in timelines, they are only used to -// trigger hooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#statusevent -type StatusEvent struct { - SHA *string `json:"sha,omitempty"` - // State is the new state. Possible values are: "pending", "success", "failure", "error". - State *string `json:"state,omitempty"` - Description *string `json:"description,omitempty"` - TargetURL *string `json:"target_url,omitempty"` - Branches []*Branch `json:"branches,omitempty"` - - // The following fields are only populated by Webhook events. - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Context *string `json:"context,omitempty"` - Commit *RepositoryCommit `json:"commit,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// TeamEvent is triggered when an organization's team is created, modified or deleted. -// The Webhook event name is "team". -// -// Events of this type are not visible in timelines. These events are only used -// to trigger hooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#teamevent -type TeamEvent struct { - Action *string `json:"action,omitempty"` - Team *Team `json:"team,omitempty"` - Changes *TeamChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - - // The following fields are only populated by Webhook events. - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// TeamAddEvent is triggered when a repository is added to a team. -// The Webhook event name is "team_add". -// -// Events of this type are not visible in timelines. These events are only used -// to trigger hooks. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#teamaddevent -type TeamAddEvent struct { - Team *Team `json:"team,omitempty"` - Repo *Repository `json:"repository,omitempty"` - - // The following fields are only populated by Webhook events. - Org *Organization `json:"organization,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} - -// UserEvent is triggered when a user is created or deleted. -// The Webhook event name is "user". -// -// Only global webhooks can subscribe to this event type. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/activity/events/types/#userevent-enterprise -type UserEvent struct { - User *User `json:"user,omitempty"` - // The action performed. Possible values are: "created" or "deleted". - Action *string `json:"action,omitempty"` - Enterprise *Enterprise `json:"enterprise,omitempty"` - Sender *User `json:"sender,omitempty"` -} - -// WatchEvent is related to starring a repository, not watching. See this API -// blog post for an explanation: https://developer.github.com/changes/2012-09-05-watcher-api/ -// -// The event’s actor is the user who starred a repository, and the event’s -// repository is the repository that was starred. -// -// GitHub API docs: https://developer.github.com/v3/activity/events/types/#watchevent -type WatchEvent struct { - // Action is the action that was performed. Possible value is: "started". - Action *string `json:"action,omitempty"` - - // The following fields are only populated by Webhook events. - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` -} diff --git a/vendor/github.com/google/go-github/v30/github/gists.go b/vendor/github.com/google/go-github/v30/github/gists.go deleted file mode 100644 index 0f326055..00000000 --- a/vendor/github.com/google/go-github/v30/github/gists.go +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "time" -) - -// GistsService handles communication with the Gist related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/gists/ -type GistsService service - -// Gist represents a GitHub's gist. -type Gist struct { - ID *string `json:"id,omitempty"` - Description *string `json:"description,omitempty"` - Public *bool `json:"public,omitempty"` - Owner *User `json:"owner,omitempty"` - Files map[GistFilename]GistFile `json:"files,omitempty"` - Comments *int `json:"comments,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - GitPullURL *string `json:"git_pull_url,omitempty"` - GitPushURL *string `json:"git_push_url,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (g Gist) String() string { - return Stringify(g) -} - -// GistFilename represents filename on a gist. -type GistFilename string - -// GistFile represents a file on a gist. -type GistFile struct { - Size *int `json:"size,omitempty"` - Filename *string `json:"filename,omitempty"` - Language *string `json:"language,omitempty"` - Type *string `json:"type,omitempty"` - RawURL *string `json:"raw_url,omitempty"` - Content *string `json:"content,omitempty"` -} - -func (g GistFile) String() string { - return Stringify(g) -} - -// GistCommit represents a commit on a gist. -type GistCommit struct { - URL *string `json:"url,omitempty"` - Version *string `json:"version,omitempty"` - User *User `json:"user,omitempty"` - ChangeStatus *CommitStats `json:"change_status,omitempty"` - CommittedAt *Timestamp `json:"committed_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (gc GistCommit) String() string { - return Stringify(gc) -} - -// GistFork represents a fork of a gist. -type GistFork struct { - URL *string `json:"url,omitempty"` - User *User `json:"user,omitempty"` - ID *string `json:"id,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (gf GistFork) String() string { - return Stringify(gf) -} - -// GistListOptions specifies the optional parameters to the -// GistsService.List, GistsService.ListAll, and GistsService.ListStarred methods. -type GistListOptions struct { - // Since filters Gists by time. - Since time.Time `url:"since,omitempty"` - - ListOptions -} - -// List gists for a user. Passing the empty string will list -// all public gists if called anonymously. However, if the call -// is authenticated, it will returns all gists for the authenticated -// user. -// -// GitHub API docs: https://developer.github.com/v3/gists/#list-gists -func (s *GistsService) List(ctx context.Context, user string, opts *GistListOptions) ([]*Gist, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/gists", user) - } else { - u = "gists" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var gists []*Gist - resp, err := s.client.Do(ctx, req, &gists) - if err != nil { - return nil, resp, err - } - - return gists, resp, nil -} - -// ListAll lists all public gists. -// -// GitHub API docs: https://developer.github.com/v3/gists/#list-gists -func (s *GistsService) ListAll(ctx context.Context, opts *GistListOptions) ([]*Gist, *Response, error) { - u, err := addOptions("gists/public", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var gists []*Gist - resp, err := s.client.Do(ctx, req, &gists) - if err != nil { - return nil, resp, err - } - - return gists, resp, nil -} - -// ListStarred lists starred gists of authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/gists/#list-gists -func (s *GistsService) ListStarred(ctx context.Context, opts *GistListOptions) ([]*Gist, *Response, error) { - u, err := addOptions("gists/starred", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var gists []*Gist - resp, err := s.client.Do(ctx, req, &gists) - if err != nil { - return nil, resp, err - } - - return gists, resp, nil -} - -// Get a single gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#get-a-single-gist -func (s *GistsService) Get(ctx context.Context, id string) (*Gist, *Response, error) { - u := fmt.Sprintf("gists/%v", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - gist := new(Gist) - resp, err := s.client.Do(ctx, req, gist) - if err != nil { - return nil, resp, err - } - - return gist, resp, nil -} - -// GetRevision gets a specific revision of a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist -func (s *GistsService) GetRevision(ctx context.Context, id, sha string) (*Gist, *Response, error) { - u := fmt.Sprintf("gists/%v/%v", id, sha) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - gist := new(Gist) - resp, err := s.client.Do(ctx, req, gist) - if err != nil { - return nil, resp, err - } - - return gist, resp, nil -} - -// Create a gist for authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/gists/#create-a-gist -func (s *GistsService) Create(ctx context.Context, gist *Gist) (*Gist, *Response, error) { - u := "gists" - req, err := s.client.NewRequest("POST", u, gist) - if err != nil { - return nil, nil, err - } - - g := new(Gist) - resp, err := s.client.Do(ctx, req, g) - if err != nil { - return nil, resp, err - } - - return g, resp, nil -} - -// Edit a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#edit-a-gist -func (s *GistsService) Edit(ctx context.Context, id string, gist *Gist) (*Gist, *Response, error) { - u := fmt.Sprintf("gists/%v", id) - req, err := s.client.NewRequest("PATCH", u, gist) - if err != nil { - return nil, nil, err - } - - g := new(Gist) - resp, err := s.client.Do(ctx, req, g) - if err != nil { - return nil, resp, err - } - - return g, resp, nil -} - -// ListCommits lists commits of a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#list-gist-commits -func (s *GistsService) ListCommits(ctx context.Context, id string, opts *ListOptions) ([]*GistCommit, *Response, error) { - u := fmt.Sprintf("gists/%v/commits", id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var gistCommits []*GistCommit - resp, err := s.client.Do(ctx, req, &gistCommits) - if err != nil { - return nil, resp, err - } - - return gistCommits, resp, nil -} - -// Delete a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#delete-a-gist -func (s *GistsService) Delete(ctx context.Context, id string) (*Response, error) { - u := fmt.Sprintf("gists/%v", id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// Star a gist on behalf of authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/gists/#star-a-gist -func (s *GistsService) Star(ctx context.Context, id string) (*Response, error) { - u := fmt.Sprintf("gists/%v/star", id) - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// Unstar a gist on a behalf of authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/gists/#unstar-a-gist -func (s *GistsService) Unstar(ctx context.Context, id string) (*Response, error) { - u := fmt.Sprintf("gists/%v/star", id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// IsStarred checks if a gist is starred by authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/gists/#check-if-a-gist-is-starred -func (s *GistsService) IsStarred(ctx context.Context, id string) (bool, *Response, error) { - u := fmt.Sprintf("gists/%v/star", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - resp, err := s.client.Do(ctx, req, nil) - starred, err := parseBoolResponse(err) - return starred, resp, err -} - -// Fork a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#fork-a-gist -func (s *GistsService) Fork(ctx context.Context, id string) (*Gist, *Response, error) { - u := fmt.Sprintf("gists/%v/forks", id) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - g := new(Gist) - resp, err := s.client.Do(ctx, req, g) - if err != nil { - return nil, resp, err - } - - return g, resp, nil -} - -// ListForks lists forks of a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/#list-gist-forks -func (s *GistsService) ListForks(ctx context.Context, id string, opts *ListOptions) ([]*GistFork, *Response, error) { - u := fmt.Sprintf("gists/%v/forks", id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var gistForks []*GistFork - resp, err := s.client.Do(ctx, req, &gistForks) - if err != nil { - return nil, resp, err - } - - return gistForks, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/gists_comments.go b/vendor/github.com/google/go-github/v30/github/gists_comments.go deleted file mode 100644 index 33913e22..00000000 --- a/vendor/github.com/google/go-github/v30/github/gists_comments.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// GistComment represents a Gist comment. -type GistComment struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Body *string `json:"body,omitempty"` - User *User `json:"user,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` -} - -func (g GistComment) String() string { - return Stringify(g) -} - -// ListComments lists all comments for a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist -func (s *GistsService) ListComments(ctx context.Context, gistID string, opts *ListOptions) ([]*GistComment, *Response, error) { - u := fmt.Sprintf("gists/%v/comments", gistID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var comments []*GistComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// GetComment retrieves a single comment from a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/comments/#get-a-single-comment -func (s *GistsService) GetComment(ctx context.Context, gistID string, commentID int64) (*GistComment, *Response, error) { - u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - c := new(GistComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// CreateComment creates a comment for a gist. -// -// GitHub API docs: https://developer.github.com/v3/gists/comments/#create-a-comment -func (s *GistsService) CreateComment(ctx context.Context, gistID string, comment *GistComment) (*GistComment, *Response, error) { - u := fmt.Sprintf("gists/%v/comments", gistID) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - - c := new(GistComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// EditComment edits an existing gist comment. -// -// GitHub API docs: https://developer.github.com/v3/gists/comments/#edit-a-comment -func (s *GistsService) EditComment(ctx context.Context, gistID string, commentID int64, comment *GistComment) (*GistComment, *Response, error) { - u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID) - req, err := s.client.NewRequest("PATCH", u, comment) - if err != nil { - return nil, nil, err - } - - c := new(GistComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// DeleteComment deletes a gist comment. -// -// GitHub API docs: https://developer.github.com/v3/gists/comments/#delete-a-comment -func (s *GistsService) DeleteComment(ctx context.Context, gistID string, commentID int64) (*Response, error) { - u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/git.go b/vendor/github.com/google/go-github/v30/github/git.go deleted file mode 100644 index 1ce47437..00000000 --- a/vendor/github.com/google/go-github/v30/github/git.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2013 The go-github 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 github - -// GitService handles communication with the git data related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/git/ -type GitService service diff --git a/vendor/github.com/google/go-github/v30/github/git_blobs.go b/vendor/github.com/google/go-github/v30/github/git_blobs.go deleted file mode 100644 index 70aee14a..00000000 --- a/vendor/github.com/google/go-github/v30/github/git_blobs.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "bytes" - "context" - "fmt" -) - -// Blob represents a blob object. -type Blob struct { - Content *string `json:"content,omitempty"` - Encoding *string `json:"encoding,omitempty"` - SHA *string `json:"sha,omitempty"` - Size *int `json:"size,omitempty"` - URL *string `json:"url,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -// GetBlob fetches a blob from a repo given a SHA. -// -// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob -func (s *GitService) GetBlob(ctx context.Context, owner string, repo string, sha string) (*Blob, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - blob := new(Blob) - resp, err := s.client.Do(ctx, req, blob) - return blob, resp, err -} - -// GetBlobRaw fetches a blob's contents from a repo. -// Unlike GetBlob, it returns the raw bytes rather than the base64-encoded data. -// -// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob -func (s *GitService) GetBlobRaw(ctx context.Context, owner, repo, sha string) ([]byte, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - req.Header.Set("Accept", "application/vnd.github.v3.raw") - - var buf bytes.Buffer - resp, err := s.client.Do(ctx, req, &buf) - return buf.Bytes(), resp, err -} - -// CreateBlob creates a blob object. -// -// GitHub API docs: https://developer.github.com/v3/git/blobs/#create-a-blob -func (s *GitService) CreateBlob(ctx context.Context, owner string, repo string, blob *Blob) (*Blob, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/blobs", owner, repo) - req, err := s.client.NewRequest("POST", u, blob) - if err != nil { - return nil, nil, err - } - - t := new(Blob) - resp, err := s.client.Do(ctx, req, t) - return t, resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/git_commits.go b/vendor/github.com/google/go-github/v30/github/git_commits.go deleted file mode 100644 index e1dba1cf..00000000 --- a/vendor/github.com/google/go-github/v30/github/git_commits.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "bytes" - "context" - "errors" - "fmt" - "strings" - "time" - - "golang.org/x/crypto/openpgp" -) - -// SignatureVerification represents GPG signature verification. -type SignatureVerification struct { - Verified *bool `json:"verified,omitempty"` - Reason *string `json:"reason,omitempty"` - Signature *string `json:"signature,omitempty"` - Payload *string `json:"payload,omitempty"` -} - -// Commit represents a GitHub commit. -type Commit struct { - SHA *string `json:"sha,omitempty"` - Author *CommitAuthor `json:"author,omitempty"` - Committer *CommitAuthor `json:"committer,omitempty"` - Message *string `json:"message,omitempty"` - Tree *Tree `json:"tree,omitempty"` - Parents []*Commit `json:"parents,omitempty"` - Stats *CommitStats `json:"stats,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - URL *string `json:"url,omitempty"` - Verification *SignatureVerification `json:"verification,omitempty"` - NodeID *string `json:"node_id,omitempty"` - - // CommentCount is the number of GitHub comments on the commit. This - // is only populated for requests that fetch GitHub data like - // Pulls.ListCommits, Repositories.ListCommits, etc. - CommentCount *int `json:"comment_count,omitempty"` - - // SigningKey denotes a key to sign the commit with. If not nil this key will - // be used to sign the commit. The private key must be present and already - // decrypted. Ignored if Verification.Signature is defined. - SigningKey *openpgp.Entity `json:"-"` -} - -func (c Commit) String() string { - return Stringify(c) -} - -// CommitAuthor represents the author or committer of a commit. The commit -// author may not correspond to a GitHub User. -type CommitAuthor struct { - Date *time.Time `json:"date,omitempty"` - Name *string `json:"name,omitempty"` - Email *string `json:"email,omitempty"` - - // The following fields are only populated by Webhook events. - Login *string `json:"username,omitempty"` // Renamed for go-github consistency. -} - -func (c CommitAuthor) String() string { - return Stringify(c) -} - -// GetCommit fetches the Commit object for a given SHA. -// -// GitHub API docs: https://developer.github.com/v3/git/commits/#get-a-commit -func (s *GitService) GetCommit(ctx context.Context, owner string, repo string, sha string) (*Commit, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/commits/%v", owner, repo, sha) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - c := new(Commit) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// createCommit represents the body of a CreateCommit request. -type createCommit struct { - Author *CommitAuthor `json:"author,omitempty"` - Committer *CommitAuthor `json:"committer,omitempty"` - Message *string `json:"message,omitempty"` - Tree *string `json:"tree,omitempty"` - Parents []string `json:"parents,omitempty"` - Signature *string `json:"signature,omitempty"` -} - -// CreateCommit creates a new commit in a repository. -// commit must not be nil. -// -// The commit.Committer is optional and will be filled with the commit.Author -// data if omitted. If the commit.Author is omitted, it will be filled in with -// the authenticated user’s information and the current date. -// -// GitHub API docs: https://developer.github.com/v3/git/commits/#create-a-commit -func (s *GitService) CreateCommit(ctx context.Context, owner string, repo string, commit *Commit) (*Commit, *Response, error) { - if commit == nil { - return nil, nil, fmt.Errorf("commit must be provided") - } - - u := fmt.Sprintf("repos/%v/%v/git/commits", owner, repo) - - parents := make([]string, len(commit.Parents)) - for i, parent := range commit.Parents { - parents[i] = *parent.SHA - } - - body := &createCommit{ - Author: commit.Author, - Committer: commit.Committer, - Message: commit.Message, - Parents: parents, - } - if commit.Tree != nil { - body.Tree = commit.Tree.SHA - } - if commit.SigningKey != nil { - signature, err := createSignature(commit.SigningKey, body) - if err != nil { - return nil, nil, err - } - body.Signature = &signature - } - if commit.Verification != nil { - body.Signature = commit.Verification.Signature - } - - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - c := new(Commit) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -func createSignature(signingKey *openpgp.Entity, commit *createCommit) (string, error) { - if signingKey == nil || commit == nil { - return "", errors.New("createSignature: invalid parameters") - } - - message, err := createSignatureMessage(commit) - if err != nil { - return "", err - } - - writer := new(bytes.Buffer) - reader := bytes.NewReader([]byte(message)) - if err := openpgp.ArmoredDetachSign(writer, signingKey, reader, nil); err != nil { - return "", err - } - - return writer.String(), nil -} - -func createSignatureMessage(commit *createCommit) (string, error) { - if commit == nil || commit.Message == nil || *commit.Message == "" || commit.Author == nil { - return "", errors.New("createSignatureMessage: invalid parameters") - } - - var message []string - - if commit.Tree != nil { - message = append(message, fmt.Sprintf("tree %s", *commit.Tree)) - } - - for _, parent := range commit.Parents { - message = append(message, fmt.Sprintf("parent %s", parent)) - } - - message = append(message, fmt.Sprintf("author %s <%s> %d %s", commit.Author.GetName(), commit.Author.GetEmail(), commit.Author.GetDate().Unix(), commit.Author.GetDate().Format("-0700"))) - - committer := commit.Committer - if committer == nil { - committer = commit.Author - } - - // There needs to be a double newline after committer - message = append(message, fmt.Sprintf("committer %s <%s> %d %s\n", committer.GetName(), committer.GetEmail(), committer.GetDate().Unix(), committer.GetDate().Format("-0700"))) - message = append(message, *commit.Message) - - return strings.Join(message, "\n"), nil -} diff --git a/vendor/github.com/google/go-github/v30/github/git_refs.go b/vendor/github.com/google/go-github/v30/github/git_refs.go deleted file mode 100644 index a6269e5a..00000000 --- a/vendor/github.com/google/go-github/v30/github/git_refs.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "net/url" - "strings" -) - -// Reference represents a GitHub reference. -type Reference struct { - Ref *string `json:"ref"` - URL *string `json:"url"` - Object *GitObject `json:"object"` - NodeID *string `json:"node_id,omitempty"` -} - -func (r Reference) String() string { - return Stringify(r) -} - -// GitObject represents a Git object. -type GitObject struct { - Type *string `json:"type"` - SHA *string `json:"sha"` - URL *string `json:"url"` -} - -func (o GitObject) String() string { - return Stringify(o) -} - -// createRefRequest represents the payload for creating a reference. -type createRefRequest struct { - Ref *string `json:"ref"` - SHA *string `json:"sha"` -} - -// updateRefRequest represents the payload for updating a reference. -type updateRefRequest struct { - SHA *string `json:"sha"` - Force *bool `json:"force"` -} - -// GetRef fetches a single Reference object for a given Git ref. -// If there is no exact match, GetRef will return an error. -// -// Note: The GitHub API can return multiple matches. -// If you wish to use this functionality please use the GetRefs() method. -// -// GitHub API docs: https://developer.github.com/v3/git/refs/#get-a-reference -func (s *GitService) GetRef(ctx context.Context, owner string, repo string, ref string) (*Reference, *Response, error) { - ref = strings.TrimPrefix(ref, "refs/") - u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, refURLEscape(ref)) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - r := new(Reference) - resp, err := s.client.Do(ctx, req, r) - if _, ok := err.(*json.UnmarshalTypeError); ok { - // Multiple refs, means there wasn't an exact match. - return nil, resp, errors.New("multiple matches found for this ref") - } else if _, ok := err.(*ErrorResponse); ok && resp.StatusCode == 404 { - // No ref, there was no match for the ref - return nil, resp, errors.New("no match found for this ref") - } else if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// refURLEscape escapes every path segment of the given ref. Those must -// not contain escaped "/" - as "%2F" - or github will not recognize it. -func refURLEscape(ref string) string { - parts := strings.Split(ref, "/") - for i, s := range parts { - parts[i] = url.PathEscape(s) - } - return strings.Join(parts, "/") -} - -// GetRefs fetches a slice of Reference objects for a given Git ref. -// If there is an exact match, only that ref is returned. -// If there is no exact match, GitHub returns all refs that start with ref. -// If returned error is nil, there will be at least 1 ref returned. -// For example: -// -// "heads/featureA" -> ["refs/heads/featureA"] // Exact match, single ref is returned. -// "heads/feature" -> ["refs/heads/featureA", "refs/heads/featureB"] // All refs that start with ref. -// "heads/notexist" -> [] // Returns an error. -// -// GitHub API docs: https://developer.github.com/v3/git/refs/#get-a-reference -func (s *GitService) GetRefs(ctx context.Context, owner string, repo string, ref string) ([]*Reference, *Response, error) { - ref = strings.TrimPrefix(ref, "refs/") - u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, refURLEscape(ref)) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var rawJSON json.RawMessage - resp, err := s.client.Do(ctx, req, &rawJSON) - if err != nil { - return nil, resp, err - } - - // Prioritize the most common case: a single returned ref. - r := new(Reference) - singleUnmarshalError := json.Unmarshal(rawJSON, r) - if singleUnmarshalError == nil { - return []*Reference{r}, resp, nil - } - - // Attempt to unmarshal multiple refs. - var rs []*Reference - multipleUnmarshalError := json.Unmarshal(rawJSON, &rs) - if multipleUnmarshalError == nil { - if len(rs) == 0 { - return nil, resp, fmt.Errorf("unexpected response from GitHub API: an array of refs with length 0") - } - return rs, resp, nil - } - - return nil, resp, fmt.Errorf("unmarshalling failed for both single and multiple refs: %s and %s", singleUnmarshalError, multipleUnmarshalError) -} - -// ReferenceListOptions specifies optional parameters to the -// GitService.ListRefs method. -type ReferenceListOptions struct { - Type string `url:"-"` - - ListOptions -} - -// ListRefs lists all refs in a repository. -// -// GitHub API docs: https://developer.github.com/v3/git/refs/#get-all-references -func (s *GitService) ListRefs(ctx context.Context, owner, repo string, opts *ReferenceListOptions) ([]*Reference, *Response, error) { - var u string - if opts != nil && opts.Type != "" { - u = fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, opts.Type) - } else { - u = fmt.Sprintf("repos/%v/%v/git/refs", owner, repo) - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var rs []*Reference - resp, err := s.client.Do(ctx, req, &rs) - if err != nil { - return nil, resp, err - } - - return rs, resp, nil -} - -// CreateRef creates a new ref in a repository. -// -// GitHub API docs: https://developer.github.com/v3/git/refs/#create-a-reference -func (s *GitService) CreateRef(ctx context.Context, owner string, repo string, ref *Reference) (*Reference, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/refs", owner, repo) - req, err := s.client.NewRequest("POST", u, &createRefRequest{ - // back-compat with previous behavior that didn't require 'refs/' prefix - Ref: String("refs/" + strings.TrimPrefix(*ref.Ref, "refs/")), - SHA: ref.Object.SHA, - }) - if err != nil { - return nil, nil, err - } - - r := new(Reference) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// UpdateRef updates an existing ref in a repository. -// -// GitHub API docs: https://developer.github.com/v3/git/refs/#update-a-reference -func (s *GitService) UpdateRef(ctx context.Context, owner string, repo string, ref *Reference, force bool) (*Reference, *Response, error) { - refPath := strings.TrimPrefix(*ref.Ref, "refs/") - u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, refPath) - req, err := s.client.NewRequest("PATCH", u, &updateRefRequest{ - SHA: ref.Object.SHA, - Force: &force, - }) - if err != nil { - return nil, nil, err - } - - r := new(Reference) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// DeleteRef deletes a ref from a repository. -// -// GitHub API docs: https://developer.github.com/v3/git/refs/#delete-a-reference -func (s *GitService) DeleteRef(ctx context.Context, owner string, repo string, ref string) (*Response, error) { - ref = strings.TrimPrefix(ref, "refs/") - u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, refURLEscape(ref)) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/git_tags.go b/vendor/github.com/google/go-github/v30/github/git_tags.go deleted file mode 100644 index abdbde68..00000000 --- a/vendor/github.com/google/go-github/v30/github/git_tags.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Tag represents a tag object. -type Tag struct { - Tag *string `json:"tag,omitempty"` - SHA *string `json:"sha,omitempty"` - URL *string `json:"url,omitempty"` - Message *string `json:"message,omitempty"` - Tagger *CommitAuthor `json:"tagger,omitempty"` - Object *GitObject `json:"object,omitempty"` - Verification *SignatureVerification `json:"verification,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -// createTagRequest represents the body of a CreateTag request. This is mostly -// identical to Tag with the exception that the object SHA and Type are -// top-level fields, rather than being nested inside a JSON object. -type createTagRequest struct { - Tag *string `json:"tag,omitempty"` - Message *string `json:"message,omitempty"` - Object *string `json:"object,omitempty"` - Type *string `json:"type,omitempty"` - Tagger *CommitAuthor `json:"tagger,omitempty"` -} - -// GetTag fetches a tag from a repo given a SHA. -// -// GitHub API docs: https://developer.github.com/v3/git/tags/#get-a-tag -func (s *GitService) GetTag(ctx context.Context, owner string, repo string, sha string) (*Tag, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/tags/%v", owner, repo, sha) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - tag := new(Tag) - resp, err := s.client.Do(ctx, req, tag) - return tag, resp, err -} - -// CreateTag creates a tag object. -// -// GitHub API docs: https://developer.github.com/v3/git/tags/#create-a-tag-object -func (s *GitService) CreateTag(ctx context.Context, owner string, repo string, tag *Tag) (*Tag, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/tags", owner, repo) - - // convert Tag into a createTagRequest - tagRequest := &createTagRequest{ - Tag: tag.Tag, - Message: tag.Message, - Tagger: tag.Tagger, - } - if tag.Object != nil { - tagRequest.Object = tag.Object.SHA - tagRequest.Type = tag.Object.Type - } - - req, err := s.client.NewRequest("POST", u, tagRequest) - if err != nil { - return nil, nil, err - } - - t := new(Tag) - resp, err := s.client.Do(ctx, req, t) - return t, resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/git_trees.go b/vendor/github.com/google/go-github/v30/github/git_trees.go deleted file mode 100644 index 7430876a..00000000 --- a/vendor/github.com/google/go-github/v30/github/git_trees.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "encoding/json" - "fmt" -) - -// Tree represents a GitHub tree. -type Tree struct { - SHA *string `json:"sha,omitempty"` - Entries []*TreeEntry `json:"tree,omitempty"` - - // Truncated is true if the number of items in the tree - // exceeded GitHub's maximum limit and the Entries were truncated - // in the response. Only populated for requests that fetch - // trees like Git.GetTree. - Truncated *bool `json:"truncated,omitempty"` -} - -func (t Tree) String() string { - return Stringify(t) -} - -// TreeEntry represents the contents of a tree structure. TreeEntry can -// represent either a blob, a commit (in the case of a submodule), or another -// tree. -type TreeEntry struct { - SHA *string `json:"sha,omitempty"` - Path *string `json:"path,omitempty"` - Mode *string `json:"mode,omitempty"` - Type *string `json:"type,omitempty"` - Size *int `json:"size,omitempty"` - Content *string `json:"content,omitempty"` - URL *string `json:"url,omitempty"` -} - -func (t TreeEntry) String() string { - return Stringify(t) -} - -// treeEntryWithFileDelete is used internally to delete a file whose -// Content and SHA fields are empty. It does this by removing the "omitempty" -// tag modifier on the SHA field which causes the GitHub API to receive -// {"sha":null} and thereby delete the file. -type treeEntryWithFileDelete struct { - SHA *string `json:"sha"` - Path *string `json:"path,omitempty"` - Mode *string `json:"mode,omitempty"` - Type *string `json:"type,omitempty"` - Size *int `json:"size,omitempty"` - Content *string `json:"content,omitempty"` - URL *string `json:"url,omitempty"` -} - -func (t *TreeEntry) MarshalJSON() ([]byte, error) { - if t.SHA == nil && t.Content == nil { - return json.Marshal(struct { - SHA *string `json:"sha"` - Path *string `json:"path,omitempty"` - Mode *string `json:"mode,omitempty"` - Type *string `json:"type,omitempty"` - }{ - nil, - t.Path, - t.Mode, - t.Type, - }) - } - return json.Marshal(struct { - SHA *string `json:"sha,omitempty"` - Path *string `json:"path,omitempty"` - Mode *string `json:"mode,omitempty"` - Type *string `json:"type,omitempty"` - Size *int `json:"size,omitempty"` - Content *string `json:"content,omitempty"` - URL *string `json:"url,omitempty"` - }{ - SHA: t.SHA, - Path: t.Path, - Mode: t.Mode, - Type: t.Type, - Size: t.Size, - Content: t.Content, - URL: t.URL, - }) -} - -// GetTree fetches the Tree object for a given sha hash from a repository. -// -// GitHub API docs: https://developer.github.com/v3/git/trees/#get-a-tree -func (s *GitService) GetTree(ctx context.Context, owner string, repo string, sha string, recursive bool) (*Tree, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/trees/%v", owner, repo, sha) - if recursive { - u += "?recursive=1" - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - t := new(Tree) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// createTree represents the body of a CreateTree request. -type createTree struct { - BaseTree string `json:"base_tree,omitempty"` - Entries []interface{} `json:"tree"` -} - -// CreateTree creates a new tree in a repository. If both a tree and a nested -// path modifying that tree are specified, it will overwrite the contents of -// that tree with the new path contents and write a new tree out. -// -// GitHub API docs: https://developer.github.com/v3/git/trees/#create-a-tree -func (s *GitService) CreateTree(ctx context.Context, owner string, repo string, baseTree string, entries []*TreeEntry) (*Tree, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/git/trees", owner, repo) - - newEntries := make([]interface{}, 0, len(entries)) - for _, entry := range entries { - if entry.Content == nil && entry.SHA == nil { - newEntries = append(newEntries, treeEntryWithFileDelete{ - Path: entry.Path, - Mode: entry.Mode, - Type: entry.Type, - Size: entry.Size, - URL: entry.URL, - }) - continue - } - newEntries = append(newEntries, entry) - } - - body := &createTree{ - BaseTree: baseTree, - Entries: newEntries, - } - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - t := new(Tree) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/github-accessors.go b/vendor/github.com/google/go-github/v30/github/github-accessors.go deleted file mode 100644 index 27e8b136..00000000 --- a/vendor/github.com/google/go-github/v30/github/github-accessors.go +++ /dev/null @@ -1,14485 +0,0 @@ -// Copyright 2017 The go-github 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 gen-accessors; DO NOT EDIT. - -package github - -import ( - "encoding/json" - "time" -) - -// GetRetryAfter returns the RetryAfter field if it's non-nil, zero value otherwise. -func (a *AbuseRateLimitError) GetRetryAfter() time.Duration { - if a == nil || a.RetryAfter == nil { - return 0 - } - return *a.RetryAfter -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (a *AdminEnforcement) GetURL() string { - if a == nil || a.URL == nil { - return "" - } - return *a.URL -} - -// GetComments returns the Comments field. -func (a *AdminStats) GetComments() *CommentStats { - if a == nil { - return nil - } - return a.Comments -} - -// GetGists returns the Gists field. -func (a *AdminStats) GetGists() *GistStats { - if a == nil { - return nil - } - return a.Gists -} - -// GetHooks returns the Hooks field. -func (a *AdminStats) GetHooks() *HookStats { - if a == nil { - return nil - } - return a.Hooks -} - -// GetIssues returns the Issues field. -func (a *AdminStats) GetIssues() *IssueStats { - if a == nil { - return nil - } - return a.Issues -} - -// GetMilestones returns the Milestones field. -func (a *AdminStats) GetMilestones() *MilestoneStats { - if a == nil { - return nil - } - return a.Milestones -} - -// GetOrgs returns the Orgs field. -func (a *AdminStats) GetOrgs() *OrgStats { - if a == nil { - return nil - } - return a.Orgs -} - -// GetPages returns the Pages field. -func (a *AdminStats) GetPages() *PageStats { - if a == nil { - return nil - } - return a.Pages -} - -// GetPulls returns the Pulls field. -func (a *AdminStats) GetPulls() *PullStats { - if a == nil { - return nil - } - return a.Pulls -} - -// GetRepos returns the Repos field. -func (a *AdminStats) GetRepos() *RepoStats { - if a == nil { - return nil - } - return a.Repos -} - -// GetUsers returns the Users field. -func (a *AdminStats) GetUsers() *UserStats { - if a == nil { - return nil - } - return a.Users -} - -// GetVerifiablePasswordAuthentication returns the VerifiablePasswordAuthentication field if it's non-nil, zero value otherwise. -func (a *APIMeta) GetVerifiablePasswordAuthentication() bool { - if a == nil || a.VerifiablePasswordAuthentication == nil { - return false - } - return *a.VerifiablePasswordAuthentication -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (a *App) GetCreatedAt() Timestamp { - if a == nil || a.CreatedAt == nil { - return Timestamp{} - } - return *a.CreatedAt -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (a *App) GetDescription() string { - if a == nil || a.Description == nil { - return "" - } - return *a.Description -} - -// GetExternalURL returns the ExternalURL field if it's non-nil, zero value otherwise. -func (a *App) GetExternalURL() string { - if a == nil || a.ExternalURL == nil { - return "" - } - return *a.ExternalURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (a *App) GetHTMLURL() string { - if a == nil || a.HTMLURL == nil { - return "" - } - return *a.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *App) GetID() int64 { - if a == nil || a.ID == nil { - return 0 - } - return *a.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (a *App) GetName() string { - if a == nil || a.Name == nil { - return "" - } - return *a.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (a *App) GetNodeID() string { - if a == nil || a.NodeID == nil { - return "" - } - return *a.NodeID -} - -// GetOwner returns the Owner field. -func (a *App) GetOwner() *User { - if a == nil { - return nil - } - return a.Owner -} - -// GetPermissions returns the Permissions field. -func (a *App) GetPermissions() *InstallationPermissions { - if a == nil { - return nil - } - return a.Permissions -} - -// GetSlug returns the Slug field if it's non-nil, zero value otherwise. -func (a *App) GetSlug() string { - if a == nil || a.Slug == nil { - return "" - } - return *a.Slug -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (a *App) GetUpdatedAt() Timestamp { - if a == nil || a.UpdatedAt == nil { - return Timestamp{} - } - return *a.UpdatedAt -} - -// GetClientID returns the ClientID field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetClientID() string { - if a == nil || a.ClientID == nil { - return "" - } - return *a.ClientID -} - -// GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetClientSecret() string { - if a == nil || a.ClientSecret == nil { - return "" - } - return *a.ClientSecret -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetCreatedAt() Timestamp { - if a == nil || a.CreatedAt == nil { - return Timestamp{} - } - return *a.CreatedAt -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetDescription() string { - if a == nil || a.Description == nil { - return "" - } - return *a.Description -} - -// GetExternalURL returns the ExternalURL field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetExternalURL() string { - if a == nil || a.ExternalURL == nil { - return "" - } - return *a.ExternalURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetHTMLURL() string { - if a == nil || a.HTMLURL == nil { - return "" - } - return *a.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetID() int64 { - if a == nil || a.ID == nil { - return 0 - } - return *a.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetName() string { - if a == nil || a.Name == nil { - return "" - } - return *a.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetNodeID() string { - if a == nil || a.NodeID == nil { - return "" - } - return *a.NodeID -} - -// GetOwner returns the Owner field. -func (a *AppConfig) GetOwner() *User { - if a == nil { - return nil - } - return a.Owner -} - -// GetPEM returns the PEM field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetPEM() string { - if a == nil || a.PEM == nil { - return "" - } - return *a.PEM -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetUpdatedAt() Timestamp { - if a == nil || a.UpdatedAt == nil { - return Timestamp{} - } - return *a.UpdatedAt -} - -// GetWebhookSecret returns the WebhookSecret field if it's non-nil, zero value otherwise. -func (a *AppConfig) GetWebhookSecret() string { - if a == nil || a.WebhookSecret == nil { - return "" - } - return *a.WebhookSecret -} - -// GetArchiveDownloadURL returns the ArchiveDownloadURL field if it's non-nil, zero value otherwise. -func (a *Artifact) GetArchiveDownloadURL() string { - if a == nil || a.ArchiveDownloadURL == nil { - return "" - } - return *a.ArchiveDownloadURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (a *Artifact) GetCreatedAt() Timestamp { - if a == nil || a.CreatedAt == nil { - return Timestamp{} - } - return *a.CreatedAt -} - -// GetExpired returns the Expired field if it's non-nil, zero value otherwise. -func (a *Artifact) GetExpired() bool { - if a == nil || a.Expired == nil { - return false - } - return *a.Expired -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (a *Artifact) GetExpiresAt() Timestamp { - if a == nil || a.ExpiresAt == nil { - return Timestamp{} - } - return *a.ExpiresAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *Artifact) GetID() int64 { - if a == nil || a.ID == nil { - return 0 - } - return *a.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (a *Artifact) GetName() string { - if a == nil || a.Name == nil { - return "" - } - return *a.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (a *Artifact) GetNodeID() string { - if a == nil || a.NodeID == nil { - return "" - } - return *a.NodeID -} - -// GetSizeInBytes returns the SizeInBytes field if it's non-nil, zero value otherwise. -func (a *Artifact) GetSizeInBytes() int64 { - if a == nil || a.SizeInBytes == nil { - return 0 - } - return *a.SizeInBytes -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (a *ArtifactList) GetTotalCount() int64 { - if a == nil || a.TotalCount == nil { - return 0 - } - return *a.TotalCount -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (a *Attachment) GetBody() string { - if a == nil || a.Body == nil { - return "" - } - return *a.Body -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *Attachment) GetID() int64 { - if a == nil || a.ID == nil { - return 0 - } - return *a.ID -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (a *Attachment) GetTitle() string { - if a == nil || a.Title == nil { - return "" - } - return *a.Title -} - -// GetApp returns the App field. -func (a *Authorization) GetApp() *AuthorizationApp { - if a == nil { - return nil - } - return a.App -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (a *Authorization) GetCreatedAt() Timestamp { - if a == nil || a.CreatedAt == nil { - return Timestamp{} - } - return *a.CreatedAt -} - -// GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. -func (a *Authorization) GetFingerprint() string { - if a == nil || a.Fingerprint == nil { - return "" - } - return *a.Fingerprint -} - -// GetHashedToken returns the HashedToken field if it's non-nil, zero value otherwise. -func (a *Authorization) GetHashedToken() string { - if a == nil || a.HashedToken == nil { - return "" - } - return *a.HashedToken -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *Authorization) GetID() int64 { - if a == nil || a.ID == nil { - return 0 - } - return *a.ID -} - -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (a *Authorization) GetNote() string { - if a == nil || a.Note == nil { - return "" - } - return *a.Note -} - -// GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise. -func (a *Authorization) GetNoteURL() string { - if a == nil || a.NoteURL == nil { - return "" - } - return *a.NoteURL -} - -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (a *Authorization) GetToken() string { - if a == nil || a.Token == nil { - return "" - } - return *a.Token -} - -// GetTokenLastEight returns the TokenLastEight field if it's non-nil, zero value otherwise. -func (a *Authorization) GetTokenLastEight() string { - if a == nil || a.TokenLastEight == nil { - return "" - } - return *a.TokenLastEight -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (a *Authorization) GetUpdatedAt() Timestamp { - if a == nil || a.UpdatedAt == nil { - return Timestamp{} - } - return *a.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (a *Authorization) GetURL() string { - if a == nil || a.URL == nil { - return "" - } - return *a.URL -} - -// GetUser returns the User field. -func (a *Authorization) GetUser() *User { - if a == nil { - return nil - } - return a.User -} - -// GetClientID returns the ClientID field if it's non-nil, zero value otherwise. -func (a *AuthorizationApp) GetClientID() string { - if a == nil || a.ClientID == nil { - return "" - } - return *a.ClientID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (a *AuthorizationApp) GetName() string { - if a == nil || a.Name == nil { - return "" - } - return *a.Name -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (a *AuthorizationApp) GetURL() string { - if a == nil || a.URL == nil { - return "" - } - return *a.URL -} - -// GetClientID returns the ClientID field if it's non-nil, zero value otherwise. -func (a *AuthorizationRequest) GetClientID() string { - if a == nil || a.ClientID == nil { - return "" - } - return *a.ClientID -} - -// GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise. -func (a *AuthorizationRequest) GetClientSecret() string { - if a == nil || a.ClientSecret == nil { - return "" - } - return *a.ClientSecret -} - -// GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. -func (a *AuthorizationRequest) GetFingerprint() string { - if a == nil || a.Fingerprint == nil { - return "" - } - return *a.Fingerprint -} - -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (a *AuthorizationRequest) GetNote() string { - if a == nil || a.Note == nil { - return "" - } - return *a.Note -} - -// GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise. -func (a *AuthorizationRequest) GetNoteURL() string { - if a == nil || a.NoteURL == nil { - return "" - } - return *a.NoteURL -} - -// GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. -func (a *AuthorizationUpdateRequest) GetFingerprint() string { - if a == nil || a.Fingerprint == nil { - return "" - } - return *a.Fingerprint -} - -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (a *AuthorizationUpdateRequest) GetNote() string { - if a == nil || a.Note == nil { - return "" - } - return *a.Note -} - -// GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise. -func (a *AuthorizationUpdateRequest) GetNoteURL() string { - if a == nil || a.NoteURL == nil { - return "" - } - return *a.NoteURL -} - -// GetAppID returns the AppID field if it's non-nil, zero value otherwise. -func (a *AutoTriggerCheck) GetAppID() int64 { - if a == nil || a.AppID == nil { - return 0 - } - return *a.AppID -} - -// GetSetting returns the Setting field if it's non-nil, zero value otherwise. -func (a *AutoTriggerCheck) GetSetting() bool { - if a == nil || a.Setting == nil { - return false - } - return *a.Setting -} - -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (b *Blob) GetContent() string { - if b == nil || b.Content == nil { - return "" - } - return *b.Content -} - -// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. -func (b *Blob) GetEncoding() string { - if b == nil || b.Encoding == nil { - return "" - } - return *b.Encoding -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (b *Blob) GetNodeID() string { - if b == nil || b.NodeID == nil { - return "" - } - return *b.NodeID -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (b *Blob) GetSHA() string { - if b == nil || b.SHA == nil { - return "" - } - return *b.SHA -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (b *Blob) GetSize() int { - if b == nil || b.Size == nil { - return 0 - } - return *b.Size -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (b *Blob) GetURL() string { - if b == nil || b.URL == nil { - return "" - } - return *b.URL -} - -// GetCommit returns the Commit field. -func (b *Branch) GetCommit() *RepositoryCommit { - if b == nil { - return nil - } - return b.Commit -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (b *Branch) GetName() string { - if b == nil || b.Name == nil { - return "" - } - return *b.Name -} - -// GetProtected returns the Protected field if it's non-nil, zero value otherwise. -func (b *Branch) GetProtected() bool { - if b == nil || b.Protected == nil { - return false - } - return *b.Protected -} - -// GetCommit returns the Commit field. -func (b *BranchCommit) GetCommit() *Commit { - if b == nil { - return nil - } - return b.Commit -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (b *BranchCommit) GetName() string { - if b == nil || b.Name == nil { - return "" - } - return *b.Name -} - -// GetProtected returns the Protected field if it's non-nil, zero value otherwise. -func (b *BranchCommit) GetProtected() bool { - if b == nil || b.Protected == nil { - return false - } - return *b.Protected -} - -// GetProtected returns the Protected field if it's non-nil, zero value otherwise. -func (b *BranchListOptions) GetProtected() bool { - if b == nil || b.Protected == nil { - return false - } - return *b.Protected -} - -// GetApp returns the App field. -func (c *CheckRun) GetApp() *App { - if c == nil { - return nil - } - return c.App -} - -// GetCheckSuite returns the CheckSuite field. -func (c *CheckRun) GetCheckSuite() *CheckSuite { - if c == nil { - return nil - } - return c.CheckSuite -} - -// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetCompletedAt() Timestamp { - if c == nil || c.CompletedAt == nil { - return Timestamp{} - } - return *c.CompletedAt -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetConclusion() string { - if c == nil || c.Conclusion == nil { - return "" - } - return *c.Conclusion -} - -// GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetDetailsURL() string { - if c == nil || c.DetailsURL == nil { - return "" - } - return *c.DetailsURL -} - -// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetExternalID() string { - if c == nil || c.ExternalID == nil { - return "" - } - return *c.ExternalID -} - -// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetHeadSHA() string { - if c == nil || c.HeadSHA == nil { - return "" - } - return *c.HeadSHA -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetID() int64 { - if c == nil || c.ID == nil { - return 0 - } - return *c.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetName() string { - if c == nil || c.Name == nil { - return "" - } - return *c.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetNodeID() string { - if c == nil || c.NodeID == nil { - return "" - } - return *c.NodeID -} - -// GetOutput returns the Output field. -func (c *CheckRun) GetOutput() *CheckRunOutput { - if c == nil { - return nil - } - return c.Output -} - -// GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetStartedAt() Timestamp { - if c == nil || c.StartedAt == nil { - return Timestamp{} - } - return *c.StartedAt -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetStatus() string { - if c == nil || c.Status == nil { - return "" - } - return *c.Status -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CheckRun) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetAnnotationLevel returns the AnnotationLevel field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetAnnotationLevel() string { - if c == nil || c.AnnotationLevel == nil { - return "" - } - return *c.AnnotationLevel -} - -// GetEndColumn returns the EndColumn field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetEndColumn() int { - if c == nil || c.EndColumn == nil { - return 0 - } - return *c.EndColumn -} - -// GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetEndLine() int { - if c == nil || c.EndLine == nil { - return 0 - } - return *c.EndLine -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetMessage() string { - if c == nil || c.Message == nil { - return "" - } - return *c.Message -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetPath() string { - if c == nil || c.Path == nil { - return "" - } - return *c.Path -} - -// GetRawDetails returns the RawDetails field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetRawDetails() string { - if c == nil || c.RawDetails == nil { - return "" - } - return *c.RawDetails -} - -// GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetStartColumn() int { - if c == nil || c.StartColumn == nil { - return 0 - } - return *c.StartColumn -} - -// GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetStartLine() int { - if c == nil || c.StartLine == nil { - return 0 - } - return *c.StartLine -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (c *CheckRunAnnotation) GetTitle() string { - if c == nil || c.Title == nil { - return "" - } - return *c.Title -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (c *CheckRunEvent) GetAction() string { - if c == nil || c.Action == nil { - return "" - } - return *c.Action -} - -// GetCheckRun returns the CheckRun field. -func (c *CheckRunEvent) GetCheckRun() *CheckRun { - if c == nil { - return nil - } - return c.CheckRun -} - -// GetInstallation returns the Installation field. -func (c *CheckRunEvent) GetInstallation() *Installation { - if c == nil { - return nil - } - return c.Installation -} - -// GetOrg returns the Org field. -func (c *CheckRunEvent) GetOrg() *Organization { - if c == nil { - return nil - } - return c.Org -} - -// GetRepo returns the Repo field. -func (c *CheckRunEvent) GetRepo() *Repository { - if c == nil { - return nil - } - return c.Repo -} - -// GetRequestedAction returns the RequestedAction field. -func (c *CheckRunEvent) GetRequestedAction() *RequestedAction { - if c == nil { - return nil - } - return c.RequestedAction -} - -// GetSender returns the Sender field. -func (c *CheckRunEvent) GetSender() *User { - if c == nil { - return nil - } - return c.Sender -} - -// GetAlt returns the Alt field if it's non-nil, zero value otherwise. -func (c *CheckRunImage) GetAlt() string { - if c == nil || c.Alt == nil { - return "" - } - return *c.Alt -} - -// GetCaption returns the Caption field if it's non-nil, zero value otherwise. -func (c *CheckRunImage) GetCaption() string { - if c == nil || c.Caption == nil { - return "" - } - return *c.Caption -} - -// GetImageURL returns the ImageURL field if it's non-nil, zero value otherwise. -func (c *CheckRunImage) GetImageURL() string { - if c == nil || c.ImageURL == nil { - return "" - } - return *c.ImageURL -} - -// GetAnnotationsCount returns the AnnotationsCount field if it's non-nil, zero value otherwise. -func (c *CheckRunOutput) GetAnnotationsCount() int { - if c == nil || c.AnnotationsCount == nil { - return 0 - } - return *c.AnnotationsCount -} - -// GetAnnotationsURL returns the AnnotationsURL field if it's non-nil, zero value otherwise. -func (c *CheckRunOutput) GetAnnotationsURL() string { - if c == nil || c.AnnotationsURL == nil { - return "" - } - return *c.AnnotationsURL -} - -// GetSummary returns the Summary field if it's non-nil, zero value otherwise. -func (c *CheckRunOutput) GetSummary() string { - if c == nil || c.Summary == nil { - return "" - } - return *c.Summary -} - -// GetText returns the Text field if it's non-nil, zero value otherwise. -func (c *CheckRunOutput) GetText() string { - if c == nil || c.Text == nil { - return "" - } - return *c.Text -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (c *CheckRunOutput) GetTitle() string { - if c == nil || c.Title == nil { - return "" - } - return *c.Title -} - -// GetAfterSHA returns the AfterSHA field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetAfterSHA() string { - if c == nil || c.AfterSHA == nil { - return "" - } - return *c.AfterSHA -} - -// GetApp returns the App field. -func (c *CheckSuite) GetApp() *App { - if c == nil { - return nil - } - return c.App -} - -// GetBeforeSHA returns the BeforeSHA field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetBeforeSHA() string { - if c == nil || c.BeforeSHA == nil { - return "" - } - return *c.BeforeSHA -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetConclusion() string { - if c == nil || c.Conclusion == nil { - return "" - } - return *c.Conclusion -} - -// GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetHeadBranch() string { - if c == nil || c.HeadBranch == nil { - return "" - } - return *c.HeadBranch -} - -// GetHeadCommit returns the HeadCommit field. -func (c *CheckSuite) GetHeadCommit() *Commit { - if c == nil { - return nil - } - return c.HeadCommit -} - -// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetHeadSHA() string { - if c == nil || c.HeadSHA == nil { - return "" - } - return *c.HeadSHA -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetID() int64 { - if c == nil || c.ID == nil { - return 0 - } - return *c.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetNodeID() string { - if c == nil || c.NodeID == nil { - return "" - } - return *c.NodeID -} - -// GetRepository returns the Repository field. -func (c *CheckSuite) GetRepository() *Repository { - if c == nil { - return nil - } - return c.Repository -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetStatus() string { - if c == nil || c.Status == nil { - return "" - } - return *c.Status -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CheckSuite) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (c *CheckSuiteEvent) GetAction() string { - if c == nil || c.Action == nil { - return "" - } - return *c.Action -} - -// GetCheckSuite returns the CheckSuite field. -func (c *CheckSuiteEvent) GetCheckSuite() *CheckSuite { - if c == nil { - return nil - } - return c.CheckSuite -} - -// GetInstallation returns the Installation field. -func (c *CheckSuiteEvent) GetInstallation() *Installation { - if c == nil { - return nil - } - return c.Installation -} - -// GetOrg returns the Org field. -func (c *CheckSuiteEvent) GetOrg() *Organization { - if c == nil { - return nil - } - return c.Org -} - -// GetRepo returns the Repo field. -func (c *CheckSuiteEvent) GetRepo() *Repository { - if c == nil { - return nil - } - return c.Repo -} - -// GetSender returns the Sender field. -func (c *CheckSuiteEvent) GetSender() *User { - if c == nil { - return nil - } - return c.Sender -} - -// GetPreferences returns the Preferences field. -func (c *CheckSuitePreferenceResults) GetPreferences() *PreferenceList { - if c == nil { - return nil - } - return c.Preferences -} - -// GetRepository returns the Repository field. -func (c *CheckSuitePreferenceResults) GetRepository() *Repository { - if c == nil { - return nil - } - return c.Repository -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetBody() string { - if c == nil || c.Body == nil { - return "" - } - return *c.Body -} - -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetKey() string { - if c == nil || c.Key == nil { - return "" - } - return *c.Key -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetName() string { - if c == nil || c.Name == nil { - return "" - } - return *c.Name -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetName() string { - if c == nil || c.Name == nil { - return "" - } - return *c.Name -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetPath() string { - if c == nil || c.Path == nil { - return "" - } - return *c.Path -} - -// GetRepository returns the Repository field. -func (c *CodeResult) GetRepository() *Repository { - if c == nil { - return nil - } - return c.Repository -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetSHA() string { - if c == nil || c.SHA == nil { - return "" - } - return *c.SHA -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (c *CodeSearchResult) GetIncompleteResults() bool { - if c == nil || c.IncompleteResults == nil { - return false - } - return *c.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *CodeSearchResult) GetTotal() int { - if c == nil || c.Total == nil { - return 0 - } - return *c.Total -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (c *CollaboratorInvitation) GetCreatedAt() Timestamp { - if c == nil || c.CreatedAt == nil { - return Timestamp{} - } - return *c.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CollaboratorInvitation) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (c *CollaboratorInvitation) GetID() int64 { - if c == nil || c.ID == nil { - return 0 - } - return *c.ID -} - -// GetInvitee returns the Invitee field. -func (c *CollaboratorInvitation) GetInvitee() *User { - if c == nil { - return nil - } - return c.Invitee -} - -// GetInviter returns the Inviter field. -func (c *CollaboratorInvitation) GetInviter() *User { - if c == nil { - return nil - } - return c.Inviter -} - -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (c *CollaboratorInvitation) GetPermissions() string { - if c == nil || c.Permissions == nil { - return "" - } - return *c.Permissions -} - -// GetRepo returns the Repo field. -func (c *CollaboratorInvitation) GetRepo() *Repository { - if c == nil { - return nil - } - return c.Repo -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CollaboratorInvitation) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetCommitURL() string { - if c == nil || c.CommitURL == nil { - return "" - } - return *c.CommitURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetName() string { - if c == nil || c.Name == nil { - return "" - } - return *c.Name -} - -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetRepositoryURL() string { - if c == nil || c.RepositoryURL == nil { - return "" - } - return *c.RepositoryURL -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetSHA() string { - if c == nil || c.SHA == nil { - return "" - } - return *c.SHA -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetState() string { - if c == nil || c.State == nil { - return "" - } - return *c.State -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetTotalCount() int { - if c == nil || c.TotalCount == nil { - return 0 - } - return *c.TotalCount -} - -// GetTotalCommitComments returns the TotalCommitComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalCommitComments() int { - if c == nil || c.TotalCommitComments == nil { - return 0 - } - return *c.TotalCommitComments -} - -// GetTotalGistComments returns the TotalGistComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalGistComments() int { - if c == nil || c.TotalGistComments == nil { - return 0 - } - return *c.TotalGistComments -} - -// GetTotalIssueComments returns the TotalIssueComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalIssueComments() int { - if c == nil || c.TotalIssueComments == nil { - return 0 - } - return *c.TotalIssueComments -} - -// GetTotalPullRequestComments returns the TotalPullRequestComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalPullRequestComments() int { - if c == nil || c.TotalPullRequestComments == nil { - return 0 - } - return *c.TotalPullRequestComments -} - -// GetAuthor returns the Author field. -func (c *Commit) GetAuthor() *CommitAuthor { - if c == nil { - return nil - } - return c.Author -} - -// GetCommentCount returns the CommentCount field if it's non-nil, zero value otherwise. -func (c *Commit) GetCommentCount() int { - if c == nil || c.CommentCount == nil { - return 0 - } - return *c.CommentCount -} - -// GetCommitter returns the Committer field. -func (c *Commit) GetCommitter() *CommitAuthor { - if c == nil { - return nil - } - return c.Committer -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *Commit) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (c *Commit) GetMessage() string { - if c == nil || c.Message == nil { - return "" - } - return *c.Message -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (c *Commit) GetNodeID() string { - if c == nil || c.NodeID == nil { - return "" - } - return *c.NodeID -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *Commit) GetSHA() string { - if c == nil || c.SHA == nil { - return "" - } - return *c.SHA -} - -// GetStats returns the Stats field. -func (c *Commit) GetStats() *CommitStats { - if c == nil { - return nil - } - return c.Stats -} - -// GetTree returns the Tree field. -func (c *Commit) GetTree() *Tree { - if c == nil { - return nil - } - return c.Tree -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *Commit) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetVerification returns the Verification field. -func (c *Commit) GetVerification() *SignatureVerification { - if c == nil { - return nil - } - return c.Verification -} - -// GetDate returns the Date field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetDate() time.Time { - if c == nil || c.Date == nil { - return time.Time{} - } - return *c.Date -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetEmail() string { - if c == nil || c.Email == nil { - return "" - } - return *c.Email -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetLogin() string { - if c == nil || c.Login == nil { - return "" - } - return *c.Login -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetName() string { - if c == nil || c.Name == nil { - return "" - } - return *c.Name -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (c *CommitCommentEvent) GetAction() string { - if c == nil || c.Action == nil { - return "" - } - return *c.Action -} - -// GetComment returns the Comment field. -func (c *CommitCommentEvent) GetComment() *RepositoryComment { - if c == nil { - return nil - } - return c.Comment -} - -// GetInstallation returns the Installation field. -func (c *CommitCommentEvent) GetInstallation() *Installation { - if c == nil { - return nil - } - return c.Installation -} - -// GetRepo returns the Repo field. -func (c *CommitCommentEvent) GetRepo() *Repository { - if c == nil { - return nil - } - return c.Repo -} - -// GetSender returns the Sender field. -func (c *CommitCommentEvent) GetSender() *User { - if c == nil { - return nil - } - return c.Sender -} - -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetAdditions() int { - if c == nil || c.Additions == nil { - return 0 - } - return *c.Additions -} - -// GetBlobURL returns the BlobURL field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetBlobURL() string { - if c == nil || c.BlobURL == nil { - return "" - } - return *c.BlobURL -} - -// GetChanges returns the Changes field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetChanges() int { - if c == nil || c.Changes == nil { - return 0 - } - return *c.Changes -} - -// GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetContentsURL() string { - if c == nil || c.ContentsURL == nil { - return "" - } - return *c.ContentsURL -} - -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetDeletions() int { - if c == nil || c.Deletions == nil { - return 0 - } - return *c.Deletions -} - -// GetFilename returns the Filename field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetFilename() string { - if c == nil || c.Filename == nil { - return "" - } - return *c.Filename -} - -// GetPatch returns the Patch field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetPatch() string { - if c == nil || c.Patch == nil { - return "" - } - return *c.Patch -} - -// GetPreviousFilename returns the PreviousFilename field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetPreviousFilename() string { - if c == nil || c.PreviousFilename == nil { - return "" - } - return *c.PreviousFilename -} - -// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetRawURL() string { - if c == nil || c.RawURL == nil { - return "" - } - return *c.RawURL -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetSHA() string { - if c == nil || c.SHA == nil { - return "" - } - return *c.SHA -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetStatus() string { - if c == nil || c.Status == nil { - return "" - } - return *c.Status -} - -// GetAuthor returns the Author field. -func (c *CommitResult) GetAuthor() *User { - if c == nil { - return nil - } - return c.Author -} - -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetCommentsURL() string { - if c == nil || c.CommentsURL == nil { - return "" - } - return *c.CommentsURL -} - -// GetCommit returns the Commit field. -func (c *CommitResult) GetCommit() *Commit { - if c == nil { - return nil - } - return c.Commit -} - -// GetCommitter returns the Committer field. -func (c *CommitResult) GetCommitter() *User { - if c == nil { - return nil - } - return c.Committer -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetRepository returns the Repository field. -func (c *CommitResult) GetRepository() *Repository { - if c == nil { - return nil - } - return c.Repository -} - -// GetScore returns the Score field. -func (c *CommitResult) GetScore() *float64 { - if c == nil { - return nil - } - return c.Score -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetSHA() string { - if c == nil || c.SHA == nil { - return "" - } - return *c.SHA -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetAheadBy returns the AheadBy field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetAheadBy() int { - if c == nil || c.AheadBy == nil { - return 0 - } - return *c.AheadBy -} - -// GetBaseCommit returns the BaseCommit field. -func (c *CommitsComparison) GetBaseCommit() *RepositoryCommit { - if c == nil { - return nil - } - return c.BaseCommit -} - -// GetBehindBy returns the BehindBy field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetBehindBy() int { - if c == nil || c.BehindBy == nil { - return 0 - } - return *c.BehindBy -} - -// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetDiffURL() string { - if c == nil || c.DiffURL == nil { - return "" - } - return *c.DiffURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetMergeBaseCommit returns the MergeBaseCommit field. -func (c *CommitsComparison) GetMergeBaseCommit() *RepositoryCommit { - if c == nil { - return nil - } - return c.MergeBaseCommit -} - -// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetPatchURL() string { - if c == nil || c.PatchURL == nil { - return "" - } - return *c.PatchURL -} - -// GetPermalinkURL returns the PermalinkURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetPermalinkURL() string { - if c == nil || c.PermalinkURL == nil { - return "" - } - return *c.PermalinkURL -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetStatus() string { - if c == nil || c.Status == nil { - return "" - } - return *c.Status -} - -// GetTotalCommits returns the TotalCommits field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetTotalCommits() int { - if c == nil || c.TotalCommits == nil { - return 0 - } - return *c.TotalCommits -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (c *CommitsSearchResult) GetIncompleteResults() bool { - if c == nil || c.IncompleteResults == nil { - return false - } - return *c.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *CommitsSearchResult) GetTotal() int { - if c == nil || c.Total == nil { - return 0 - } - return *c.Total -} - -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (c *CommitStats) GetAdditions() int { - if c == nil || c.Additions == nil { - return 0 - } - return *c.Additions -} - -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (c *CommitStats) GetDeletions() int { - if c == nil || c.Deletions == nil { - return 0 - } - return *c.Deletions -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *CommitStats) GetTotal() int { - if c == nil || c.Total == nil { - return 0 - } - return *c.Total -} - -// GetCodeOfConduct returns the CodeOfConduct field. -func (c *CommunityHealthFiles) GetCodeOfConduct() *Metric { - if c == nil { - return nil - } - return c.CodeOfConduct -} - -// GetContributing returns the Contributing field. -func (c *CommunityHealthFiles) GetContributing() *Metric { - if c == nil { - return nil - } - return c.Contributing -} - -// GetIssueTemplate returns the IssueTemplate field. -func (c *CommunityHealthFiles) GetIssueTemplate() *Metric { - if c == nil { - return nil - } - return c.IssueTemplate -} - -// GetLicense returns the License field. -func (c *CommunityHealthFiles) GetLicense() *Metric { - if c == nil { - return nil - } - return c.License -} - -// GetPullRequestTemplate returns the PullRequestTemplate field. -func (c *CommunityHealthFiles) GetPullRequestTemplate() *Metric { - if c == nil { - return nil - } - return c.PullRequestTemplate -} - -// GetReadme returns the Readme field. -func (c *CommunityHealthFiles) GetReadme() *Metric { - if c == nil { - return nil - } - return c.Readme -} - -// GetFiles returns the Files field. -func (c *CommunityHealthMetrics) GetFiles() *CommunityHealthFiles { - if c == nil { - return nil - } - return c.Files -} - -// GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetHealthPercentage() int { - if c == nil || c.HealthPercentage == nil { - return 0 - } - return *c.HealthPercentage -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetUpdatedAt() time.Time { - if c == nil || c.UpdatedAt == nil { - return time.Time{} - } - return *c.UpdatedAt -} - -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetAvatarURL() string { - if c == nil || c.AvatarURL == nil { - return "" - } - return *c.AvatarURL -} - -// GetContributions returns the Contributions field if it's non-nil, zero value otherwise. -func (c *Contributor) GetContributions() int { - if c == nil || c.Contributions == nil { - return 0 - } - return *c.Contributions -} - -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetEventsURL() string { - if c == nil || c.EventsURL == nil { - return "" - } - return *c.EventsURL -} - -// GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetFollowersURL() string { - if c == nil || c.FollowersURL == nil { - return "" - } - return *c.FollowersURL -} - -// GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetFollowingURL() string { - if c == nil || c.FollowingURL == nil { - return "" - } - return *c.FollowingURL -} - -// GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetGistsURL() string { - if c == nil || c.GistsURL == nil { - return "" - } - return *c.GistsURL -} - -// GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. -func (c *Contributor) GetGravatarID() string { - if c == nil || c.GravatarID == nil { - return "" - } - return *c.GravatarID -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" - } - return *c.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (c *Contributor) GetID() int64 { - if c == nil || c.ID == nil { - return 0 - } - return *c.ID -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (c *Contributor) GetLogin() string { - if c == nil || c.Login == nil { - return "" - } - return *c.Login -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (c *Contributor) GetNodeID() string { - if c == nil || c.NodeID == nil { - return "" - } - return *c.NodeID -} - -// GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetOrganizationsURL() string { - if c == nil || c.OrganizationsURL == nil { - return "" - } - return *c.OrganizationsURL -} - -// GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetReceivedEventsURL() string { - if c == nil || c.ReceivedEventsURL == nil { - return "" - } - return *c.ReceivedEventsURL -} - -// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetReposURL() string { - if c == nil || c.ReposURL == nil { - return "" - } - return *c.ReposURL -} - -// GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. -func (c *Contributor) GetSiteAdmin() bool { - if c == nil || c.SiteAdmin == nil { - return false - } - return *c.SiteAdmin -} - -// GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetStarredURL() string { - if c == nil || c.StarredURL == nil { - return "" - } - return *c.StarredURL -} - -// GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetSubscriptionsURL() string { - if c == nil || c.SubscriptionsURL == nil { - return "" - } - return *c.SubscriptionsURL -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (c *Contributor) GetType() string { - if c == nil || c.Type == nil { - return "" - } - return *c.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetURL() string { - if c == nil || c.URL == nil { - return "" - } - return *c.URL -} - -// GetAuthor returns the Author field. -func (c *ContributorStats) GetAuthor() *Contributor { - if c == nil { - return nil - } - return c.Author -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *ContributorStats) GetTotal() int { - if c == nil || c.Total == nil { - return 0 - } - return *c.Total -} - -// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. -func (c *CreateCheckRunOptions) GetCompletedAt() Timestamp { - if c == nil || c.CompletedAt == nil { - return Timestamp{} - } - return *c.CompletedAt -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (c *CreateCheckRunOptions) GetConclusion() string { - if c == nil || c.Conclusion == nil { - return "" - } - return *c.Conclusion -} - -// GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. -func (c *CreateCheckRunOptions) GetDetailsURL() string { - if c == nil || c.DetailsURL == nil { - return "" - } - return *c.DetailsURL -} - -// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. -func (c *CreateCheckRunOptions) GetExternalID() string { - if c == nil || c.ExternalID == nil { - return "" - } - return *c.ExternalID -} - -// GetOutput returns the Output field. -func (c *CreateCheckRunOptions) GetOutput() *CheckRunOutput { - if c == nil { - return nil - } - return c.Output -} - -// GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. -func (c *CreateCheckRunOptions) GetStartedAt() Timestamp { - if c == nil || c.StartedAt == nil { - return Timestamp{} - } - return *c.StartedAt -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CreateCheckRunOptions) GetStatus() string { - if c == nil || c.Status == nil { - return "" - } - return *c.Status -} - -// GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. -func (c *CreateCheckSuiteOptions) GetHeadBranch() string { - if c == nil || c.HeadBranch == nil { - return "" - } - return *c.HeadBranch -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetDescription() string { - if c == nil || c.Description == nil { - return "" - } - return *c.Description -} - -// GetInstallation returns the Installation field. -func (c *CreateEvent) GetInstallation() *Installation { - if c == nil { - return nil - } - return c.Installation -} - -// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetMasterBranch() string { - if c == nil || c.MasterBranch == nil { - return "" - } - return *c.MasterBranch -} - -// GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetPusherType() string { - if c == nil || c.PusherType == nil { - return "" - } - return *c.PusherType -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetRef() string { - if c == nil || c.Ref == nil { - return "" - } - return *c.Ref -} - -// GetRefType returns the RefType field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetRefType() string { - if c == nil || c.RefType == nil { - return "" - } - return *c.RefType -} - -// GetRepo returns the Repo field. -func (c *CreateEvent) GetRepo() *Repository { - if c == nil { - return nil - } - return c.Repo -} - -// GetSender returns the Sender field. -func (c *CreateEvent) GetSender() *User { - if c == nil { - return nil - } - return c.Sender -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (c *CreateOrgInvitationOptions) GetEmail() string { - if c == nil || c.Email == nil { - return "" - } - return *c.Email -} - -// GetInviteeID returns the InviteeID field if it's non-nil, zero value otherwise. -func (c *CreateOrgInvitationOptions) GetInviteeID() int64 { - if c == nil || c.InviteeID == nil { - return 0 - } - return *c.InviteeID -} - -// GetRole returns the Role field if it's non-nil, zero value otherwise. -func (c *CreateOrgInvitationOptions) GetRole() string { - if c == nil || c.Role == nil { - return "" - } - return *c.Role -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (c *CreateUserProjectOptions) GetBody() string { - if c == nil || c.Body == nil { - return "" - } - return *c.Body -} - -// GetInstallation returns the Installation field. -func (d *DeleteEvent) GetInstallation() *Installation { - if d == nil { - return nil - } - return d.Installation -} - -// GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. -func (d *DeleteEvent) GetPusherType() string { - if d == nil || d.PusherType == nil { - return "" - } - return *d.PusherType -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (d *DeleteEvent) GetRef() string { - if d == nil || d.Ref == nil { - return "" - } - return *d.Ref -} - -// GetRefType returns the RefType field if it's non-nil, zero value otherwise. -func (d *DeleteEvent) GetRefType() string { - if d == nil || d.RefType == nil { - return "" - } - return *d.RefType -} - -// GetRepo returns the Repo field. -func (d *DeleteEvent) GetRepo() *Repository { - if d == nil { - return nil - } - return d.Repo -} - -// GetSender returns the Sender field. -func (d *DeleteEvent) GetSender() *User { - if d == nil { - return nil - } - return d.Sender -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (d *DeployKeyEvent) GetAction() string { - if d == nil || d.Action == nil { - return "" - } - return *d.Action -} - -// GetKey returns the Key field. -func (d *DeployKeyEvent) GetKey() *Key { - if d == nil { - return nil - } - return d.Key -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (d *Deployment) GetCreatedAt() Timestamp { - if d == nil || d.CreatedAt == nil { - return Timestamp{} - } - return *d.CreatedAt -} - -// GetCreator returns the Creator field. -func (d *Deployment) GetCreator() *User { - if d == nil { - return nil - } - return d.Creator -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *Deployment) GetDescription() string { - if d == nil || d.Description == nil { - return "" - } - return *d.Description -} - -// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. -func (d *Deployment) GetEnvironment() string { - if d == nil || d.Environment == nil { - return "" - } - return *d.Environment -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (d *Deployment) GetID() int64 { - if d == nil || d.ID == nil { - return 0 - } - return *d.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (d *Deployment) GetNodeID() string { - if d == nil || d.NodeID == nil { - return "" - } - return *d.NodeID -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (d *Deployment) GetRef() string { - if d == nil || d.Ref == nil { - return "" - } - return *d.Ref -} - -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (d *Deployment) GetRepositoryURL() string { - if d == nil || d.RepositoryURL == nil { - return "" - } - return *d.RepositoryURL -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (d *Deployment) GetSHA() string { - if d == nil || d.SHA == nil { - return "" - } - return *d.SHA -} - -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (d *Deployment) GetStatusesURL() string { - if d == nil || d.StatusesURL == nil { - return "" - } - return *d.StatusesURL -} - -// GetTask returns the Task field if it's non-nil, zero value otherwise. -func (d *Deployment) GetTask() string { - if d == nil || d.Task == nil { - return "" - } - return *d.Task -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (d *Deployment) GetUpdatedAt() Timestamp { - if d == nil || d.UpdatedAt == nil { - return Timestamp{} - } - return *d.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (d *Deployment) GetURL() string { - if d == nil || d.URL == nil { - return "" - } - return *d.URL -} - -// GetDeployment returns the Deployment field. -func (d *DeploymentEvent) GetDeployment() *Deployment { - if d == nil { - return nil - } - return d.Deployment -} - -// GetInstallation returns the Installation field. -func (d *DeploymentEvent) GetInstallation() *Installation { - if d == nil { - return nil - } - return d.Installation -} - -// GetRepo returns the Repo field. -func (d *DeploymentEvent) GetRepo() *Repository { - if d == nil { - return nil - } - return d.Repo -} - -// GetSender returns the Sender field. -func (d *DeploymentEvent) GetSender() *User { - if d == nil { - return nil - } - return d.Sender -} - -// GetAutoMerge returns the AutoMerge field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetAutoMerge() bool { - if d == nil || d.AutoMerge == nil { - return false - } - return *d.AutoMerge -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetDescription() string { - if d == nil || d.Description == nil { - return "" - } - return *d.Description -} - -// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetEnvironment() string { - if d == nil || d.Environment == nil { - return "" - } - return *d.Environment -} - -// GetProductionEnvironment returns the ProductionEnvironment field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetProductionEnvironment() bool { - if d == nil || d.ProductionEnvironment == nil { - return false - } - return *d.ProductionEnvironment -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetRef() string { - if d == nil || d.Ref == nil { - return "" - } - return *d.Ref -} - -// GetRequiredContexts returns the RequiredContexts field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetRequiredContexts() []string { - if d == nil || d.RequiredContexts == nil { - return nil - } - return *d.RequiredContexts -} - -// GetTask returns the Task field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetTask() string { - if d == nil || d.Task == nil { - return "" - } - return *d.Task -} - -// GetTransientEnvironment returns the TransientEnvironment field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetTransientEnvironment() bool { - if d == nil || d.TransientEnvironment == nil { - return false - } - return *d.TransientEnvironment -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetCreatedAt() Timestamp { - if d == nil || d.CreatedAt == nil { - return Timestamp{} - } - return *d.CreatedAt -} - -// GetCreator returns the Creator field. -func (d *DeploymentStatus) GetCreator() *User { - if d == nil { - return nil - } - return d.Creator -} - -// GetDeploymentURL returns the DeploymentURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetDeploymentURL() string { - if d == nil || d.DeploymentURL == nil { - return "" - } - return *d.DeploymentURL -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetDescription() string { - if d == nil || d.Description == nil { - return "" - } - return *d.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetID() int64 { - if d == nil || d.ID == nil { - return 0 - } - return *d.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetNodeID() string { - if d == nil || d.NodeID == nil { - return "" - } - return *d.NodeID -} - -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetRepositoryURL() string { - if d == nil || d.RepositoryURL == nil { - return "" - } - return *d.RepositoryURL -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetState() string { - if d == nil || d.State == nil { - return "" - } - return *d.State -} - -// GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetTargetURL() string { - if d == nil || d.TargetURL == nil { - return "" - } - return *d.TargetURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetUpdatedAt() Timestamp { - if d == nil || d.UpdatedAt == nil { - return Timestamp{} - } - return *d.UpdatedAt -} - -// GetDeployment returns the Deployment field. -func (d *DeploymentStatusEvent) GetDeployment() *Deployment { - if d == nil { - return nil - } - return d.Deployment -} - -// GetDeploymentStatus returns the DeploymentStatus field. -func (d *DeploymentStatusEvent) GetDeploymentStatus() *DeploymentStatus { - if d == nil { - return nil - } - return d.DeploymentStatus -} - -// GetInstallation returns the Installation field. -func (d *DeploymentStatusEvent) GetInstallation() *Installation { - if d == nil { - return nil - } - return d.Installation -} - -// GetRepo returns the Repo field. -func (d *DeploymentStatusEvent) GetRepo() *Repository { - if d == nil { - return nil - } - return d.Repo -} - -// GetSender returns the Sender field. -func (d *DeploymentStatusEvent) GetSender() *User { - if d == nil { - return nil - } - return d.Sender -} - -// GetAutoInactive returns the AutoInactive field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetAutoInactive() bool { - if d == nil || d.AutoInactive == nil { - return false - } - return *d.AutoInactive -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetDescription() string { - if d == nil || d.Description == nil { - return "" - } - return *d.Description -} - -// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetEnvironment() string { - if d == nil || d.Environment == nil { - return "" - } - return *d.Environment -} - -// GetEnvironmentURL returns the EnvironmentURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetEnvironmentURL() string { - if d == nil || d.EnvironmentURL == nil { - return "" - } - return *d.EnvironmentURL -} - -// GetLogURL returns the LogURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetLogURL() string { - if d == nil || d.LogURL == nil { - return "" - } - return *d.LogURL -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetState() string { - if d == nil || d.State == nil { - return "" - } - return *d.State -} - -// GetAuthor returns the Author field. -func (d *DiscussionComment) GetAuthor() *User { - if d == nil { - return nil - } - return d.Author -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetBody() string { - if d == nil || d.Body == nil { - return "" - } - return *d.Body -} - -// GetBodyHTML returns the BodyHTML field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetBodyHTML() string { - if d == nil || d.BodyHTML == nil { - return "" - } - return *d.BodyHTML -} - -// GetBodyVersion returns the BodyVersion field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetBodyVersion() string { - if d == nil || d.BodyVersion == nil { - return "" - } - return *d.BodyVersion -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetCreatedAt() Timestamp { - if d == nil || d.CreatedAt == nil { - return Timestamp{} - } - return *d.CreatedAt -} - -// GetDiscussionURL returns the DiscussionURL field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetDiscussionURL() string { - if d == nil || d.DiscussionURL == nil { - return "" - } - return *d.DiscussionURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetHTMLURL() string { - if d == nil || d.HTMLURL == nil { - return "" - } - return *d.HTMLURL -} - -// GetLastEditedAt returns the LastEditedAt field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetLastEditedAt() Timestamp { - if d == nil || d.LastEditedAt == nil { - return Timestamp{} - } - return *d.LastEditedAt -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetNodeID() string { - if d == nil || d.NodeID == nil { - return "" - } - return *d.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetNumber() int { - if d == nil || d.Number == nil { - return 0 - } - return *d.Number -} - -// GetReactions returns the Reactions field. -func (d *DiscussionComment) GetReactions() *Reactions { - if d == nil { - return nil - } - return d.Reactions -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetUpdatedAt() Timestamp { - if d == nil || d.UpdatedAt == nil { - return Timestamp{} - } - return *d.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (d *DiscussionComment) GetURL() string { - if d == nil || d.URL == nil { - return "" - } - return *d.URL -} - -// GetTeams returns the Teams field if it's non-nil, zero value otherwise. -func (d *DismissalRestrictionsRequest) GetTeams() []string { - if d == nil || d.Teams == nil { - return nil - } - return *d.Teams -} - -// GetUsers returns the Users field if it's non-nil, zero value otherwise. -func (d *DismissalRestrictionsRequest) GetUsers() []string { - if d == nil || d.Users == nil { - return nil - } - return *d.Users -} - -// GetDismissalCommitID returns the DismissalCommitID field if it's non-nil, zero value otherwise. -func (d *DismissedReview) GetDismissalCommitID() string { - if d == nil || d.DismissalCommitID == nil { - return "" - } - return *d.DismissalCommitID -} - -// GetDismissalMessage returns the DismissalMessage field if it's non-nil, zero value otherwise. -func (d *DismissedReview) GetDismissalMessage() string { - if d == nil || d.DismissalMessage == nil { - return "" - } - return *d.DismissalMessage -} - -// GetReviewID returns the ReviewID field if it's non-nil, zero value otherwise. -func (d *DismissedReview) GetReviewID() int64 { - if d == nil || d.ReviewID == nil { - return 0 - } - return *d.ReviewID -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (d *DismissedReview) GetState() string { - if d == nil || d.State == nil { - return "" - } - return *d.State -} - -// GetClientPayload returns the ClientPayload field if it's non-nil, zero value otherwise. -func (d *DispatchRequestOptions) GetClientPayload() json.RawMessage { - if d == nil || d.ClientPayload == nil { - return json.RawMessage{} - } - return *d.ClientPayload -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (d *DraftReviewComment) GetBody() string { - if d == nil || d.Body == nil { - return "" - } - return *d.Body -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (d *DraftReviewComment) GetPath() string { - if d == nil || d.Path == nil { - return "" - } - return *d.Path -} - -// GetPosition returns the Position field if it's non-nil, zero value otherwise. -func (d *DraftReviewComment) GetPosition() int { - if d == nil || d.Position == nil { - return 0 - } - return *d.Position -} - -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetAvatarURL() string { - if e == nil || e.AvatarURL == nil { - return "" - } - return *e.AvatarURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetCreatedAt() Timestamp { - if e == nil || e.CreatedAt == nil { - return Timestamp{} - } - return *e.CreatedAt -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetDescription() string { - if e == nil || e.Description == nil { - return "" - } - return *e.Description -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetHTMLURL() string { - if e == nil || e.HTMLURL == nil { - return "" - } - return *e.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetID() int { - if e == nil || e.ID == nil { - return 0 - } - return *e.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetName() string { - if e == nil || e.Name == nil { - return "" - } - return *e.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetNodeID() string { - if e == nil || e.NodeID == nil { - return "" - } - return *e.NodeID -} - -// GetSlug returns the Slug field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetSlug() string { - if e == nil || e.Slug == nil { - return "" - } - return *e.Slug -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetUpdatedAt() Timestamp { - if e == nil || e.UpdatedAt == nil { - return Timestamp{} - } - return *e.UpdatedAt -} - -// GetWebsiteURL returns the WebsiteURL field if it's non-nil, zero value otherwise. -func (e *Enterprise) GetWebsiteURL() string { - if e == nil || e.WebsiteURL == nil { - return "" - } - return *e.WebsiteURL -} - -// GetActor returns the Actor field. -func (e *Event) GetActor() *User { - if e == nil { - return nil - } - return e.Actor -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (e *Event) GetCreatedAt() time.Time { - if e == nil || e.CreatedAt == nil { - return time.Time{} - } - return *e.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (e *Event) GetID() string { - if e == nil || e.ID == nil { - return "" - } - return *e.ID -} - -// GetOrg returns the Org field. -func (e *Event) GetOrg() *Organization { - if e == nil { - return nil - } - return e.Org -} - -// GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (e *Event) GetPublic() bool { - if e == nil || e.Public == nil { - return false - } - return *e.Public -} - -// GetRawPayload returns the RawPayload field if it's non-nil, zero value otherwise. -func (e *Event) GetRawPayload() json.RawMessage { - if e == nil || e.RawPayload == nil { - return json.RawMessage{} - } - return *e.RawPayload -} - -// GetRepo returns the Repo field. -func (e *Event) GetRepo() *Repository { - if e == nil { - return nil - } - return e.Repo -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (e *Event) GetType() string { - if e == nil || e.Type == nil { - return "" - } - return *e.Type -} - -// GetHRef returns the HRef field if it's non-nil, zero value otherwise. -func (f *FeedLink) GetHRef() string { - if f == nil || f.HRef == nil { - return "" - } - return *f.HRef -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (f *FeedLink) GetType() string { - if f == nil || f.Type == nil { - return "" - } - return *f.Type -} - -// GetCurrentUserActorURL returns the CurrentUserActorURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserActorURL() string { - if f == nil || f.CurrentUserActorURL == nil { - return "" - } - return *f.CurrentUserActorURL -} - -// GetCurrentUserOrganizationURL returns the CurrentUserOrganizationURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserOrganizationURL() string { - if f == nil || f.CurrentUserOrganizationURL == nil { - return "" - } - return *f.CurrentUserOrganizationURL -} - -// GetCurrentUserPublicURL returns the CurrentUserPublicURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserPublicURL() string { - if f == nil || f.CurrentUserPublicURL == nil { - return "" - } - return *f.CurrentUserPublicURL -} - -// GetCurrentUserURL returns the CurrentUserURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserURL() string { - if f == nil || f.CurrentUserURL == nil { - return "" - } - return *f.CurrentUserURL -} - -// GetTimelineURL returns the TimelineURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetTimelineURL() string { - if f == nil || f.TimelineURL == nil { - return "" - } - return *f.TimelineURL -} - -// GetUserURL returns the UserURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetUserURL() string { - if f == nil || f.UserURL == nil { - return "" - } - return *f.UserURL -} - -// GetForkee returns the Forkee field. -func (f *ForkEvent) GetForkee() *Repository { - if f == nil { - return nil - } - return f.Forkee -} - -// GetInstallation returns the Installation field. -func (f *ForkEvent) GetInstallation() *Installation { - if f == nil { - return nil - } - return f.Installation -} - -// GetRepo returns the Repo field. -func (f *ForkEvent) GetRepo() *Repository { - if f == nil { - return nil - } - return f.Repo -} - -// GetSender returns the Sender field. -func (f *ForkEvent) GetSender() *User { - if f == nil { - return nil - } - return f.Sender -} - -// GetComments returns the Comments field if it's non-nil, zero value otherwise. -func (g *Gist) GetComments() int { - if g == nil || g.Comments == nil { - return 0 - } - return *g.Comments -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *Gist) GetCreatedAt() time.Time { - if g == nil || g.CreatedAt == nil { - return time.Time{} - } - return *g.CreatedAt -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (g *Gist) GetDescription() string { - if g == nil || g.Description == nil { - return "" - } - return *g.Description -} - -// GetGitPullURL returns the GitPullURL field if it's non-nil, zero value otherwise. -func (g *Gist) GetGitPullURL() string { - if g == nil || g.GitPullURL == nil { - return "" - } - return *g.GitPullURL -} - -// GetGitPushURL returns the GitPushURL field if it's non-nil, zero value otherwise. -func (g *Gist) GetGitPushURL() string { - if g == nil || g.GitPushURL == nil { - return "" - } - return *g.GitPushURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (g *Gist) GetHTMLURL() string { - if g == nil || g.HTMLURL == nil { - return "" - } - return *g.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *Gist) GetID() string { - if g == nil || g.ID == nil { - return "" - } - return *g.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (g *Gist) GetNodeID() string { - if g == nil || g.NodeID == nil { - return "" - } - return *g.NodeID -} - -// GetOwner returns the Owner field. -func (g *Gist) GetOwner() *User { - if g == nil { - return nil - } - return g.Owner -} - -// GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (g *Gist) GetPublic() bool { - if g == nil || g.Public == nil { - return false - } - return *g.Public -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (g *Gist) GetUpdatedAt() time.Time { - if g == nil || g.UpdatedAt == nil { - return time.Time{} - } - return *g.UpdatedAt -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (g *GistComment) GetBody() string { - if g == nil || g.Body == nil { - return "" - } - return *g.Body -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *GistComment) GetCreatedAt() time.Time { - if g == nil || g.CreatedAt == nil { - return time.Time{} - } - return *g.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *GistComment) GetID() int64 { - if g == nil || g.ID == nil { - return 0 - } - return *g.ID -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GistComment) GetURL() string { - if g == nil || g.URL == nil { - return "" - } - return *g.URL -} - -// GetUser returns the User field. -func (g *GistComment) GetUser() *User { - if g == nil { - return nil - } - return g.User -} - -// GetChangeStatus returns the ChangeStatus field. -func (g *GistCommit) GetChangeStatus() *CommitStats { - if g == nil { - return nil - } - return g.ChangeStatus -} - -// GetCommittedAt returns the CommittedAt field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetCommittedAt() Timestamp { - if g == nil || g.CommittedAt == nil { - return Timestamp{} - } - return *g.CommittedAt -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetNodeID() string { - if g == nil || g.NodeID == nil { - return "" - } - return *g.NodeID -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetURL() string { - if g == nil || g.URL == nil { - return "" - } - return *g.URL -} - -// GetUser returns the User field. -func (g *GistCommit) GetUser() *User { - if g == nil { - return nil - } - return g.User -} - -// GetVersion returns the Version field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetVersion() string { - if g == nil || g.Version == nil { - return "" - } - return *g.Version -} - -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (g *GistFile) GetContent() string { - if g == nil || g.Content == nil { - return "" - } - return *g.Content -} - -// GetFilename returns the Filename field if it's non-nil, zero value otherwise. -func (g *GistFile) GetFilename() string { - if g == nil || g.Filename == nil { - return "" - } - return *g.Filename -} - -// GetLanguage returns the Language field if it's non-nil, zero value otherwise. -func (g *GistFile) GetLanguage() string { - if g == nil || g.Language == nil { - return "" - } - return *g.Language -} - -// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. -func (g *GistFile) GetRawURL() string { - if g == nil || g.RawURL == nil { - return "" - } - return *g.RawURL -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (g *GistFile) GetSize() int { - if g == nil || g.Size == nil { - return 0 - } - return *g.Size -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (g *GistFile) GetType() string { - if g == nil || g.Type == nil { - return "" - } - return *g.Type -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *GistFork) GetCreatedAt() Timestamp { - if g == nil || g.CreatedAt == nil { - return Timestamp{} - } - return *g.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *GistFork) GetID() string { - if g == nil || g.ID == nil { - return "" - } - return *g.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (g *GistFork) GetNodeID() string { - if g == nil || g.NodeID == nil { - return "" - } - return *g.NodeID -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (g *GistFork) GetUpdatedAt() Timestamp { - if g == nil || g.UpdatedAt == nil { - return Timestamp{} - } - return *g.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GistFork) GetURL() string { - if g == nil || g.URL == nil { - return "" - } - return *g.URL -} - -// GetUser returns the User field. -func (g *GistFork) GetUser() *User { - if g == nil { - return nil - } - return g.User -} - -// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. -func (g *GistStats) GetPrivateGists() int { - if g == nil || g.PrivateGists == nil { - return 0 - } - return *g.PrivateGists -} - -// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. -func (g *GistStats) GetPublicGists() int { - if g == nil || g.PublicGists == nil { - return 0 - } - return *g.PublicGists -} - -// GetTotalGists returns the TotalGists field if it's non-nil, zero value otherwise. -func (g *GistStats) GetTotalGists() int { - if g == nil || g.TotalGists == nil { - return 0 - } - return *g.TotalGists -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (g *GitHubAppAuthorizationEvent) GetAction() string { - if g == nil || g.Action == nil { - return "" - } - return *g.Action -} - -// GetSender returns the Sender field. -func (g *GitHubAppAuthorizationEvent) GetSender() *User { - if g == nil { - return nil - } - return g.Sender -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (g *Gitignore) GetName() string { - if g == nil || g.Name == nil { - return "" - } - return *g.Name -} - -// GetSource returns the Source field if it's non-nil, zero value otherwise. -func (g *Gitignore) GetSource() string { - if g == nil || g.Source == nil { - return "" - } - return *g.Source -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (g *GitObject) GetSHA() string { - if g == nil || g.SHA == nil { - return "" - } - return *g.SHA -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (g *GitObject) GetType() string { - if g == nil || g.Type == nil { - return "" - } - return *g.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GitObject) GetURL() string { - if g == nil || g.URL == nil { - return "" - } - return *g.URL -} - -// GetInstallation returns the Installation field. -func (g *GollumEvent) GetInstallation() *Installation { - if g == nil { - return nil - } - return g.Installation -} - -// GetRepo returns the Repo field. -func (g *GollumEvent) GetRepo() *Repository { - if g == nil { - return nil - } - return g.Repo -} - -// GetSender returns the Sender field. -func (g *GollumEvent) GetSender() *User { - if g == nil { - return nil - } - return g.Sender -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (g *GPGEmail) GetEmail() string { - if g == nil || g.Email == nil { - return "" - } - return *g.Email -} - -// GetVerified returns the Verified field if it's non-nil, zero value otherwise. -func (g *GPGEmail) GetVerified() bool { - if g == nil || g.Verified == nil { - return false - } - return *g.Verified -} - -// GetCanCertify returns the CanCertify field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanCertify() bool { - if g == nil || g.CanCertify == nil { - return false - } - return *g.CanCertify -} - -// GetCanEncryptComms returns the CanEncryptComms field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanEncryptComms() bool { - if g == nil || g.CanEncryptComms == nil { - return false - } - return *g.CanEncryptComms -} - -// GetCanEncryptStorage returns the CanEncryptStorage field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanEncryptStorage() bool { - if g == nil || g.CanEncryptStorage == nil { - return false - } - return *g.CanEncryptStorage -} - -// GetCanSign returns the CanSign field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanSign() bool { - if g == nil || g.CanSign == nil { - return false - } - return *g.CanSign -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCreatedAt() time.Time { - if g == nil || g.CreatedAt == nil { - return time.Time{} - } - return *g.CreatedAt -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetExpiresAt() time.Time { - if g == nil || g.ExpiresAt == nil { - return time.Time{} - } - return *g.ExpiresAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetID() int64 { - if g == nil || g.ID == nil { - return 0 - } - return *g.ID -} - -// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetKeyID() string { - if g == nil || g.KeyID == nil { - return "" - } - return *g.KeyID -} - -// GetPrimaryKeyID returns the PrimaryKeyID field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetPrimaryKeyID() int64 { - if g == nil || g.PrimaryKeyID == nil { - return 0 - } - return *g.PrimaryKeyID -} - -// GetPublicKey returns the PublicKey field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetPublicKey() string { - if g == nil || g.PublicKey == nil { - return "" - } - return *g.PublicKey -} - -// GetApp returns the App field. -func (g *Grant) GetApp() *AuthorizationApp { - if g == nil { - return nil - } - return g.App -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *Grant) GetCreatedAt() Timestamp { - if g == nil || g.CreatedAt == nil { - return Timestamp{} - } - return *g.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *Grant) GetID() int64 { - if g == nil || g.ID == nil { - return 0 - } - return *g.ID -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (g *Grant) GetUpdatedAt() Timestamp { - if g == nil || g.UpdatedAt == nil { - return Timestamp{} - } - return *g.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *Grant) GetURL() string { - if g == nil || g.URL == nil { - return "" - } - return *g.URL -} - -// GetAuthor returns the Author field. -func (h *HeadCommit) GetAuthor() *CommitAuthor { - if h == nil { - return nil - } - return h.Author -} - -// GetCommitter returns the Committer field. -func (h *HeadCommit) GetCommitter() *CommitAuthor { - if h == nil { - return nil - } - return h.Committer -} - -// GetDistinct returns the Distinct field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetDistinct() bool { - if h == nil || h.Distinct == nil { - return false - } - return *h.Distinct -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetID() string { - if h == nil || h.ID == nil { - return "" - } - return *h.ID -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetMessage() string { - if h == nil || h.Message == nil { - return "" - } - return *h.Message -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetSHA() string { - if h == nil || h.SHA == nil { - return "" - } - return *h.SHA -} - -// GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetTimestamp() Timestamp { - if h == nil || h.Timestamp == nil { - return Timestamp{} - } - return *h.Timestamp -} - -// GetTreeID returns the TreeID field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetTreeID() string { - if h == nil || h.TreeID == nil { - return "" - } - return *h.TreeID -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (h *HeadCommit) GetURL() string { - if h == nil || h.URL == nil { - return "" - } - return *h.URL -} - -// GetActive returns the Active field if it's non-nil, zero value otherwise. -func (h *Hook) GetActive() bool { - if h == nil || h.Active == nil { - return false - } - return *h.Active -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (h *Hook) GetCreatedAt() time.Time { - if h == nil || h.CreatedAt == nil { - return time.Time{} - } - return *h.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (h *Hook) GetID() int64 { - if h == nil || h.ID == nil { - return 0 - } - return *h.ID -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (h *Hook) GetUpdatedAt() time.Time { - if h == nil || h.UpdatedAt == nil { - return time.Time{} - } - return *h.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (h *Hook) GetURL() string { - if h == nil || h.URL == nil { - return "" - } - return *h.URL -} - -// GetActiveHooks returns the ActiveHooks field if it's non-nil, zero value otherwise. -func (h *HookStats) GetActiveHooks() int { - if h == nil || h.ActiveHooks == nil { - return 0 - } - return *h.ActiveHooks -} - -// GetInactiveHooks returns the InactiveHooks field if it's non-nil, zero value otherwise. -func (h *HookStats) GetInactiveHooks() int { - if h == nil || h.InactiveHooks == nil { - return 0 - } - return *h.InactiveHooks -} - -// GetTotalHooks returns the TotalHooks field if it's non-nil, zero value otherwise. -func (h *HookStats) GetTotalHooks() int { - if h == nil || h.TotalHooks == nil { - return 0 - } - return *h.TotalHooks -} - -// GetGroupDescription returns the GroupDescription field if it's non-nil, zero value otherwise. -func (i *IDPGroup) GetGroupDescription() string { - if i == nil || i.GroupDescription == nil { - return "" - } - return *i.GroupDescription -} - -// GetGroupID returns the GroupID field if it's non-nil, zero value otherwise. -func (i *IDPGroup) GetGroupID() string { - if i == nil || i.GroupID == nil { - return "" - } - return *i.GroupID -} - -// GetGroupName returns the GroupName field if it's non-nil, zero value otherwise. -func (i *IDPGroup) GetGroupName() string { - if i == nil || i.GroupName == nil { - return "" - } - return *i.GroupName -} - -// GetAuthorsCount returns the AuthorsCount field if it's non-nil, zero value otherwise. -func (i *Import) GetAuthorsCount() int { - if i == nil || i.AuthorsCount == nil { - return 0 - } - return *i.AuthorsCount -} - -// GetAuthorsURL returns the AuthorsURL field if it's non-nil, zero value otherwise. -func (i *Import) GetAuthorsURL() string { - if i == nil || i.AuthorsURL == nil { - return "" - } - return *i.AuthorsURL -} - -// GetCommitCount returns the CommitCount field if it's non-nil, zero value otherwise. -func (i *Import) GetCommitCount() int { - if i == nil || i.CommitCount == nil { - return 0 - } - return *i.CommitCount -} - -// GetFailedStep returns the FailedStep field if it's non-nil, zero value otherwise. -func (i *Import) GetFailedStep() string { - if i == nil || i.FailedStep == nil { - return "" - } - return *i.FailedStep -} - -// GetHasLargeFiles returns the HasLargeFiles field if it's non-nil, zero value otherwise. -func (i *Import) GetHasLargeFiles() bool { - if i == nil || i.HasLargeFiles == nil { - return false - } - return *i.HasLargeFiles -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *Import) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { - return "" - } - return *i.HTMLURL -} - -// GetHumanName returns the HumanName field if it's non-nil, zero value otherwise. -func (i *Import) GetHumanName() string { - if i == nil || i.HumanName == nil { - return "" - } - return *i.HumanName -} - -// GetLargeFilesCount returns the LargeFilesCount field if it's non-nil, zero value otherwise. -func (i *Import) GetLargeFilesCount() int { - if i == nil || i.LargeFilesCount == nil { - return 0 - } - return *i.LargeFilesCount -} - -// GetLargeFilesSize returns the LargeFilesSize field if it's non-nil, zero value otherwise. -func (i *Import) GetLargeFilesSize() int { - if i == nil || i.LargeFilesSize == nil { - return 0 - } - return *i.LargeFilesSize -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (i *Import) GetMessage() string { - if i == nil || i.Message == nil { - return "" - } - return *i.Message -} - -// GetPercent returns the Percent field if it's non-nil, zero value otherwise. -func (i *Import) GetPercent() int { - if i == nil || i.Percent == nil { - return 0 - } - return *i.Percent -} - -// GetPushPercent returns the PushPercent field if it's non-nil, zero value otherwise. -func (i *Import) GetPushPercent() int { - if i == nil || i.PushPercent == nil { - return 0 - } - return *i.PushPercent -} - -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (i *Import) GetRepositoryURL() string { - if i == nil || i.RepositoryURL == nil { - return "" - } - return *i.RepositoryURL -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (i *Import) GetStatus() string { - if i == nil || i.Status == nil { - return "" - } - return *i.Status -} - -// GetStatusText returns the StatusText field if it's non-nil, zero value otherwise. -func (i *Import) GetStatusText() string { - if i == nil || i.StatusText == nil { - return "" - } - return *i.StatusText -} - -// GetTFVCProject returns the TFVCProject field if it's non-nil, zero value otherwise. -func (i *Import) GetTFVCProject() string { - if i == nil || i.TFVCProject == nil { - return "" - } - return *i.TFVCProject -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *Import) GetURL() string { - if i == nil || i.URL == nil { - return "" - } - return *i.URL -} - -// GetUseLFS returns the UseLFS field if it's non-nil, zero value otherwise. -func (i *Import) GetUseLFS() string { - if i == nil || i.UseLFS == nil { - return "" - } - return *i.UseLFS -} - -// GetVCS returns the VCS field if it's non-nil, zero value otherwise. -func (i *Import) GetVCS() string { - if i == nil || i.VCS == nil { - return "" - } - return *i.VCS -} - -// GetVCSPassword returns the VCSPassword field if it's non-nil, zero value otherwise. -func (i *Import) GetVCSPassword() string { - if i == nil || i.VCSPassword == nil { - return "" - } - return *i.VCSPassword -} - -// GetVCSURL returns the VCSURL field if it's non-nil, zero value otherwise. -func (i *Import) GetVCSURL() string { - if i == nil || i.VCSURL == nil { - return "" - } - return *i.VCSURL -} - -// GetVCSUsername returns the VCSUsername field if it's non-nil, zero value otherwise. -func (i *Import) GetVCSUsername() string { - if i == nil || i.VCSUsername == nil { - return "" - } - return *i.VCSUsername -} - -// GetAccessTokensURL returns the AccessTokensURL field if it's non-nil, zero value otherwise. -func (i *Installation) GetAccessTokensURL() string { - if i == nil || i.AccessTokensURL == nil { - return "" - } - return *i.AccessTokensURL -} - -// GetAccount returns the Account field. -func (i *Installation) GetAccount() *User { - if i == nil { - return nil - } - return i.Account -} - -// GetAppID returns the AppID field if it's non-nil, zero value otherwise. -func (i *Installation) GetAppID() int64 { - if i == nil || i.AppID == nil { - return 0 - } - return *i.AppID -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *Installation) GetCreatedAt() Timestamp { - if i == nil || i.CreatedAt == nil { - return Timestamp{} - } - return *i.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *Installation) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { - return "" - } - return *i.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *Installation) GetID() int64 { - if i == nil || i.ID == nil { - return 0 - } - return *i.ID -} - -// GetPermissions returns the Permissions field. -func (i *Installation) GetPermissions() *InstallationPermissions { - if i == nil { - return nil - } - return i.Permissions -} - -// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. -func (i *Installation) GetRepositoriesURL() string { - if i == nil || i.RepositoriesURL == nil { - return "" - } - return *i.RepositoriesURL -} - -// GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. -func (i *Installation) GetRepositorySelection() string { - if i == nil || i.RepositorySelection == nil { - return "" - } - return *i.RepositorySelection -} - -// GetSingleFileName returns the SingleFileName field if it's non-nil, zero value otherwise. -func (i *Installation) GetSingleFileName() string { - if i == nil || i.SingleFileName == nil { - return "" - } - return *i.SingleFileName -} - -// GetTargetID returns the TargetID field if it's non-nil, zero value otherwise. -func (i *Installation) GetTargetID() int64 { - if i == nil || i.TargetID == nil { - return 0 - } - return *i.TargetID -} - -// GetTargetType returns the TargetType field if it's non-nil, zero value otherwise. -func (i *Installation) GetTargetType() string { - if i == nil || i.TargetType == nil { - return "" - } - return *i.TargetType -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (i *Installation) GetUpdatedAt() Timestamp { - if i == nil || i.UpdatedAt == nil { - return Timestamp{} - } - return *i.UpdatedAt -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *InstallationEvent) GetAction() string { - if i == nil || i.Action == nil { - return "" - } - return *i.Action -} - -// GetInstallation returns the Installation field. -func (i *InstallationEvent) GetInstallation() *Installation { - if i == nil { - return nil - } - return i.Installation -} - -// GetSender returns the Sender field. -func (i *InstallationEvent) GetSender() *User { - if i == nil { - return nil - } - return i.Sender -} - -// GetAdministration returns the Administration field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetAdministration() string { - if i == nil || i.Administration == nil { - return "" - } - return *i.Administration -} - -// GetBlocking returns the Blocking field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetBlocking() string { - if i == nil || i.Blocking == nil { - return "" - } - return *i.Blocking -} - -// GetChecks returns the Checks field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetChecks() string { - if i == nil || i.Checks == nil { - return "" - } - return *i.Checks -} - -// GetContentReferences returns the ContentReferences field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetContentReferences() string { - if i == nil || i.ContentReferences == nil { - return "" - } - return *i.ContentReferences -} - -// GetContents returns the Contents field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetContents() string { - if i == nil || i.Contents == nil { - return "" - } - return *i.Contents -} - -// GetDeployments returns the Deployments field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetDeployments() string { - if i == nil || i.Deployments == nil { - return "" - } - return *i.Deployments -} - -// GetEmails returns the Emails field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetEmails() string { - if i == nil || i.Emails == nil { - return "" - } - return *i.Emails -} - -// GetFollowers returns the Followers field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetFollowers() string { - if i == nil || i.Followers == nil { - return "" - } - return *i.Followers -} - -// GetIssues returns the Issues field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetIssues() string { - if i == nil || i.Issues == nil { - return "" - } - return *i.Issues -} - -// GetMembers returns the Members field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetMembers() string { - if i == nil || i.Members == nil { - return "" - } - return *i.Members -} - -// GetMetadata returns the Metadata field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetMetadata() string { - if i == nil || i.Metadata == nil { - return "" - } - return *i.Metadata -} - -// GetOrganizationAdministration returns the OrganizationAdministration field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetOrganizationAdministration() string { - if i == nil || i.OrganizationAdministration == nil { - return "" - } - return *i.OrganizationAdministration -} - -// GetOrganizationHooks returns the OrganizationHooks field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetOrganizationHooks() string { - if i == nil || i.OrganizationHooks == nil { - return "" - } - return *i.OrganizationHooks -} - -// GetOrganizationPlan returns the OrganizationPlan field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetOrganizationPlan() string { - if i == nil || i.OrganizationPlan == nil { - return "" - } - return *i.OrganizationPlan -} - -// GetOrganizationPreReceiveHooks returns the OrganizationPreReceiveHooks field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetOrganizationPreReceiveHooks() string { - if i == nil || i.OrganizationPreReceiveHooks == nil { - return "" - } - return *i.OrganizationPreReceiveHooks -} - -// GetOrganizationProjects returns the OrganizationProjects field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetOrganizationProjects() string { - if i == nil || i.OrganizationProjects == nil { - return "" - } - return *i.OrganizationProjects -} - -// GetOrganizationUserBlocking returns the OrganizationUserBlocking field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetOrganizationUserBlocking() string { - if i == nil || i.OrganizationUserBlocking == nil { - return "" - } - return *i.OrganizationUserBlocking -} - -// GetPackages returns the Packages field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetPackages() string { - if i == nil || i.Packages == nil { - return "" - } - return *i.Packages -} - -// GetPages returns the Pages field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetPages() string { - if i == nil || i.Pages == nil { - return "" - } - return *i.Pages -} - -// GetPullRequests returns the PullRequests field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetPullRequests() string { - if i == nil || i.PullRequests == nil { - return "" - } - return *i.PullRequests -} - -// GetRepositoryHooks returns the RepositoryHooks field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetRepositoryHooks() string { - if i == nil || i.RepositoryHooks == nil { - return "" - } - return *i.RepositoryHooks -} - -// GetRepositoryPreReceiveHooks returns the RepositoryPreReceiveHooks field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetRepositoryPreReceiveHooks() string { - if i == nil || i.RepositoryPreReceiveHooks == nil { - return "" - } - return *i.RepositoryPreReceiveHooks -} - -// GetRepositoryProjects returns the RepositoryProjects field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetRepositoryProjects() string { - if i == nil || i.RepositoryProjects == nil { - return "" - } - return *i.RepositoryProjects -} - -// GetSingleFile returns the SingleFile field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetSingleFile() string { - if i == nil || i.SingleFile == nil { - return "" - } - return *i.SingleFile -} - -// GetStatuses returns the Statuses field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetStatuses() string { - if i == nil || i.Statuses == nil { - return "" - } - return *i.Statuses -} - -// GetTeamDiscussions returns the TeamDiscussions field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetTeamDiscussions() string { - if i == nil || i.TeamDiscussions == nil { - return "" - } - return *i.TeamDiscussions -} - -// GetVulnerabilityAlerts returns the VulnerabilityAlerts field if it's non-nil, zero value otherwise. -func (i *InstallationPermissions) GetVulnerabilityAlerts() string { - if i == nil || i.VulnerabilityAlerts == nil { - return "" - } - return *i.VulnerabilityAlerts -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *InstallationRepositoriesEvent) GetAction() string { - if i == nil || i.Action == nil { - return "" - } - return *i.Action -} - -// GetInstallation returns the Installation field. -func (i *InstallationRepositoriesEvent) GetInstallation() *Installation { - if i == nil { - return nil - } - return i.Installation -} - -// GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. -func (i *InstallationRepositoriesEvent) GetRepositorySelection() string { - if i == nil || i.RepositorySelection == nil { - return "" - } - return *i.RepositorySelection -} - -// GetSender returns the Sender field. -func (i *InstallationRepositoriesEvent) GetSender() *User { - if i == nil { - return nil - } - return i.Sender -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (i *InstallationToken) GetExpiresAt() time.Time { - if i == nil || i.ExpiresAt == nil { - return time.Time{} - } - return *i.ExpiresAt -} - -// GetPermissions returns the Permissions field. -func (i *InstallationToken) GetPermissions() *InstallationPermissions { - if i == nil { - return nil - } - return i.Permissions -} - -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (i *InstallationToken) GetToken() string { - if i == nil || i.Token == nil { - return "" - } - return *i.Token -} - -// GetPermissions returns the Permissions field. -func (i *InstallationTokenOptions) GetPermissions() *InstallationPermissions { - if i == nil { - return nil - } - return i.Permissions -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (i *InteractionRestriction) GetExpiresAt() Timestamp { - if i == nil || i.ExpiresAt == nil { - return Timestamp{} - } - return *i.ExpiresAt -} - -// GetLimit returns the Limit field if it's non-nil, zero value otherwise. -func (i *InteractionRestriction) GetLimit() string { - if i == nil || i.Limit == nil { - return "" - } - return *i.Limit -} - -// GetOrigin returns the Origin field if it's non-nil, zero value otherwise. -func (i *InteractionRestriction) GetOrigin() string { - if i == nil || i.Origin == nil { - return "" - } - return *i.Origin -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *Invitation) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} - } - return *i.CreatedAt -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (i *Invitation) GetEmail() string { - if i == nil || i.Email == nil { - return "" - } - return *i.Email -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *Invitation) GetID() int64 { - if i == nil || i.ID == nil { - return 0 - } - return *i.ID -} - -// GetInvitationTeamURL returns the InvitationTeamURL field if it's non-nil, zero value otherwise. -func (i *Invitation) GetInvitationTeamURL() string { - if i == nil || i.InvitationTeamURL == nil { - return "" - } - return *i.InvitationTeamURL -} - -// GetInviter returns the Inviter field. -func (i *Invitation) GetInviter() *User { - if i == nil { - return nil - } - return i.Inviter -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (i *Invitation) GetLogin() string { - if i == nil || i.Login == nil { - return "" - } - return *i.Login -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (i *Invitation) GetNodeID() string { - if i == nil || i.NodeID == nil { - return "" - } - return *i.NodeID -} - -// GetRole returns the Role field if it's non-nil, zero value otherwise. -func (i *Invitation) GetRole() string { - if i == nil || i.Role == nil { - return "" - } - return *i.Role -} - -// GetTeamCount returns the TeamCount field if it's non-nil, zero value otherwise. -func (i *Invitation) GetTeamCount() int { - if i == nil || i.TeamCount == nil { - return 0 - } - return *i.TeamCount -} - -// GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. -func (i *Issue) GetActiveLockReason() string { - if i == nil || i.ActiveLockReason == nil { - return "" - } - return *i.ActiveLockReason -} - -// GetAssignee returns the Assignee field. -func (i *Issue) GetAssignee() *User { - if i == nil { - return nil - } - return i.Assignee -} - -// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (i *Issue) GetAuthorAssociation() string { - if i == nil || i.AuthorAssociation == nil { - return "" - } - return *i.AuthorAssociation -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (i *Issue) GetBody() string { - if i == nil || i.Body == nil { - return "" - } - return *i.Body -} - -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (i *Issue) GetClosedAt() time.Time { - if i == nil || i.ClosedAt == nil { - return time.Time{} - } - return *i.ClosedAt -} - -// GetClosedBy returns the ClosedBy field. -func (i *Issue) GetClosedBy() *User { - if i == nil { - return nil - } - return i.ClosedBy -} - -// GetComments returns the Comments field if it's non-nil, zero value otherwise. -func (i *Issue) GetComments() int { - if i == nil || i.Comments == nil { - return 0 - } - return *i.Comments -} - -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetCommentsURL() string { - if i == nil || i.CommentsURL == nil { - return "" - } - return *i.CommentsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *Issue) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} - } - return *i.CreatedAt -} - -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetEventsURL() string { - if i == nil || i.EventsURL == nil { - return "" - } - return *i.EventsURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { - return "" - } - return *i.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *Issue) GetID() int64 { - if i == nil || i.ID == nil { - return 0 - } - return *i.ID -} - -// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetLabelsURL() string { - if i == nil || i.LabelsURL == nil { - return "" - } - return *i.LabelsURL -} - -// GetLocked returns the Locked field if it's non-nil, zero value otherwise. -func (i *Issue) GetLocked() bool { - if i == nil || i.Locked == nil { - return false - } - return *i.Locked -} - -// GetMilestone returns the Milestone field. -func (i *Issue) GetMilestone() *Milestone { - if i == nil { - return nil - } - return i.Milestone -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (i *Issue) GetNodeID() string { - if i == nil || i.NodeID == nil { - return "" - } - return *i.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (i *Issue) GetNumber() int { - if i == nil || i.Number == nil { - return 0 - } - return *i.Number -} - -// GetPullRequestLinks returns the PullRequestLinks field. -func (i *Issue) GetPullRequestLinks() *PullRequestLinks { - if i == nil { - return nil - } - return i.PullRequestLinks -} - -// GetReactions returns the Reactions field. -func (i *Issue) GetReactions() *Reactions { - if i == nil { - return nil - } - return i.Reactions -} - -// GetRepository returns the Repository field. -func (i *Issue) GetRepository() *Repository { - if i == nil { - return nil - } - return i.Repository -} - -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetRepositoryURL() string { - if i == nil || i.RepositoryURL == nil { - return "" - } - return *i.RepositoryURL -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (i *Issue) GetState() string { - if i == nil || i.State == nil { - return "" - } - return *i.State -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (i *Issue) GetTitle() string { - if i == nil || i.Title == nil { - return "" - } - return *i.Title -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (i *Issue) GetUpdatedAt() time.Time { - if i == nil || i.UpdatedAt == nil { - return time.Time{} - } - return *i.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *Issue) GetURL() string { - if i == nil || i.URL == nil { - return "" - } - return *i.URL -} - -// GetUser returns the User field. -func (i *Issue) GetUser() *User { - if i == nil { - return nil - } - return i.User -} - -// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetAuthorAssociation() string { - if i == nil || i.AuthorAssociation == nil { - return "" - } - return *i.AuthorAssociation -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetBody() string { - if i == nil || i.Body == nil { - return "" - } - return *i.Body -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} - } - return *i.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { - return "" - } - return *i.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetID() int64 { - if i == nil || i.ID == nil { - return 0 - } - return *i.ID -} - -// GetIssueURL returns the IssueURL field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetIssueURL() string { - if i == nil || i.IssueURL == nil { - return "" - } - return *i.IssueURL -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetNodeID() string { - if i == nil || i.NodeID == nil { - return "" - } - return *i.NodeID -} - -// GetReactions returns the Reactions field. -func (i *IssueComment) GetReactions() *Reactions { - if i == nil { - return nil - } - return i.Reactions -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetUpdatedAt() time.Time { - if i == nil || i.UpdatedAt == nil { - return time.Time{} - } - return *i.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetURL() string { - if i == nil || i.URL == nil { - return "" - } - return *i.URL -} - -// GetUser returns the User field. -func (i *IssueComment) GetUser() *User { - if i == nil { - return nil - } - return i.User -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *IssueCommentEvent) GetAction() string { - if i == nil || i.Action == nil { - return "" - } - return *i.Action -} - -// GetChanges returns the Changes field. -func (i *IssueCommentEvent) GetChanges() *EditChange { - if i == nil { - return nil - } - return i.Changes -} - -// GetComment returns the Comment field. -func (i *IssueCommentEvent) GetComment() *IssueComment { - if i == nil { - return nil - } - return i.Comment -} - -// GetInstallation returns the Installation field. -func (i *IssueCommentEvent) GetInstallation() *Installation { - if i == nil { - return nil - } - return i.Installation -} - -// GetIssue returns the Issue field. -func (i *IssueCommentEvent) GetIssue() *Issue { - if i == nil { - return nil - } - return i.Issue -} - -// GetRepo returns the Repo field. -func (i *IssueCommentEvent) GetRepo() *Repository { - if i == nil { - return nil - } - return i.Repo -} - -// GetSender returns the Sender field. -func (i *IssueCommentEvent) GetSender() *User { - if i == nil { - return nil - } - return i.Sender -} - -// GetActor returns the Actor field. -func (i *IssueEvent) GetActor() *User { - if i == nil { - return nil - } - return i.Actor -} - -// GetAssignee returns the Assignee field. -func (i *IssueEvent) GetAssignee() *User { - if i == nil { - return nil - } - return i.Assignee -} - -// GetAssigner returns the Assigner field. -func (i *IssueEvent) GetAssigner() *User { - if i == nil { - return nil - } - return i.Assigner -} - -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetCommitID() string { - if i == nil || i.CommitID == nil { - return "" - } - return *i.CommitID -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} - } - return *i.CreatedAt -} - -// GetDismissedReview returns the DismissedReview field. -func (i *IssueEvent) GetDismissedReview() *DismissedReview { - if i == nil { - return nil - } - return i.DismissedReview -} - -// GetEvent returns the Event field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetEvent() string { - if i == nil || i.Event == nil { - return "" - } - return *i.Event -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetID() int64 { - if i == nil || i.ID == nil { - return 0 - } - return *i.ID -} - -// GetIssue returns the Issue field. -func (i *IssueEvent) GetIssue() *Issue { - if i == nil { - return nil - } - return i.Issue -} - -// GetLabel returns the Label field. -func (i *IssueEvent) GetLabel() *Label { - if i == nil { - return nil - } - return i.Label -} - -// GetLockReason returns the LockReason field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetLockReason() string { - if i == nil || i.LockReason == nil { - return "" - } - return *i.LockReason -} - -// GetMilestone returns the Milestone field. -func (i *IssueEvent) GetMilestone() *Milestone { - if i == nil { - return nil - } - return i.Milestone -} - -// GetProjectCard returns the ProjectCard field. -func (i *IssueEvent) GetProjectCard() *ProjectCard { - if i == nil { - return nil - } - return i.ProjectCard -} - -// GetRename returns the Rename field. -func (i *IssueEvent) GetRename() *Rename { - if i == nil { - return nil - } - return i.Rename -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetURL() string { - if i == nil || i.URL == nil { - return "" - } - return *i.URL -} - -// GetDirection returns the Direction field if it's non-nil, zero value otherwise. -func (i *IssueListCommentsOptions) GetDirection() string { - if i == nil || i.Direction == nil { - return "" - } - return *i.Direction -} - -// GetSince returns the Since field if it's non-nil, zero value otherwise. -func (i *IssueListCommentsOptions) GetSince() time.Time { - if i == nil || i.Since == nil { - return time.Time{} - } - return *i.Since -} - -// GetSort returns the Sort field if it's non-nil, zero value otherwise. -func (i *IssueListCommentsOptions) GetSort() string { - if i == nil || i.Sort == nil { - return "" - } - return *i.Sort -} - -// GetAssignee returns the Assignee field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetAssignee() string { - if i == nil || i.Assignee == nil { - return "" - } - return *i.Assignee -} - -// GetAssignees returns the Assignees field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetAssignees() []string { - if i == nil || i.Assignees == nil { - return nil - } - return *i.Assignees -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetBody() string { - if i == nil || i.Body == nil { - return "" - } - return *i.Body -} - -// GetLabels returns the Labels field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetLabels() []string { - if i == nil || i.Labels == nil { - return nil - } - return *i.Labels -} - -// GetMilestone returns the Milestone field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetMilestone() int { - if i == nil || i.Milestone == nil { - return 0 - } - return *i.Milestone -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetState() string { - if i == nil || i.State == nil { - return "" - } - return *i.State -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetTitle() string { - if i == nil || i.Title == nil { - return "" - } - return *i.Title -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *IssuesEvent) GetAction() string { - if i == nil || i.Action == nil { - return "" - } - return *i.Action -} - -// GetAssignee returns the Assignee field. -func (i *IssuesEvent) GetAssignee() *User { - if i == nil { - return nil - } - return i.Assignee -} - -// GetChanges returns the Changes field. -func (i *IssuesEvent) GetChanges() *EditChange { - if i == nil { - return nil - } - return i.Changes -} - -// GetInstallation returns the Installation field. -func (i *IssuesEvent) GetInstallation() *Installation { - if i == nil { - return nil - } - return i.Installation -} - -// GetIssue returns the Issue field. -func (i *IssuesEvent) GetIssue() *Issue { - if i == nil { - return nil - } - return i.Issue -} - -// GetLabel returns the Label field. -func (i *IssuesEvent) GetLabel() *Label { - if i == nil { - return nil - } - return i.Label -} - -// GetRepo returns the Repo field. -func (i *IssuesEvent) GetRepo() *Repository { - if i == nil { - return nil - } - return i.Repo -} - -// GetSender returns the Sender field. -func (i *IssuesEvent) GetSender() *User { - if i == nil { - return nil - } - return i.Sender -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (i *IssuesSearchResult) GetIncompleteResults() bool { - if i == nil || i.IncompleteResults == nil { - return false - } - return *i.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (i *IssuesSearchResult) GetTotal() int { - if i == nil || i.Total == nil { - return 0 - } - return *i.Total -} - -// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. -func (i *IssueStats) GetClosedIssues() int { - if i == nil || i.ClosedIssues == nil { - return 0 - } - return *i.ClosedIssues -} - -// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. -func (i *IssueStats) GetOpenIssues() int { - if i == nil || i.OpenIssues == nil { - return 0 - } - return *i.OpenIssues -} - -// GetTotalIssues returns the TotalIssues field if it's non-nil, zero value otherwise. -func (i *IssueStats) GetTotalIssues() int { - if i == nil || i.TotalIssues == nil { - return 0 - } - return *i.TotalIssues -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (j *Jobs) GetTotalCount() int { - if j == nil || j.TotalCount == nil { - return 0 - } - return *j.TotalCount -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (k *Key) GetCreatedAt() Timestamp { - if k == nil || k.CreatedAt == nil { - return Timestamp{} - } - return *k.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (k *Key) GetID() int64 { - if k == nil || k.ID == nil { - return 0 - } - return *k.ID -} - -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (k *Key) GetKey() string { - if k == nil || k.Key == nil { - return "" - } - return *k.Key -} - -// GetReadOnly returns the ReadOnly field if it's non-nil, zero value otherwise. -func (k *Key) GetReadOnly() bool { - if k == nil || k.ReadOnly == nil { - return false - } - return *k.ReadOnly -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (k *Key) GetTitle() string { - if k == nil || k.Title == nil { - return "" - } - return *k.Title -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (k *Key) GetURL() string { - if k == nil || k.URL == nil { - return "" - } - return *k.URL -} - -// GetColor returns the Color field if it's non-nil, zero value otherwise. -func (l *Label) GetColor() string { - if l == nil || l.Color == nil { - return "" - } - return *l.Color -} - -// GetDefault returns the Default field if it's non-nil, zero value otherwise. -func (l *Label) GetDefault() bool { - if l == nil || l.Default == nil { - return false - } - return *l.Default -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (l *Label) GetDescription() string { - if l == nil || l.Description == nil { - return "" - } - return *l.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (l *Label) GetID() int64 { - if l == nil || l.ID == nil { - return 0 - } - return *l.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (l *Label) GetName() string { - if l == nil || l.Name == nil { - return "" - } - return *l.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (l *Label) GetNodeID() string { - if l == nil || l.NodeID == nil { - return "" - } - return *l.NodeID -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (l *Label) GetURL() string { - if l == nil || l.URL == nil { - return "" - } - return *l.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (l *LabelEvent) GetAction() string { - if l == nil || l.Action == nil { - return "" - } - return *l.Action -} - -// GetChanges returns the Changes field. -func (l *LabelEvent) GetChanges() *EditChange { - if l == nil { - return nil - } - return l.Changes -} - -// GetInstallation returns the Installation field. -func (l *LabelEvent) GetInstallation() *Installation { - if l == nil { - return nil - } - return l.Installation -} - -// GetLabel returns the Label field. -func (l *LabelEvent) GetLabel() *Label { - if l == nil { - return nil - } - return l.Label -} - -// GetOrg returns the Org field. -func (l *LabelEvent) GetOrg() *Organization { - if l == nil { - return nil - } - return l.Org -} - -// GetRepo returns the Repo field. -func (l *LabelEvent) GetRepo() *Repository { - if l == nil { - return nil - } - return l.Repo -} - -// GetColor returns the Color field if it's non-nil, zero value otherwise. -func (l *LabelResult) GetColor() string { - if l == nil || l.Color == nil { - return "" - } - return *l.Color -} - -// GetDefault returns the Default field if it's non-nil, zero value otherwise. -func (l *LabelResult) GetDefault() bool { - if l == nil || l.Default == nil { - return false - } - return *l.Default -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (l *LabelResult) GetDescription() string { - if l == nil || l.Description == nil { - return "" - } - return *l.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (l *LabelResult) GetID() int64 { - if l == nil || l.ID == nil { - return 0 - } - return *l.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (l *LabelResult) GetName() string { - if l == nil || l.Name == nil { - return "" - } - return *l.Name -} - -// GetScore returns the Score field. -func (l *LabelResult) GetScore() *float64 { - if l == nil { - return nil - } - return l.Score -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (l *LabelResult) GetURL() string { - if l == nil || l.URL == nil { - return "" - } - return *l.URL -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (l *LabelsSearchResult) GetIncompleteResults() bool { - if l == nil || l.IncompleteResults == nil { - return false - } - return *l.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (l *LabelsSearchResult) GetTotal() int { - if l == nil || l.Total == nil { - return 0 - } - return *l.Total -} - -// GetOID returns the OID field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetOID() string { - if l == nil || l.OID == nil { - return "" - } - return *l.OID -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetPath() string { - if l == nil || l.Path == nil { - return "" - } - return *l.Path -} - -// GetRefName returns the RefName field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetRefName() string { - if l == nil || l.RefName == nil { - return "" - } - return *l.RefName -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetSize() int { - if l == nil || l.Size == nil { - return 0 - } - return *l.Size -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (l *License) GetBody() string { - if l == nil || l.Body == nil { - return "" - } - return *l.Body -} - -// GetConditions returns the Conditions field if it's non-nil, zero value otherwise. -func (l *License) GetConditions() []string { - if l == nil || l.Conditions == nil { - return nil - } - return *l.Conditions -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (l *License) GetDescription() string { - if l == nil || l.Description == nil { - return "" - } - return *l.Description -} - -// GetFeatured returns the Featured field if it's non-nil, zero value otherwise. -func (l *License) GetFeatured() bool { - if l == nil || l.Featured == nil { - return false - } - return *l.Featured -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (l *License) GetHTMLURL() string { - if l == nil || l.HTMLURL == nil { - return "" - } - return *l.HTMLURL -} - -// GetImplementation returns the Implementation field if it's non-nil, zero value otherwise. -func (l *License) GetImplementation() string { - if l == nil || l.Implementation == nil { - return "" - } - return *l.Implementation -} - -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (l *License) GetKey() string { - if l == nil || l.Key == nil { - return "" - } - return *l.Key -} - -// GetLimitations returns the Limitations field if it's non-nil, zero value otherwise. -func (l *License) GetLimitations() []string { - if l == nil || l.Limitations == nil { - return nil - } - return *l.Limitations -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (l *License) GetName() string { - if l == nil || l.Name == nil { - return "" - } - return *l.Name -} - -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (l *License) GetPermissions() []string { - if l == nil || l.Permissions == nil { - return nil - } - return *l.Permissions -} - -// GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. -func (l *License) GetSPDXID() string { - if l == nil || l.SPDXID == nil { - return "" - } - return *l.SPDXID -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (l *License) GetURL() string { - if l == nil || l.URL == nil { - return "" - } - return *l.URL -} - -// GetCheckName returns the CheckName field if it's non-nil, zero value otherwise. -func (l *ListCheckRunsOptions) GetCheckName() string { - if l == nil || l.CheckName == nil { - return "" - } - return *l.CheckName -} - -// GetFilter returns the Filter field if it's non-nil, zero value otherwise. -func (l *ListCheckRunsOptions) GetFilter() string { - if l == nil || l.Filter == nil { - return "" - } - return *l.Filter -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (l *ListCheckRunsOptions) GetStatus() string { - if l == nil || l.Status == nil { - return "" - } - return *l.Status -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (l *ListCheckRunsResults) GetTotal() int { - if l == nil || l.Total == nil { - return 0 - } - return *l.Total -} - -// GetAppID returns the AppID field if it's non-nil, zero value otherwise. -func (l *ListCheckSuiteOptions) GetAppID() int { - if l == nil || l.AppID == nil { - return 0 - } - return *l.AppID -} - -// GetCheckName returns the CheckName field if it's non-nil, zero value otherwise. -func (l *ListCheckSuiteOptions) GetCheckName() string { - if l == nil || l.CheckName == nil { - return "" - } - return *l.CheckName -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (l *ListCheckSuiteResults) GetTotal() int { - if l == nil || l.Total == nil { - return 0 - } - return *l.Total -} - -// GetAffiliation returns the Affiliation field if it's non-nil, zero value otherwise. -func (l *ListCollaboratorOptions) GetAffiliation() string { - if l == nil || l.Affiliation == nil { - return "" - } - return *l.Affiliation -} - -// GetEffectiveDate returns the EffectiveDate field if it's non-nil, zero value otherwise. -func (m *MarketplacePendingChange) GetEffectiveDate() Timestamp { - if m == nil || m.EffectiveDate == nil { - return Timestamp{} - } - return *m.EffectiveDate -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *MarketplacePendingChange) GetID() int64 { - if m == nil || m.ID == nil { - return 0 - } - return *m.ID -} - -// GetPlan returns the Plan field. -func (m *MarketplacePendingChange) GetPlan() *MarketplacePlan { - if m == nil { - return nil - } - return m.Plan -} - -// GetUnitCount returns the UnitCount field if it's non-nil, zero value otherwise. -func (m *MarketplacePendingChange) GetUnitCount() int { - if m == nil || m.UnitCount == nil { - return 0 - } - return *m.UnitCount -} - -// GetAccountsURL returns the AccountsURL field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetAccountsURL() string { - if m == nil || m.AccountsURL == nil { - return "" - } - return *m.AccountsURL -} - -// GetBullets returns the Bullets field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetBullets() []string { - if m == nil || m.Bullets == nil { - return nil - } - return *m.Bullets -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetDescription() string { - if m == nil || m.Description == nil { - return "" - } - return *m.Description -} - -// GetHasFreeTrial returns the HasFreeTrial field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetHasFreeTrial() bool { - if m == nil || m.HasFreeTrial == nil { - return false - } - return *m.HasFreeTrial -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetID() int64 { - if m == nil || m.ID == nil { - return 0 - } - return *m.ID -} - -// GetMonthlyPriceInCents returns the MonthlyPriceInCents field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetMonthlyPriceInCents() int { - if m == nil || m.MonthlyPriceInCents == nil { - return 0 - } - return *m.MonthlyPriceInCents -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetName() string { - if m == nil || m.Name == nil { - return "" - } - return *m.Name -} - -// GetPriceModel returns the PriceModel field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetPriceModel() string { - if m == nil || m.PriceModel == nil { - return "" - } - return *m.PriceModel -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetState() string { - if m == nil || m.State == nil { - return "" - } - return *m.State -} - -// GetUnitName returns the UnitName field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetUnitName() string { - if m == nil || m.UnitName == nil { - return "" - } - return *m.UnitName -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetURL() string { - if m == nil || m.URL == nil { - return "" - } - return *m.URL -} - -// GetYearlyPriceInCents returns the YearlyPriceInCents field if it's non-nil, zero value otherwise. -func (m *MarketplacePlan) GetYearlyPriceInCents() int { - if m == nil || m.YearlyPriceInCents == nil { - return 0 - } - return *m.YearlyPriceInCents -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetEmail() string { - if m == nil || m.Email == nil { - return "" - } - return *m.Email -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetID() int64 { - if m == nil || m.ID == nil { - return 0 - } - return *m.ID -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetLogin() string { - if m == nil || m.Login == nil { - return "" - } - return *m.Login -} - -// GetMarketplacePendingChange returns the MarketplacePendingChange field. -func (m *MarketplacePlanAccount) GetMarketplacePendingChange() *MarketplacePendingChange { - if m == nil { - return nil - } - return m.MarketplacePendingChange -} - -// GetMarketplacePurchase returns the MarketplacePurchase field. -func (m *MarketplacePlanAccount) GetMarketplacePurchase() *MarketplacePurchase { - if m == nil { - return nil - } - return m.MarketplacePurchase -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetNodeID() string { - if m == nil || m.NodeID == nil { - return "" - } - return *m.NodeID -} - -// GetOrganizationBillingEmail returns the OrganizationBillingEmail field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetOrganizationBillingEmail() string { - if m == nil || m.OrganizationBillingEmail == nil { - return "" - } - return *m.OrganizationBillingEmail -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetType() string { - if m == nil || m.Type == nil { - return "" - } - return *m.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *MarketplacePlanAccount) GetURL() string { - if m == nil || m.URL == nil { - return "" - } - return *m.URL -} - -// GetAccount returns the Account field. -func (m *MarketplacePurchase) GetAccount() *MarketplacePlanAccount { - if m == nil { - return nil - } - return m.Account -} - -// GetBillingCycle returns the BillingCycle field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchase) GetBillingCycle() string { - if m == nil || m.BillingCycle == nil { - return "" - } - return *m.BillingCycle -} - -// GetFreeTrialEndsOn returns the FreeTrialEndsOn field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchase) GetFreeTrialEndsOn() Timestamp { - if m == nil || m.FreeTrialEndsOn == nil { - return Timestamp{} - } - return *m.FreeTrialEndsOn -} - -// GetNextBillingDate returns the NextBillingDate field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchase) GetNextBillingDate() Timestamp { - if m == nil || m.NextBillingDate == nil { - return Timestamp{} - } - return *m.NextBillingDate -} - -// GetOnFreeTrial returns the OnFreeTrial field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchase) GetOnFreeTrial() bool { - if m == nil || m.OnFreeTrial == nil { - return false - } - return *m.OnFreeTrial -} - -// GetPlan returns the Plan field. -func (m *MarketplacePurchase) GetPlan() *MarketplacePlan { - if m == nil { - return nil - } - return m.Plan -} - -// GetUnitCount returns the UnitCount field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchase) GetUnitCount() int { - if m == nil || m.UnitCount == nil { - return 0 - } - return *m.UnitCount -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchaseEvent) GetAction() string { - if m == nil || m.Action == nil { - return "" - } - return *m.Action -} - -// GetEffectiveDate returns the EffectiveDate field if it's non-nil, zero value otherwise. -func (m *MarketplacePurchaseEvent) GetEffectiveDate() Timestamp { - if m == nil || m.EffectiveDate == nil { - return Timestamp{} - } - return *m.EffectiveDate -} - -// GetInstallation returns the Installation field. -func (m *MarketplacePurchaseEvent) GetInstallation() *Installation { - if m == nil { - return nil - } - return m.Installation -} - -// GetMarketplacePurchase returns the MarketplacePurchase field. -func (m *MarketplacePurchaseEvent) GetMarketplacePurchase() *MarketplacePurchase { - if m == nil { - return nil - } - return m.MarketplacePurchase -} - -// GetPreviousMarketplacePurchase returns the PreviousMarketplacePurchase field. -func (m *MarketplacePurchaseEvent) GetPreviousMarketplacePurchase() *MarketplacePurchase { - if m == nil { - return nil - } - return m.PreviousMarketplacePurchase -} - -// GetSender returns the Sender field. -func (m *MarketplacePurchaseEvent) GetSender() *User { - if m == nil { - return nil - } - return m.Sender -} - -// GetText returns the Text field if it's non-nil, zero value otherwise. -func (m *Match) GetText() string { - if m == nil || m.Text == nil { - return "" - } - return *m.Text -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MemberEvent) GetAction() string { - if m == nil || m.Action == nil { - return "" - } - return *m.Action -} - -// GetInstallation returns the Installation field. -func (m *MemberEvent) GetInstallation() *Installation { - if m == nil { - return nil - } - return m.Installation -} - -// GetMember returns the Member field. -func (m *MemberEvent) GetMember() *User { - if m == nil { - return nil - } - return m.Member -} - -// GetRepo returns the Repo field. -func (m *MemberEvent) GetRepo() *Repository { - if m == nil { - return nil - } - return m.Repo -} - -// GetSender returns the Sender field. -func (m *MemberEvent) GetSender() *User { - if m == nil { - return nil - } - return m.Sender -} - -// GetOrganization returns the Organization field. -func (m *Membership) GetOrganization() *Organization { - if m == nil { - return nil - } - return m.Organization -} - -// GetOrganizationURL returns the OrganizationURL field if it's non-nil, zero value otherwise. -func (m *Membership) GetOrganizationURL() string { - if m == nil || m.OrganizationURL == nil { - return "" - } - return *m.OrganizationURL -} - -// GetRole returns the Role field if it's non-nil, zero value otherwise. -func (m *Membership) GetRole() string { - if m == nil || m.Role == nil { - return "" - } - return *m.Role -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *Membership) GetState() string { - if m == nil || m.State == nil { - return "" - } - return *m.State -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Membership) GetURL() string { - if m == nil || m.URL == nil { - return "" - } - return *m.URL -} - -// GetUser returns the User field. -func (m *Membership) GetUser() *User { - if m == nil { - return nil - } - return m.User -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MembershipEvent) GetAction() string { - if m == nil || m.Action == nil { - return "" - } - return *m.Action -} - -// GetInstallation returns the Installation field. -func (m *MembershipEvent) GetInstallation() *Installation { - if m == nil { - return nil - } - return m.Installation -} - -// GetMember returns the Member field. -func (m *MembershipEvent) GetMember() *User { - if m == nil { - return nil - } - return m.Member -} - -// GetOrg returns the Org field. -func (m *MembershipEvent) GetOrg() *Organization { - if m == nil { - return nil - } - return m.Org -} - -// GetScope returns the Scope field if it's non-nil, zero value otherwise. -func (m *MembershipEvent) GetScope() string { - if m == nil || m.Scope == nil { - return "" - } - return *m.Scope -} - -// GetSender returns the Sender field. -func (m *MembershipEvent) GetSender() *User { - if m == nil { - return nil - } - return m.Sender -} - -// GetTeam returns the Team field. -func (m *MembershipEvent) GetTeam() *Team { - if m == nil { - return nil - } - return m.Team -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MetaEvent) GetAction() string { - if m == nil || m.Action == nil { - return "" - } - return *m.Action -} - -// GetHook returns the Hook field. -func (m *MetaEvent) GetHook() *Hook { - if m == nil { - return nil - } - return m.Hook -} - -// GetHookID returns the HookID field if it's non-nil, zero value otherwise. -func (m *MetaEvent) GetHookID() int64 { - if m == nil || m.HookID == nil { - return 0 - } - return *m.HookID -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (m *Metric) GetHTMLURL() string { - if m == nil || m.HTMLURL == nil { - return "" - } - return *m.HTMLURL -} - -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (m *Metric) GetKey() string { - if m == nil || m.Key == nil { - return "" - } - return *m.Key -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (m *Metric) GetName() string { - if m == nil || m.Name == nil { - return "" - } - return *m.Name -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Metric) GetURL() string { - if m == nil || m.URL == nil { - return "" - } - return *m.URL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (m *Migration) GetCreatedAt() string { - if m == nil || m.CreatedAt == nil { - return "" - } - return *m.CreatedAt -} - -// GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. -func (m *Migration) GetExcludeAttachments() bool { - if m == nil || m.ExcludeAttachments == nil { - return false - } - return *m.ExcludeAttachments -} - -// GetGUID returns the GUID field if it's non-nil, zero value otherwise. -func (m *Migration) GetGUID() string { - if m == nil || m.GUID == nil { - return "" - } - return *m.GUID -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *Migration) GetID() int64 { - if m == nil || m.ID == nil { - return 0 - } - return *m.ID -} - -// GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. -func (m *Migration) GetLockRepositories() bool { - if m == nil || m.LockRepositories == nil { - return false - } - return *m.LockRepositories -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *Migration) GetState() string { - if m == nil || m.State == nil { - return "" - } - return *m.State -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (m *Migration) GetUpdatedAt() string { - if m == nil || m.UpdatedAt == nil { - return "" - } - return *m.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Migration) GetURL() string { - if m == nil || m.URL == nil { - return "" - } - return *m.URL -} - -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (m *Milestone) GetClosedAt() time.Time { - if m == nil || m.ClosedAt == nil { - return time.Time{} - } - return *m.ClosedAt -} - -// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. -func (m *Milestone) GetClosedIssues() int { - if m == nil || m.ClosedIssues == nil { - return 0 - } - return *m.ClosedIssues -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (m *Milestone) GetCreatedAt() time.Time { - if m == nil || m.CreatedAt == nil { - return time.Time{} - } - return *m.CreatedAt -} - -// GetCreator returns the Creator field. -func (m *Milestone) GetCreator() *User { - if m == nil { - return nil - } - return m.Creator -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (m *Milestone) GetDescription() string { - if m == nil || m.Description == nil { - return "" - } - return *m.Description -} - -// GetDueOn returns the DueOn field if it's non-nil, zero value otherwise. -func (m *Milestone) GetDueOn() time.Time { - if m == nil || m.DueOn == nil { - return time.Time{} - } - return *m.DueOn -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (m *Milestone) GetHTMLURL() string { - if m == nil || m.HTMLURL == nil { - return "" - } - return *m.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *Milestone) GetID() int64 { - if m == nil || m.ID == nil { - return 0 - } - return *m.ID -} - -// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. -func (m *Milestone) GetLabelsURL() string { - if m == nil || m.LabelsURL == nil { - return "" - } - return *m.LabelsURL -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (m *Milestone) GetNodeID() string { - if m == nil || m.NodeID == nil { - return "" - } - return *m.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (m *Milestone) GetNumber() int { - if m == nil || m.Number == nil { - return 0 - } - return *m.Number -} - -// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. -func (m *Milestone) GetOpenIssues() int { - if m == nil || m.OpenIssues == nil { - return 0 - } - return *m.OpenIssues -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *Milestone) GetState() string { - if m == nil || m.State == nil { - return "" - } - return *m.State -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (m *Milestone) GetTitle() string { - if m == nil || m.Title == nil { - return "" - } - return *m.Title -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (m *Milestone) GetUpdatedAt() time.Time { - if m == nil || m.UpdatedAt == nil { - return time.Time{} - } - return *m.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Milestone) GetURL() string { - if m == nil || m.URL == nil { - return "" - } - return *m.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MilestoneEvent) GetAction() string { - if m == nil || m.Action == nil { - return "" - } - return *m.Action -} - -// GetChanges returns the Changes field. -func (m *MilestoneEvent) GetChanges() *EditChange { - if m == nil { - return nil - } - return m.Changes -} - -// GetInstallation returns the Installation field. -func (m *MilestoneEvent) GetInstallation() *Installation { - if m == nil { - return nil - } - return m.Installation -} - -// GetMilestone returns the Milestone field. -func (m *MilestoneEvent) GetMilestone() *Milestone { - if m == nil { - return nil - } - return m.Milestone -} - -// GetOrg returns the Org field. -func (m *MilestoneEvent) GetOrg() *Organization { - if m == nil { - return nil - } - return m.Org -} - -// GetRepo returns the Repo field. -func (m *MilestoneEvent) GetRepo() *Repository { - if m == nil { - return nil - } - return m.Repo -} - -// GetSender returns the Sender field. -func (m *MilestoneEvent) GetSender() *User { - if m == nil { - return nil - } - return m.Sender -} - -// GetClosedMilestones returns the ClosedMilestones field if it's non-nil, zero value otherwise. -func (m *MilestoneStats) GetClosedMilestones() int { - if m == nil || m.ClosedMilestones == nil { - return 0 - } - return *m.ClosedMilestones -} - -// GetOpenMilestones returns the OpenMilestones field if it's non-nil, zero value otherwise. -func (m *MilestoneStats) GetOpenMilestones() int { - if m == nil || m.OpenMilestones == nil { - return 0 - } - return *m.OpenMilestones -} - -// GetTotalMilestones returns the TotalMilestones field if it's non-nil, zero value otherwise. -func (m *MilestoneStats) GetTotalMilestones() int { - if m == nil || m.TotalMilestones == nil { - return 0 - } - return *m.TotalMilestones -} - -// GetBase returns the Base field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetBase() string { - if n == nil || n.Base == nil { - return "" - } - return *n.Base -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetBody() string { - if n == nil || n.Body == nil { - return "" - } - return *n.Body -} - -// GetDraft returns the Draft field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetDraft() bool { - if n == nil || n.Draft == nil { - return false - } - return *n.Draft -} - -// GetHead returns the Head field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetHead() string { - if n == nil || n.Head == nil { - return "" - } - return *n.Head -} - -// GetIssue returns the Issue field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetIssue() int { - if n == nil || n.Issue == nil { - return 0 - } - return *n.Issue -} - -// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetMaintainerCanModify() bool { - if n == nil || n.MaintainerCanModify == nil { - return false - } - return *n.MaintainerCanModify -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetTitle() string { - if n == nil || n.Title == nil { - return "" - } - return *n.Title -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetDescription() string { - if n == nil || n.Description == nil { - return "" - } - return *n.Description -} - -// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetLDAPDN() string { - if n == nil || n.LDAPDN == nil { - return "" - } - return *n.LDAPDN -} - -// GetParentTeamID returns the ParentTeamID field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetParentTeamID() int64 { - if n == nil || n.ParentTeamID == nil { - return 0 - } - return *n.ParentTeamID -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetPermission() string { - if n == nil || n.Permission == nil { - return "" - } - return *n.Permission -} - -// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetPrivacy() string { - if n == nil || n.Privacy == nil { - return "" - } - return *n.Privacy -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (n *Notification) GetID() string { - if n == nil || n.ID == nil { - return "" - } - return *n.ID -} - -// GetLastReadAt returns the LastReadAt field if it's non-nil, zero value otherwise. -func (n *Notification) GetLastReadAt() time.Time { - if n == nil || n.LastReadAt == nil { - return time.Time{} - } - return *n.LastReadAt -} - -// GetReason returns the Reason field if it's non-nil, zero value otherwise. -func (n *Notification) GetReason() string { - if n == nil || n.Reason == nil { - return "" - } - return *n.Reason -} - -// GetRepository returns the Repository field. -func (n *Notification) GetRepository() *Repository { - if n == nil { - return nil - } - return n.Repository -} - -// GetSubject returns the Subject field. -func (n *Notification) GetSubject() *NotificationSubject { - if n == nil { - return nil - } - return n.Subject -} - -// GetUnread returns the Unread field if it's non-nil, zero value otherwise. -func (n *Notification) GetUnread() bool { - if n == nil || n.Unread == nil { - return false - } - return *n.Unread -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (n *Notification) GetUpdatedAt() time.Time { - if n == nil || n.UpdatedAt == nil { - return time.Time{} - } - return *n.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (n *Notification) GetURL() string { - if n == nil || n.URL == nil { - return "" - } - return *n.URL -} - -// GetLatestCommentURL returns the LatestCommentURL field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetLatestCommentURL() string { - if n == nil || n.LatestCommentURL == nil { - return "" - } - return *n.LatestCommentURL -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetTitle() string { - if n == nil || n.Title == nil { - return "" - } - return *n.Title -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetType() string { - if n == nil || n.Type == nil { - return "" - } - return *n.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetURL() string { - if n == nil || n.URL == nil { - return "" - } - return *n.URL -} - -// GetClientID returns the ClientID field if it's non-nil, zero value otherwise. -func (o *OAuthAPP) GetClientID() string { - if o == nil || o.ClientID == nil { - return "" - } - return *o.ClientID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (o *OAuthAPP) GetName() string { - if o == nil || o.Name == nil { - return "" - } - return *o.Name -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (o *OAuthAPP) GetURL() string { - if o == nil || o.URL == nil { - return "" - } - return *o.URL -} - -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetAvatarURL() string { - if o == nil || o.AvatarURL == nil { - return "" - } - return *o.AvatarURL -} - -// GetBillingEmail returns the BillingEmail field if it's non-nil, zero value otherwise. -func (o *Organization) GetBillingEmail() string { - if o == nil || o.BillingEmail == nil { - return "" - } - return *o.BillingEmail -} - -// GetBlog returns the Blog field if it's non-nil, zero value otherwise. -func (o *Organization) GetBlog() string { - if o == nil || o.Blog == nil { - return "" - } - return *o.Blog -} - -// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. -func (o *Organization) GetCollaborators() int { - if o == nil || o.Collaborators == nil { - return 0 - } - return *o.Collaborators -} - -// GetCompany returns the Company field if it's non-nil, zero value otherwise. -func (o *Organization) GetCompany() string { - if o == nil || o.Company == nil { - return "" - } - return *o.Company -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (o *Organization) GetCreatedAt() time.Time { - if o == nil || o.CreatedAt == nil { - return time.Time{} - } - return *o.CreatedAt -} - -// GetDefaultRepoPermission returns the DefaultRepoPermission field if it's non-nil, zero value otherwise. -func (o *Organization) GetDefaultRepoPermission() string { - if o == nil || o.DefaultRepoPermission == nil { - return "" - } - return *o.DefaultRepoPermission -} - -// GetDefaultRepoSettings returns the DefaultRepoSettings field if it's non-nil, zero value otherwise. -func (o *Organization) GetDefaultRepoSettings() string { - if o == nil || o.DefaultRepoSettings == nil { - return "" - } - return *o.DefaultRepoSettings -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (o *Organization) GetDescription() string { - if o == nil || o.Description == nil { - return "" - } - return *o.Description -} - -// GetDiskUsage returns the DiskUsage field if it's non-nil, zero value otherwise. -func (o *Organization) GetDiskUsage() int { - if o == nil || o.DiskUsage == nil { - return 0 - } - return *o.DiskUsage -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (o *Organization) GetEmail() string { - if o == nil || o.Email == nil { - return "" - } - return *o.Email -} - -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetEventsURL() string { - if o == nil || o.EventsURL == nil { - return "" - } - return *o.EventsURL -} - -// GetFollowers returns the Followers field if it's non-nil, zero value otherwise. -func (o *Organization) GetFollowers() int { - if o == nil || o.Followers == nil { - return 0 - } - return *o.Followers -} - -// GetFollowing returns the Following field if it's non-nil, zero value otherwise. -func (o *Organization) GetFollowing() int { - if o == nil || o.Following == nil { - return 0 - } - return *o.Following -} - -// GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetHooksURL() string { - if o == nil || o.HooksURL == nil { - return "" - } - return *o.HooksURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetHTMLURL() string { - if o == nil || o.HTMLURL == nil { - return "" - } - return *o.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (o *Organization) GetID() int64 { - if o == nil || o.ID == nil { - return 0 - } - return *o.ID -} - -// GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetIssuesURL() string { - if o == nil || o.IssuesURL == nil { - return "" - } - return *o.IssuesURL -} - -// GetLocation returns the Location field if it's non-nil, zero value otherwise. -func (o *Organization) GetLocation() string { - if o == nil || o.Location == nil { - return "" - } - return *o.Location -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (o *Organization) GetLogin() string { - if o == nil || o.Login == nil { - return "" - } - return *o.Login -} - -// GetMembersAllowedRepositoryCreationType returns the MembersAllowedRepositoryCreationType field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersAllowedRepositoryCreationType() string { - if o == nil || o.MembersAllowedRepositoryCreationType == nil { - return "" - } - return *o.MembersAllowedRepositoryCreationType -} - -// GetMembersCanCreateInternalRepos returns the MembersCanCreateInternalRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersCanCreateInternalRepos() bool { - if o == nil || o.MembersCanCreateInternalRepos == nil { - return false - } - return *o.MembersCanCreateInternalRepos -} - -// GetMembersCanCreatePrivateRepos returns the MembersCanCreatePrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersCanCreatePrivateRepos() bool { - if o == nil || o.MembersCanCreatePrivateRepos == nil { - return false - } - return *o.MembersCanCreatePrivateRepos -} - -// GetMembersCanCreatePublicRepos returns the MembersCanCreatePublicRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersCanCreatePublicRepos() bool { - if o == nil || o.MembersCanCreatePublicRepos == nil { - return false - } - return *o.MembersCanCreatePublicRepos -} - -// GetMembersCanCreateRepos returns the MembersCanCreateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersCanCreateRepos() bool { - if o == nil || o.MembersCanCreateRepos == nil { - return false - } - return *o.MembersCanCreateRepos -} - -// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersURL() string { - if o == nil || o.MembersURL == nil { - return "" - } - return *o.MembersURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (o *Organization) GetName() string { - if o == nil || o.Name == nil { - return "" - } - return *o.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (o *Organization) GetNodeID() string { - if o == nil || o.NodeID == nil { - return "" - } - return *o.NodeID -} - -// GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetOwnedPrivateRepos() int { - if o == nil || o.OwnedPrivateRepos == nil { - return 0 - } - return *o.OwnedPrivateRepos -} - -// GetPlan returns the Plan field. -func (o *Organization) GetPlan() *Plan { - if o == nil { - return nil - } - return o.Plan -} - -// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. -func (o *Organization) GetPrivateGists() int { - if o == nil || o.PrivateGists == nil { - return 0 - } - return *o.PrivateGists -} - -// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. -func (o *Organization) GetPublicGists() int { - if o == nil || o.PublicGists == nil { - return 0 - } - return *o.PublicGists -} - -// GetPublicMembersURL returns the PublicMembersURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetPublicMembersURL() string { - if o == nil || o.PublicMembersURL == nil { - return "" - } - return *o.PublicMembersURL -} - -// GetPublicRepos returns the PublicRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetPublicRepos() int { - if o == nil || o.PublicRepos == nil { - return 0 - } - return *o.PublicRepos -} - -// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetReposURL() string { - if o == nil || o.ReposURL == nil { - return "" - } - return *o.ReposURL -} - -// GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetTotalPrivateRepos() int { - if o == nil || o.TotalPrivateRepos == nil { - return 0 - } - return *o.TotalPrivateRepos -} - -// GetTwoFactorRequirementEnabled returns the TwoFactorRequirementEnabled field if it's non-nil, zero value otherwise. -func (o *Organization) GetTwoFactorRequirementEnabled() bool { - if o == nil || o.TwoFactorRequirementEnabled == nil { - return false - } - return *o.TwoFactorRequirementEnabled -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (o *Organization) GetType() string { - if o == nil || o.Type == nil { - return "" - } - return *o.Type -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (o *Organization) GetUpdatedAt() time.Time { - if o == nil || o.UpdatedAt == nil { - return time.Time{} - } - return *o.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (o *Organization) GetURL() string { - if o == nil || o.URL == nil { - return "" - } - return *o.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (o *OrganizationEvent) GetAction() string { - if o == nil || o.Action == nil { - return "" - } - return *o.Action -} - -// GetInstallation returns the Installation field. -func (o *OrganizationEvent) GetInstallation() *Installation { - if o == nil { - return nil - } - return o.Installation -} - -// GetInvitation returns the Invitation field. -func (o *OrganizationEvent) GetInvitation() *Invitation { - if o == nil { - return nil - } - return o.Invitation -} - -// GetMembership returns the Membership field. -func (o *OrganizationEvent) GetMembership() *Membership { - if o == nil { - return nil - } - return o.Membership -} - -// GetOrganization returns the Organization field. -func (o *OrganizationEvent) GetOrganization() *Organization { - if o == nil { - return nil - } - return o.Organization -} - -// GetSender returns the Sender field. -func (o *OrganizationEvent) GetSender() *User { - if o == nil { - return nil - } - return o.Sender -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (o *OrganizationInstallations) GetTotalCount() int { - if o == nil || o.TotalCount == nil { - return 0 - } - return *o.TotalCount -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (o *OrgBlockEvent) GetAction() string { - if o == nil || o.Action == nil { - return "" - } - return *o.Action -} - -// GetBlockedUser returns the BlockedUser field. -func (o *OrgBlockEvent) GetBlockedUser() *User { - if o == nil { - return nil - } - return o.BlockedUser -} - -// GetInstallation returns the Installation field. -func (o *OrgBlockEvent) GetInstallation() *Installation { - if o == nil { - return nil - } - return o.Installation -} - -// GetOrganization returns the Organization field. -func (o *OrgBlockEvent) GetOrganization() *Organization { - if o == nil { - return nil - } - return o.Organization -} - -// GetSender returns the Sender field. -func (o *OrgBlockEvent) GetSender() *User { - if o == nil { - return nil - } - return o.Sender -} - -// GetDisabledOrgs returns the DisabledOrgs field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetDisabledOrgs() int { - if o == nil || o.DisabledOrgs == nil { - return 0 - } - return *o.DisabledOrgs -} - -// GetTotalOrgs returns the TotalOrgs field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetTotalOrgs() int { - if o == nil || o.TotalOrgs == nil { - return 0 - } - return *o.TotalOrgs -} - -// GetTotalTeamMembers returns the TotalTeamMembers field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetTotalTeamMembers() int { - if o == nil || o.TotalTeamMembers == nil { - return 0 - } - return *o.TotalTeamMembers -} - -// GetTotalTeams returns the TotalTeams field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetTotalTeams() int { - if o == nil || o.TotalTeams == nil { - return 0 - } - return *o.TotalTeams -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *Page) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *Page) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetPageName returns the PageName field if it's non-nil, zero value otherwise. -func (p *Page) GetPageName() string { - if p == nil || p.PageName == nil { - return "" - } - return *p.PageName -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (p *Page) GetSHA() string { - if p == nil || p.SHA == nil { - return "" - } - return *p.SHA -} - -// GetSummary returns the Summary field if it's non-nil, zero value otherwise. -func (p *Page) GetSummary() string { - if p == nil || p.Summary == nil { - return "" - } - return *p.Summary -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *Page) GetTitle() string { - if p == nil || p.Title == nil { - return "" - } - return *p.Title -} - -// GetBuild returns the Build field. -func (p *PageBuildEvent) GetBuild() *PagesBuild { - if p == nil { - return nil - } - return p.Build -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PageBuildEvent) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetInstallation returns the Installation field. -func (p *PageBuildEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetRepo returns the Repo field. -func (p *PageBuildEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *PageBuildEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetCNAME returns the CNAME field if it's non-nil, zero value otherwise. -func (p *Pages) GetCNAME() string { - if p == nil || p.CNAME == nil { - return "" - } - return *p.CNAME -} - -// GetCustom404 returns the Custom404 field if it's non-nil, zero value otherwise. -func (p *Pages) GetCustom404() bool { - if p == nil || p.Custom404 == nil { - return false - } - return *p.Custom404 -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *Pages) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetSource returns the Source field. -func (p *Pages) GetSource() *PagesSource { - if p == nil { - return nil - } - return p.Source -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (p *Pages) GetStatus() string { - if p == nil || p.Status == nil { - return "" - } - return *p.Status -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Pages) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetCommit returns the Commit field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetCommit() string { - if p == nil || p.Commit == nil { - return "" - } - return *p.Commit -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetDuration returns the Duration field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetDuration() int { - if p == nil || p.Duration == nil { - return 0 - } - return *p.Duration -} - -// GetError returns the Error field. -func (p *PagesBuild) GetError() *PagesError { - if p == nil { - return nil - } - return p.Error -} - -// GetPusher returns the Pusher field. -func (p *PagesBuild) GetPusher() *User { - if p == nil { - return nil - } - return p.Pusher -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetStatus() string { - if p == nil || p.Status == nil { - return "" - } - return *p.Status -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PagesError) GetMessage() string { - if p == nil || p.Message == nil { - return "" - } - return *p.Message -} - -// GetBranch returns the Branch field if it's non-nil, zero value otherwise. -func (p *PagesSource) GetBranch() string { - if p == nil || p.Branch == nil { - return "" - } - return *p.Branch -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (p *PagesSource) GetPath() string { - if p == nil || p.Path == nil { - return "" - } - return *p.Path -} - -// GetTotalPages returns the TotalPages field if it's non-nil, zero value otherwise. -func (p *PageStats) GetTotalPages() int { - if p == nil || p.TotalPages == nil { - return 0 - } - return *p.TotalPages -} - -// GetCNAME returns the CNAME field if it's non-nil, zero value otherwise. -func (p *PagesUpdate) GetCNAME() string { - if p == nil || p.CNAME == nil { - return "" - } - return *p.CNAME -} - -// GetSource returns the Source field if it's non-nil, zero value otherwise. -func (p *PagesUpdate) GetSource() string { - if p == nil || p.Source == nil { - return "" - } - return *p.Source -} - -// GetHook returns the Hook field. -func (p *PingEvent) GetHook() *Hook { - if p == nil { - return nil - } - return p.Hook -} - -// GetHookID returns the HookID field if it's non-nil, zero value otherwise. -func (p *PingEvent) GetHookID() int64 { - if p == nil || p.HookID == nil { - return 0 - } - return *p.HookID -} - -// GetInstallation returns the Installation field. -func (p *PingEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetZen returns the Zen field if it's non-nil, zero value otherwise. -func (p *PingEvent) GetZen() string { - if p == nil || p.Zen == nil { - return "" - } - return *p.Zen -} - -// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. -func (p *Plan) GetCollaborators() int { - if p == nil || p.Collaborators == nil { - return 0 - } - return *p.Collaborators -} - -// GetFilledSeats returns the FilledSeats field if it's non-nil, zero value otherwise. -func (p *Plan) GetFilledSeats() int { - if p == nil || p.FilledSeats == nil { - return 0 - } - return *p.FilledSeats -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *Plan) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetPrivateRepos returns the PrivateRepos field if it's non-nil, zero value otherwise. -func (p *Plan) GetPrivateRepos() int { - if p == nil || p.PrivateRepos == nil { - return 0 - } - return *p.PrivateRepos -} - -// GetSeats returns the Seats field if it's non-nil, zero value otherwise. -func (p *Plan) GetSeats() int { - if p == nil || p.Seats == nil { - return 0 - } - return *p.Seats -} - -// GetSpace returns the Space field if it's non-nil, zero value otherwise. -func (p *Plan) GetSpace() int { - if p == nil || p.Space == nil { - return 0 - } - return *p.Space -} - -// GetConfigURL returns the ConfigURL field if it's non-nil, zero value otherwise. -func (p *PreReceiveHook) GetConfigURL() string { - if p == nil || p.ConfigURL == nil { - return "" - } - return *p.ConfigURL -} - -// GetEnforcement returns the Enforcement field if it's non-nil, zero value otherwise. -func (p *PreReceiveHook) GetEnforcement() string { - if p == nil || p.Enforcement == nil { - return "" - } - return *p.Enforcement -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PreReceiveHook) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *PreReceiveHook) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetHRef returns the HRef field if it's non-nil, zero value otherwise. -func (p *PRLink) GetHRef() string { - if p == nil || p.HRef == nil { - return "" - } - return *p.HRef -} - -// GetComments returns the Comments field. -func (p *PRLinks) GetComments() *PRLink { - if p == nil { - return nil - } - return p.Comments -} - -// GetCommits returns the Commits field. -func (p *PRLinks) GetCommits() *PRLink { - if p == nil { - return nil - } - return p.Commits -} - -// GetHTML returns the HTML field. -func (p *PRLinks) GetHTML() *PRLink { - if p == nil { - return nil - } - return p.HTML -} - -// GetIssue returns the Issue field. -func (p *PRLinks) GetIssue() *PRLink { - if p == nil { - return nil - } - return p.Issue -} - -// GetReviewComment returns the ReviewComment field. -func (p *PRLinks) GetReviewComment() *PRLink { - if p == nil { - return nil - } - return p.ReviewComment -} - -// GetReviewComments returns the ReviewComments field. -func (p *PRLinks) GetReviewComments() *PRLink { - if p == nil { - return nil - } - return p.ReviewComments -} - -// GetSelf returns the Self field. -func (p *PRLinks) GetSelf() *PRLink { - if p == nil { - return nil - } - return p.Self -} - -// GetStatuses returns the Statuses field. -func (p *PRLinks) GetStatuses() *PRLink { - if p == nil { - return nil - } - return p.Statuses -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *Project) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetColumnsURL returns the ColumnsURL field if it's non-nil, zero value otherwise. -func (p *Project) GetColumnsURL() string { - if p == nil || p.ColumnsURL == nil { - return "" - } - return *p.ColumnsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetCreator returns the Creator field. -func (p *Project) GetCreator() *User { - if p == nil { - return nil - } - return p.Creator -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *Project) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *Project) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *Project) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *Project) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *Project) GetNumber() int { - if p == nil || p.Number == nil { - return 0 - } - return *p.Number -} - -// GetOwnerURL returns the OwnerURL field if it's non-nil, zero value otherwise. -func (p *Project) GetOwnerURL() string { - if p == nil || p.OwnerURL == nil { - return "" - } - return *p.OwnerURL -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *Project) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Project) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetArchived() bool { - if p == nil || p.Archived == nil { - return false - } - return *p.Archived -} - -// GetColumnID returns the ColumnID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnID() int64 { - if p == nil || p.ColumnID == nil { - return 0 - } - return *p.ColumnID -} - -// GetColumnName returns the ColumnName field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnName() string { - if p == nil || p.ColumnName == nil { - return "" - } - return *p.ColumnName -} - -// GetColumnURL returns the ColumnURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnURL() string { - if p == nil || p.ColumnURL == nil { - return "" - } - return *p.ColumnURL -} - -// GetContentURL returns the ContentURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetContentURL() string { - if p == nil || p.ContentURL == nil { - return "" - } - return *p.ContentURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetCreator returns the Creator field. -func (p *ProjectCard) GetCreator() *User { - if p == nil { - return nil - } - return p.Creator -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetNote() string { - if p == nil || p.Note == nil { - return "" - } - return *p.Note -} - -// GetPreviousColumnName returns the PreviousColumnName field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetPreviousColumnName() string { - if p == nil || p.PreviousColumnName == nil { - return "" - } - return *p.PreviousColumnName -} - -// GetProjectID returns the ProjectID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetProjectID() int64 { - if p == nil || p.ProjectID == nil { - return 0 - } - return *p.ProjectID -} - -// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetProjectURL() string { - if p == nil || p.ProjectURL == nil { - return "" - } - return *p.ProjectURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAfterID() int64 { - if p == nil || p.AfterID == nil { - return 0 - } - return *p.AfterID -} - -// GetChanges returns the Changes field. -func (p *ProjectCardEvent) GetChanges() *ProjectCardChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *ProjectCardEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrg returns the Org field. -func (p *ProjectCardEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetProjectCard returns the ProjectCard field. -func (p *ProjectCardEvent) GetProjectCard() *ProjectCard { - if p == nil { - return nil - } - return p.ProjectCard -} - -// GetRepo returns the Repo field. -func (p *ProjectCardEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *ProjectCardEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetArchivedState returns the ArchivedState field if it's non-nil, zero value otherwise. -func (p *ProjectCardListOptions) GetArchivedState() string { - if p == nil || p.ArchivedState == nil { - return "" - } - return *p.ArchivedState -} - -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (p *ProjectCardOptions) GetArchived() bool { - if p == nil || p.Archived == nil { - return false - } - return *p.Archived -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (p *ProjectCollaboratorOptions) GetPermission() string { - if p == nil || p.Permission == nil { - return "" - } - return *p.Permission -} - -// GetCardsURL returns the CardsURL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetCardsURL() string { - if p == nil || p.CardsURL == nil { - return "" - } - return *p.CardsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetProjectURL() string { - if p == nil || p.ProjectURL == nil { - return "" - } - return *p.ProjectURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectColumnEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. -func (p *ProjectColumnEvent) GetAfterID() int64 { - if p == nil || p.AfterID == nil { - return 0 - } - return *p.AfterID -} - -// GetChanges returns the Changes field. -func (p *ProjectColumnEvent) GetChanges() *ProjectColumnChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *ProjectColumnEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrg returns the Org field. -func (p *ProjectColumnEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetProjectColumn returns the ProjectColumn field. -func (p *ProjectColumnEvent) GetProjectColumn() *ProjectColumn { - if p == nil { - return nil - } - return p.ProjectColumn -} - -// GetRepo returns the Repo field. -func (p *ProjectColumnEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *ProjectColumnEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetChanges returns the Changes field. -func (p *ProjectEvent) GetChanges() *ProjectChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *ProjectEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrg returns the Org field. -func (p *ProjectEvent) GetOrg() *Organization { - if p == nil { - return nil - } - return p.Org -} - -// GetProject returns the Project field. -func (p *ProjectEvent) GetProject() *Project { - if p == nil { - return nil - } - return p.Project -} - -// GetRepo returns the Repo field. -func (p *ProjectEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *ProjectEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetOrganizationPermission() string { - if p == nil || p.OrganizationPermission == nil { - return "" - } - return *p.OrganizationPermission -} - -// GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetPublic() bool { - if p == nil || p.Public == nil { - return false - } - return *p.Public -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *ProjectOptions) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (p *ProjectPermissionLevel) GetPermission() string { - if p == nil || p.Permission == nil { - return "" - } - return *p.Permission -} - -// GetUser returns the User field. -func (p *ProjectPermissionLevel) GetUser() *User { - if p == nil { - return nil - } - return p.User -} - -// GetAllowDeletions returns the AllowDeletions field. -func (p *Protection) GetAllowDeletions() *AllowDeletions { - if p == nil { - return nil - } - return p.AllowDeletions -} - -// GetAllowForcePushes returns the AllowForcePushes field. -func (p *Protection) GetAllowForcePushes() *AllowForcePushes { - if p == nil { - return nil - } - return p.AllowForcePushes -} - -// GetEnforceAdmins returns the EnforceAdmins field. -func (p *Protection) GetEnforceAdmins() *AdminEnforcement { - if p == nil { - return nil - } - return p.EnforceAdmins -} - -// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. -func (p *Protection) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcement { - if p == nil { - return nil - } - return p.RequiredPullRequestReviews -} - -// GetRequiredStatusChecks returns the RequiredStatusChecks field. -func (p *Protection) GetRequiredStatusChecks() *RequiredStatusChecks { - if p == nil { - return nil - } - return p.RequiredStatusChecks -} - -// GetRequireLinearHistory returns the RequireLinearHistory field. -func (p *Protection) GetRequireLinearHistory() *RequireLinearHistory { - if p == nil { - return nil - } - return p.RequireLinearHistory -} - -// GetRestrictions returns the Restrictions field. -func (p *Protection) GetRestrictions() *BranchRestrictions { - if p == nil { - return nil - } - return p.Restrictions -} - -// GetAllowDeletions returns the AllowDeletions field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetAllowDeletions() bool { - if p == nil || p.AllowDeletions == nil { - return false - } - return *p.AllowDeletions -} - -// GetAllowForcePushes returns the AllowForcePushes field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetAllowForcePushes() bool { - if p == nil || p.AllowForcePushes == nil { - return false - } - return *p.AllowForcePushes -} - -// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. -func (p *ProtectionRequest) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcementRequest { - if p == nil { - return nil - } - return p.RequiredPullRequestReviews -} - -// GetRequiredStatusChecks returns the RequiredStatusChecks field. -func (p *ProtectionRequest) GetRequiredStatusChecks() *RequiredStatusChecks { - if p == nil { - return nil - } - return p.RequiredStatusChecks -} - -// GetRequireLinearHistory returns the RequireLinearHistory field if it's non-nil, zero value otherwise. -func (p *ProtectionRequest) GetRequireLinearHistory() bool { - if p == nil || p.RequireLinearHistory == nil { - return false - } - return *p.RequireLinearHistory -} - -// GetRestrictions returns the Restrictions field. -func (p *ProtectionRequest) GetRestrictions() *BranchRestrictionsRequest { - if p == nil { - return nil - } - return p.Restrictions -} - -// GetInstallation returns the Installation field. -func (p *PublicEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetRepo returns the Repo field. -func (p *PublicEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *PublicEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (p *PublicKey) GetKey() string { - if p == nil || p.Key == nil { - return "" - } - return *p.Key -} - -// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. -func (p *PublicKey) GetKeyID() string { - if p == nil || p.KeyID == nil { - return "" - } - return *p.KeyID -} - -// GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetActiveLockReason() string { - if p == nil || p.ActiveLockReason == nil { - return "" - } - return *p.ActiveLockReason -} - -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetAdditions() int { - if p == nil || p.Additions == nil { - return 0 - } - return *p.Additions -} - -// GetAssignee returns the Assignee field. -func (p *PullRequest) GetAssignee() *User { - if p == nil { - return nil - } - return p.Assignee -} - -// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetAuthorAssociation() string { - if p == nil || p.AuthorAssociation == nil { - return "" - } - return *p.AuthorAssociation -} - -// GetBase returns the Base field. -func (p *PullRequest) GetBase() *PullRequestBranch { - if p == nil { - return nil - } - return p.Base -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetChangedFiles returns the ChangedFiles field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetChangedFiles() int { - if p == nil || p.ChangedFiles == nil { - return 0 - } - return *p.ChangedFiles -} - -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetClosedAt() time.Time { - if p == nil || p.ClosedAt == nil { - return time.Time{} - } - return *p.ClosedAt -} - -// GetComments returns the Comments field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetComments() int { - if p == nil || p.Comments == nil { - return 0 - } - return *p.Comments -} - -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCommentsURL() string { - if p == nil || p.CommentsURL == nil { - return "" - } - return *p.CommentsURL -} - -// GetCommits returns the Commits field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCommits() int { - if p == nil || p.Commits == nil { - return 0 - } - return *p.Commits -} - -// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCommitsURL() string { - if p == nil || p.CommitsURL == nil { - return "" - } - return *p.CommitsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetCreatedAt() time.Time { - if p == nil || p.CreatedAt == nil { - return time.Time{} - } - return *p.CreatedAt -} - -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetDeletions() int { - if p == nil || p.Deletions == nil { - return 0 - } - return *p.Deletions -} - -// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetDiffURL() string { - if p == nil || p.DiffURL == nil { - return "" - } - return *p.DiffURL -} - -// GetDraft returns the Draft field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetDraft() bool { - if p == nil || p.Draft == nil { - return false - } - return *p.Draft -} - -// GetHead returns the Head field. -func (p *PullRequest) GetHead() *PullRequestBranch { - if p == nil { - return nil - } - return p.Head -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetIssueURL returns the IssueURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetIssueURL() string { - if p == nil || p.IssueURL == nil { - return "" - } - return *p.IssueURL -} - -// GetLinks returns the Links field. -func (p *PullRequest) GetLinks() *PRLinks { - if p == nil { - return nil - } - return p.Links -} - -// GetLocked returns the Locked field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetLocked() bool { - if p == nil || p.Locked == nil { - return false - } - return *p.Locked -} - -// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMaintainerCanModify() bool { - if p == nil || p.MaintainerCanModify == nil { - return false - } - return *p.MaintainerCanModify -} - -// GetMergeable returns the Mergeable field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergeable() bool { - if p == nil || p.Mergeable == nil { - return false - } - return *p.Mergeable -} - -// GetMergeableState returns the MergeableState field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergeableState() string { - if p == nil || p.MergeableState == nil { - return "" - } - return *p.MergeableState -} - -// GetMergeCommitSHA returns the MergeCommitSHA field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergeCommitSHA() string { - if p == nil || p.MergeCommitSHA == nil { - return "" - } - return *p.MergeCommitSHA -} - -// GetMerged returns the Merged field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMerged() bool { - if p == nil || p.Merged == nil { - return false - } - return *p.Merged -} - -// GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetMergedAt() time.Time { - if p == nil || p.MergedAt == nil { - return time.Time{} - } - return *p.MergedAt -} - -// GetMergedBy returns the MergedBy field. -func (p *PullRequest) GetMergedBy() *User { - if p == nil { - return nil - } - return p.MergedBy -} - -// GetMilestone returns the Milestone field. -func (p *PullRequest) GetMilestone() *Milestone { - if p == nil { - return nil - } - return p.Milestone -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetNumber() int { - if p == nil || p.Number == nil { - return 0 - } - return *p.Number -} - -// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetPatchURL() string { - if p == nil || p.PatchURL == nil { - return "" - } - return *p.PatchURL -} - -// GetRebaseable returns the Rebaseable field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetRebaseable() bool { - if p == nil || p.Rebaseable == nil { - return false - } - return *p.Rebaseable -} - -// GetReviewComments returns the ReviewComments field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetReviewComments() int { - if p == nil || p.ReviewComments == nil { - return 0 - } - return *p.ReviewComments -} - -// GetReviewCommentsURL returns the ReviewCommentsURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetReviewCommentsURL() string { - if p == nil || p.ReviewCommentsURL == nil { - return "" - } - return *p.ReviewCommentsURL -} - -// GetReviewCommentURL returns the ReviewCommentURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetReviewCommentURL() string { - if p == nil || p.ReviewCommentURL == nil { - return "" - } - return *p.ReviewCommentURL -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetStatusesURL() string { - if p == nil || p.StatusesURL == nil { - return "" - } - return *p.StatusesURL -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetTitle() string { - if p == nil || p.Title == nil { - return "" - } - return *p.Title -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetUpdatedAt() time.Time { - if p == nil || p.UpdatedAt == nil { - return time.Time{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetUser returns the User field. -func (p *PullRequest) GetUser() *User { - if p == nil { - return nil - } - return p.User -} - -// GetLabel returns the Label field if it's non-nil, zero value otherwise. -func (p *PullRequestBranch) GetLabel() string { - if p == nil || p.Label == nil { - return "" - } - return *p.Label -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (p *PullRequestBranch) GetRef() string { - if p == nil || p.Ref == nil { - return "" - } - return *p.Ref -} - -// GetRepo returns the Repo field. -func (p *PullRequestBranch) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (p *PullRequestBranch) GetSHA() string { - if p == nil || p.SHA == nil { - return "" - } - return *p.SHA -} - -// GetUser returns the User field. -func (p *PullRequestBranch) GetUser() *User { - if p == nil { - return nil - } - return p.User -} - -// GetExpectedHeadSHA returns the ExpectedHeadSHA field if it's non-nil, zero value otherwise. -func (p *PullRequestBranchUpdateOptions) GetExpectedHeadSHA() string { - if p == nil || p.ExpectedHeadSHA == nil { - return "" - } - return *p.ExpectedHeadSHA -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PullRequestBranchUpdateResponse) GetMessage() string { - if p == nil || p.Message == nil { - return "" - } - return *p.Message -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestBranchUpdateResponse) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetAuthorAssociation() string { - if p == nil || p.AuthorAssociation == nil { - return "" - } - return *p.AuthorAssociation -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetCommitID() string { - if p == nil || p.CommitID == nil { - return "" - } - return *p.CommitID -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetCreatedAt() time.Time { - if p == nil || p.CreatedAt == nil { - return time.Time{} - } - return *p.CreatedAt -} - -// GetDiffHunk returns the DiffHunk field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetDiffHunk() string { - if p == nil || p.DiffHunk == nil { - return "" - } - return *p.DiffHunk -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetInReplyTo returns the InReplyTo field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetInReplyTo() int64 { - if p == nil || p.InReplyTo == nil { - return 0 - } - return *p.InReplyTo -} - -// GetLine returns the Line field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetLine() int { - if p == nil || p.Line == nil { - return 0 - } - return *p.Line -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetOriginalCommitID returns the OriginalCommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalCommitID() string { - if p == nil || p.OriginalCommitID == nil { - return "" - } - return *p.OriginalCommitID -} - -// GetOriginalLine returns the OriginalLine field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalLine() int { - if p == nil || p.OriginalLine == nil { - return 0 - } - return *p.OriginalLine -} - -// GetOriginalPosition returns the OriginalPosition field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalPosition() int { - if p == nil || p.OriginalPosition == nil { - return 0 - } - return *p.OriginalPosition -} - -// GetOriginalStartLine returns the OriginalStartLine field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetOriginalStartLine() int { - if p == nil || p.OriginalStartLine == nil { - return 0 - } - return *p.OriginalStartLine -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPath() string { - if p == nil || p.Path == nil { - return "" - } - return *p.Path -} - -// GetPosition returns the Position field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPosition() int { - if p == nil || p.Position == nil { - return 0 - } - return *p.Position -} - -// GetPullRequestReviewID returns the PullRequestReviewID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPullRequestReviewID() int64 { - if p == nil || p.PullRequestReviewID == nil { - return 0 - } - return *p.PullRequestReviewID -} - -// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetPullRequestURL() string { - if p == nil || p.PullRequestURL == nil { - return "" - } - return *p.PullRequestURL -} - -// GetReactions returns the Reactions field. -func (p *PullRequestComment) GetReactions() *Reactions { - if p == nil { - return nil - } - return p.Reactions -} - -// GetSide returns the Side field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetSide() string { - if p == nil || p.Side == nil { - return "" - } - return *p.Side -} - -// GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetStartLine() int { - if p == nil || p.StartLine == nil { - return 0 - } - return *p.StartLine -} - -// GetStartSide returns the StartSide field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetStartSide() string { - if p == nil || p.StartSide == nil { - return "" - } - return *p.StartSide -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetUpdatedAt() time.Time { - if p == nil || p.UpdatedAt == nil { - return time.Time{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetUser returns the User field. -func (p *PullRequestComment) GetUser() *User { - if p == nil { - return nil - } - return p.User -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetAfter returns the After field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetAfter() string { - if p == nil || p.After == nil { - return "" - } - return *p.After -} - -// GetAssignee returns the Assignee field. -func (p *PullRequestEvent) GetAssignee() *User { - if p == nil { - return nil - } - return p.Assignee -} - -// GetBefore returns the Before field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetBefore() string { - if p == nil || p.Before == nil { - return "" - } - return *p.Before -} - -// GetChanges returns the Changes field. -func (p *PullRequestEvent) GetChanges() *EditChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetInstallation returns the Installation field. -func (p *PullRequestEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetLabel returns the Label field. -func (p *PullRequestEvent) GetLabel() *Label { - if p == nil { - return nil - } - return p.Label -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetNumber() int { - if p == nil || p.Number == nil { - return 0 - } - return *p.Number -} - -// GetOrganization returns the Organization field. -func (p *PullRequestEvent) GetOrganization() *Organization { - if p == nil { - return nil - } - return p.Organization -} - -// GetPullRequest returns the PullRequest field. -func (p *PullRequestEvent) GetPullRequest() *PullRequest { - if p == nil { - return nil - } - return p.PullRequest -} - -// GetRepo returns the Repo field. -func (p *PullRequestEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetRequestedReviewer returns the RequestedReviewer field. -func (p *PullRequestEvent) GetRequestedReviewer() *User { - if p == nil { - return nil - } - return p.RequestedReviewer -} - -// GetRequestedTeam returns the RequestedTeam field. -func (p *PullRequestEvent) GetRequestedTeam() *Team { - if p == nil { - return nil - } - return p.RequestedTeam -} - -// GetSender returns the Sender field. -func (p *PullRequestEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetDiffURL() string { - if p == nil || p.DiffURL == nil { - return "" - } - return *p.DiffURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetPatchURL() string { - if p == nil || p.PatchURL == nil { - return "" - } - return *p.PatchURL -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestLinks) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetMerged returns the Merged field if it's non-nil, zero value otherwise. -func (p *PullRequestMergeResult) GetMerged() bool { - if p == nil || p.Merged == nil { - return false - } - return *p.Merged -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PullRequestMergeResult) GetMessage() string { - if p == nil || p.Message == nil { - return "" - } - return *p.Message -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (p *PullRequestMergeResult) GetSHA() string { - if p == nil || p.SHA == nil { - return "" - } - return *p.SHA -} - -// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetAuthorAssociation() string { - if p == nil || p.AuthorAssociation == nil { - return "" - } - return *p.AuthorAssociation -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetCommitID() string { - if p == nil || p.CommitID == nil { - return "" - } - return *p.CommitID -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetPullRequestURL() string { - if p == nil || p.PullRequestURL == nil { - return "" - } - return *p.PullRequestURL -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetSubmittedAt returns the SubmittedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetSubmittedAt() time.Time { - if p == nil || p.SubmittedAt == nil { - return time.Time{} - } - return *p.SubmittedAt -} - -// GetUser returns the User field. -func (p *PullRequestReview) GetUser() *User { - if p == nil { - return nil - } - return p.User -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewCommentEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetChanges returns the Changes field. -func (p *PullRequestReviewCommentEvent) GetChanges() *EditChange { - if p == nil { - return nil - } - return p.Changes -} - -// GetComment returns the Comment field. -func (p *PullRequestReviewCommentEvent) GetComment() *PullRequestComment { - if p == nil { - return nil - } - return p.Comment -} - -// GetInstallation returns the Installation field. -func (p *PullRequestReviewCommentEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetPullRequest returns the PullRequest field. -func (p *PullRequestReviewCommentEvent) GetPullRequest() *PullRequest { - if p == nil { - return nil - } - return p.PullRequest -} - -// GetRepo returns the Repo field. -func (p *PullRequestReviewCommentEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *PullRequestReviewCommentEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewDismissalRequest) GetMessage() string { - if p == nil || p.Message == nil { - return "" - } - return *p.Message -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" - } - return *p.Action -} - -// GetInstallation returns the Installation field. -func (p *PullRequestReviewEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetOrganization returns the Organization field. -func (p *PullRequestReviewEvent) GetOrganization() *Organization { - if p == nil { - return nil - } - return p.Organization -} - -// GetPullRequest returns the PullRequest field. -func (p *PullRequestReviewEvent) GetPullRequest() *PullRequest { - if p == nil { - return nil - } - return p.PullRequest -} - -// GetRepo returns the Repo field. -func (p *PullRequestReviewEvent) GetRepo() *Repository { - if p == nil { - return nil - } - return p.Repo -} - -// GetReview returns the Review field. -func (p *PullRequestReviewEvent) GetReview() *PullRequestReview { - if p == nil { - return nil - } - return p.Review -} - -// GetSender returns the Sender field. -func (p *PullRequestReviewEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetBody() string { - if p == nil || p.Body == nil { - return "" - } - return *p.Body -} - -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetCommitID() string { - if p == nil || p.CommitID == nil { - return "" - } - return *p.CommitID -} - -// GetEvent returns the Event field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetEvent() string { - if p == nil || p.Event == nil { - return "" - } - return *p.Event -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewRequest) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetDismissalRestrictions returns the DismissalRestrictions field. -func (p *PullRequestReviewsEnforcement) GetDismissalRestrictions() *DismissalRestrictions { - if p == nil { - return nil - } - return p.DismissalRestrictions -} - -// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. -func (p *PullRequestReviewsEnforcementRequest) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { - if p == nil { - return nil - } - return p.DismissalRestrictionsRequest -} - -// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. -func (p *PullRequestReviewsEnforcementUpdate) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { - if p == nil { - return nil - } - return p.DismissalRestrictionsRequest -} - -// GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { - if p == nil || p.DismissStaleReviews == nil { - return false - } - return *p.DismissStaleReviews -} - -// GetMergablePulls returns the MergablePulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetMergablePulls() int { - if p == nil || p.MergablePulls == nil { - return 0 - } - return *p.MergablePulls -} - -// GetMergedPulls returns the MergedPulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetMergedPulls() int { - if p == nil || p.MergedPulls == nil { - return 0 - } - return *p.MergedPulls -} - -// GetTotalPulls returns the TotalPulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetTotalPulls() int { - if p == nil || p.TotalPulls == nil { - return 0 - } - return *p.TotalPulls -} - -// GetUnmergablePulls returns the UnmergablePulls field if it's non-nil, zero value otherwise. -func (p *PullStats) GetUnmergablePulls() int { - if p == nil || p.UnmergablePulls == nil { - return 0 - } - return *p.UnmergablePulls -} - -// GetCommits returns the Commits field if it's non-nil, zero value otherwise. -func (p *PunchCard) GetCommits() int { - if p == nil || p.Commits == nil { - return 0 - } - return *p.Commits -} - -// GetDay returns the Day field if it's non-nil, zero value otherwise. -func (p *PunchCard) GetDay() int { - if p == nil || p.Day == nil { - return 0 - } - return *p.Day -} - -// GetHour returns the Hour field if it's non-nil, zero value otherwise. -func (p *PunchCard) GetHour() int { - if p == nil || p.Hour == nil { - return 0 - } - return *p.Hour -} - -// GetAfter returns the After field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetAfter() string { - if p == nil || p.After == nil { - return "" - } - return *p.After -} - -// GetBaseRef returns the BaseRef field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetBaseRef() string { - if p == nil || p.BaseRef == nil { - return "" - } - return *p.BaseRef -} - -// GetBefore returns the Before field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetBefore() string { - if p == nil || p.Before == nil { - return "" - } - return *p.Before -} - -// GetCompare returns the Compare field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetCompare() string { - if p == nil || p.Compare == nil { - return "" - } - return *p.Compare -} - -// GetCreated returns the Created field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetCreated() bool { - if p == nil || p.Created == nil { - return false - } - return *p.Created -} - -// GetDeleted returns the Deleted field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetDeleted() bool { - if p == nil || p.Deleted == nil { - return false - } - return *p.Deleted -} - -// GetDistinctSize returns the DistinctSize field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetDistinctSize() int { - if p == nil || p.DistinctSize == nil { - return 0 - } - return *p.DistinctSize -} - -// GetForced returns the Forced field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetForced() bool { - if p == nil || p.Forced == nil { - return false - } - return *p.Forced -} - -// GetHead returns the Head field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetHead() string { - if p == nil || p.Head == nil { - return "" - } - return *p.Head -} - -// GetHeadCommit returns the HeadCommit field. -func (p *PushEvent) GetHeadCommit() *HeadCommit { - if p == nil { - return nil - } - return p.HeadCommit -} - -// GetInstallation returns the Installation field. -func (p *PushEvent) GetInstallation() *Installation { - if p == nil { - return nil - } - return p.Installation -} - -// GetPusher returns the Pusher field. -func (p *PushEvent) GetPusher() *User { - if p == nil { - return nil - } - return p.Pusher -} - -// GetPushID returns the PushID field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetPushID() int64 { - if p == nil || p.PushID == nil { - return 0 - } - return *p.PushID -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetRef() string { - if p == nil || p.Ref == nil { - return "" - } - return *p.Ref -} - -// GetRepo returns the Repo field. -func (p *PushEvent) GetRepo() *PushEventRepository { - if p == nil { - return nil - } - return p.Repo -} - -// GetSender returns the Sender field. -func (p *PushEvent) GetSender() *User { - if p == nil { - return nil - } - return p.Sender -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetSize() int { - if p == nil || p.Size == nil { - return 0 - } - return *p.Size -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (p *PushEventRepoOwner) GetEmail() string { - if p == nil || p.Email == nil { - return "" - } - return *p.Email -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *PushEventRepoOwner) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetArchived() bool { - if p == nil || p.Archived == nil { - return false - } - return *p.Archived -} - -// GetArchiveURL returns the ArchiveURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetArchiveURL() string { - if p == nil || p.ArchiveURL == nil { - return "" - } - return *p.ArchiveURL -} - -// GetCloneURL returns the CloneURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetCloneURL() string { - if p == nil || p.CloneURL == nil { - return "" - } - return *p.CloneURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} - } - return *p.CreatedAt -} - -// GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetDefaultBranch() string { - if p == nil || p.DefaultBranch == nil { - return "" - } - return *p.DefaultBranch -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetDescription() string { - if p == nil || p.Description == nil { - return "" - } - return *p.Description -} - -// GetDisabled returns the Disabled field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetDisabled() bool { - if p == nil || p.Disabled == nil { - return false - } - return *p.Disabled -} - -// GetFork returns the Fork field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetFork() bool { - if p == nil || p.Fork == nil { - return false - } - return *p.Fork -} - -// GetForksCount returns the ForksCount field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetForksCount() int { - if p == nil || p.ForksCount == nil { - return 0 - } - return *p.ForksCount -} - -// GetFullName returns the FullName field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetFullName() string { - if p == nil || p.FullName == nil { - return "" - } - return *p.FullName -} - -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetGitURL() string { - if p == nil || p.GitURL == nil { - return "" - } - return *p.GitURL -} - -// GetHasDownloads returns the HasDownloads field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetHasDownloads() bool { - if p == nil || p.HasDownloads == nil { - return false - } - return *p.HasDownloads -} - -// GetHasIssues returns the HasIssues field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetHasIssues() bool { - if p == nil || p.HasIssues == nil { - return false - } - return *p.HasIssues -} - -// GetHasPages returns the HasPages field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetHasPages() bool { - if p == nil || p.HasPages == nil { - return false - } - return *p.HasPages -} - -// GetHasWiki returns the HasWiki field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetHasWiki() bool { - if p == nil || p.HasWiki == nil { - return false - } - return *p.HasWiki -} - -// GetHomepage returns the Homepage field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetHomepage() string { - if p == nil || p.Homepage == nil { - return "" - } - return *p.Homepage -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { - return "" - } - return *p.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetID() int64 { - if p == nil || p.ID == nil { - return 0 - } - return *p.ID -} - -// GetLanguage returns the Language field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetLanguage() string { - if p == nil || p.Language == nil { - return "" - } - return *p.Language -} - -// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetMasterBranch() string { - if p == nil || p.MasterBranch == nil { - return "" - } - return *p.MasterBranch -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetName() string { - if p == nil || p.Name == nil { - return "" - } - return *p.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetNodeID() string { - if p == nil || p.NodeID == nil { - return "" - } - return *p.NodeID -} - -// GetOpenIssuesCount returns the OpenIssuesCount field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetOpenIssuesCount() int { - if p == nil || p.OpenIssuesCount == nil { - return 0 - } - return *p.OpenIssuesCount -} - -// GetOrganization returns the Organization field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetOrganization() string { - if p == nil || p.Organization == nil { - return "" - } - return *p.Organization -} - -// GetOwner returns the Owner field. -func (p *PushEventRepository) GetOwner() *User { - if p == nil { - return nil - } - return p.Owner -} - -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetPrivate() bool { - if p == nil || p.Private == nil { - return false - } - return *p.Private -} - -// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetPullsURL() string { - if p == nil || p.PullsURL == nil { - return "" - } - return *p.PullsURL -} - -// GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetPushedAt() Timestamp { - if p == nil || p.PushedAt == nil { - return Timestamp{} - } - return *p.PushedAt -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetSize() int { - if p == nil || p.Size == nil { - return 0 - } - return *p.Size -} - -// GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetSSHURL() string { - if p == nil || p.SSHURL == nil { - return "" - } - return *p.SSHURL -} - -// GetStargazersCount returns the StargazersCount field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetStargazersCount() int { - if p == nil || p.StargazersCount == nil { - return 0 - } - return *p.StargazersCount -} - -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetStatusesURL() string { - if p == nil || p.StatusesURL == nil { - return "" - } - return *p.StatusesURL -} - -// GetSVNURL returns the SVNURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetSVNURL() string { - if p == nil || p.SVNURL == nil { - return "" - } - return *p.SVNURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} - } - return *p.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetURL() string { - if p == nil || p.URL == nil { - return "" - } - return *p.URL -} - -// GetWatchersCount returns the WatchersCount field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetWatchersCount() int { - if p == nil || p.WatchersCount == nil { - return 0 - } - return *p.WatchersCount -} - -// GetCore returns the Core field. -func (r *RateLimits) GetCore() *Rate { - if r == nil { - return nil - } - return r.Core -} - -// GetSearch returns the Search field. -func (r *RateLimits) GetSearch() *Rate { - if r == nil { - return nil - } - return r.Search -} - -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (r *Reaction) GetContent() string { - if r == nil || r.Content == nil { - return "" - } - return *r.Content -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Reaction) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *Reaction) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetUser returns the User field. -func (r *Reaction) GetUser() *User { - if r == nil { - return nil - } - return r.User -} - -// GetConfused returns the Confused field if it's non-nil, zero value otherwise. -func (r *Reactions) GetConfused() int { - if r == nil || r.Confused == nil { - return 0 - } - return *r.Confused -} - -// GetHeart returns the Heart field if it's non-nil, zero value otherwise. -func (r *Reactions) GetHeart() int { - if r == nil || r.Heart == nil { - return 0 - } - return *r.Heart -} - -// GetHooray returns the Hooray field if it's non-nil, zero value otherwise. -func (r *Reactions) GetHooray() int { - if r == nil || r.Hooray == nil { - return 0 - } - return *r.Hooray -} - -// GetLaugh returns the Laugh field if it's non-nil, zero value otherwise. -func (r *Reactions) GetLaugh() int { - if r == nil || r.Laugh == nil { - return 0 - } - return *r.Laugh -} - -// GetMinusOne returns the MinusOne field if it's non-nil, zero value otherwise. -func (r *Reactions) GetMinusOne() int { - if r == nil || r.MinusOne == nil { - return 0 - } - return *r.MinusOne -} - -// GetPlusOne returns the PlusOne field if it's non-nil, zero value otherwise. -func (r *Reactions) GetPlusOne() int { - if r == nil || r.PlusOne == nil { - return 0 - } - return *r.PlusOne -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (r *Reactions) GetTotalCount() int { - if r == nil || r.TotalCount == nil { - return 0 - } - return *r.TotalCount -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *Reactions) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *Reference) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetObject returns the Object field. -func (r *Reference) GetObject() *GitObject { - if r == nil { - return nil - } - return r.Object -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (r *Reference) GetRef() string { - if r == nil || r.Ref == nil { - return "" - } - return *r.Ref -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *Reference) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (r *RegistrationToken) GetExpiresAt() Timestamp { - if r == nil || r.ExpiresAt == nil { - return Timestamp{} - } - return *r.ExpiresAt -} - -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (r *RegistrationToken) GetToken() string { - if r == nil || r.Token == nil { - return "" - } - return *r.Token -} - -// GetBrowserDownloadURL returns the BrowserDownloadURL field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetBrowserDownloadURL() string { - if r == nil || r.BrowserDownloadURL == nil { - return "" - } - return *r.BrowserDownloadURL -} - -// GetContentType returns the ContentType field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetContentType() string { - if r == nil || r.ContentType == nil { - return "" - } - return *r.ContentType -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} - } - return *r.CreatedAt -} - -// GetDownloadCount returns the DownloadCount field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetDownloadCount() int { - if r == nil || r.DownloadCount == nil { - return 0 - } - return *r.DownloadCount -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetLabel returns the Label field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetLabel() string { - if r == nil || r.Label == nil { - return "" - } - return *r.Label -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetSize() int { - if r == nil || r.Size == nil { - return 0 - } - return *r.Size -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetState() string { - if r == nil || r.State == nil { - return "" - } - return *r.State -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetUpdatedAt() Timestamp { - if r == nil || r.UpdatedAt == nil { - return Timestamp{} - } - return *r.UpdatedAt -} - -// GetUploader returns the Uploader field. -func (r *ReleaseAsset) GetUploader() *User { - if r == nil { - return nil - } - return r.Uploader -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *ReleaseEvent) GetAction() string { - if r == nil || r.Action == nil { - return "" - } - return *r.Action -} - -// GetInstallation returns the Installation field. -func (r *ReleaseEvent) GetInstallation() *Installation { - if r == nil { - return nil - } - return r.Installation -} - -// GetRelease returns the Release field. -func (r *ReleaseEvent) GetRelease() *RepositoryRelease { - if r == nil { - return nil - } - return r.Release -} - -// GetRepo returns the Repo field. -func (r *ReleaseEvent) GetRepo() *Repository { - if r == nil { - return nil - } - return r.Repo -} - -// GetSender returns the Sender field. -func (r *ReleaseEvent) GetSender() *User { - if r == nil { - return nil - } - return r.Sender -} - -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (r *RemoveToken) GetExpiresAt() Timestamp { - if r == nil || r.ExpiresAt == nil { - return Timestamp{} - } - return *r.ExpiresAt -} - -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (r *RemoveToken) GetToken() string { - if r == nil || r.Token == nil { - return "" - } - return *r.Token -} - -// GetFrom returns the From field if it's non-nil, zero value otherwise. -func (r *Rename) GetFrom() string { - if r == nil || r.From == nil { - return "" - } - return *r.From -} - -// GetTo returns the To field if it's non-nil, zero value otherwise. -func (r *Rename) GetTo() string { - if r == nil || r.To == nil { - return "" - } - return *r.To -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (r *RepositoriesSearchResult) GetIncompleteResults() bool { - if r == nil || r.IncompleteResults == nil { - return false - } - return *r.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (r *RepositoriesSearchResult) GetTotal() int { - if r == nil || r.Total == nil { - return 0 - } - return *r.Total -} - -// GetAllowMergeCommit returns the AllowMergeCommit field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowMergeCommit() bool { - if r == nil || r.AllowMergeCommit == nil { - return false - } - return *r.AllowMergeCommit -} - -// GetAllowRebaseMerge returns the AllowRebaseMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowRebaseMerge() bool { - if r == nil || r.AllowRebaseMerge == nil { - return false - } - return *r.AllowRebaseMerge -} - -// GetAllowSquashMerge returns the AllowSquashMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetAllowSquashMerge() bool { - if r == nil || r.AllowSquashMerge == nil { - return false - } - return *r.AllowSquashMerge -} - -// GetArchived returns the Archived field if it's non-nil, zero value otherwise. -func (r *Repository) GetArchived() bool { - if r == nil || r.Archived == nil { - return false - } - return *r.Archived -} - -// GetArchiveURL returns the ArchiveURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetArchiveURL() string { - if r == nil || r.ArchiveURL == nil { - return "" - } - return *r.ArchiveURL -} - -// GetAssigneesURL returns the AssigneesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetAssigneesURL() string { - if r == nil || r.AssigneesURL == nil { - return "" - } - return *r.AssigneesURL -} - -// GetAutoInit returns the AutoInit field if it's non-nil, zero value otherwise. -func (r *Repository) GetAutoInit() bool { - if r == nil || r.AutoInit == nil { - return false - } - return *r.AutoInit -} - -// GetBlobsURL returns the BlobsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetBlobsURL() string { - if r == nil || r.BlobsURL == nil { - return "" - } - return *r.BlobsURL -} - -// GetBranchesURL returns the BranchesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetBranchesURL() string { - if r == nil || r.BranchesURL == nil { - return "" - } - return *r.BranchesURL -} - -// GetCloneURL returns the CloneURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCloneURL() string { - if r == nil || r.CloneURL == nil { - return "" - } - return *r.CloneURL -} - -// GetCodeOfConduct returns the CodeOfConduct field. -func (r *Repository) GetCodeOfConduct() *CodeOfConduct { - if r == nil { - return nil - } - return r.CodeOfConduct -} - -// GetCollaboratorsURL returns the CollaboratorsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCollaboratorsURL() string { - if r == nil || r.CollaboratorsURL == nil { - return "" - } - return *r.CollaboratorsURL -} - -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCommentsURL() string { - if r == nil || r.CommentsURL == nil { - return "" - } - return *r.CommentsURL -} - -// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCommitsURL() string { - if r == nil || r.CommitsURL == nil { - return "" - } - return *r.CommitsURL -} - -// GetCompareURL returns the CompareURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetCompareURL() string { - if r == nil || r.CompareURL == nil { - return "" - } - return *r.CompareURL -} - -// GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetContentsURL() string { - if r == nil || r.ContentsURL == nil { - return "" - } - return *r.ContentsURL -} - -// GetContributorsURL returns the ContributorsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetContributorsURL() string { - if r == nil || r.ContributorsURL == nil { - return "" - } - return *r.ContributorsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *Repository) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} - } - return *r.CreatedAt -} - -// GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise. -func (r *Repository) GetDefaultBranch() string { - if r == nil || r.DefaultBranch == nil { - return "" - } - return *r.DefaultBranch -} - -// GetDeleteBranchOnMerge returns the DeleteBranchOnMerge field if it's non-nil, zero value otherwise. -func (r *Repository) GetDeleteBranchOnMerge() bool { - if r == nil || r.DeleteBranchOnMerge == nil { - return false - } - return *r.DeleteBranchOnMerge -} - -// GetDeploymentsURL returns the DeploymentsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetDeploymentsURL() string { - if r == nil || r.DeploymentsURL == nil { - return "" - } - return *r.DeploymentsURL -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (r *Repository) GetDescription() string { - if r == nil || r.Description == nil { - return "" - } - return *r.Description -} - -// GetDisabled returns the Disabled field if it's non-nil, zero value otherwise. -func (r *Repository) GetDisabled() bool { - if r == nil || r.Disabled == nil { - return false - } - return *r.Disabled -} - -// GetDownloadsURL returns the DownloadsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetDownloadsURL() string { - if r == nil || r.DownloadsURL == nil { - return "" - } - return *r.DownloadsURL -} - -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetEventsURL() string { - if r == nil || r.EventsURL == nil { - return "" - } - return *r.EventsURL -} - -// GetFork returns the Fork field if it's non-nil, zero value otherwise. -func (r *Repository) GetFork() bool { - if r == nil || r.Fork == nil { - return false - } - return *r.Fork -} - -// GetForksCount returns the ForksCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetForksCount() int { - if r == nil || r.ForksCount == nil { - return 0 - } - return *r.ForksCount -} - -// GetForksURL returns the ForksURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetForksURL() string { - if r == nil || r.ForksURL == nil { - return "" - } - return *r.ForksURL -} - -// GetFullName returns the FullName field if it's non-nil, zero value otherwise. -func (r *Repository) GetFullName() string { - if r == nil || r.FullName == nil { - return "" - } - return *r.FullName -} - -// GetGitCommitsURL returns the GitCommitsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitCommitsURL() string { - if r == nil || r.GitCommitsURL == nil { - return "" - } - return *r.GitCommitsURL -} - -// GetGitignoreTemplate returns the GitignoreTemplate field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitignoreTemplate() string { - if r == nil || r.GitignoreTemplate == nil { - return "" - } - return *r.GitignoreTemplate -} - -// GetGitRefsURL returns the GitRefsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitRefsURL() string { - if r == nil || r.GitRefsURL == nil { - return "" - } - return *r.GitRefsURL -} - -// GetGitTagsURL returns the GitTagsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitTagsURL() string { - if r == nil || r.GitTagsURL == nil { - return "" - } - return *r.GitTagsURL -} - -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetGitURL() string { - if r == nil || r.GitURL == nil { - return "" - } - return *r.GitURL -} - -// GetHasDownloads returns the HasDownloads field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasDownloads() bool { - if r == nil || r.HasDownloads == nil { - return false - } - return *r.HasDownloads -} - -// GetHasIssues returns the HasIssues field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasIssues() bool { - if r == nil || r.HasIssues == nil { - return false - } - return *r.HasIssues -} - -// GetHasPages returns the HasPages field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasPages() bool { - if r == nil || r.HasPages == nil { - return false - } - return *r.HasPages -} - -// GetHasProjects returns the HasProjects field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasProjects() bool { - if r == nil || r.HasProjects == nil { - return false - } - return *r.HasProjects -} - -// GetHasWiki returns the HasWiki field if it's non-nil, zero value otherwise. -func (r *Repository) GetHasWiki() bool { - if r == nil || r.HasWiki == nil { - return false - } - return *r.HasWiki -} - -// GetHomepage returns the Homepage field if it's non-nil, zero value otherwise. -func (r *Repository) GetHomepage() string { - if r == nil || r.Homepage == nil { - return "" - } - return *r.Homepage -} - -// GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetHooksURL() string { - if r == nil || r.HooksURL == nil { - return "" - } - return *r.HooksURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Repository) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetIssueCommentURL returns the IssueCommentURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetIssueCommentURL() string { - if r == nil || r.IssueCommentURL == nil { - return "" - } - return *r.IssueCommentURL -} - -// GetIssueEventsURL returns the IssueEventsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetIssueEventsURL() string { - if r == nil || r.IssueEventsURL == nil { - return "" - } - return *r.IssueEventsURL -} - -// GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetIssuesURL() string { - if r == nil || r.IssuesURL == nil { - return "" - } - return *r.IssuesURL -} - -// GetIsTemplate returns the IsTemplate field if it's non-nil, zero value otherwise. -func (r *Repository) GetIsTemplate() bool { - if r == nil || r.IsTemplate == nil { - return false - } - return *r.IsTemplate -} - -// GetKeysURL returns the KeysURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetKeysURL() string { - if r == nil || r.KeysURL == nil { - return "" - } - return *r.KeysURL -} - -// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetLabelsURL() string { - if r == nil || r.LabelsURL == nil { - return "" - } - return *r.LabelsURL -} - -// GetLanguage returns the Language field if it's non-nil, zero value otherwise. -func (r *Repository) GetLanguage() string { - if r == nil || r.Language == nil { - return "" - } - return *r.Language -} - -// GetLanguagesURL returns the LanguagesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetLanguagesURL() string { - if r == nil || r.LanguagesURL == nil { - return "" - } - return *r.LanguagesURL -} - -// GetLicense returns the License field. -func (r *Repository) GetLicense() *License { - if r == nil { - return nil - } - return r.License -} - -// GetLicenseTemplate returns the LicenseTemplate field if it's non-nil, zero value otherwise. -func (r *Repository) GetLicenseTemplate() string { - if r == nil || r.LicenseTemplate == nil { - return "" - } - return *r.LicenseTemplate -} - -// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. -func (r *Repository) GetMasterBranch() string { - if r == nil || r.MasterBranch == nil { - return "" - } - return *r.MasterBranch -} - -// GetMergesURL returns the MergesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetMergesURL() string { - if r == nil || r.MergesURL == nil { - return "" - } - return *r.MergesURL -} - -// GetMilestonesURL returns the MilestonesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetMilestonesURL() string { - if r == nil || r.MilestonesURL == nil { - return "" - } - return *r.MilestonesURL -} - -// GetMirrorURL returns the MirrorURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetMirrorURL() string { - if r == nil || r.MirrorURL == nil { - return "" - } - return *r.MirrorURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *Repository) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetNetworkCount returns the NetworkCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetNetworkCount() int { - if r == nil || r.NetworkCount == nil { - return 0 - } - return *r.NetworkCount -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *Repository) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetNotificationsURL returns the NotificationsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetNotificationsURL() string { - if r == nil || r.NotificationsURL == nil { - return "" - } - return *r.NotificationsURL -} - -// GetOpenIssuesCount returns the OpenIssuesCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetOpenIssuesCount() int { - if r == nil || r.OpenIssuesCount == nil { - return 0 - } - return *r.OpenIssuesCount -} - -// GetOrganization returns the Organization field. -func (r *Repository) GetOrganization() *Organization { - if r == nil { - return nil - } - return r.Organization -} - -// GetOwner returns the Owner field. -func (r *Repository) GetOwner() *User { - if r == nil { - return nil - } - return r.Owner -} - -// GetParent returns the Parent field. -func (r *Repository) GetParent() *Repository { - if r == nil { - return nil - } - return r.Parent -} - -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (r *Repository) GetPermissions() map[string]bool { - if r == nil || r.Permissions == nil { - return map[string]bool{} - } - return *r.Permissions -} - -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (r *Repository) GetPrivate() bool { - if r == nil || r.Private == nil { - return false - } - return *r.Private -} - -// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetPullsURL() string { - if r == nil || r.PullsURL == nil { - return "" - } - return *r.PullsURL -} - -// GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. -func (r *Repository) GetPushedAt() Timestamp { - if r == nil || r.PushedAt == nil { - return Timestamp{} - } - return *r.PushedAt -} - -// GetReleasesURL returns the ReleasesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetReleasesURL() string { - if r == nil || r.ReleasesURL == nil { - return "" - } - return *r.ReleasesURL -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *Repository) GetSize() int { - if r == nil || r.Size == nil { - return 0 - } - return *r.Size -} - -// GetSource returns the Source field. -func (r *Repository) GetSource() *Repository { - if r == nil { - return nil - } - return r.Source -} - -// GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSSHURL() string { - if r == nil || r.SSHURL == nil { - return "" - } - return *r.SSHURL -} - -// GetStargazersCount returns the StargazersCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetStargazersCount() int { - if r == nil || r.StargazersCount == nil { - return 0 - } - return *r.StargazersCount -} - -// GetStargazersURL returns the StargazersURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetStargazersURL() string { - if r == nil || r.StargazersURL == nil { - return "" - } - return *r.StargazersURL -} - -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetStatusesURL() string { - if r == nil || r.StatusesURL == nil { - return "" - } - return *r.StatusesURL -} - -// GetSubscribersCount returns the SubscribersCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetSubscribersCount() int { - if r == nil || r.SubscribersCount == nil { - return 0 - } - return *r.SubscribersCount -} - -// GetSubscribersURL returns the SubscribersURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSubscribersURL() string { - if r == nil || r.SubscribersURL == nil { - return "" - } - return *r.SubscribersURL -} - -// GetSubscriptionURL returns the SubscriptionURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSubscriptionURL() string { - if r == nil || r.SubscriptionURL == nil { - return "" - } - return *r.SubscriptionURL -} - -// GetSVNURL returns the SVNURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetSVNURL() string { - if r == nil || r.SVNURL == nil { - return "" - } - return *r.SVNURL -} - -// GetTagsURL returns the TagsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetTagsURL() string { - if r == nil || r.TagsURL == nil { - return "" - } - return *r.TagsURL -} - -// GetTeamID returns the TeamID field if it's non-nil, zero value otherwise. -func (r *Repository) GetTeamID() int64 { - if r == nil || r.TeamID == nil { - return 0 - } - return *r.TeamID -} - -// GetTeamsURL returns the TeamsURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetTeamsURL() string { - if r == nil || r.TeamsURL == nil { - return "" - } - return *r.TeamsURL -} - -// GetTemplateRepository returns the TemplateRepository field. -func (r *Repository) GetTemplateRepository() *Repository { - if r == nil { - return nil - } - return r.TemplateRepository -} - -// GetTreesURL returns the TreesURL field if it's non-nil, zero value otherwise. -func (r *Repository) GetTreesURL() string { - if r == nil || r.TreesURL == nil { - return "" - } - return *r.TreesURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *Repository) GetUpdatedAt() Timestamp { - if r == nil || r.UpdatedAt == nil { - return Timestamp{} - } - return *r.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *Repository) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise. -func (r *Repository) GetVisibility() string { - if r == nil || r.Visibility == nil { - return "" - } - return *r.Visibility -} - -// GetWatchersCount returns the WatchersCount field if it's non-nil, zero value otherwise. -func (r *Repository) GetWatchersCount() int { - if r == nil || r.WatchersCount == nil { - return 0 - } - return *r.WatchersCount -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetBody() string { - if r == nil || r.Body == nil { - return "" - } - return *r.Body -} - -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetCommitID() string { - if r == nil || r.CommitID == nil { - return "" - } - return *r.CommitID -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetCreatedAt() time.Time { - if r == nil || r.CreatedAt == nil { - return time.Time{} - } - return *r.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetPath() string { - if r == nil || r.Path == nil { - return "" - } - return *r.Path -} - -// GetPosition returns the Position field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetPosition() int { - if r == nil || r.Position == nil { - return 0 - } - return *r.Position -} - -// GetReactions returns the Reactions field. -func (r *RepositoryComment) GetReactions() *Reactions { - if r == nil { - return nil - } - return r.Reactions -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetUpdatedAt() time.Time { - if r == nil || r.UpdatedAt == nil { - return time.Time{} - } - return *r.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetUser returns the User field. -func (r *RepositoryComment) GetUser() *User { - if r == nil { - return nil - } - return r.User -} - -// GetAuthor returns the Author field. -func (r *RepositoryCommit) GetAuthor() *User { - if r == nil { - return nil - } - return r.Author -} - -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetCommentsURL() string { - if r == nil || r.CommentsURL == nil { - return "" - } - return *r.CommentsURL -} - -// GetCommit returns the Commit field. -func (r *RepositoryCommit) GetCommit() *Commit { - if r == nil { - return nil - } - return r.Commit -} - -// GetCommitter returns the Committer field. -func (r *RepositoryCommit) GetCommitter() *User { - if r == nil { - return nil - } - return r.Committer -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetSHA() string { - if r == nil || r.SHA == nil { - return "" - } - return *r.SHA -} - -// GetStats returns the Stats field. -func (r *RepositoryCommit) GetStats() *CommitStats { - if r == nil { - return nil - } - return r.Stats -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryCommit) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetDownloadURL() string { - if r == nil || r.DownloadURL == nil { - return "" - } - return *r.DownloadURL -} - -// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetEncoding() string { - if r == nil || r.Encoding == nil { - return "" - } - return *r.Encoding -} - -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetGitURL() string { - if r == nil || r.GitURL == nil { - return "" - } - return *r.GitURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetPath() string { - if r == nil || r.Path == nil { - return "" - } - return *r.Path -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetSHA() string { - if r == nil || r.SHA == nil { - return "" - } - return *r.SHA -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetSize() int { - if r == nil || r.Size == nil { - return 0 - } - return *r.Size -} - -// GetTarget returns the Target field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetTarget() string { - if r == nil || r.Target == nil { - return "" - } - return *r.Target -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetType() string { - if r == nil || r.Type == nil { - return "" - } - return *r.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryContent) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetAuthor returns the Author field. -func (r *RepositoryContentFileOptions) GetAuthor() *CommitAuthor { - if r == nil { - return nil - } - return r.Author -} - -// GetBranch returns the Branch field if it's non-nil, zero value otherwise. -func (r *RepositoryContentFileOptions) GetBranch() string { - if r == nil || r.Branch == nil { - return "" - } - return *r.Branch -} - -// GetCommitter returns the Committer field. -func (r *RepositoryContentFileOptions) GetCommitter() *CommitAuthor { - if r == nil { - return nil - } - return r.Committer -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (r *RepositoryContentFileOptions) GetMessage() string { - if r == nil || r.Message == nil { - return "" - } - return *r.Message -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryContentFileOptions) GetSHA() string { - if r == nil || r.SHA == nil { - return "" - } - return *r.SHA -} - -// GetContent returns the Content field. -func (r *RepositoryContentResponse) GetContent() *RepositoryContent { - if r == nil { - return nil - } - return r.Content -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *RepositoryDispatchEvent) GetAction() string { - if r == nil || r.Action == nil { - return "" - } - return *r.Action -} - -// GetBranch returns the Branch field if it's non-nil, zero value otherwise. -func (r *RepositoryDispatchEvent) GetBranch() string { - if r == nil || r.Branch == nil { - return "" - } - return *r.Branch -} - -// GetInstallation returns the Installation field. -func (r *RepositoryDispatchEvent) GetInstallation() *Installation { - if r == nil { - return nil - } - return r.Installation -} - -// GetOrg returns the Org field. -func (r *RepositoryDispatchEvent) GetOrg() *Organization { - if r == nil { - return nil - } - return r.Org -} - -// GetRepo returns the Repo field. -func (r *RepositoryDispatchEvent) GetRepo() *Repository { - if r == nil { - return nil - } - return r.Repo -} - -// GetSender returns the Sender field. -func (r *RepositoryDispatchEvent) GetSender() *User { - if r == nil { - return nil - } - return r.Sender -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *RepositoryEvent) GetAction() string { - if r == nil || r.Action == nil { - return "" - } - return *r.Action -} - -// GetInstallation returns the Installation field. -func (r *RepositoryEvent) GetInstallation() *Installation { - if r == nil { - return nil - } - return r.Installation -} - -// GetOrg returns the Org field. -func (r *RepositoryEvent) GetOrg() *Organization { - if r == nil { - return nil - } - return r.Org -} - -// GetRepo returns the Repo field. -func (r *RepositoryEvent) GetRepo() *Repository { - if r == nil { - return nil - } - return r.Repo -} - -// GetSender returns the Sender field. -func (r *RepositoryEvent) GetSender() *User { - if r == nil { - return nil - } - return r.Sender -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} - } - return *r.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetInvitee returns the Invitee field. -func (r *RepositoryInvitation) GetInvitee() *User { - if r == nil { - return nil - } - return r.Invitee -} - -// GetInviter returns the Inviter field. -func (r *RepositoryInvitation) GetInviter() *User { - if r == nil { - return nil - } - return r.Inviter -} - -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetPermissions() string { - if r == nil || r.Permissions == nil { - return "" - } - return *r.Permissions -} - -// GetRepo returns the Repo field. -func (r *RepositoryInvitation) GetRepo() *Repository { - if r == nil { - return nil - } - return r.Repo -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetContent() string { - if r == nil || r.Content == nil { - return "" - } - return *r.Content -} - -// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetDownloadURL() string { - if r == nil || r.DownloadURL == nil { - return "" - } - return *r.DownloadURL -} - -// GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetEncoding() string { - if r == nil || r.Encoding == nil { - return "" - } - return *r.Encoding -} - -// GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetGitURL() string { - if r == nil || r.GitURL == nil { - return "" - } - return *r.GitURL -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetLicense returns the License field. -func (r *RepositoryLicense) GetLicense() *License { - if r == nil { - return nil - } - return r.License -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetPath() string { - if r == nil || r.Path == nil { - return "" - } - return *r.Path -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetSHA() string { - if r == nil || r.SHA == nil { - return "" - } - return *r.SHA -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetSize() int { - if r == nil || r.Size == nil { - return 0 - } - return *r.Size -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetType() string { - if r == nil || r.Type == nil { - return "" - } - return *r.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryLicense) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetBase returns the Base field if it's non-nil, zero value otherwise. -func (r *RepositoryMergeRequest) GetBase() string { - if r == nil || r.Base == nil { - return "" - } - return *r.Base -} - -// GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. -func (r *RepositoryMergeRequest) GetCommitMessage() string { - if r == nil || r.CommitMessage == nil { - return "" - } - return *r.CommitMessage -} - -// GetHead returns the Head field if it's non-nil, zero value otherwise. -func (r *RepositoryMergeRequest) GetHead() string { - if r == nil || r.Head == nil { - return "" - } - return *r.Head -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (r *RepositoryPermissionLevel) GetPermission() string { - if r == nil || r.Permission == nil { - return "" - } - return *r.Permission -} - -// GetUser returns the User field. -func (r *RepositoryPermissionLevel) GetUser() *User { - if r == nil { - return nil - } - return r.User -} - -// GetAssetsURL returns the AssetsURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetAssetsURL() string { - if r == nil || r.AssetsURL == nil { - return "" - } - return *r.AssetsURL -} - -// GetAuthor returns the Author field. -func (r *RepositoryRelease) GetAuthor() *User { - if r == nil { - return nil - } - return r.Author -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetBody() string { - if r == nil || r.Body == nil { - return "" - } - return *r.Body -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetCreatedAt() Timestamp { - if r == nil || r.CreatedAt == nil { - return Timestamp{} - } - return *r.CreatedAt -} - -// GetDraft returns the Draft field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetDraft() bool { - if r == nil || r.Draft == nil { - return false - } - return *r.Draft -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetHTMLURL() string { - if r == nil || r.HTMLURL == nil { - return "" - } - return *r.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetPrerelease returns the Prerelease field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetPrerelease() bool { - if r == nil || r.Prerelease == nil { - return false - } - return *r.Prerelease -} - -// GetPublishedAt returns the PublishedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetPublishedAt() Timestamp { - if r == nil || r.PublishedAt == nil { - return Timestamp{} - } - return *r.PublishedAt -} - -// GetTagName returns the TagName field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetTagName() string { - if r == nil || r.TagName == nil { - return "" - } - return *r.TagName -} - -// GetTarballURL returns the TarballURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetTarballURL() string { - if r == nil || r.TarballURL == nil { - return "" - } - return *r.TarballURL -} - -// GetTargetCommitish returns the TargetCommitish field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetTargetCommitish() string { - if r == nil || r.TargetCommitish == nil { - return "" - } - return *r.TargetCommitish -} - -// GetUploadURL returns the UploadURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetUploadURL() string { - if r == nil || r.UploadURL == nil { - return "" - } - return *r.UploadURL -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetZipballURL returns the ZipballURL field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetZipballURL() string { - if r == nil || r.ZipballURL == nil { - return "" - } - return *r.ZipballURL -} - -// GetCommit returns the Commit field. -func (r *RepositoryTag) GetCommit() *Commit { - if r == nil { - return nil - } - return r.Commit -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *RepositoryTag) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetTarballURL returns the TarballURL field if it's non-nil, zero value otherwise. -func (r *RepositoryTag) GetTarballURL() string { - if r == nil || r.TarballURL == nil { - return "" - } - return *r.TarballURL -} - -// GetZipballURL returns the ZipballURL field if it's non-nil, zero value otherwise. -func (r *RepositoryTag) GetZipballURL() string { - if r == nil || r.ZipballURL == nil { - return "" - } - return *r.ZipballURL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *RepositoryVulnerabilityAlertEvent) GetAction() string { - if r == nil || r.Action == nil { - return "" - } - return *r.Action -} - -// GetForkRepos returns the ForkRepos field if it's non-nil, zero value otherwise. -func (r *RepoStats) GetForkRepos() int { - if r == nil || r.ForkRepos == nil { - return 0 - } - return *r.ForkRepos -} - -// GetOrgRepos returns the OrgRepos field if it's non-nil, zero value otherwise. -func (r *RepoStats) GetOrgRepos() int { - if r == nil || r.OrgRepos == nil { - return 0 - } - return *r.OrgRepos -} - -// GetRootRepos returns the RootRepos field if it's non-nil, zero value otherwise. -func (r *RepoStats) GetRootRepos() int { - if r == nil || r.RootRepos == nil { - return 0 - } - return *r.RootRepos -} - -// GetTotalPushes returns the TotalPushes field if it's non-nil, zero value otherwise. -func (r *RepoStats) GetTotalPushes() int { - if r == nil || r.TotalPushes == nil { - return 0 - } - return *r.TotalPushes -} - -// GetTotalRepos returns the TotalRepos field if it's non-nil, zero value otherwise. -func (r *RepoStats) GetTotalRepos() int { - if r == nil || r.TotalRepos == nil { - return 0 - } - return *r.TotalRepos -} - -// GetTotalWikis returns the TotalWikis field if it's non-nil, zero value otherwise. -func (r *RepoStats) GetTotalWikis() int { - if r == nil || r.TotalWikis == nil { - return 0 - } - return *r.TotalWikis -} - -// GetContext returns the Context field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetContext() string { - if r == nil || r.Context == nil { - return "" - } - return *r.Context -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetCreatedAt() time.Time { - if r == nil || r.CreatedAt == nil { - return time.Time{} - } - return *r.CreatedAt -} - -// GetCreator returns the Creator field. -func (r *RepoStatus) GetCreator() *User { - if r == nil { - return nil - } - return r.Creator -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetDescription() string { - if r == nil || r.Description == nil { - return "" - } - return *r.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetState() string { - if r == nil || r.State == nil { - return "" - } - return *r.State -} - -// GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetTargetURL() string { - if r == nil || r.TargetURL == nil { - return "" - } - return *r.TargetURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetUpdatedAt() time.Time { - if r == nil || r.UpdatedAt == nil { - return time.Time{} - } - return *r.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetURL() string { - if r == nil || r.URL == nil { - return "" - } - return *r.URL -} - -// GetStrict returns the Strict field if it's non-nil, zero value otherwise. -func (r *RequiredStatusChecksRequest) GetStrict() bool { - if r == nil || r.Strict == nil { - return false - } - return *r.Strict -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *ReviewersRequest) GetNodeID() string { - if r == nil || r.NodeID == nil { - return "" - } - return *r.NodeID -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Runner) GetID() int64 { - if r == nil || r.ID == nil { - return 0 - } - return *r.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (r *Runner) GetName() string { - if r == nil || r.Name == nil { - return "" - } - return *r.Name -} - -// GetOS returns the OS field if it's non-nil, zero value otherwise. -func (r *Runner) GetOS() string { - if r == nil || r.OS == nil { - return "" - } - return *r.OS -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (r *Runner) GetStatus() string { - if r == nil || r.Status == nil { - return "" - } - return *r.Status -} - -// GetArchitecture returns the Architecture field if it's non-nil, zero value otherwise. -func (r *RunnerApplicationDownload) GetArchitecture() string { - if r == nil || r.Architecture == nil { - return "" - } - return *r.Architecture -} - -// GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. -func (r *RunnerApplicationDownload) GetDownloadURL() string { - if r == nil || r.DownloadURL == nil { - return "" - } - return *r.DownloadURL -} - -// GetFilename returns the Filename field if it's non-nil, zero value otherwise. -func (r *RunnerApplicationDownload) GetFilename() string { - if r == nil || r.Filename == nil { - return "" - } - return *r.Filename -} - -// GetOS returns the OS field if it's non-nil, zero value otherwise. -func (r *RunnerApplicationDownload) GetOS() string { - if r == nil || r.OS == nil { - return "" - } - return *r.OS -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (s *ServiceHook) GetName() string { - if s == nil || s.Name == nil { - return "" - } - return *s.Name -} - -// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. -func (s *SignaturesProtectedBranch) GetEnabled() bool { - if s == nil || s.Enabled == nil { - return false - } - return *s.Enabled -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (s *SignaturesProtectedBranch) GetURL() string { - if s == nil || s.URL == nil { - return "" - } - return *s.URL -} - -// GetPayload returns the Payload field if it's non-nil, zero value otherwise. -func (s *SignatureVerification) GetPayload() string { - if s == nil || s.Payload == nil { - return "" - } - return *s.Payload -} - -// GetReason returns the Reason field if it's non-nil, zero value otherwise. -func (s *SignatureVerification) GetReason() string { - if s == nil || s.Reason == nil { - return "" - } - return *s.Reason -} - -// GetSignature returns the Signature field if it's non-nil, zero value otherwise. -func (s *SignatureVerification) GetSignature() string { - if s == nil || s.Signature == nil { - return "" - } - return *s.Signature -} - -// GetVerified returns the Verified field if it's non-nil, zero value otherwise. -func (s *SignatureVerification) GetVerified() bool { - if s == nil || s.Verified == nil { - return false - } - return *s.Verified -} - -// GetActor returns the Actor field. -func (s *Source) GetActor() *User { - if s == nil { - return nil - } - return s.Actor -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (s *Source) GetID() int64 { - if s == nil || s.ID == nil { - return 0 - } - return *s.ID -} - -// GetIssue returns the Issue field. -func (s *Source) GetIssue() *Issue { - if s == nil { - return nil - } - return s.Issue -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (s *Source) GetType() string { - if s == nil || s.Type == nil { - return "" - } - return *s.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (s *Source) GetURL() string { - if s == nil || s.URL == nil { - return "" - } - return *s.URL -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetEmail() string { - if s == nil || s.Email == nil { - return "" - } - return *s.Email -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetID() int64 { - if s == nil || s.ID == nil { - return 0 - } - return *s.ID -} - -// GetImportURL returns the ImportURL field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetImportURL() string { - if s == nil || s.ImportURL == nil { - return "" - } - return *s.ImportURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetName() string { - if s == nil || s.Name == nil { - return "" - } - return *s.Name -} - -// GetRemoteID returns the RemoteID field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetRemoteID() string { - if s == nil || s.RemoteID == nil { - return "" - } - return *s.RemoteID -} - -// GetRemoteName returns the RemoteName field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetRemoteName() string { - if s == nil || s.RemoteName == nil { - return "" - } - return *s.RemoteName -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetURL() string { - if s == nil || s.URL == nil { - return "" - } - return *s.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (s *StarEvent) GetAction() string { - if s == nil || s.Action == nil { - return "" - } - return *s.Action -} - -// GetStarredAt returns the StarredAt field if it's non-nil, zero value otherwise. -func (s *StarEvent) GetStarredAt() Timestamp { - if s == nil || s.StarredAt == nil { - return Timestamp{} - } - return *s.StarredAt -} - -// GetStarredAt returns the StarredAt field if it's non-nil, zero value otherwise. -func (s *Stargazer) GetStarredAt() Timestamp { - if s == nil || s.StarredAt == nil { - return Timestamp{} - } - return *s.StarredAt -} - -// GetUser returns the User field. -func (s *Stargazer) GetUser() *User { - if s == nil { - return nil - } - return s.User -} - -// GetRepository returns the Repository field. -func (s *StarredRepository) GetRepository() *Repository { - if s == nil { - return nil - } - return s.Repository -} - -// GetStarredAt returns the StarredAt field if it's non-nil, zero value otherwise. -func (s *StarredRepository) GetStarredAt() Timestamp { - if s == nil || s.StarredAt == nil { - return Timestamp{} - } - return *s.StarredAt -} - -// GetCommit returns the Commit field. -func (s *StatusEvent) GetCommit() *RepositoryCommit { - if s == nil { - return nil - } - return s.Commit -} - -// GetContext returns the Context field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetContext() string { - if s == nil || s.Context == nil { - return "" - } - return *s.Context -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetCreatedAt() Timestamp { - if s == nil || s.CreatedAt == nil { - return Timestamp{} - } - return *s.CreatedAt -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetDescription() string { - if s == nil || s.Description == nil { - return "" - } - return *s.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetID() int64 { - if s == nil || s.ID == nil { - return 0 - } - return *s.ID -} - -// GetInstallation returns the Installation field. -func (s *StatusEvent) GetInstallation() *Installation { - if s == nil { - return nil - } - return s.Installation -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetName() string { - if s == nil || s.Name == nil { - return "" - } - return *s.Name -} - -// GetRepo returns the Repo field. -func (s *StatusEvent) GetRepo() *Repository { - if s == nil { - return nil - } - return s.Repo -} - -// GetSender returns the Sender field. -func (s *StatusEvent) GetSender() *User { - if s == nil { - return nil - } - return s.Sender -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetSHA() string { - if s == nil || s.SHA == nil { - return "" - } - return *s.SHA -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetState() string { - if s == nil || s.State == nil { - return "" - } - return *s.State -} - -// GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetTargetURL() string { - if s == nil || s.TargetURL == nil { - return "" - } - return *s.TargetURL -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetUpdatedAt() Timestamp { - if s == nil || s.UpdatedAt == nil { - return Timestamp{} - } - return *s.UpdatedAt -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (s *Subscription) GetCreatedAt() Timestamp { - if s == nil || s.CreatedAt == nil { - return Timestamp{} - } - return *s.CreatedAt -} - -// GetIgnored returns the Ignored field if it's non-nil, zero value otherwise. -func (s *Subscription) GetIgnored() bool { - if s == nil || s.Ignored == nil { - return false - } - return *s.Ignored -} - -// GetReason returns the Reason field if it's non-nil, zero value otherwise. -func (s *Subscription) GetReason() string { - if s == nil || s.Reason == nil { - return "" - } - return *s.Reason -} - -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (s *Subscription) GetRepositoryURL() string { - if s == nil || s.RepositoryURL == nil { - return "" - } - return *s.RepositoryURL -} - -// GetSubscribed returns the Subscribed field if it's non-nil, zero value otherwise. -func (s *Subscription) GetSubscribed() bool { - if s == nil || s.Subscribed == nil { - return false - } - return *s.Subscribed -} - -// GetThreadURL returns the ThreadURL field if it's non-nil, zero value otherwise. -func (s *Subscription) GetThreadURL() string { - if s == nil || s.ThreadURL == nil { - return "" - } - return *s.ThreadURL -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (s *Subscription) GetURL() string { - if s == nil || s.URL == nil { - return "" - } - return *s.URL -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (t *Tag) GetMessage() string { - if t == nil || t.Message == nil { - return "" - } - return *t.Message -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (t *Tag) GetNodeID() string { - if t == nil || t.NodeID == nil { - return "" - } - return *t.NodeID -} - -// GetObject returns the Object field. -func (t *Tag) GetObject() *GitObject { - if t == nil { - return nil - } - return t.Object -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (t *Tag) GetSHA() string { - if t == nil || t.SHA == nil { - return "" - } - return *t.SHA -} - -// GetTag returns the Tag field if it's non-nil, zero value otherwise. -func (t *Tag) GetTag() string { - if t == nil || t.Tag == nil { - return "" - } - return *t.Tag -} - -// GetTagger returns the Tagger field. -func (t *Tag) GetTagger() *CommitAuthor { - if t == nil { - return nil - } - return t.Tagger -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *Tag) GetURL() string { - if t == nil || t.URL == nil { - return "" - } - return *t.URL -} - -// GetVerification returns the Verification field. -func (t *Tag) GetVerification() *SignatureVerification { - if t == nil { - return nil - } - return t.Verification -} - -// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. -func (t *TaskStep) GetCompletedAt() Timestamp { - if t == nil || t.CompletedAt == nil { - return Timestamp{} - } - return *t.CompletedAt -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (t *TaskStep) GetConclusion() string { - if t == nil || t.Conclusion == nil { - return "" - } - return *t.Conclusion -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (t *TaskStep) GetName() string { - if t == nil || t.Name == nil { - return "" - } - return *t.Name -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (t *TaskStep) GetNumber() int64 { - if t == nil || t.Number == nil { - return 0 - } - return *t.Number -} - -// GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. -func (t *TaskStep) GetStartedAt() Timestamp { - if t == nil || t.StartedAt == nil { - return Timestamp{} - } - return *t.StartedAt -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (t *TaskStep) GetStatus() string { - if t == nil || t.Status == nil { - return "" - } - return *t.Status -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (t *Team) GetDescription() string { - if t == nil || t.Description == nil { - return "" - } - return *t.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (t *Team) GetID() int64 { - if t == nil || t.ID == nil { - return 0 - } - return *t.ID -} - -// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. -func (t *Team) GetLDAPDN() string { - if t == nil || t.LDAPDN == nil { - return "" - } - return *t.LDAPDN -} - -// GetMembersCount returns the MembersCount field if it's non-nil, zero value otherwise. -func (t *Team) GetMembersCount() int { - if t == nil || t.MembersCount == nil { - return 0 - } - return *t.MembersCount -} - -// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. -func (t *Team) GetMembersURL() string { - if t == nil || t.MembersURL == nil { - return "" - } - return *t.MembersURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (t *Team) GetName() string { - if t == nil || t.Name == nil { - return "" - } - return *t.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (t *Team) GetNodeID() string { - if t == nil || t.NodeID == nil { - return "" - } - return *t.NodeID -} - -// GetOrganization returns the Organization field. -func (t *Team) GetOrganization() *Organization { - if t == nil { - return nil - } - return t.Organization -} - -// GetParent returns the Parent field. -func (t *Team) GetParent() *Team { - if t == nil { - return nil - } - return t.Parent -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (t *Team) GetPermission() string { - if t == nil || t.Permission == nil { - return "" - } - return *t.Permission -} - -// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. -func (t *Team) GetPrivacy() string { - if t == nil || t.Privacy == nil { - return "" - } - return *t.Privacy -} - -// GetReposCount returns the ReposCount field if it's non-nil, zero value otherwise. -func (t *Team) GetReposCount() int { - if t == nil || t.ReposCount == nil { - return 0 - } - return *t.ReposCount -} - -// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. -func (t *Team) GetRepositoriesURL() string { - if t == nil || t.RepositoriesURL == nil { - return "" - } - return *t.RepositoriesURL -} - -// GetSlug returns the Slug field if it's non-nil, zero value otherwise. -func (t *Team) GetSlug() string { - if t == nil || t.Slug == nil { - return "" - } - return *t.Slug -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *Team) GetURL() string { - if t == nil || t.URL == nil { - return "" - } - return *t.URL -} - -// GetInstallation returns the Installation field. -func (t *TeamAddEvent) GetInstallation() *Installation { - if t == nil { - return nil - } - return t.Installation -} - -// GetOrg returns the Org field. -func (t *TeamAddEvent) GetOrg() *Organization { - if t == nil { - return nil - } - return t.Org -} - -// GetRepo returns the Repo field. -func (t *TeamAddEvent) GetRepo() *Repository { - if t == nil { - return nil - } - return t.Repo -} - -// GetSender returns the Sender field. -func (t *TeamAddEvent) GetSender() *User { - if t == nil { - return nil - } - return t.Sender -} - -// GetTeam returns the Team field. -func (t *TeamAddEvent) GetTeam() *Team { - if t == nil { - return nil - } - return t.Team -} - -// GetAuthor returns the Author field. -func (t *TeamDiscussion) GetAuthor() *User { - if t == nil { - return nil - } - return t.Author -} - -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetBody() string { - if t == nil || t.Body == nil { - return "" - } - return *t.Body -} - -// GetBodyHTML returns the BodyHTML field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetBodyHTML() string { - if t == nil || t.BodyHTML == nil { - return "" - } - return *t.BodyHTML -} - -// GetBodyVersion returns the BodyVersion field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetBodyVersion() string { - if t == nil || t.BodyVersion == nil { - return "" - } - return *t.BodyVersion -} - -// GetCommentsCount returns the CommentsCount field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetCommentsCount() int { - if t == nil || t.CommentsCount == nil { - return 0 - } - return *t.CommentsCount -} - -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetCommentsURL() string { - if t == nil || t.CommentsURL == nil { - return "" - } - return *t.CommentsURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetCreatedAt() Timestamp { - if t == nil || t.CreatedAt == nil { - return Timestamp{} - } - return *t.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetHTMLURL() string { - if t == nil || t.HTMLURL == nil { - return "" - } - return *t.HTMLURL -} - -// GetLastEditedAt returns the LastEditedAt field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetLastEditedAt() Timestamp { - if t == nil || t.LastEditedAt == nil { - return Timestamp{} - } - return *t.LastEditedAt -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetNodeID() string { - if t == nil || t.NodeID == nil { - return "" - } - return *t.NodeID -} - -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetNumber() int { - if t == nil || t.Number == nil { - return 0 - } - return *t.Number -} - -// GetPinned returns the Pinned field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetPinned() bool { - if t == nil || t.Pinned == nil { - return false - } - return *t.Pinned -} - -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetPrivate() bool { - if t == nil || t.Private == nil { - return false - } - return *t.Private -} - -// GetReactions returns the Reactions field. -func (t *TeamDiscussion) GetReactions() *Reactions { - if t == nil { - return nil - } - return t.Reactions -} - -// GetTeamURL returns the TeamURL field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetTeamURL() string { - if t == nil || t.TeamURL == nil { - return "" - } - return *t.TeamURL -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetTitle() string { - if t == nil || t.Title == nil { - return "" - } - return *t.Title -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetUpdatedAt() Timestamp { - if t == nil || t.UpdatedAt == nil { - return Timestamp{} - } - return *t.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *TeamDiscussion) GetURL() string { - if t == nil || t.URL == nil { - return "" - } - return *t.URL -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (t *TeamEvent) GetAction() string { - if t == nil || t.Action == nil { - return "" - } - return *t.Action -} - -// GetChanges returns the Changes field. -func (t *TeamEvent) GetChanges() *TeamChange { - if t == nil { - return nil - } - return t.Changes -} - -// GetInstallation returns the Installation field. -func (t *TeamEvent) GetInstallation() *Installation { - if t == nil { - return nil - } - return t.Installation -} - -// GetOrg returns the Org field. -func (t *TeamEvent) GetOrg() *Organization { - if t == nil { - return nil - } - return t.Org -} - -// GetRepo returns the Repo field. -func (t *TeamEvent) GetRepo() *Repository { - if t == nil { - return nil - } - return t.Repo -} - -// GetSender returns the Sender field. -func (t *TeamEvent) GetSender() *User { - if t == nil { - return nil - } - return t.Sender -} - -// GetTeam returns the Team field. -func (t *TeamEvent) GetTeam() *Team { - if t == nil { - return nil - } - return t.Team -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetDescription() string { - if t == nil || t.Description == nil { - return "" - } - return *t.Description -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetID() int64 { - if t == nil || t.ID == nil { - return 0 - } - return *t.ID -} - -// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetLDAPDN() string { - if t == nil || t.LDAPDN == nil { - return "" - } - return *t.LDAPDN -} - -// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetMembersURL() string { - if t == nil || t.MembersURL == nil { - return "" - } - return *t.MembersURL -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetName() string { - if t == nil || t.Name == nil { - return "" - } - return *t.Name -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetPermission() string { - if t == nil || t.Permission == nil { - return "" - } - return *t.Permission -} - -// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetPrivacy() string { - if t == nil || t.Privacy == nil { - return "" - } - return *t.Privacy -} - -// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetRepositoriesURL() string { - if t == nil || t.RepositoriesURL == nil { - return "" - } - return *t.RepositoriesURL -} - -// GetSlug returns the Slug field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetSlug() string { - if t == nil || t.Slug == nil { - return "" - } - return *t.Slug -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetURL() string { - if t == nil || t.URL == nil { - return "" - } - return *t.URL -} - -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (t *TeamProjectOptions) GetPermission() string { - if t == nil || t.Permission == nil { - return "" - } - return *t.Permission -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (t *TemplateRepoRequest) GetDescription() string { - if t == nil || t.Description == nil { - return "" - } - return *t.Description -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (t *TemplateRepoRequest) GetName() string { - if t == nil || t.Name == nil { - return "" - } - return *t.Name -} - -// GetOwner returns the Owner field if it's non-nil, zero value otherwise. -func (t *TemplateRepoRequest) GetOwner() string { - if t == nil || t.Owner == nil { - return "" - } - return *t.Owner -} - -// GetPrivate returns the Private field if it's non-nil, zero value otherwise. -func (t *TemplateRepoRequest) GetPrivate() bool { - if t == nil || t.Private == nil { - return false - } - return *t.Private -} - -// GetFragment returns the Fragment field if it's non-nil, zero value otherwise. -func (t *TextMatch) GetFragment() string { - if t == nil || t.Fragment == nil { - return "" - } - return *t.Fragment -} - -// GetObjectType returns the ObjectType field if it's non-nil, zero value otherwise. -func (t *TextMatch) GetObjectType() string { - if t == nil || t.ObjectType == nil { - return "" - } - return *t.ObjectType -} - -// GetObjectURL returns the ObjectURL field if it's non-nil, zero value otherwise. -func (t *TextMatch) GetObjectURL() string { - if t == nil || t.ObjectURL == nil { - return "" - } - return *t.ObjectURL -} - -// GetProperty returns the Property field if it's non-nil, zero value otherwise. -func (t *TextMatch) GetProperty() string { - if t == nil || t.Property == nil { - return "" - } - return *t.Property -} - -// GetActor returns the Actor field. -func (t *Timeline) GetActor() *User { - if t == nil { - return nil - } - return t.Actor -} - -// GetAssignee returns the Assignee field. -func (t *Timeline) GetAssignee() *User { - if t == nil { - return nil - } - return t.Assignee -} - -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (t *Timeline) GetCommitID() string { - if t == nil || t.CommitID == nil { - return "" - } - return *t.CommitID -} - -// GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. -func (t *Timeline) GetCommitURL() string { - if t == nil || t.CommitURL == nil { - return "" - } - return *t.CommitURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (t *Timeline) GetCreatedAt() time.Time { - if t == nil || t.CreatedAt == nil { - return time.Time{} - } - return *t.CreatedAt -} - -// GetEvent returns the Event field if it's non-nil, zero value otherwise. -func (t *Timeline) GetEvent() string { - if t == nil || t.Event == nil { - return "" - } - return *t.Event -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (t *Timeline) GetID() int64 { - if t == nil || t.ID == nil { - return 0 - } - return *t.ID -} - -// GetLabel returns the Label field. -func (t *Timeline) GetLabel() *Label { - if t == nil { - return nil - } - return t.Label -} - -// GetMilestone returns the Milestone field. -func (t *Timeline) GetMilestone() *Milestone { - if t == nil { - return nil - } - return t.Milestone -} - -// GetProjectCard returns the ProjectCard field. -func (t *Timeline) GetProjectCard() *ProjectCard { - if t == nil { - return nil - } - return t.ProjectCard -} - -// GetRename returns the Rename field. -func (t *Timeline) GetRename() *Rename { - if t == nil { - return nil - } - return t.Rename -} - -// GetSource returns the Source field. -func (t *Timeline) GetSource() *Source { - if t == nil { - return nil - } - return t.Source -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *Timeline) GetURL() string { - if t == nil || t.URL == nil { - return "" - } - return *t.URL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetCreatedAt() Timestamp { - if t == nil || t.CreatedAt == nil { - return Timestamp{} - } - return *t.CreatedAt -} - -// GetCreatedBy returns the CreatedBy field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetCreatedBy() string { - if t == nil || t.CreatedBy == nil { - return "" - } - return *t.CreatedBy -} - -// GetCurated returns the Curated field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetCurated() bool { - if t == nil || t.Curated == nil { - return false - } - return *t.Curated -} - -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetDescription() string { - if t == nil || t.Description == nil { - return "" - } - return *t.Description -} - -// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetDisplayName() string { - if t == nil || t.DisplayName == nil { - return "" - } - return *t.DisplayName -} - -// GetFeatured returns the Featured field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetFeatured() bool { - if t == nil || t.Featured == nil { - return false - } - return *t.Featured -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetName() string { - if t == nil || t.Name == nil { - return "" - } - return *t.Name -} - -// GetScore returns the Score field. -func (t *TopicResult) GetScore() *float64 { - if t == nil { - return nil - } - return t.Score -} - -// GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetShortDescription() string { - if t == nil || t.ShortDescription == nil { - return "" - } - return *t.ShortDescription -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (t *TopicResult) GetUpdatedAt() string { - if t == nil || t.UpdatedAt == nil { - return "" - } - return *t.UpdatedAt -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (t *TopicsSearchResult) GetIncompleteResults() bool { - if t == nil || t.IncompleteResults == nil { - return false - } - return *t.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (t *TopicsSearchResult) GetTotal() int { - if t == nil || t.Total == nil { - return 0 - } - return *t.Total -} - -// GetCount returns the Count field if it's non-nil, zero value otherwise. -func (t *TrafficClones) GetCount() int { - if t == nil || t.Count == nil { - return 0 - } - return *t.Count -} - -// GetUniques returns the Uniques field if it's non-nil, zero value otherwise. -func (t *TrafficClones) GetUniques() int { - if t == nil || t.Uniques == nil { - return 0 - } - return *t.Uniques -} - -// GetCount returns the Count field if it's non-nil, zero value otherwise. -func (t *TrafficData) GetCount() int { - if t == nil || t.Count == nil { - return 0 - } - return *t.Count -} - -// GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. -func (t *TrafficData) GetTimestamp() Timestamp { - if t == nil || t.Timestamp == nil { - return Timestamp{} - } - return *t.Timestamp -} - -// GetUniques returns the Uniques field if it's non-nil, zero value otherwise. -func (t *TrafficData) GetUniques() int { - if t == nil || t.Uniques == nil { - return 0 - } - return *t.Uniques -} - -// GetCount returns the Count field if it's non-nil, zero value otherwise. -func (t *TrafficPath) GetCount() int { - if t == nil || t.Count == nil { - return 0 - } - return *t.Count -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (t *TrafficPath) GetPath() string { - if t == nil || t.Path == nil { - return "" - } - return *t.Path -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (t *TrafficPath) GetTitle() string { - if t == nil || t.Title == nil { - return "" - } - return *t.Title -} - -// GetUniques returns the Uniques field if it's non-nil, zero value otherwise. -func (t *TrafficPath) GetUniques() int { - if t == nil || t.Uniques == nil { - return 0 - } - return *t.Uniques -} - -// GetCount returns the Count field if it's non-nil, zero value otherwise. -func (t *TrafficReferrer) GetCount() int { - if t == nil || t.Count == nil { - return 0 - } - return *t.Count -} - -// GetReferrer returns the Referrer field if it's non-nil, zero value otherwise. -func (t *TrafficReferrer) GetReferrer() string { - if t == nil || t.Referrer == nil { - return "" - } - return *t.Referrer -} - -// GetUniques returns the Uniques field if it's non-nil, zero value otherwise. -func (t *TrafficReferrer) GetUniques() int { - if t == nil || t.Uniques == nil { - return 0 - } - return *t.Uniques -} - -// GetCount returns the Count field if it's non-nil, zero value otherwise. -func (t *TrafficViews) GetCount() int { - if t == nil || t.Count == nil { - return 0 - } - return *t.Count -} - -// GetUniques returns the Uniques field if it's non-nil, zero value otherwise. -func (t *TrafficViews) GetUniques() int { - if t == nil || t.Uniques == nil { - return 0 - } - return *t.Uniques -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (t *Tree) GetSHA() string { - if t == nil || t.SHA == nil { - return "" - } - return *t.SHA -} - -// GetTruncated returns the Truncated field if it's non-nil, zero value otherwise. -func (t *Tree) GetTruncated() bool { - if t == nil || t.Truncated == nil { - return false - } - return *t.Truncated -} - -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetContent() string { - if t == nil || t.Content == nil { - return "" - } - return *t.Content -} - -// GetMode returns the Mode field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetMode() string { - if t == nil || t.Mode == nil { - return "" - } - return *t.Mode -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetPath() string { - if t == nil || t.Path == nil { - return "" - } - return *t.Path -} - -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetSHA() string { - if t == nil || t.SHA == nil { - return "" - } - return *t.SHA -} - -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetSize() int { - if t == nil || t.Size == nil { - return 0 - } - return *t.Size -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetType() string { - if t == nil || t.Type == nil { - return "" - } - return *t.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *TreeEntry) GetURL() string { - if t == nil || t.URL == nil { - return "" - } - return *t.URL -} - -// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. -func (u *UpdateCheckRunOptions) GetCompletedAt() Timestamp { - if u == nil || u.CompletedAt == nil { - return Timestamp{} - } - return *u.CompletedAt -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (u *UpdateCheckRunOptions) GetConclusion() string { - if u == nil || u.Conclusion == nil { - return "" - } - return *u.Conclusion -} - -// GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. -func (u *UpdateCheckRunOptions) GetDetailsURL() string { - if u == nil || u.DetailsURL == nil { - return "" - } - return *u.DetailsURL -} - -// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. -func (u *UpdateCheckRunOptions) GetExternalID() string { - if u == nil || u.ExternalID == nil { - return "" - } - return *u.ExternalID -} - -// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. -func (u *UpdateCheckRunOptions) GetHeadSHA() string { - if u == nil || u.HeadSHA == nil { - return "" - } - return *u.HeadSHA -} - -// GetOutput returns the Output field. -func (u *UpdateCheckRunOptions) GetOutput() *CheckRunOutput { - if u == nil { - return nil - } - return u.Output -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (u *UpdateCheckRunOptions) GetStatus() string { - if u == nil || u.Status == nil { - return "" - } - return *u.Status -} - -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (u *User) GetAvatarURL() string { - if u == nil || u.AvatarURL == nil { - return "" - } - return *u.AvatarURL -} - -// GetBio returns the Bio field if it's non-nil, zero value otherwise. -func (u *User) GetBio() string { - if u == nil || u.Bio == nil { - return "" - } - return *u.Bio -} - -// GetBlog returns the Blog field if it's non-nil, zero value otherwise. -func (u *User) GetBlog() string { - if u == nil || u.Blog == nil { - return "" - } - return *u.Blog -} - -// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. -func (u *User) GetCollaborators() int { - if u == nil || u.Collaborators == nil { - return 0 - } - return *u.Collaborators -} - -// GetCompany returns the Company field if it's non-nil, zero value otherwise. -func (u *User) GetCompany() string { - if u == nil || u.Company == nil { - return "" - } - return *u.Company -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (u *User) GetCreatedAt() Timestamp { - if u == nil || u.CreatedAt == nil { - return Timestamp{} - } - return *u.CreatedAt -} - -// GetDiskUsage returns the DiskUsage field if it's non-nil, zero value otherwise. -func (u *User) GetDiskUsage() int { - if u == nil || u.DiskUsage == nil { - return 0 - } - return *u.DiskUsage -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (u *User) GetEmail() string { - if u == nil || u.Email == nil { - return "" - } - return *u.Email -} - -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (u *User) GetEventsURL() string { - if u == nil || u.EventsURL == nil { - return "" - } - return *u.EventsURL -} - -// GetFollowers returns the Followers field if it's non-nil, zero value otherwise. -func (u *User) GetFollowers() int { - if u == nil || u.Followers == nil { - return 0 - } - return *u.Followers -} - -// GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. -func (u *User) GetFollowersURL() string { - if u == nil || u.FollowersURL == nil { - return "" - } - return *u.FollowersURL -} - -// GetFollowing returns the Following field if it's non-nil, zero value otherwise. -func (u *User) GetFollowing() int { - if u == nil || u.Following == nil { - return 0 - } - return *u.Following -} - -// GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. -func (u *User) GetFollowingURL() string { - if u == nil || u.FollowingURL == nil { - return "" - } - return *u.FollowingURL -} - -// GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. -func (u *User) GetGistsURL() string { - if u == nil || u.GistsURL == nil { - return "" - } - return *u.GistsURL -} - -// GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. -func (u *User) GetGravatarID() string { - if u == nil || u.GravatarID == nil { - return "" - } - return *u.GravatarID -} - -// GetHireable returns the Hireable field if it's non-nil, zero value otherwise. -func (u *User) GetHireable() bool { - if u == nil || u.Hireable == nil { - return false - } - return *u.Hireable -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (u *User) GetHTMLURL() string { - if u == nil || u.HTMLURL == nil { - return "" - } - return *u.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (u *User) GetID() int64 { - if u == nil || u.ID == nil { - return 0 - } - return *u.ID -} - -// GetLdapDn returns the LdapDn field if it's non-nil, zero value otherwise. -func (u *User) GetLdapDn() string { - if u == nil || u.LdapDn == nil { - return "" - } - return *u.LdapDn -} - -// GetLocation returns the Location field if it's non-nil, zero value otherwise. -func (u *User) GetLocation() string { - if u == nil || u.Location == nil { - return "" - } - return *u.Location -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (u *User) GetLogin() string { - if u == nil || u.Login == nil { - return "" - } - return *u.Login -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (u *User) GetName() string { - if u == nil || u.Name == nil { - return "" - } - return *u.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (u *User) GetNodeID() string { - if u == nil || u.NodeID == nil { - return "" - } - return *u.NodeID -} - -// GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. -func (u *User) GetOrganizationsURL() string { - if u == nil || u.OrganizationsURL == nil { - return "" - } - return *u.OrganizationsURL -} - -// GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. -func (u *User) GetOwnedPrivateRepos() int { - if u == nil || u.OwnedPrivateRepos == nil { - return 0 - } - return *u.OwnedPrivateRepos -} - -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (u *User) GetPermissions() map[string]bool { - if u == nil || u.Permissions == nil { - return map[string]bool{} - } - return *u.Permissions -} - -// GetPlan returns the Plan field. -func (u *User) GetPlan() *Plan { - if u == nil { - return nil - } - return u.Plan -} - -// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. -func (u *User) GetPrivateGists() int { - if u == nil || u.PrivateGists == nil { - return 0 - } - return *u.PrivateGists -} - -// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. -func (u *User) GetPublicGists() int { - if u == nil || u.PublicGists == nil { - return 0 - } - return *u.PublicGists -} - -// GetPublicRepos returns the PublicRepos field if it's non-nil, zero value otherwise. -func (u *User) GetPublicRepos() int { - if u == nil || u.PublicRepos == nil { - return 0 - } - return *u.PublicRepos -} - -// GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. -func (u *User) GetReceivedEventsURL() string { - if u == nil || u.ReceivedEventsURL == nil { - return "" - } - return *u.ReceivedEventsURL -} - -// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. -func (u *User) GetReposURL() string { - if u == nil || u.ReposURL == nil { - return "" - } - return *u.ReposURL -} - -// GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. -func (u *User) GetSiteAdmin() bool { - if u == nil || u.SiteAdmin == nil { - return false - } - return *u.SiteAdmin -} - -// GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. -func (u *User) GetStarredURL() string { - if u == nil || u.StarredURL == nil { - return "" - } - return *u.StarredURL -} - -// GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. -func (u *User) GetSubscriptionsURL() string { - if u == nil || u.SubscriptionsURL == nil { - return "" - } - return *u.SubscriptionsURL -} - -// GetSuspendedAt returns the SuspendedAt field if it's non-nil, zero value otherwise. -func (u *User) GetSuspendedAt() Timestamp { - if u == nil || u.SuspendedAt == nil { - return Timestamp{} - } - return *u.SuspendedAt -} - -// GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. -func (u *User) GetTotalPrivateRepos() int { - if u == nil || u.TotalPrivateRepos == nil { - return 0 - } - return *u.TotalPrivateRepos -} - -// GetTwoFactorAuthentication returns the TwoFactorAuthentication field if it's non-nil, zero value otherwise. -func (u *User) GetTwoFactorAuthentication() bool { - if u == nil || u.TwoFactorAuthentication == nil { - return false - } - return *u.TwoFactorAuthentication -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (u *User) GetType() string { - if u == nil || u.Type == nil { - return "" - } - return *u.Type -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (u *User) GetUpdatedAt() Timestamp { - if u == nil || u.UpdatedAt == nil { - return Timestamp{} - } - return *u.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (u *User) GetURL() string { - if u == nil || u.URL == nil { - return "" - } - return *u.URL -} - -// GetApp returns the App field. -func (u *UserAuthorization) GetApp() *OAuthAPP { - if u == nil { - return nil - } - return u.App -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetCreatedAt() Timestamp { - if u == nil || u.CreatedAt == nil { - return Timestamp{} - } - return *u.CreatedAt -} - -// GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetFingerprint() string { - if u == nil || u.Fingerprint == nil { - return "" - } - return *u.Fingerprint -} - -// GetHashedToken returns the HashedToken field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetHashedToken() string { - if u == nil || u.HashedToken == nil { - return "" - } - return *u.HashedToken -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetID() int64 { - if u == nil || u.ID == nil { - return 0 - } - return *u.ID -} - -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetNote() string { - if u == nil || u.Note == nil { - return "" - } - return *u.Note -} - -// GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetNoteURL() string { - if u == nil || u.NoteURL == nil { - return "" - } - return *u.NoteURL -} - -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetToken() string { - if u == nil || u.Token == nil { - return "" - } - return *u.Token -} - -// GetTokenLastEight returns the TokenLastEight field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetTokenLastEight() string { - if u == nil || u.TokenLastEight == nil { - return "" - } - return *u.TokenLastEight -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetUpdatedAt() Timestamp { - if u == nil || u.UpdatedAt == nil { - return Timestamp{} - } - return *u.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (u *UserAuthorization) GetURL() string { - if u == nil || u.URL == nil { - return "" - } - return *u.URL -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (u *UserContext) GetMessage() string { - if u == nil || u.Message == nil { - return "" - } - return *u.Message -} - -// GetOcticon returns the Octicon field if it's non-nil, zero value otherwise. -func (u *UserContext) GetOcticon() string { - if u == nil || u.Octicon == nil { - return "" - } - return *u.Octicon -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (u *UserEmail) GetEmail() string { - if u == nil || u.Email == nil { - return "" - } - return *u.Email -} - -// GetPrimary returns the Primary field if it's non-nil, zero value otherwise. -func (u *UserEmail) GetPrimary() bool { - if u == nil || u.Primary == nil { - return false - } - return *u.Primary -} - -// GetVerified returns the Verified field if it's non-nil, zero value otherwise. -func (u *UserEmail) GetVerified() bool { - if u == nil || u.Verified == nil { - return false - } - return *u.Verified -} - -// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise. -func (u *UserEmail) GetVisibility() string { - if u == nil || u.Visibility == nil { - return "" - } - return *u.Visibility -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (u *UserEvent) GetAction() string { - if u == nil || u.Action == nil { - return "" - } - return *u.Action -} - -// GetEnterprise returns the Enterprise field. -func (u *UserEvent) GetEnterprise() *Enterprise { - if u == nil { - return nil - } - return u.Enterprise -} - -// GetSender returns the Sender field. -func (u *UserEvent) GetSender() *User { - if u == nil { - return nil - } - return u.Sender -} - -// GetUser returns the User field. -func (u *UserEvent) GetUser() *User { - if u == nil { - return nil - } - return u.User -} - -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetAvatarURL() string { - if u == nil || u.AvatarURL == nil { - return "" - } - return *u.AvatarURL -} - -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetEventsURL() string { - if u == nil || u.EventsURL == nil { - return "" - } - return *u.EventsURL -} - -// GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetFollowersURL() string { - if u == nil || u.FollowersURL == nil { - return "" - } - return *u.FollowersURL -} - -// GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetFollowingURL() string { - if u == nil || u.FollowingURL == nil { - return "" - } - return *u.FollowingURL -} - -// GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetGistsURL() string { - if u == nil || u.GistsURL == nil { - return "" - } - return *u.GistsURL -} - -// GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetGravatarID() string { - if u == nil || u.GravatarID == nil { - return "" - } - return *u.GravatarID -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetID() int64 { - if u == nil || u.ID == nil { - return 0 - } - return *u.ID -} - -// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetLDAPDN() string { - if u == nil || u.LDAPDN == nil { - return "" - } - return *u.LDAPDN -} - -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetLogin() string { - if u == nil || u.Login == nil { - return "" - } - return *u.Login -} - -// GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetOrganizationsURL() string { - if u == nil || u.OrganizationsURL == nil { - return "" - } - return *u.OrganizationsURL -} - -// GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetReceivedEventsURL() string { - if u == nil || u.ReceivedEventsURL == nil { - return "" - } - return *u.ReceivedEventsURL -} - -// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetReposURL() string { - if u == nil || u.ReposURL == nil { - return "" - } - return *u.ReposURL -} - -// GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetSiteAdmin() bool { - if u == nil || u.SiteAdmin == nil { - return false - } - return *u.SiteAdmin -} - -// GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetStarredURL() string { - if u == nil || u.StarredURL == nil { - return "" - } - return *u.StarredURL -} - -// GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetSubscriptionsURL() string { - if u == nil || u.SubscriptionsURL == nil { - return "" - } - return *u.SubscriptionsURL -} - -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetType() string { - if u == nil || u.Type == nil { - return "" - } - return *u.Type -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetURL() string { - if u == nil || u.URL == nil { - return "" - } - return *u.URL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetCreatedAt() string { - if u == nil || u.CreatedAt == nil { - return "" - } - return *u.CreatedAt -} - -// GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetExcludeAttachments() bool { - if u == nil || u.ExcludeAttachments == nil { - return false - } - return *u.ExcludeAttachments -} - -// GetGUID returns the GUID field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetGUID() string { - if u == nil || u.GUID == nil { - return "" - } - return *u.GUID -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetID() int64 { - if u == nil || u.ID == nil { - return 0 - } - return *u.ID -} - -// GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetLockRepositories() bool { - if u == nil || u.LockRepositories == nil { - return false - } - return *u.LockRepositories -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetState() string { - if u == nil || u.State == nil { - return "" - } - return *u.State -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetUpdatedAt() string { - if u == nil || u.UpdatedAt == nil { - return "" - } - return *u.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (u *UserMigration) GetURL() string { - if u == nil || u.URL == nil { - return "" - } - return *u.URL -} - -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (u *UsersSearchResult) GetIncompleteResults() bool { - if u == nil || u.IncompleteResults == nil { - return false - } - return *u.IncompleteResults -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (u *UsersSearchResult) GetTotal() int { - if u == nil || u.Total == nil { - return 0 - } - return *u.Total -} - -// GetAdminUsers returns the AdminUsers field if it's non-nil, zero value otherwise. -func (u *UserStats) GetAdminUsers() int { - if u == nil || u.AdminUsers == nil { - return 0 - } - return *u.AdminUsers -} - -// GetSuspendedUsers returns the SuspendedUsers field if it's non-nil, zero value otherwise. -func (u *UserStats) GetSuspendedUsers() int { - if u == nil || u.SuspendedUsers == nil { - return 0 - } - return *u.SuspendedUsers -} - -// GetTotalUsers returns the TotalUsers field if it's non-nil, zero value otherwise. -func (u *UserStats) GetTotalUsers() int { - if u == nil || u.TotalUsers == nil { - return 0 - } - return *u.TotalUsers -} - -// GetReason returns the Reason field if it's non-nil, zero value otherwise. -func (u *UserSuspendOptions) GetReason() string { - if u == nil || u.Reason == nil { - return "" - } - return *u.Reason -} - -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (w *WatchEvent) GetAction() string { - if w == nil || w.Action == nil { - return "" - } - return *w.Action -} - -// GetInstallation returns the Installation field. -func (w *WatchEvent) GetInstallation() *Installation { - if w == nil { - return nil - } - return w.Installation -} - -// GetRepo returns the Repo field. -func (w *WatchEvent) GetRepo() *Repository { - if w == nil { - return nil - } - return w.Repo -} - -// GetSender returns the Sender field. -func (w *WatchEvent) GetSender() *User { - if w == nil { - return nil - } - return w.Sender -} - -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (w *WebHookAuthor) GetEmail() string { - if w == nil || w.Email == nil { - return "" - } - return *w.Email -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (w *WebHookAuthor) GetName() string { - if w == nil || w.Name == nil { - return "" - } - return *w.Name -} - -// GetUsername returns the Username field if it's non-nil, zero value otherwise. -func (w *WebHookAuthor) GetUsername() string { - if w == nil || w.Username == nil { - return "" - } - return *w.Username -} - -// GetAuthor returns the Author field. -func (w *WebHookCommit) GetAuthor() *WebHookAuthor { - if w == nil { - return nil - } - return w.Author -} - -// GetCommitter returns the Committer field. -func (w *WebHookCommit) GetCommitter() *WebHookAuthor { - if w == nil { - return nil - } - return w.Committer -} - -// GetDistinct returns the Distinct field if it's non-nil, zero value otherwise. -func (w *WebHookCommit) GetDistinct() bool { - if w == nil || w.Distinct == nil { - return false - } - return *w.Distinct -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (w *WebHookCommit) GetID() string { - if w == nil || w.ID == nil { - return "" - } - return *w.ID -} - -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (w *WebHookCommit) GetMessage() string { - if w == nil || w.Message == nil { - return "" - } - return *w.Message -} - -// GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. -func (w *WebHookCommit) GetTimestamp() time.Time { - if w == nil || w.Timestamp == nil { - return time.Time{} - } - return *w.Timestamp -} - -// GetAfter returns the After field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetAfter() string { - if w == nil || w.After == nil { - return "" - } - return *w.After -} - -// GetBefore returns the Before field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetBefore() string { - if w == nil || w.Before == nil { - return "" - } - return *w.Before -} - -// GetCompare returns the Compare field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetCompare() string { - if w == nil || w.Compare == nil { - return "" - } - return *w.Compare -} - -// GetCreated returns the Created field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetCreated() bool { - if w == nil || w.Created == nil { - return false - } - return *w.Created -} - -// GetDeleted returns the Deleted field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetDeleted() bool { - if w == nil || w.Deleted == nil { - return false - } - return *w.Deleted -} - -// GetForced returns the Forced field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetForced() bool { - if w == nil || w.Forced == nil { - return false - } - return *w.Forced -} - -// GetHeadCommit returns the HeadCommit field. -func (w *WebHookPayload) GetHeadCommit() *WebHookCommit { - if w == nil { - return nil - } - return w.HeadCommit -} - -// GetPusher returns the Pusher field. -func (w *WebHookPayload) GetPusher() *User { - if w == nil { - return nil - } - return w.Pusher -} - -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (w *WebHookPayload) GetRef() string { - if w == nil || w.Ref == nil { - return "" - } - return *w.Ref -} - -// GetRepo returns the Repo field. -func (w *WebHookPayload) GetRepo() *Repository { - if w == nil { - return nil - } - return w.Repo -} - -// GetSender returns the Sender field. -func (w *WebHookPayload) GetSender() *User { - if w == nil { - return nil - } - return w.Sender -} - -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (w *WeeklyCommitActivity) GetTotal() int { - if w == nil || w.Total == nil { - return 0 - } - return *w.Total -} - -// GetWeek returns the Week field if it's non-nil, zero value otherwise. -func (w *WeeklyCommitActivity) GetWeek() Timestamp { - if w == nil || w.Week == nil { - return Timestamp{} - } - return *w.Week -} - -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (w *WeeklyStats) GetAdditions() int { - if w == nil || w.Additions == nil { - return 0 - } - return *w.Additions -} - -// GetCommits returns the Commits field if it's non-nil, zero value otherwise. -func (w *WeeklyStats) GetCommits() int { - if w == nil || w.Commits == nil { - return 0 - } - return *w.Commits -} - -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (w *WeeklyStats) GetDeletions() int { - if w == nil || w.Deletions == nil { - return 0 - } - return *w.Deletions -} - -// GetWeek returns the Week field if it's non-nil, zero value otherwise. -func (w *WeeklyStats) GetWeek() Timestamp { - if w == nil || w.Week == nil { - return Timestamp{} - } - return *w.Week -} - -// GetBadgeURL returns the BadgeURL field if it's non-nil, zero value otherwise. -func (w *Workflow) GetBadgeURL() string { - if w == nil || w.BadgeURL == nil { - return "" - } - return *w.BadgeURL -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (w *Workflow) GetCreatedAt() Timestamp { - if w == nil || w.CreatedAt == nil { - return Timestamp{} - } - return *w.CreatedAt -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (w *Workflow) GetHTMLURL() string { - if w == nil || w.HTMLURL == nil { - return "" - } - return *w.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (w *Workflow) GetID() int64 { - if w == nil || w.ID == nil { - return 0 - } - return *w.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (w *Workflow) GetName() string { - if w == nil || w.Name == nil { - return "" - } - return *w.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (w *Workflow) GetNodeID() string { - if w == nil || w.NodeID == nil { - return "" - } - return *w.NodeID -} - -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (w *Workflow) GetPath() string { - if w == nil || w.Path == nil { - return "" - } - return *w.Path -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (w *Workflow) GetState() string { - if w == nil || w.State == nil { - return "" - } - return *w.State -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (w *Workflow) GetUpdatedAt() Timestamp { - if w == nil || w.UpdatedAt == nil { - return Timestamp{} - } - return *w.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (w *Workflow) GetURL() string { - if w == nil || w.URL == nil { - return "" - } - return *w.URL -} - -// GetCheckRunURL returns the CheckRunURL field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetCheckRunURL() string { - if w == nil || w.CheckRunURL == nil { - return "" - } - return *w.CheckRunURL -} - -// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetCompletedAt() Timestamp { - if w == nil || w.CompletedAt == nil { - return Timestamp{} - } - return *w.CompletedAt -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetConclusion() string { - if w == nil || w.Conclusion == nil { - return "" - } - return *w.Conclusion -} - -// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetHeadSHA() string { - if w == nil || w.HeadSHA == nil { - return "" - } - return *w.HeadSHA -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetHTMLURL() string { - if w == nil || w.HTMLURL == nil { - return "" - } - return *w.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetID() int64 { - if w == nil || w.ID == nil { - return 0 - } - return *w.ID -} - -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetName() string { - if w == nil || w.Name == nil { - return "" - } - return *w.Name -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetNodeID() string { - if w == nil || w.NodeID == nil { - return "" - } - return *w.NodeID -} - -// GetRunID returns the RunID field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetRunID() int64 { - if w == nil || w.RunID == nil { - return 0 - } - return *w.RunID -} - -// GetRunURL returns the RunURL field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetRunURL() string { - if w == nil || w.RunURL == nil { - return "" - } - return *w.RunURL -} - -// GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetStartedAt() Timestamp { - if w == nil || w.StartedAt == nil { - return Timestamp{} - } - return *w.StartedAt -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetStatus() string { - if w == nil || w.Status == nil { - return "" - } - return *w.Status -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (w *WorkflowJob) GetURL() string { - if w == nil || w.URL == nil { - return "" - } - return *w.URL -} - -// GetArtifactsURL returns the ArtifactsURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetArtifactsURL() string { - if w == nil || w.ArtifactsURL == nil { - return "" - } - return *w.ArtifactsURL -} - -// GetCancelURL returns the CancelURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetCancelURL() string { - if w == nil || w.CancelURL == nil { - return "" - } - return *w.CancelURL -} - -// GetCheckSuiteURL returns the CheckSuiteURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetCheckSuiteURL() string { - if w == nil || w.CheckSuiteURL == nil { - return "" - } - return *w.CheckSuiteURL -} - -// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetConclusion() string { - if w == nil || w.Conclusion == nil { - return "" - } - return *w.Conclusion -} - -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetCreatedAt() Timestamp { - if w == nil || w.CreatedAt == nil { - return Timestamp{} - } - return *w.CreatedAt -} - -// GetEvent returns the Event field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetEvent() string { - if w == nil || w.Event == nil { - return "" - } - return *w.Event -} - -// GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetHeadBranch() string { - if w == nil || w.HeadBranch == nil { - return "" - } - return *w.HeadBranch -} - -// GetHeadCommit returns the HeadCommit field. -func (w *WorkflowRun) GetHeadCommit() *HeadCommit { - if w == nil { - return nil - } - return w.HeadCommit -} - -// GetHeadRepository returns the HeadRepository field. -func (w *WorkflowRun) GetHeadRepository() *Repository { - if w == nil { - return nil - } - return w.HeadRepository -} - -// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetHeadSHA() string { - if w == nil || w.HeadSHA == nil { - return "" - } - return *w.HeadSHA -} - -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetHTMLURL() string { - if w == nil || w.HTMLURL == nil { - return "" - } - return *w.HTMLURL -} - -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetID() int64 { - if w == nil || w.ID == nil { - return 0 - } - return *w.ID -} - -// GetJobsURL returns the JobsURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetJobsURL() string { - if w == nil || w.JobsURL == nil { - return "" - } - return *w.JobsURL -} - -// GetLogsURL returns the LogsURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetLogsURL() string { - if w == nil || w.LogsURL == nil { - return "" - } - return *w.LogsURL -} - -// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetNodeID() string { - if w == nil || w.NodeID == nil { - return "" - } - return *w.NodeID -} - -// GetRepository returns the Repository field. -func (w *WorkflowRun) GetRepository() *Repository { - if w == nil { - return nil - } - return w.Repository -} - -// GetRerunURL returns the RerunURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetRerunURL() string { - if w == nil || w.RerunURL == nil { - return "" - } - return *w.RerunURL -} - -// GetRunNumber returns the RunNumber field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetRunNumber() int { - if w == nil || w.RunNumber == nil { - return 0 - } - return *w.RunNumber -} - -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetStatus() string { - if w == nil || w.Status == nil { - return "" - } - return *w.Status -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetUpdatedAt() Timestamp { - if w == nil || w.UpdatedAt == nil { - return Timestamp{} - } - return *w.UpdatedAt -} - -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetURL() string { - if w == nil || w.URL == nil { - return "" - } - return *w.URL -} - -// GetWorkflowURL returns the WorkflowURL field if it's non-nil, zero value otherwise. -func (w *WorkflowRun) GetWorkflowURL() string { - if w == nil || w.WorkflowURL == nil { - return "" - } - return *w.WorkflowURL -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (w *WorkflowRuns) GetTotalCount() int { - if w == nil || w.TotalCount == nil { - return 0 - } - return *w.TotalCount -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (w *Workflows) GetTotalCount() int { - if w == nil || w.TotalCount == nil { - return 0 - } - return *w.TotalCount -} diff --git a/vendor/github.com/google/go-github/v30/github/github.go b/vendor/github.com/google/go-github/v30/github/github.go deleted file mode 100644 index c9bdff55..00000000 --- a/vendor/github.com/google/go-github/v30/github/github.go +++ /dev/null @@ -1,1088 +0,0 @@ -// Copyright 2013 The go-github 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-accessors.go -//go:generate go run gen-stringify-test.go - -package github - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "strconv" - "strings" - "sync" - "time" - - "github.com/google/go-querystring/query" -) - -const ( - defaultBaseURL = "https://api.github.com/" - uploadBaseURL = "https://uploads.github.com/" - userAgent = "go-github" - - headerRateLimit = "X-RateLimit-Limit" - headerRateRemaining = "X-RateLimit-Remaining" - headerRateReset = "X-RateLimit-Reset" - headerOTP = "X-GitHub-OTP" - - mediaTypeV3 = "application/vnd.github.v3+json" - defaultMediaType = "application/octet-stream" - mediaTypeV3SHA = "application/vnd.github.v3.sha" - mediaTypeV3Diff = "application/vnd.github.v3.diff" - mediaTypeV3Patch = "application/vnd.github.v3.patch" - mediaTypeOrgPermissionRepo = "application/vnd.github.v3.repository+json" - - // Media Type values to access preview APIs - - // https://developer.github.com/changes/2020-01-10-revoke-installation-token/ - mediaTypeRevokeTokenPreview = "application/vnd.github.gambit-preview+json" - - // https://developer.github.com/changes/2014-12-09-new-attributes-for-stars-api/ - mediaTypeStarringPreview = "application/vnd.github.v3.star+json" - - // https://help.github.com/enterprise/2.4/admin/guides/migrations/exporting-the-github-com-organization-s-repositories/ - mediaTypeMigrationsPreview = "application/vnd.github.wyandotte-preview+json" - - // https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements/ - mediaTypeDeploymentStatusPreview = "application/vnd.github.ant-man-preview+json" - - // https://developer.github.com/changes/2018-10-16-deployments-environments-states-and-auto-inactive-updates/ - mediaTypeExpandDeploymentStatusPreview = "application/vnd.github.flash-preview+json" - - // https://developer.github.com/changes/2016-05-12-reactions-api-preview/ - mediaTypeReactionsPreview = "application/vnd.github.squirrel-girl-preview" - - // https://developer.github.com/changes/2016-05-23-timeline-preview-api/ - mediaTypeTimelinePreview = "application/vnd.github.mockingbird-preview+json" - - // https://developer.github.com/changes/2016-09-14-projects-api/ - mediaTypeProjectsPreview = "application/vnd.github.inertia-preview+json" - - // https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/ - mediaTypeIntegrationPreview = "application/vnd.github.machine-man-preview+json" - - // https://developer.github.com/changes/2017-01-05-commit-search-api/ - mediaTypeCommitSearchPreview = "application/vnd.github.cloak-preview+json" - - // https://developer.github.com/changes/2017-02-28-user-blocking-apis-and-webhook/ - mediaTypeBlockUsersPreview = "application/vnd.github.giant-sentry-fist-preview+json" - - // https://developer.github.com/changes/2017-02-09-community-health/ - mediaTypeRepositoryCommunityHealthMetricsPreview = "application/vnd.github.black-panther-preview+json" - - // https://developer.github.com/changes/2017-05-23-coc-api/ - mediaTypeCodesOfConductPreview = "application/vnd.github.scarlet-witch-preview+json" - - // https://developer.github.com/changes/2017-07-17-update-topics-on-repositories/ - mediaTypeTopicsPreview = "application/vnd.github.mercy-preview+json" - - // https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews/ - mediaTypeRequiredApprovingReviewsPreview = "application/vnd.github.luke-cage-preview+json" - - // https://developer.github.com/changes/2018-01-10-lock-reason-api-preview/ - mediaTypeLockReasonPreview = "application/vnd.github.sailor-v-preview+json" - - // https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/ - mediaTypeCheckRunsPreview = "application/vnd.github.antiope-preview+json" - - // https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/ - mediaTypePreReceiveHooksPreview = "application/vnd.github.eye-scream-preview" - - // https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures/ - mediaTypeSignaturePreview = "application/vnd.github.zzzax-preview+json" - - // https://developer.github.com/changes/2018-09-05-project-card-events/ - mediaTypeProjectCardDetailsPreview = "application/vnd.github.starfox-preview+json" - - // https://developer.github.com/changes/2018-12-18-interactions-preview/ - mediaTypeInteractionRestrictionsPreview = "application/vnd.github.sombra-preview+json" - - // https://developer.github.com/changes/2019-02-14-draft-pull-requests/ - mediaTypeDraftPreview = "application/vnd.github.shadow-cat-preview+json" - - // https://developer.github.com/changes/2019-03-14-enabling-disabling-pages/ - mediaTypeEnablePagesAPIPreview = "application/vnd.github.switcheroo-preview+json" - - // https://developer.github.com/changes/2019-04-24-vulnerability-alerts/ - mediaTypeRequiredVulnerabilityAlertsPreview = "application/vnd.github.dorian-preview+json" - - // https://developer.github.com/changes/2019-06-04-automated-security-fixes/ - mediaTypeRequiredAutomatedSecurityFixesPreview = "application/vnd.github.london-preview+json" - - // https://developer.github.com/changes/2019-05-29-update-branch-api/ - mediaTypeUpdatePullRequestBranchPreview = "application/vnd.github.lydian-preview+json" - - // https://developer.github.com/changes/2019-04-11-pulls-branches-for-commit/ - mediaTypeListPullsOrBranchesForCommitPreview = "application/vnd.github.groot-preview+json" - - // https://developer.github.com/v3/previews/#repository-creation-permissions - mediaTypeMemberAllowedRepoCreationTypePreview = "application/vnd.github.surtur-preview+json" - - // https://developer.github.com/v3/previews/#create-and-use-repository-templates - mediaTypeRepositoryTemplatePreview = "application/vnd.github.baptiste-preview+json" - - // https://developer.github.com/changes/2019-10-03-multi-line-comments/ - mediaTypeMultiLineCommentsPreview = "application/vnd.github.comfort-fade-preview+json" - - // https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/ - mediaTypeOAuthAppPreview = "application/vnd.github.doctor-strange-preview+json" - - // https://developer.github.com/changes/2019-12-03-internal-visibility-changes/ - mediaTypeRepositoryVisibilityPreview = "application/vnd.github.nebula-preview+json" -) - -// A Client manages communication with the GitHub API. -type Client struct { - clientMu sync.Mutex // clientMu protects the client during calls that modify the CheckRedirect func. - client *http.Client // HTTP client used to communicate with the API. - - // Base URL for API requests. Defaults to the public GitHub API, but can be - // set to a domain endpoint to use with GitHub Enterprise. BaseURL should - // always be specified with a trailing slash. - BaseURL *url.URL - - // Base URL for uploading files. - UploadURL *url.URL - - // User agent used when communicating with the GitHub API. - UserAgent string - - rateMu sync.Mutex - rateLimits [categories]Rate // Rate limits for the client as determined by the most recent API calls. - - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // Services used for talking to different parts of the GitHub API. - Actions *ActionsService - Activity *ActivityService - Admin *AdminService - Apps *AppsService - Authorizations *AuthorizationsService - Checks *ChecksService - Gists *GistsService - Git *GitService - Gitignores *GitignoresService - Interactions *InteractionsService - Issues *IssuesService - Licenses *LicensesService - Marketplace *MarketplaceService - Migrations *MigrationService - Organizations *OrganizationsService - Projects *ProjectsService - PullRequests *PullRequestsService - Reactions *ReactionsService - Repositories *RepositoriesService - Search *SearchService - Teams *TeamsService - Users *UsersService -} - -type service struct { - client *Client -} - -// ListOptions specifies the optional parameters to various List methods that -// support offset pagination. -type ListOptions struct { - // For paginated result sets, page of results to retrieve. - Page int `url:"page,omitempty"` - - // For paginated result sets, the number of results to include per page. - PerPage int `url:"per_page,omitempty"` -} - -// ListCursorOptions specifies the optional parameters to various List methods that -// support cursor pagination. -type ListCursorOptions struct { - // For paginated result sets, page of results to retrieve. - Page string `url:"page,omitempty"` - - // For paginated result sets, the number of results to include per page. - PerPage int `url:"per_page,omitempty"` -} - -// UploadOptions specifies the parameters to methods that support uploads. -type UploadOptions struct { - Name string `url:"name,omitempty"` - Label string `url:"label,omitempty"` - MediaType string `url:"-"` -} - -// RawType represents type of raw format of a request instead of JSON. -type RawType uint8 - -const ( - // Diff format. - Diff RawType = 1 + iota - // Patch format. - Patch -) - -// RawOptions specifies parameters when user wants to get raw format of -// a response instead of JSON. -type RawOptions struct { - Type RawType -} - -// addOptions adds the parameters in opt as URL query parameters to s. opt -// must be a struct whose fields may contain "url" tags. -func addOptions(s string, opts interface{}) (string, error) { - v := reflect.ValueOf(opts) - if v.Kind() == reflect.Ptr && v.IsNil() { - return s, nil - } - - u, err := url.Parse(s) - if err != nil { - return s, err - } - - qs, err := query.Values(opts) - if err != nil { - return s, err - } - - u.RawQuery = qs.Encode() - return u.String(), nil -} - -// NewClient returns a new GitHub API client. If a nil httpClient is -// provided, a new http.Client will be used. To use API methods which require -// authentication, provide an http.Client that will perform the authentication -// for you (such as that provided by the golang.org/x/oauth2 library). -func NewClient(httpClient *http.Client) *Client { - if httpClient == nil { - httpClient = &http.Client{} - } - baseURL, _ := url.Parse(defaultBaseURL) - uploadURL, _ := url.Parse(uploadBaseURL) - - c := &Client{client: httpClient, BaseURL: baseURL, UserAgent: userAgent, UploadURL: uploadURL} - c.common.client = c - c.Actions = (*ActionsService)(&c.common) - c.Activity = (*ActivityService)(&c.common) - c.Admin = (*AdminService)(&c.common) - c.Apps = (*AppsService)(&c.common) - c.Authorizations = (*AuthorizationsService)(&c.common) - c.Checks = (*ChecksService)(&c.common) - c.Gists = (*GistsService)(&c.common) - c.Git = (*GitService)(&c.common) - c.Gitignores = (*GitignoresService)(&c.common) - c.Interactions = (*InteractionsService)(&c.common) - c.Issues = (*IssuesService)(&c.common) - c.Licenses = (*LicensesService)(&c.common) - c.Marketplace = &MarketplaceService{client: c} - c.Migrations = (*MigrationService)(&c.common) - c.Organizations = (*OrganizationsService)(&c.common) - c.Projects = (*ProjectsService)(&c.common) - c.PullRequests = (*PullRequestsService)(&c.common) - c.Reactions = (*ReactionsService)(&c.common) - c.Repositories = (*RepositoriesService)(&c.common) - c.Search = (*SearchService)(&c.common) - c.Teams = (*TeamsService)(&c.common) - c.Users = (*UsersService)(&c.common) - return c -} - -// NewEnterpriseClient returns a new GitHub API client with provided -// base URL and upload URL (often the same URL and is your GitHub Enterprise hostname). -// If either URL does not have the suffix "/api/v3/", it will be added automatically. -// If a nil httpClient is provided, a new http.Client will be used. -// -// Note that NewEnterpriseClient is a convenience helper only; -// its behavior is equivalent to using NewClient, followed by setting -// the BaseURL and UploadURL fields. -// -// Another important thing is that by default, the GitHub Enterprise URL format -// should be http(s)://[hostname]/api/v3 or you will always receive the 406 status code. -func NewEnterpriseClient(baseURL, uploadURL string, httpClient *http.Client) (*Client, error) { - baseEndpoint, err := url.Parse(baseURL) - if err != nil { - return nil, err - } - if !strings.HasSuffix(baseEndpoint.Path, "/") { - baseEndpoint.Path += "/" - } - if !strings.HasSuffix(baseEndpoint.Path, "/api/v3/") { - baseEndpoint.Path += "api/v3/" - } - - uploadEndpoint, err := url.Parse(uploadURL) - if err != nil { - return nil, err - } - if !strings.HasSuffix(uploadEndpoint.Path, "/") { - uploadEndpoint.Path += "/" - } - if !strings.HasSuffix(uploadEndpoint.Path, "/api/v3/") { - uploadEndpoint.Path += "api/v3/" - } - - c := NewClient(httpClient) - c.BaseURL = baseEndpoint - c.UploadURL = uploadEndpoint - return c, nil -} - -// NewRequest creates an API request. A relative URL can be provided in urlStr, -// in which case it is resolved relative to the BaseURL of the Client. -// Relative URLs should always be specified without a preceding slash. If -// specified, the value pointed to by body is JSON encoded and included as the -// request body. -func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) { - if !strings.HasSuffix(c.BaseURL.Path, "/") { - return nil, fmt.Errorf("BaseURL must have a trailing slash, but %q does not", c.BaseURL) - } - u, err := c.BaseURL.Parse(urlStr) - if err != nil { - return nil, err - } - - var buf io.ReadWriter - if body != nil { - buf = &bytes.Buffer{} - enc := json.NewEncoder(buf) - enc.SetEscapeHTML(false) - err := enc.Encode(body) - if err != nil { - return nil, err - } - } - - req, err := http.NewRequest(method, u.String(), buf) - if err != nil { - return nil, err - } - - if body != nil { - req.Header.Set("Content-Type", "application/json") - } - req.Header.Set("Accept", mediaTypeV3) - if c.UserAgent != "" { - req.Header.Set("User-Agent", c.UserAgent) - } - return req, nil -} - -// NewUploadRequest creates an upload request. A relative URL can be provided in -// urlStr, in which case it is resolved relative to the UploadURL of the Client. -// Relative URLs should always be specified without a preceding slash. -func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, size int64, mediaType string) (*http.Request, error) { - if !strings.HasSuffix(c.UploadURL.Path, "/") { - return nil, fmt.Errorf("UploadURL must have a trailing slash, but %q does not", c.UploadURL) - } - u, err := c.UploadURL.Parse(urlStr) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", u.String(), reader) - if err != nil { - return nil, err - } - req.ContentLength = size - - if mediaType == "" { - mediaType = defaultMediaType - } - req.Header.Set("Content-Type", mediaType) - req.Header.Set("Accept", mediaTypeV3) - req.Header.Set("User-Agent", c.UserAgent) - return req, nil -} - -// Response is a GitHub API response. This wraps the standard http.Response -// returned from GitHub and provides convenient access to things like -// pagination links. -type Response struct { - *http.Response - - // These fields provide the page values for paginating through a set of - // results. Any or all of these may be set to the zero value for - // responses that are not part of a paginated set, or for which there - // are no additional pages. - // - // These fields support what is called "offset pagination" and should - // be used with the ListOptions struct. - NextPage int - PrevPage int - FirstPage int - LastPage int - - // Additionally, some APIs support "cursor pagination" instead of offset. - // This means that a token points directly to the next record which - // can lead to O(1) performance compared to O(n) performance provided - // by offset pagination. - // - // For APIs that support cursor pagination (such as - // TeamsService.ListIDPGroupsInOrganization), the following field - // will be populated to point to the next page. - // - // To use this token, set ListCursorOptions.Page to this value before - // calling the endpoint again. - NextPageToken string - - // Explicitly specify the Rate type so Rate's String() receiver doesn't - // propagate to Response. - Rate Rate -} - -// newResponse creates a new Response for the provided http.Response. -// r must not be nil. -func newResponse(r *http.Response) *Response { - response := &Response{Response: r} - response.populatePageValues() - response.Rate = parseRate(r) - return response -} - -// populatePageValues parses the HTTP Link response headers and populates the -// various pagination link values in the Response. -func (r *Response) populatePageValues() { - if links, ok := r.Response.Header["Link"]; ok && len(links) > 0 { - for _, link := range strings.Split(links[0], ",") { - segments := strings.Split(strings.TrimSpace(link), ";") - - // link must at least have href and rel - if len(segments) < 2 { - continue - } - - // ensure href is properly formatted - if !strings.HasPrefix(segments[0], "<") || !strings.HasSuffix(segments[0], ">") { - continue - } - - // try to pull out page parameter - url, err := url.Parse(segments[0][1 : len(segments[0])-1]) - if err != nil { - continue - } - page := url.Query().Get("page") - if page == "" { - continue - } - - for _, segment := range segments[1:] { - switch strings.TrimSpace(segment) { - case `rel="next"`: - if r.NextPage, err = strconv.Atoi(page); err != nil { - r.NextPageToken = page - } - case `rel="prev"`: - r.PrevPage, _ = strconv.Atoi(page) - case `rel="first"`: - r.FirstPage, _ = strconv.Atoi(page) - case `rel="last"`: - r.LastPage, _ = strconv.Atoi(page) - } - - } - } - } -} - -// parseRate parses the rate related headers. -func parseRate(r *http.Response) Rate { - var rate Rate - if limit := r.Header.Get(headerRateLimit); limit != "" { - rate.Limit, _ = strconv.Atoi(limit) - } - if remaining := r.Header.Get(headerRateRemaining); remaining != "" { - rate.Remaining, _ = strconv.Atoi(remaining) - } - if reset := r.Header.Get(headerRateReset); reset != "" { - if v, _ := strconv.ParseInt(reset, 10, 64); v != 0 { - rate.Reset = Timestamp{time.Unix(v, 0)} - } - } - return rate -} - -// Do sends an API request and returns the API response. The API response is -// JSON decoded and stored in the value pointed to by v, or returned as an -// error if an API error has occurred. If v implements the io.Writer -// interface, the raw response body will be written to v, without attempting to -// first decode it. If rate limit is exceeded and reset time is in the future, -// Do returns *RateLimitError immediately without making a network API call. -// -// The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, -// ctx.Err() will be returned. -func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) { - if ctx == nil { - return nil, errors.New("context must be non-nil") - } - req = withContext(ctx, req) - - rateLimitCategory := category(req.URL.Path) - - // If we've hit rate limit, don't make further requests before Reset time. - if err := c.checkRateLimitBeforeDo(req, rateLimitCategory); err != nil { - return &Response{ - Response: err.Response, - Rate: err.Rate, - }, err - } - - resp, err := c.client.Do(req) - if err != nil { - // If we got an error, and the context has been canceled, - // the context's error is probably more useful. - select { - case <-ctx.Done(): - return nil, ctx.Err() - default: - } - - // If the error type is *url.Error, sanitize its URL before returning. - if e, ok := err.(*url.Error); ok { - if url, err := url.Parse(e.URL); err == nil { - e.URL = sanitizeURL(url).String() - return nil, e - } - } - - return nil, err - } - defer resp.Body.Close() - - response := newResponse(resp) - - c.rateMu.Lock() - c.rateLimits[rateLimitCategory] = response.Rate - c.rateMu.Unlock() - - err = CheckResponse(resp) - if err != nil { - // Special case for AcceptedErrors. If an AcceptedError - // has been encountered, the response's payload will be - // added to the AcceptedError and returned. - // - // Issue #1022 - aerr, ok := err.(*AcceptedError) - if ok { - b, readErr := ioutil.ReadAll(resp.Body) - if readErr != nil { - return response, readErr - } - - aerr.Raw = b - return response, aerr - } - - return response, err - } - - if v != nil { - if w, ok := v.(io.Writer); ok { - io.Copy(w, resp.Body) - } else { - decErr := json.NewDecoder(resp.Body).Decode(v) - if decErr == io.EOF { - decErr = nil // ignore EOF errors caused by empty response body - } - if decErr != nil { - err = decErr - } - } - } - - return response, err -} - -// checkRateLimitBeforeDo does not make any network calls, but uses existing knowledge from -// current client state in order to quickly check if *RateLimitError can be immediately returned -// from Client.Do, and if so, returns it so that Client.Do can skip making a network API call unnecessarily. -// Otherwise it returns nil, and Client.Do should proceed normally. -func (c *Client) checkRateLimitBeforeDo(req *http.Request, rateLimitCategory rateLimitCategory) *RateLimitError { - c.rateMu.Lock() - rate := c.rateLimits[rateLimitCategory] - c.rateMu.Unlock() - if !rate.Reset.Time.IsZero() && rate.Remaining == 0 && time.Now().Before(rate.Reset.Time) { - // Create a fake response. - resp := &http.Response{ - Status: http.StatusText(http.StatusForbidden), - StatusCode: http.StatusForbidden, - Request: req, - Header: make(http.Header), - Body: ioutil.NopCloser(strings.NewReader("")), - } - return &RateLimitError{ - Rate: rate, - Response: resp, - Message: fmt.Sprintf("API rate limit of %v still exceeded until %v, not making remote request.", rate.Limit, rate.Reset.Time), - } - } - - return nil -} - -/* -An ErrorResponse reports one or more errors caused by an API request. - -GitHub API docs: https://developer.github.com/v3/#client-errors -*/ -type ErrorResponse struct { - Response *http.Response // HTTP response that caused this error - Message string `json:"message"` // error message - Errors []Error `json:"errors"` // more detail on individual errors - // Block is only populated on certain types of errors such as code 451. - // See https://developer.github.com/changes/2016-03-17-the-451-status-code-is-now-supported/ - // for more information. - Block *struct { - Reason string `json:"reason,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - } `json:"block,omitempty"` - // Most errors will also include a documentation_url field pointing - // to some content that might help you resolve the error, see - // https://developer.github.com/v3/#client-errors - DocumentationURL string `json:"documentation_url,omitempty"` -} - -func (r *ErrorResponse) Error() string { - return fmt.Sprintf("%v %v: %d %v %+v", - r.Response.Request.Method, sanitizeURL(r.Response.Request.URL), - r.Response.StatusCode, r.Message, r.Errors) -} - -// TwoFactorAuthError occurs when using HTTP Basic Authentication for a user -// that has two-factor authentication enabled. The request can be reattempted -// by providing a one-time password in the request. -type TwoFactorAuthError ErrorResponse - -func (r *TwoFactorAuthError) Error() string { return (*ErrorResponse)(r).Error() } - -// RateLimitError occurs when GitHub returns 403 Forbidden response with a rate limit -// remaining value of 0. -type RateLimitError struct { - Rate Rate // Rate specifies last known rate limit for the client - Response *http.Response // HTTP response that caused this error - Message string `json:"message"` // error message -} - -func (r *RateLimitError) Error() string { - return fmt.Sprintf("%v %v: %d %v %v", - r.Response.Request.Method, sanitizeURL(r.Response.Request.URL), - r.Response.StatusCode, r.Message, formatRateReset(time.Until(r.Rate.Reset.Time))) -} - -// AcceptedError occurs when GitHub returns 202 Accepted response with an -// empty body, which means a job was scheduled on the GitHub side to process -// the information needed and cache it. -// Technically, 202 Accepted is not a real error, it's just used to -// indicate that results are not ready yet, but should be available soon. -// The request can be repeated after some time. -type AcceptedError struct { - // Raw contains the response body. - Raw []byte -} - -func (*AcceptedError) Error() string { - return "job scheduled on GitHub side; try again later" -} - -// AbuseRateLimitError occurs when GitHub returns 403 Forbidden response with the -// "documentation_url" field value equal to "https://developer.github.com/v3/#abuse-rate-limits". -type AbuseRateLimitError struct { - Response *http.Response // HTTP response that caused this error - Message string `json:"message"` // error message - - // RetryAfter is provided with some abuse rate limit errors. If present, - // it is the amount of time that the client should wait before retrying. - // Otherwise, the client should try again later (after an unspecified amount of time). - RetryAfter *time.Duration -} - -func (r *AbuseRateLimitError) Error() string { - return fmt.Sprintf("%v %v: %d %v", - r.Response.Request.Method, sanitizeURL(r.Response.Request.URL), - r.Response.StatusCode, r.Message) -} - -// sanitizeURL redacts the client_secret parameter from the URL which may be -// exposed to the user. -func sanitizeURL(uri *url.URL) *url.URL { - if uri == nil { - return nil - } - params := uri.Query() - if len(params.Get("client_secret")) > 0 { - params.Set("client_secret", "REDACTED") - uri.RawQuery = params.Encode() - } - return uri -} - -/* -An Error reports more details on an individual error in an ErrorResponse. -These are the possible validation error codes: - - missing: - resource does not exist - missing_field: - a required field on a resource has not been set - invalid: - the formatting of a field is invalid - already_exists: - another resource has the same valid as this field - custom: - some resources return this (e.g. github.User.CreateKey()), additional - information is set in the Message field of the Error - -GitHub error responses structure are often undocumented and inconsistent. -Sometimes error is just a simple string (Issue #540). -In such cases, Message represents an error message as a workaround. - -GitHub API docs: https://developer.github.com/v3/#client-errors -*/ -type Error struct { - Resource string `json:"resource"` // resource on which the error occurred - Field string `json:"field"` // field on which the error occurred - Code string `json:"code"` // validation error code - Message string `json:"message"` // Message describing the error. Errors with Code == "custom" will always have this set. -} - -func (e *Error) Error() string { - return fmt.Sprintf("%v error caused by %v field on %v resource", - e.Code, e.Field, e.Resource) -} - -func (e *Error) UnmarshalJSON(data []byte) error { - type aliasError Error // avoid infinite recursion by using type alias. - if err := json.Unmarshal(data, (*aliasError)(e)); err != nil { - return json.Unmarshal(data, &e.Message) // data can be json string. - } - return nil -} - -// CheckResponse checks the API response for errors, and returns them if -// present. A response is considered an error if it has a status code outside -// the 200 range or equal to 202 Accepted. -// API error responses are expected to have response -// body, and a JSON response body that maps to ErrorResponse. -// -// The error type will be *RateLimitError for rate limit exceeded errors, -// *AcceptedError for 202 Accepted status codes, -// and *TwoFactorAuthError for two-factor authentication errors. -func CheckResponse(r *http.Response) error { - if r.StatusCode == http.StatusAccepted { - return &AcceptedError{} - } - if c := r.StatusCode; 200 <= c && c <= 299 { - return nil - } - errorResponse := &ErrorResponse{Response: r} - data, err := ioutil.ReadAll(r.Body) - if err == nil && data != nil { - json.Unmarshal(data, errorResponse) - } - // Re-populate error response body because GitHub error responses are often - // undocumented and inconsistent. - // Issue #1136, #540. - r.Body = ioutil.NopCloser(bytes.NewBuffer(data)) - switch { - case r.StatusCode == http.StatusUnauthorized && strings.HasPrefix(r.Header.Get(headerOTP), "required"): - return (*TwoFactorAuthError)(errorResponse) - case r.StatusCode == http.StatusForbidden && r.Header.Get(headerRateRemaining) == "0": - return &RateLimitError{ - Rate: parseRate(r), - Response: errorResponse.Response, - Message: errorResponse.Message, - } - case r.StatusCode == http.StatusForbidden && strings.HasSuffix(errorResponse.DocumentationURL, "/v3/#abuse-rate-limits"): - abuseRateLimitError := &AbuseRateLimitError{ - Response: errorResponse.Response, - Message: errorResponse.Message, - } - if v := r.Header["Retry-After"]; len(v) > 0 { - // According to GitHub support, the "Retry-After" header value will be - // an integer which represents the number of seconds that one should - // wait before resuming making requests. - retryAfterSeconds, _ := strconv.ParseInt(v[0], 10, 64) // Error handling is noop. - retryAfter := time.Duration(retryAfterSeconds) * time.Second - abuseRateLimitError.RetryAfter = &retryAfter - } - return abuseRateLimitError - default: - return errorResponse - } -} - -// parseBoolResponse determines the boolean result from a GitHub API response. -// Several GitHub API methods return boolean responses indicated by the HTTP -// status code in the response (true indicated by a 204, false indicated by a -// 404). This helper function will determine that result and hide the 404 -// error if present. Any other error will be returned through as-is. -func parseBoolResponse(err error) (bool, error) { - if err == nil { - return true, nil - } - - if err, ok := err.(*ErrorResponse); ok && err.Response.StatusCode == http.StatusNotFound { - // Simply false. In this one case, we do not pass the error through. - return false, nil - } - - // some other real error occurred - return false, err -} - -// Rate represents the rate limit for the current client. -type Rate struct { - // The number of requests per hour the client is currently limited to. - Limit int `json:"limit"` - - // The number of remaining requests the client can make this hour. - Remaining int `json:"remaining"` - - // The time at which the current rate limit will reset. - Reset Timestamp `json:"reset"` -} - -func (r Rate) String() string { - return Stringify(r) -} - -// RateLimits represents the rate limits for the current client. -type RateLimits struct { - // The rate limit for non-search API requests. Unauthenticated - // requests are limited to 60 per hour. Authenticated requests are - // limited to 5,000 per hour. - // - // GitHub API docs: https://developer.github.com/v3/#rate-limiting - Core *Rate `json:"core"` - - // The rate limit for search API requests. Unauthenticated requests - // are limited to 10 requests per minutes. Authenticated requests are - // limited to 30 per minute. - // - // GitHub API docs: https://developer.github.com/v3/search/#rate-limit - Search *Rate `json:"search"` -} - -func (r RateLimits) String() string { - return Stringify(r) -} - -type rateLimitCategory uint8 - -const ( - coreCategory rateLimitCategory = iota - searchCategory - - categories // An array of this length will be able to contain all rate limit categories. -) - -// category returns the rate limit category of the endpoint, determined by Request.URL.Path. -func category(path string) rateLimitCategory { - switch { - default: - return coreCategory - case strings.HasPrefix(path, "/search/"): - return searchCategory - } -} - -// RateLimits returns the rate limits for the current client. -func (c *Client) RateLimits(ctx context.Context) (*RateLimits, *Response, error) { - req, err := c.NewRequest("GET", "rate_limit", nil) - if err != nil { - return nil, nil, err - } - - response := new(struct { - Resources *RateLimits `json:"resources"` - }) - resp, err := c.Do(ctx, req, response) - if err != nil { - return nil, nil, err - } - - if response.Resources != nil { - c.rateMu.Lock() - if response.Resources.Core != nil { - c.rateLimits[coreCategory] = *response.Resources.Core - } - if response.Resources.Search != nil { - c.rateLimits[searchCategory] = *response.Resources.Search - } - c.rateMu.Unlock() - } - - return response.Resources, resp, nil -} - -/* -UnauthenticatedRateLimitedTransport allows you to make unauthenticated calls -that need to use a higher rate limit associated with your OAuth application. - - t := &github.UnauthenticatedRateLimitedTransport{ - ClientID: "your app's client ID", - ClientSecret: "your app's client secret", - } - client := github.NewClient(t.Client()) - -This will append the querystring params client_id=xxx&client_secret=yyy to all -requests. - -See https://developer.github.com/v3/#unauthenticated-rate-limited-requests for -more information. -*/ -type UnauthenticatedRateLimitedTransport struct { - // ClientID is the GitHub OAuth client ID of the current application, which - // can be found by selecting its entry in the list at - // https://github.com/settings/applications. - ClientID string - - // ClientSecret is the GitHub OAuth client secret of the current - // application. - ClientSecret string - - // Transport is the underlying HTTP transport to use when making requests. - // It will default to http.DefaultTransport if nil. - Transport http.RoundTripper -} - -// RoundTrip implements the RoundTripper interface. -func (t *UnauthenticatedRateLimitedTransport) RoundTrip(req *http.Request) (*http.Response, error) { - if t.ClientID == "" { - return nil, errors.New("t.ClientID is empty") - } - if t.ClientSecret == "" { - return nil, errors.New("t.ClientSecret is empty") - } - - // To set extra querystring params, we must make a copy of the Request so - // that we don't modify the Request we were given. This is required by the - // specification of http.RoundTripper. - // - // Since we are going to modify only req.URL here, we only need a deep copy - // of req.URL. - req2 := new(http.Request) - *req2 = *req - req2.URL = new(url.URL) - *req2.URL = *req.URL - - q := req2.URL.Query() - q.Set("client_id", t.ClientID) - q.Set("client_secret", t.ClientSecret) - req2.URL.RawQuery = q.Encode() - - // Make the HTTP request. - return t.transport().RoundTrip(req2) -} - -// Client returns an *http.Client that makes requests which are subject to the -// rate limit of your OAuth application. -func (t *UnauthenticatedRateLimitedTransport) Client() *http.Client { - return &http.Client{Transport: t} -} - -func (t *UnauthenticatedRateLimitedTransport) transport() http.RoundTripper { - if t.Transport != nil { - return t.Transport - } - return http.DefaultTransport -} - -// BasicAuthTransport is an http.RoundTripper that authenticates all requests -// using HTTP Basic Authentication with the provided username and password. It -// additionally supports users who have two-factor authentication enabled on -// their GitHub account. -type BasicAuthTransport struct { - Username string // GitHub username - Password string // GitHub password - OTP string // one-time password for users with two-factor auth enabled - - // Transport is the underlying HTTP transport to use when making requests. - // It will default to http.DefaultTransport if nil. - Transport http.RoundTripper -} - -// RoundTrip implements the RoundTripper interface. -func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error) { - // To set extra headers, we must make a copy of the Request so - // that we don't modify the Request we were given. This is required by the - // specification of http.RoundTripper. - // - // Since we are going to modify only req.Header here, we only need a deep copy - // of req.Header. - req2 := new(http.Request) - *req2 = *req - req2.Header = make(http.Header, len(req.Header)) - for k, s := range req.Header { - req2.Header[k] = append([]string(nil), s...) - } - - req2.SetBasicAuth(t.Username, t.Password) - if t.OTP != "" { - req2.Header.Set(headerOTP, t.OTP) - } - return t.transport().RoundTrip(req2) -} - -// Client returns an *http.Client that makes requests that are authenticated -// using HTTP Basic Authentication. -func (t *BasicAuthTransport) Client() *http.Client { - return &http.Client{Transport: t} -} - -func (t *BasicAuthTransport) transport() http.RoundTripper { - if t.Transport != nil { - return t.Transport - } - return http.DefaultTransport -} - -// formatRateReset formats d to look like "[rate reset in 2s]" or -// "[rate reset in 87m02s]" for the positive durations. And like "[rate limit was reset 87m02s ago]" -// for the negative cases. -func formatRateReset(d time.Duration) string { - isNegative := d < 0 - if isNegative { - d *= -1 - } - secondsTotal := int(0.5 + d.Seconds()) - minutes := secondsTotal / 60 - seconds := secondsTotal - minutes*60 - - var timeString string - if minutes > 0 { - timeString = fmt.Sprintf("%dm%02ds", minutes, seconds) - } else { - timeString = fmt.Sprintf("%ds", seconds) - } - - if isNegative { - return fmt.Sprintf("[rate limit was reset %v ago]", timeString) - } - return fmt.Sprintf("[rate reset in %v]", timeString) -} - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { return &v } - -// Int is a helper routine that allocates a new int value -// to store v and returns a pointer to it. -func Int(v int) *int { return &v } - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { return &v } - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { return &v } diff --git a/vendor/github.com/google/go-github/v30/github/gitignore.go b/vendor/github.com/google/go-github/v30/github/gitignore.go deleted file mode 100644 index 2f691bc3..00000000 --- a/vendor/github.com/google/go-github/v30/github/gitignore.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// GitignoresService provides access to the gitignore related functions in the -// GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/gitignore/ -type GitignoresService service - -// Gitignore represents a .gitignore file as returned by the GitHub API. -type Gitignore struct { - Name *string `json:"name,omitempty"` - Source *string `json:"source,omitempty"` -} - -func (g Gitignore) String() string { - return Stringify(g) -} - -// List all available Gitignore templates. -// -// GitHub API docs: https://developer.github.com/v3/gitignore/#listing-available-templates -func (s GitignoresService) List(ctx context.Context) ([]string, *Response, error) { - req, err := s.client.NewRequest("GET", "gitignore/templates", nil) - if err != nil { - return nil, nil, err - } - - var availableTemplates []string - resp, err := s.client.Do(ctx, req, &availableTemplates) - if err != nil { - return nil, resp, err - } - - return availableTemplates, resp, nil -} - -// Get a Gitignore by name. -// -// GitHub API docs: https://developer.github.com/v3/gitignore/#get-a-single-template -func (s GitignoresService) Get(ctx context.Context, name string) (*Gitignore, *Response, error) { - u := fmt.Sprintf("gitignore/templates/%v", name) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - gitignore := new(Gitignore) - resp, err := s.client.Do(ctx, req, gitignore) - if err != nil { - return nil, resp, err - } - - return gitignore, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/interactions.go b/vendor/github.com/google/go-github/v30/github/interactions.go deleted file mode 100644 index b9965491..00000000 --- a/vendor/github.com/google/go-github/v30/github/interactions.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 The go-github 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 github - -// InteractionsService handles communication with the repository and organization related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/interactions/ -type InteractionsService service - -// InteractionRestriction represents the interaction restrictions for repository and organization. -type InteractionRestriction struct { - // Specifies the group of GitHub users who can - // comment, open issues, or create pull requests for the given repository. - // Possible values are: "existing_users", "contributors_only" and "collaborators_only". - Limit *string `json:"limit,omitempty"` - - // Origin specifies the type of the resource to interact with. - // Possible values are: "repository" and "organization". - Origin *string `json:"origin,omitempty"` - - // ExpiresAt specifies the time after which the interaction restrictions expire. - // The default expiry time is 24 hours from the time restriction is created. - ExpiresAt *Timestamp `json:"expires_at,omitempty"` -} diff --git a/vendor/github.com/google/go-github/v30/github/interactions_orgs.go b/vendor/github.com/google/go-github/v30/github/interactions_orgs.go deleted file mode 100644 index af25f656..00000000 --- a/vendor/github.com/google/go-github/v30/github/interactions_orgs.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2019 The go-github 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 github - -import ( - "context" - "fmt" -) - -// GetRestrictionsForOrg fetches the interaction restrictions for an organization. -// -// GitHub API docs: https://developer.github.com/v3/interactions/orgs/#get-interaction-restrictions-for-an-organization -func (s *InteractionsService) GetRestrictionsForOrg(ctx context.Context, organization string) (*InteractionRestriction, *Response, error) { - u := fmt.Sprintf("orgs/%v/interaction-limits", organization) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeInteractionRestrictionsPreview) - - organizationInteractions := new(InteractionRestriction) - - resp, err := s.client.Do(ctx, req, organizationInteractions) - if err != nil { - return nil, resp, err - } - - return organizationInteractions, resp, nil -} - -// UpdateRestrictionsForOrg adds or updates the interaction restrictions for an organization. -// -// limit specifies the group of GitHub users who can comment, open issues, or create pull requests -// in public repositories for the given organization. -// Possible values are: "existing_users", "contributors_only", "collaborators_only". -// -// GitHub API docs: https://developer.github.com/v3/interactions/orgs/#add-or-update-interaction-restrictions-for-an-organization -func (s *InteractionsService) UpdateRestrictionsForOrg(ctx context.Context, organization, limit string) (*InteractionRestriction, *Response, error) { - u := fmt.Sprintf("orgs/%v/interaction-limits", organization) - - interaction := &InteractionRestriction{Limit: String(limit)} - - req, err := s.client.NewRequest("PUT", u, interaction) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeInteractionRestrictionsPreview) - - organizationInteractions := new(InteractionRestriction) - - resp, err := s.client.Do(ctx, req, organizationInteractions) - if err != nil { - return nil, resp, err - } - - return organizationInteractions, resp, nil -} - -// RemoveRestrictionsFromOrg removes the interaction restrictions for an organization. -// -// GitHub API docs: https://developer.github.com/v3/interactions/orgs/#remove-interaction-restrictions-for-an-organization -func (s *InteractionsService) RemoveRestrictionsFromOrg(ctx context.Context, organization string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/interaction-limits", organization) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeInteractionRestrictionsPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/interactions_repos.go b/vendor/github.com/google/go-github/v30/github/interactions_repos.go deleted file mode 100644 index 58234822..00000000 --- a/vendor/github.com/google/go-github/v30/github/interactions_repos.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" -) - -// GetRestrictionsForRepo fetches the interaction restrictions for a repository. -// -// GitHub API docs: https://developer.github.com/v3/interactions/repos/#get-interaction-restrictions-for-a-repository -func (s *InteractionsService) GetRestrictionsForRepo(ctx context.Context, owner, repo string) (*InteractionRestriction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/interaction-limits", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeInteractionRestrictionsPreview) - - repositoryInteractions := new(InteractionRestriction) - - resp, err := s.client.Do(ctx, req, repositoryInteractions) - if err != nil { - return nil, resp, err - } - - return repositoryInteractions, resp, nil -} - -// UpdateRestrictionsForRepo adds or updates the interaction restrictions for a repository. -// -// limit specifies the group of GitHub users who can comment, open issues, or create pull requests -// for the given repository. -// Possible values are: "existing_users", "contributors_only", "collaborators_only". -// -// GitHub API docs: https://developer.github.com/v3/interactions/repos/#add-or-update-interaction-restrictions-for-a-repository -func (s *InteractionsService) UpdateRestrictionsForRepo(ctx context.Context, owner, repo, limit string) (*InteractionRestriction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/interaction-limits", owner, repo) - - interaction := &InteractionRestriction{Limit: String(limit)} - - req, err := s.client.NewRequest("PUT", u, interaction) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeInteractionRestrictionsPreview) - - repositoryInteractions := new(InteractionRestriction) - - resp, err := s.client.Do(ctx, req, repositoryInteractions) - if err != nil { - return nil, resp, err - } - - return repositoryInteractions, resp, nil -} - -// RemoveRestrictionsFromRepo removes the interaction restrictions for a repository. -// -// GitHub API docs: https://developer.github.com/v3/interactions/repos/#remove-interaction-restrictions-for-a-repository -func (s *InteractionsService) RemoveRestrictionsFromRepo(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/interaction-limits", owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeInteractionRestrictionsPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/issues.go b/vendor/github.com/google/go-github/v30/github/issues.go deleted file mode 100644 index b53a2603..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues.go +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "strings" - "time" -) - -// IssuesService handles communication with the issue related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/issues/ -type IssuesService service - -// Issue represents a GitHub issue on a repository. -// -// Note: As far as the GitHub API is concerned, every pull request is an issue, -// but not every issue is a pull request. Some endpoints, events, and webhooks -// may also return pull requests via this struct. If PullRequestLinks is nil, -// this is an issue, and if PullRequestLinks is not nil, this is a pull request. -// The IsPullRequest helper method can be used to check that. -type Issue struct { - ID *int64 `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - State *string `json:"state,omitempty"` - Locked *bool `json:"locked,omitempty"` - Title *string `json:"title,omitempty"` - Body *string `json:"body,omitempty"` - AuthorAssociation *string `json:"author_association,omitempty"` - User *User `json:"user,omitempty"` - Labels []*Label `json:"labels,omitempty"` - Assignee *User `json:"assignee,omitempty"` - Comments *int `json:"comments,omitempty"` - ClosedAt *time.Time `json:"closed_at,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - ClosedBy *User `json:"closed_by,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CommentsURL *string `json:"comments_url,omitempty"` - EventsURL *string `json:"events_url,omitempty"` - LabelsURL *string `json:"labels_url,omitempty"` - RepositoryURL *string `json:"repository_url,omitempty"` - Milestone *Milestone `json:"milestone,omitempty"` - PullRequestLinks *PullRequestLinks `json:"pull_request,omitempty"` - Repository *Repository `json:"repository,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` - Assignees []*User `json:"assignees,omitempty"` - NodeID *string `json:"node_id,omitempty"` - - // TextMatches is only populated from search results that request text matches - // See: search.go and https://developer.github.com/v3/search/#text-match-metadata - TextMatches []*TextMatch `json:"text_matches,omitempty"` - - // ActiveLockReason is populated only when LockReason is provided while locking the issue. - // Possible values are: "off-topic", "too heated", "resolved", and "spam". - ActiveLockReason *string `json:"active_lock_reason,omitempty"` -} - -func (i Issue) String() string { - return Stringify(i) -} - -// IsPullRequest reports whether the issue is also a pull request. It uses the -// method recommended by GitHub's API documentation, which is to check whether -// PullRequestLinks is non-nil. -func (i Issue) IsPullRequest() bool { - return i.PullRequestLinks != nil -} - -// IssueRequest represents a request to create/edit an issue. -// It is separate from Issue above because otherwise Labels -// and Assignee fail to serialize to the correct JSON. -type IssueRequest struct { - Title *string `json:"title,omitempty"` - Body *string `json:"body,omitempty"` - Labels *[]string `json:"labels,omitempty"` - Assignee *string `json:"assignee,omitempty"` - State *string `json:"state,omitempty"` - Milestone *int `json:"milestone,omitempty"` - Assignees *[]string `json:"assignees,omitempty"` -} - -// IssueListOptions specifies the optional parameters to the IssuesService.List -// and IssuesService.ListByOrg methods. -type IssueListOptions struct { - // Filter specifies which issues to list. Possible values are: assigned, - // created, mentioned, subscribed, all. Default is "assigned". - Filter string `url:"filter,omitempty"` - - // State filters issues based on their state. Possible values are: open, - // closed, all. Default is "open". - State string `url:"state,omitempty"` - - // Labels filters issues based on their label. - Labels []string `url:"labels,comma,omitempty"` - - // Sort specifies how to sort issues. Possible values are: created, updated, - // and comments. Default value is "created". - Sort string `url:"sort,omitempty"` - - // Direction in which to sort issues. Possible values are: asc, desc. - // Default is "desc". - Direction string `url:"direction,omitempty"` - - // Since filters issues by time. - Since time.Time `url:"since,omitempty"` - - ListOptions -} - -// PullRequestLinks object is added to the Issue object when it's an issue included -// in the IssueCommentEvent webhook payload, if the webhook is fired by a comment on a PR. -type PullRequestLinks struct { - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - DiffURL *string `json:"diff_url,omitempty"` - PatchURL *string `json:"patch_url,omitempty"` -} - -// List the issues for the authenticated user. If all is true, list issues -// across all the user's visible repositories including owned, member, and -// organization repositories; if false, list only owned and member -// repositories. -// -// GitHub API docs: https://developer.github.com/v3/issues/#list-issues -func (s *IssuesService) List(ctx context.Context, all bool, opts *IssueListOptions) ([]*Issue, *Response, error) { - var u string - if all { - u = "issues" - } else { - u = "user/issues" - } - return s.listIssues(ctx, u, opts) -} - -// ListByOrg fetches the issues in the specified organization for the -// authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/issues/#list-issues -func (s *IssuesService) ListByOrg(ctx context.Context, org string, opts *IssueListOptions) ([]*Issue, *Response, error) { - u := fmt.Sprintf("orgs/%v/issues", org) - return s.listIssues(ctx, u, opts) -} - -func (s *IssuesService) listIssues(ctx context.Context, u string, opts *IssueListOptions) ([]*Issue, *Response, error) { - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLockReasonPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var issues []*Issue - resp, err := s.client.Do(ctx, req, &issues) - if err != nil { - return nil, resp, err - } - - return issues, resp, nil -} - -// IssueListByRepoOptions specifies the optional parameters to the -// IssuesService.ListByRepo method. -type IssueListByRepoOptions struct { - // Milestone limits issues for the specified milestone. Possible values are - // a milestone number, "none" for issues with no milestone, "*" for issues - // with any milestone. - Milestone string `url:"milestone,omitempty"` - - // State filters issues based on their state. Possible values are: open, - // closed, all. Default is "open". - State string `url:"state,omitempty"` - - // Assignee filters issues based on their assignee. Possible values are a - // user name, "none" for issues that are not assigned, "*" for issues with - // any assigned user. - Assignee string `url:"assignee,omitempty"` - - // Creator filters issues based on their creator. - Creator string `url:"creator,omitempty"` - - // Mentioned filters issues to those mentioned a specific user. - Mentioned string `url:"mentioned,omitempty"` - - // Labels filters issues based on their label. - Labels []string `url:"labels,omitempty,comma"` - - // Sort specifies how to sort issues. Possible values are: created, updated, - // and comments. Default value is "created". - Sort string `url:"sort,omitempty"` - - // Direction in which to sort issues. Possible values are: asc, desc. - // Default is "desc". - Direction string `url:"direction,omitempty"` - - // Since filters issues by time. - Since time.Time `url:"since,omitempty"` - - ListOptions -} - -// ListByRepo lists the issues for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/#list-issues-for-a-repository -func (s *IssuesService) ListByRepo(ctx context.Context, owner string, repo string, opts *IssueListByRepoOptions) ([]*Issue, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeIntegrationPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var issues []*Issue - resp, err := s.client.Do(ctx, req, &issues) - if err != nil { - return nil, resp, err - } - - return issues, resp, nil -} - -// Get a single issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/#get-a-single-issue -func (s *IssuesService) Get(ctx context.Context, owner string, repo string, number int) (*Issue, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, number) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLockReasonPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - issue := new(Issue) - resp, err := s.client.Do(ctx, req, issue) - if err != nil { - return nil, resp, err - } - - return issue, resp, nil -} - -// Create a new issue on the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/#create-an-issue -func (s *IssuesService) Create(ctx context.Context, owner string, repo string, issue *IssueRequest) (*Issue, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues", owner, repo) - req, err := s.client.NewRequest("POST", u, issue) - if err != nil { - return nil, nil, err - } - - i := new(Issue) - resp, err := s.client.Do(ctx, req, i) - if err != nil { - return nil, resp, err - } - - return i, resp, nil -} - -// Edit an issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/#edit-an-issue -func (s *IssuesService) Edit(ctx context.Context, owner string, repo string, number int, issue *IssueRequest) (*Issue, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, number) - req, err := s.client.NewRequest("PATCH", u, issue) - if err != nil { - return nil, nil, err - } - - i := new(Issue) - resp, err := s.client.Do(ctx, req, i) - if err != nil { - return nil, resp, err - } - - return i, resp, nil -} - -// LockIssueOptions specifies the optional parameters to the -// IssuesService.Lock method. -type LockIssueOptions struct { - // LockReason specifies the reason to lock this issue. - // Providing a lock reason can help make it clearer to contributors why an issue - // was locked. Possible values are: "off-topic", "too heated", "resolved", and "spam". - LockReason string `json:"lock_reason,omitempty"` -} - -// Lock an issue's conversation. -// -// GitHub API docs: https://developer.github.com/v3/issues/#lock-an-issue -func (s *IssuesService) Lock(ctx context.Context, owner string, repo string, number int, opts *LockIssueOptions) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/lock", owner, repo, number) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - if opts != nil { - req.Header.Set("Accept", mediaTypeLockReasonPreview) - } - - return s.client.Do(ctx, req, nil) -} - -// Unlock an issue's conversation. -// -// GitHub API docs: https://developer.github.com/v3/issues/#unlock-an-issue -func (s *IssuesService) Unlock(ctx context.Context, owner string, repo string, number int) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/lock", owner, repo, number) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/issues_assignees.go b/vendor/github.com/google/go-github/v30/github/issues_assignees.go deleted file mode 100644 index c09806fd..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues_assignees.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListAssignees fetches all available assignees (owners and collaborators) to -// which issues may be assigned. -// -// GitHub API docs: https://developer.github.com/v3/issues/assignees/#list-assignees -func (s *IssuesService) ListAssignees(ctx context.Context, owner, repo string, opts *ListOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/assignees", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - var assignees []*User - resp, err := s.client.Do(ctx, req, &assignees) - if err != nil { - return nil, resp, err - } - - return assignees, resp, nil -} - -// IsAssignee checks if a user is an assignee for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/assignees/#check-assignee -func (s *IssuesService) IsAssignee(ctx context.Context, owner, repo, user string) (bool, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/assignees/%v", owner, repo, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - resp, err := s.client.Do(ctx, req, nil) - assignee, err := parseBoolResponse(err) - return assignee, resp, err -} - -// AddAssignees adds the provided GitHub users as assignees to the issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue -func (s *IssuesService) AddAssignees(ctx context.Context, owner, repo string, number int, assignees []string) (*Issue, *Response, error) { - users := &struct { - Assignees []string `json:"assignees,omitempty"` - }{Assignees: assignees} - u := fmt.Sprintf("repos/%v/%v/issues/%v/assignees", owner, repo, number) - req, err := s.client.NewRequest("POST", u, users) - if err != nil { - return nil, nil, err - } - - issue := &Issue{} - resp, err := s.client.Do(ctx, req, issue) - return issue, resp, err -} - -// RemoveAssignees removes the provided GitHub users as assignees from the issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/assignees/#remove-assignees-from-an-issue -func (s *IssuesService) RemoveAssignees(ctx context.Context, owner, repo string, number int, assignees []string) (*Issue, *Response, error) { - users := &struct { - Assignees []string `json:"assignees,omitempty"` - }{Assignees: assignees} - u := fmt.Sprintf("repos/%v/%v/issues/%v/assignees", owner, repo, number) - req, err := s.client.NewRequest("DELETE", u, users) - if err != nil { - return nil, nil, err - } - - issue := &Issue{} - resp, err := s.client.Do(ctx, req, issue) - return issue, resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/issues_comments.go b/vendor/github.com/google/go-github/v30/github/issues_comments.go deleted file mode 100644 index 56b24c19..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues_comments.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// IssueComment represents a comment left on an issue. -type IssueComment struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Body *string `json:"body,omitempty"` - User *User `json:"user,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - // AuthorAssociation is the comment author's relationship to the issue's repository. - // Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE". - AuthorAssociation *string `json:"author_association,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - IssueURL *string `json:"issue_url,omitempty"` -} - -func (i IssueComment) String() string { - return Stringify(i) -} - -// IssueListCommentsOptions specifies the optional parameters to the -// IssuesService.ListComments method. -type IssueListCommentsOptions struct { - // Sort specifies how to sort comments. Possible values are: created, updated. - Sort *string `url:"sort,omitempty"` - - // Direction in which to sort comments. Possible values are: asc, desc. - Direction *string `url:"direction,omitempty"` - - // Since filters comments by time. - Since *time.Time `url:"since,omitempty"` - - ListOptions -} - -// ListComments lists all comments on the specified issue. Specifying an issue -// number of 0 will return all comments on all issues for the repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue -func (s *IssuesService) ListComments(ctx context.Context, owner string, repo string, number int, opts *IssueListCommentsOptions) ([]*IssueComment, *Response, error) { - var u string - if number == 0 { - u = fmt.Sprintf("repos/%v/%v/issues/comments", owner, repo) - } else { - u = fmt.Sprintf("repos/%v/%v/issues/%d/comments", owner, repo, number) - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var comments []*IssueComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// GetComment fetches the specified issue comment. -// -// GitHub API docs: https://developer.github.com/v3/issues/comments/#get-a-single-comment -func (s *IssuesService) GetComment(ctx context.Context, owner string, repo string, commentID int64) (*IssueComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, commentID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - comment := new(IssueComment) - resp, err := s.client.Do(ctx, req, comment) - if err != nil { - return nil, resp, err - } - - return comment, resp, nil -} - -// CreateComment creates a new comment on the specified issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/comments/#create-a-comment -func (s *IssuesService) CreateComment(ctx context.Context, owner string, repo string, number int, comment *IssueComment) (*IssueComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/comments", owner, repo, number) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - c := new(IssueComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// EditComment updates an issue comment. -// A non-nil comment.Body must be provided. Other comment fields should be left nil. -// -// GitHub API docs: https://developer.github.com/v3/issues/comments/#edit-a-comment -func (s *IssuesService) EditComment(ctx context.Context, owner string, repo string, commentID int64, comment *IssueComment) (*IssueComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, commentID) - req, err := s.client.NewRequest("PATCH", u, comment) - if err != nil { - return nil, nil, err - } - c := new(IssueComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// DeleteComment deletes an issue comment. -// -// GitHub API docs: https://developer.github.com/v3/issues/comments/#delete-a-comment -func (s *IssuesService) DeleteComment(ctx context.Context, owner string, repo string, commentID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, commentID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/issues_events.go b/vendor/github.com/google/go-github/v30/github/issues_events.go deleted file mode 100644 index fa948596..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues_events.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" - "strings" - "time" -) - -// IssueEvent represents an event that occurred around an Issue or Pull Request. -type IssueEvent struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - - // The User that generated this event. - Actor *User `json:"actor,omitempty"` - - // Event identifies the actual type of Event that occurred. Possible - // values are: - // - // closed - // The Actor closed the issue. - // If the issue was closed by commit message, CommitID holds the SHA1 hash of the commit. - // - // merged - // The Actor merged into master a branch containing a commit mentioning the issue. - // CommitID holds the SHA1 of the merge commit. - // - // referenced - // The Actor committed to master a commit mentioning the issue in its commit message. - // CommitID holds the SHA1 of the commit. - // - // reopened, unlocked - // The Actor did that to the issue. - // - // locked - // The Actor locked the issue. - // LockReason holds the reason of locking the issue (if provided while locking). - // - // renamed - // The Actor changed the issue title from Rename.From to Rename.To. - // - // mentioned - // Someone unspecified @mentioned the Actor [sic] in an issue comment body. - // - // assigned, unassigned - // The Assigner assigned the issue to or removed the assignment from the Assignee. - // - // labeled, unlabeled - // The Actor added or removed the Label from the issue. - // - // milestoned, demilestoned - // The Actor added or removed the issue from the Milestone. - // - // subscribed, unsubscribed - // The Actor subscribed to or unsubscribed from notifications for an issue. - // - // head_ref_deleted, head_ref_restored - // The pull request’s branch was deleted or restored. - // - // review_dismissed - // The review was dismissed and `DismissedReview` will be populated below. - // - Event *string `json:"event,omitempty"` - - CreatedAt *time.Time `json:"created_at,omitempty"` - Issue *Issue `json:"issue,omitempty"` - - // Only present on certain events; see above. - Assignee *User `json:"assignee,omitempty"` - Assigner *User `json:"assigner,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - Milestone *Milestone `json:"milestone,omitempty"` - Label *Label `json:"label,omitempty"` - Rename *Rename `json:"rename,omitempty"` - LockReason *string `json:"lock_reason,omitempty"` - ProjectCard *ProjectCard `json:"project_card,omitempty"` - DismissedReview *DismissedReview `json:"dismissed_review,omitempty"` -} - -// DismissedReview represents details for 'dismissed_review' events. -type DismissedReview struct { - // State represents the state of the dismissed review. - // Possible values are: "commented", "approved", and "changes_requested". - State *string `json:"state,omitempty"` - ReviewID *int64 `json:"review_id,omitempty"` - DismissalMessage *string `json:"dismissal_message,omitempty"` - DismissalCommitID *string `json:"dismissal_commit_id,omitempty"` -} - -// ListIssueEvents lists events for the specified issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/events/#list-events-for-an-issue -func (s *IssuesService) ListIssueEvents(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*IssueEvent, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%v/events", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - acceptHeaders := []string{mediaTypeLockReasonPreview, mediaTypeProjectCardDetailsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var events []*IssueEvent - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// ListRepositoryEvents lists events for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/events/#list-events-for-a-repository -func (s *IssuesService) ListRepositoryEvents(ctx context.Context, owner, repo string, opts *ListOptions) ([]*IssueEvent, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/events", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var events []*IssueEvent - resp, err := s.client.Do(ctx, req, &events) - if err != nil { - return nil, resp, err - } - - return events, resp, nil -} - -// GetEvent returns the specified issue event. -// -// GitHub API docs: https://developer.github.com/v3/issues/events/#get-a-single-event -func (s *IssuesService) GetEvent(ctx context.Context, owner, repo string, id int64) (*IssueEvent, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/events/%v", owner, repo, id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - event := new(IssueEvent) - resp, err := s.client.Do(ctx, req, event) - if err != nil { - return nil, resp, err - } - - return event, resp, nil -} - -// Rename contains details for 'renamed' events. -type Rename struct { - From *string `json:"from,omitempty"` - To *string `json:"to,omitempty"` -} - -func (r Rename) String() string { - return Stringify(r) -} diff --git a/vendor/github.com/google/go-github/v30/github/issues_labels.go b/vendor/github.com/google/go-github/v30/github/issues_labels.go deleted file mode 100644 index fa300259..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues_labels.go +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Label represents a GitHub label on an Issue -type Label struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - Color *string `json:"color,omitempty"` - Description *string `json:"description,omitempty"` - Default *bool `json:"default,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (l Label) String() string { - return Stringify(l) -} - -// ListLabels lists all labels for a repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository -func (s *IssuesService) ListLabels(ctx context.Context, owner string, repo string, opts *ListOptions) ([]*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/labels", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var labels []*Label - resp, err := s.client.Do(ctx, req, &labels) - if err != nil { - return nil, resp, err - } - - return labels, resp, nil -} - -// GetLabel gets a single label. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#get-a-single-label -func (s *IssuesService) GetLabel(ctx context.Context, owner string, repo string, name string) (*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - label := new(Label) - resp, err := s.client.Do(ctx, req, label) - if err != nil { - return nil, resp, err - } - - return label, resp, nil -} - -// CreateLabel creates a new label on the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#create-a-label -func (s *IssuesService) CreateLabel(ctx context.Context, owner string, repo string, label *Label) (*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/labels", owner, repo) - req, err := s.client.NewRequest("POST", u, label) - if err != nil { - return nil, nil, err - } - - l := new(Label) - resp, err := s.client.Do(ctx, req, l) - if err != nil { - return nil, resp, err - } - - return l, resp, nil -} - -// EditLabel edits a label. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#update-a-label -func (s *IssuesService) EditLabel(ctx context.Context, owner string, repo string, name string, label *Label) (*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name) - req, err := s.client.NewRequest("PATCH", u, label) - if err != nil { - return nil, nil, err - } - - l := new(Label) - resp, err := s.client.Do(ctx, req, l) - if err != nil { - return nil, resp, err - } - - return l, resp, nil -} - -// DeleteLabel deletes a label. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#delete-a-label -func (s *IssuesService) DeleteLabel(ctx context.Context, owner string, repo string, name string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// ListLabelsByIssue lists all labels for an issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue -func (s *IssuesService) ListLabelsByIssue(ctx context.Context, owner string, repo string, number int, opts *ListOptions) ([]*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var labels []*Label - resp, err := s.client.Do(ctx, req, &labels) - if err != nil { - return nil, resp, err - } - - return labels, resp, nil -} - -// AddLabelsToIssue adds labels to an issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue -func (s *IssuesService) AddLabelsToIssue(ctx context.Context, owner string, repo string, number int, labels []string) ([]*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number) - req, err := s.client.NewRequest("POST", u, labels) - if err != nil { - return nil, nil, err - } - - var l []*Label - resp, err := s.client.Do(ctx, req, &l) - if err != nil { - return nil, resp, err - } - - return l, resp, nil -} - -// RemoveLabelForIssue removes a label for an issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue -func (s *IssuesService) RemoveLabelForIssue(ctx context.Context, owner string, repo string, number int, label string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/labels/%v", owner, repo, number, label) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ReplaceLabelsForIssue replaces all labels for an issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue -func (s *IssuesService) ReplaceLabelsForIssue(ctx context.Context, owner string, repo string, number int, labels []string) ([]*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number) - req, err := s.client.NewRequest("PUT", u, labels) - if err != nil { - return nil, nil, err - } - - var l []*Label - resp, err := s.client.Do(ctx, req, &l) - if err != nil { - return nil, resp, err - } - - return l, resp, nil -} - -// RemoveLabelsForIssue removes all labels for an issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue -func (s *IssuesService) RemoveLabelsForIssue(ctx context.Context, owner string, repo string, number int) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListLabelsForMilestone lists labels for every issue in a milestone. -// -// GitHub API docs: https://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone -func (s *IssuesService) ListLabelsForMilestone(ctx context.Context, owner string, repo string, number int, opts *ListOptions) ([]*Label, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/milestones/%d/labels", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var labels []*Label - resp, err := s.client.Do(ctx, req, &labels) - if err != nil { - return nil, resp, err - } - - return labels, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/issues_milestones.go b/vendor/github.com/google/go-github/v30/github/issues_milestones.go deleted file mode 100644 index 4e443507..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues_milestones.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// Milestone represents a GitHub repository milestone. -type Milestone struct { - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - LabelsURL *string `json:"labels_url,omitempty"` - ID *int64 `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - State *string `json:"state,omitempty"` - Title *string `json:"title,omitempty"` - Description *string `json:"description,omitempty"` - Creator *User `json:"creator,omitempty"` - OpenIssues *int `json:"open_issues,omitempty"` - ClosedIssues *int `json:"closed_issues,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - ClosedAt *time.Time `json:"closed_at,omitempty"` - DueOn *time.Time `json:"due_on,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (m Milestone) String() string { - return Stringify(m) -} - -// MilestoneListOptions specifies the optional parameters to the -// IssuesService.ListMilestones method. -type MilestoneListOptions struct { - // State filters milestones based on their state. Possible values are: - // open, closed, all. Default is "open". - State string `url:"state,omitempty"` - - // Sort specifies how to sort milestones. Possible values are: due_on, completeness. - // Default value is "due_on". - Sort string `url:"sort,omitempty"` - - // Direction in which to sort milestones. Possible values are: asc, desc. - // Default is "asc". - Direction string `url:"direction,omitempty"` - - ListOptions -} - -// ListMilestones lists all milestones for a repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository -func (s *IssuesService) ListMilestones(ctx context.Context, owner string, repo string, opts *MilestoneListOptions) ([]*Milestone, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/milestones", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var milestones []*Milestone - resp, err := s.client.Do(ctx, req, &milestones) - if err != nil { - return nil, resp, err - } - - return milestones, resp, nil -} - -// GetMilestone gets a single milestone. -// -// GitHub API docs: https://developer.github.com/v3/issues/milestones/#get-a-single-milestone -func (s *IssuesService) GetMilestone(ctx context.Context, owner string, repo string, number int) (*Milestone, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/milestones/%d", owner, repo, number) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - milestone := new(Milestone) - resp, err := s.client.Do(ctx, req, milestone) - if err != nil { - return nil, resp, err - } - - return milestone, resp, nil -} - -// CreateMilestone creates a new milestone on the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/issues/milestones/#create-a-milestone -func (s *IssuesService) CreateMilestone(ctx context.Context, owner string, repo string, milestone *Milestone) (*Milestone, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/milestones", owner, repo) - req, err := s.client.NewRequest("POST", u, milestone) - if err != nil { - return nil, nil, err - } - - m := new(Milestone) - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// EditMilestone edits a milestone. -// -// GitHub API docs: https://developer.github.com/v3/issues/milestones/#update-a-milestone -func (s *IssuesService) EditMilestone(ctx context.Context, owner string, repo string, number int, milestone *Milestone) (*Milestone, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/milestones/%d", owner, repo, number) - req, err := s.client.NewRequest("PATCH", u, milestone) - if err != nil { - return nil, nil, err - } - - m := new(Milestone) - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeleteMilestone deletes a milestone. -// -// GitHub API docs: https://developer.github.com/v3/issues/milestones/#delete-a-milestone -func (s *IssuesService) DeleteMilestone(ctx context.Context, owner string, repo string, number int) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/milestones/%d", owner, repo, number) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/issues_timeline.go b/vendor/github.com/google/go-github/v30/github/issues_timeline.go deleted file mode 100644 index 58465e22..00000000 --- a/vendor/github.com/google/go-github/v30/github/issues_timeline.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" - "strings" - "time" -) - -// Timeline represents an event that occurred around an Issue or Pull Request. -// -// It is similar to an IssueEvent but may contain more information. -// GitHub API docs: https://developer.github.com/v3/issues/timeline/ -type Timeline struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - CommitURL *string `json:"commit_url,omitempty"` - - // The User object that generated the event. - Actor *User `json:"actor,omitempty"` - - // Event identifies the actual type of Event that occurred. Possible values - // are: - // - // assigned - // The issue was assigned to the assignee. - // - // closed - // The issue was closed by the actor. When the commit_id is present, it - // identifies the commit that closed the issue using "closes / fixes #NN" - // syntax. - // - // commented - // A comment was added to the issue. - // - // committed - // A commit was added to the pull request's 'HEAD' branch. Only provided - // for pull requests. - // - // cross-referenced - // The issue was referenced from another issue. The 'source' attribute - // contains the 'id', 'actor', and 'url' of the reference's source. - // - // demilestoned - // The issue was removed from a milestone. - // - // head_ref_deleted - // The pull request's branch was deleted. - // - // head_ref_restored - // The pull request's branch was restored. - // - // labeled - // A label was added to the issue. - // - // locked - // The issue was locked by the actor. - // - // mentioned - // The actor was @mentioned in an issue body. - // - // merged - // The issue was merged by the actor. The 'commit_id' attribute is the - // SHA1 of the HEAD commit that was merged. - // - // milestoned - // The issue was added to a milestone. - // - // referenced - // The issue was referenced from a commit message. The 'commit_id' - // attribute is the commit SHA1 of where that happened. - // - // renamed - // The issue title was changed. - // - // reopened - // The issue was reopened by the actor. - // - // subscribed - // The actor subscribed to receive notifications for an issue. - // - // unassigned - // The assignee was unassigned from the issue. - // - // unlabeled - // A label was removed from the issue. - // - // unlocked - // The issue was unlocked by the actor. - // - // unsubscribed - // The actor unsubscribed to stop receiving notifications for an issue. - // - Event *string `json:"event,omitempty"` - - // The string SHA of a commit that referenced this Issue or Pull Request. - CommitID *string `json:"commit_id,omitempty"` - // The timestamp indicating when the event occurred. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The Label object including `name` and `color` attributes. Only provided for - // 'labeled' and 'unlabeled' events. - Label *Label `json:"label,omitempty"` - // The User object which was assigned to (or unassigned from) this Issue or - // Pull Request. Only provided for 'assigned' and 'unassigned' events. - Assignee *User `json:"assignee,omitempty"` - // The Milestone object including a 'title' attribute. - // Only provided for 'milestoned' and 'demilestoned' events. - Milestone *Milestone `json:"milestone,omitempty"` - // The 'id', 'actor', and 'url' for the source of a reference from another issue. - // Only provided for 'cross-referenced' events. - Source *Source `json:"source,omitempty"` - // An object containing rename details including 'from' and 'to' attributes. - // Only provided for 'renamed' events. - Rename *Rename `json:"rename,omitempty"` - ProjectCard *ProjectCard `json:"project_card,omitempty"` -} - -// Source represents a reference's source. -type Source struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Actor *User `json:"actor,omitempty"` - Type *string `json:"type,omitempty"` - Issue *Issue `json:"issue,omitempty"` -} - -// ListIssueTimeline lists events for the specified issue. -// -// GitHub API docs: https://developer.github.com/v3/issues/timeline/#list-events-for-an-issue -func (s *IssuesService) ListIssueTimeline(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*Timeline, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%v/timeline", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeTimelinePreview, mediaTypeProjectCardDetailsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var events []*Timeline - resp, err := s.client.Do(ctx, req, &events) - return events, resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/licenses.go b/vendor/github.com/google/go-github/v30/github/licenses.go deleted file mode 100644 index 1176d3a8..00000000 --- a/vendor/github.com/google/go-github/v30/github/licenses.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// LicensesService handles communication with the license related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/licenses/ -type LicensesService service - -// RepositoryLicense represents the license for a repository. -type RepositoryLicense struct { - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - - SHA *string `json:"sha,omitempty"` - Size *int `json:"size,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - DownloadURL *string `json:"download_url,omitempty"` - Type *string `json:"type,omitempty"` - Content *string `json:"content,omitempty"` - Encoding *string `json:"encoding,omitempty"` - License *License `json:"license,omitempty"` -} - -func (l RepositoryLicense) String() string { - return Stringify(l) -} - -// License represents an open source license. -type License struct { - Key *string `json:"key,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - - SPDXID *string `json:"spdx_id,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Featured *bool `json:"featured,omitempty"` - Description *string `json:"description,omitempty"` - Implementation *string `json:"implementation,omitempty"` - Permissions *[]string `json:"permissions,omitempty"` - Conditions *[]string `json:"conditions,omitempty"` - Limitations *[]string `json:"limitations,omitempty"` - Body *string `json:"body,omitempty"` -} - -func (l License) String() string { - return Stringify(l) -} - -// List popular open source licenses. -// -// GitHub API docs: https://developer.github.com/v3/licenses/#list-all-licenses -func (s *LicensesService) List(ctx context.Context) ([]*License, *Response, error) { - req, err := s.client.NewRequest("GET", "licenses", nil) - if err != nil { - return nil, nil, err - } - - var licenses []*License - resp, err := s.client.Do(ctx, req, &licenses) - if err != nil { - return nil, resp, err - } - - return licenses, resp, nil -} - -// Get extended metadata for one license. -// -// GitHub API docs: https://developer.github.com/v3/licenses/#get-an-individual-license -func (s *LicensesService) Get(ctx context.Context, licenseName string) (*License, *Response, error) { - u := fmt.Sprintf("licenses/%s", licenseName) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - license := new(License) - resp, err := s.client.Do(ctx, req, license) - if err != nil { - return nil, resp, err - } - - return license, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/messages.go b/vendor/github.com/google/go-github/v30/github/messages.go deleted file mode 100644 index 759f9e81..00000000 --- a/vendor/github.com/google/go-github/v30/github/messages.go +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright 2016 The go-github 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 provides functions for validating payloads from GitHub Webhooks. -// GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github - -package github - -import ( - "crypto/hmac" - "crypto/sha1" - "crypto/sha256" - "crypto/sha512" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "hash" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -const ( - // sha1Prefix is the prefix used by GitHub before the HMAC hexdigest. - sha1Prefix = "sha1" - // sha256Prefix and sha512Prefix are provided for future compatibility. - sha256Prefix = "sha256" - sha512Prefix = "sha512" - // signatureHeader is the GitHub header key used to pass the HMAC hexdigest. - signatureHeader = "X-Hub-Signature" - // eventTypeHeader is the GitHub header key used to pass the event type. - eventTypeHeader = "X-Github-Event" - // deliveryIDHeader is the GitHub header key used to pass the unique ID for the webhook event. - deliveryIDHeader = "X-Github-Delivery" -) - -var ( - // eventTypeMapping maps webhooks types to their corresponding go-github struct types. - eventTypeMapping = map[string]string{ - "check_run": "CheckRunEvent", - "check_suite": "CheckSuiteEvent", - "commit_comment": "CommitCommentEvent", - "create": "CreateEvent", - "delete": "DeleteEvent", - "deploy_key": "DeployKeyEvent", - "deployment": "DeploymentEvent", - "deployment_status": "DeploymentStatusEvent", - "fork": "ForkEvent", - "gollum": "GollumEvent", - "installation": "InstallationEvent", - "installation_repositories": "InstallationRepositoriesEvent", - "issue_comment": "IssueCommentEvent", - "issues": "IssuesEvent", - "label": "LabelEvent", - "marketplace_purchase": "MarketplacePurchaseEvent", - "member": "MemberEvent", - "membership": "MembershipEvent", - "meta": "MetaEvent", - "milestone": "MilestoneEvent", - "organization": "OrganizationEvent", - "org_block": "OrgBlockEvent", - "page_build": "PageBuildEvent", - "ping": "PingEvent", - "project": "ProjectEvent", - "project_card": "ProjectCardEvent", - "project_column": "ProjectColumnEvent", - "public": "PublicEvent", - "pull_request_review": "PullRequestReviewEvent", - "pull_request_review_comment": "PullRequestReviewCommentEvent", - "pull_request": "PullRequestEvent", - "push": "PushEvent", - "repository": "RepositoryEvent", - "repository_dispatch": "RepositoryDispatchEvent", - "repository_vulnerability_alert": "RepositoryVulnerabilityAlertEvent", - "release": "ReleaseEvent", - "star": "StarEvent", - "status": "StatusEvent", - "team": "TeamEvent", - "team_add": "TeamAddEvent", - "user": "UserEvent", - "watch": "WatchEvent", - } -) - -// genMAC generates the HMAC signature for a message provided the secret key -// and hashFunc. -func genMAC(message, key []byte, hashFunc func() hash.Hash) []byte { - mac := hmac.New(hashFunc, key) - mac.Write(message) - return mac.Sum(nil) -} - -// checkMAC reports whether messageMAC is a valid HMAC tag for message. -func checkMAC(message, messageMAC, key []byte, hashFunc func() hash.Hash) bool { - expectedMAC := genMAC(message, key, hashFunc) - return hmac.Equal(messageMAC, expectedMAC) -} - -// messageMAC returns the hex-decoded HMAC tag from the signature and its -// corresponding hash function. -func messageMAC(signature string) ([]byte, func() hash.Hash, error) { - if signature == "" { - return nil, nil, errors.New("missing signature") - } - sigParts := strings.SplitN(signature, "=", 2) - if len(sigParts) != 2 { - return nil, nil, fmt.Errorf("error parsing signature %q", signature) - } - - var hashFunc func() hash.Hash - switch sigParts[0] { - case sha1Prefix: - hashFunc = sha1.New - case sha256Prefix: - hashFunc = sha256.New - case sha512Prefix: - hashFunc = sha512.New - default: - return nil, nil, fmt.Errorf("unknown hash type prefix: %q", sigParts[0]) - } - - buf, err := hex.DecodeString(sigParts[1]) - if err != nil { - return nil, nil, fmt.Errorf("error decoding signature %q: %v", signature, err) - } - return buf, hashFunc, nil -} - -// ValidatePayload validates an incoming GitHub Webhook event request -// and returns the (JSON) payload. -// The Content-Type header of the payload can be "application/json" or "application/x-www-form-urlencoded". -// If the Content-Type is neither then an error is returned. -// secretToken is the GitHub Webhook secret token. -// If your webhook does not contain a secret token, you can pass nil or an empty slice. -// This is intended for local development purposes only and all webhooks should ideally set up a secret token. -// -// Example usage: -// -// func (s *GitHubEventMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request) { -// payload, err := github.ValidatePayload(r, s.webhookSecretKey) -// if err != nil { ... } -// // Process payload... -// } -// -func ValidatePayload(r *http.Request, secretToken []byte) (payload []byte, err error) { - var body []byte // Raw body that GitHub uses to calculate the signature. - - switch ct := r.Header.Get("Content-Type"); ct { - case "application/json": - var err error - if body, err = ioutil.ReadAll(r.Body); err != nil { - return nil, err - } - - // If the content type is application/json, - // the JSON payload is just the original body. - payload = body - - case "application/x-www-form-urlencoded": - // payloadFormParam is the name of the form parameter that the JSON payload - // will be in if a webhook has its content type set to application/x-www-form-urlencoded. - const payloadFormParam = "payload" - - var err error - if body, err = ioutil.ReadAll(r.Body); err != nil { - return nil, err - } - - // If the content type is application/x-www-form-urlencoded, - // the JSON payload will be under the "payload" form param. - form, err := url.ParseQuery(string(body)) - if err != nil { - return nil, err - } - payload = []byte(form.Get(payloadFormParam)) - - default: - return nil, fmt.Errorf("Webhook request has unsupported Content-Type %q", ct) - } - - // Only validate the signature if a secret token exists. This is intended for - // local development only and all webhooks should ideally set up a secret token. - if len(secretToken) > 0 { - sig := r.Header.Get(signatureHeader) - if err := ValidateSignature(sig, body, secretToken); err != nil { - return nil, err - } - } - - return payload, nil -} - -// ValidateSignature validates the signature for the given payload. -// signature is the GitHub hash signature delivered in the X-Hub-Signature header. -// payload is the JSON payload sent by GitHub Webhooks. -// secretToken is the GitHub Webhook secret token. -// -// GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github -func ValidateSignature(signature string, payload, secretToken []byte) error { - messageMAC, hashFunc, err := messageMAC(signature) - if err != nil { - return err - } - if !checkMAC(payload, messageMAC, secretToken, hashFunc) { - return errors.New("payload signature check failed") - } - return nil -} - -// WebHookType returns the event type of webhook request r. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#webhook-headers -func WebHookType(r *http.Request) string { - return r.Header.Get(eventTypeHeader) -} - -// DeliveryID returns the unique delivery ID of webhook request r. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#webhook-headers -func DeliveryID(r *http.Request) string { - return r.Header.Get(deliveryIDHeader) -} - -// ParseWebHook parses the event payload. For recognized event types, a -// value of the corresponding struct type will be returned (as returned -// by Event.ParsePayload()). An error will be returned for unrecognized event -// types. -// -// Example usage: -// -// func (s *GitHubEventMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request) { -// payload, err := github.ValidatePayload(r, s.webhookSecretKey) -// if err != nil { ... } -// event, err := github.ParseWebHook(github.WebHookType(r), payload) -// if err != nil { ... } -// switch event := event.(type) { -// case *github.CommitCommentEvent: -// processCommitCommentEvent(event) -// case *github.CreateEvent: -// processCreateEvent(event) -// ... -// } -// } -// -func ParseWebHook(messageType string, payload []byte) (interface{}, error) { - eventType, ok := eventTypeMapping[messageType] - if !ok { - return nil, fmt.Errorf("unknown X-Github-Event in message: %v", messageType) - } - - event := Event{ - Type: &eventType, - RawPayload: (*json.RawMessage)(&payload), - } - return event.ParsePayload() -} diff --git a/vendor/github.com/google/go-github/v30/github/migrations.go b/vendor/github.com/google/go-github/v30/github/migrations.go deleted file mode 100644 index f4260bb7..00000000 --- a/vendor/github.com/google/go-github/v30/github/migrations.go +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "errors" - "fmt" - "net/http" - "strings" -) - -// MigrationService provides access to the migration related functions -// in the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/migration/ -type MigrationService service - -// Migration represents a GitHub migration (archival). -type Migration struct { - ID *int64 `json:"id,omitempty"` - GUID *string `json:"guid,omitempty"` - // State is the current state of a migration. - // Possible values are: - // "pending" which means the migration hasn't started yet, - // "exporting" which means the migration is in progress, - // "exported" which means the migration finished successfully, or - // "failed" which means the migration failed. - State *string `json:"state,omitempty"` - // LockRepositories indicates whether repositories are locked (to prevent - // manipulation) while migrating data. - LockRepositories *bool `json:"lock_repositories,omitempty"` - // ExcludeAttachments indicates whether attachments should be excluded from - // the migration (to reduce migration archive file size). - ExcludeAttachments *bool `json:"exclude_attachments,omitempty"` - URL *string `json:"url,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - Repositories []*Repository `json:"repositories,omitempty"` -} - -func (m Migration) String() string { - return Stringify(m) -} - -// MigrationOptions specifies the optional parameters to Migration methods. -type MigrationOptions struct { - // LockRepositories indicates whether repositories should be locked (to prevent - // manipulation) while migrating data. - LockRepositories bool - - // ExcludeAttachments indicates whether attachments should be excluded from - // the migration (to reduce migration archive file size). - ExcludeAttachments bool -} - -// startMigration represents the body of a StartMigration request. -type startMigration struct { - // Repositories is a slice of repository names to migrate. - Repositories []string `json:"repositories,omitempty"` - - // LockRepositories indicates whether repositories should be locked (to prevent - // manipulation) while migrating data. - LockRepositories *bool `json:"lock_repositories,omitempty"` - - // ExcludeAttachments indicates whether attachments should be excluded from - // the migration (to reduce migration archive file size). - ExcludeAttachments *bool `json:"exclude_attachments,omitempty"` -} - -// StartMigration starts the generation of a migration archive. -// repos is a slice of repository names to migrate. -// -// GitHub API docs: https://developer.github.com/v3/migration/migrations/#start-a-migration -func (s *MigrationService) StartMigration(ctx context.Context, org string, repos []string, opts *MigrationOptions) (*Migration, *Response, error) { - u := fmt.Sprintf("orgs/%v/migrations", org) - - body := &startMigration{Repositories: repos} - if opts != nil { - body.LockRepositories = Bool(opts.LockRepositories) - body.ExcludeAttachments = Bool(opts.ExcludeAttachments) - } - - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - m := &Migration{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// ListMigrations lists the most recent migrations. -// -// GitHub API docs: https://developer.github.com/v3/migrations/orgs/#get-a-list-of-organization-migrations -func (s *MigrationService) ListMigrations(ctx context.Context, org string, opts *ListOptions) ([]*Migration, *Response, error) { - u := fmt.Sprintf("orgs/%v/migrations", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - var m []*Migration - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// MigrationStatus gets the status of a specific migration archive. -// id is the migration ID. -// -// GitHub API docs: https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration -func (s *MigrationService) MigrationStatus(ctx context.Context, org string, id int64) (*Migration, *Response, error) { - u := fmt.Sprintf("orgs/%v/migrations/%v", org, id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - m := &Migration{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// MigrationArchiveURL fetches a migration archive URL. -// id is the migration ID. -// -// GitHub API docs: https://developer.github.com/v3/migration/migrations/#download-a-migration-archive -func (s *MigrationService) MigrationArchiveURL(ctx context.Context, org string, id int64) (url string, err error) { - u := fmt.Sprintf("orgs/%v/migrations/%v/archive", org, id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return "", err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - s.client.clientMu.Lock() - defer s.client.clientMu.Unlock() - - // Disable the redirect mechanism because AWS fails if the GitHub auth token is provided. - var loc string - saveRedirect := s.client.client.CheckRedirect - s.client.client.CheckRedirect = func(req *http.Request, via []*http.Request) error { - loc = req.URL.String() - return errors.New("disable redirect") - } - defer func() { s.client.client.CheckRedirect = saveRedirect }() - - _, err = s.client.Do(ctx, req, nil) // expect error from disable redirect - if err == nil { - return "", errors.New("expected redirect, none provided") - } - if !strings.Contains(err.Error(), "disable redirect") { - return "", err - } - return loc, nil -} - -// DeleteMigration deletes a previous migration archive. -// id is the migration ID. -// -// GitHub API docs: https://developer.github.com/v3/migration/migrations/#delete-a-migration-archive -func (s *MigrationService) DeleteMigration(ctx context.Context, org string, id int64) (*Response, error) { - u := fmt.Sprintf("orgs/%v/migrations/%v/archive", org, id) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - return s.client.Do(ctx, req, nil) -} - -// UnlockRepo unlocks a repository that was locked for migration. -// id is the migration ID. -// You should unlock each migrated repository and delete them when the migration -// is complete and you no longer need the source data. -// -// GitHub API docs: https://developer.github.com/v3/migration/migrations/#unlock-a-repository -func (s *MigrationService) UnlockRepo(ctx context.Context, org string, id int64, repo string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/migrations/%v/repos/%v/lock", org, id, repo) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/migrations_source_import.go b/vendor/github.com/google/go-github/v30/github/migrations_source_import.go deleted file mode 100644 index cbdf1ea8..00000000 --- a/vendor/github.com/google/go-github/v30/github/migrations_source_import.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Import represents a repository import request. -type Import struct { - // The URL of the originating repository. - VCSURL *string `json:"vcs_url,omitempty"` - // The originating VCS type. Can be one of 'subversion', 'git', - // 'mercurial', or 'tfvc'. Without this parameter, the import job will - // take additional time to detect the VCS type before beginning the - // import. This detection step will be reflected in the response. - VCS *string `json:"vcs,omitempty"` - // VCSUsername and VCSPassword are only used for StartImport calls that - // are importing a password-protected repository. - VCSUsername *string `json:"vcs_username,omitempty"` - VCSPassword *string `json:"vcs_password,omitempty"` - // For a tfvc import, the name of the project that is being imported. - TFVCProject *string `json:"tfvc_project,omitempty"` - - // LFS related fields that may be preset in the Import Progress response - - // Describes whether the import has been opted in or out of using Git - // LFS. The value can be 'opt_in', 'opt_out', or 'undecided' if no - // action has been taken. - UseLFS *string `json:"use_lfs,omitempty"` - // Describes whether files larger than 100MB were found during the - // importing step. - HasLargeFiles *bool `json:"has_large_files,omitempty"` - // The total size in gigabytes of files larger than 100MB found in the - // originating repository. - LargeFilesSize *int `json:"large_files_size,omitempty"` - // The total number of files larger than 100MB found in the originating - // repository. To see a list of these files, call LargeFiles. - LargeFilesCount *int `json:"large_files_count,omitempty"` - - // Identifies the current status of an import. An import that does not - // have errors will progress through these steps: - // - // detecting - the "detection" step of the import is in progress - // because the request did not include a VCS parameter. The - // import is identifying the type of source control present at - // the URL. - // importing - the "raw" step of the import is in progress. This is - // where commit data is fetched from the original repository. - // The import progress response will include CommitCount (the - // total number of raw commits that will be imported) and - // Percent (0 - 100, the current progress through the import). - // mapping - the "rewrite" step of the import is in progress. This - // is where SVN branches are converted to Git branches, and - // where author updates are applied. The import progress - // response does not include progress information. - // pushing - the "push" step of the import is in progress. This is - // where the importer updates the repository on GitHub. The - // import progress response will include PushPercent, which is - // the percent value reported by git push when it is "Writing - // objects". - // complete - the import is complete, and the repository is ready - // on GitHub. - // - // If there are problems, you will see one of these in the status field: - // - // auth_failed - the import requires authentication in order to - // connect to the original repository. Make an UpdateImport - // request, and include VCSUsername and VCSPassword. - // error - the import encountered an error. The import progress - // response will include the FailedStep and an error message. - // Contact GitHub support for more information. - // detection_needs_auth - the importer requires authentication for - // the originating repository to continue detection. Make an - // UpdatImport request, and include VCSUsername and - // VCSPassword. - // detection_found_nothing - the importer didn't recognize any - // source control at the URL. - // detection_found_multiple - the importer found several projects - // or repositories at the provided URL. When this is the case, - // the Import Progress response will also include a - // ProjectChoices field with the possible project choices as - // values. Make an UpdateImport request, and include VCS and - // (if applicable) TFVCProject. - Status *string `json:"status,omitempty"` - CommitCount *int `json:"commit_count,omitempty"` - StatusText *string `json:"status_text,omitempty"` - AuthorsCount *int `json:"authors_count,omitempty"` - Percent *int `json:"percent,omitempty"` - PushPercent *int `json:"push_percent,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - AuthorsURL *string `json:"authors_url,omitempty"` - RepositoryURL *string `json:"repository_url,omitempty"` - Message *string `json:"message,omitempty"` - FailedStep *string `json:"failed_step,omitempty"` - - // Human readable display name, provided when the Import appears as - // part of ProjectChoices. - HumanName *string `json:"human_name,omitempty"` - - // When the importer finds several projects or repositories at the - // provided URLs, this will identify the available choices. Call - // UpdateImport with the selected Import value. - ProjectChoices []*Import `json:"project_choices,omitempty"` -} - -func (i Import) String() string { - return Stringify(i) -} - -// SourceImportAuthor identifies an author imported from a source repository. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#get-commit-authors -type SourceImportAuthor struct { - ID *int64 `json:"id,omitempty"` - RemoteID *string `json:"remote_id,omitempty"` - RemoteName *string `json:"remote_name,omitempty"` - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - ImportURL *string `json:"import_url,omitempty"` -} - -func (a SourceImportAuthor) String() string { - return Stringify(a) -} - -// LargeFile identifies a file larger than 100MB found during a repository import. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#get-large-files -type LargeFile struct { - RefName *string `json:"ref_name,omitempty"` - Path *string `json:"path,omitempty"` - OID *string `json:"oid,omitempty"` - Size *int `json:"size,omitempty"` -} - -func (f LargeFile) String() string { - return Stringify(f) -} - -// StartImport initiates a repository import. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#start-an-import -func (s *MigrationService) StartImport(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import", owner, repo) - req, err := s.client.NewRequest("PUT", u, in) - if err != nil { - return nil, nil, err - } - - out := new(Import) - resp, err := s.client.Do(ctx, req, out) - if err != nil { - return nil, resp, err - } - - return out, resp, nil -} - -// ImportProgress queries for the status and progress of an ongoing repository import. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#get-import-progress -func (s *MigrationService) ImportProgress(ctx context.Context, owner, repo string) (*Import, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - out := new(Import) - resp, err := s.client.Do(ctx, req, out) - if err != nil { - return nil, resp, err - } - - return out, resp, nil -} - -// UpdateImport initiates a repository import. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#update-existing-import -func (s *MigrationService) UpdateImport(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import", owner, repo) - req, err := s.client.NewRequest("PATCH", u, in) - if err != nil { - return nil, nil, err - } - - out := new(Import) - resp, err := s.client.Do(ctx, req, out) - if err != nil { - return nil, resp, err - } - - return out, resp, nil -} - -// CommitAuthors gets the authors mapped from the original repository. -// -// Each type of source control system represents authors in a different way. -// For example, a Git commit author has a display name and an email address, -// but a Subversion commit author just has a username. The GitHub Importer will -// make the author information valid, but the author might not be correct. For -// example, it will change the bare Subversion username "hubot" into something -// like "hubot ". -// -// This method and MapCommitAuthor allow you to provide correct Git author -// information. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#get-commit-authors -func (s *MigrationService) CommitAuthors(ctx context.Context, owner, repo string) ([]*SourceImportAuthor, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import/authors", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var authors []*SourceImportAuthor - resp, err := s.client.Do(ctx, req, &authors) - if err != nil { - return nil, resp, err - } - - return authors, resp, nil -} - -// MapCommitAuthor updates an author's identity for the import. Your -// application can continue updating authors any time before you push new -// commits to the repository. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#map-a-commit-author -func (s *MigrationService) MapCommitAuthor(ctx context.Context, owner, repo string, id int64, author *SourceImportAuthor) (*SourceImportAuthor, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import/authors/%v", owner, repo, id) - req, err := s.client.NewRequest("PATCH", u, author) - if err != nil { - return nil, nil, err - } - - out := new(SourceImportAuthor) - resp, err := s.client.Do(ctx, req, out) - if err != nil { - return nil, resp, err - } - - return out, resp, nil -} - -// SetLFSPreference sets whether imported repositories should use Git LFS for -// files larger than 100MB. Only the UseLFS field on the provided Import is -// used. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#set-git-lfs-preference -func (s *MigrationService) SetLFSPreference(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import/lfs", owner, repo) - req, err := s.client.NewRequest("PATCH", u, in) - if err != nil { - return nil, nil, err - } - - out := new(Import) - resp, err := s.client.Do(ctx, req, out) - if err != nil { - return nil, resp, err - } - - return out, resp, nil -} - -// LargeFiles lists files larger than 100MB found during the import. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#get-large-files -func (s *MigrationService) LargeFiles(ctx context.Context, owner, repo string) ([]*LargeFile, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/import/large_files", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var files []*LargeFile - resp, err := s.client.Do(ctx, req, &files) - if err != nil { - return nil, resp, err - } - - return files, resp, nil -} - -// CancelImport stops an import for a repository. -// -// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#cancel-an-import -func (s *MigrationService) CancelImport(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/import", owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/migrations_user.go b/vendor/github.com/google/go-github/v30/github/migrations_user.go deleted file mode 100644 index 5b58d293..00000000 --- a/vendor/github.com/google/go-github/v30/github/migrations_user.go +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "errors" - "fmt" - "net/http" -) - -// UserMigration represents a GitHub migration (archival). -type UserMigration struct { - ID *int64 `json:"id,omitempty"` - GUID *string `json:"guid,omitempty"` - // State is the current state of a migration. - // Possible values are: - // "pending" which means the migration hasn't started yet, - // "exporting" which means the migration is in progress, - // "exported" which means the migration finished successfully, or - // "failed" which means the migration failed. - State *string `json:"state,omitempty"` - // LockRepositories indicates whether repositories are locked (to prevent - // manipulation) while migrating data. - LockRepositories *bool `json:"lock_repositories,omitempty"` - // ExcludeAttachments indicates whether attachments should be excluded from - // the migration (to reduce migration archive file size). - ExcludeAttachments *bool `json:"exclude_attachments,omitempty"` - URL *string `json:"url,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - Repositories []*Repository `json:"repositories,omitempty"` -} - -func (m UserMigration) String() string { - return Stringify(m) -} - -// UserMigrationOptions specifies the optional parameters to Migration methods. -type UserMigrationOptions struct { - // LockRepositories indicates whether repositories should be locked (to prevent - // manipulation) while migrating data. - LockRepositories bool - - // ExcludeAttachments indicates whether attachments should be excluded from - // the migration (to reduce migration archive file size). - ExcludeAttachments bool -} - -// startUserMigration represents the body of a StartMigration request. -type startUserMigration struct { - // Repositories is a slice of repository names to migrate. - Repositories []string `json:"repositories,omitempty"` - - // LockRepositories indicates whether repositories should be locked (to prevent - // manipulation) while migrating data. - LockRepositories *bool `json:"lock_repositories,omitempty"` - - // ExcludeAttachments indicates whether attachments should be excluded from - // the migration (to reduce migration archive file size). - ExcludeAttachments *bool `json:"exclude_attachments,omitempty"` -} - -// StartUserMigration starts the generation of a migration archive. -// repos is a slice of repository names to migrate. -// -// GitHub API docs: https://developer.github.com/v3/migrations/users/#start-a-user-migration -func (s *MigrationService) StartUserMigration(ctx context.Context, repos []string, opts *UserMigrationOptions) (*UserMigration, *Response, error) { - u := "user/migrations" - - body := &startUserMigration{Repositories: repos} - if opts != nil { - body.LockRepositories = Bool(opts.LockRepositories) - body.ExcludeAttachments = Bool(opts.ExcludeAttachments) - } - - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - m := &UserMigration{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// ListUserMigrations lists the most recent migrations. -// -// GitHub API docs: https://developer.github.com/v3/migrations/users/#get-a-list-of-user-migrations -func (s *MigrationService) ListUserMigrations(ctx context.Context) ([]*UserMigration, *Response, error) { - u := "user/migrations" - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - var m []*UserMigration - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// UserMigrationStatus gets the status of a specific migration archive. -// id is the migration ID. -// -// GitHub API docs: https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration -func (s *MigrationService) UserMigrationStatus(ctx context.Context, id int64) (*UserMigration, *Response, error) { - u := fmt.Sprintf("user/migrations/%v", id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - m := &UserMigration{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// UserMigrationArchiveURL gets the URL for a specific migration archive. -// id is the migration ID. -// -// GitHub API docs: https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive -func (s *MigrationService) UserMigrationArchiveURL(ctx context.Context, id int64) (string, error) { - url := fmt.Sprintf("user/migrations/%v/archive", id) - - req, err := s.client.NewRequest("GET", url, nil) - if err != nil { - return "", err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - m := &UserMigration{} - - var loc string - originalRedirect := s.client.client.CheckRedirect - s.client.client.CheckRedirect = func(req *http.Request, via []*http.Request) error { - loc = req.URL.String() - return http.ErrUseLastResponse - } - defer func() { - s.client.client.CheckRedirect = originalRedirect - }() - resp, err := s.client.Do(ctx, req, m) - if err == nil { - return "", errors.New("expected redirect, none provided") - } - loc = resp.Header.Get("Location") - return loc, nil -} - -// DeleteUserMigration will delete a previous migration archive. -// id is the migration ID. -// -// GitHub API docs: https://developer.github.com/v3/migrations/users/#delete-a-user-migration-archive -func (s *MigrationService) DeleteUserMigration(ctx context.Context, id int64) (*Response, error) { - url := fmt.Sprintf("user/migrations/%v/archive", id) - - req, err := s.client.NewRequest("DELETE", url, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - return s.client.Do(ctx, req, nil) -} - -// UnlockUserRepo will unlock a repo that was locked for migration. -// id is migration ID. -// You should unlock each migrated repository and delete them when the migration -// is complete and you no longer need the source data. -// -// GitHub API docs: https://developer.github.com/v3/migrations/users/#unlock-a-user-repository -func (s *MigrationService) UnlockUserRepo(ctx context.Context, id int64, repo string) (*Response, error) { - url := fmt.Sprintf("user/migrations/%v/repos/%v/lock", id, repo) - - req, err := s.client.NewRequest("DELETE", url, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMigrationsPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/misc.go b/vendor/github.com/google/go-github/v30/github/misc.go deleted file mode 100644 index 139a0dc6..00000000 --- a/vendor/github.com/google/go-github/v30/github/misc.go +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "bytes" - "context" - "fmt" - "net/url" -) - -// MarkdownOptions specifies optional parameters to the Markdown method. -type MarkdownOptions struct { - // Mode identifies the rendering mode. Possible values are: - // markdown - render a document as plain Markdown, just like - // README files are rendered. - // - // gfm - to render a document as user-content, e.g. like user - // comments or issues are rendered. In GFM mode, hard line breaks are - // always taken into account, and issue and user mentions are linked - // accordingly. - // - // Default is "markdown". - Mode string - - // Context identifies the repository context. Only taken into account - // when rendering as "gfm". - Context string -} - -type markdownRequest struct { - Text *string `json:"text,omitempty"` - Mode *string `json:"mode,omitempty"` - Context *string `json:"context,omitempty"` -} - -// Markdown renders an arbitrary Markdown document. -// -// GitHub API docs: https://developer.github.com/v3/markdown/ -func (c *Client) Markdown(ctx context.Context, text string, opts *MarkdownOptions) (string, *Response, error) { - request := &markdownRequest{Text: String(text)} - if opts != nil { - if opts.Mode != "" { - request.Mode = String(opts.Mode) - } - if opts.Context != "" { - request.Context = String(opts.Context) - } - } - - req, err := c.NewRequest("POST", "markdown", request) - if err != nil { - return "", nil, err - } - - buf := new(bytes.Buffer) - resp, err := c.Do(ctx, req, buf) - if err != nil { - return "", resp, err - } - - return buf.String(), resp, nil -} - -// ListEmojis returns the emojis available to use on GitHub. -// -// GitHub API docs: https://developer.github.com/v3/emojis/ -func (c *Client) ListEmojis(ctx context.Context) (map[string]string, *Response, error) { - req, err := c.NewRequest("GET", "emojis", nil) - if err != nil { - return nil, nil, err - } - - var emoji map[string]string - resp, err := c.Do(ctx, req, &emoji) - if err != nil { - return nil, resp, err - } - - return emoji, resp, nil -} - -// CodeOfConduct represents a code of conduct. -type CodeOfConduct struct { - Name *string `json:"name,omitempty"` - Key *string `json:"key,omitempty"` - URL *string `json:"url,omitempty"` - Body *string `json:"body,omitempty"` -} - -func (c *CodeOfConduct) String() string { - return Stringify(c) -} - -// ListCodesOfConduct returns all codes of conduct. -// -// GitHub API docs: https://developer.github.com/v3/codes_of_conduct/#list-all-codes-of-conduct -func (c *Client) ListCodesOfConduct(ctx context.Context) ([]*CodeOfConduct, *Response, error) { - req, err := c.NewRequest("GET", "codes_of_conduct", nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeCodesOfConductPreview) - - var cs []*CodeOfConduct - resp, err := c.Do(ctx, req, &cs) - if err != nil { - return nil, resp, err - } - - return cs, resp, nil -} - -// GetCodeOfConduct returns an individual code of conduct. -// -// https://developer.github.com/v3/codes_of_conduct/#get-an-individual-code-of-conduct -func (c *Client) GetCodeOfConduct(ctx context.Context, key string) (*CodeOfConduct, *Response, error) { - u := fmt.Sprintf("codes_of_conduct/%s", key) - req, err := c.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeCodesOfConductPreview) - - coc := new(CodeOfConduct) - resp, err := c.Do(ctx, req, coc) - if err != nil { - return nil, resp, err - } - - return coc, resp, nil -} - -// APIMeta represents metadata about the GitHub API. -type APIMeta struct { - // An Array of IP addresses in CIDR format specifying the addresses - // that incoming service hooks will originate from on GitHub.com. - Hooks []string `json:"hooks,omitempty"` - - // An Array of IP addresses in CIDR format specifying the Git servers - // for GitHub.com. - Git []string `json:"git,omitempty"` - - // Whether authentication with username and password is supported. - // (GitHub Enterprise instances using CAS or OAuth for authentication - // will return false. Features like Basic Authentication with a - // username and password, sudo mode, and two-factor authentication are - // not supported on these servers.) - VerifiablePasswordAuthentication *bool `json:"verifiable_password_authentication,omitempty"` - - // An array of IP addresses in CIDR format specifying the addresses - // which serve GitHub Pages websites. - Pages []string `json:"pages,omitempty"` - - // An Array of IP addresses specifying the addresses that source imports - // will originate from on GitHub.com. - Importer []string `json:"importer,omitempty"` -} - -// APIMeta returns information about GitHub.com, the service. Or, if you access -// this endpoint on your organization’s GitHub Enterprise installation, this -// endpoint provides information about that installation. -// -// GitHub API docs: https://developer.github.com/v3/meta/ -func (c *Client) APIMeta(ctx context.Context) (*APIMeta, *Response, error) { - req, err := c.NewRequest("GET", "meta", nil) - if err != nil { - return nil, nil, err - } - - meta := new(APIMeta) - resp, err := c.Do(ctx, req, meta) - if err != nil { - return nil, resp, err - } - - return meta, resp, nil -} - -// Octocat returns an ASCII art octocat with the specified message in a speech -// bubble. If message is empty, a random zen phrase is used. -func (c *Client) Octocat(ctx context.Context, message string) (string, *Response, error) { - u := "octocat" - if message != "" { - u = fmt.Sprintf("%s?s=%s", u, url.QueryEscape(message)) - } - - req, err := c.NewRequest("GET", u, nil) - if err != nil { - return "", nil, err - } - - buf := new(bytes.Buffer) - resp, err := c.Do(ctx, req, buf) - if err != nil { - return "", resp, err - } - - return buf.String(), resp, nil -} - -// Zen returns a random line from The Zen of GitHub. -// -// see also: http://warpspire.com/posts/taste/ -func (c *Client) Zen(ctx context.Context) (string, *Response, error) { - req, err := c.NewRequest("GET", "zen", nil) - if err != nil { - return "", nil, err - } - - buf := new(bytes.Buffer) - resp, err := c.Do(ctx, req, buf) - if err != nil { - return "", resp, err - } - - return buf.String(), resp, nil -} - -// ServiceHook represents a hook that has configuration settings, a list of -// available events, and default events. -type ServiceHook struct { - Name *string `json:"name,omitempty"` - Events []string `json:"events,omitempty"` - SupportedEvents []string `json:"supported_events,omitempty"` - Schema [][]string `json:"schema,omitempty"` -} - -func (s *ServiceHook) String() string { - return Stringify(s) -} - -// ListServiceHooks lists all of the available service hooks. -// -// GitHub API docs: https://developer.github.com/webhooks/#services -func (c *Client) ListServiceHooks(ctx context.Context) ([]*ServiceHook, *Response, error) { - u := "hooks" - req, err := c.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var hooks []*ServiceHook - resp, err := c.Do(ctx, req, &hooks) - if err != nil { - return nil, resp, err - } - - return hooks, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/orgs.go b/vendor/github.com/google/go-github/v30/github/orgs.go deleted file mode 100644 index 3c87ec84..00000000 --- a/vendor/github.com/google/go-github/v30/github/orgs.go +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// OrganizationsService provides access to the organization related functions -// in the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/orgs/ -type OrganizationsService service - -// Organization represents a GitHub organization account. -type Organization struct { - Login *string `json:"login,omitempty"` - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Name *string `json:"name,omitempty"` - Company *string `json:"company,omitempty"` - Blog *string `json:"blog,omitempty"` - Location *string `json:"location,omitempty"` - Email *string `json:"email,omitempty"` - Description *string `json:"description,omitempty"` - PublicRepos *int `json:"public_repos,omitempty"` - PublicGists *int `json:"public_gists,omitempty"` - Followers *int `json:"followers,omitempty"` - Following *int `json:"following,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - TotalPrivateRepos *int `json:"total_private_repos,omitempty"` - OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` - PrivateGists *int `json:"private_gists,omitempty"` - DiskUsage *int `json:"disk_usage,omitempty"` - Collaborators *int `json:"collaborators,omitempty"` - BillingEmail *string `json:"billing_email,omitempty"` - Type *string `json:"type,omitempty"` - Plan *Plan `json:"plan,omitempty"` - TwoFactorRequirementEnabled *bool `json:"two_factor_requirement_enabled,omitempty"` - - // DefaultRepoPermission can be one of: "read", "write", "admin", or "none". (Default: "read"). - // It is only used in OrganizationsService.Edit. - DefaultRepoPermission *string `json:"default_repository_permission,omitempty"` - // DefaultRepoSettings can be one of: "read", "write", "admin", or "none". (Default: "read"). - // It is only used in OrganizationsService.Get. - DefaultRepoSettings *string `json:"default_repository_settings,omitempty"` - - // MembersCanCreateRepos default value is true and is only used in Organizations.Edit. - MembersCanCreateRepos *bool `json:"members_can_create_repositories,omitempty"` - - // https://developer.github.com/changes/2019-12-03-internal-visibility-changes/#rest-v3-api - MembersCanCreatePublicRepos *bool `json:"members_can_create_public_repositories,omitempty"` - MembersCanCreatePrivateRepos *bool `json:"members_can_create_private_repositories,omitempty"` - MembersCanCreateInternalRepos *bool `json:"members_can_create_internal_repositories,omitempty"` - - // MembersAllowedRepositoryCreationType denotes if organization members can create repositories - // and the type of repositories they can create. Possible values are: "all", "private", or "none". - // - // Deprecated: Use MembersCanCreatePublicRepos, MembersCanCreatePrivateRepos, MembersCanCreateInternalRepos - // instead. The new fields overrides the existing MembersAllowedRepositoryCreationType during 'edit' - // operation and does not consider 'internal' repositories during 'get' operation - MembersAllowedRepositoryCreationType *string `json:"members_allowed_repository_creation_type,omitempty"` - - // API URLs - URL *string `json:"url,omitempty"` - EventsURL *string `json:"events_url,omitempty"` - HooksURL *string `json:"hooks_url,omitempty"` - IssuesURL *string `json:"issues_url,omitempty"` - MembersURL *string `json:"members_url,omitempty"` - PublicMembersURL *string `json:"public_members_url,omitempty"` - ReposURL *string `json:"repos_url,omitempty"` -} - -// OrganizationInstallations represents GitHub app installations for an organization. -type OrganizationInstallations struct { - TotalCount *int `json:"total_count,omitempty"` - Installations []*Installation `json:"installations,omitempty"` -} - -func (o Organization) String() string { - return Stringify(o) -} - -// Plan represents the payment plan for an account. See plans at https://github.com/plans. -type Plan struct { - Name *string `json:"name,omitempty"` - Space *int `json:"space,omitempty"` - Collaborators *int `json:"collaborators,omitempty"` - PrivateRepos *int `json:"private_repos,omitempty"` - FilledSeats *int `json:"filled_seats,omitempty"` - Seats *int `json:"seats,omitempty"` -} - -func (p Plan) String() string { - return Stringify(p) -} - -// OrganizationsListOptions specifies the optional parameters to the -// OrganizationsService.ListAll method. -type OrganizationsListOptions struct { - // Since filters Organizations by ID. - Since int64 `url:"since,omitempty"` - - // Note: Pagination is powered exclusively by the Since parameter, - // ListOptions.Page has no effect. - // ListOptions.PerPage controls an undocumented GitHub API parameter. - ListOptions -} - -// ListAll lists all organizations, in the order that they were created on GitHub. -// -// Note: Pagination is powered exclusively by the since parameter. To continue -// listing the next set of organizations, use the ID of the last-returned organization -// as the opts.Since parameter for the next call. -// -// GitHub API docs: https://developer.github.com/v3/orgs/#list-all-organizations -func (s *OrganizationsService) ListAll(ctx context.Context, opts *OrganizationsListOptions) ([]*Organization, *Response, error) { - u, err := addOptions("organizations", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - orgs := []*Organization{} - resp, err := s.client.Do(ctx, req, &orgs) - if err != nil { - return nil, resp, err - } - return orgs, resp, nil -} - -// List the organizations for a user. Passing the empty string will list -// organizations for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/orgs/#list-user-organizations -func (s *OrganizationsService) List(ctx context.Context, user string, opts *ListOptions) ([]*Organization, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/orgs", user) - } else { - u = "user/orgs" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var orgs []*Organization - resp, err := s.client.Do(ctx, req, &orgs) - if err != nil { - return nil, resp, err - } - - return orgs, resp, nil -} - -// Get fetches an organization by name. -// -// GitHub API docs: https://developer.github.com/v3/orgs/#get-an-organization -func (s *OrganizationsService) Get(ctx context.Context, org string) (*Organization, *Response, error) { - u := fmt.Sprintf("orgs/%v", org) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMemberAllowedRepoCreationTypePreview) - - organization := new(Organization) - resp, err := s.client.Do(ctx, req, organization) - if err != nil { - return nil, resp, err - } - - return organization, resp, nil -} - -// GetByID fetches an organization. -// -// Note: GetByID uses the undocumented GitHub API endpoint /organizations/:id. -func (s *OrganizationsService) GetByID(ctx context.Context, id int64) (*Organization, *Response, error) { - u := fmt.Sprintf("organizations/%d", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - organization := new(Organization) - resp, err := s.client.Do(ctx, req, organization) - if err != nil { - return nil, resp, err - } - - return organization, resp, nil -} - -// Edit an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/#edit-an-organization -func (s *OrganizationsService) Edit(ctx context.Context, name string, org *Organization) (*Organization, *Response, error) { - u := fmt.Sprintf("orgs/%v", name) - req, err := s.client.NewRequest("PATCH", u, org) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeMemberAllowedRepoCreationTypePreview) - - o := new(Organization) - resp, err := s.client.Do(ctx, req, o) - if err != nil { - return nil, resp, err - } - - return o, resp, nil -} - -// ListInstallations lists installations for an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/#list-installations-for-an-organization -func (s *OrganizationsService) ListInstallations(ctx context.Context, org string, opts *ListOptions) (*OrganizationInstallations, *Response, error) { - u := fmt.Sprintf("orgs/%v/installations", org) - - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - result := new(OrganizationInstallations) - resp, err := s.client.Do(ctx, req, result) - if err != nil { - return nil, resp, err - } - - return result, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/orgs_hooks.go b/vendor/github.com/google/go-github/v30/github/orgs_hooks.go deleted file mode 100644 index 0913fb83..00000000 --- a/vendor/github.com/google/go-github/v30/github/orgs_hooks.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2015 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListHooks lists all Hooks for the specified organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/hooks/#list-hooks -func (s *OrganizationsService) ListHooks(ctx context.Context, org string, opts *ListOptions) ([]*Hook, *Response, error) { - u := fmt.Sprintf("orgs/%v/hooks", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var hooks []*Hook - resp, err := s.client.Do(ctx, req, &hooks) - if err != nil { - return nil, resp, err - } - - return hooks, resp, nil -} - -// GetHook returns a single specified Hook. -// -// GitHub API docs: https://developer.github.com/v3/orgs/hooks/#get-single-hook -func (s *OrganizationsService) GetHook(ctx context.Context, org string, id int64) (*Hook, *Response, error) { - u := fmt.Sprintf("orgs/%v/hooks/%d", org, id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - hook := new(Hook) - resp, err := s.client.Do(ctx, req, hook) - return hook, resp, err -} - -// CreateHook creates a Hook for the specified org. -// Config is a required field. -// -// Note that only a subset of the hook fields are used and hook must -// not be nil. -// -// GitHub API docs: https://developer.github.com/v3/orgs/hooks/#create-a-hook -func (s *OrganizationsService) CreateHook(ctx context.Context, org string, hook *Hook) (*Hook, *Response, error) { - u := fmt.Sprintf("orgs/%v/hooks", org) - - hookReq := &createHookRequest{ - Name: "web", - Events: hook.Events, - Active: hook.Active, - Config: hook.Config, - } - - req, err := s.client.NewRequest("POST", u, hookReq) - if err != nil { - return nil, nil, err - } - - h := new(Hook) - resp, err := s.client.Do(ctx, req, h) - if err != nil { - return nil, resp, err - } - - return h, resp, nil -} - -// EditHook updates a specified Hook. -// -// GitHub API docs: https://developer.github.com/v3/orgs/hooks/#edit-a-hook -func (s *OrganizationsService) EditHook(ctx context.Context, org string, id int64, hook *Hook) (*Hook, *Response, error) { - u := fmt.Sprintf("orgs/%v/hooks/%d", org, id) - req, err := s.client.NewRequest("PATCH", u, hook) - if err != nil { - return nil, nil, err - } - h := new(Hook) - resp, err := s.client.Do(ctx, req, h) - return h, resp, err -} - -// PingHook triggers a 'ping' event to be sent to the Hook. -// -// GitHub API docs: https://developer.github.com/v3/orgs/hooks/#ping-a-hook -func (s *OrganizationsService) PingHook(ctx context.Context, org string, id int64) (*Response, error) { - u := fmt.Sprintf("orgs/%v/hooks/%d/pings", org, id) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// DeleteHook deletes a specified Hook. -// -// GitHub API docs: https://developer.github.com/v3/orgs/hooks/#delete-a-hook -func (s *OrganizationsService) DeleteHook(ctx context.Context, org string, id int64) (*Response, error) { - u := fmt.Sprintf("orgs/%v/hooks/%d", org, id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/orgs_members.go b/vendor/github.com/google/go-github/v30/github/orgs_members.go deleted file mode 100644 index 6b96d05f..00000000 --- a/vendor/github.com/google/go-github/v30/github/orgs_members.go +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Membership represents the status of a user's membership in an organization or team. -type Membership struct { - URL *string `json:"url,omitempty"` - - // State is the user's status within the organization or team. - // Possible values are: "active", "pending" - State *string `json:"state,omitempty"` - - // Role identifies the user's role within the organization or team. - // Possible values for organization membership: - // member - non-owner organization member - // admin - organization owner - // - // Possible values for team membership are: - // member - a normal member of the team - // maintainer - a team maintainer. Able to add/remove other team - // members, promote other team members to team - // maintainer, and edit the team’s name and description - Role *string `json:"role,omitempty"` - - // For organization membership, the API URL of the organization. - OrganizationURL *string `json:"organization_url,omitempty"` - - // For organization membership, the organization the membership is for. - Organization *Organization `json:"organization,omitempty"` - - // For organization membership, the user the membership is for. - User *User `json:"user,omitempty"` -} - -func (m Membership) String() string { - return Stringify(m) -} - -// ListMembersOptions specifies optional parameters to the -// OrganizationsService.ListMembers method. -type ListMembersOptions struct { - // If true (or if the authenticated user is not an owner of the - // organization), list only publicly visible members. - PublicOnly bool `url:"-"` - - // Filter members returned in the list. Possible values are: - // 2fa_disabled, all. Default is "all". - Filter string `url:"filter,omitempty"` - - // Role filters members returned by their role in the organization. - // Possible values are: - // all - all members of the organization, regardless of role - // admin - organization owners - // member - non-owner organization members - // - // Default is "all". - Role string `url:"role,omitempty"` - - ListOptions -} - -// ListMembers lists the members for an organization. If the authenticated -// user is an owner of the organization, this will return both concealed and -// public members, otherwise it will only return public members. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#members-list -func (s *OrganizationsService) ListMembers(ctx context.Context, org string, opts *ListMembersOptions) ([]*User, *Response, error) { - var u string - if opts != nil && opts.PublicOnly { - u = fmt.Sprintf("orgs/%v/public_members", org) - } else { - u = fmt.Sprintf("orgs/%v/members", org) - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var members []*User - resp, err := s.client.Do(ctx, req, &members) - if err != nil { - return nil, resp, err - } - - return members, resp, nil -} - -// IsMember checks if a user is a member of an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#check-membership -func (s *OrganizationsService) IsMember(ctx context.Context, org, user string) (bool, *Response, error) { - u := fmt.Sprintf("orgs/%v/members/%v", org, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - member, err := parseBoolResponse(err) - return member, resp, err -} - -// IsPublicMember checks if a user is a public member of an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#check-public-membership -func (s *OrganizationsService) IsPublicMember(ctx context.Context, org, user string) (bool, *Response, error) { - u := fmt.Sprintf("orgs/%v/public_members/%v", org, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - member, err := parseBoolResponse(err) - return member, resp, err -} - -// RemoveMember removes a user from all teams of an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#remove-a-member -func (s *OrganizationsService) RemoveMember(ctx context.Context, org, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/members/%v", org, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// PublicizeMembership publicizes a user's membership in an organization. (A -// user cannot publicize the membership for another user.) -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#publicize-a-users-membership -func (s *OrganizationsService) PublicizeMembership(ctx context.Context, org, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/public_members/%v", org, user) - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ConcealMembership conceals a user's membership in an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#conceal-a-users-membership -func (s *OrganizationsService) ConcealMembership(ctx context.Context, org, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/public_members/%v", org, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListOrgMembershipsOptions specifies optional parameters to the -// OrganizationsService.ListOrgMemberships method. -type ListOrgMembershipsOptions struct { - // Filter memberships to include only those with the specified state. - // Possible values are: "active", "pending". - State string `url:"state,omitempty"` - - ListOptions -} - -// ListOrgMemberships lists the organization memberships for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#list-your-organization-memberships -func (s *OrganizationsService) ListOrgMemberships(ctx context.Context, opts *ListOrgMembershipsOptions) ([]*Membership, *Response, error) { - u := "user/memberships/orgs" - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var memberships []*Membership - resp, err := s.client.Do(ctx, req, &memberships) - if err != nil { - return nil, resp, err - } - - return memberships, resp, nil -} - -// GetOrgMembership gets the membership for a user in a specified organization. -// Passing an empty string for user will get the membership for the -// authenticated user. -// -// GitHub API docs: -// https://developer.github.com/v3/orgs/members/#get-organization-membership -// https://developer.github.com/v3/orgs/members/#get-your-organization-membership -func (s *OrganizationsService) GetOrgMembership(ctx context.Context, user, org string) (*Membership, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("orgs/%v/memberships/%v", org, user) - } else { - u = fmt.Sprintf("user/memberships/orgs/%v", org) - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - membership := new(Membership) - resp, err := s.client.Do(ctx, req, membership) - if err != nil { - return nil, resp, err - } - - return membership, resp, nil -} - -// EditOrgMembership edits the membership for user in specified organization. -// Passing an empty string for user will edit the membership for the -// authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership -// GitHub API docs: https://developer.github.com/v3/orgs/members/#edit-your-organization-membership -func (s *OrganizationsService) EditOrgMembership(ctx context.Context, user, org string, membership *Membership) (*Membership, *Response, error) { - var u, method string - if user != "" { - u = fmt.Sprintf("orgs/%v/memberships/%v", org, user) - method = "PUT" - } else { - u = fmt.Sprintf("user/memberships/orgs/%v", org) - method = "PATCH" - } - - req, err := s.client.NewRequest(method, u, membership) - if err != nil { - return nil, nil, err - } - - m := new(Membership) - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// RemoveOrgMembership removes user from the specified organization. If the -// user has been invited to the organization, this will cancel their invitation. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#remove-organization-membership -func (s *OrganizationsService) RemoveOrgMembership(ctx context.Context, user, org string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/memberships/%v", org, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListPendingOrgInvitations returns a list of pending invitations. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#list-pending-organization-invitations -func (s *OrganizationsService) ListPendingOrgInvitations(ctx context.Context, org string, opts *ListOptions) ([]*Invitation, *Response, error) { - u := fmt.Sprintf("orgs/%v/invitations", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var pendingInvitations []*Invitation - resp, err := s.client.Do(ctx, req, &pendingInvitations) - if err != nil { - return nil, resp, err - } - return pendingInvitations, resp, nil -} - -// CreateOrgInvitationOptions specifies the parameters to the OrganizationService.Invite -// method. -type CreateOrgInvitationOptions struct { - // GitHub user ID for the person you are inviting. Not required if you provide Email. - InviteeID *int64 `json:"invitee_id,omitempty"` - // Email address of the person you are inviting, which can be an existing GitHub user. - // Not required if you provide InviteeID - Email *string `json:"email,omitempty"` - // Specify role for new member. Can be one of: - // * admin - Organization owners with full administrative rights to the - // organization and complete access to all repositories and teams. - // * direct_member - Non-owner organization members with ability to see - // other members and join teams by invitation. - // * billing_manager - Non-owner organization members with ability to - // manage the billing settings of your organization. - // Default is "direct_member". - Role *string `json:"role"` - TeamID []int64 `json:"team_ids"` -} - -// CreateOrgInvitation invites people to an organization by using their GitHub user ID or their email address. -// In order to create invitations in an organization, -// the authenticated user must be an organization owner. -// -// https://developer.github.com/v3/orgs/members/#create-organization-invitation -func (s *OrganizationsService) CreateOrgInvitation(ctx context.Context, org string, opts *CreateOrgInvitationOptions) (*Invitation, *Response, error) { - u := fmt.Sprintf("orgs/%v/invitations", org) - - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - var invitation *Invitation - resp, err := s.client.Do(ctx, req, &invitation) - if err != nil { - return nil, resp, err - } - return invitation, resp, nil -} - -// ListOrgInvitationTeams lists all teams associated with an invitation. In order to see invitations in an organization, -// the authenticated user must be an organization owner. -// -// GitHub API docs: https://developer.github.com/v3/orgs/members/#list-organization-invitation-teams -func (s *OrganizationsService) ListOrgInvitationTeams(ctx context.Context, org, invitationID string, opts *ListOptions) ([]*Team, *Response, error) { - u := fmt.Sprintf("orgs/%v/invitations/%v/teams", org, invitationID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var orgInvitationTeams []*Team - resp, err := s.client.Do(ctx, req, &orgInvitationTeams) - if err != nil { - return nil, resp, err - } - return orgInvitationTeams, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v30/github/orgs_outside_collaborators.go deleted file mode 100644 index dde8e0b0..00000000 --- a/vendor/github.com/google/go-github/v30/github/orgs_outside_collaborators.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListOutsideCollaboratorsOptions specifies optional parameters to the -// OrganizationsService.ListOutsideCollaborators method. -type ListOutsideCollaboratorsOptions struct { - // Filter outside collaborators returned in the list. Possible values are: - // 2fa_disabled, all. Default is "all". - Filter string `url:"filter,omitempty"` - - ListOptions -} - -// ListOutsideCollaborators lists outside collaborators of organization's repositories. -// This will only work if the authenticated -// user is an owner of the organization. -// -// Warning: The API may change without advance notice during the preview period. -// Preview features are not supported for production use. -// -// GitHub API docs: https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators -func (s *OrganizationsService) ListOutsideCollaborators(ctx context.Context, org string, opts *ListOutsideCollaboratorsOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("orgs/%v/outside_collaborators", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var members []*User - resp, err := s.client.Do(ctx, req, &members) - if err != nil { - return nil, resp, err - } - - return members, resp, nil -} - -// RemoveOutsideCollaborator removes a user from the list of outside collaborators; -// consequently, removing them from all the organization's repositories. -// -// GitHub API docs: https://developer.github.com/v3/orgs/outside_collaborators/#remove-outside-collaborator -func (s *OrganizationsService) RemoveOutsideCollaborator(ctx context.Context, org string, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/outside_collaborators/%v", org, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ConvertMemberToOutsideCollaborator reduces the permission level of a member of the -// organization to that of an outside collaborator. Therefore, they will only -// have access to the repositories that their current team membership allows. -// Responses for converting a non-member or the last owner to an outside collaborator -// are listed in GitHub API docs. -// -// GitHub API docs: https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator -func (s *OrganizationsService) ConvertMemberToOutsideCollaborator(ctx context.Context, org string, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/outside_collaborators/%v", org, user) - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/orgs_projects.go b/vendor/github.com/google/go-github/v30/github/orgs_projects.go deleted file mode 100644 index cc3ed3b1..00000000 --- a/vendor/github.com/google/go-github/v30/github/orgs_projects.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListProjects lists the projects for an organization. -// -// GitHub API docs: https://developer.github.com/v3/projects/#list-organization-projects -func (s *OrganizationsService) ListProjects(ctx context.Context, org string, opts *ProjectListOptions) ([]*Project, *Response, error) { - u := fmt.Sprintf("orgs/%v/projects", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// CreateProject creates a GitHub Project for the specified organization. -// -// GitHub API docs: https://developer.github.com/v3/projects/#create-an-organization-project -func (s *OrganizationsService) CreateProject(ctx context.Context, org string, opts *ProjectOptions) (*Project, *Response, error) { - u := fmt.Sprintf("orgs/%v/projects", org) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v30/github/orgs_users_blocking.go deleted file mode 100644 index bf48716d..00000000 --- a/vendor/github.com/google/go-github/v30/github/orgs_users_blocking.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListBlockedUsers lists all the users blocked by an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/blocking/#list-blocked-users -func (s *OrganizationsService) ListBlockedUsers(ctx context.Context, org string, opts *ListOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("orgs/%v/blocks", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - var blockedUsers []*User - resp, err := s.client.Do(ctx, req, &blockedUsers) - if err != nil { - return nil, resp, err - } - - return blockedUsers, resp, nil -} - -// IsBlocked reports whether specified user is blocked from an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/blocking/#check-whether-a-user-is-blocked-from-an-organization -func (s *OrganizationsService) IsBlocked(ctx context.Context, org string, user string) (bool, *Response, error) { - u := fmt.Sprintf("orgs/%v/blocks/%v", org, user) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - resp, err := s.client.Do(ctx, req, nil) - isBlocked, err := parseBoolResponse(err) - return isBlocked, resp, err -} - -// BlockUser blocks specified user from an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/blocking/#block-a-user -func (s *OrganizationsService) BlockUser(ctx context.Context, org string, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/blocks/%v", org, user) - - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - return s.client.Do(ctx, req, nil) -} - -// UnblockUser unblocks specified user from an organization. -// -// GitHub API docs: https://developer.github.com/v3/orgs/blocking/#unblock-a-user -func (s *OrganizationsService) UnblockUser(ctx context.Context, org string, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/blocks/%v", org, user) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/projects.go b/vendor/github.com/google/go-github/v30/github/projects.go deleted file mode 100644 index e11d74a5..00000000 --- a/vendor/github.com/google/go-github/v30/github/projects.go +++ /dev/null @@ -1,594 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ProjectsService provides access to the projects functions in the -// GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/projects/ -type ProjectsService service - -// Project represents a GitHub Project. -type Project struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - ColumnsURL *string `json:"columns_url,omitempty"` - OwnerURL *string `json:"owner_url,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Number *int `json:"number,omitempty"` - State *string `json:"state,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` - - // The User object that generated the project. - Creator *User `json:"creator,omitempty"` -} - -func (p Project) String() string { - return Stringify(p) -} - -// GetProject gets a GitHub Project for a repo. -// -// GitHub API docs: https://developer.github.com/v3/projects/#get-a-project -func (s *ProjectsService) GetProject(ctx context.Context, id int64) (*Project, *Response, error) { - u := fmt.Sprintf("projects/%v", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} - -// ProjectOptions specifies the parameters to the -// RepositoriesService.CreateProject and -// ProjectsService.UpdateProject methods. -type ProjectOptions struct { - // The name of the project. (Required for creation; optional for update.) - Name *string `json:"name,omitempty"` - // The body of the project. (Optional.) - Body *string `json:"body,omitempty"` - - // The following field(s) are only applicable for update. - // They should be left with zero values for creation. - - // State of the project. Either "open" or "closed". (Optional.) - State *string `json:"state,omitempty"` - // The permission level that all members of the project's organization - // will have on this project. - // Setting the organization permission is only available - // for organization projects. (Optional.) - OrganizationPermission *string `json:"organization_permission,omitempty"` - // Sets visibility of the project within the organization. - // Setting visibility is only available - // for organization projects.(Optional.) - Public *bool `json:"public,omitempty"` -} - -// UpdateProject updates a repository project. -// -// GitHub API docs: https://developer.github.com/v3/projects/#update-a-project -func (s *ProjectsService) UpdateProject(ctx context.Context, id int64, opts *ProjectOptions) (*Project, *Response, error) { - u := fmt.Sprintf("projects/%v", id) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} - -// DeleteProject deletes a GitHub Project from a repository. -// -// GitHub API docs: https://developer.github.com/v3/projects/#delete-a-project -func (s *ProjectsService) DeleteProject(ctx context.Context, id int64) (*Response, error) { - u := fmt.Sprintf("projects/%v", id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectColumn represents a column of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/repos/projects/ -type ProjectColumn struct { - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - ProjectURL *string `json:"project_url,omitempty"` - CardsURL *string `json:"cards_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -// ListProjectColumns lists the columns of a GitHub Project for a repo. -// -// GitHub API docs: https://developer.github.com/v3/projects/columns/#list-project-columns -func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int64, opts *ListOptions) ([]*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/%v/columns", projectID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - columns := []*ProjectColumn{} - resp, err := s.client.Do(ctx, req, &columns) - if err != nil { - return nil, resp, err - } - - return columns, resp, nil -} - -// GetProjectColumn gets a column of a GitHub Project for a repo. -// -// GitHub API docs: https://developer.github.com/v3/projects/columns/#get-a-project-column -func (s *ProjectsService) GetProjectColumn(ctx context.Context, id int64) (*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/columns/%v", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - column := &ProjectColumn{} - resp, err := s.client.Do(ctx, req, column) - if err != nil { - return nil, resp, err - } - - return column, resp, nil -} - -// ProjectColumnOptions specifies the parameters to the -// ProjectsService.CreateProjectColumn and -// ProjectsService.UpdateProjectColumn methods. -type ProjectColumnOptions struct { - // The name of the project column. (Required for creation and update.) - Name string `json:"name"` -} - -// CreateProjectColumn creates a column for the specified (by number) project. -// -// GitHub API docs: https://developer.github.com/v3/projects/columns/#create-a-project-column -func (s *ProjectsService) CreateProjectColumn(ctx context.Context, projectID int64, opts *ProjectColumnOptions) (*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/%v/columns", projectID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - column := &ProjectColumn{} - resp, err := s.client.Do(ctx, req, column) - if err != nil { - return nil, resp, err - } - - return column, resp, nil -} - -// UpdateProjectColumn updates a column of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/columns/#update-a-project-column -func (s *ProjectsService) UpdateProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnOptions) (*ProjectColumn, *Response, error) { - u := fmt.Sprintf("projects/columns/%v", columnID) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - column := &ProjectColumn{} - resp, err := s.client.Do(ctx, req, column) - if err != nil { - return nil, resp, err - } - - return column, resp, nil -} - -// DeleteProjectColumn deletes a column from a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/columns/#delete-a-project-column -func (s *ProjectsService) DeleteProjectColumn(ctx context.Context, columnID int64) (*Response, error) { - u := fmt.Sprintf("projects/columns/%v", columnID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectColumnMoveOptions specifies the parameters to the -// ProjectsService.MoveProjectColumn method. -type ProjectColumnMoveOptions struct { - // Position can be one of "first", "last", or "after:", where - // is the ID of a column in the same project. (Required.) - Position string `json:"position"` -} - -// MoveProjectColumn moves a column within a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/columns/#move-a-project-column -func (s *ProjectsService) MoveProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnMoveOptions) (*Response, error) { - u := fmt.Sprintf("projects/columns/%v/moves", columnID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectCard represents a card in a column of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#get-a-project-card -type ProjectCard struct { - URL *string `json:"url,omitempty"` - ColumnURL *string `json:"column_url,omitempty"` - ContentURL *string `json:"content_url,omitempty"` - ID *int64 `json:"id,omitempty"` - Note *string `json:"note,omitempty"` - Creator *User `json:"creator,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Archived *bool `json:"archived,omitempty"` - - // The following fields are only populated by Webhook events. - ColumnID *int64 `json:"column_id,omitempty"` - - // The following fields are only populated by Events API. - ProjectID *int64 `json:"project_id,omitempty"` - ProjectURL *string `json:"project_url,omitempty"` - ColumnName *string `json:"column_name,omitempty"` - PreviousColumnName *string `json:"previous_column_name,omitempty"` // Populated in "moved_columns_in_project" event deliveries. -} - -// ProjectCardListOptions specifies the optional parameters to the -// ProjectsService.ListProjectCards method. -type ProjectCardListOptions struct { - // ArchivedState is used to list all, archived, or not_archived project cards. - // Defaults to not_archived when you omit this parameter. - ArchivedState *string `url:"archived_state,omitempty"` - - ListOptions -} - -// ListProjectCards lists the cards in a column of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#list-project-cards -func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int64, opts *ProjectCardListOptions) ([]*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/%v/cards", columnID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - cards := []*ProjectCard{} - resp, err := s.client.Do(ctx, req, &cards) - if err != nil { - return nil, resp, err - } - - return cards, resp, nil -} - -// GetProjectCard gets a card in a column of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#get-a-project-card -func (s *ProjectsService) GetProjectCard(ctx context.Context, cardID int64) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", cardID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - card := &ProjectCard{} - resp, err := s.client.Do(ctx, req, card) - if err != nil { - return nil, resp, err - } - - return card, resp, nil -} - -// ProjectCardOptions specifies the parameters to the -// ProjectsService.CreateProjectCard and -// ProjectsService.UpdateProjectCard methods. -type ProjectCardOptions struct { - // The note of the card. Note and ContentID are mutually exclusive. - Note string `json:"note,omitempty"` - // The ID (not Number) of the Issue to associate with this card. - // Note and ContentID are mutually exclusive. - ContentID int64 `json:"content_id,omitempty"` - // The type of content to associate with this card. Possible values are: "Issue" and "PullRequest". - ContentType string `json:"content_type,omitempty"` - // Use true to archive a project card. - // Specify false if you need to restore a previously archived project card. - Archived *bool `json:"archived,omitempty"` -} - -// CreateProjectCard creates a card in the specified column of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#create-a-project-card -func (s *ProjectsService) CreateProjectCard(ctx context.Context, columnID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/%v/cards", columnID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - card := &ProjectCard{} - resp, err := s.client.Do(ctx, req, card) - if err != nil { - return nil, resp, err - } - - return card, resp, nil -} - -// UpdateProjectCard updates a card of a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#update-a-project-card -func (s *ProjectsService) UpdateProjectCard(ctx context.Context, cardID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", cardID) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - card := &ProjectCard{} - resp, err := s.client.Do(ctx, req, card) - if err != nil { - return nil, resp, err - } - - return card, resp, nil -} - -// DeleteProjectCard deletes a card from a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#delete-a-project-card -func (s *ProjectsService) DeleteProjectCard(ctx context.Context, cardID int64) (*Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", cardID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectCardMoveOptions specifies the parameters to the -// ProjectsService.MoveProjectCard method. -type ProjectCardMoveOptions struct { - // Position can be one of "top", "bottom", or "after:", where - // is the ID of a card in the same project. - Position string `json:"position"` - // ColumnID is the ID of a column in the same project. Note that ColumnID - // is required when using Position "after:" when that card is in - // another column; otherwise it is optional. - ColumnID int64 `json:"column_id,omitempty"` -} - -// MoveProjectCard moves a card within a GitHub Project. -// -// GitHub API docs: https://developer.github.com/v3/projects/cards/#move-a-project-card -func (s *ProjectsService) MoveProjectCard(ctx context.Context, cardID int64, opts *ProjectCardMoveOptions) (*Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v/moves", cardID) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ProjectCollaboratorOptions specifies the optional parameters to the -// ProjectsService.AddProjectCollaborator method. -type ProjectCollaboratorOptions struct { - // Permission specifies the permission to grant to the collaborator. - // Possible values are: - // "read" - can read, but not write to or administer this project. - // "write" - can read and write, but not administer this project. - // "admin" - can read, write and administer this project. - // - // Default value is "write" - Permission *string `json:"permission,omitempty"` -} - -// AddProjectCollaborator adds a collaborator to an organization project and sets -// their permission level. You must be an organization owner or a project admin to add a collaborator. -// -// GitHub API docs: https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator -func (s *ProjectsService) AddProjectCollaborator(ctx context.Context, id int64, username string, opts *ProjectCollaboratorOptions) (*Response, error) { - u := fmt.Sprintf("projects/%v/collaborators/%v", id, username) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// RemoveProjectCollaborator removes a collaborator from an organization project. -// You must be an organization owner or a project admin to remove a collaborator. -// -// GitHub API docs: https://developer.github.com/v3/projects/collaborators/#remove-user-as-a-collaborator -func (s *ProjectsService) RemoveProjectCollaborator(ctx context.Context, id int64, username string) (*Response, error) { - u := fmt.Sprintf("projects/%v/collaborators/%v", id, username) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - return s.client.Do(ctx, req, nil) -} - -// ListCollaboratorOptions specifies the optional parameters to the -// ProjectsService.ListProjectCollaborators method. -type ListCollaboratorOptions struct { - // Affiliation specifies how collaborators should be filtered by their affiliation. - // Possible values are: - // "outside" - All outside collaborators of an organization-owned repository - // "direct" - All collaborators with permissions to an organization-owned repository, - // regardless of organization membership status - // "all" - All collaborators the authenticated user can see - // - // Default value is "all". - Affiliation *string `url:"affiliation,omitempty"` - - ListOptions -} - -// ListProjectCollaborators lists the collaborators for an organization project. For a project, -// the list of collaborators includes outside collaborators, organization members that are direct -// collaborators, organization members with access through team memberships, organization members -// with access through default organization permissions, and organization owners. You must be an -// organization owner or a project admin to list collaborators. -// -// GitHub API docs: https://developer.github.com/v3/projects/collaborators/#list-collaborators -func (s *ProjectsService) ListProjectCollaborators(ctx context.Context, id int64, opts *ListCollaboratorOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("projects/%v/collaborators", id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var users []*User - resp, err := s.client.Do(ctx, req, &users) - if err != nil { - return nil, resp, err - } - - return users, resp, nil -} - -// ProjectPermissionLevel represents the permission level an organization -// member has for a given project. -type ProjectPermissionLevel struct { - // Possible values: "admin", "write", "read", "none" - Permission *string `json:"permission,omitempty"` - - User *User `json:"user,omitempty"` -} - -// ReviewProjectCollaboratorPermission returns the collaborator's permission level for an organization -// project. Possible values for the permission key: "admin", "write", "read", "none". -// You must be an organization owner or a project admin to review a user's permission level. -// -// GitHub API docs: https://developer.github.com/v3/projects/collaborators/#review-a-users-permission-level -func (s *ProjectsService) ReviewProjectCollaboratorPermission(ctx context.Context, id int64, username string) (*ProjectPermissionLevel, *Response, error) { - u := fmt.Sprintf("projects/%v/collaborators/%v/permission", id, username) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - ppl := new(ProjectPermissionLevel) - resp, err := s.client.Do(ctx, req, ppl) - if err != nil { - return nil, resp, err - } - return ppl, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/pulls.go b/vendor/github.com/google/go-github/v30/github/pulls.go deleted file mode 100644 index 00692088..00000000 --- a/vendor/github.com/google/go-github/v30/github/pulls.go +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "bytes" - "context" - "fmt" - "strings" - "time" -) - -// PullRequestsService handles communication with the pull request related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/pulls/ -type PullRequestsService service - -// PullRequest represents a GitHub pull request on a repository. -type PullRequest struct { - ID *int64 `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - State *string `json:"state,omitempty"` - Locked *bool `json:"locked,omitempty"` - Title *string `json:"title,omitempty"` - Body *string `json:"body,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - ClosedAt *time.Time `json:"closed_at,omitempty"` - MergedAt *time.Time `json:"merged_at,omitempty"` - Labels []*Label `json:"labels,omitempty"` - User *User `json:"user,omitempty"` - Draft *bool `json:"draft,omitempty"` - Merged *bool `json:"merged,omitempty"` - Mergeable *bool `json:"mergeable,omitempty"` - MergeableState *string `json:"mergeable_state,omitempty"` - MergedBy *User `json:"merged_by,omitempty"` - MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` - Rebaseable *bool `json:"rebaseable,omitempty"` - Comments *int `json:"comments,omitempty"` - Commits *int `json:"commits,omitempty"` - Additions *int `json:"additions,omitempty"` - Deletions *int `json:"deletions,omitempty"` - ChangedFiles *int `json:"changed_files,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - IssueURL *string `json:"issue_url,omitempty"` - StatusesURL *string `json:"statuses_url,omitempty"` - DiffURL *string `json:"diff_url,omitempty"` - PatchURL *string `json:"patch_url,omitempty"` - CommitsURL *string `json:"commits_url,omitempty"` - CommentsURL *string `json:"comments_url,omitempty"` - ReviewCommentsURL *string `json:"review_comments_url,omitempty"` - ReviewCommentURL *string `json:"review_comment_url,omitempty"` - ReviewComments *int `json:"review_comments,omitempty"` - Assignee *User `json:"assignee,omitempty"` - Assignees []*User `json:"assignees,omitempty"` - Milestone *Milestone `json:"milestone,omitempty"` - MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` - AuthorAssociation *string `json:"author_association,omitempty"` - NodeID *string `json:"node_id,omitempty"` - RequestedReviewers []*User `json:"requested_reviewers,omitempty"` - - // RequestedTeams is populated as part of the PullRequestEvent. - // See, https://developer.github.com/v3/activity/events/types/#pullrequestevent for an example. - RequestedTeams []*Team `json:"requested_teams,omitempty"` - - Links *PRLinks `json:"_links,omitempty"` - Head *PullRequestBranch `json:"head,omitempty"` - Base *PullRequestBranch `json:"base,omitempty"` - - // ActiveLockReason is populated only when LockReason is provided while locking the pull request. - // Possible values are: "off-topic", "too heated", "resolved", and "spam". - ActiveLockReason *string `json:"active_lock_reason,omitempty"` -} - -func (p PullRequest) String() string { - return Stringify(p) -} - -// PRLink represents a single link object from Github pull request _links. -type PRLink struct { - HRef *string `json:"href,omitempty"` -} - -// PRLinks represents the "_links" object in a Github pull request. -type PRLinks struct { - Self *PRLink `json:"self,omitempty"` - HTML *PRLink `json:"html,omitempty"` - Issue *PRLink `json:"issue,omitempty"` - Comments *PRLink `json:"comments,omitempty"` - ReviewComments *PRLink `json:"review_comments,omitempty"` - ReviewComment *PRLink `json:"review_comment,omitempty"` - Commits *PRLink `json:"commits,omitempty"` - Statuses *PRLink `json:"statuses,omitempty"` -} - -// PullRequestBranch represents a base or head branch in a GitHub pull request. -type PullRequestBranch struct { - Label *string `json:"label,omitempty"` - Ref *string `json:"ref,omitempty"` - SHA *string `json:"sha,omitempty"` - Repo *Repository `json:"repo,omitempty"` - User *User `json:"user,omitempty"` -} - -// PullRequestListOptions specifies the optional parameters to the -// PullRequestsService.List method. -type PullRequestListOptions struct { - // State filters pull requests based on their state. Possible values are: - // open, closed, all. Default is "open". - State string `url:"state,omitempty"` - - // Head filters pull requests by head user and branch name in the format of: - // "user:ref-name". - Head string `url:"head,omitempty"` - - // Base filters pull requests by base branch name. - Base string `url:"base,omitempty"` - - // Sort specifies how to sort pull requests. Possible values are: created, - // updated, popularity, long-running. Default is "created". - Sort string `url:"sort,omitempty"` - - // Direction in which to sort pull requests. Possible values are: asc, desc. - // If Sort is "created" or not specified, Default is "desc", otherwise Default - // is "asc" - Direction string `url:"direction,omitempty"` - - ListOptions -} - -// List the pull requests for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#list-pull-requests -func (s *PullRequestsService) List(ctx context.Context, owner string, repo string, opts *PullRequestListOptions) ([]*PullRequest, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeLockReasonPreview, mediaTypeDraftPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var pulls []*PullRequest - resp, err := s.client.Do(ctx, req, &pulls) - if err != nil { - return nil, resp, err - } - - return pulls, resp, nil -} - -// ListPullRequestsWithCommit returns pull requests associated with a commit SHA. -// -// The results will include open and closed pull requests. -// -// GitHub API docs: https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit -func (s *PullRequestsService) ListPullRequestsWithCommit(ctx context.Context, owner, repo, sha string, opts *PullRequestListOptions) ([]*PullRequest, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/pulls", owner, repo, sha) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeListPullsOrBranchesForCommitPreview, mediaTypeDraftPreview, mediaTypeLockReasonPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - var pulls []*PullRequest - resp, err := s.client.Do(ctx, req, &pulls) - if err != nil { - return nil, resp, err - } - - return pulls, resp, nil -} - -// Get a single pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#get-a-single-pull-request -func (s *PullRequestsService) Get(ctx context.Context, owner string, repo string, number int) (*PullRequest, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d", owner, repo, number) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeLockReasonPreview, mediaTypeDraftPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - pull := new(PullRequest) - resp, err := s.client.Do(ctx, req, pull) - if err != nil { - return nil, resp, err - } - - return pull, resp, nil -} - -// GetRaw gets a single pull request in raw (diff or patch) format. -func (s *PullRequestsService) GetRaw(ctx context.Context, owner string, repo string, number int, opts RawOptions) (string, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d", owner, repo, number) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return "", nil, err - } - - switch opts.Type { - case Diff: - req.Header.Set("Accept", mediaTypeV3Diff) - case Patch: - req.Header.Set("Accept", mediaTypeV3Patch) - default: - return "", nil, fmt.Errorf("unsupported raw type %d", opts.Type) - } - - var buf bytes.Buffer - resp, err := s.client.Do(ctx, req, &buf) - if err != nil { - return "", resp, err - } - - return buf.String(), resp, nil -} - -// NewPullRequest represents a new pull request to be created. -type NewPullRequest struct { - Title *string `json:"title,omitempty"` - Head *string `json:"head,omitempty"` - Base *string `json:"base,omitempty"` - Body *string `json:"body,omitempty"` - Issue *int `json:"issue,omitempty"` - MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` - Draft *bool `json:"draft,omitempty"` -} - -// Create a new pull request on the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#create-a-pull-request -func (s *PullRequestsService) Create(ctx context.Context, owner string, repo string, pull *NewPullRequest) (*PullRequest, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls", owner, repo) - req, err := s.client.NewRequest("POST", u, pull) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeDraftPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - p := new(PullRequest) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -// PullRequestBranchUpdateOptions specifies the optional parameters to the -// PullRequestsService.UpdateBranch method. -type PullRequestBranchUpdateOptions struct { - // ExpectedHeadSHA specifies the most recent commit on the pull request's branch. - // Default value is the SHA of the pull request's current HEAD ref. - ExpectedHeadSHA *string `json:"expected_head_sha,omitempty"` -} - -// PullRequestBranchUpdateResponse specifies the response of pull request branch update. -type PullRequestBranchUpdateResponse struct { - Message *string `json:"message,omitempty"` - URL *string `json:"url,omitempty"` -} - -// UpdateBranch updates the pull request branch with latest upstream changes. -// -// This method might return an AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it has now scheduled the update of the pull request branch in a background task. -// A follow up request, after a delay of a second or so, should result -// in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#update-a-pull-request-branch -func (s *PullRequestsService) UpdateBranch(ctx context.Context, owner, repo string, number int, opts *PullRequestBranchUpdateOptions) (*PullRequestBranchUpdateResponse, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/update-branch", owner, repo, number) - - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeUpdatePullRequestBranchPreview) - - p := new(PullRequestBranchUpdateResponse) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -type pullRequestUpdate struct { - Title *string `json:"title,omitempty"` - Body *string `json:"body,omitempty"` - State *string `json:"state,omitempty"` - Base *string `json:"base,omitempty"` - MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` -} - -// Edit a pull request. -// pull must not be nil. -// -// The following fields are editable: Title, Body, State, Base.Ref and MaintainerCanModify. -// Base.Ref updates the base branch of the pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#update-a-pull-request -func (s *PullRequestsService) Edit(ctx context.Context, owner string, repo string, number int, pull *PullRequest) (*PullRequest, *Response, error) { - if pull == nil { - return nil, nil, fmt.Errorf("pull must be provided") - } - - u := fmt.Sprintf("repos/%v/%v/pulls/%d", owner, repo, number) - - update := &pullRequestUpdate{ - Title: pull.Title, - Body: pull.Body, - State: pull.State, - MaintainerCanModify: pull.MaintainerCanModify, - } - // avoid updating the base branch when closing the Pull Request - // - otherwise the GitHub API server returns a "Validation Failed" error: - // "Cannot change base branch of closed pull request". - if pull.Base != nil && pull.GetState() != "closed" { - update.Base = pull.Base.Ref - } - - req, err := s.client.NewRequest("PATCH", u, update) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeLockReasonPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - p := new(PullRequest) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -// ListCommits lists the commits in a pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request -func (s *PullRequestsService) ListCommits(ctx context.Context, owner string, repo string, number int, opts *ListOptions) ([]*RepositoryCommit, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/commits", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var commits []*RepositoryCommit - resp, err := s.client.Do(ctx, req, &commits) - if err != nil { - return nil, resp, err - } - - return commits, resp, nil -} - -// ListFiles lists the files in a pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#list-pull-requests-files -func (s *PullRequestsService) ListFiles(ctx context.Context, owner string, repo string, number int, opts *ListOptions) ([]*CommitFile, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/files", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var commitFiles []*CommitFile - resp, err := s.client.Do(ctx, req, &commitFiles) - if err != nil { - return nil, resp, err - } - - return commitFiles, resp, nil -} - -// IsMerged checks if a pull request has been merged. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged -func (s *PullRequestsService) IsMerged(ctx context.Context, owner string, repo string, number int) (bool, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/merge", owner, repo, number) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - merged, err := parseBoolResponse(err) - return merged, resp, err -} - -// PullRequestMergeResult represents the result of merging a pull request. -type PullRequestMergeResult struct { - SHA *string `json:"sha,omitempty"` - Merged *bool `json:"merged,omitempty"` - Message *string `json:"message,omitempty"` -} - -// PullRequestOptions lets you define how a pull request will be merged. -type PullRequestOptions struct { - CommitTitle string // Extra detail to append to automatic commit message. (Optional.) - SHA string // SHA that pull request head must match to allow merge. (Optional.) - - // The merge method to use. Possible values include: "merge", "squash", and "rebase" with the default being merge. (Optional.) - MergeMethod string -} - -type pullRequestMergeRequest struct { - CommitMessage string `json:"commit_message,omitempty"` - CommitTitle string `json:"commit_title,omitempty"` - MergeMethod string `json:"merge_method,omitempty"` - SHA string `json:"sha,omitempty"` -} - -// Merge a pull request (Merge Button™). -// commitMessage is the title for the automatic commit message. -// -// GitHub API docs: https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-buttontrade -func (s *PullRequestsService) Merge(ctx context.Context, owner string, repo string, number int, commitMessage string, options *PullRequestOptions) (*PullRequestMergeResult, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/merge", owner, repo, number) - - pullRequestBody := &pullRequestMergeRequest{CommitMessage: commitMessage} - if options != nil { - pullRequestBody.CommitTitle = options.CommitTitle - pullRequestBody.MergeMethod = options.MergeMethod - pullRequestBody.SHA = options.SHA - } - req, err := s.client.NewRequest("PUT", u, pullRequestBody) - if err != nil { - return nil, nil, err - } - - mergeResult := new(PullRequestMergeResult) - resp, err := s.client.Do(ctx, req, mergeResult) - if err != nil { - return nil, resp, err - } - - return mergeResult, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/pulls_comments.go b/vendor/github.com/google/go-github/v30/github/pulls_comments.go deleted file mode 100644 index 88fb209b..00000000 --- a/vendor/github.com/google/go-github/v30/github/pulls_comments.go +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "strings" - "time" -) - -// PullRequestComment represents a comment left on a pull request. -type PullRequestComment struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - InReplyTo *int64 `json:"in_reply_to_id,omitempty"` - Body *string `json:"body,omitempty"` - Path *string `json:"path,omitempty"` - DiffHunk *string `json:"diff_hunk,omitempty"` - PullRequestReviewID *int64 `json:"pull_request_review_id,omitempty"` - Position *int `json:"position,omitempty"` - OriginalPosition *int `json:"original_position,omitempty"` - StartLine *int `json:"start_line,omitempty"` - Line *int `json:"line,omitempty"` - OriginalLine *int `json:"original_line,omitempty"` - OriginalStartLine *int `json:"original_start_line,omitempty"` - Side *string `json:"side,omitempty"` - StartSide *string `json:"start_side,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - OriginalCommitID *string `json:"original_commit_id,omitempty"` - User *User `json:"user,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - // AuthorAssociation is the comment author's relationship to the pull request's repository. - // Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE". - AuthorAssociation *string `json:"author_association,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - PullRequestURL *string `json:"pull_request_url,omitempty"` -} - -func (p PullRequestComment) String() string { - return Stringify(p) -} - -// PullRequestListCommentsOptions specifies the optional parameters to the -// PullRequestsService.ListComments method. -type PullRequestListCommentsOptions struct { - // Sort specifies how to sort comments. Possible values are: created, updated. - Sort string `url:"sort,omitempty"` - - // Direction in which to sort comments. Possible values are: asc, desc. - Direction string `url:"direction,omitempty"` - - // Since filters comments by time. - Since time.Time `url:"since,omitempty"` - - ListOptions -} - -// ListComments lists all comments on the specified pull request. Specifying a -// pull request number of 0 will return all comments on all pull requests for -// the repository. -// -// GitHub API docs: https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request -func (s *PullRequestsService) ListComments(ctx context.Context, owner string, repo string, number int, opts *PullRequestListCommentsOptions) ([]*PullRequestComment, *Response, error) { - var u string - if number == 0 { - u = fmt.Sprintf("repos/%v/%v/pulls/comments", owner, repo) - } else { - u = fmt.Sprintf("repos/%v/%v/pulls/%d/comments", owner, repo, number) - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeMultiLineCommentsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var comments []*PullRequestComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// GetComment fetches the specified pull request comment. -// -// GitHub API docs: https://developer.github.com/v3/pulls/comments/#get-a-single-comment -func (s *PullRequestsService) GetComment(ctx context.Context, owner string, repo string, commentID int64) (*PullRequestComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, commentID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeMultiLineCommentsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - comment := new(PullRequestComment) - resp, err := s.client.Do(ctx, req, comment) - if err != nil { - return nil, resp, err - } - - return comment, resp, nil -} - -// CreateComment creates a new comment on the specified pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/comments/#create-a-comment -func (s *PullRequestsService) CreateComment(ctx context.Context, owner string, repo string, number int, comment *PullRequestComment) (*PullRequestComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/comments", owner, repo, number) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - // TODO: remove custom Accept headers when their respective API fully launches. - acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeMultiLineCommentsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - c := new(PullRequestComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// CreateCommentInReplyTo creates a new comment as a reply to an existing pull request comment. -// -// GitHub API docs: https://developer.github.com/v3/pulls/comments/#alternative-input -func (s *PullRequestsService) CreateCommentInReplyTo(ctx context.Context, owner string, repo string, number int, body string, commentID int64) (*PullRequestComment, *Response, error) { - comment := &struct { - Body string `json:"body,omitempty"` - InReplyTo int64 `json:"in_reply_to,omitempty"` - }{ - Body: body, - InReplyTo: commentID, - } - u := fmt.Sprintf("repos/%v/%v/pulls/%d/comments", owner, repo, number) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - - c := new(PullRequestComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// EditComment updates a pull request comment. -// A non-nil comment.Body must be provided. Other comment fields should be left nil. -// -// GitHub API docs: https://developer.github.com/v3/pulls/comments/#edit-a-comment -func (s *PullRequestsService) EditComment(ctx context.Context, owner string, repo string, commentID int64, comment *PullRequestComment) (*PullRequestComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, commentID) - req, err := s.client.NewRequest("PATCH", u, comment) - if err != nil { - return nil, nil, err - } - - c := new(PullRequestComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// DeleteComment deletes a pull request comment. -// -// GitHub API docs: https://developer.github.com/v3/pulls/comments/#delete-a-comment -func (s *PullRequestsService) DeleteComment(ctx context.Context, owner string, repo string, commentID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, commentID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v30/github/pulls_reviewers.go deleted file mode 100644 index 368f9680..00000000 --- a/vendor/github.com/google/go-github/v30/github/pulls_reviewers.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ReviewersRequest specifies users and teams for a pull request review request. -type ReviewersRequest struct { - NodeID *string `json:"node_id,omitempty"` - Reviewers []string `json:"reviewers,omitempty"` - TeamReviewers []string `json:"team_reviewers,omitempty"` -} - -// Reviewers represents reviewers of a pull request. -type Reviewers struct { - Users []*User `json:"users,omitempty"` - Teams []*Team `json:"teams,omitempty"` -} - -// RequestReviewers creates a review request for the provided reviewers for the specified pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/review_requests/#create-a-review-request -func (s *PullRequestsService) RequestReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*PullRequest, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/pulls/%d/requested_reviewers", owner, repo, number) - req, err := s.client.NewRequest("POST", u, &reviewers) - if err != nil { - return nil, nil, err - } - - r := new(PullRequest) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// ListReviewers lists reviewers whose reviews have been requested on the specified pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/review_requests/#list-review-requests -func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo string, number int, opts *ListOptions) (*Reviewers, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/requested_reviewers", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - reviewers := new(Reviewers) - resp, err := s.client.Do(ctx, req, reviewers) - if err != nil { - return nil, resp, err - } - - return reviewers, resp, nil -} - -// RemoveReviewers removes the review request for the provided reviewers for the specified pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/review_requests/#delete-a-review-request -func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*Response, error) { - u := fmt.Sprintf("repos/%s/%s/pulls/%d/requested_reviewers", owner, repo, number) - req, err := s.client.NewRequest("DELETE", u, &reviewers) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/pulls_reviews.go b/vendor/github.com/google/go-github/v30/github/pulls_reviews.go deleted file mode 100644 index 5bceb61c..00000000 --- a/vendor/github.com/google/go-github/v30/github/pulls_reviews.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// PullRequestReview represents a review of a pull request. -type PullRequestReview struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - User *User `json:"user,omitempty"` - Body *string `json:"body,omitempty"` - SubmittedAt *time.Time `json:"submitted_at,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - PullRequestURL *string `json:"pull_request_url,omitempty"` - State *string `json:"state,omitempty"` - // AuthorAssociation is the comment author's relationship to the issue's repository. - // Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE". - AuthorAssociation *string `json:"author_association,omitempty"` -} - -func (p PullRequestReview) String() string { - return Stringify(p) -} - -// DraftReviewComment represents a comment part of the review. -type DraftReviewComment struct { - Path *string `json:"path,omitempty"` - Position *int `json:"position,omitempty"` - Body *string `json:"body,omitempty"` -} - -func (c DraftReviewComment) String() string { - return Stringify(c) -} - -// PullRequestReviewRequest represents a request to create a review. -type PullRequestReviewRequest struct { - NodeID *string `json:"node_id,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - Body *string `json:"body,omitempty"` - Event *string `json:"event,omitempty"` - Comments []*DraftReviewComment `json:"comments,omitempty"` -} - -func (r PullRequestReviewRequest) String() string { - return Stringify(r) -} - -// PullRequestReviewDismissalRequest represents a request to dismiss a review. -type PullRequestReviewDismissalRequest struct { - Message *string `json:"message,omitempty"` -} - -func (r PullRequestReviewDismissalRequest) String() string { - return Stringify(r) -} - -// ListReviews lists all reviews on the specified pull request. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request -func (s *PullRequestsService) ListReviews(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*PullRequestReview, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var reviews []*PullRequestReview - resp, err := s.client.Do(ctx, req, &reviews) - if err != nil { - return nil, resp, err - } - - return reviews, resp, nil -} - -// GetReview fetches the specified pull request review. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#get-a-single-review -func (s *PullRequestsService) GetReview(ctx context.Context, owner, repo string, number int, reviewID int64) (*PullRequestReview, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d", owner, repo, number, reviewID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - review := new(PullRequestReview) - resp, err := s.client.Do(ctx, req, review) - if err != nil { - return nil, resp, err - } - - return review, resp, nil -} - -// DeletePendingReview deletes the specified pull request pending review. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review -func (s *PullRequestsService) DeletePendingReview(ctx context.Context, owner, repo string, number int, reviewID int64) (*PullRequestReview, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d", owner, repo, number, reviewID) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, nil, err - } - - review := new(PullRequestReview) - resp, err := s.client.Do(ctx, req, review) - if err != nil { - return nil, resp, err - } - - return review, resp, nil -} - -// ListReviewComments lists all the comments for the specified review. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review -func (s *PullRequestsService) ListReviewComments(ctx context.Context, owner, repo string, number int, reviewID int64, opts *ListOptions) ([]*PullRequestComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d/comments", owner, repo, number, reviewID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var comments []*PullRequestComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// CreateReview creates a new review on the specified pull request. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review -func (s *PullRequestsService) CreateReview(ctx context.Context, owner, repo string, number int, review *PullRequestReviewRequest) (*PullRequestReview, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews", owner, repo, number) - - req, err := s.client.NewRequest("POST", u, review) - if err != nil { - return nil, nil, err - } - - r := new(PullRequestReview) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// UpdateReview updates the review summary on the specified pull request. -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#update-a-pull-request-review -func (s *PullRequestsService) UpdateReview(ctx context.Context, owner, repo string, number int, reviewID int64, body string) (*PullRequestReview, *Response, error) { - opts := &struct { - Body string `json:"body"` - }{Body: body} - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d", owner, repo, number, reviewID) - - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - - review := &PullRequestReview{} - resp, err := s.client.Do(ctx, req, review) - if err != nil { - return nil, resp, err - } - - return review, resp, nil -} - -// SubmitReview submits a specified review on the specified pull request. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review -func (s *PullRequestsService) SubmitReview(ctx context.Context, owner, repo string, number int, reviewID int64, review *PullRequestReviewRequest) (*PullRequestReview, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d/events", owner, repo, number, reviewID) - - req, err := s.client.NewRequest("POST", u, review) - if err != nil { - return nil, nil, err - } - - r := new(PullRequestReview) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// DismissReview dismisses a specified review on the specified pull request. -// -// TODO: Follow up with GitHub support about an issue with this method's -// returned error format and remove this comment once it's fixed. -// Read more about it here - https://github.com/google/go-github/issues/540 -// -// GitHub API docs: https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review -func (s *PullRequestsService) DismissReview(ctx context.Context, owner, repo string, number int, reviewID int64, review *PullRequestReviewDismissalRequest) (*PullRequestReview, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d/dismissals", owner, repo, number, reviewID) - - req, err := s.client.NewRequest("PUT", u, review) - if err != nil { - return nil, nil, err - } - - r := new(PullRequestReview) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/reactions.go b/vendor/github.com/google/go-github/v30/github/reactions.go deleted file mode 100644 index 1602032e..00000000 --- a/vendor/github.com/google/go-github/v30/github/reactions.go +++ /dev/null @@ -1,492 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" - "net/http" -) - -// ReactionsService provides access to the reactions-related functions in the -// GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/reactions/ -type ReactionsService service - -// Reaction represents a GitHub reaction. -type Reaction struct { - // ID is the Reaction ID. - ID *int64 `json:"id,omitempty"` - User *User `json:"user,omitempty"` - NodeID *string `json:"node_id,omitempty"` - // Content is the type of reaction. - // Possible values are: - // "+1", "-1", "laugh", "confused", "heart", "hooray". - Content *string `json:"content,omitempty"` -} - -// Reactions represents a summary of GitHub reactions. -type Reactions struct { - TotalCount *int `json:"total_count,omitempty"` - PlusOne *int `json:"+1,omitempty"` - MinusOne *int `json:"-1,omitempty"` - Laugh *int `json:"laugh,omitempty"` - Confused *int `json:"confused,omitempty"` - Heart *int `json:"heart,omitempty"` - Hooray *int `json:"hooray,omitempty"` - URL *string `json:"url,omitempty"` -} - -func (r Reaction) String() string { - return Stringify(r) -} - -// ListCommentReactionOptions specifies the optional parameters to the -// ReactionsService.ListCommentReactions method. -type ListCommentReactionOptions struct { - // Content restricts the returned comment reactions to only those with the given type. - // Omit this parameter to list all reactions to a commit comment. - // Possible values are: "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", or "eyes". - Content string `url:"content,omitempty"` - - ListOptions -} - -// ListCommentReactions lists the reactions for a commit comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment -func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListCommentReactionOptions) ([]*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions", owner, repo, id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var m []*Reaction - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// CreateCommentReaction creates a reaction for a commit comment. -// Note that if you have already created a reaction of type content, the -// previously created reaction will be returned with Status: 200 OK. -// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". -// -// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment -func (s ReactionsService) CreateCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions", owner, repo, id) - - body := &Reaction{Content: String(content)} - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Reaction{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeleteCommentReaction deletes the reaction for a commit comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-a-commit-comment-reaction -func (s *ReactionsService) DeleteCommentReaction(ctx context.Context, owner, repo string, commentID, reactionID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions/%v", owner, repo, commentID, reactionID) - - return s.deleteReaction(ctx, u) -} - -// DeleteCommentReactionByID deletes the reaction for a commit comment by repository ID. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-a-commit-comment-reaction -func (s *ReactionsService) DeleteCommentReactionByID(ctx context.Context, repoID, commentID, reactionID int64) (*Response, error) { - u := fmt.Sprintf("repositories/%v/comments/%v/reactions/%v", repoID, commentID, reactionID) - - return s.deleteReaction(ctx, u) -} - -// ListIssueReactions lists the reactions for an issue. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-an-issue -func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%v/reactions", owner, repo, number) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var m []*Reaction - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// CreateIssueReaction creates a reaction for an issue. -// Note that if you have already created a reaction of type content, the -// previously created reaction will be returned with Status: 200 OK. -// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". -// -// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue -func (s ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo string, number int, content string) (*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/%v/reactions", owner, repo, number) - - body := &Reaction{Content: String(content)} - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Reaction{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeleteIssueReaction deletes the reaction to an issue. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-an-issue-reaction -func (s *ReactionsService) DeleteIssueReaction(ctx context.Context, owner, repo string, issueNumber int, reactionID int64) (*Response, error) { - url := fmt.Sprintf("repos/%v/%v/issues/%v/reactions/%v", owner, repo, issueNumber, reactionID) - - return s.deleteReaction(ctx, url) -} - -// DeleteIssueReactionByID deletes the reaction to an issue by repository ID. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-an-issue-reaction -func (s *ReactionsService) DeleteIssueReactionByID(ctx context.Context, repoID, issueNumber int, reactionID int64) (*Response, error) { - url := fmt.Sprintf("repositories/%v/issues/%v/reactions/%v", repoID, issueNumber, reactionID) - - return s.deleteReaction(ctx, url) -} - -// ListIssueCommentReactions lists the reactions for an issue comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment -func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListOptions) ([]*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions", owner, repo, id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var m []*Reaction - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// CreateIssueCommentReaction creates a reaction for an issue comment. -// Note that if you have already created a reaction of type content, the -// previously created reaction will be returned with Status: 200 OK. -// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". -// -// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment -func (s ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions", owner, repo, id) - - body := &Reaction{Content: String(content)} - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Reaction{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeleteIssueCommentReaction deletes the reaction to an issue comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-an-issue-comment-reaction -func (s *ReactionsService) DeleteIssueCommentReaction(ctx context.Context, owner, repo string, commentID, reactionID int64) (*Response, error) { - url := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions/%v", owner, repo, commentID, reactionID) - - return s.deleteReaction(ctx, url) -} - -// DeleteIssueCommentReactionByID deletes the reaction to an issue comment by repository ID. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-an-issue-comment-reaction -func (s *ReactionsService) DeleteIssueCommentReactionByID(ctx context.Context, repoID, commentID, reactionID int64) (*Response, error) { - url := fmt.Sprintf("repositories/%v/issues/comments/%v/reactions/%v", repoID, commentID, reactionID) - - return s.deleteReaction(ctx, url) -} - -// ListPullRequestCommentReactions lists the reactions for a pull request review comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment -func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListOptions) ([]*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions", owner, repo, id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var m []*Reaction - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// CreatePullRequestCommentReaction creates a reaction for a pull request review comment. -// Note that if you have already created a reaction of type content, the -// previously created reaction will be returned with Status: 200 OK. -// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". -// -// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment -func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions", owner, repo, id) - - body := &Reaction{Content: String(content)} - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Reaction{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeletePullRequestCommentReaction deletes the reaction to a pull request review comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-a-pull-request-comment-reaction -func (s *ReactionsService) DeletePullRequestCommentReaction(ctx context.Context, owner, repo string, commentID, reactionID int64) (*Response, error) { - url := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions/%v", owner, repo, commentID, reactionID) - - return s.deleteReaction(ctx, url) -} - -// DeletePullRequestCommentReactionByID deletes the reaction to a pull request review comment by repository ID. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-a-pull-request-comment-reaction -func (s *ReactionsService) DeletePullRequestCommentReactionByID(ctx context.Context, repoID, commentID, reactionID int64) (*Response, error) { - url := fmt.Sprintf("repositories/%v/pulls/comments/%v/reactions/%v", repoID, commentID, reactionID) - - return s.deleteReaction(ctx, url) -} - -// ListTeamDiscussionReactions lists the reactions for a team discussion. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion -func (s *ReactionsService) ListTeamDiscussionReactions(ctx context.Context, teamID int64, discussionNumber int, opts *ListOptions) ([]*Reaction, *Response, error) { - u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var m []*Reaction - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// CreateTeamDiscussionReaction creates a reaction for a team discussion. -// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". -// -// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion -func (s *ReactionsService) CreateTeamDiscussionReaction(ctx context.Context, teamID int64, discussionNumber int, content string) (*Reaction, *Response, error) { - u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) - - body := &Reaction{Content: String(content)} - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Reaction{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeleteTeamDiscussionReaction deletes the reaction to a team discussion. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-team-discussion-reaction -func (s *ReactionsService) DeleteTeamDiscussionReaction(ctx context.Context, org, teamSlug string, discussionNumber int, reactionID int64) (*Response, error) { - url := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/reactions/%v", org, teamSlug, discussionNumber, reactionID) - - return s.deleteReaction(ctx, url) -} - -// DeleteTeamDiscussionReactionByOrgIDAndTeamID deletes the reaction to a team discussion by organization ID and team ID. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-team-discussion-reaction -func (s *ReactionsService) DeleteTeamDiscussionReactionByOrgIDAndTeamID(ctx context.Context, orgID, teamID, discussionNumber int, reactionID int64) (*Response, error) { - url := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/reactions/%v", orgID, teamID, discussionNumber, reactionID) - - return s.deleteReaction(ctx, url) -} - -// ListTeamDiscussionCommentReactions lists the reactions for a team discussion comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment -func (s *ReactionsService) ListTeamDiscussionCommentReactions(ctx context.Context, teamID int64, discussionNumber, commentNumber int, opts *ListOptions) ([]*Reaction, *Response, error) { - u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var m []*Reaction - resp, err := s.client.Do(ctx, req, &m) - if err != nil { - return nil, nil, err - } - return m, resp, nil -} - -// CreateTeamDiscussionCommentReaction creates a reaction for a team discussion comment. -// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". -// -// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment -func (s *ReactionsService) CreateTeamDiscussionCommentReaction(ctx context.Context, teamID int64, discussionNumber, commentNumber int, content string) (*Reaction, *Response, error) { - u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) - - body := &Reaction{Content: String(content)} - req, err := s.client.NewRequest("POST", u, body) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeReactionsPreview) - - m := &Reaction{} - resp, err := s.client.Do(ctx, req, m) - if err != nil { - return nil, resp, err - } - - return m, resp, nil -} - -// DeleteTeamDiscussionCommentReaction deletes the reaction to a team discussion comment. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-team-discussion-comment-reaction -func (s *ReactionsService) DeleteTeamDiscussionCommentReaction(ctx context.Context, org, teamSlug string, discussionNumber, commentNumber int, reactionID int64) (*Response, error) { - url := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments/%v/reactions/%v", org, teamSlug, discussionNumber, commentNumber, reactionID) - - return s.deleteReaction(ctx, url) -} - -// DeleteTeamDiscussionCommentReactionByOrgIDAndTeamID deletes the reaction to a team discussion comment by organization ID and team ID. -// -// GitHub API docs: https://developer.github.com/v3/reactions/#delete-team-discussion-comment-reaction -func (s *ReactionsService) DeleteTeamDiscussionCommentReactionByOrgIDAndTeamID(ctx context.Context, orgID, teamID, discussionNumber, commentNumber int, reactionID int64) (*Response, error) { - url := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments/%v/reactions/%v", orgID, teamID, discussionNumber, commentNumber, reactionID) - - return s.deleteReaction(ctx, url) -} - -func (s ReactionsService) deleteReaction(ctx context.Context, url string) (*Response, error) { - req, err := s.client.NewRequest(http.MethodDelete, url, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/repos.go b/vendor/github.com/google/go-github/v30/github/repos.go deleted file mode 100644 index 41249226..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos.go +++ /dev/null @@ -1,1496 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "encoding/json" - "fmt" - "strings" -) - -// RepositoriesService handles communication with the repository related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/repos/ -type RepositoriesService service - -// Repository represents a GitHub repository. -type Repository struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Owner *User `json:"owner,omitempty"` - Name *string `json:"name,omitempty"` - FullName *string `json:"full_name,omitempty"` - Description *string `json:"description,omitempty"` - Homepage *string `json:"homepage,omitempty"` - CodeOfConduct *CodeOfConduct `json:"code_of_conduct,omitempty"` - DefaultBranch *string `json:"default_branch,omitempty"` - MasterBranch *string `json:"master_branch,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PushedAt *Timestamp `json:"pushed_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CloneURL *string `json:"clone_url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - MirrorURL *string `json:"mirror_url,omitempty"` - SSHURL *string `json:"ssh_url,omitempty"` - SVNURL *string `json:"svn_url,omitempty"` - Language *string `json:"language,omitempty"` - Fork *bool `json:"fork,omitempty"` - ForksCount *int `json:"forks_count,omitempty"` - NetworkCount *int `json:"network_count,omitempty"` - OpenIssuesCount *int `json:"open_issues_count,omitempty"` - StargazersCount *int `json:"stargazers_count,omitempty"` - SubscribersCount *int `json:"subscribers_count,omitempty"` - WatchersCount *int `json:"watchers_count,omitempty"` - Size *int `json:"size,omitempty"` - AutoInit *bool `json:"auto_init,omitempty"` - Parent *Repository `json:"parent,omitempty"` - Source *Repository `json:"source,omitempty"` - TemplateRepository *Repository `json:"template_repository,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Permissions *map[string]bool `json:"permissions,omitempty"` - AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` - AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` - AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` - DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` - Topics []string `json:"topics,omitempty"` - Archived *bool `json:"archived,omitempty"` - Disabled *bool `json:"disabled,omitempty"` - - // Only provided when using RepositoriesService.Get while in preview - License *License `json:"license,omitempty"` - - // Additional mutable fields when creating and editing a repository - Private *bool `json:"private,omitempty"` - HasIssues *bool `json:"has_issues,omitempty"` - HasWiki *bool `json:"has_wiki,omitempty"` - HasPages *bool `json:"has_pages,omitempty"` - HasProjects *bool `json:"has_projects,omitempty"` - HasDownloads *bool `json:"has_downloads,omitempty"` - IsTemplate *bool `json:"is_template,omitempty"` - LicenseTemplate *string `json:"license_template,omitempty"` - GitignoreTemplate *string `json:"gitignore_template,omitempty"` - - // Creating an organization repository. Required for non-owners. - TeamID *int64 `json:"team_id,omitempty"` - - // API URLs - URL *string `json:"url,omitempty"` - ArchiveURL *string `json:"archive_url,omitempty"` - AssigneesURL *string `json:"assignees_url,omitempty"` - BlobsURL *string `json:"blobs_url,omitempty"` - BranchesURL *string `json:"branches_url,omitempty"` - CollaboratorsURL *string `json:"collaborators_url,omitempty"` - CommentsURL *string `json:"comments_url,omitempty"` - CommitsURL *string `json:"commits_url,omitempty"` - CompareURL *string `json:"compare_url,omitempty"` - ContentsURL *string `json:"contents_url,omitempty"` - ContributorsURL *string `json:"contributors_url,omitempty"` - DeploymentsURL *string `json:"deployments_url,omitempty"` - DownloadsURL *string `json:"downloads_url,omitempty"` - EventsURL *string `json:"events_url,omitempty"` - ForksURL *string `json:"forks_url,omitempty"` - GitCommitsURL *string `json:"git_commits_url,omitempty"` - GitRefsURL *string `json:"git_refs_url,omitempty"` - GitTagsURL *string `json:"git_tags_url,omitempty"` - HooksURL *string `json:"hooks_url,omitempty"` - IssueCommentURL *string `json:"issue_comment_url,omitempty"` - IssueEventsURL *string `json:"issue_events_url,omitempty"` - IssuesURL *string `json:"issues_url,omitempty"` - KeysURL *string `json:"keys_url,omitempty"` - LabelsURL *string `json:"labels_url,omitempty"` - LanguagesURL *string `json:"languages_url,omitempty"` - MergesURL *string `json:"merges_url,omitempty"` - MilestonesURL *string `json:"milestones_url,omitempty"` - NotificationsURL *string `json:"notifications_url,omitempty"` - PullsURL *string `json:"pulls_url,omitempty"` - ReleasesURL *string `json:"releases_url,omitempty"` - StargazersURL *string `json:"stargazers_url,omitempty"` - StatusesURL *string `json:"statuses_url,omitempty"` - SubscribersURL *string `json:"subscribers_url,omitempty"` - SubscriptionURL *string `json:"subscription_url,omitempty"` - TagsURL *string `json:"tags_url,omitempty"` - TreesURL *string `json:"trees_url,omitempty"` - TeamsURL *string `json:"teams_url,omitempty"` - - // TextMatches is only populated from search results that request text matches - // See: search.go and https://developer.github.com/v3/search/#text-match-metadata - TextMatches []*TextMatch `json:"text_matches,omitempty"` - - // Visibility is only used for Create and Edit endpoints. The visibility field - // overrides the field parameter when both are used. - // Can be one of public, private or internal. - Visibility *string `json:"visibility,omitempty"` -} - -func (r Repository) String() string { - return Stringify(r) -} - -// BranchListOptions specifies the optional parameters to the -// RepositoriesService.ListBranches method. -type BranchListOptions struct { - // Setting to true returns only protected branches. - // When set to false, only unprotected branches are returned. - // Omitting this parameter returns all branches. - // Default: nil - Protected *bool `url:"protected,omitempty"` - - ListOptions -} - -// RepositoryListOptions specifies the optional parameters to the -// RepositoriesService.List method. -type RepositoryListOptions struct { - // Visibility of repositories to list. Can be one of all, public, or private. - // Default: all - Visibility string `url:"visibility,omitempty"` - - // List repos of given affiliation[s]. - // Comma-separated list of values. Can include: - // * owner: Repositories that are owned by the authenticated user. - // * collaborator: Repositories that the user has been added to as a - // collaborator. - // * organization_member: Repositories that the user has access to through - // being a member of an organization. This includes every repository on - // every team that the user is on. - // Default: owner,collaborator,organization_member - Affiliation string `url:"affiliation,omitempty"` - - // Type of repositories to list. - // Can be one of all, owner, public, private, member. Default: all - // Will cause a 422 error if used in the same request as visibility or - // affiliation. - Type string `url:"type,omitempty"` - - // How to sort the repository list. Can be one of created, updated, pushed, - // full_name. Default: full_name - Sort string `url:"sort,omitempty"` - - // Direction in which to sort repositories. Can be one of asc or desc. - // Default: when using full_name: asc; otherwise desc - Direction string `url:"direction,omitempty"` - - ListOptions -} - -// List the repositories for a user. Passing the empty string will list -// repositories for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-user-repositories -func (s *RepositoriesService) List(ctx context.Context, user string, opts *RepositoryListOptions) ([]*Repository, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/repos", user) - } else { - u = "user/repos" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var repos []*Repository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// RepositoryListByOrgOptions specifies the optional parameters to the -// RepositoriesService.ListByOrg method. -type RepositoryListByOrgOptions struct { - // Type of repositories to list. Possible values are: all, public, private, - // forks, sources, member. Default is "all". - Type string `url:"type,omitempty"` - - // How to sort the repository list. Can be one of created, updated, pushed, - // full_name. Default is "created". - Sort string `url:"sort,omitempty"` - - // Direction in which to sort repositories. Can be one of asc or desc. - // Default when using full_name: asc; otherwise desc. - Direction string `url:"direction,omitempty"` - - ListOptions -} - -// ListByOrg lists the repositories for an organization. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-organization-repositories -func (s *RepositoriesService) ListByOrg(ctx context.Context, org string, opts *RepositoryListByOrgOptions) ([]*Repository, *Response, error) { - u := fmt.Sprintf("orgs/%v/repos", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var repos []*Repository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// RepositoryListAllOptions specifies the optional parameters to the -// RepositoriesService.ListAll method. -type RepositoryListAllOptions struct { - // ID of the last repository seen - Since int64 `url:"since,omitempty"` -} - -// ListAll lists all GitHub repositories in the order that they were created. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-all-public-repositories -func (s *RepositoriesService) ListAll(ctx context.Context, opts *RepositoryListAllOptions) ([]*Repository, *Response, error) { - u, err := addOptions("repositories", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var repos []*Repository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// createRepoRequest is a subset of Repository and is used internally -// by Create to pass only the known fields for the endpoint. -// -// See https://github.com/google/go-github/issues/1014 for more -// information. -type createRepoRequest struct { - // Name is required when creating a repo. - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Homepage *string `json:"homepage,omitempty"` - - Private *bool `json:"private,omitempty"` - Visibility *string `json:"visibility,omitempty"` - HasIssues *bool `json:"has_issues,omitempty"` - HasProjects *bool `json:"has_projects,omitempty"` - HasWiki *bool `json:"has_wiki,omitempty"` - IsTemplate *bool `json:"is_template,omitempty"` - - // Creating an organization repository. Required for non-owners. - TeamID *int64 `json:"team_id,omitempty"` - - AutoInit *bool `json:"auto_init,omitempty"` - GitignoreTemplate *string `json:"gitignore_template,omitempty"` - LicenseTemplate *string `json:"license_template,omitempty"` - AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` - AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` - AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` - DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"` -} - -// Create a new repository. If an organization is specified, the new -// repository will be created under that org. If the empty string is -// specified, it will be created for the authenticated user. -// -// Note that only a subset of the repo fields are used and repo must -// not be nil. -// -// GitHub API docs: https://developer.github.com/v3/repos/#create -func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repository) (*Repository, *Response, error) { - var u string - if org != "" { - u = fmt.Sprintf("orgs/%v/repos", org) - } else { - u = "user/repos" - } - - repoReq := &createRepoRequest{ - Name: repo.Name, - Description: repo.Description, - Homepage: repo.Homepage, - Private: repo.Private, - Visibility: repo.Visibility, - HasIssues: repo.HasIssues, - HasProjects: repo.HasProjects, - HasWiki: repo.HasWiki, - IsTemplate: repo.IsTemplate, - TeamID: repo.TeamID, - AutoInit: repo.AutoInit, - GitignoreTemplate: repo.GitignoreTemplate, - LicenseTemplate: repo.LicenseTemplate, - AllowSquashMerge: repo.AllowSquashMerge, - AllowMergeCommit: repo.AllowMergeCommit, - AllowRebaseMerge: repo.AllowRebaseMerge, - DeleteBranchOnMerge: repo.DeleteBranchOnMerge, - } - - req, err := s.client.NewRequest("POST", u, repoReq) - if err != nil { - return nil, nil, err - } - - acceptHeaders := []string{mediaTypeRepositoryTemplatePreview, mediaTypeRepositoryVisibilityPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - r := new(Repository) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// TemplateRepoRequest represents a request to create a repository from a template. -type TemplateRepoRequest struct { - // Name is required when creating a repo. - Name *string `json:"name,omitempty"` - Owner *string `json:"owner,omitempty"` - Description *string `json:"description,omitempty"` - - Private *bool `json:"private,omitempty"` -} - -// CreateFromTemplate generates a repository from a template. -// -// GitHub API docs: https://developer.github.com/v3/repos/#create-repository-using-a-repository-template -func (s *RepositoriesService) CreateFromTemplate(ctx context.Context, templateOwner, templateRepo string, templateRepoReq *TemplateRepoRequest) (*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/generate", templateOwner, templateRepo) - - req, err := s.client.NewRequest("POST", u, templateRepoReq) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeRepositoryTemplatePreview) - r := new(Repository) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// Get fetches a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#get -func (s *RepositoriesService) Get(ctx context.Context, owner, repo string) (*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when the license support fully launches - // https://developer.github.com/v3/licenses/#get-a-repositorys-license - acceptHeaders := []string{mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview, mediaTypeRepositoryTemplatePreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - repository := new(Repository) - resp, err := s.client.Do(ctx, req, repository) - if err != nil { - return nil, resp, err - } - - return repository, resp, nil -} - -// GetCodeOfConduct gets the contents of a repository's code of conduct. -// -// GitHub API docs: https://developer.github.com/v3/codes_of_conduct/#get-the-contents-of-a-repositorys-code-of-conduct -func (s *RepositoriesService) GetCodeOfConduct(ctx context.Context, owner, repo string) (*CodeOfConduct, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/community/code_of_conduct", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeCodesOfConductPreview) - - coc := new(CodeOfConduct) - resp, err := s.client.Do(ctx, req, coc) - if err != nil { - return nil, resp, err - } - - return coc, resp, nil -} - -// GetByID fetches a repository. -// -// Note: GetByID uses the undocumented GitHub API endpoint /repositories/:id. -func (s *RepositoriesService) GetByID(ctx context.Context, id int64) (*Repository, *Response, error) { - u := fmt.Sprintf("repositories/%d", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - repository := new(Repository) - resp, err := s.client.Do(ctx, req, repository) - if err != nil { - return nil, resp, err - } - - return repository, resp, nil -} - -// Edit updates a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#edit -func (s *RepositoriesService) Edit(ctx context.Context, owner, repo string, repository *Repository) (*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v", owner, repo) - req, err := s.client.NewRequest("PATCH", u, repository) - if err != nil { - return nil, nil, err - } - - acceptHeaders := []string{mediaTypeRepositoryTemplatePreview, mediaTypeRepositoryVisibilityPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - r := new(Repository) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// Delete a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#delete-a-repository -func (s *RepositoriesService) Delete(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v", owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// Contributor represents a repository contributor -type Contributor struct { - Login *string `json:"login,omitempty"` - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - GravatarID *string `json:"gravatar_id,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - FollowersURL *string `json:"followers_url,omitempty"` - FollowingURL *string `json:"following_url,omitempty"` - GistsURL *string `json:"gists_url,omitempty"` - StarredURL *string `json:"starred_url,omitempty"` - SubscriptionsURL *string `json:"subscriptions_url,omitempty"` - OrganizationsURL *string `json:"organizations_url,omitempty"` - ReposURL *string `json:"repos_url,omitempty"` - EventsURL *string `json:"events_url,omitempty"` - ReceivedEventsURL *string `json:"received_events_url,omitempty"` - Type *string `json:"type,omitempty"` - SiteAdmin *bool `json:"site_admin,omitempty"` - Contributions *int `json:"contributions,omitempty"` -} - -// ListContributorsOptions specifies the optional parameters to the -// RepositoriesService.ListContributors method. -type ListContributorsOptions struct { - // Include anonymous contributors in results or not - Anon string `url:"anon,omitempty"` - - ListOptions -} - -// GetVulnerabilityAlerts checks if vulnerability alerts are enabled for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#check-if-vulnerability-alerts-are-enabled-for-a-repository -func (s *RepositoriesService) GetVulnerabilityAlerts(ctx context.Context, owner, repository string) (bool, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/vulnerability-alerts", owner, repository) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredVulnerabilityAlertsPreview) - - resp, err := s.client.Do(ctx, req, nil) - vulnerabilityAlertsEnabled, err := parseBoolResponse(err) - - return vulnerabilityAlertsEnabled, resp, err -} - -// EnableVulnerabilityAlerts enables vulnerability alerts and the dependency graph for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#enable-vulnerability-alerts -func (s *RepositoriesService) EnableVulnerabilityAlerts(ctx context.Context, owner, repository string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/vulnerability-alerts", owner, repository) - - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredVulnerabilityAlertsPreview) - - return s.client.Do(ctx, req, nil) -} - -// DisableVulnerabilityAlerts disables vulnerability alerts and the dependency graph for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#disable-vulnerability-alerts -func (s *RepositoriesService) DisableVulnerabilityAlerts(ctx context.Context, owner, repository string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/vulnerability-alerts", owner, repository) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredVulnerabilityAlertsPreview) - - return s.client.Do(ctx, req, nil) -} - -// EnableAutomatedSecurityFixes enables the automated security fixes for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#enable-automated-security-fixes -func (s *RepositoriesService) EnableAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/automated-security-fixes", owner, repository) - - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredAutomatedSecurityFixesPreview) - - return s.client.Do(ctx, req, nil) -} - -// DisableAutomatedSecurityFixes disables vulnerability alerts and the dependency graph for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#disable-automated-security-fixes -func (s *RepositoriesService) DisableAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/automated-security-fixes", owner, repository) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredAutomatedSecurityFixesPreview) - - return s.client.Do(ctx, req, nil) -} - -// ListContributors lists contributors for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-contributors -func (s *RepositoriesService) ListContributors(ctx context.Context, owner string, repository string, opts *ListContributorsOptions) ([]*Contributor, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/contributors", owner, repository) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var contributor []*Contributor - resp, err := s.client.Do(ctx, req, &contributor) - if err != nil { - return nil, nil, err - } - - return contributor, resp, nil -} - -// ListLanguages lists languages for the specified repository. The returned map -// specifies the languages and the number of bytes of code written in that -// language. For example: -// -// { -// "C": 78769, -// "Python": 7769 -// } -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-languages -func (s *RepositoriesService) ListLanguages(ctx context.Context, owner string, repo string) (map[string]int, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/languages", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - languages := make(map[string]int) - resp, err := s.client.Do(ctx, req, &languages) - if err != nil { - return nil, resp, err - } - - return languages, resp, nil -} - -// ListTeams lists the teams for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-teams -func (s *RepositoriesService) ListTeams(ctx context.Context, owner string, repo string, opts *ListOptions) ([]*Team, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/teams", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teams []*Team - resp, err := s.client.Do(ctx, req, &teams) - if err != nil { - return nil, resp, err - } - - return teams, resp, nil -} - -// RepositoryTag represents a repository tag. -type RepositoryTag struct { - Name *string `json:"name,omitempty"` - Commit *Commit `json:"commit,omitempty"` - ZipballURL *string `json:"zipball_url,omitempty"` - TarballURL *string `json:"tarball_url,omitempty"` -} - -// ListTags lists tags for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-tags -func (s *RepositoriesService) ListTags(ctx context.Context, owner string, repo string, opts *ListOptions) ([]*RepositoryTag, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/tags", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var tags []*RepositoryTag - resp, err := s.client.Do(ctx, req, &tags) - if err != nil { - return nil, resp, err - } - - return tags, resp, nil -} - -// Branch represents a repository branch -type Branch struct { - Name *string `json:"name,omitempty"` - Commit *RepositoryCommit `json:"commit,omitempty"` - Protected *bool `json:"protected,omitempty"` -} - -// Protection represents a repository branch's protection. -type Protection struct { - RequiredStatusChecks *RequiredStatusChecks `json:"required_status_checks"` - RequiredPullRequestReviews *PullRequestReviewsEnforcement `json:"required_pull_request_reviews"` - EnforceAdmins *AdminEnforcement `json:"enforce_admins"` - Restrictions *BranchRestrictions `json:"restrictions"` - RequireLinearHistory *RequireLinearHistory `json:"required_linear_history"` - AllowForcePushes *AllowForcePushes `json:"allow_force_pushes"` - AllowDeletions *AllowDeletions `json:"allow_deletions"` -} - -// ProtectionRequest represents a request to create/edit a branch's protection. -type ProtectionRequest struct { - RequiredStatusChecks *RequiredStatusChecks `json:"required_status_checks"` - RequiredPullRequestReviews *PullRequestReviewsEnforcementRequest `json:"required_pull_request_reviews"` - EnforceAdmins bool `json:"enforce_admins"` - Restrictions *BranchRestrictionsRequest `json:"restrictions"` - // Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. - RequireLinearHistory *bool `json:"required_linear_history,omitempty"` - // Permits force pushes to the protected branch by anyone with write access to the repository. - AllowForcePushes *bool `json:"allow_force_pushes,omitempty"` - // Allows deletion of the protected branch by anyone with write access to the repository. - AllowDeletions *bool `json:"allow_deletions,omitempty"` -} - -// RequiredStatusChecks represents the protection status of a individual branch. -type RequiredStatusChecks struct { - // Require branches to be up to date before merging. (Required.) - Strict bool `json:"strict"` - // The list of status checks to require in order to merge into this - // branch. (Required; use []string{} instead of nil for empty list.) - Contexts []string `json:"contexts"` -} - -// RequiredStatusChecksRequest represents a request to edit a protected branch's status checks. -type RequiredStatusChecksRequest struct { - Strict *bool `json:"strict,omitempty"` - Contexts []string `json:"contexts,omitempty"` -} - -// PullRequestReviewsEnforcement represents the pull request reviews enforcement of a protected branch. -type PullRequestReviewsEnforcement struct { - // Specifies which users and teams can dismiss pull request reviews. - DismissalRestrictions *DismissalRestrictions `json:"dismissal_restrictions,omitempty"` - // Specifies if approved reviews are dismissed automatically, when a new commit is pushed. - DismissStaleReviews bool `json:"dismiss_stale_reviews"` - // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. - RequireCodeOwnerReviews bool `json:"require_code_owner_reviews"` - // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. - // Valid values are 1-6. - RequiredApprovingReviewCount int `json:"required_approving_review_count"` -} - -// PullRequestReviewsEnforcementRequest represents request to set the pull request review -// enforcement of a protected branch. It is separate from PullRequestReviewsEnforcement above -// because the request structure is different from the response structure. -type PullRequestReviewsEnforcementRequest struct { - // Specifies which users and teams should be allowed to dismiss pull request reviews. - // User and team dismissal restrictions are only available for - // organization-owned repositories. Must be nil for personal repositories. - DismissalRestrictionsRequest *DismissalRestrictionsRequest `json:"dismissal_restrictions,omitempty"` - // Specifies if approved reviews can be dismissed automatically, when a new commit is pushed. (Required) - DismissStaleReviews bool `json:"dismiss_stale_reviews"` - // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. - RequireCodeOwnerReviews bool `json:"require_code_owner_reviews"` - // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. - // Valid values are 1-6. - RequiredApprovingReviewCount int `json:"required_approving_review_count"` -} - -// PullRequestReviewsEnforcementUpdate represents request to patch the pull request review -// enforcement of a protected branch. It is separate from PullRequestReviewsEnforcementRequest above -// because the patch request does not require all fields to be initialized. -type PullRequestReviewsEnforcementUpdate struct { - // Specifies which users and teams can dismiss pull request reviews. Can be omitted. - DismissalRestrictionsRequest *DismissalRestrictionsRequest `json:"dismissal_restrictions,omitempty"` - // Specifies if approved reviews can be dismissed automatically, when a new commit is pushed. Can be omitted. - DismissStaleReviews *bool `json:"dismiss_stale_reviews,omitempty"` - // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. - RequireCodeOwnerReviews bool `json:"require_code_owner_reviews,omitempty"` - // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. - // Valid values are 1 - 6. - RequiredApprovingReviewCount int `json:"required_approving_review_count"` -} - -// RequireLinearHistory represents the configuration to enfore branches with no merge commit. -type RequireLinearHistory struct { - Enabled bool `json:"enabled"` -} - -// AllowDeletions represents the configuration to accept deletion of protected branches. -type AllowDeletions struct { - Enabled bool `json:"enabled"` -} - -// AllowForcePushes represents the configuration to accept forced pushes on protected branches. -type AllowForcePushes struct { - Enabled bool `json:"enabled"` -} - -// AdminEnforcement represents the configuration to enforce required status checks for repository administrators. -type AdminEnforcement struct { - URL *string `json:"url,omitempty"` - Enabled bool `json:"enabled"` -} - -// BranchRestrictions represents the restriction that only certain users or -// teams may push to a branch. -type BranchRestrictions struct { - // The list of user logins with push access. - Users []*User `json:"users"` - // The list of team slugs with push access. - Teams []*Team `json:"teams"` - // The list of app slugs with push access. - Apps []*App `json:"apps"` -} - -// BranchRestrictionsRequest represents the request to create/edit the -// restriction that only certain users or teams may push to a branch. It is -// separate from BranchRestrictions above because the request structure is -// different from the response structure. -type BranchRestrictionsRequest struct { - // The list of user logins with push access. (Required; use []string{} instead of nil for empty list.) - Users []string `json:"users"` - // The list of team slugs with push access. (Required; use []string{} instead of nil for empty list.) - Teams []string `json:"teams"` - // The list of app slugs with push access. - Apps []string `json:"apps,omitempty"` -} - -// DismissalRestrictions specifies which users and teams can dismiss pull request reviews. -type DismissalRestrictions struct { - // The list of users who can dimiss pull request reviews. - Users []*User `json:"users"` - // The list of teams which can dismiss pull request reviews. - Teams []*Team `json:"teams"` -} - -// DismissalRestrictionsRequest represents the request to create/edit the -// restriction to allows only specific users or teams to dimiss pull request reviews. It is -// separate from DismissalRestrictions above because the request structure is -// different from the response structure. -// Note: Both Users and Teams must be nil, or both must be non-nil. -type DismissalRestrictionsRequest struct { - // The list of user logins who can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) - Users *[]string `json:"users,omitempty"` - // The list of team slugs which can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) - Teams *[]string `json:"teams,omitempty"` -} - -// SignaturesProtectedBranch represents the protection status of an individual branch. -type SignaturesProtectedBranch struct { - URL *string `json:"url,omitempty"` - // Commits pushed to matching branches must have verified signatures. - Enabled *bool `json:"enabled,omitempty"` -} - -// ListBranches lists branches for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-branches -func (s *RepositoriesService) ListBranches(ctx context.Context, owner string, repo string, opts *BranchListOptions) ([]*Branch, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - var branches []*Branch - resp, err := s.client.Do(ctx, req, &branches) - if err != nil { - return nil, resp, err - } - - return branches, resp, nil -} - -// GetBranch gets the specified branch for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#get-branch -func (s *RepositoriesService) GetBranch(ctx context.Context, owner, repo, branch string) (*Branch, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - b := new(Branch) - resp, err := s.client.Do(ctx, req, b) - if err != nil { - return nil, resp, err - } - - return b, resp, nil -} - -// GetBranchProtection gets the protection of a given branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#get-branch-protection -func (s *RepositoriesService) GetBranchProtection(ctx context.Context, owner, repo, branch string) (*Protection, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - p := new(Protection) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -// GetRequiredStatusChecks gets the required status checks for a given protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#get-required-status-checks-of-protected-branch -func (s *RepositoriesService) GetRequiredStatusChecks(ctx context.Context, owner, repo, branch string) (*RequiredStatusChecks, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_status_checks", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - p := new(RequiredStatusChecks) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -// ListRequiredStatusChecksContexts lists the required status checks contexts for a given protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch -func (s *RepositoriesService) ListRequiredStatusChecksContexts(ctx context.Context, owner, repo, branch string) (contexts []string, resp *Response, err error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_status_checks/contexts", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - resp, err = s.client.Do(ctx, req, &contexts) - if err != nil { - return nil, resp, err - } - - return contexts, resp, nil -} - -// UpdateBranchProtection updates the protection of a given branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#update-branch-protection -func (s *RepositoriesService) UpdateBranchProtection(ctx context.Context, owner, repo, branch string, preq *ProtectionRequest) (*Protection, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection", owner, repo, branch) - req, err := s.client.NewRequest("PUT", u, preq) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - p := new(Protection) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -// RemoveBranchProtection removes the protection of a given branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#remove-branch-protection -func (s *RepositoriesService) RemoveBranchProtection(ctx context.Context, owner, repo, branch string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection", owner, repo, branch) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - return s.client.Do(ctx, req, nil) -} - -// GetSignaturesProtectedBranch gets required signatures of protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#get-required-signatures-of-protected-branch -func (s *RepositoriesService) GetSignaturesProtectedBranch(ctx context.Context, owner, repo, branch string) (*SignaturesProtectedBranch, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_signatures", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeSignaturePreview) - - p := new(SignaturesProtectedBranch) - resp, err := s.client.Do(ctx, req, p) - if err != nil { - return nil, resp, err - } - - return p, resp, nil -} - -// RequireSignaturesOnProtectedBranch makes signed commits required on a protected branch. -// It requires admin access and branch protection to be enabled. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#add-required-signatures-of-protected-branch -func (s *RepositoriesService) RequireSignaturesOnProtectedBranch(ctx context.Context, owner, repo, branch string) (*SignaturesProtectedBranch, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_signatures", owner, repo, branch) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeSignaturePreview) - - r := new(SignaturesProtectedBranch) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, err -} - -// OptionalSignaturesOnProtectedBranch removes required signed commits on a given branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#remove-required-signatures-of-protected-branch -func (s *RepositoriesService) OptionalSignaturesOnProtectedBranch(ctx context.Context, owner, repo, branch string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_signatures", owner, repo, branch) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeSignaturePreview) - - return s.client.Do(ctx, req, nil) -} - -// UpdateRequiredStatusChecks updates the required status checks for a given protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#update-required-status-checks-of-protected-branch -func (s *RepositoriesService) UpdateRequiredStatusChecks(ctx context.Context, owner, repo, branch string, sreq *RequiredStatusChecksRequest) (*RequiredStatusChecks, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_status_checks", owner, repo, branch) - req, err := s.client.NewRequest("PATCH", u, sreq) - if err != nil { - return nil, nil, err - } - - sc := new(RequiredStatusChecks) - resp, err := s.client.Do(ctx, req, sc) - if err != nil { - return nil, resp, err - } - - return sc, resp, nil -} - -// License gets the contents of a repository's license if one is detected. -// -// GitHub API docs: https://developer.github.com/v3/licenses/#get-the-contents-of-a-repositorys-license -func (s *RepositoriesService) License(ctx context.Context, owner, repo string) (*RepositoryLicense, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/license", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - r := &RepositoryLicense{} - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// GetPullRequestReviewEnforcement gets pull request review enforcement of a protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#get-pull-request-review-enforcement-of-protected-branch -func (s *RepositoriesService) GetPullRequestReviewEnforcement(ctx context.Context, owner, repo, branch string) (*PullRequestReviewsEnforcement, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_pull_request_reviews", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - r := new(PullRequestReviewsEnforcement) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// UpdatePullRequestReviewEnforcement patches pull request review enforcement of a protected branch. -// It requires admin access and branch protection to be enabled. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#update-pull-request-review-enforcement-of-protected-branch -func (s *RepositoriesService) UpdatePullRequestReviewEnforcement(ctx context.Context, owner, repo, branch string, patch *PullRequestReviewsEnforcementUpdate) (*PullRequestReviewsEnforcement, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_pull_request_reviews", owner, repo, branch) - req, err := s.client.NewRequest("PATCH", u, patch) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - r := new(PullRequestReviewsEnforcement) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, err -} - -// DisableDismissalRestrictions disables dismissal restrictions of a protected branch. -// It requires admin access and branch protection to be enabled. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#update-pull-request-review-enforcement-of-protected-branch -func (s *RepositoriesService) DisableDismissalRestrictions(ctx context.Context, owner, repo, branch string) (*PullRequestReviewsEnforcement, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_pull_request_reviews", owner, repo, branch) - - data := new(struct { - DismissalRestrictionsRequest `json:"dismissal_restrictions"` - }) - - req, err := s.client.NewRequest("PATCH", u, data) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - r := new(PullRequestReviewsEnforcement) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, err -} - -// RemovePullRequestReviewEnforcement removes pull request enforcement of a protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#remove-pull-request-review-enforcement-of-protected-branch -func (s *RepositoriesService) RemovePullRequestReviewEnforcement(ctx context.Context, owner, repo, branch string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_pull_request_reviews", owner, repo, branch) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - return s.client.Do(ctx, req, nil) -} - -// GetAdminEnforcement gets admin enforcement information of a protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#get-admin-enforcement-of-protected-branch -func (s *RepositoriesService) GetAdminEnforcement(ctx context.Context, owner, repo, branch string) (*AdminEnforcement, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/enforce_admins", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - r := new(AdminEnforcement) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// AddAdminEnforcement adds admin enforcement to a protected branch. -// It requires admin access and branch protection to be enabled. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#add-admin-enforcement-of-protected-branch -func (s *RepositoriesService) AddAdminEnforcement(ctx context.Context, owner, repo, branch string) (*AdminEnforcement, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/enforce_admins", owner, repo, branch) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - r := new(AdminEnforcement) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, err -} - -// RemoveAdminEnforcement removes admin enforcement from a protected branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#remove-admin-enforcement-of-protected-branch -func (s *RepositoriesService) RemoveAdminEnforcement(ctx context.Context, owner, repo, branch string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/enforce_admins", owner, repo, branch) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) - - return s.client.Do(ctx, req, nil) -} - -// repositoryTopics represents a collection of repository topics. -type repositoryTopics struct { - Names []string `json:"names"` -} - -// ListAllTopics lists topics for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#list-all-topics-for-a-repository -func (s *RepositoriesService) ListAllTopics(ctx context.Context, owner, repo string) ([]string, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/topics", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTopicsPreview) - - topics := new(repositoryTopics) - resp, err := s.client.Do(ctx, req, topics) - if err != nil { - return nil, resp, err - } - - return topics.Names, resp, nil -} - -// ReplaceAllTopics replaces topics for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository -func (s *RepositoriesService) ReplaceAllTopics(ctx context.Context, owner, repo string, topics []string) ([]string, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/topics", owner, repo) - t := &repositoryTopics{ - Names: topics, - } - if t.Names == nil { - t.Names = []string{} - } - req, err := s.client.NewRequest("PUT", u, t) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTopicsPreview) - - t = new(repositoryTopics) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t.Names, resp, nil -} - -// ListApps lists the Github apps that have push access to a given protected branch. -// It requires the Github apps to have `write` access to the `content` permission. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#list-apps-with-access-to-protected-branch -func (s *RepositoriesService) ListApps(ctx context.Context, owner, repo, branch string) ([]*App, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/restrictions/apps", owner, repo, branch) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var apps []*App - resp, err := s.client.Do(ctx, req, &apps) - if err != nil { - return nil, resp, err - } - - return apps, resp, nil -} - -// ReplaceAppRestrictions replaces the apps that have push access to a given protected branch. -// It removes all apps that previously had push access and grants push access to the new list of apps. -// It requires the Github apps to have `write` access to the `content` permission. -// -// Note: The list of users, apps, and teams in total is limited to 100 items. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#replace-app-restrictions-of-protected-branch -func (s *RepositoriesService) ReplaceAppRestrictions(ctx context.Context, owner, repo, branch string, slug []string) ([]*App, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/restrictions/apps", owner, repo, branch) - req, err := s.client.NewRequest("PUT", u, slug) - if err != nil { - return nil, nil, err - } - - var apps []*App - resp, err := s.client.Do(ctx, req, &apps) - if err != nil { - return nil, nil, err - } - - return apps, resp, nil -} - -// AddAppRestrictions grants the specified apps push access to a given protected branch. -// It requires the Github apps to have `write` access to the `content` permission. -// -// Note: The list of users, apps, and teams in total is limited to 100 items. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#add-app-restrictions-of-protected-branch -func (s *RepositoriesService) AddAppRestrictions(ctx context.Context, owner, repo, branch string, slug []string) ([]*App, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/restrictions/apps", owner, repo, branch) - req, err := s.client.NewRequest("POST", u, slug) - if err != nil { - return nil, nil, err - } - - var apps []*App - resp, err := s.client.Do(ctx, req, &apps) - if err != nil { - return nil, nil, err - } - - return apps, resp, nil -} - -// RemoveAppRestrictions removes the ability of an app to push to this branch. -// It requires the Github apps to have `write` access to the `content` permission. -// -// Note: The list of users, apps, and teams in total is limited to 100 items. -// -// GitHub API docs: https://developer.github.com/v3/repos/branches/#remove-app-restrictions-of-protected-branch -func (s *RepositoriesService) RemoveAppRestrictions(ctx context.Context, owner, repo, branch string, slug []string) ([]*App, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/restrictions/apps", owner, repo, branch) - req, err := s.client.NewRequest("DELETE", u, slug) - if err != nil { - return nil, nil, err - } - - var apps []*App - resp, err := s.client.Do(ctx, req, &apps) - if err != nil { - return nil, nil, err - } - - return apps, resp, nil -} - -// TransferRequest represents a request to transfer a repository. -type TransferRequest struct { - NewOwner string `json:"new_owner"` - TeamID []int64 `json:"team_ids,omitempty"` -} - -// Transfer transfers a repository from one account or organization to another. -// -// This method might return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it has now scheduled the transfer of the repository in a background task. -// A follow up request, after a delay of a second or so, should result -// in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/#transfer-a-repository -func (s *RepositoriesService) Transfer(ctx context.Context, owner, repo string, transfer TransferRequest) (*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/transfer", owner, repo) - - req, err := s.client.NewRequest("POST", u, &transfer) - if err != nil { - return nil, nil, err - } - - r := new(Repository) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} - -// DispatchRequestOptions represents a request to trigger a repository_dispatch event. -type DispatchRequestOptions struct { - // EventType is a custom webhook event name. (Required.) - EventType string `json:"event_type"` - // ClientPayload is a custom JSON payload with extra information about the webhook event. - // Defaults to an empty JSON object. - ClientPayload *json.RawMessage `json:"client_payload,omitempty"` -} - -// Dispatch triggers a repository_dispatch event in a GitHub Actions workflow. -// -// GitHub API docs: https://developer.github.com/v3/repos/#create-a-repository-dispatch-event -func (s *RepositoriesService) Dispatch(ctx context.Context, owner, repo string, opts DispatchRequestOptions) (*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/dispatches", owner, repo) - - req, err := s.client.NewRequest("POST", u, &opts) - if err != nil { - return nil, nil, err - } - - r := new(Repository) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - - return r, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_collaborators.go b/vendor/github.com/google/go-github/v30/github/repos_collaborators.go deleted file mode 100644 index bdfe04f1..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_collaborators.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListCollaboratorsOptions specifies the optional parameters to the -// RepositoriesService.ListCollaborators method. -type ListCollaboratorsOptions struct { - // Affiliation specifies how collaborators should be filtered by their affiliation. - // Possible values are: - // outside - All outside collaborators of an organization-owned repository - // direct - All collaborators with permissions to an organization-owned repository, - // regardless of organization membership status - // all - All collaborators the authenticated user can see - // - // Default value is "all". - Affiliation string `url:"affiliation,omitempty"` - - ListOptions -} - -// CollaboratorInvitation represents an invitation created when adding a collaborator. -// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#response-when-a-new-invitation-is-created -type CollaboratorInvitation struct { - ID *int64 `json:"id,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Invitee *User `json:"invitee,omitempty"` - Inviter *User `json:"inviter,omitempty"` - Permissions *string `json:"permissions,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` -} - -// ListCollaborators lists the GitHub users that have access to the repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#list-collaborators -func (s *RepositoriesService) ListCollaborators(ctx context.Context, owner, repo string, opts *ListCollaboratorsOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/collaborators", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var users []*User - resp, err := s.client.Do(ctx, req, &users) - if err != nil { - return nil, resp, err - } - - return users, resp, nil -} - -// IsCollaborator checks whether the specified GitHub user has collaborator -// access to the given repo. -// Note: This will return false if the user is not a collaborator OR the user -// is not a GitHub user. -// -// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#get -func (s *RepositoriesService) IsCollaborator(ctx context.Context, owner, repo, user string) (bool, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - isCollab, err := parseBoolResponse(err) - return isCollab, resp, err -} - -// RepositoryPermissionLevel represents the permission level an organization -// member has for a given repository. -type RepositoryPermissionLevel struct { - // Possible values: "admin", "write", "read", "none" - Permission *string `json:"permission,omitempty"` - - User *User `json:"user,omitempty"` -} - -// GetPermissionLevel retrieves the specific permission level a collaborator has for a given repository. -// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level -func (s *RepositoriesService) GetPermissionLevel(ctx context.Context, owner, repo, user string) (*RepositoryPermissionLevel, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/collaborators/%v/permission", owner, repo, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - rpl := new(RepositoryPermissionLevel) - resp, err := s.client.Do(ctx, req, rpl) - if err != nil { - return nil, resp, err - } - return rpl, resp, nil -} - -// RepositoryAddCollaboratorOptions specifies the optional parameters to the -// RepositoriesService.AddCollaborator method. -type RepositoryAddCollaboratorOptions struct { - // Permission specifies the permission to grant the user on this repository. - // Possible values are: - // pull - team members can pull, but not push to or administer this repository - // push - team members can pull and push, but not administer this repository - // admin - team members can pull, push and administer this repository - // - // Default value is "push". This option is only valid for organization-owned repositories. - Permission string `json:"permission,omitempty"` -} - -// AddCollaborator sends an invitation to the specified GitHub user -// to become a collaborator to the given repo. -// -// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator -func (s *RepositoriesService) AddCollaborator(ctx context.Context, owner, repo, user string, opts *RepositoryAddCollaboratorOptions) (*CollaboratorInvitation, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - acr := new(CollaboratorInvitation) - resp, err := s.client.Do(ctx, req, acr) - if err != nil { - return nil, resp, err - } - return acr, resp, nil -} - -// RemoveCollaborator removes the specified GitHub user as collaborator from the given repo. -// Note: Does not return error if a valid user that is not a collaborator is removed. -// -// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#remove-collaborator -func (s *RepositoriesService) RemoveCollaborator(ctx context.Context, owner, repo, user string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_comments.go b/vendor/github.com/google/go-github/v30/github/repos_comments.go deleted file mode 100644 index 891825f9..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_comments.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// RepositoryComment represents a comment for a commit, file, or line in a repository. -type RepositoryComment struct { - HTMLURL *string `json:"html_url,omitempty"` - URL *string `json:"url,omitempty"` - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - User *User `json:"user,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - - // User-mutable fields - Body *string `json:"body"` - // User-initialized fields - Path *string `json:"path,omitempty"` - Position *int `json:"position,omitempty"` -} - -func (r RepositoryComment) String() string { - return Stringify(r) -} - -// ListComments lists all the comments for the repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository -func (s *RepositoriesService) ListComments(ctx context.Context, owner, repo string, opts *ListOptions) ([]*RepositoryComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var comments []*RepositoryComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// ListCommitComments lists all the comments for a given commit SHA. -// -// GitHub API docs: https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit -func (s *RepositoriesService) ListCommitComments(ctx context.Context, owner, repo, sha string, opts *ListOptions) ([]*RepositoryComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/comments", owner, repo, sha) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - var comments []*RepositoryComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// CreateComment creates a comment for the given commit. -// Note: GitHub allows for comments to be created for non-existing files and positions. -// -// GitHub API docs: https://developer.github.com/v3/repos/comments/#create-a-commit-comment -func (s *RepositoriesService) CreateComment(ctx context.Context, owner, repo, sha string, comment *RepositoryComment) (*RepositoryComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/comments", owner, repo, sha) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - - c := new(RepositoryComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// GetComment gets a single comment from a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment -func (s *RepositoriesService) GetComment(ctx context.Context, owner, repo string, id int64) (*RepositoryComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) - - c := new(RepositoryComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// UpdateComment updates the body of a single comment. -// -// GitHub API docs: https://developer.github.com/v3/repos/comments/#update-a-commit-comment -func (s *RepositoriesService) UpdateComment(ctx context.Context, owner, repo string, id int64, comment *RepositoryComment) (*RepositoryComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id) - req, err := s.client.NewRequest("PATCH", u, comment) - if err != nil { - return nil, nil, err - } - - c := new(RepositoryComment) - resp, err := s.client.Do(ctx, req, c) - if err != nil { - return nil, resp, err - } - - return c, resp, nil -} - -// DeleteComment deletes a single comment from a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/comments/#delete-a-commit-comment -func (s *RepositoriesService) DeleteComment(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_commits.go b/vendor/github.com/google/go-github/v30/github/repos_commits.go deleted file mode 100644 index 77bd7481..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_commits.go +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "bytes" - "context" - "fmt" - "time" -) - -// RepositoryCommit represents a commit in a repo. -// Note that it's wrapping a Commit, so author/committer information is in two places, -// but contain different details about them: in RepositoryCommit "github details", in Commit - "git details". -type RepositoryCommit struct { - NodeID *string `json:"node_id,omitempty"` - SHA *string `json:"sha,omitempty"` - Commit *Commit `json:"commit,omitempty"` - Author *User `json:"author,omitempty"` - Committer *User `json:"committer,omitempty"` - Parents []*Commit `json:"parents,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - URL *string `json:"url,omitempty"` - CommentsURL *string `json:"comments_url,omitempty"` - - // Details about how many changes were made in this commit. Only filled in during GetCommit! - Stats *CommitStats `json:"stats,omitempty"` - // Details about which files, and how this commit touched. Only filled in during GetCommit! - Files []*CommitFile `json:"files,omitempty"` -} - -func (r RepositoryCommit) String() string { - return Stringify(r) -} - -// CommitStats represents the number of additions / deletions from a file in a given RepositoryCommit or GistCommit. -type CommitStats struct { - Additions *int `json:"additions,omitempty"` - Deletions *int `json:"deletions,omitempty"` - Total *int `json:"total,omitempty"` -} - -func (c CommitStats) String() string { - return Stringify(c) -} - -// CommitFile represents a file modified in a commit. -type CommitFile struct { - SHA *string `json:"sha,omitempty"` - Filename *string `json:"filename,omitempty"` - Additions *int `json:"additions,omitempty"` - Deletions *int `json:"deletions,omitempty"` - Changes *int `json:"changes,omitempty"` - Status *string `json:"status,omitempty"` - Patch *string `json:"patch,omitempty"` - BlobURL *string `json:"blob_url,omitempty"` - RawURL *string `json:"raw_url,omitempty"` - ContentsURL *string `json:"contents_url,omitempty"` - PreviousFilename *string `json:"previous_filename,omitempty"` -} - -func (c CommitFile) String() string { - return Stringify(c) -} - -// CommitsComparison is the result of comparing two commits. -// See CompareCommits() for details. -type CommitsComparison struct { - BaseCommit *RepositoryCommit `json:"base_commit,omitempty"` - MergeBaseCommit *RepositoryCommit `json:"merge_base_commit,omitempty"` - - // Head can be 'behind' or 'ahead' - Status *string `json:"status,omitempty"` - AheadBy *int `json:"ahead_by,omitempty"` - BehindBy *int `json:"behind_by,omitempty"` - TotalCommits *int `json:"total_commits,omitempty"` - - Commits []*RepositoryCommit `json:"commits,omitempty"` - - Files []*CommitFile `json:"files,omitempty"` - - HTMLURL *string `json:"html_url,omitempty"` - PermalinkURL *string `json:"permalink_url,omitempty"` - DiffURL *string `json:"diff_url,omitempty"` - PatchURL *string `json:"patch_url,omitempty"` - URL *string `json:"url,omitempty"` // API URL. -} - -func (c CommitsComparison) String() string { - return Stringify(c) -} - -// CommitsListOptions specifies the optional parameters to the -// RepositoriesService.ListCommits method. -type CommitsListOptions struct { - // SHA or branch to start listing Commits from. - SHA string `url:"sha,omitempty"` - - // Path that should be touched by the returned Commits. - Path string `url:"path,omitempty"` - - // Author of by which to filter Commits. - Author string `url:"author,omitempty"` - - // Since when should Commits be included in the response. - Since time.Time `url:"since,omitempty"` - - // Until when should Commits be included in the response. - Until time.Time `url:"until,omitempty"` - - ListOptions -} - -// BranchCommit is the result of listing branches with commit SHA. -type BranchCommit struct { - Name *string `json:"name,omitempty"` - Commit *Commit `json:"commit,omitempty"` - Protected *bool `json:"protected,omitempty"` -} - -// ListCommits lists the commits of a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/commits/#list -func (s *RepositoriesService) ListCommits(ctx context.Context, owner, repo string, opts *CommitsListOptions) ([]*RepositoryCommit, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var commits []*RepositoryCommit - resp, err := s.client.Do(ctx, req, &commits) - if err != nil { - return nil, resp, err - } - - return commits, resp, nil -} - -// GetCommit fetches the specified commit, including all details about it. -// -// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-a-single-commit -// See also: https://developer.github.com/v3/git/commits/#get-a-single-commit provides the same functionality -func (s *RepositoriesService) GetCommit(ctx context.Context, owner, repo, sha string) (*RepositoryCommit, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v", owner, repo, sha) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - commit := new(RepositoryCommit) - resp, err := s.client.Do(ctx, req, commit) - if err != nil { - return nil, resp, err - } - - return commit, resp, nil -} - -// GetCommitRaw fetches the specified commit in raw (diff or patch) format. -func (s *RepositoriesService) GetCommitRaw(ctx context.Context, owner string, repo string, sha string, opts RawOptions) (string, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v", owner, repo, sha) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return "", nil, err - } - - switch opts.Type { - case Diff: - req.Header.Set("Accept", mediaTypeV3Diff) - case Patch: - req.Header.Set("Accept", mediaTypeV3Patch) - default: - return "", nil, fmt.Errorf("unsupported raw type %d", opts.Type) - } - - var buf bytes.Buffer - resp, err := s.client.Do(ctx, req, &buf) - if err != nil { - return "", resp, err - } - - return buf.String(), resp, nil -} - -// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is -// supplied and no new commits have occurred, a 304 Unmodified response is returned. -// -// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-the-sha-1-of-a-commit-reference -func (s *RepositoriesService) GetCommitSHA1(ctx context.Context, owner, repo, ref, lastSHA string) (string, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v", owner, repo, refURLEscape(ref)) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return "", nil, err - } - if lastSHA != "" { - req.Header.Set("If-None-Match", `"`+lastSHA+`"`) - } - - req.Header.Set("Accept", mediaTypeV3SHA) - - var buf bytes.Buffer - resp, err := s.client.Do(ctx, req, &buf) - if err != nil { - return "", resp, err - } - - return buf.String(), resp, nil -} - -// CompareCommits compares a range of commits with each other. -// todo: support media formats - https://github.com/google/go-github/issues/6 -// -// GitHub API docs: https://developer.github.com/v3/repos/commits/#compare-two-commits -func (s *RepositoriesService) CompareCommits(ctx context.Context, owner, repo string, base, head string) (*CommitsComparison, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/compare/%v...%v", owner, repo, base, head) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - comp := new(CommitsComparison) - resp, err := s.client.Do(ctx, req, comp) - if err != nil { - return nil, resp, err - } - - return comp, resp, nil -} - -// ListBranchesHeadCommit gets all branches where the given commit SHA is the HEAD, -// or latest commit for the branch. -// -// GitHub API docs: https://developer.github.com/v3/repos/commits/#list-branches-for-head-commit -func (s *RepositoriesService) ListBranchesHeadCommit(ctx context.Context, owner, repo, sha string) ([]*BranchCommit, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/branches-where-head", owner, repo, sha) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeListPullsOrBranchesForCommitPreview) - var branchCommits []*BranchCommit - resp, err := s.client.Do(ctx, req, &branchCommits) - if err != nil { - return nil, resp, err - } - - return branchCommits, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_community_health.go b/vendor/github.com/google/go-github/v30/github/repos_community_health.go deleted file mode 100644 index 73d1d573..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_community_health.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// Metric represents the different fields for one file in community health files. -type Metric struct { - Name *string `json:"name"` - Key *string `json:"key"` - URL *string `json:"url"` - HTMLURL *string `json:"html_url"` -} - -// CommunityHealthFiles represents the different files in the community health metrics response. -type CommunityHealthFiles struct { - CodeOfConduct *Metric `json:"code_of_conduct"` - Contributing *Metric `json:"contributing"` - IssueTemplate *Metric `json:"issue_template"` - PullRequestTemplate *Metric `json:"pull_request_template"` - License *Metric `json:"license"` - Readme *Metric `json:"readme"` -} - -// CommunityHealthMetrics represents a response containing the community metrics of a repository. -type CommunityHealthMetrics struct { - HealthPercentage *int `json:"health_percentage"` - Files *CommunityHealthFiles `json:"files"` - UpdatedAt *time.Time `json:"updated_at"` -} - -// GetCommunityHealthMetrics retrieves all the community health metrics for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/community/#retrieve-community-health-metrics -func (s *RepositoriesService) GetCommunityHealthMetrics(ctx context.Context, owner, repo string) (*CommunityHealthMetrics, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/community/profile", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeRepositoryCommunityHealthMetricsPreview) - - metrics := &CommunityHealthMetrics{} - resp, err := s.client.Do(ctx, req, metrics) - if err != nil { - return nil, resp, err - } - - return metrics, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_contents.go b/vendor/github.com/google/go-github/v30/github/repos_contents.go deleted file mode 100644 index ede93e4f..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_contents.go +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Repository contents API methods. -// GitHub API docs: https://developer.github.com/v3/repos/contents/ - -package github - -import ( - "context" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "path" -) - -// RepositoryContent represents a file or directory in a github repository. -type RepositoryContent struct { - Type *string `json:"type,omitempty"` - // Target is only set if the type is "symlink" and the target is not a normal file. - // If Target is set, Path will be the symlink path. - Target *string `json:"target,omitempty"` - Encoding *string `json:"encoding,omitempty"` - Size *int `json:"size,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - // Content contains the actual file content, which may be encoded. - // Callers should call GetContent which will decode the content if - // necessary. - Content *string `json:"content,omitempty"` - SHA *string `json:"sha,omitempty"` - URL *string `json:"url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - DownloadURL *string `json:"download_url,omitempty"` -} - -// RepositoryContentResponse holds the parsed response from CreateFile, UpdateFile, and DeleteFile. -type RepositoryContentResponse struct { - Content *RepositoryContent `json:"content,omitempty"` - Commit `json:"commit,omitempty"` -} - -// RepositoryContentFileOptions specifies optional parameters for CreateFile, UpdateFile, and DeleteFile. -type RepositoryContentFileOptions struct { - Message *string `json:"message,omitempty"` - Content []byte `json:"content,omitempty"` // unencoded - SHA *string `json:"sha,omitempty"` - Branch *string `json:"branch,omitempty"` - Author *CommitAuthor `json:"author,omitempty"` - Committer *CommitAuthor `json:"committer,omitempty"` -} - -// RepositoryContentGetOptions represents an optional ref parameter, which can be a SHA, -// branch, or tag -type RepositoryContentGetOptions struct { - Ref string `url:"ref,omitempty"` -} - -// String converts RepositoryContent to a string. It's primarily for testing. -func (r RepositoryContent) String() string { - return Stringify(r) -} - -// GetContent returns the content of r, decoding it if necessary. -func (r *RepositoryContent) GetContent() (string, error) { - var encoding string - if r.Encoding != nil { - encoding = *r.Encoding - } - - switch encoding { - case "base64": - if r.Content == nil { - return "", errors.New("malformed response: base64 encoding of null content") - } - c, err := base64.StdEncoding.DecodeString(*r.Content) - return string(c), err - case "": - if r.Content == nil { - return "", nil - } - return *r.Content, nil - default: - return "", fmt.Errorf("unsupported content encoding: %v", encoding) - } -} - -// GetReadme gets the Readme file for the repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-the-readme -func (s *RepositoriesService) GetReadme(ctx context.Context, owner, repo string, opts *RepositoryContentGetOptions) (*RepositoryContent, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/readme", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - readme := new(RepositoryContent) - resp, err := s.client.Do(ctx, req, readme) - if err != nil { - return nil, resp, err - } - return readme, resp, nil -} - -// DownloadContents returns an io.ReadCloser that reads the contents of the -// specified file. This function will work with files of any size, as opposed -// to GetContents which is limited to 1 Mb files. It is the caller's -// responsibility to close the ReadCloser. -func (s *RepositoriesService) DownloadContents(ctx context.Context, owner, repo, filepath string, opts *RepositoryContentGetOptions) (io.ReadCloser, error) { - dir := path.Dir(filepath) - filename := path.Base(filepath) - _, dirContents, _, err := s.GetContents(ctx, owner, repo, dir, opts) - if err != nil { - return nil, err - } - for _, contents := range dirContents { - if *contents.Name == filename { - if contents.DownloadURL == nil || *contents.DownloadURL == "" { - return nil, fmt.Errorf("No download link found for %s", filepath) - } - resp, err := s.client.client.Get(*contents.DownloadURL) - if err != nil { - return nil, err - } - return resp.Body, nil - } - } - return nil, fmt.Errorf("No file named %s found in %s", filename, dir) -} - -// GetContents can return either the metadata and content of a single file -// (when path references a file) or the metadata of all the files and/or -// subdirectories of a directory (when path references a directory). To make it -// easy to distinguish between both result types and to mimic the API as much -// as possible, both result types will be returned but only one will contain a -// value and the other will be nil. -// -// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-contents -func (s *RepositoriesService) GetContents(ctx context.Context, owner, repo, path string, opts *RepositoryContentGetOptions) (fileContent *RepositoryContent, directoryContent []*RepositoryContent, resp *Response, err error) { - escapedPath := (&url.URL{Path: path}).String() - u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, escapedPath) - u, err = addOptions(u, opts) - if err != nil { - return nil, nil, nil, err - } - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, nil, err - } - var rawJSON json.RawMessage - resp, err = s.client.Do(ctx, req, &rawJSON) - if err != nil { - return nil, nil, resp, err - } - fileUnmarshalError := json.Unmarshal(rawJSON, &fileContent) - if fileUnmarshalError == nil { - return fileContent, nil, resp, nil - } - directoryUnmarshalError := json.Unmarshal(rawJSON, &directoryContent) - if directoryUnmarshalError == nil { - return nil, directoryContent, resp, nil - } - return nil, nil, resp, fmt.Errorf("unmarshalling failed for both file and directory content: %s and %s", fileUnmarshalError, directoryUnmarshalError) -} - -// CreateFile creates a new file in a repository at the given path and returns -// the commit and file metadata. -// -// GitHub API docs: https://developer.github.com/v3/repos/contents/#create-a-file -func (s *RepositoriesService) CreateFile(ctx context.Context, owner, repo, path string, opts *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - createResponse := new(RepositoryContentResponse) - resp, err := s.client.Do(ctx, req, createResponse) - if err != nil { - return nil, resp, err - } - return createResponse, resp, nil -} - -// UpdateFile updates a file in a repository at the given path and returns the -// commit and file metadata. Requires the blob SHA of the file being updated. -// -// GitHub API docs: https://developer.github.com/v3/repos/contents/#update-a-file -func (s *RepositoriesService) UpdateFile(ctx context.Context, owner, repo, path string, opts *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - updateResponse := new(RepositoryContentResponse) - resp, err := s.client.Do(ctx, req, updateResponse) - if err != nil { - return nil, resp, err - } - return updateResponse, resp, nil -} - -// DeleteFile deletes a file from a repository and returns the commit. -// Requires the blob SHA of the file to be deleted. -// -// GitHub API docs: https://developer.github.com/v3/repos/contents/#delete-a-file -func (s *RepositoriesService) DeleteFile(ctx context.Context, owner, repo, path string, opts *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path) - req, err := s.client.NewRequest("DELETE", u, opts) - if err != nil { - return nil, nil, err - } - deleteResponse := new(RepositoryContentResponse) - resp, err := s.client.Do(ctx, req, deleteResponse) - if err != nil { - return nil, resp, err - } - return deleteResponse, resp, nil -} - -// archiveFormat is used to define the archive type when calling GetArchiveLink. -type archiveFormat string - -const ( - // Tarball specifies an archive in gzipped tar format. - Tarball archiveFormat = "tarball" - - // Zipball specifies an archive in zip format. - Zipball archiveFormat = "zipball" -) - -// GetArchiveLink returns an URL to download a tarball or zipball archive for a -// repository. The archiveFormat can be specified by either the github.Tarball -// or github.Zipball constant. -// -// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-archive-link -func (s *RepositoriesService) GetArchiveLink(ctx context.Context, owner, repo string, archiveformat archiveFormat, opts *RepositoryContentGetOptions, followRedirects bool) (*url.URL, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/%s", owner, repo, archiveformat) - if opts != nil && opts.Ref != "" { - u += fmt.Sprintf("/%s", opts.Ref) - } - resp, err := s.getArchiveLinkFromURL(ctx, u, followRedirects) - if err != nil { - return nil, nil, err - } - if resp.StatusCode != http.StatusFound { - return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status) - } - parsedURL, err := url.Parse(resp.Header.Get("Location")) - return parsedURL, newResponse(resp), err -} - -func (s *RepositoriesService) getArchiveLinkFromURL(ctx context.Context, u string, followRedirects bool) (*http.Response, error) { - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, err - } - - var resp *http.Response - // Use http.DefaultTransport if no custom Transport is configured - req = withContext(ctx, req) - if s.client.client.Transport == nil { - resp, err = http.DefaultTransport.RoundTrip(req) - } else { - resp, err = s.client.client.Transport.RoundTrip(req) - } - if err != nil { - return nil, err - } - resp.Body.Close() - - // If redirect response is returned, follow it - if followRedirects && resp.StatusCode == http.StatusMovedPermanently { - u = resp.Header.Get("Location") - resp, err = s.getArchiveLinkFromURL(ctx, u, false) - } - return resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_deployments.go b/vendor/github.com/google/go-github/v30/github/repos_deployments.go deleted file mode 100644 index ace1778e..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_deployments.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "encoding/json" - "fmt" - "strings" -) - -// Deployment represents a deployment in a repo -type Deployment struct { - URL *string `json:"url,omitempty"` - ID *int64 `json:"id,omitempty"` - SHA *string `json:"sha,omitempty"` - Ref *string `json:"ref,omitempty"` - Task *string `json:"task,omitempty"` - Payload json.RawMessage `json:"payload,omitempty"` - Environment *string `json:"environment,omitempty"` - Description *string `json:"description,omitempty"` - Creator *User `json:"creator,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - StatusesURL *string `json:"statuses_url,omitempty"` - RepositoryURL *string `json:"repository_url,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -// DeploymentRequest represents a deployment request -type DeploymentRequest struct { - Ref *string `json:"ref,omitempty"` - Task *string `json:"task,omitempty"` - AutoMerge *bool `json:"auto_merge,omitempty"` - RequiredContexts *[]string `json:"required_contexts,omitempty"` - Payload interface{} `json:"payload,omitempty"` - Environment *string `json:"environment,omitempty"` - Description *string `json:"description,omitempty"` - TransientEnvironment *bool `json:"transient_environment,omitempty"` - ProductionEnvironment *bool `json:"production_environment,omitempty"` -} - -// DeploymentsListOptions specifies the optional parameters to the -// RepositoriesService.ListDeployments method. -type DeploymentsListOptions struct { - // SHA of the Deployment. - SHA string `url:"sha,omitempty"` - - // List deployments for a given ref. - Ref string `url:"ref,omitempty"` - - // List deployments for a given task. - Task string `url:"task,omitempty"` - - // List deployments for a given environment. - Environment string `url:"environment,omitempty"` - - ListOptions -} - -// ListDeployments lists the deployments of a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/deployments/#list-deployments -func (s *RepositoriesService) ListDeployments(ctx context.Context, owner, repo string, opts *DeploymentsListOptions) ([]*Deployment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/deployments", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var deployments []*Deployment - resp, err := s.client.Do(ctx, req, &deployments) - if err != nil { - return nil, resp, err - } - - return deployments, resp, nil -} - -// GetDeployment returns a single deployment of a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/deployments/#get-a-single-deployment -func (s *RepositoriesService) GetDeployment(ctx context.Context, owner, repo string, deploymentID int64) (*Deployment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/deployments/%v", owner, repo, deploymentID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - deployment := new(Deployment) - resp, err := s.client.Do(ctx, req, deployment) - if err != nil { - return nil, resp, err - } - - return deployment, resp, nil -} - -// CreateDeployment creates a new deployment for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/deployments/#create-a-deployment -func (s *RepositoriesService) CreateDeployment(ctx context.Context, owner, repo string, request *DeploymentRequest) (*Deployment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/deployments", owner, repo) - - req, err := s.client.NewRequest("POST", u, request) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - d := new(Deployment) - resp, err := s.client.Do(ctx, req, d) - if err != nil { - return nil, resp, err - } - - return d, resp, nil -} - -// DeploymentStatus represents the status of a -// particular deployment. -type DeploymentStatus struct { - ID *int64 `json:"id,omitempty"` - // State is the deployment state. - // Possible values are: "pending", "success", "failure", "error", "inactive". - State *string `json:"state,omitempty"` - Creator *User `json:"creator,omitempty"` - Description *string `json:"description,omitempty"` - TargetURL *string `json:"target_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - DeploymentURL *string `json:"deployment_url,omitempty"` - RepositoryURL *string `json:"repository_url,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -// DeploymentStatusRequest represents a deployment request -type DeploymentStatusRequest struct { - State *string `json:"state,omitempty"` - LogURL *string `json:"log_url,omitempty"` - Description *string `json:"description,omitempty"` - Environment *string `json:"environment,omitempty"` - EnvironmentURL *string `json:"environment_url,omitempty"` - AutoInactive *bool `json:"auto_inactive,omitempty"` -} - -// ListDeploymentStatuses lists the statuses of a given deployment of a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/deployments/#list-deployment-statuses -func (s *RepositoriesService) ListDeploymentStatuses(ctx context.Context, owner, repo string, deployment int64, opts *ListOptions) ([]*DeploymentStatus, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses", owner, repo, deployment) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var statuses []*DeploymentStatus - resp, err := s.client.Do(ctx, req, &statuses) - if err != nil { - return nil, resp, err - } - - return statuses, resp, nil -} - -// GetDeploymentStatus returns a single deployment status of a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/deployments/#get-a-single-deployment-status -func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, repo string, deploymentID, deploymentStatusID int64) (*DeploymentStatus, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses/%v", owner, repo, deploymentID, deploymentStatusID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - d := new(DeploymentStatus) - resp, err := s.client.Do(ctx, req, d) - if err != nil { - return nil, resp, err - } - - return d, resp, nil -} - -// CreateDeploymentStatus creates a new status for a deployment. -// -// GitHub API docs: https://developer.github.com/v3/repos/deployments/#create-a-deployment-status -func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner, repo string, deployment int64, request *DeploymentStatusRequest) (*DeploymentStatus, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses", owner, repo, deployment) - - req, err := s.client.NewRequest("POST", u, request) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - d := new(DeploymentStatus) - resp, err := s.client.Do(ctx, req, d) - if err != nil { - return nil, resp, err - } - - return d, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_forks.go b/vendor/github.com/google/go-github/v30/github/repos_forks.go deleted file mode 100644 index 5973587d..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_forks.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - - "encoding/json" -) - -// RepositoryListForksOptions specifies the optional parameters to the -// RepositoriesService.ListForks method. -type RepositoryListForksOptions struct { - // How to sort the forks list. Possible values are: newest, oldest, - // watchers. Default is "newest". - Sort string `url:"sort,omitempty"` - - ListOptions -} - -// ListForks lists the forks of the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/forks/#list-forks -func (s *RepositoriesService) ListForks(ctx context.Context, owner, repo string, opts *RepositoryListForksOptions) ([]*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/forks", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when topics API fully launches. - req.Header.Set("Accept", mediaTypeTopicsPreview) - - var repos []*Repository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// RepositoryCreateForkOptions specifies the optional parameters to the -// RepositoriesService.CreateFork method. -type RepositoryCreateForkOptions struct { - // The organization to fork the repository into. - Organization string `url:"organization,omitempty"` -} - -// CreateFork creates a fork of the specified repository. -// -// This method might return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it is now computing creating the fork in a background task. In this event, -// the Repository value will be returned, which includes the details about the pending fork. -// A follow up request, after a delay of a second or so, should result -// in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/forks/#create-a-fork -func (s *RepositoriesService) CreateFork(ctx context.Context, owner, repo string, opts *RepositoryCreateForkOptions) (*Repository, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/forks", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - fork := new(Repository) - resp, err := s.client.Do(ctx, req, fork) - if err != nil { - // Persist AcceptedError's metadata to the Repository object. - if aerr, ok := err.(*AcceptedError); ok { - if err := json.Unmarshal(aerr.Raw, fork); err != nil { - return fork, resp, err - } - - return fork, resp, err - } - return nil, resp, err - } - - return fork, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_hooks.go b/vendor/github.com/google/go-github/v30/github/repos_hooks.go deleted file mode 100644 index 5af71dfd..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_hooks.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// WebHookPayload represents the data that is received from GitHub when a push -// event hook is triggered. The format of these payloads pre-date most of the -// GitHub v3 API, so there are lots of minor incompatibilities with the types -// defined in the rest of the API. Therefore, several types are duplicated -// here to account for these differences. -// -// GitHub API docs: https://help.github.com/articles/post-receive-hooks -type WebHookPayload struct { - After *string `json:"after,omitempty"` - Before *string `json:"before,omitempty"` - Commits []*WebHookCommit `json:"commits,omitempty"` - Compare *string `json:"compare,omitempty"` - Created *bool `json:"created,omitempty"` - Deleted *bool `json:"deleted,omitempty"` - Forced *bool `json:"forced,omitempty"` - HeadCommit *WebHookCommit `json:"head_commit,omitempty"` - Pusher *User `json:"pusher,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` -} - -func (w WebHookPayload) String() string { - return Stringify(w) -} - -// WebHookCommit represents the commit variant we receive from GitHub in a -// WebHookPayload. -type WebHookCommit struct { - Added []string `json:"added,omitempty"` - Author *WebHookAuthor `json:"author,omitempty"` - Committer *WebHookAuthor `json:"committer,omitempty"` - Distinct *bool `json:"distinct,omitempty"` - ID *string `json:"id,omitempty"` - Message *string `json:"message,omitempty"` - Modified []string `json:"modified,omitempty"` - Removed []string `json:"removed,omitempty"` - Timestamp *time.Time `json:"timestamp,omitempty"` -} - -func (w WebHookCommit) String() string { - return Stringify(w) -} - -// WebHookAuthor represents the author or committer of a commit, as specified -// in a WebHookCommit. The commit author may not correspond to a GitHub User. -type WebHookAuthor struct { - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - Username *string `json:"username,omitempty"` -} - -func (w WebHookAuthor) String() string { - return Stringify(w) -} - -// Hook represents a GitHub (web and service) hook for a repository. -type Hook struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - URL *string `json:"url,omitempty"` - ID *int64 `json:"id,omitempty"` - - // Only the following fields are used when creating a hook. - // Config is required. - Config map[string]interface{} `json:"config,omitempty"` - Events []string `json:"events,omitempty"` - Active *bool `json:"active,omitempty"` -} - -func (h Hook) String() string { - return Stringify(h) -} - -// createHookRequest is a subset of Hook and is used internally -// by CreateHook to pass only the known fields for the endpoint. -// -// See https://github.com/google/go-github/issues/1015 for more -// information. -type createHookRequest struct { - // Config is required. - Name string `json:"name"` - Config map[string]interface{} `json:"config,omitempty"` - Events []string `json:"events,omitempty"` - Active *bool `json:"active,omitempty"` -} - -// CreateHook creates a Hook for the specified repository. -// Config is a required field. -// -// Note that only a subset of the hook fields are used and hook must -// not be nil. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#create-a-hook -func (s *RepositoriesService) CreateHook(ctx context.Context, owner, repo string, hook *Hook) (*Hook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo) - - hookReq := &createHookRequest{ - Name: "web", - Events: hook.Events, - Active: hook.Active, - Config: hook.Config, - } - - req, err := s.client.NewRequest("POST", u, hookReq) - if err != nil { - return nil, nil, err - } - - h := new(Hook) - resp, err := s.client.Do(ctx, req, h) - if err != nil { - return nil, resp, err - } - - return h, resp, nil -} - -// ListHooks lists all Hooks for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#list -func (s *RepositoriesService) ListHooks(ctx context.Context, owner, repo string, opts *ListOptions) ([]*Hook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var hooks []*Hook - resp, err := s.client.Do(ctx, req, &hooks) - if err != nil { - return nil, resp, err - } - - return hooks, resp, nil -} - -// GetHook returns a single specified Hook. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#get-single-hook -func (s *RepositoriesService) GetHook(ctx context.Context, owner, repo string, id int64) (*Hook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - h := new(Hook) - resp, err := s.client.Do(ctx, req, h) - if err != nil { - return nil, resp, err - } - - return h, resp, nil -} - -// EditHook updates a specified Hook. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#edit-a-hook -func (s *RepositoriesService) EditHook(ctx context.Context, owner, repo string, id int64, hook *Hook) (*Hook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id) - req, err := s.client.NewRequest("PATCH", u, hook) - if err != nil { - return nil, nil, err - } - h := new(Hook) - resp, err := s.client.Do(ctx, req, h) - if err != nil { - return nil, resp, err - } - - return h, resp, nil -} - -// DeleteHook deletes a specified Hook. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#delete-a-hook -func (s *RepositoriesService) DeleteHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// PingHook triggers a 'ping' event to be sent to the Hook. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#ping-a-hook -func (s *RepositoriesService) PingHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks/%d/pings", owner, repo, id) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// TestHook triggers a test Hook by github. -// -// GitHub API docs: https://developer.github.com/v3/repos/hooks/#test-a-push-hook -func (s *RepositoriesService) TestHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/hooks/%d/tests", owner, repo, id) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_invitations.go b/vendor/github.com/google/go-github/v30/github/repos_invitations.go deleted file mode 100644 index 6e76f2d5..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_invitations.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" -) - -// RepositoryInvitation represents an invitation to collaborate on a repo. -type RepositoryInvitation struct { - ID *int64 `json:"id,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Invitee *User `json:"invitee,omitempty"` - Inviter *User `json:"inviter,omitempty"` - - // Permissions represents the permissions that the associated user will have - // on the repository. Possible values are: "read", "write", "admin". - Permissions *string `json:"permissions,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` -} - -// ListInvitations lists all currently-open repository invitations. -// -// GitHub API docs: https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository -func (s *RepositoriesService) ListInvitations(ctx context.Context, owner, repo string, opts *ListOptions) ([]*RepositoryInvitation, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/invitations", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - invites := []*RepositoryInvitation{} - resp, err := s.client.Do(ctx, req, &invites) - if err != nil { - return nil, resp, err - } - - return invites, resp, nil -} - -// DeleteInvitation deletes a repository invitation. -// -// GitHub API docs: https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation -func (s *RepositoriesService) DeleteInvitation(ctx context.Context, owner, repo string, invitationID int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/invitations/%v", owner, repo, invitationID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// UpdateInvitation updates the permissions associated with a repository -// invitation. -// -// permissions represents the permissions that the associated user will have -// on the repository. Possible values are: "read", "write", "admin". -// -// GitHub API docs: https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation -func (s *RepositoriesService) UpdateInvitation(ctx context.Context, owner, repo string, invitationID int64, permissions string) (*RepositoryInvitation, *Response, error) { - opts := &struct { - Permissions string `json:"permissions"` - }{Permissions: permissions} - u := fmt.Sprintf("repos/%v/%v/invitations/%v", owner, repo, invitationID) - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - invite := &RepositoryInvitation{} - resp, err := s.client.Do(ctx, req, invite) - if err != nil { - return nil, resp, err - } - - return invite, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_keys.go b/vendor/github.com/google/go-github/v30/github/repos_keys.go deleted file mode 100644 index 64ee7422..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_keys.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// The Key type is defined in users_keys.go - -// ListKeys lists the deploy keys for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/keys/#list -func (s *RepositoriesService) ListKeys(ctx context.Context, owner string, repo string, opts *ListOptions) ([]*Key, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/keys", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var keys []*Key - resp, err := s.client.Do(ctx, req, &keys) - if err != nil { - return nil, resp, err - } - - return keys, resp, nil -} - -// GetKey fetches a single deploy key. -// -// GitHub API docs: https://developer.github.com/v3/repos/keys/#get -func (s *RepositoriesService) GetKey(ctx context.Context, owner string, repo string, id int64) (*Key, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - key := new(Key) - resp, err := s.client.Do(ctx, req, key) - if err != nil { - return nil, resp, err - } - - return key, resp, nil -} - -// CreateKey adds a deploy key for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/keys/#create -func (s *RepositoriesService) CreateKey(ctx context.Context, owner string, repo string, key *Key) (*Key, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/keys", owner, repo) - - req, err := s.client.NewRequest("POST", u, key) - if err != nil { - return nil, nil, err - } - - k := new(Key) - resp, err := s.client.Do(ctx, req, k) - if err != nil { - return nil, resp, err - } - - return k, resp, nil -} - -// EditKey edits a deploy key. -// -// GitHub API docs: https://developer.github.com/v3/repos/keys/#edit -func (s *RepositoriesService) EditKey(ctx context.Context, owner string, repo string, id int64, key *Key) (*Key, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id) - - req, err := s.client.NewRequest("PATCH", u, key) - if err != nil { - return nil, nil, err - } - - k := new(Key) - resp, err := s.client.Do(ctx, req, k) - if err != nil { - return nil, resp, err - } - - return k, resp, nil -} - -// DeleteKey deletes a deploy key. -// -// GitHub API docs: https://developer.github.com/v3/repos/keys/#delete -func (s *RepositoriesService) DeleteKey(ctx context.Context, owner string, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_merging.go b/vendor/github.com/google/go-github/v30/github/repos_merging.go deleted file mode 100644 index 04383c1a..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_merging.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" -) - -// RepositoryMergeRequest represents a request to merge a branch in a -// repository. -type RepositoryMergeRequest struct { - Base *string `json:"base,omitempty"` - Head *string `json:"head,omitempty"` - CommitMessage *string `json:"commit_message,omitempty"` -} - -// Merge a branch in the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/merging/#perform-a-merge -func (s *RepositoriesService) Merge(ctx context.Context, owner, repo string, request *RepositoryMergeRequest) (*RepositoryCommit, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/merges", owner, repo) - req, err := s.client.NewRequest("POST", u, request) - if err != nil { - return nil, nil, err - } - - commit := new(RepositoryCommit) - resp, err := s.client.Do(ctx, req, commit) - if err != nil { - return nil, resp, err - } - - return commit, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_pages.go b/vendor/github.com/google/go-github/v30/github/repos_pages.go deleted file mode 100644 index 58826527..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_pages.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Pages represents a GitHub Pages site configuration. -type Pages struct { - URL *string `json:"url,omitempty"` - Status *string `json:"status,omitempty"` - CNAME *string `json:"cname,omitempty"` - Custom404 *bool `json:"custom_404,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Source *PagesSource `json:"source,omitempty"` -} - -// PagesSource represents a GitHub page's source. -type PagesSource struct { - Branch *string `json:"branch,omitempty"` - Path *string `json:"path,omitempty"` -} - -// PagesError represents a build error for a GitHub Pages site. -type PagesError struct { - Message *string `json:"message,omitempty"` -} - -// PagesBuild represents the build information for a GitHub Pages site. -type PagesBuild struct { - URL *string `json:"url,omitempty"` - Status *string `json:"status,omitempty"` - Error *PagesError `json:"error,omitempty"` - Pusher *User `json:"pusher,omitempty"` - Commit *string `json:"commit,omitempty"` - Duration *int `json:"duration,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` -} - -// createPagesRequest is a subset of Pages and is used internally -// by EnablePages to pass only the known fields for the endpoint. -type createPagesRequest struct { - Source *PagesSource `json:"source,omitempty"` -} - -// EnablePages enables GitHub Pages for the named repo. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#enable-a-pages-site -func (s *RepositoriesService) EnablePages(ctx context.Context, owner, repo string, pages *Pages) (*Pages, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages", owner, repo) - - pagesReq := &createPagesRequest{ - Source: pages.Source, - } - - req, err := s.client.NewRequest("POST", u, pagesReq) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeEnablePagesAPIPreview) - - enable := new(Pages) - resp, err := s.client.Do(ctx, req, enable) - if err != nil { - return nil, resp, err - } - - return enable, resp, nil -} - -// PagesUpdate sets up parameters needed to update a GitHub Pages site. -type PagesUpdate struct { - // CNAME represents a custom domain for the repository. - // Leaving CNAME empty will remove the custom domain. - CNAME *string `json:"cname"` - // Source must include the branch name, and may optionally specify the subdirectory "/docs". - // Possible values are: "gh-pages", "master", and "master /docs". - Source *string `json:"source,omitempty"` -} - -// UpdatePages updates GitHub Pages for the named repo. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#update-information-about-a-pages-site -func (s *RepositoriesService) UpdatePages(ctx context.Context, owner, repo string, opts *PagesUpdate) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages", owner, repo) - - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - if err != nil { - return resp, err - } - - return resp, nil -} - -// DisablePages disables GitHub Pages for the named repo. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#disable-a-pages-site -func (s *RepositoriesService) DisablePages(ctx context.Context, owner, repo string) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages", owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeEnablePagesAPIPreview) - - return s.client.Do(ctx, req, nil) -} - -// GetPagesInfo fetches information about a GitHub Pages site. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site -func (s *RepositoriesService) GetPagesInfo(ctx context.Context, owner, repo string) (*Pages, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - site := new(Pages) - resp, err := s.client.Do(ctx, req, site) - if err != nil { - return nil, resp, err - } - - return site, resp, nil -} - -// ListPagesBuilds lists the builds for a GitHub Pages site. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#list-pages-builds -func (s *RepositoriesService) ListPagesBuilds(ctx context.Context, owner, repo string, opts *ListOptions) ([]*PagesBuild, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages/builds", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var pages []*PagesBuild - resp, err := s.client.Do(ctx, req, &pages) - if err != nil { - return nil, resp, err - } - - return pages, resp, nil -} - -// GetLatestPagesBuild fetches the latest build information for a GitHub pages site. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#list-latest-pages-build -func (s *RepositoriesService) GetLatestPagesBuild(ctx context.Context, owner, repo string) (*PagesBuild, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages/builds/latest", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - build := new(PagesBuild) - resp, err := s.client.Do(ctx, req, build) - if err != nil { - return nil, resp, err - } - - return build, resp, nil -} - -// GetPageBuild fetches the specific build information for a GitHub pages site. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#list-a-specific-pages-build -func (s *RepositoriesService) GetPageBuild(ctx context.Context, owner, repo string, id int64) (*PagesBuild, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages/builds/%v", owner, repo, id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - build := new(PagesBuild) - resp, err := s.client.Do(ctx, req, build) - if err != nil { - return nil, resp, err - } - - return build, resp, nil -} - -// RequestPageBuild requests a build of a GitHub Pages site without needing to push new commit. -// -// GitHub API docs: https://developer.github.com/v3/repos/pages/#request-a-page-build -func (s *RepositoriesService) RequestPageBuild(ctx context.Context, owner, repo string) (*PagesBuild, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pages/builds", owner, repo) - req, err := s.client.NewRequest("POST", u, nil) - if err != nil { - return nil, nil, err - } - - build := new(PagesBuild) - resp, err := s.client.Do(ctx, req, build) - if err != nil { - return nil, resp, err - } - - return build, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v30/github/repos_prereceive_hooks.go deleted file mode 100644 index 1ce6478d..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_prereceive_hooks.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" -) - -// PreReceiveHook represents a GitHub pre-receive hook for a repository. -type PreReceiveHook struct { - ID *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Enforcement *string `json:"enforcement,omitempty"` - ConfigURL *string `json:"configuration_url,omitempty"` -} - -func (p PreReceiveHook) String() string { - return Stringify(p) -} - -// ListPreReceiveHooks lists all pre-receive hooks for the specified repository. -// -// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#list-pre-receive-hooks -func (s *RepositoriesService) ListPreReceiveHooks(ctx context.Context, owner, repo string, opts *ListOptions) ([]*PreReceiveHook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) - - var hooks []*PreReceiveHook - resp, err := s.client.Do(ctx, req, &hooks) - if err != nil { - return nil, resp, err - } - - return hooks, resp, nil -} - -// GetPreReceiveHook returns a single specified pre-receive hook. -// -// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#get-a-single-pre-receive-hook -func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo string, id int64) (*PreReceiveHook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) - - h := new(PreReceiveHook) - resp, err := s.client.Do(ctx, req, h) - if err != nil { - return nil, resp, err - } - - return h, resp, nil -} - -// UpdatePreReceiveHook updates a specified pre-receive hook. -// -// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#update-pre-receive-hook-enforcement -func (s *RepositoriesService) UpdatePreReceiveHook(ctx context.Context, owner, repo string, id int64, hook *PreReceiveHook) (*PreReceiveHook, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id) - req, err := s.client.NewRequest("PATCH", u, hook) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) - - h := new(PreReceiveHook) - resp, err := s.client.Do(ctx, req, h) - if err != nil { - return nil, resp, err - } - - return h, resp, nil -} - -// DeletePreReceiveHook deletes a specified pre-receive hook. -// -// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#remove-enforcement-overrides-for-a-pre-receive-hook -func (s *RepositoriesService) DeletePreReceiveHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_projects.go b/vendor/github.com/google/go-github/v30/github/repos_projects.go deleted file mode 100644 index 442f5232..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_projects.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ProjectListOptions specifies the optional parameters to the -// OrganizationsService.ListProjects and RepositoriesService.ListProjects methods. -type ProjectListOptions struct { - // Indicates the state of the projects to return. Can be either open, closed, or all. Default: open - State string `url:"state,omitempty"` - - ListOptions -} - -// ListProjects lists the projects for a repo. -// -// GitHub API docs: https://developer.github.com/v3/projects/#list-repository-projects -func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo string, opts *ProjectListOptions) ([]*Project, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/projects", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// CreateProject creates a GitHub Project for the specified repository. -// -// GitHub API docs: https://developer.github.com/v3/projects/#create-a-repository-project -func (s *RepositoriesService) CreateProject(ctx context.Context, owner, repo string, opts *ProjectOptions) (*Project, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/projects", owner, repo) - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept headers when APIs fully launch. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_releases.go b/vendor/github.com/google/go-github/v30/github/repos_releases.go deleted file mode 100644 index 6cd64c7f..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_releases.go +++ /dev/null @@ -1,401 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "errors" - "fmt" - "io" - "mime" - "net/http" - "os" - "path/filepath" - "strings" -) - -// RepositoryRelease represents a GitHub release in a repository. -type RepositoryRelease struct { - TagName *string `json:"tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Draft *bool `json:"draft,omitempty"` - Prerelease *bool `json:"prerelease,omitempty"` - - // The following fields are not used in CreateRelease or EditRelease: - ID *int64 `json:"id,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PublishedAt *Timestamp `json:"published_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - AssetsURL *string `json:"assets_url,omitempty"` - Assets []*ReleaseAsset `json:"assets,omitempty"` - UploadURL *string `json:"upload_url,omitempty"` - ZipballURL *string `json:"zipball_url,omitempty"` - TarballURL *string `json:"tarball_url,omitempty"` - Author *User `json:"author,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (r RepositoryRelease) String() string { - return Stringify(r) -} - -// ReleaseAsset represents a GitHub release asset in a repository. -type ReleaseAsset struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - Label *string `json:"label,omitempty"` - State *string `json:"state,omitempty"` - ContentType *string `json:"content_type,omitempty"` - Size *int `json:"size,omitempty"` - DownloadCount *int `json:"download_count,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - BrowserDownloadURL *string `json:"browser_download_url,omitempty"` - Uploader *User `json:"uploader,omitempty"` - NodeID *string `json:"node_id,omitempty"` -} - -func (r ReleaseAsset) String() string { - return Stringify(r) -} - -// ListReleases lists the releases for a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository -func (s *RepositoriesService) ListReleases(ctx context.Context, owner, repo string, opts *ListOptions) ([]*RepositoryRelease, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var releases []*RepositoryRelease - resp, err := s.client.Do(ctx, req, &releases) - if err != nil { - return nil, resp, err - } - return releases, resp, nil -} - -// GetRelease fetches a single release. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release -func (s *RepositoriesService) GetRelease(ctx context.Context, owner, repo string, id int64) (*RepositoryRelease, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) - return s.getSingleRelease(ctx, u) -} - -// GetLatestRelease fetches the latest published release for the repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-the-latest-release -func (s *RepositoriesService) GetLatestRelease(ctx context.Context, owner, repo string) (*RepositoryRelease, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/latest", owner, repo) - return s.getSingleRelease(ctx, u) -} - -// GetReleaseByTag fetches a release with the specified tag. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name -func (s *RepositoriesService) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*RepositoryRelease, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/tags/%s", owner, repo, tag) - return s.getSingleRelease(ctx, u) -} - -func (s *RepositoriesService) getSingleRelease(ctx context.Context, url string) (*RepositoryRelease, *Response, error) { - req, err := s.client.NewRequest("GET", url, nil) - if err != nil { - return nil, nil, err - } - - release := new(RepositoryRelease) - resp, err := s.client.Do(ctx, req, release) - if err != nil { - return nil, resp, err - } - return release, resp, nil -} - -// repositoryReleaseRequest is a subset of RepositoryRelease and -// is used internally by CreateRelease and EditRelease to pass -// only the known fields for these endpoints. -// -// See https://github.com/google/go-github/issues/992 for more -// information. -type repositoryReleaseRequest struct { - TagName *string `json:"tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Draft *bool `json:"draft,omitempty"` - Prerelease *bool `json:"prerelease,omitempty"` -} - -// CreateRelease adds a new release for a repository. -// -// Note that only a subset of the release fields are used. -// See RepositoryRelease for more information. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#create-a-release -func (s *RepositoriesService) CreateRelease(ctx context.Context, owner, repo string, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases", owner, repo) - - releaseReq := &repositoryReleaseRequest{ - TagName: release.TagName, - TargetCommitish: release.TargetCommitish, - Name: release.Name, - Body: release.Body, - Draft: release.Draft, - Prerelease: release.Prerelease, - } - - req, err := s.client.NewRequest("POST", u, releaseReq) - if err != nil { - return nil, nil, err - } - - r := new(RepositoryRelease) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - return r, resp, nil -} - -// EditRelease edits a repository release. -// -// Note that only a subset of the release fields are used. -// See RepositoryRelease for more information. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release -func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo string, id int64, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) - - releaseReq := &repositoryReleaseRequest{ - TagName: release.TagName, - TargetCommitish: release.TargetCommitish, - Name: release.Name, - Body: release.Body, - Draft: release.Draft, - Prerelease: release.Prerelease, - } - - req, err := s.client.NewRequest("PATCH", u, releaseReq) - if err != nil { - return nil, nil, err - } - - r := new(RepositoryRelease) - resp, err := s.client.Do(ctx, req, r) - if err != nil { - return nil, resp, err - } - return r, resp, nil -} - -// DeleteRelease delete a single release from a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#delete-a-release -func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// ListReleaseAssets lists the release's assets. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#list-assets-for-a-release -func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo string, id int64, opts *ListOptions) ([]*ReleaseAsset, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var assets []*ReleaseAsset - resp, err := s.client.Do(ctx, req, &assets) - if err != nil { - return nil, resp, err - } - return assets, resp, nil -} - -// GetReleaseAsset fetches a single release asset. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release-asset -func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo string, id int64) (*ReleaseAsset, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - asset := new(ReleaseAsset) - resp, err := s.client.Do(ctx, req, asset) - if err != nil { - return nil, resp, err - } - return asset, resp, nil -} - -// DownloadReleaseAsset downloads a release asset or returns a redirect URL. -// -// DownloadReleaseAsset returns an io.ReadCloser that reads the contents of the -// specified release asset. It is the caller's responsibility to close the ReadCloser. -// If a redirect is returned, the redirect URL will be returned as a string instead -// of the io.ReadCloser. Exactly one of rc and redirectURL will be zero. -// -// followRedirectsClient can be passed to download the asset from a redirected -// location. Passing http.DefaultClient is recommended unless special circumstances -// exist, but it's possible to pass any http.Client. If nil is passed the -// redirectURL will be returned instead. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release-asset -func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, repo string, id int64, followRedirectsClient *http.Client) (rc io.ReadCloser, redirectURL string, err error) { - u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, "", err - } - req.Header.Set("Accept", defaultMediaType) - - s.client.clientMu.Lock() - defer s.client.clientMu.Unlock() - - var loc string - saveRedirect := s.client.client.CheckRedirect - s.client.client.CheckRedirect = func(req *http.Request, via []*http.Request) error { - loc = req.URL.String() - return errors.New("disable redirect") - } - defer func() { s.client.client.CheckRedirect = saveRedirect }() - - req = withContext(ctx, req) - resp, err := s.client.client.Do(req) - if err != nil { - if !strings.Contains(err.Error(), "disable redirect") { - return nil, "", err - } - if followRedirectsClient != nil { - rc, err := s.downloadReleaseAssetFromURL(ctx, followRedirectsClient, loc) - return rc, "", err - } - return nil, loc, nil // Intentionally return no error with valid redirect URL. - } - - if err := CheckResponse(resp); err != nil { - resp.Body.Close() - return nil, "", err - } - - return resp.Body, "", nil -} - -func (s *RepositoriesService) downloadReleaseAssetFromURL(ctx context.Context, followRedirectsClient *http.Client, url string) (rc io.ReadCloser, err error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - req = withContext(ctx, req) - req.Header.Set("Accept", "*/*") - resp, err := followRedirectsClient.Do(req) - if err != nil { - return nil, err - } - if err := CheckResponse(resp); err != nil { - resp.Body.Close() - return nil, err - } - return resp.Body, nil -} - -// EditReleaseAsset edits a repository release asset. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release-asset -func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo string, id int64, release *ReleaseAsset) (*ReleaseAsset, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) - - req, err := s.client.NewRequest("PATCH", u, release) - if err != nil { - return nil, nil, err - } - - asset := new(ReleaseAsset) - resp, err := s.client.Do(ctx, req, asset) - if err != nil { - return nil, resp, err - } - return asset, resp, nil -} - -// DeleteReleaseAsset delete a single release asset from a repository. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#delete-a-release-asset -func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, repo string, id int64) (*Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - return s.client.Do(ctx, req, nil) -} - -// UploadReleaseAsset creates an asset by uploading a file into a release repository. -// To upload assets that cannot be represented by an os.File, call NewUploadRequest directly. -// -// GitHub API docs: https://developer.github.com/v3/repos/releases/#upload-a-release-asset -func (s *RepositoriesService) UploadReleaseAsset(ctx context.Context, owner, repo string, id int64, opts *UploadOptions, file *os.File) (*ReleaseAsset, *Response, error) { - u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - stat, err := file.Stat() - if err != nil { - return nil, nil, err - } - if stat.IsDir() { - return nil, nil, errors.New("the asset to upload can't be a directory") - } - - mediaType := mime.TypeByExtension(filepath.Ext(file.Name())) - if opts.MediaType != "" { - mediaType = opts.MediaType - } - - req, err := s.client.NewUploadRequest(u, file, stat.Size(), mediaType) - if err != nil { - return nil, nil, err - } - - asset := new(ReleaseAsset) - resp, err := s.client.Do(ctx, req, asset) - if err != nil { - return nil, resp, err - } - return asset, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_stats.go b/vendor/github.com/google/go-github/v30/github/repos_stats.go deleted file mode 100644 index e9c6d3ff..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_stats.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// ContributorStats represents a contributor to a repository and their -// weekly contributions to a given repo. -type ContributorStats struct { - Author *Contributor `json:"author,omitempty"` - Total *int `json:"total,omitempty"` - Weeks []*WeeklyStats `json:"weeks,omitempty"` -} - -func (c ContributorStats) String() string { - return Stringify(c) -} - -// WeeklyStats represents the number of additions, deletions and commits -// a Contributor made in a given week. -type WeeklyStats struct { - Week *Timestamp `json:"w,omitempty"` - Additions *int `json:"a,omitempty"` - Deletions *int `json:"d,omitempty"` - Commits *int `json:"c,omitempty"` -} - -func (w WeeklyStats) String() string { - return Stringify(w) -} - -// ListContributorsStats gets a repo's contributor list with additions, -// deletions and commit counts. -// -// If this is the first time these statistics are requested for the given -// repository, this method will return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it is now computing the requested statistics. A follow up request, after a -// delay of a second or so, should result in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/statistics/#contributors -func (s *RepositoriesService) ListContributorsStats(ctx context.Context, owner, repo string) ([]*ContributorStats, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/stats/contributors", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var contributorStats []*ContributorStats - resp, err := s.client.Do(ctx, req, &contributorStats) - if err != nil { - return nil, resp, err - } - - return contributorStats, resp, nil -} - -// WeeklyCommitActivity represents the weekly commit activity for a repository. -// The days array is a group of commits per day, starting on Sunday. -type WeeklyCommitActivity struct { - Days []int `json:"days,omitempty"` - Total *int `json:"total,omitempty"` - Week *Timestamp `json:"week,omitempty"` -} - -func (w WeeklyCommitActivity) String() string { - return Stringify(w) -} - -// ListCommitActivity returns the last year of commit activity -// grouped by week. The days array is a group of commits per day, -// starting on Sunday. -// -// If this is the first time these statistics are requested for the given -// repository, this method will return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it is now computing the requested statistics. A follow up request, after a -// delay of a second or so, should result in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/statistics/#commit-activity -func (s *RepositoriesService) ListCommitActivity(ctx context.Context, owner, repo string) ([]*WeeklyCommitActivity, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/stats/commit_activity", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var weeklyCommitActivity []*WeeklyCommitActivity - resp, err := s.client.Do(ctx, req, &weeklyCommitActivity) - if err != nil { - return nil, resp, err - } - - return weeklyCommitActivity, resp, nil -} - -// ListCodeFrequency returns a weekly aggregate of the number of additions and -// deletions pushed to a repository. Returned WeeklyStats will contain -// additions and deletions, but not total commits. -// -// If this is the first time these statistics are requested for the given -// repository, this method will return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it is now computing the requested statistics. A follow up request, after a -// delay of a second or so, should result in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/statistics/#code-frequency -func (s *RepositoriesService) ListCodeFrequency(ctx context.Context, owner, repo string) ([]*WeeklyStats, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/stats/code_frequency", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var weeks [][]int - resp, err := s.client.Do(ctx, req, &weeks) - - // convert int slices into WeeklyStats - var stats []*WeeklyStats - for _, week := range weeks { - if len(week) != 3 { - continue - } - stat := &WeeklyStats{ - Week: &Timestamp{time.Unix(int64(week[0]), 0)}, - Additions: Int(week[1]), - Deletions: Int(week[2]), - } - stats = append(stats, stat) - } - - return stats, resp, err -} - -// RepositoryParticipation is the number of commits by everyone -// who has contributed to the repository (including the owner) -// as well as the number of commits by the owner themself. -type RepositoryParticipation struct { - All []int `json:"all,omitempty"` - Owner []int `json:"owner,omitempty"` -} - -func (r RepositoryParticipation) String() string { - return Stringify(r) -} - -// ListParticipation returns the total commit counts for the 'owner' -// and total commit counts in 'all'. 'all' is everyone combined, -// including the 'owner' in the last 52 weeks. If you’d like to get -// the commit counts for non-owners, you can subtract 'all' from 'owner'. -// -// The array order is oldest week (index 0) to most recent week. -// -// If this is the first time these statistics are requested for the given -// repository, this method will return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it is now computing the requested statistics. A follow up request, after a -// delay of a second or so, should result in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/statistics/#participation -func (s *RepositoriesService) ListParticipation(ctx context.Context, owner, repo string) (*RepositoryParticipation, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/stats/participation", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - participation := new(RepositoryParticipation) - resp, err := s.client.Do(ctx, req, participation) - if err != nil { - return nil, resp, err - } - - return participation, resp, nil -} - -// PunchCard represents the number of commits made during a given hour of a -// day of the week. -type PunchCard struct { - Day *int // Day of the week (0-6: =Sunday - Saturday). - Hour *int // Hour of day (0-23). - Commits *int // Number of commits. -} - -// ListPunchCard returns the number of commits per hour in each day. -// -// If this is the first time these statistics are requested for the given -// repository, this method will return an *AcceptedError and a status code of -// 202. This is because this is the status that GitHub returns to signify that -// it is now computing the requested statistics. A follow up request, after a -// delay of a second or so, should result in a successful request. -// -// GitHub API docs: https://developer.github.com/v3/repos/statistics/#punch-card -func (s *RepositoriesService) ListPunchCard(ctx context.Context, owner, repo string) ([]*PunchCard, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/stats/punch_card", owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var results [][]int - resp, err := s.client.Do(ctx, req, &results) - - // convert int slices into Punchcards - var cards []*PunchCard - for _, result := range results { - if len(result) != 3 { - continue - } - card := &PunchCard{ - Day: Int(result[0]), - Hour: Int(result[1]), - Commits: Int(result[2]), - } - cards = append(cards, card) - } - - return cards, resp, err -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_statuses.go b/vendor/github.com/google/go-github/v30/github/repos_statuses.go deleted file mode 100644 index cd7e4241..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_statuses.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// RepoStatus represents the status of a repository at a particular reference. -type RepoStatus struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - URL *string `json:"url,omitempty"` - - // State is the current state of the repository. Possible values are: - // pending, success, error, or failure. - State *string `json:"state,omitempty"` - - // TargetURL is the URL of the page representing this status. It will be - // linked from the GitHub UI to allow users to see the source of the status. - TargetURL *string `json:"target_url,omitempty"` - - // Description is a short high level summary of the status. - Description *string `json:"description,omitempty"` - - // A string label to differentiate this status from the statuses of other systems. - Context *string `json:"context,omitempty"` - - Creator *User `json:"creator,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` -} - -func (r RepoStatus) String() string { - return Stringify(r) -} - -// ListStatuses lists the statuses of a repository at the specified -// reference. ref can be a SHA, a branch name, or a tag name. -// -// GitHub API docs: https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref -func (s *RepositoriesService) ListStatuses(ctx context.Context, owner, repo, ref string, opts *ListOptions) ([]*RepoStatus, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/statuses", owner, repo, refURLEscape(ref)) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var statuses []*RepoStatus - resp, err := s.client.Do(ctx, req, &statuses) - if err != nil { - return nil, resp, err - } - - return statuses, resp, nil -} - -// CreateStatus creates a new status for a repository at the specified -// reference. Ref can be a SHA, a branch name, or a tag name. -// -// GitHub API docs: https://developer.github.com/v3/repos/statuses/#create-a-status -func (s *RepositoriesService) CreateStatus(ctx context.Context, owner, repo, ref string, status *RepoStatus) (*RepoStatus, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/statuses/%v", owner, repo, refURLEscape(ref)) - req, err := s.client.NewRequest("POST", u, status) - if err != nil { - return nil, nil, err - } - - repoStatus := new(RepoStatus) - resp, err := s.client.Do(ctx, req, repoStatus) - if err != nil { - return nil, resp, err - } - - return repoStatus, resp, nil -} - -// CombinedStatus represents the combined status of a repository at a particular reference. -type CombinedStatus struct { - // State is the combined state of the repository. Possible values are: - // failure, pending, or success. - State *string `json:"state,omitempty"` - - Name *string `json:"name,omitempty"` - SHA *string `json:"sha,omitempty"` - TotalCount *int `json:"total_count,omitempty"` - Statuses []*RepoStatus `json:"statuses,omitempty"` - - CommitURL *string `json:"commit_url,omitempty"` - RepositoryURL *string `json:"repository_url,omitempty"` -} - -func (s CombinedStatus) String() string { - return Stringify(s) -} - -// GetCombinedStatus returns the combined status of a repository at the specified -// reference. ref can be a SHA, a branch name, or a tag name. -// -// GitHub API docs: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref -func (s *RepositoriesService) GetCombinedStatus(ctx context.Context, owner, repo, ref string, opts *ListOptions) (*CombinedStatus, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/commits/%v/status", owner, repo, refURLEscape(ref)) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - status := new(CombinedStatus) - resp, err := s.client.Do(ctx, req, status) - if err != nil { - return nil, resp, err - } - - return status, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/repos_traffic.go b/vendor/github.com/google/go-github/v30/github/repos_traffic.go deleted file mode 100644 index e7ee1884..00000000 --- a/vendor/github.com/google/go-github/v30/github/repos_traffic.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" -) - -// TrafficReferrer represent information about traffic from a referrer . -type TrafficReferrer struct { - Referrer *string `json:"referrer,omitempty"` - Count *int `json:"count,omitempty"` - Uniques *int `json:"uniques,omitempty"` -} - -// TrafficPath represent information about the traffic on a path of the repo. -type TrafficPath struct { - Path *string `json:"path,omitempty"` - Title *string `json:"title,omitempty"` - Count *int `json:"count,omitempty"` - Uniques *int `json:"uniques,omitempty"` -} - -// TrafficData represent information about a specific timestamp in views or clones list. -type TrafficData struct { - Timestamp *Timestamp `json:"timestamp,omitempty"` - Count *int `json:"count,omitempty"` - Uniques *int `json:"uniques,omitempty"` -} - -// TrafficViews represent information about the number of views in the last 14 days. -type TrafficViews struct { - Views []*TrafficData `json:"views,omitempty"` - Count *int `json:"count,omitempty"` - Uniques *int `json:"uniques,omitempty"` -} - -// TrafficClones represent information about the number of clones in the last 14 days. -type TrafficClones struct { - Clones []*TrafficData `json:"clones,omitempty"` - Count *int `json:"count,omitempty"` - Uniques *int `json:"uniques,omitempty"` -} - -// TrafficBreakdownOptions specifies the parameters to methods that support breakdown per day or week. -// Can be one of: day, week. Default: day. -type TrafficBreakdownOptions struct { - Per string `url:"per,omitempty"` -} - -// ListTrafficReferrers list the top 10 referrers over the last 14 days. -// -// GitHub API docs: https://developer.github.com/v3/repos/traffic/#list-referrers -func (s *RepositoriesService) ListTrafficReferrers(ctx context.Context, owner, repo string) ([]*TrafficReferrer, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/traffic/popular/referrers", owner, repo) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var trafficReferrers []*TrafficReferrer - resp, err := s.client.Do(ctx, req, &trafficReferrers) - if err != nil { - return nil, resp, err - } - - return trafficReferrers, resp, nil -} - -// ListTrafficPaths list the top 10 popular content over the last 14 days. -// -// GitHub API docs: https://developer.github.com/v3/repos/traffic/#list-paths -func (s *RepositoriesService) ListTrafficPaths(ctx context.Context, owner, repo string) ([]*TrafficPath, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/traffic/popular/paths", owner, repo) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var paths []*TrafficPath - resp, err := s.client.Do(ctx, req, &paths) - if err != nil { - return nil, resp, err - } - - return paths, resp, nil -} - -// ListTrafficViews get total number of views for the last 14 days and breaks it down either per day or week. -// -// GitHub API docs: https://developer.github.com/v3/repos/traffic/#views -func (s *RepositoriesService) ListTrafficViews(ctx context.Context, owner, repo string, opts *TrafficBreakdownOptions) (*TrafficViews, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/traffic/views", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - trafficViews := new(TrafficViews) - resp, err := s.client.Do(ctx, req, &trafficViews) - if err != nil { - return nil, resp, err - } - - return trafficViews, resp, nil -} - -// ListTrafficClones get total number of clones for the last 14 days and breaks it down either per day or week for the last 14 days. -// -// GitHub API docs: https://developer.github.com/v3/repos/traffic/#views -func (s *RepositoriesService) ListTrafficClones(ctx context.Context, owner, repo string, opts *TrafficBreakdownOptions) (*TrafficClones, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/traffic/clones", owner, repo) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - trafficClones := new(TrafficClones) - resp, err := s.client.Do(ctx, req, &trafficClones) - if err != nil { - return nil, resp, err - } - - return trafficClones, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/search.go b/vendor/github.com/google/go-github/v30/github/search.go deleted file mode 100644 index f08b3eb0..00000000 --- a/vendor/github.com/google/go-github/v30/github/search.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" - "strconv" - - qs "github.com/google/go-querystring/query" -) - -// SearchService provides access to the search related functions -// in the GitHub API. -// -// Each method takes a query string defining the search keywords and any search qualifiers. -// For example, when searching issues, the query "gopher is:issue language:go" will search -// for issues containing the word "gopher" in Go repositories. The method call -// opts := &github.SearchOptions{Sort: "created", Order: "asc"} -// cl.Search.Issues(ctx, "gopher is:issue language:go", opts) -// will search for such issues, sorting by creation date in ascending order -// (i.e., oldest first). -// -// If query includes multiple conditions, it MUST NOT include "+" as the condition separator. -// You have to use " " as the separator instead. -// For example, querying with "language:c++" and "leveldb", then query should be -// "language:c++ leveldb" but not "language:c+++leveldb". -// -// GitHub API docs: https://developer.github.com/v3/search/ -type SearchService service - -// SearchOptions specifies optional parameters to the SearchService methods. -type SearchOptions struct { - // How to sort the search results. Possible values are: - // - for repositories: stars, fork, updated - // - for commits: author-date, committer-date - // - for code: indexed - // - for issues: comments, created, updated - // - for users: followers, repositories, joined - // - // Default is to sort by best match. - Sort string `url:"sort,omitempty"` - - // Sort order if sort parameter is provided. Possible values are: asc, - // desc. Default is desc. - Order string `url:"order,omitempty"` - - // Whether to retrieve text match metadata with a query - TextMatch bool `url:"-"` - - ListOptions -} - -// Common search parameters. -type searchParameters struct { - Query string - RepositoryID *int64 // Sent if non-nil. -} - -// RepositoriesSearchResult represents the result of a repositories search. -type RepositoriesSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - Repositories []*Repository `json:"items,omitempty"` -} - -// Repositories searches repositories via various criteria. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-repositories -func (s *SearchService) Repositories(ctx context.Context, query string, opts *SearchOptions) (*RepositoriesSearchResult, *Response, error) { - result := new(RepositoriesSearchResult) - resp, err := s.search(ctx, "repositories", &searchParameters{Query: query}, opts, result) - return result, resp, err -} - -// TopicsSearchResult represents the result of a topics search. -type TopicsSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - Topics []*TopicResult `json:"items,omitempty"` -} - -type TopicResult struct { - Name *string `json:"name,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - ShortDescription *string `json:"short_description,omitempty"` - Description *string `json:"description,omitempty"` - CreatedBy *string `json:"created_by,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - Featured *bool `json:"featured,omitempty"` - Curated *bool `json:"curated,omitempty"` - Score *float64 `json:"score,omitempty"` -} - -// Topics finds topics via various criteria. Results are sorted by best match. -// Please see https://help.github.com/en/articles/searching-topics for more -// information about search qualifiers. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-topics -func (s *SearchService) Topics(ctx context.Context, query string, opts *SearchOptions) (*TopicsSearchResult, *Response, error) { - result := new(TopicsSearchResult) - resp, err := s.search(ctx, "topics", &searchParameters{Query: query}, opts, result) - return result, resp, err -} - -// CommitsSearchResult represents the result of a commits search. -type CommitsSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - Commits []*CommitResult `json:"items,omitempty"` -} - -// CommitResult represents a commit object as returned in commit search endpoint response. -type CommitResult struct { - SHA *string `json:"sha,omitempty"` - Commit *Commit `json:"commit,omitempty"` - Author *User `json:"author,omitempty"` - Committer *User `json:"committer,omitempty"` - Parents []*Commit `json:"parents,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - URL *string `json:"url,omitempty"` - CommentsURL *string `json:"comments_url,omitempty"` - - Repository *Repository `json:"repository,omitempty"` - Score *float64 `json:"score,omitempty"` -} - -// Commits searches commits via various criteria. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-commits -func (s *SearchService) Commits(ctx context.Context, query string, opts *SearchOptions) (*CommitsSearchResult, *Response, error) { - result := new(CommitsSearchResult) - resp, err := s.search(ctx, "commits", &searchParameters{Query: query}, opts, result) - return result, resp, err -} - -// IssuesSearchResult represents the result of an issues search. -type IssuesSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - Issues []*Issue `json:"items,omitempty"` -} - -// Issues searches issues via various criteria. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-issues -func (s *SearchService) Issues(ctx context.Context, query string, opts *SearchOptions) (*IssuesSearchResult, *Response, error) { - result := new(IssuesSearchResult) - resp, err := s.search(ctx, "issues", &searchParameters{Query: query}, opts, result) - return result, resp, err -} - -// UsersSearchResult represents the result of a users search. -type UsersSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - Users []*User `json:"items,omitempty"` -} - -// Users searches users via various criteria. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-users -func (s *SearchService) Users(ctx context.Context, query string, opts *SearchOptions) (*UsersSearchResult, *Response, error) { - result := new(UsersSearchResult) - resp, err := s.search(ctx, "users", &searchParameters{Query: query}, opts, result) - return result, resp, err -} - -// Match represents a single text match. -type Match struct { - Text *string `json:"text,omitempty"` - Indices []int `json:"indices,omitempty"` -} - -// TextMatch represents a text match for a SearchResult -type TextMatch struct { - ObjectURL *string `json:"object_url,omitempty"` - ObjectType *string `json:"object_type,omitempty"` - Property *string `json:"property,omitempty"` - Fragment *string `json:"fragment,omitempty"` - Matches []*Match `json:"matches,omitempty"` -} - -func (tm TextMatch) String() string { - return Stringify(tm) -} - -// CodeSearchResult represents the result of a code search. -type CodeSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - CodeResults []*CodeResult `json:"items,omitempty"` -} - -// CodeResult represents a single search result. -type CodeResult struct { - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - SHA *string `json:"sha,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Repository *Repository `json:"repository,omitempty"` - TextMatches []*TextMatch `json:"text_matches,omitempty"` -} - -func (c CodeResult) String() string { - return Stringify(c) -} - -// Code searches code via various criteria. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-code -func (s *SearchService) Code(ctx context.Context, query string, opts *SearchOptions) (*CodeSearchResult, *Response, error) { - result := new(CodeSearchResult) - resp, err := s.search(ctx, "code", &searchParameters{Query: query}, opts, result) - return result, resp, err -} - -// LabelsSearchResult represents the result of a code search. -type LabelsSearchResult struct { - Total *int `json:"total_count,omitempty"` - IncompleteResults *bool `json:"incomplete_results,omitempty"` - Labels []*LabelResult `json:"items,omitempty"` -} - -// LabelResult represents a single search result. -type LabelResult struct { - ID *int64 `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - Color *string `json:"color,omitempty"` - Default *bool `json:"default,omitempty"` - Description *string `json:"description,omitempty"` - Score *float64 `json:"score,omitempty"` -} - -func (l LabelResult) String() string { - return Stringify(l) -} - -// Labels searches labels in the repository with ID repoID via various criteria. -// -// GitHub API docs: https://developer.github.com/v3/search/#search-labels -func (s *SearchService) Labels(ctx context.Context, repoID int64, query string, opts *SearchOptions) (*LabelsSearchResult, *Response, error) { - result := new(LabelsSearchResult) - resp, err := s.search(ctx, "labels", &searchParameters{RepositoryID: &repoID, Query: query}, opts, result) - return result, resp, err -} - -// Helper function that executes search queries against different -// GitHub search types (repositories, commits, code, issues, users, labels) -// -// If searchParameters.Query includes multiple condition, it MUST NOT include "+" as condition separator. -// For example, querying with "language:c++" and "leveldb", then searchParameters.Query should be "language:c++ leveldb" but not "language:c+++leveldb". -func (s *SearchService) search(ctx context.Context, searchType string, parameters *searchParameters, opts *SearchOptions, result interface{}) (*Response, error) { - params, err := qs.Values(opts) - if err != nil { - return nil, err - } - if parameters.RepositoryID != nil { - params.Set("repository_id", strconv.FormatInt(*parameters.RepositoryID, 10)) - } - params.Set("q", parameters.Query) - u := fmt.Sprintf("search/%s?%s", searchType, params.Encode()) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, err - } - - switch { - case searchType == "commits": - // Accept header for search commits preview endpoint - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeCommitSearchPreview) - case searchType == "topics": - // Accept header for search repositories based on topics preview endpoint - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTopicsPreview) - case searchType == "repositories": - // Accept header for search repositories based on topics preview endpoint - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTopicsPreview) - case opts != nil && opts.TextMatch: - // Accept header defaults to "application/vnd.github.v3+json" - // We change it here to fetch back text-match metadata - req.Header.Set("Accept", "application/vnd.github.v3.text-match+json") - } - - return s.client.Do(ctx, req, result) -} diff --git a/vendor/github.com/google/go-github/v30/github/strings.go b/vendor/github.com/google/go-github/v30/github/strings.go deleted file mode 100644 index 431e1cc6..00000000 --- a/vendor/github.com/google/go-github/v30/github/strings.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "bytes" - "fmt" - "io" - - "reflect" -) - -var timestampType = reflect.TypeOf(Timestamp{}) - -// Stringify attempts to create a reasonable string representation of types in -// the GitHub library. It does things like resolve pointers to their values -// and omits struct fields with nil values. -func Stringify(message interface{}) string { - var buf bytes.Buffer - v := reflect.ValueOf(message) - stringifyValue(&buf, v) - return buf.String() -} - -// stringifyValue was heavily inspired by the goprotobuf library. - -func stringifyValue(w io.Writer, val reflect.Value) { - if val.Kind() == reflect.Ptr && val.IsNil() { - w.Write([]byte("")) - return - } - - v := reflect.Indirect(val) - - switch v.Kind() { - case reflect.String: - fmt.Fprintf(w, `"%s"`, v) - case reflect.Slice: - w.Write([]byte{'['}) - for i := 0; i < v.Len(); i++ { - if i > 0 { - w.Write([]byte{' '}) - } - - stringifyValue(w, v.Index(i)) - } - - w.Write([]byte{']'}) - return - case reflect.Struct: - if v.Type().Name() != "" { - w.Write([]byte(v.Type().String())) - } - - // special handling of Timestamp values - if v.Type() == timestampType { - fmt.Fprintf(w, "{%s}", v.Interface()) - return - } - - w.Write([]byte{'{'}) - - var sep bool - for i := 0; i < v.NumField(); i++ { - fv := v.Field(i) - if fv.Kind() == reflect.Ptr && fv.IsNil() { - continue - } - if fv.Kind() == reflect.Slice && fv.IsNil() { - continue - } - - if sep { - w.Write([]byte(", ")) - } else { - sep = true - } - - w.Write([]byte(v.Type().Field(i).Name)) - w.Write([]byte{':'}) - stringifyValue(w, fv) - } - - w.Write([]byte{'}'}) - default: - if v.CanInterface() { - fmt.Fprint(w, v.Interface()) - } - } -} diff --git a/vendor/github.com/google/go-github/v30/github/teams.go b/vendor/github.com/google/go-github/v30/github/teams.go deleted file mode 100644 index cfb814e7..00000000 --- a/vendor/github.com/google/go-github/v30/github/teams.go +++ /dev/null @@ -1,806 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" - "net/http" - "strings" - "time" -) - -// TeamsService provides access to the team-related functions -// in the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/teams/ -type TeamsService service - -// Team represents a team within a GitHub organization. Teams are used to -// manage access to an organization's repositories. -type Team struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - URL *string `json:"url,omitempty"` - Slug *string `json:"slug,omitempty"` - - // Permission specifies the default permission for repositories owned by the team. - Permission *string `json:"permission,omitempty"` - - // Privacy identifies the level of privacy this team should have. - // Possible values are: - // secret - only visible to organization owners and members of this team - // closed - visible to all members of this organization - // Default is "secret". - Privacy *string `json:"privacy,omitempty"` - - MembersCount *int `json:"members_count,omitempty"` - ReposCount *int `json:"repos_count,omitempty"` - Organization *Organization `json:"organization,omitempty"` - MembersURL *string `json:"members_url,omitempty"` - RepositoriesURL *string `json:"repositories_url,omitempty"` - Parent *Team `json:"parent,omitempty"` - - // LDAPDN is only available in GitHub Enterprise and when the team - // membership is synchronized with LDAP. - LDAPDN *string `json:"ldap_dn,omitempty"` -} - -func (t Team) String() string { - return Stringify(t) -} - -// Invitation represents a team member's invitation status. -type Invitation struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Login *string `json:"login,omitempty"` - Email *string `json:"email,omitempty"` - // Role can be one of the values - 'direct_member', 'admin', 'billing_manager', 'hiring_manager', or 'reinstate'. - Role *string `json:"role,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Inviter *User `json:"inviter,omitempty"` - TeamCount *int `json:"team_count,omitempty"` - InvitationTeamURL *string `json:"invitation_team_url,omitempty"` -} - -func (i Invitation) String() string { - return Stringify(i) -} - -// ListTeams lists all of the teams for an organization. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-teams -func (s *TeamsService) ListTeams(ctx context.Context, org string, opts *ListOptions) ([]*Team, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teams []*Team - resp, err := s.client.Do(ctx, req, &teams) - if err != nil { - return nil, resp, err - } - - return teams, resp, nil -} - -// GetTeamByID fetches a team, given a specified organization ID, by ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/#get-team-by-name -func (s *TeamsService) GetTeamByID(ctx context.Context, orgID, teamID int64) (*Team, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v", orgID, teamID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - t := new(Team) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// GetTeamBySlug fetches a team, given a specified organization name, by slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/#get-team-by-name -func (s *TeamsService) GetTeamBySlug(ctx context.Context, org, slug string) (*Team, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v", org, slug) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - t := new(Team) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// NewTeam represents a team to be created or modified. -type NewTeam struct { - Name string `json:"name"` // Name of the team. (Required.) - Description *string `json:"description,omitempty"` - Maintainers []string `json:"maintainers,omitempty"` - RepoNames []string `json:"repo_names,omitempty"` - ParentTeamID *int64 `json:"parent_team_id,omitempty"` - - // Deprecated: Permission is deprecated when creating or editing a team in an org - // using the new GitHub permission model. It no longer identifies the - // permission a team has on its repos, but only specifies the default - // permission a repo is initially added with. Avoid confusion by - // specifying a permission value when calling AddTeamRepo. - Permission *string `json:"permission,omitempty"` - - // Privacy identifies the level of privacy this team should have. - // Possible values are: - // secret - only visible to organization owners and members of this team - // closed - visible to all members of this organization - // Default is "secret". - Privacy *string `json:"privacy,omitempty"` - - // LDAPDN may be used in GitHub Enterprise when the team membership - // is synchronized with LDAP. - LDAPDN *string `json:"ldap_dn,omitempty"` -} - -func (s NewTeam) String() string { - return Stringify(s) -} - -// CreateTeam creates a new team within an organization. -// -// GitHub API docs: https://developer.github.com/v3/teams/#create-team -func (s *TeamsService) CreateTeam(ctx context.Context, org string, team NewTeam) (*Team, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams", org) - req, err := s.client.NewRequest("POST", u, team) - if err != nil { - return nil, nil, err - } - - t := new(Team) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// newTeamNoParent is the same as NewTeam but ensures that the -// "parent_team_id" field will be null. It is for internal use -// only and should not be exported. -type newTeamNoParent struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Maintainers []string `json:"maintainers,omitempty"` - RepoNames []string `json:"repo_names,omitempty"` - ParentTeamID *int64 `json:"parent_team_id"` // This will be "null" - Privacy *string `json:"privacy,omitempty"` - LDAPDN *string `json:"ldap_dn,omitempty"` -} - -// copyNewTeamWithoutParent is used to set the "parent_team_id" -// field to "null" after copying the other fields from a NewTeam. -// It is for internal use only and should not be exported. -func copyNewTeamWithoutParent(team *NewTeam) *newTeamNoParent { - return &newTeamNoParent{ - Name: team.Name, - Description: team.Description, - Maintainers: team.Maintainers, - RepoNames: team.RepoNames, - Privacy: team.Privacy, - LDAPDN: team.LDAPDN, - } -} - -// EditTeamByID edits a team, given an organization ID, selected by ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/#edit-team -func (s *TeamsService) EditTeamByID(ctx context.Context, orgID, teamID int64, team NewTeam, removeParent bool) (*Team, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v", orgID, teamID) - - var req *http.Request - var err error - if removeParent { - teamRemoveParent := copyNewTeamWithoutParent(&team) - req, err = s.client.NewRequest("PATCH", u, teamRemoveParent) - } else { - req, err = s.client.NewRequest("PATCH", u, team) - } - if err != nil { - return nil, nil, err - } - - t := new(Team) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// EditTeamBySlug edits a team, given an organization name, by slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/#edit-team -func (s *TeamsService) EditTeamBySlug(ctx context.Context, org, slug string, team NewTeam, removeParent bool) (*Team, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v", org, slug) - - var req *http.Request - var err error - if removeParent { - teamRemoveParent := copyNewTeamWithoutParent(&team) - req, err = s.client.NewRequest("PATCH", u, teamRemoveParent) - } else { - req, err = s.client.NewRequest("PATCH", u, team) - } - if err != nil { - return nil, nil, err - } - - t := new(Team) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// DeleteTeamByID deletes a team referenced by ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/#delete-team -func (s *TeamsService) DeleteTeamByID(ctx context.Context, orgID, teamID int64) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v", orgID, teamID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// DeleteTeamBySlug deletes a team reference by slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/#delete-team -func (s *TeamsService) DeleteTeamBySlug(ctx context.Context, org, slug string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v", org, slug) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListChildTeamsByParentID lists child teams for a parent team given parent ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-child-teams -func (s *TeamsService) ListChildTeamsByParentID(ctx context.Context, orgID, teamID int64, opts *ListOptions) ([]*Team, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/teams", orgID, teamID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teams []*Team - resp, err := s.client.Do(ctx, req, &teams) - if err != nil { - return nil, resp, err - } - - return teams, resp, nil -} - -// ListChildTeamsByParentSlug lists child teams for a parent team given parent slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-child-teams -func (s *TeamsService) ListChildTeamsByParentSlug(ctx context.Context, org, slug string, opts *ListOptions) ([]*Team, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/teams", org, slug) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teams []*Team - resp, err := s.client.Do(ctx, req, &teams) - if err != nil { - return nil, resp, err - } - - return teams, resp, nil -} - -// ListTeamReposByID lists the repositories given a team ID that the specified team has access to. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-team-repos -func (s *TeamsService) ListTeamReposByID(ctx context.Context, orgID, teamID int64, opts *ListOptions) ([]*Repository, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/repos", orgID, teamID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when topics API fully launches. - headers := []string{mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(headers, ", ")) - - var repos []*Repository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// ListTeamReposBySlug lists the repositories given a team slug that the specified team has access to. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-team-repos -func (s *TeamsService) ListTeamReposBySlug(ctx context.Context, org, slug string, opts *ListOptions) ([]*Repository, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/repos", org, slug) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when topics API fully launches. - headers := []string{mediaTypeTopicsPreview} - req.Header.Set("Accept", strings.Join(headers, ", ")) - - var repos []*Repository - resp, err := s.client.Do(ctx, req, &repos) - if err != nil { - return nil, resp, err - } - - return repos, resp, nil -} - -// IsTeamRepoByID checks if a team, given its ID, manages the specified repository. If the -// repository is managed by team, a Repository is returned which includes the -// permissions team has for that repo. -// -// GitHub API docs: https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository -func (s *TeamsService) IsTeamRepoByID(ctx context.Context, orgID, teamID int64, owner, repo string) (*Repository, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/repos/%v/%v", orgID, teamID, owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - headers := []string{mediaTypeOrgPermissionRepo} - req.Header.Set("Accept", strings.Join(headers, ", ")) - - repository := new(Repository) - resp, err := s.client.Do(ctx, req, repository) - if err != nil { - return nil, resp, err - } - - return repository, resp, nil -} - -// IsTeamRepoBySlug checks if a team, given its slug, manages the specified repository. If the -// repository is managed by team, a Repository is returned which includes the -// permissions team has for that repo. -// -// GitHub API docs: https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository -func (s *TeamsService) IsTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string) (*Repository, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/repos/%v/%v", org, slug, owner, repo) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - headers := []string{mediaTypeOrgPermissionRepo} - req.Header.Set("Accept", strings.Join(headers, ", ")) - - repository := new(Repository) - resp, err := s.client.Do(ctx, req, repository) - if err != nil { - return nil, resp, err - } - - return repository, resp, nil -} - -// TeamAddTeamRepoOptions specifies the optional parameters to the -// TeamsService.AddTeamRepo method. -type TeamAddTeamRepoOptions struct { - // Permission specifies the permission to grant the team on this repository. - // Possible values are: - // pull - team members can pull, but not push to or administer this repository - // push - team members can pull and push, but not administer this repository - // admin - team members can pull, push and administer this repository - // - // If not specified, the team's permission attribute will be used. - Permission string `json:"permission,omitempty"` -} - -// AddTeamRepoByID adds a repository to be managed by the specified team given the team ID. -// The specified repository must be owned by the organization to which the team -// belongs, or a direct fork of a repository owned by the organization. -// -// GitHub API docs: https://developer.github.com/v3/teams/#add-team-repo -func (s *TeamsService) AddTeamRepoByID(ctx context.Context, orgID, teamID int64, owner, repo string, opts *TeamAddTeamRepoOptions) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/repos/%v/%v", orgID, teamID, owner, repo) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// AddTeamRepoBySlug adds a repository to be managed by the specified team given the team slug. -// The specified repository must be owned by the organization to which the team -// belongs, or a direct fork of a repository owned by the organization. -// -// GitHub API docs: https://developer.github.com/v3/teams/#add-team-repo -func (s *TeamsService) AddTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string, opts *TeamAddTeamRepoOptions) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/repos/%v/%v", org, slug, owner, repo) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// RemoveTeamRepoByID removes a repository from being managed by the specified -// team given the team ID. Note that this does not delete the repository, it -// just removes it from the team. -// -// GitHub API docs: https://developer.github.com/v3/teams/#remove-team-repo -func (s *TeamsService) RemoveTeamRepoByID(ctx context.Context, orgID, teamID int64, owner, repo string) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/repos/%v/%v", orgID, teamID, owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// RemoveTeamRepoBySlug removes a repository from being managed by the specified -// team given the team slug. Note that this does not delete the repository, it -// just removes it from the team. -// -// GitHub API docs: https://developer.github.com/v3/teams/#remove-team-repo -func (s *TeamsService) RemoveTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/repos/%v/%v", org, slug, owner, repo) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListUserTeams lists a user's teams -// GitHub API docs: https://developer.github.com/v3/teams/#list-user-teams -func (s *TeamsService) ListUserTeams(ctx context.Context, opts *ListOptions) ([]*Team, *Response, error) { - u := "user/teams" - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teams []*Team - resp, err := s.client.Do(ctx, req, &teams) - if err != nil { - return nil, resp, err - } - - return teams, resp, nil -} - -// ListTeamProjectsByID lists the organization projects for a team given the team ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-team-projects -func (s *TeamsService) ListTeamProjectsByID(ctx context.Context, orgID, teamID int64) ([]*Project, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/projects", orgID, teamID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// ListTeamProjectsBySlug lists the organization projects for a team given the team slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/#list-team-projects -func (s *TeamsService) ListTeamProjectsBySlug(ctx context.Context, org, slug string) ([]*Project, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/projects", org, slug) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// ReviewTeamProjectsByID checks whether a team, given its ID, has read, write, or admin -// permissions for an organization project. -// -// GitHub API docs: https://developer.github.com/v3/teams/#review-a-team-project -func (s *TeamsService) ReviewTeamProjectsByID(ctx context.Context, orgID, teamID, projectID int64) (*Project, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/projects/%v", orgID, teamID, projectID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - projects := &Project{} - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// ReviewTeamProjectsBySlug checks whether a team, given its slug, has read, write, or admin -// permissions for an organization project. -// -// GitHub API docs: https://developer.github.com/v3/teams/#review-a-team-project -func (s *TeamsService) ReviewTeamProjectsBySlug(ctx context.Context, org, slug string, projectID int64) (*Project, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/projects/%v", org, slug, projectID) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - projects := &Project{} - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// TeamProjectOptions specifies the optional parameters to the -// TeamsService.AddTeamProject method. -type TeamProjectOptions struct { - // Permission specifies the permission to grant to the team for this project. - // Possible values are: - // "read" - team members can read, but not write to or administer this project. - // "write" - team members can read and write, but not administer this project. - // "admin" - team members can read, write and administer this project. - // - Permission *string `json:"permission,omitempty"` -} - -// AddTeamProjectByID adds an organization project to a team given the team ID. -// To add a project to a team or update the team's permission on a project, the -// authenticated user must have admin permissions for the project. -// -// GitHub API docs: https://developer.github.com/v3/teams/#add-or-update-team-project -func (s *TeamsService) AddTeamProjectByID(ctx context.Context, orgID, teamID, projectID int64, opts *TeamProjectOptions) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/projects/%v", orgID, teamID, projectID) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - return s.client.Do(ctx, req, nil) -} - -// AddTeamProjectBySlug adds an organization project to a team given the team slug. -// To add a project to a team or update the team's permission on a project, the -// authenticated user must have admin permissions for the project. -// -// GitHub API docs: https://developer.github.com/v3/teams/#add-or-update-team-project -func (s *TeamsService) AddTeamProjectBySlug(ctx context.Context, org, slug string, projectID int64, opts *TeamProjectOptions) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/projects/%v", org, slug, projectID) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - return s.client.Do(ctx, req, nil) -} - -// RemoveTeamProjectByID removes an organization project from a team given team ID. -// An organization owner or a team maintainer can remove any project from the team. -// To remove a project from a team as an organization member, the authenticated user -// must have "read" access to both the team and project, or "admin" access to the team -// or project. -// Note: This endpoint removes the project from the team, but does not delete it. -// -// GitHub API docs: https://developer.github.com/v3/teams/#remove-team-project -func (s *TeamsService) RemoveTeamProjectByID(ctx context.Context, orgID, teamID, projectID int64) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/projects/%v", orgID, teamID, projectID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - return s.client.Do(ctx, req, nil) -} - -// RemoveTeamProjectBySlug removes an organization project from a team given team slug. -// An organization owner or a team maintainer can remove any project from the team. -// To remove a project from a team as an organization member, the authenticated user -// must have "read" access to both the team and project, or "admin" access to the team -// or project. -// Note: This endpoint removes the project from the team, but does not delete it. -// -// GitHub API docs: https://developer.github.com/v3/teams/#remove-team-project -func (s *TeamsService) RemoveTeamProjectBySlug(ctx context.Context, org, slug string, projectID int64) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/projects/%v", org, slug, projectID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeProjectsPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) - - return s.client.Do(ctx, req, nil) -} - -// IDPGroupList represents a list of external identity provider (IDP) groups. -type IDPGroupList struct { - Groups []*IDPGroup `json:"groups"` -} - -// IDPGroup represents an external identity provider (IDP) group. -type IDPGroup struct { - GroupID *string `json:"group_id,omitempty"` - GroupName *string `json:"group_name,omitempty"` - GroupDescription *string `json:"group_description,omitempty"` -} - -// ListIDPGroupsInOrganization lists IDP groups available in an organization. -// -// GitHub API docs: https://developer.github.com/v3/teams/team_sync/#list-idp-groups-in-an-organization -func (s *TeamsService) ListIDPGroupsInOrganization(ctx context.Context, org string, opts *ListCursorOptions) (*IDPGroupList, *Response, error) { - u := fmt.Sprintf("orgs/%v/team-sync/groups", org) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - groups := new(IDPGroupList) - resp, err := s.client.Do(ctx, req, groups) - if err != nil { - return nil, resp, err - } - return groups, resp, nil -} - -// ListIDPGroupsForTeam lists IDP groups connected to a team on GitHub. -// -// GitHub API docs: https://developer.github.com/v3/teams/team_sync/#list-idp-groups-for-a-team -func (s *TeamsService) ListIDPGroupsForTeam(ctx context.Context, teamID string) (*IDPGroupList, *Response, error) { - u := fmt.Sprintf("teams/%v/team-sync/group-mappings", teamID) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - groups := new(IDPGroupList) - resp, err := s.client.Do(ctx, req, groups) - if err != nil { - return nil, resp, err - } - return groups, resp, err -} - -// CreateOrUpdateIDPGroupConnections creates, updates, or removes a connection between a team -// and an IDP group. -// -// GitHub API docs: https://developer.github.com/v3/teams/team_sync/#create-or-update-idp-group-connections -func (s *TeamsService) CreateOrUpdateIDPGroupConnections(ctx context.Context, teamID string, opts IDPGroupList) (*IDPGroupList, *Response, error) { - u := fmt.Sprintf("teams/%v/team-sync/group-mappings", teamID) - - req, err := s.client.NewRequest("PATCH", u, opts) - if err != nil { - return nil, nil, err - } - - groups := new(IDPGroupList) - resp, err := s.client.Do(ctx, req, groups) - if err != nil { - return nil, resp, err - } - - return groups, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v30/github/teams_discussion_comments.go deleted file mode 100644 index 61b18f30..00000000 --- a/vendor/github.com/google/go-github/v30/github/teams_discussion_comments.go +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" -) - -// DiscussionComment represents a GitHub dicussion in a team. -type DiscussionComment struct { - Author *User `json:"author,omitempty"` - Body *string `json:"body,omitempty"` - BodyHTML *string `json:"body_html,omitempty"` - BodyVersion *string `json:"body_version,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - LastEditedAt *Timestamp `json:"last_edited_at,omitempty"` - DiscussionURL *string `json:"discussion_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Number *int `json:"number,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - URL *string `json:"url,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` -} - -func (c DiscussionComment) String() string { - return Stringify(c) -} - -// DiscussionCommentListOptions specifies optional parameters to the -// TeamServices.ListComments method. -type DiscussionCommentListOptions struct { - // Sorts the discussion comments by the date they were created. - // Accepted values are asc and desc. Default is desc. - Direction string `url:"direction,omitempty"` - ListOptions -} - -// ListCommentsByID lists all comments on a team discussion by team ID. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#list-comments -func (s *TeamsService) ListCommentsByID(ctx context.Context, orgID, teamID int64, discussionNumber int, options *DiscussionCommentListOptions) ([]*DiscussionComment, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments", orgID, teamID, discussionNumber) - u, err := addOptions(u, options) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var comments []*DiscussionComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// ListCommentsBySlug lists all comments on a team discussion by team slug. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#list-comments -func (s *TeamsService) ListCommentsBySlug(ctx context.Context, org, slug string, discussionNumber int, options *DiscussionCommentListOptions) ([]*DiscussionComment, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments", org, slug, discussionNumber) - u, err := addOptions(u, options) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var comments []*DiscussionComment - resp, err := s.client.Do(ctx, req, &comments) - if err != nil { - return nil, resp, err - } - - return comments, resp, nil -} - -// GetCommentByID gets a specific comment on a team discussion by team ID. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment -func (s *TeamsService) GetCommentByID(ctx context.Context, orgID, teamID int64, discussionNumber, commentNumber int) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments/%v", orgID, teamID, discussionNumber, commentNumber) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - discussionComment := &DiscussionComment{} - resp, err := s.client.Do(ctx, req, discussionComment) - if err != nil { - return nil, resp, err - } - - return discussionComment, resp, nil -} - -// GetCommentBySlug gets a specific comment on a team discussion by team slug. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment -func (s *TeamsService) GetCommentBySlug(ctx context.Context, org, slug string, discussionNumber, commentNumber int) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments/%v", org, slug, discussionNumber, commentNumber) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - discussionComment := &DiscussionComment{} - resp, err := s.client.Do(ctx, req, discussionComment) - if err != nil { - return nil, resp, err - } - - return discussionComment, resp, nil -} - -// CreateCommentByID creates a new comment on a team discussion by team ID. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#create-a-comment -func (s *TeamsService) CreateCommentByID(ctx context.Context, orgID, teamID int64, discsusionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments", orgID, teamID, discsusionNumber) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - - discussionComment := &DiscussionComment{} - resp, err := s.client.Do(ctx, req, discussionComment) - if err != nil { - return nil, resp, err - } - - return discussionComment, resp, nil -} - -// CreateCommentBySlug creates a new comment on a team discussion by team slug. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#create-a-comment -func (s *TeamsService) CreateCommentBySlug(ctx context.Context, org, slug string, discsusionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments", org, slug, discsusionNumber) - req, err := s.client.NewRequest("POST", u, comment) - if err != nil { - return nil, nil, err - } - - discussionComment := &DiscussionComment{} - resp, err := s.client.Do(ctx, req, discussionComment) - if err != nil { - return nil, resp, err - } - - return discussionComment, resp, nil -} - -// EditCommentByID edits the body text of a discussion comment by team ID. -// Authenticated user must grant write:discussion scope. -// User is allowed to edit body of a comment only. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment -func (s *TeamsService) EditCommentByID(ctx context.Context, orgID, teamID int64, discussionNumber, commentNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments/%v", orgID, teamID, discussionNumber, commentNumber) - req, err := s.client.NewRequest("PATCH", u, comment) - if err != nil { - return nil, nil, err - } - - discussionComment := &DiscussionComment{} - resp, err := s.client.Do(ctx, req, discussionComment) - if err != nil { - return nil, resp, err - } - - return discussionComment, resp, nil -} - -// EditCommentBySlug edits the body text of a discussion comment by team slug. -// Authenticated user must grant write:discussion scope. -// User is allowed to edit body of a comment only. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment -func (s *TeamsService) EditCommentBySlug(ctx context.Context, org, slug string, discussionNumber, commentNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments/%v", org, slug, discussionNumber, commentNumber) - req, err := s.client.NewRequest("PATCH", u, comment) - if err != nil { - return nil, nil, err - } - - discussionComment := &DiscussionComment{} - resp, err := s.client.Do(ctx, req, discussionComment) - if err != nil { - return nil, resp, err - } - - return discussionComment, resp, nil -} - -// DeleteCommentByID deletes a comment on a team discussion by team ID. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment -func (s *TeamsService) DeleteCommentByID(ctx context.Context, orgID, teamID int64, discussionNumber, commentNumber int) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments/%v", orgID, teamID, discussionNumber, commentNumber) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// DeleteCommentBySlug deletes a comment on a team discussion by team slug. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment -func (s *TeamsService) DeleteCommentBySlug(ctx context.Context, org, slug string, discussionNumber, commentNumber int) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments/%v", org, slug, discussionNumber, commentNumber) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/teams_discussions.go b/vendor/github.com/google/go-github/v30/github/teams_discussions.go deleted file mode 100644 index f0f2206a..00000000 --- a/vendor/github.com/google/go-github/v30/github/teams_discussions.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" -) - -// TeamDiscussion represents a GitHub dicussion in a team. -type TeamDiscussion struct { - Author *User `json:"author,omitempty"` - Body *string `json:"body,omitempty"` - BodyHTML *string `json:"body_html,omitempty"` - BodyVersion *string `json:"body_version,omitempty"` - CommentsCount *int `json:"comments_count,omitempty"` - CommentsURL *string `json:"comments_url,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - LastEditedAt *Timestamp `json:"last_edited_at,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Number *int `json:"number,omitempty"` - Pinned *bool `json:"pinned,omitempty"` - Private *bool `json:"private,omitempty"` - TeamURL *string `json:"team_url,omitempty"` - Title *string `json:"title,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - URL *string `json:"url,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` -} - -func (d TeamDiscussion) String() string { - return Stringify(d) -} - -// DiscussionListOptions specifies optional parameters to the -// TeamServices.ListDiscussions method. -type DiscussionListOptions struct { - // Sorts the discussion by the date they were created. - // Accepted values are asc and desc. Default is desc. - Direction string `url:"direction,omitempty"` - - ListOptions -} - -// ListDiscussionsByID lists all discussions on team's page given Organization and Team ID. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#list-discussions -func (s *TeamsService) ListDiscussionsByID(ctx context.Context, orgID, teamID int64, opts *DiscussionListOptions) ([]*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions", orgID, teamID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teamDiscussions []*TeamDiscussion - resp, err := s.client.Do(ctx, req, &teamDiscussions) - if err != nil { - return nil, resp, err - } - - return teamDiscussions, resp, nil -} - -// ListDiscussionsBySlug lists all discussions on team's page given Organization name and Team's slug. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#list-discussions -func (s *TeamsService) ListDiscussionsBySlug(ctx context.Context, org, slug string, opts *DiscussionListOptions) ([]*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions", org, slug) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var teamDiscussions []*TeamDiscussion - resp, err := s.client.Do(ctx, req, &teamDiscussions) - if err != nil { - return nil, resp, err - } - - return teamDiscussions, resp, nil -} - -// GetDiscussionByID gets a specific discussion on a team's page given Organization and Team ID. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#get-a-single-discussion -func (s *TeamsService) GetDiscussionByID(ctx context.Context, orgID, teamID int64, discussionNumber int) (*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v", orgID, teamID, discussionNumber) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - teamDiscussion := &TeamDiscussion{} - resp, err := s.client.Do(ctx, req, teamDiscussion) - if err != nil { - return nil, resp, err - } - - return teamDiscussion, resp, nil -} - -// GetDiscussionBySlug gets a specific discussion on a team's page given Organization name and Team's slug. -// Authenticated user must grant read:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#get-a-single-discussion -func (s *TeamsService) GetDiscussionBySlug(ctx context.Context, org, slug string, discussionNumber int) (*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v", org, slug, discussionNumber) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - teamDiscussion := &TeamDiscussion{} - resp, err := s.client.Do(ctx, req, teamDiscussion) - if err != nil { - return nil, resp, err - } - - return teamDiscussion, resp, nil -} - -// CreateDiscussionByID creates a new discussion post on a team's page given Organization and Team ID. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#create-a-discussion -func (s *TeamsService) CreateDiscussionByID(ctx context.Context, orgID, teamID int64, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions", orgID, teamID) - req, err := s.client.NewRequest("POST", u, discussion) - if err != nil { - return nil, nil, err - } - - teamDiscussion := &TeamDiscussion{} - resp, err := s.client.Do(ctx, req, teamDiscussion) - if err != nil { - return nil, resp, err - } - - return teamDiscussion, resp, nil -} - -// CreateDiscussionBySlug creates a new discussion post on a team's page given Organization name and Team's slug. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#create-a-discussion -func (s *TeamsService) CreateDiscussionBySlug(ctx context.Context, org, slug string, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions", org, slug) - req, err := s.client.NewRequest("POST", u, discussion) - if err != nil { - return nil, nil, err - } - - teamDiscussion := &TeamDiscussion{} - resp, err := s.client.Do(ctx, req, teamDiscussion) - if err != nil { - return nil, resp, err - } - - return teamDiscussion, resp, nil -} - -// EditDiscussionByID edits the title and body text of a discussion post given Organization and Team ID. -// Authenticated user must grant write:discussion scope. -// User is allowed to change Title and Body of a discussion only. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#edit-a-discussion -func (s *TeamsService) EditDiscussionByID(ctx context.Context, orgID, teamID int64, discussionNumber int, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v", orgID, teamID, discussionNumber) - req, err := s.client.NewRequest("PATCH", u, discussion) - if err != nil { - return nil, nil, err - } - - teamDiscussion := &TeamDiscussion{} - resp, err := s.client.Do(ctx, req, teamDiscussion) - if err != nil { - return nil, resp, err - } - - return teamDiscussion, resp, nil -} - -// EditDiscussionBySlug edits the title and body text of a discussion post given Organization name and Team's slug. -// Authenticated user must grant write:discussion scope. -// User is allowed to change Title and Body of a discussion only. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#edit-a-discussion -func (s *TeamsService) EditDiscussionBySlug(ctx context.Context, org, slug string, discussionNumber int, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v", org, slug, discussionNumber) - req, err := s.client.NewRequest("PATCH", u, discussion) - if err != nil { - return nil, nil, err - } - - teamDiscussion := &TeamDiscussion{} - resp, err := s.client.Do(ctx, req, teamDiscussion) - if err != nil { - return nil, resp, err - } - - return teamDiscussion, resp, nil -} - -// DeleteDiscussionByID deletes a discussion from team's page given Organization and Team ID. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#delete-a-discussion -func (s *TeamsService) DeleteDiscussionByID(ctx context.Context, orgID, teamID int64, discussionNumber int) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v", orgID, teamID, discussionNumber) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// DeleteDiscussionBySlug deletes a discussion from team's page given Organization name and Team's slug. -// Authenticated user must grant write:discussion scope. -// -// GitHub API docs: https://developer.github.com/v3/teams/discussions/#delete-a-discussion -func (s *TeamsService) DeleteDiscussionBySlug(ctx context.Context, org, slug string, discussionNumber int) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v", org, slug, discussionNumber) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/teams_members.go b/vendor/github.com/google/go-github/v30/github/teams_members.go deleted file mode 100644 index a29263e7..00000000 --- a/vendor/github.com/google/go-github/v30/github/teams_members.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2018 The go-github 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 github - -import ( - "context" - "fmt" -) - -// TeamListTeamMembersOptions specifies the optional parameters to the -// TeamsService.ListTeamMembers method. -type TeamListTeamMembersOptions struct { - // Role filters members returned by their role in the team. Possible - // values are "all", "member", "maintainer". Default is "all". - Role string `url:"role,omitempty"` - - ListOptions -} - -// ListTeamMembersByID lists all of the users who are members of a team, given a specified -// organization ID, by team ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#list-team-members -func (s *TeamsService) ListTeamMembersByID(ctx context.Context, orgID, teamID int64, opts *TeamListTeamMembersOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/members", orgID, teamID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var members []*User - resp, err := s.client.Do(ctx, req, &members) - if err != nil { - return nil, resp, err - } - - return members, resp, nil -} - -// ListTeamMembersBySlug lists all of the users who are members of a team, given a specified -// organization name, by team slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#list-team-members -func (s *TeamsService) ListTeamMembersBySlug(ctx context.Context, org, slug string, opts *TeamListTeamMembersOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/members", org, slug) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var members []*User - resp, err := s.client.Do(ctx, req, &members) - if err != nil { - return nil, resp, err - } - - return members, resp, nil -} - -// GetTeamMembershipByID returns the membership status for a user in a team, given a specified -// organization ID, by team ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#get-team-membership -func (s *TeamsService) GetTeamMembershipByID(ctx context.Context, orgID, teamID int64, user string) (*Membership, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/memberships/%v", orgID, teamID, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - t := new(Membership) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// GetTeamMembershipBySlug returns the membership status for a user in a team, given a specified -// organization name, by team slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#get-team-membership -func (s *TeamsService) GetTeamMembershipBySlug(ctx context.Context, org, slug, user string) (*Membership, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/memberships/%v", org, slug, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - t := new(Membership) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// TeamAddTeamMembershipOptions specifies the optional -// parameters to the TeamsService.AddTeamMembership method. -type TeamAddTeamMembershipOptions struct { - // Role specifies the role the user should have in the team. Possible - // values are: - // member - a normal member of the team - // maintainer - a team maintainer. Able to add/remove other team - // members, promote other team members to team - // maintainer, and edit the team’s name and description - // - // Default value is "member". - Role string `json:"role,omitempty"` -} - -// AddTeamMembership adds or invites a user to a team, given a specified -// organization ID, by team ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#add-or-update-team-membership -func (s *TeamsService) AddTeamMembershipByID(ctx context.Context, orgID, teamID int64, user string, opts *TeamAddTeamMembershipOptions) (*Membership, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/memberships/%v", orgID, teamID, user) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - - t := new(Membership) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// AddTeamMembershipBySlug adds or invites a user to a team, given a specified -// organization name, by team slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#add-or-update-team-membership -func (s *TeamsService) AddTeamMembershipBySlug(ctx context.Context, org, slug, user string, opts *TeamAddTeamMembershipOptions) (*Membership, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/memberships/%v", org, slug, user) - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, nil, err - } - - t := new(Membership) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// RemoveTeamMembership removes a user from a team, given a specified -// organization ID, by team ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#remove-team-membership -func (s *TeamsService) RemoveTeamMembershipByID(ctx context.Context, orgID, teamID int64, user string) (*Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/memberships/%v", orgID, teamID, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// RemoveTeamMembership removes a user from a team, given a specified -// organization name, by team slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#remove-team-membership -func (s *TeamsService) RemoveTeamMembershipBySlug(ctx context.Context, org, slug, user string) (*Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/memberships/%v", org, slug, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListPendingTeamInvitationsByID gets pending invitation list of a team, given a specified -// organization ID, by team ID. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#list-pending-team-invitations -func (s *TeamsService) ListPendingTeamInvitationsByID(ctx context.Context, orgID, teamID int64, opts *ListOptions) ([]*Invitation, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/invitations", orgID, teamID) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var pendingInvitations []*Invitation - resp, err := s.client.Do(ctx, req, &pendingInvitations) - if err != nil { - return nil, resp, err - } - - return pendingInvitations, resp, nil -} - -// ListPendingTeamInvitationsByID get pending invitation list of a team, given a specified -// organization name, by team slug. -// -// GitHub API docs: https://developer.github.com/v3/teams/members/#list-pending-team-invitations -func (s *TeamsService) ListPendingTeamInvitationsBySlug(ctx context.Context, org, slug string, opts *ListOptions) ([]*Invitation, *Response, error) { - u := fmt.Sprintf("orgs/%v/teams/%v/invitations", org, slug) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var pendingInvitations []*Invitation - resp, err := s.client.Do(ctx, req, &pendingInvitations) - if err != nil { - return nil, resp, err - } - - return pendingInvitations, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/timestamp.go b/vendor/github.com/google/go-github/v30/github/timestamp.go deleted file mode 100644 index 90929d57..00000000 --- a/vendor/github.com/google/go-github/v30/github/timestamp.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "strconv" - "time" -) - -// Timestamp represents a time that can be unmarshalled from a JSON string -// formatted as either an RFC3339 or Unix timestamp. This is necessary for some -// fields since the GitHub API is inconsistent in how it represents times. All -// exported methods of time.Time can be called on Timestamp. -type Timestamp struct { - time.Time -} - -func (t Timestamp) String() string { - return t.Time.String() -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -// Time is expected in RFC3339 or Unix format. -func (t *Timestamp) UnmarshalJSON(data []byte) (err error) { - str := string(data) - i, err := strconv.ParseInt(str, 10, 64) - if err == nil { - t.Time = time.Unix(i, 0) - } else { - t.Time, err = time.Parse(`"`+time.RFC3339+`"`, str) - } - return -} - -// Equal reports whether t and u are equal based on time.Equal -func (t Timestamp) Equal(u Timestamp) bool { - return t.Time.Equal(u.Time) -} diff --git a/vendor/github.com/google/go-github/v30/github/users.go b/vendor/github.com/google/go-github/v30/github/users.go deleted file mode 100644 index 8b6ce5d8..00000000 --- a/vendor/github.com/google/go-github/v30/github/users.go +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// UsersService handles communication with the user related -// methods of the GitHub API. -// -// GitHub API docs: https://developer.github.com/v3/users/ -type UsersService service - -// User represents a GitHub user. -type User struct { - Login *string `json:"login,omitempty"` - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - GravatarID *string `json:"gravatar_id,omitempty"` - Name *string `json:"name,omitempty"` - Company *string `json:"company,omitempty"` - Blog *string `json:"blog,omitempty"` - Location *string `json:"location,omitempty"` - Email *string `json:"email,omitempty"` - Hireable *bool `json:"hireable,omitempty"` - Bio *string `json:"bio,omitempty"` - PublicRepos *int `json:"public_repos,omitempty"` - PublicGists *int `json:"public_gists,omitempty"` - Followers *int `json:"followers,omitempty"` - Following *int `json:"following,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - SuspendedAt *Timestamp `json:"suspended_at,omitempty"` - Type *string `json:"type,omitempty"` - SiteAdmin *bool `json:"site_admin,omitempty"` - TotalPrivateRepos *int `json:"total_private_repos,omitempty"` - OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` - PrivateGists *int `json:"private_gists,omitempty"` - DiskUsage *int `json:"disk_usage,omitempty"` - Collaborators *int `json:"collaborators,omitempty"` - TwoFactorAuthentication *bool `json:"two_factor_authentication,omitempty"` - Plan *Plan `json:"plan,omitempty"` - LdapDn *string `json:"ldap_dn,omitempty"` - - // API URLs - URL *string `json:"url,omitempty"` - EventsURL *string `json:"events_url,omitempty"` - FollowingURL *string `json:"following_url,omitempty"` - FollowersURL *string `json:"followers_url,omitempty"` - GistsURL *string `json:"gists_url,omitempty"` - OrganizationsURL *string `json:"organizations_url,omitempty"` - ReceivedEventsURL *string `json:"received_events_url,omitempty"` - ReposURL *string `json:"repos_url,omitempty"` - StarredURL *string `json:"starred_url,omitempty"` - SubscriptionsURL *string `json:"subscriptions_url,omitempty"` - - // TextMatches is only populated from search results that request text matches - // See: search.go and https://developer.github.com/v3/search/#text-match-metadata - TextMatches []*TextMatch `json:"text_matches,omitempty"` - - // Permissions identifies the permissions that a user has on a given - // repository. This is only populated when calling Repositories.ListCollaborators. - Permissions *map[string]bool `json:"permissions,omitempty"` -} - -func (u User) String() string { - return Stringify(u) -} - -// Get fetches a user. Passing the empty string will fetch the authenticated -// user. -// -// GitHub API docs: https://developer.github.com/v3/users/#get-a-single-user -// and: https://developer.github.com/v3/users/#get-the-authenticated-user -func (s *UsersService) Get(ctx context.Context, user string) (*User, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v", user) - } else { - u = "user" - } - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - uResp := new(User) - resp, err := s.client.Do(ctx, req, uResp) - if err != nil { - return nil, resp, err - } - - return uResp, resp, nil -} - -// GetByID fetches a user. -// -// Note: GetByID uses the undocumented GitHub API endpoint /user/:id. -func (s *UsersService) GetByID(ctx context.Context, id int64) (*User, *Response, error) { - u := fmt.Sprintf("user/%d", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - user := new(User) - resp, err := s.client.Do(ctx, req, user) - if err != nil { - return nil, resp, err - } - - return user, resp, nil -} - -// Edit the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/#update-the-authenticated-user -func (s *UsersService) Edit(ctx context.Context, user *User) (*User, *Response, error) { - u := "user" - req, err := s.client.NewRequest("PATCH", u, user) - if err != nil { - return nil, nil, err - } - - uResp := new(User) - resp, err := s.client.Do(ctx, req, uResp) - if err != nil { - return nil, resp, err - } - - return uResp, resp, nil -} - -// HovercardOptions specifies optional parameters to the UsersService.GetHovercard -// method. -type HovercardOptions struct { - // SubjectType specifies the additional information to be received about the hovercard. - // Possible values are: organization, repository, issue, pull_request. (Required when using subject_id.) - SubjectType string `url:"subject_type"` - - // SubjectID specifies the ID for the SubjectType. (Required when using subject_type.) - SubjectID string `url:"subject_id"` -} - -// Hovercard represents hovercard information about a user. -type Hovercard struct { - Contexts []*UserContext `json:"contexts,omitempty"` -} - -// UserContext represents the contextual information about user. -type UserContext struct { - Message *string `json:"message,omitempty"` - Octicon *string `json:"octicon,omitempty"` -} - -// GetHovercard fetches contextual information about user. It requires authentication -// via Basic Auth or via OAuth with the repo scope. -// -// GitHub API docs: https://developer.github.com/v3/users/#get-contextual-information-about-a-user -func (s *UsersService) GetHovercard(ctx context.Context, user string, opts *HovercardOptions) (*Hovercard, *Response, error) { - u := fmt.Sprintf("users/%v/hovercard", user) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - hc := new(Hovercard) - resp, err := s.client.Do(ctx, req, hc) - if err != nil { - return nil, resp, err - } - - return hc, resp, nil -} - -// UserListOptions specifies optional parameters to the UsersService.ListAll -// method. -type UserListOptions struct { - // ID of the last user seen - Since int64 `url:"since,omitempty"` - - // Note: Pagination is powered exclusively by the Since parameter, - // ListOptions.Page has no effect. - // ListOptions.PerPage controls an undocumented GitHub API parameter. - ListOptions -} - -// ListAll lists all GitHub users. -// -// To paginate through all users, populate 'Since' with the ID of the last user. -// -// GitHub API docs: https://developer.github.com/v3/users/#get-all-users -func (s *UsersService) ListAll(ctx context.Context, opts *UserListOptions) ([]*User, *Response, error) { - u, err := addOptions("users", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var users []*User - resp, err := s.client.Do(ctx, req, &users) - if err != nil { - return nil, resp, err - } - - return users, resp, nil -} - -// ListInvitations lists all currently-open repository invitations for the -// authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations -func (s *UsersService) ListInvitations(ctx context.Context, opts *ListOptions) ([]*RepositoryInvitation, *Response, error) { - u, err := addOptions("user/repository_invitations", opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - invites := []*RepositoryInvitation{} - resp, err := s.client.Do(ctx, req, &invites) - if err != nil { - return nil, resp, err - } - - return invites, resp, nil -} - -// AcceptInvitation accepts the currently-open repository invitation for the -// authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation -func (s *UsersService) AcceptInvitation(ctx context.Context, invitationID int64) (*Response, error) { - u := fmt.Sprintf("user/repository_invitations/%v", invitationID) - req, err := s.client.NewRequest("PATCH", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// DeclineInvitation declines the currently-open repository invitation for the -// authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation -func (s *UsersService) DeclineInvitation(ctx context.Context, invitationID int64) (*Response, error) { - u := fmt.Sprintf("user/repository_invitations/%v", invitationID) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_administration.go b/vendor/github.com/google/go-github/v30/github/users_administration.go deleted file mode 100644 index aef947ec..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_administration.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The go-github 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 github - -import ( - "context" - "fmt" -) - -// PromoteSiteAdmin promotes a user to a site administrator of a GitHub Enterprise instance. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#promote-an-ordinary-user-to-a-site-administrator -func (s *UsersService) PromoteSiteAdmin(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("users/%v/site_admin", user) - - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// DemoteSiteAdmin demotes a user from site administrator of a GitHub Enterprise instance. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#demote-a-site-administrator-to-an-ordinary-user -func (s *UsersService) DemoteSiteAdmin(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("users/%v/site_admin", user) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// UserSuspendOptions represents the reason a user is being suspended. -type UserSuspendOptions struct { - Reason *string `json:"reason,omitempty"` -} - -// Suspend a user on a GitHub Enterprise instance. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#suspend-a-user -func (s *UsersService) Suspend(ctx context.Context, user string, opts *UserSuspendOptions) (*Response, error) { - u := fmt.Sprintf("users/%v/suspended", user) - - req, err := s.client.NewRequest("PUT", u, opts) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// Unsuspend a user on a GitHub Enterprise instance. -// -// GitHub API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#unsuspend-a-user -func (s *UsersService) Unsuspend(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("users/%v/suspended", user) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_blocking.go b/vendor/github.com/google/go-github/v30/github/users_blocking.go deleted file mode 100644 index c60bfdbc..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_blocking.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2017 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListBlockedUsers lists all the blocked users by the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/blocking/#list-blocked-users -func (s *UsersService) ListBlockedUsers(ctx context.Context, opts *ListOptions) ([]*User, *Response, error) { - u := "user/blocks" - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - var blockedUsers []*User - resp, err := s.client.Do(ctx, req, &blockedUsers) - if err != nil { - return nil, resp, err - } - - return blockedUsers, resp, nil -} - -// IsBlocked reports whether specified user is blocked by the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/blocking/#check-whether-youve-blocked-a-user -func (s *UsersService) IsBlocked(ctx context.Context, user string) (bool, *Response, error) { - u := fmt.Sprintf("user/blocks/%v", user) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - resp, err := s.client.Do(ctx, req, nil) - isBlocked, err := parseBoolResponse(err) - return isBlocked, resp, err -} - -// BlockUser blocks specified user for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/blocking/#block-a-user -func (s *UsersService) BlockUser(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("user/blocks/%v", user) - - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - return s.client.Do(ctx, req, nil) -} - -// UnblockUser unblocks specified user for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/blocking/#unblock-a-user -func (s *UsersService) UnblockUser(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("user/blocks/%v", user) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeBlockUsersPreview) - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_emails.go b/vendor/github.com/google/go-github/v30/github/users_emails.go deleted file mode 100644 index bf02d1a6..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_emails.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import "context" - -// UserEmail represents user's email address -type UserEmail struct { - Email *string `json:"email,omitempty"` - Primary *bool `json:"primary,omitempty"` - Verified *bool `json:"verified,omitempty"` - Visibility *string `json:"visibility,omitempty"` -} - -// ListEmails lists all email addresses for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user -func (s *UsersService) ListEmails(ctx context.Context, opts *ListOptions) ([]*UserEmail, *Response, error) { - u := "user/emails" - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var emails []*UserEmail - resp, err := s.client.Do(ctx, req, &emails) - if err != nil { - return nil, resp, err - } - - return emails, resp, nil -} - -// AddEmails adds email addresses of the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/emails/#add-email-addresses -func (s *UsersService) AddEmails(ctx context.Context, emails []string) ([]*UserEmail, *Response, error) { - u := "user/emails" - req, err := s.client.NewRequest("POST", u, emails) - if err != nil { - return nil, nil, err - } - - var e []*UserEmail - resp, err := s.client.Do(ctx, req, &e) - if err != nil { - return nil, resp, err - } - - return e, resp, nil -} - -// DeleteEmails deletes email addresses from authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/emails/#delete-email-addresses -func (s *UsersService) DeleteEmails(ctx context.Context, emails []string) (*Response, error) { - u := "user/emails" - req, err := s.client.NewRequest("DELETE", u, emails) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_followers.go b/vendor/github.com/google/go-github/v30/github/users_followers.go deleted file mode 100644 index afa7d4b6..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_followers.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListFollowers lists the followers for a user. Passing the empty string will -// fetch followers for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/followers/#list-followers-of-a-user -func (s *UsersService) ListFollowers(ctx context.Context, user string, opts *ListOptions) ([]*User, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/followers", user) - } else { - u = "user/followers" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var users []*User - resp, err := s.client.Do(ctx, req, &users) - if err != nil { - return nil, resp, err - } - - return users, resp, nil -} - -// ListFollowing lists the people that a user is following. Passing the empty -// string will list people the authenticated user is following. -// -// GitHub API docs: https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user -func (s *UsersService) ListFollowing(ctx context.Context, user string, opts *ListOptions) ([]*User, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/following", user) - } else { - u = "user/following" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var users []*User - resp, err := s.client.Do(ctx, req, &users) - if err != nil { - return nil, resp, err - } - - return users, resp, nil -} - -// IsFollowing checks if "user" is following "target". Passing the empty -// string for "user" will check if the authenticated user is following "target". -// -// GitHub API docs: https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user -func (s *UsersService) IsFollowing(ctx context.Context, user, target string) (bool, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/following/%v", user, target) - } else { - u = fmt.Sprintf("user/following/%v", target) - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - following, err := parseBoolResponse(err) - return following, resp, err -} - -// Follow will cause the authenticated user to follow the specified user. -// -// GitHub API docs: https://developer.github.com/v3/users/followers/#follow-a-user -func (s *UsersService) Follow(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("user/following/%v", user) - req, err := s.client.NewRequest("PUT", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// Unfollow will cause the authenticated user to unfollow the specified user. -// -// GitHub API docs: https://developer.github.com/v3/users/followers/#unfollow-a-user -func (s *UsersService) Unfollow(ctx context.Context, user string) (*Response, error) { - u := fmt.Sprintf("user/following/%v", user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v30/github/users_gpg_keys.go deleted file mode 100644 index 1d4dab04..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_gpg_keys.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2016 The go-github 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 github - -import ( - "context" - "fmt" - "time" -) - -// GPGKey represents a GitHub user's public GPG key used to verify GPG signed commits and tags. -// -// https://developer.github.com/changes/2016-04-04-git-signing-api-preview/ -type GPGKey struct { - ID *int64 `json:"id,omitempty"` - PrimaryKeyID *int64 `json:"primary_key_id,omitempty"` - KeyID *string `json:"key_id,omitempty"` - PublicKey *string `json:"public_key,omitempty"` - Emails []*GPGEmail `json:"emails,omitempty"` - Subkeys []*GPGKey `json:"subkeys,omitempty"` - CanSign *bool `json:"can_sign,omitempty"` - CanEncryptComms *bool `json:"can_encrypt_comms,omitempty"` - CanEncryptStorage *bool `json:"can_encrypt_storage,omitempty"` - CanCertify *bool `json:"can_certify,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ExpiresAt *time.Time `json:"expires_at,omitempty"` -} - -// String stringifies a GPGKey. -func (k GPGKey) String() string { - return Stringify(k) -} - -// GPGEmail represents an email address associated to a GPG key. -type GPGEmail struct { - Email *string `json:"email,omitempty"` - Verified *bool `json:"verified,omitempty"` -} - -// ListGPGKeys lists the public GPG keys for a user. Passing the empty -// string will fetch keys for the authenticated user. It requires authentication -// via Basic Auth or via OAuth with at least read:gpg_key scope. -// -// GitHub API docs: https://developer.github.com/v3/users/gpg_keys/#list-gpg-keys-for-a-user -func (s *UsersService) ListGPGKeys(ctx context.Context, user string, opts *ListOptions) ([]*GPGKey, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/gpg_keys", user) - } else { - u = "user/gpg_keys" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var keys []*GPGKey - resp, err := s.client.Do(ctx, req, &keys) - if err != nil { - return nil, resp, err - } - - return keys, resp, nil -} - -// GetGPGKey gets extended details for a single GPG key. It requires authentication -// via Basic Auth or via OAuth with at least read:gpg_key scope. -// -// GitHub API docs: https://developer.github.com/v3/users/gpg_keys/#get-a-single-gpg-key -func (s *UsersService) GetGPGKey(ctx context.Context, id int64) (*GPGKey, *Response, error) { - u := fmt.Sprintf("user/gpg_keys/%v", id) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - key := &GPGKey{} - resp, err := s.client.Do(ctx, req, key) - if err != nil { - return nil, resp, err - } - - return key, resp, nil -} - -// CreateGPGKey creates a GPG key. It requires authenticatation via Basic Auth -// or OAuth with at least write:gpg_key scope. -// -// GitHub API docs: https://developer.github.com/v3/users/gpg_keys/#create-a-gpg-key -func (s *UsersService) CreateGPGKey(ctx context.Context, armoredPublicKey string) (*GPGKey, *Response, error) { - gpgKey := &struct { - ArmoredPublicKey string `json:"armored_public_key"` - }{ArmoredPublicKey: armoredPublicKey} - req, err := s.client.NewRequest("POST", "user/gpg_keys", gpgKey) - if err != nil { - return nil, nil, err - } - - key := &GPGKey{} - resp, err := s.client.Do(ctx, req, key) - if err != nil { - return nil, resp, err - } - - return key, resp, nil -} - -// DeleteGPGKey deletes a GPG key. It requires authentication via Basic Auth or -// via OAuth with at least admin:gpg_key scope. -// -// GitHub API docs: https://developer.github.com/v3/users/gpg_keys/#delete-a-gpg-key -func (s *UsersService) DeleteGPGKey(ctx context.Context, id int64) (*Response, error) { - u := fmt.Sprintf("user/gpg_keys/%v", id) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_keys.go b/vendor/github.com/google/go-github/v30/github/users_keys.go deleted file mode 100644 index f12c01b9..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_keys.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2013 The go-github 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 github - -import ( - "context" - "fmt" -) - -// Key represents a public SSH key used to authenticate a user or deploy script. -type Key struct { - ID *int64 `json:"id,omitempty"` - Key *string `json:"key,omitempty"` - URL *string `json:"url,omitempty"` - Title *string `json:"title,omitempty"` - ReadOnly *bool `json:"read_only,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` -} - -func (k Key) String() string { - return Stringify(k) -} - -// ListKeys lists the verified public keys for a user. Passing the empty -// string will fetch keys for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user -func (s *UsersService) ListKeys(ctx context.Context, user string, opts *ListOptions) ([]*Key, *Response, error) { - var u string - if user != "" { - u = fmt.Sprintf("users/%v/keys", user) - } else { - u = "user/keys" - } - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var keys []*Key - resp, err := s.client.Do(ctx, req, &keys) - if err != nil { - return nil, resp, err - } - - return keys, resp, nil -} - -// GetKey fetches a single public key. -// -// GitHub API docs: https://developer.github.com/v3/users/keys/#get-a-single-public-key -func (s *UsersService) GetKey(ctx context.Context, id int64) (*Key, *Response, error) { - u := fmt.Sprintf("user/keys/%v", id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - key := new(Key) - resp, err := s.client.Do(ctx, req, key) - if err != nil { - return nil, resp, err - } - - return key, resp, nil -} - -// CreateKey adds a public key for the authenticated user. -// -// GitHub API docs: https://developer.github.com/v3/users/keys/#create-a-public-key -func (s *UsersService) CreateKey(ctx context.Context, key *Key) (*Key, *Response, error) { - u := "user/keys" - - req, err := s.client.NewRequest("POST", u, key) - if err != nil { - return nil, nil, err - } - - k := new(Key) - resp, err := s.client.Do(ctx, req, k) - if err != nil { - return nil, resp, err - } - - return k, resp, nil -} - -// DeleteKey deletes a public key. -// -// GitHub API docs: https://developer.github.com/v3/users/keys/#delete-a-public-key -func (s *UsersService) DeleteKey(ctx context.Context, id int64) (*Response, error) { - u := fmt.Sprintf("user/keys/%v", id) - - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} diff --git a/vendor/github.com/google/go-github/v30/github/users_projects.go b/vendor/github.com/google/go-github/v30/github/users_projects.go deleted file mode 100644 index 64e85a03..00000000 --- a/vendor/github.com/google/go-github/v30/github/users_projects.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2019 The go-github 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 github - -import ( - "context" - "fmt" -) - -// ListProjects lists the projects for the specified user. -// -// GitHub API docs: https://developer.github.com/v3/projects/#list-user-projects -func (s *UsersService) ListProjects(ctx context.Context, user string, opts *ProjectListOptions) ([]*Project, *Response, error) { - u := fmt.Sprintf("users/%v/projects", user) - u, err := addOptions(u, opts) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - var projects []*Project - resp, err := s.client.Do(ctx, req, &projects) - if err != nil { - return nil, resp, err - } - - return projects, resp, nil -} - -// CreateUserProjectOptions specifies the parameters to the UsersService.CreateProject method. -type CreateUserProjectOptions struct { - // The name of the project. (Required.) - Name string `json:"name"` - // The description of the project. (Optional.) - Body *string `json:"body,omitempty"` -} - -// CreateProject creates a GitHub Project for the current user. -// -// GitHub API docs: https://developer.github.com/v3/projects/#create-a-user-project -func (s *UsersService) CreateProject(ctx context.Context, opts *CreateUserProjectOptions) (*Project, *Response, error) { - u := "users/projects" - req, err := s.client.NewRequest("POST", u, opts) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeProjectsPreview) - - project := &Project{} - resp, err := s.client.Do(ctx, req, project) - if err != nil { - return nil, resp, err - } - - return project, resp, nil -} diff --git a/vendor/github.com/google/go-github/v30/github/with_appengine.go b/vendor/github.com/google/go-github/v30/github/with_appengine.go deleted file mode 100644 index 59ce26b2..00000000 --- a/vendor/github.com/google/go-github/v30/github/with_appengine.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appengine - -// This file provides glue for making github work on App Engine. - -package github - -import ( - "context" - "net/http" -) - -func withContext(ctx context.Context, req *http.Request) *http.Request { - // No-op because App Engine adds context to a request differently. - return req -} diff --git a/vendor/github.com/google/go-github/v30/github/without_appengine.go b/vendor/github.com/google/go-github/v30/github/without_appengine.go deleted file mode 100644 index 6f8fdac5..00000000 --- a/vendor/github.com/google/go-github/v30/github/without_appengine.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !appengine - -// This file provides glue for making github work without App Engine. - -package github - -import ( - "context" - "net/http" -) - -func withContext(ctx context.Context, req *http.Request) *http.Request { - return req.WithContext(ctx) -} diff --git a/vendor/github.com/google/go-querystring/LICENSE b/vendor/github.com/google/go-querystring/LICENSE deleted file mode 100644 index ae121a1e..00000000 --- a/vendor/github.com/google/go-querystring/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 Google. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/google/go-querystring/query/encode.go b/vendor/github.com/google/go-querystring/query/encode.go deleted file mode 100644 index 91198f81..00000000 --- a/vendor/github.com/google/go-querystring/query/encode.go +++ /dev/null @@ -1,357 +0,0 @@ -// Copyright 2013 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 query implements encoding of structs into URL query parameters. -// -// As a simple example: -// -// type Options struct { -// Query string `url:"q"` -// ShowAll bool `url:"all"` -// Page int `url:"page"` -// } -// -// opt := Options{ "foo", true, 2 } -// v, _ := query.Values(opt) -// fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2" -// -// The exact mapping between Go values and url.Values is described in the -// documentation for the Values() function. -package query - -import ( - "bytes" - "fmt" - "net/url" - "reflect" - "strconv" - "strings" - "time" -) - -var timeType = reflect.TypeOf(time.Time{}) - -var encoderType = reflect.TypeOf(new(Encoder)).Elem() - -// Encoder is an interface implemented by any type that wishes to encode -// itself into URL values in a non-standard way. -type Encoder interface { - EncodeValues(key string, v *url.Values) error -} - -// Values returns the url.Values encoding of v. -// -// Values expects to be passed a struct, and traverses it recursively using the -// following encoding rules. -// -// Each exported struct field is encoded as a URL parameter unless -// -// - the field's tag is "-", or -// - the field is empty and its tag specifies the "omitempty" option -// -// The empty values are false, 0, any nil pointer or interface value, any array -// slice, map, or string of length zero, and any type (such as time.Time) that -// returns true for IsZero(). -// -// The URL parameter name defaults to the struct field name but can be -// specified in the struct field's tag value. The "url" key in the struct -// field's tag value is the key name, followed by an optional comma and -// options. For example: -// -// // Field is ignored by this package. -// Field int `url:"-"` -// -// // Field appears as URL parameter "myName". -// Field int `url:"myName"` -// -// // Field appears as URL parameter "myName" and the field is omitted if -// // its value is empty -// Field int `url:"myName,omitempty"` -// -// // Field appears as URL parameter "Field" (the default), but the field -// // is skipped if empty. Note the leading comma. -// Field int `url:",omitempty"` -// -// For encoding individual field values, the following type-dependent rules -// apply: -// -// Boolean values default to encoding as the strings "true" or "false". -// Including the "int" option signals that the field should be encoded as the -// strings "1" or "0". -// -// time.Time values default to encoding as RFC3339 timestamps. Including the -// "unix" option signals that the field should be encoded as a Unix time (see -// time.Unix()). The "unixmilli" and "unixnano" options will encode the number -// of milliseconds and nanoseconds, respectively, since January 1, 1970 (see -// time.UnixNano()). Including the "layout" struct tag (separate from the -// "url" tag) will use the value of the "layout" tag as a layout passed to -// time.Format. For example: -// -// // Encode a time.Time as YYYY-MM-DD -// Field time.Time `layout:"2006-01-02"` -// -// Slice and Array values default to encoding as multiple URL values of the -// same name. Including the "comma" option signals that the field should be -// encoded as a single comma-delimited value. Including the "space" option -// similarly encodes the value as a single space-delimited string. Including -// the "semicolon" option will encode the value as a semicolon-delimited string. -// Including the "brackets" option signals that the multiple URL values should -// have "[]" appended to the value name. "numbered" will append a number to -// the end of each incidence of the value name, example: -// name0=value0&name1=value1, etc. Including the "del" struct tag (separate -// from the "url" tag) will use the value of the "del" tag as the delimiter. -// For example: -// -// // Encode a slice of bools as ints ("1" for true, "0" for false), -// // separated by exclamation points "!". -// Field []bool `url:",int" del:"!"` -// -// Anonymous struct fields are usually encoded as if their inner exported -// fields were fields in the outer struct, subject to the standard Go -// visibility rules. An anonymous struct field with a name given in its URL -// tag is treated as having that name, rather than being anonymous. -// -// Non-nil pointer values are encoded as the value pointed to. -// -// Nested structs are encoded including parent fields in value names for -// scoping. e.g: -// -// "user[name]=acme&user[addr][postcode]=1234&user[addr][city]=SFO" -// -// All other values are encoded using their default string representation. -// -// Multiple fields that encode to the same URL parameter name will be included -// as multiple URL values of the same name. -func Values(v interface{}) (url.Values, error) { - values := make(url.Values) - val := reflect.ValueOf(v) - for val.Kind() == reflect.Ptr { - if val.IsNil() { - return values, nil - } - val = val.Elem() - } - - if v == nil { - return values, nil - } - - if val.Kind() != reflect.Struct { - return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind()) - } - - err := reflectValue(values, val, "") - return values, err -} - -// reflectValue populates the values parameter from the struct fields in val. -// Embedded structs are followed recursively (using the rules defined in the -// Values function documentation) breadth-first. -func reflectValue(values url.Values, val reflect.Value, scope string) error { - var embedded []reflect.Value - - typ := val.Type() - for i := 0; i < typ.NumField(); i++ { - sf := typ.Field(i) - if sf.PkgPath != "" && !sf.Anonymous { // unexported - continue - } - - sv := val.Field(i) - tag := sf.Tag.Get("url") - if tag == "-" { - continue - } - name, opts := parseTag(tag) - - if name == "" { - if sf.Anonymous { - v := reflect.Indirect(sv) - if v.IsValid() && v.Kind() == reflect.Struct { - // save embedded struct for later processing - embedded = append(embedded, v) - continue - } - } - - name = sf.Name - } - - if scope != "" { - name = scope + "[" + name + "]" - } - - if opts.Contains("omitempty") && isEmptyValue(sv) { - continue - } - - if sv.Type().Implements(encoderType) { - // if sv is a nil pointer and the custom encoder is defined on a non-pointer - // method receiver, set sv to the zero value of the underlying type - if !reflect.Indirect(sv).IsValid() && sv.Type().Elem().Implements(encoderType) { - sv = reflect.New(sv.Type().Elem()) - } - - m := sv.Interface().(Encoder) - if err := m.EncodeValues(name, &values); err != nil { - return err - } - continue - } - - // recursively dereference pointers. break on nil pointers - for sv.Kind() == reflect.Ptr { - if sv.IsNil() { - break - } - sv = sv.Elem() - } - - if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array { - var del string - if opts.Contains("comma") { - del = "," - } else if opts.Contains("space") { - del = " " - } else if opts.Contains("semicolon") { - del = ";" - } else if opts.Contains("brackets") { - name = name + "[]" - } else { - del = sf.Tag.Get("del") - } - - if del != "" { - s := new(bytes.Buffer) - first := true - for i := 0; i < sv.Len(); i++ { - if first { - first = false - } else { - s.WriteString(del) - } - s.WriteString(valueString(sv.Index(i), opts, sf)) - } - values.Add(name, s.String()) - } else { - for i := 0; i < sv.Len(); i++ { - k := name - if opts.Contains("numbered") { - k = fmt.Sprintf("%s%d", name, i) - } - values.Add(k, valueString(sv.Index(i), opts, sf)) - } - } - continue - } - - if sv.Type() == timeType { - values.Add(name, valueString(sv, opts, sf)) - continue - } - - if sv.Kind() == reflect.Struct { - if err := reflectValue(values, sv, name); err != nil { - return err - } - continue - } - - values.Add(name, valueString(sv, opts, sf)) - } - - for _, f := range embedded { - if err := reflectValue(values, f, scope); err != nil { - return err - } - } - - return nil -} - -// valueString returns the string representation of a value. -func valueString(v reflect.Value, opts tagOptions, sf reflect.StructField) string { - for v.Kind() == reflect.Ptr { - if v.IsNil() { - return "" - } - v = v.Elem() - } - - if v.Kind() == reflect.Bool && opts.Contains("int") { - if v.Bool() { - return "1" - } - return "0" - } - - if v.Type() == timeType { - t := v.Interface().(time.Time) - if opts.Contains("unix") { - return strconv.FormatInt(t.Unix(), 10) - } - if opts.Contains("unixmilli") { - return strconv.FormatInt((t.UnixNano() / 1e6), 10) - } - if opts.Contains("unixnano") { - return strconv.FormatInt(t.UnixNano(), 10) - } - if layout := sf.Tag.Get("layout"); layout != "" { - return t.Format(layout) - } - return t.Format(time.RFC3339) - } - - return fmt.Sprint(v.Interface()) -} - -// isEmptyValue checks if a value should be considered empty for the purposes -// of omitting fields with the "omitempty" option. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - - type zeroable interface { - IsZero() bool - } - - if z, ok := v.Interface().(zeroable); ok { - return z.IsZero() - } - - return false -} - -// tagOptions is the string following a comma in a struct field's "url" tag, or -// the empty string. It does not include the leading comma. -type tagOptions []string - -// parseTag splits a struct field's url tag into its name and comma-separated -// options. -func parseTag(tag string) (string, tagOptions) { - s := strings.Split(tag, ",") - return s[0], s[1:] -} - -// Contains checks whether the tagOptions contains the specified option. -func (o tagOptions) Contains(option string) bool { - for _, s := range o { - if s == option { - return true - } - } - return false -} diff --git a/vendor/github.com/gosimple/slug/.gitignore b/vendor/github.com/gosimple/slug/.gitignore deleted file mode 100644 index 10a24424..00000000 --- a/vendor/github.com/gosimple/slug/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -_* -cover*.out -cover*.txt diff --git a/vendor/github.com/gosimple/slug/LICENSE b/vendor/github.com/gosimple/slug/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/vendor/github.com/gosimple/slug/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/gosimple/slug/README.md b/vendor/github.com/gosimple/slug/README.md deleted file mode 100644 index 7732dbcb..00000000 --- a/vendor/github.com/gosimple/slug/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# slug - -Package `slug` generate slug from Unicode string, URL-friendly slugify with -multiple languages support. - -[![Go Reference](https://pkg.go.dev/badge/github.com/gosimple/slug.svg)](https://pkg.go.dev/github.com/gosimple/slug) -[![Tests](https://github.com/gosimple/slug/actions/workflows/tests.yml/badge.svg)](https://github.com/gosimple/slug/actions/workflows/tests.yml) -[![codecov](https://codecov.io/gh/gosimple/slug/branch/master/graph/badge.svg?token=FT2kEZHQW7)](https://codecov.io/gh/gosimple/slug) -[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gosimple/slug?logo=github&sort=semver)](https://github.com/gosimple/slug/releases) - -## Example - -```go -package main - -import ( - "fmt" - "github.com/gosimple/slug" -) - -func main() { - text := slug.Make("Hellö Wörld хелло ворлд") - fmt.Println(text) // Will print: "hello-world-khello-vorld" - - someText := slug.Make("影師") - fmt.Println(someText) // Will print: "ying-shi" - - enText := slug.MakeLang("This & that", "en") - fmt.Println(enText) // Will print: "this-and-that" - - deText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deText) // Will print: "diese-und-dass" - - slug.Lowercase = false // Keep uppercase characters - deUppercaseText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deUppercaseText) // Will print: "Diese-und-Dass" - - slug.CustomSub = map[string]string{ - "water": "sand", - } - textSub := slug.Make("water is hot") - fmt.Println(textSub) // Will print: "sand-is-hot" -} -``` - -## Design - -This library will always returns clean output from any Unicode string -containing only the following ASCII characters: - -* numbers: `0-9` -* small letters: `a-z` -* big letters: `A-Z` (only if you set `Lowercase` to `false`) -* minus sign: `-` -* underscore: `_` - -Minus sign and underscore characters will never appear at the beginning or -the end of the returned string. - -Thanks to context-insensitive transliteration of Unicode characters to ASCII -output returned string is safe for URL slugs and filenames. - -## Requests or bugs? - - - -If your language is missing you could add it in `languages_substitution.go` -file. - -In case of missing proper Unicode characters transliteration to ASCII you could -add them to underlying library: -. - -## Installation - -```shell -go get -u github.com/gosimple/slug -``` - -## Benchmarking - -```shell -go test -run=NONE -bench=. -benchmem -count=6 ./... > old.txt -# make changes -go test -run=NONE -bench=. -benchmem -count=6 ./... > new.txt - -go install golang.org/x/perf/cmd/benchstat@latest - -benchstat old.txt new.txt -``` - -## License - -The source files are distributed under the -[Mozilla Public License, version 2.0](http://mozilla.org/MPL/2.0/), -unless otherwise noted. -Please read the [FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html) -if you have further questions regarding the license. diff --git a/vendor/github.com/gosimple/slug/codecov.yml b/vendor/github.com/gosimple/slug/codecov.yml deleted file mode 100644 index bd46b3e0..00000000 --- a/vendor/github.com/gosimple/slug/codecov.yml +++ /dev/null @@ -1,4 +0,0 @@ -comment: - layout: "diff, files" - behavior: default - require_changes: false # if true: only post the comment if coverage changes diff --git a/vendor/github.com/gosimple/slug/doc.go b/vendor/github.com/gosimple/slug/doc.go deleted file mode 100644 index f6f764e6..00000000 --- a/vendor/github.com/gosimple/slug/doc.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* -Package slug generate slug from unicode string, URL-friendly slugify with -multiple languages support. - -Example: - - package main - - import( - "github.com/gosimple/slug" - "fmt" - ) - - func main () { - text := slug.Make("Hellö Wörld хелло ворлд") - fmt.Println(text) // Will print: "hello-world-khello-vorld" - - someText := slug.Make("影師") - fmt.Println(someText) // Will print: "ying-shi" - - enText := slug.MakeLang("This & that", "en") - fmt.Println(enText) // Will print: "this-and-that" - - deText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deText) // Will print: "diese-und-dass" - - slug.Lowercase = false // Keep uppercase characters - deUppercaseText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deUppercaseText) // Will print: "Diese-und-Dass" - - slug.CustomSub = map[string]string{ - "water": "sand", - } - textSub := slug.Make("water is hot") - fmt.Println(textSub) // Will print: "sand-is-hot" - } - -Requests or bugs? - -https://github.com/gosimple/slug/issues -*/ -package slug diff --git a/vendor/github.com/gosimple/slug/languages_substitution.go b/vendor/github.com/gosimple/slug/languages_substitution.go deleted file mode 100644 index e2e0ae3b..00000000 --- a/vendor/github.com/gosimple/slug/languages_substitution.go +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -package slug - -func init() { - // Merge language subs with the default one. - // TODO: Find better way so all langs are merged automatically and better - // tested. - for _, sub := range []*map[rune]string{ - &bgSub, - &csSub, - &deSub, - &enSub, - &esSub, - &fiSub, - &frSub, - &grSub, - &huSub, - &idSub, - &itSub, - &kkSub, - &nbSub, - &nlSub, - &nnSub, - &plSub, - &roSub, - &slSub, - &svSub, - &trSub, - } { - for key, value := range defaultSub { - (*sub)[key] = value - } - } -} - -var defaultSub = map[rune]string{ - '"': "", - '\'': "", - '’': "", - '‒': "-", // figure dash - '–': "-", // en dash - '—': "-", // em dash - '―': "-", // horizontal bar -} - -var csSub = map[rune]string{ - '&': "a", - '@': "zavinac", -} - -var deSub = map[rune]string{ - '&': "und", - '@': "an", - 'ä': "ae", - 'Ä': "Ae", - 'ö': "oe", - 'Ö': "Oe", - 'ü': "ue", - 'Ü': "Ue", -} - -var enSub = map[rune]string{ - '&': "and", - '@': "at", -} - -var esSub = map[rune]string{ - '&': "y", - '@': "en", -} - -var fiSub = map[rune]string{ - '&': "ja", - '@': "at", -} - -var frSub = map[rune]string{ - '&': "et", - '@': "arobase", -} - -var grSub = map[rune]string{ - '&': "kai", - 'β': "v", - 'Β': "V", - 'η': "i", - 'Η': "I", - 'ή': "i", - 'Ή': "I", - 'ι': "i", - 'Ι': "I", - 'ί': "i", - 'Ί': "I", - 'ϊ': "i", - 'Ϊ': "I", - 'ΐ': "i", - 'ξ': "x", - 'Ξ': "X", - 'υ': "y", - 'Υ': "Y", - 'ύ': "y", - 'Ύ': "Y", - 'ϋ': "y", - 'Ϋ': "Y", - 'ΰ': "y", - 'φ': "f", - 'Φ': "F", - 'χ': "ch", - 'Χ': "Ch", - 'ω': "o", - 'Ω': "O", - 'ώ': "o", - 'Ώ': "O", -} - -var huSub = map[rune]string{ - 'á': "a", - 'Á': "A", - 'é': "e", - 'É': "E", - 'í': "i", - 'Í': "I", - 'ó': "o", - 'Ó': "O", - 'ö': "o", - 'Ö': "O", - 'ő': "o", - 'Ő': "O", - 'ú': "u", - 'Ú': "U", - 'ü': "u", - 'Ü': "U", - 'ű': "u", - 'Ű': "U", -} - -var idSub = map[rune]string{ - '&': "dan", -} - -var itSub = map[rune]string{ - '&': "e", - '@': "chiocciola", -} - -var kkSub = map[rune]string{ - '&': "jane", - 'ә': "a", - 'ғ': "g", - 'қ': "q", - 'ң': "n", - 'ө': "o", - 'ұ': "u", - 'Ә': "A", - 'Ғ': "G", - 'Қ': "Q", - 'Ң': "N", - 'Ө': "O", - 'Ұ': "U", -} - -var nbSub = map[rune]string{ - '&': "og", - '@': "at", - 'æ': "ae", - 'ø': "oe", - 'å': "aa", - 'Æ': "Ae", - 'Ø': "Oe", - 'Å': "Aa", -} - -// Norwegian Nynorsk has the same rules -var nnSub = nbSub - -var nlSub = map[rune]string{ - '&': "en", - '@': "at", -} - -var plSub = map[rune]string{ - '&': "i", - '@': "na", -} - -var roSub = map[rune]string{ - '&': "si", - 'Ă': "A", - 'ă': "a", - 'Â': "A", - 'â': "a", - 'Î': "I", - 'î': "i", - 'Ș': "S", - 'ș': "s", - 'Ț': "T", - 'ț': "t", -} - -var slSub = map[rune]string{ - '&': "in", - 'Đ': "DZ", - 'đ': "dz", -} - -var svSub = map[rune]string{ - '&': "och", - '@': "snabel a", -} - -var trSub = map[rune]string{ - '&': "ve", - '@': "et", - 'ş': "s", - 'Ş': "S", - 'ü': "u", - 'Ü': "U", - 'ö': "o", - 'Ö': "O", - 'İ': "I", - 'ı': "i", - 'ğ': "g", - 'Ğ': "G", - 'ç': "c", - 'Ç': "C", -} - -var bgSub = map[rune]string{ - 'А': "A", - 'Б': "B", - 'В': "V", - 'Г': "G", - 'Д': "D", - 'Е': "E", - 'Ж': "Zh", - 'З': "Z", - 'И': "I", - 'Й': "Y", - 'К': "K", - 'Л': "L", - 'М': "M", - 'Н': "N", - 'О': "O", - 'П': "P", - 'Р': "R", - 'С': "S", - 'Т': "T", - 'У': "U", - 'Ф': "F", - 'Х': "H", - 'Ц': "Ts", - 'Ч': "Ch", - 'Ш': "Sh", - 'Щ': "Sh", - 'Ъ': "A", - 'Ь': "Y", - 'Ю': "Yu", - 'Я': "Ya", - 'а': "a", - 'б': "b", - 'в': "v", - 'г': "g", - 'д': "d", - 'е': "e", - 'ж': "zh", - 'з': "z", - 'и': "i", - 'й': "y", - 'к': "k", - 'л': "l", - 'м': "m", - 'н': "n", - 'о': "o", - 'п': "p", - 'р': "r", - 'с': "s", - 'т': "t", - 'у': "u", - 'ф': "f", - 'х': "h", - 'ц': "ts", - 'ч': "ch", - 'ш': "sh", - 'щ': "sht", - 'ъ': "a", - 'ь': "y", - 'ю': "yu", - 'я': "ya", -} diff --git a/vendor/github.com/gosimple/slug/slug.go b/vendor/github.com/gosimple/slug/slug.go deleted file mode 100644 index f93f636f..00000000 --- a/vendor/github.com/gosimple/slug/slug.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -package slug - -import ( - "bytes" - "regexp" - "sort" - "strings" - - "github.com/gosimple/unidecode" -) - -var ( - // CustomSub stores custom substitution map - CustomSub map[string]string - // CustomRuneSub stores custom rune substitution map - CustomRuneSub map[rune]string - - // MaxLength stores maximum slug length. - // By default slugs aren't shortened. - // If MaxLength is smaller than length of the first word, then returned - // slug will contain only substring from the first word truncated - // after MaxLength. - MaxLength int - - // EnableSmartTruncate defines if cutting with MaxLength is smart. - // Smart algorithm will cat slug after full word. - // Default is true. - EnableSmartTruncate = true - - // Lowercase defines if the resulting slug is transformed to lowercase. - // Default is true. - Lowercase = true - - regexpNonAuthorizedChars = regexp.MustCompile("[^a-zA-Z0-9-_]") - regexpMultipleDashes = regexp.MustCompile("-+") -) - -//============================================================================= - -// Make returns slug generated from provided string. Will use "en" as language -// substitution. -func Make(s string) (slug string) { - return MakeLang(s, "en") -} - -// MakeLang returns slug generated from provided string and will use provided -// language for chars substitution. -func MakeLang(s string, lang string) (slug string) { - slug = strings.TrimSpace(s) - - // Custom substitutions - // Always substitute runes first - slug = SubstituteRune(slug, CustomRuneSub) - slug = Substitute(slug, CustomSub) - - // Process string with selected substitution language. - // Catch ISO 3166-1, ISO 639-1:2002 and ISO 639-3:2007. - switch strings.ToLower(lang) { - case "bg", "bgr": - slug = SubstituteRune(slug, bgSub) - case "cs", "ces": - slug = SubstituteRune(slug, csSub) - case "de", "deu": - slug = SubstituteRune(slug, deSub) - case "en", "eng": - slug = SubstituteRune(slug, enSub) - case "es", "spa": - slug = SubstituteRune(slug, esSub) - case "fi", "fin": - slug = SubstituteRune(slug, fiSub) - case "fr", "fra": - slug = SubstituteRune(slug, frSub) - case "gr", "el", "ell": - slug = SubstituteRune(slug, grSub) - case "hu", "hun": - slug = SubstituteRune(slug, huSub) - case "id", "idn", "ind": - slug = SubstituteRune(slug, idSub) - case "it", "ita": - slug = SubstituteRune(slug, itSub) - case "kz", "kk", "kaz": - slug = SubstituteRune(slug, kkSub) - case "nb", "nob": - slug = SubstituteRune(slug, nbSub) - case "nl", "nld": - slug = SubstituteRune(slug, nlSub) - case "nn", "nno": - slug = SubstituteRune(slug, nnSub) - case "pl", "pol": - slug = SubstituteRune(slug, plSub) - case "ro", "rou": - slug = SubstituteRune(slug, roSub) - case "sl", "slv": - slug = SubstituteRune(slug, slSub) - case "sv", "swe": - slug = SubstituteRune(slug, svSub) - case "tr", "tur": - slug = SubstituteRune(slug, trSub) - default: // fallback to "en" if lang not found - slug = SubstituteRune(slug, enSub) - } - - // Process all non ASCII symbols - slug = unidecode.Unidecode(slug) - - if Lowercase { - slug = strings.ToLower(slug) - } - - if !EnableSmartTruncate && len(slug) >= MaxLength { - slug = slug[:MaxLength] - } - - // Process all remaining symbols - slug = regexpNonAuthorizedChars.ReplaceAllString(slug, "-") - slug = regexpMultipleDashes.ReplaceAllString(slug, "-") - slug = strings.Trim(slug, "-_") - - if MaxLength > 0 && EnableSmartTruncate { - slug = smartTruncate(slug) - } - - return slug -} - -// Substitute returns string with superseded all substrings from -// provided substitution map. Substitution map will be applied in alphabetic -// order. Many passes, on one substitution another one could apply. -func Substitute(s string, sub map[string]string) (buf string) { - buf = s - var keys []string - for k := range sub { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, key := range keys { - buf = strings.Replace(buf, key, sub[key], -1) - } - return -} - -// SubstituteRune substitutes string chars with provided rune -// substitution map. One pass. -func SubstituteRune(s string, sub map[rune]string) string { - var buf bytes.Buffer - for _, c := range s { - if d, ok := sub[c]; ok { - buf.WriteString(d) - } else { - buf.WriteRune(c) - } - } - return buf.String() -} - -func smartTruncate(text string) string { - if len(text) <= MaxLength { - return text - } - - // If slug is too long, we need to find the last '-' before MaxLength, and - // we cut there. - // If we don't find any, we have only one word, and we cut at MaxLength. - for i := MaxLength; i >= 0; i-- { - if text[i] == '-' { - return text[:i] - } - } - return text[:MaxLength] -} - -// IsSlug returns True if provided text does not contain white characters, -// punctuation, all letters are lower case and only from ASCII range. -// It could contain `-` and `_` but not at the beginning or end of the text. -// It should be in range of the MaxLength var if specified. -// All output from slug.Make(text) should pass this test. -func IsSlug(text string) bool { - if text == "" || - (MaxLength > 0 && len(text) > MaxLength) || - text[0] == '-' || text[0] == '_' || - text[len(text)-1] == '-' || text[len(text)-1] == '_' { - return false - } - for _, c := range text { - if (c < 'a' || c > 'z') && c != '-' && c != '_' && (c < '0' || c > '9') { - return false - } - } - return true -} diff --git a/vendor/github.com/gosimple/unidecode/.gitignore b/vendor/github.com/gosimple/unidecode/.gitignore deleted file mode 100644 index 83656241..00000000 --- a/vendor/github.com/gosimple/unidecode/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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 diff --git a/vendor/github.com/gosimple/unidecode/LICENSE b/vendor/github.com/gosimple/unidecode/LICENSE deleted file mode 100644 index 50802eab..00000000 --- a/vendor/github.com/gosimple/unidecode/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ -Copyright 2014 Rainy Cape S.L. - -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/github.com/gosimple/unidecode/README.md b/vendor/github.com/gosimple/unidecode/README.md deleted file mode 100644 index 3f95400c..00000000 --- a/vendor/github.com/gosimple/unidecode/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# unidecode - -[![Go Reference](https://pkg.go.dev/badge/github.com/gosimple/unidecode.svg)](https://pkg.go.dev/github.com/gosimple/unidecode) -[![Tests](https://github.com/gosimple/unidecode/actions/workflows/tests.yml/badge.svg)](https://github.com/gosimple/unidecode/actions/workflows/tests.yml) - -Unicode transliterator in Golang - Replaces non-ASCII characters with their -ASCII approximations. - -Fork of https://github.com/rainycape/unidecode - -## Example - -```go -package main - -import ( - "fmt" - - "github.com/gosimple/unidecode" -) - -func main() { - decoded := unidecode.Unidecode("Łódź") - fmt.Println(decoded) - // Output: Lodz -} -``` - -### Requests or bugs? - - - -## Installation - -```shell -go get -u github.com/gosimple/unidecode -``` - -## Benchmark - -```shell -go test -run=NONE -bench=. -benchmem -count=6 ./... > old.txt -# make changes -go test -run=NONE -bench=. -benchmem -count=6 ./... > new.txt - -go install golang.org/x/perf/cmd/benchstat@latest - -benchstat old.txt new.txt -``` - -## Add new characters - -1. Edit `table.txt` file. -2. Rebuild `table.go` file: - - ```go - go run ./make_table.go - ``` diff --git a/vendor/github.com/gosimple/unidecode/decode.go b/vendor/github.com/gosimple/unidecode/decode.go deleted file mode 100644 index f99e0bbb..00000000 --- a/vendor/github.com/gosimple/unidecode/decode.go +++ /dev/null @@ -1,44 +0,0 @@ -package unidecode - -import ( - "compress/zlib" - "io" - "strings" -) - -const ( - dummyLenght = byte(0xff) -) - -var ( - transliterations [65536][]rune - transCount = rune(len(transliterations)) -) - -func decodeTransliterations() { - r, err := zlib.NewReader(strings.NewReader(tableData)) - if err != nil { - panic(err) - } - defer r.Close() - b := make([]byte, 0, 13) // 13 = longest transliteration, adjust if needed - lenB := b[:1] - chr := uint16(0xffff) // char counter, rely on overflow on first pass - for { - chr++ - if _, err := io.ReadFull(r, lenB); err != nil { - if err == io.EOF { - break - } - panic(err) - } - if lenB[0] == dummyLenght { - continue - } - b = b[:lenB[0]] // resize, preserving allocation - if _, err := io.ReadFull(r, b); err != nil { - panic(err) - } - transliterations[int(chr)] = []rune(string(b)) - } -} diff --git a/vendor/github.com/gosimple/unidecode/make_table.go b/vendor/github.com/gosimple/unidecode/make_table.go deleted file mode 100644 index 41a52e5d..00000000 --- a/vendor/github.com/gosimple/unidecode/make_table.go +++ /dev/null @@ -1,80 +0,0 @@ -//go:build none -// +build none - -package main - -import ( - "bytes" - "compress/zlib" - "encoding/binary" - "fmt" - "go/format" - "io/ioutil" - "strconv" - "strings" -) - -func main() { - data, err := ioutil.ReadFile("table.txt") - if err != nil { - panic(err) - } - var buf bytes.Buffer - previousVal := int64(-1) - for _, line := range strings.Split(string(data), "\n") { - if strings.HasPrefix(line, "/*") || line == "" { - continue - } - sep := strings.IndexByte(line, ':') - if sep == -1 { - panic(line) - } - val, err := strconv.ParseInt(line[:sep], 0, 32) - if err != nil { - panic(err) - } - - if previousVal+1 != val { - rangechars := 0 - for i := previousVal + 1; i <= val-1; i++ { - if err := binary.Write(&buf, binary.LittleEndian, uint8(0xff)); err != nil { - panic(err) - } - rangechars++ - } - fmt.Printf("Filled dummy range: 0x%04x - 0x%04x (%4d chars)\n", previousVal+1, val-1, rangechars) - } - - s, err := strconv.Unquote(line[sep+2:]) - if err != nil { - panic(err) - } - if err := binary.Write(&buf, binary.LittleEndian, uint8(len(s))); err != nil { - panic(err) - } - previousVal = val - buf.WriteString(s) - } - var cbuf bytes.Buffer - w, err := zlib.NewWriterLevel(&cbuf, zlib.BestCompression) - if err != nil { - panic(err) - } - if _, err := w.Write(buf.Bytes()); err != nil { - panic(err) - } - if err := w.Close(); err != nil { - panic(err) - } - buf.Reset() - buf.WriteString("package unidecode\n") - buf.WriteString("// AUTOGENERATED - DO NOT EDIT!\n\n") - fmt.Fprintf(&buf, "const tableData = %q;\n", cbuf.String()) - dst, err := format.Source(buf.Bytes()) - if err != nil { - panic(err) - } - if err := ioutil.WriteFile("table.go", dst, 0644); err != nil { - panic(err) - } -} diff --git a/vendor/github.com/gosimple/unidecode/table.go b/vendor/github.com/gosimple/unidecode/table.go deleted file mode 100644 index 8f9441e1..00000000 --- a/vendor/github.com/gosimple/unidecode/table.go +++ /dev/null @@ -1,5 +0,0 @@ -package unidecode - -// AUTOGENERATED - DO NOT EDIT! - -const tableData = "x\xda\xec\xbd\t\u007f\x1bǕ/\xaa\xaajHN\xe6\xed\xfb\xfe\x10\xdf;C\xc92)\x91\x94,%\x93\xd8&\x00\x11\x10\xb1\b$ \x11\x80c\x87E\xa2\x84.bi\x12@\v\x02\xaf\xaf\xdfG\xcf\xfb\x9d\xad\xba)\xc9\x13;v\x96;!\xc1.l\x8d\xee\xea\xaaS\xe7\xfc\xcf\xda\xea\x96RJ+\xa3\"UP\xb7\xd5\x1d\xf5\x91\xfa\x85\xfa\xa5\xfa'\xf5_\xa9\xffZ\xfd7\xea\xbfU\xff\x9d\xfa\xef\xd5\xff\xa0\xfeG\xf5?\xa9\xffY\xfd/\xea\u007fU\xff\x9b\xfa\xdf\xd5\xff\xa1\xfeO\xf5\u007f\xa9\xff[\xfd?\xea\xffUE\xf5+\xf5\xb1\xfa\x0f\xea?\xaa\u007fV\xff\xa26\xd4]uO}\xa2\xee\xabOզ\xdaR\x0f\xd4C\xb5\xadvԮz\xa4\x1e\xab\xcf\xd4\x13\xf5T\xfdZ\xfdF\xfd\xab\xfa\xad\xfa\x9d\xfa\\}\xa1\xbeT{\xaa\xa4ʪ\xa2\x9e\xa9}UU5\xf5\\\x1d\xa8\xbaj\xa8\xa6j\xa9\x17\xaa\xad\x0eՑꨮz\xa9^\xa9c\xd5S}5P_\xab߫\xaf\xd57\xea\x0f\xeaDYu\xaa\xce\xd4P9\xf5Z\x8dT\xac\xbc:Wc5QS5S\x89\xbaP\x97j\xae\x16j\xa9R\xf5F\xad\xd4[\xb5VW\xea?\xa9o\xd5\u007fVߩ\xff\xef֟\xf8\x83\xeb\xd3\xe5\a\xba\xdd\xd1\xff\xf1\v\xdd\xff\x9d\xfaVw:\xeacs\xf7잲\xfa\xb7\xbfU\xbf\xbae\xee\xce\xef\xa9M3t#}\u007f\x13\xafuC\xa5\xaa\xad>Q\x9f\xaam\x95\xe8\xcf?7\xdb\x0f\x1e\x99\xed\a;f\xf7\xc1#\xf5\x85\xda\xcb\x1ez\xef\x99*\xabg\xfcxΏ\n^\xb9<ު\x17\xea%?\xfa\xba\x1b\xeb\xc5B\xd9졭Sg\xca\xf1\xc3\xf3c\x88\x17/\x8f\a*Q)?\xd6z\x19\xab\xb5\xdaS6leuvm\xab\xa8!nϔ{o\xab\xaaѵ\xad\xa6bܞ+\xff\ue99f\x1fh\u007f\xae\x0eԹ\xaa\xab\xb1\x1a\xab\x86\x9a\xbc\xb7\xb5\xd4L6\xbd1ӳ\x91nU\xd5\v\x95Ȧ_<ӉSGj\x1e\xb6\x8eZ\\ۺj\x19\xb6\x97*\xfd\xe0v\xacV\xaa\xaf\xd6HS\x9f\xa9\x17|\xf1\x15\xbc\xf8\xa1\xdaU_\"Q\xbeVUU\xd5\xf1\x1b\x9c\x9b:\xd2\xd6D\x1dc\xaf_P\x17\x9f\xebī\xb6\xba\xd0\xfd#\xb5\xa3vt\xa7\xa6\x17q\xe8\x15\x9c\xbf\xaf^\xe1\xf9\a\xeaJ\x0fj\xf0\u007f\x15\xeb\xabX\xed\xa8\xc7\xea\xb1^.\xd4J}\xab\xbf\xfdV\u007f\xfb;\xf5+]\x19\xe8ʕ\x1e^\xe9Ɓn\x9c\xebɹn\x1d\xe8ֹ\x9e\x9d\xe3t\xc1\xf0\xc2\xe8|\xe8:\xbf\x94I\xd5{π2d\x9a\xa0\xdb2\xa2xru\x1eN\x03;\xe8\xda+\xbe\xa4췰\xbf\x90\x88L\xbfL\xaf̐̉\x9c_\xe6\x03\xae\x15Ȣ\xa5\x86\xfa\xc5K\x9d\xa48\xder\xa4\xdc\xfc\xe2\x06{O\xd4L-չ\x1e\x9e\xea\xcb\v\xb5\x87s\xd1P]\xb5PW\xe6\xab/\xbe\x86M\x95\xd4K\xf5\r\x1e\x01\x88\xeaR]\xe2\xb9\xe1״\x18NU\x82\xac\x00\x98\xc1\x97\xea˰*\xceՈ\x1f0\x1312\t\xb8\x0e\x98ȉ\x9e\fԱ:F~\x01\x0f 9\xf5B\xed\xab\xf9\xb5Ǒ:Bz;W\x1d\xd5QKd(/\xd5\x1b\xf5\x8dZ!]]!M\r\xd4\x17\xf8(\xab/UI=C\x86v\x8e\xa4\u007f\t\x9fä\x0e\a\xd0.\x17z\xd9\xd1˲~\xddғ\x85\x9e\\\xe9\xe3c\xfd\xf5\xd7ع\xb1\x8a\xd5y81\x1c~C}\xacNԆ:\xc1\x16N\xf0[\xf5\xb9\xfaF\xbd\xc2mCm\xaa\a\xea\xf7\xeaS\xf5\a\xf5{\xf5@\xfdFm\xe1~\xf0\xdd}\xb5\xa9^\xa9-\xf5\xa5\xfaT}\xa7>VG\xaa\xa7\xaaj\xa2\x16\xea\xad\xfaB\x98\xdc+\xf5;\xf5\xb1\x8c\xf2\x9f\xbb\xfd\xf1\xd6\xcf\xfb\xf7S\xfb\x03\x1b\\\x9cE\xb6\b\f\x10H#VS5WK\xf5F\xbd}wg\xb5\xa1>}\xef\x00\xd7v\xf8\xe2\xc3\xe7P{\xea_\x89\x81\xe3^/\xb0}\xa9^\xa8\xe7(ܪ(\xdc\x06\xea\x99\xee\xc6\xc8AP\xb6\xe9\xfa\x02\xc5\xdb\x11\xee\x8d\x02N\xb7c]\x8fu{\x81?}\x89=\x87\xbe\xa7H\xda#$\xeb+倁\xfb \xe2ޢ\x90\x03\x11\x87BN_\xc4z\x1c닅J\xf0\x97p\xdd\t\x9e\xe2\x14~\x87bD_\xc4\xeaB\xfd\x8b\\\x80\xee,\xf5b\x89,\xf2P]\xea΅^\\\xe8N\f,l_\xbd\x86\x1e\x8d\x89\xc7\x03\x9f(\xd7\xf4Y\xac\xbb^/\xa1\vsu\xa6\xce\u007f\x14\x91\xe8\xe7N?Ot\xe5\\W\xcf\xe1u\xe5J=\xd7}\xaf\x90ӵ\xceMw\x11\xeb\xfa9\\\xbe\xa9\\\xc58~\xafh\x04\xf5 V\x03\xe6\xc1\x19:\x10l\xb0\x0f\xfd\xec.t9֝8\xea\xc4g\xb1\xdaP}\xb5\xa1\x9e\xe9\xe7\xa9~N\xdc\xe1\r\r\"\xb0\xbf+d\x01y\x9c (\xe15\x8c\xdfr\x01\x97\xb9\x88\xa3\x05\x1d\t\x96\xa0\xd3>\xd5\xdej\xef\xb4O\xf4\xf0\\\x8f\xce\xe1\xf5\xf0Jy\xbd\xf6\n\x19\xf5\xec\xdc,\x17\xb1\x1e\x9f\xc3\xe0\x9b\xe1U\x8c\xfc\xed\x99rp\xad\xde\xe5^\x01'~\x9e\xc0\x91\xea\v=^\xe8\xf6\x02&\r\xa4\rɩ5J\xeb \x05\x97:Y\xc2\xf4\xdc\xfed\xfb\xe1Ç\x9f\xc8\x02\xf9\x05\xbc݂O\xfe\xe9\x93mx\xc6ׁ`?V\x1f\xeb\xa3\r=\xdf\xd0\xd5\r=\xba֚A\xbca\xae\xe2\r=\xd8\xd0W\x1b\xba\xbe\xa1\xc7\x1fj[\x1bz\xb6\xa1[#\x90\xcc\xed\r}\xb1A\xf4\xa0;\x1bz\xb1\xa1\xbb\x1bz\xb9\x01\x8c_\xbf\xdc\xd0醩\xc7\x1bf\x1co\x98\xeera\x96˅)\xc7\x1b\xe6,ސg\xa0\"\x98\xa1\xb38|r\xa2\a \b\xe9l\x81\"\xf1\xac\xe1\x1d\xfd\"\xbf\x10\xad\b9\xa7\xad\f\xe8\x97\xf4\xa0㡠%\xe9\xf6\xae\xc8\xe2\tɋ\xcd\xebg\x80\xc1\xff \xed\xfe\x1c\x1c\xe9o\xbd]\xe7H\xc0\x93`\x06\xd4sՠ\x05\xa4\xea\xaa\x06\x03W\x85\x89RM\xd5W-݉\xd5\vS\x8eOT[\x1d\xe8\xa3Xu\xd4+\xd5UG\xa6\xbb8QǺ}\xa2\xeb' 0\xc3)~\xab6\xd4\x03\xf5+\xf5\xa9\xfaBm\xf1|\xe5\xf8\x17p\xb0\x13\x98#\xaf&\xb4\xd6@\xe2\x81P\x1c\xc14\xa8\xa9Z\xab\x19p\x9fĜ\xc5'\xeaB\x9d\xeby\xac\x16\xea\x8dZ\xaa\xb9Y.N\xd4J_\x9c\xe8\xf1\x89J\xd4k\xedVx\x86-\xb5\xf9o\b\x81\xf7%\xcbu\x94\x0fP\xc1\"\xc7t\xf8\xca2\xcfL\xd5\x06\xef\xf1\x9b\x1f%\x8fn\xf1\xf5\xc6ꍺ\x02\xf6\xb9Tk\x84\xc0\xc0n\bh,\x14\\\xda\x05\x02\x81\x05()\b\x19?8e\xaft\xb2V\x1e@\xc0\x0ff\xb3?\x9a,>\xfd\xb3\t\xea_\xdf\x17\x91 t7\xf4j\xe3\x96^o\xc0P|\xa9\x96 |\xceU\r\xc6b\xa8\x87\xb1\x9a\x03\xfc\x86K\uea0aꪁ:Q\xd5\x0f\x8f\xe4ku\x19\xf8t\xacV\xea;\xb5\xd6v\xa6ә\xf63eU\xaa\xbc:\xbeuKm\xa8\x8d\x1f\xdc\xe5\x0f)\xa5\xff\xac\xb6ԧ\xea\x93\xec\xbc\x1b\xf0\xb8\xa56\xf4\xc6Jo\xa4zc\xad\x97K\xb3\\\xc6\xea\x14Q\xfd\x85^\xc6\xfa4\xd6\x1b\xb1\xaa\xe9\xd9Z\x0f\xd7\nD\xa39;\x8b\xf5\x10\xf4\xa7\x8a\xae,\xf506\xc3a\xac\xe8\xfd\x9cP\xa4<\xceQxɣ\xab\xab5\xb5\x8f\x8f7\xea5\x88\xe8Cu\b\xc35VuU\xd73\xc0\xf0\x80\xe5[\xa0\x8d\xa8\xaaj\xf0\xa3\x15\x1e\xc8Z\xe35*d_\xaac\x9d8МR\xbd\x86\u007fu\xacޠ\\\xe9\xe3h\xad\xf5zCmi\xeb\xb2\x15\xf0\x1fr\xeb\xe1\x9b<\x00\xfb\xd0p\x01O\xa8\xe8j\xac\xfeEߟ\xfeQ?x\xa0\x1e\xa8OկԯԦ\xfaT}\xaa\xfeU}\xa1\xbeS\xffI\xfdg\x1a\xd1[j\x83\x96\xc4\b\xd19L㕪!\x8a^\xebu\x1c\xe6w!\xcbBu>\xb8$\x18\xe7\x93\xf6L\xd8\xfe\x19\nr\xd2m\x93[\x80{o\xddR=u\x88\xd2\xe0[u\xff\xdf\x03\xd3~\x8f\x80\x11\x9c\xcd\xd4\\\x9d\xaa\x86\x1a\xab\r\xf5FM\xd5k=\x8ca\x99M\xd4H\xcf\xd6j\xa1\x86\xea\n\x19\x0fpгX/\x97:Fٽ\x8c\xd5\x15\x1c\x00\xf6X\xaa+u\xa2G\xb1\xbaT+e\xb5\xb5\xcak\aT\x93$\xcai\xb7V\x89N\xec\xad\u007f\x8f\x83\xf8\xd7\xd8\xfe\xf8\x8f\xfe\x87\xd4\n̩F˗\b\xcc{\x95\xea4UG\xaa\xa1]\v\x11\x81\xf5:i\xa9D%ڦj\f|o\x04p`6Rg\x80\t\xce\xf5y\f\\\x96X\xb0\x1e\x0e\x81\xad\xeaٌ\x04\vJ\x94\x99\x99\xcdf\xea\x028\xe7\xa9>%\x181\a\x9e;Q\x133\x99L\xd4\x1b\xbd@\xe3\xd9B\xc59\x95o\xe3\x9d.飣\x0f\xf5)[\x02{/\x9b(\x1bN\xae\v\x1cui\xc6qlFq\xac\xae\xa2!\xf4n\x1e\xab\xd7z\xbd\x86\x036\x1a\xaa\xa1\x1b\rS|P\x8c\x8a\x0f\x1e\x14?(\x81\xb6~2[\xf8\xfe\x81\xd6GGa/\xb8\xb0\xf0槌7\xfc\xfe\x9d\xf1\xc6\xcf&\xf9N}h\xd0\xf1\xf3\x1f\xd1\xc1\x1f\xc4\u007f\xdeg\xf5z>\xd7s<\xed;\xd3\xf0o\t\xb6\xf9\x86\x9e\x9f\xe8\xa3\x05\xfco?\xd0;\x0f\xf4\xee\x03\xfd\xe8\xc1\x9d\xe2vq\xb3\xb8\xfd\xc0<\xd8\xfe\xec\xd6\xf7\xc2-\xd5\xca$յ\v|\xafk.\u007f\x91:\xf9\xb9\xa6\xe14?\rz\x823\x81\x84\x8f/\xfe\xedI\xf8!}\xfcq\x92 ,\b=\xa7.\xbd\xfeѰ\xac\xa5j\xb7nݮn=\xdbz\xb1\xf53\xae\a\xba\xbeV 7\x9d\xb4~\xee\xe5\xa0\xd7\xf6C\x13\xf1C9\xd0\a\xbbv\x8d\v\xfd\x14V\x91[n\u007fj\n~\x92\xfc\xfb\x93\xfc\xff\xafȕx\x16n\xfd\xa0I\xb86*?\x9e!\xa9\xfb?\x88\x1d\xfd\x90\xf1\xffY\xc0\xd7\xf7\xcc\xc0;W\x19\x16<\xa0>\x9a\x83k\x17\x00\xf3\x80_\x9f\xd3[\x9c\x89k;\xcc\xde\xc1\xeb,\x94\xaf}\x96\tf\x98\x11\x94\xcc$(\xae\xcdI8\xe6\x8f\xe9\xef\x9f)(~\x8a\xe2\x18\xdd\xdf~x\xbfp\u007f\xfb\xe1\xc3\xfb\xb7\xa1}x\xff/\xb3H><=?\xdb\x12\t\xf3\xf1=|\xea\x83\xd3\x11\xc4\xf6\x8f\x9e\x8b\x0f\xad\x8f\xef\xe1S?p\x99\xfcl\xba\xd5\xcd4\xe4\xb6\tu\xe5\xaf3\r\u007f\xfc;\x9b\x83\xefQ\x1a\xbeg\x0e\xde\xe5K\xb7~f\xa6\xf47^\n\xda:c\xad{\x87\xea\x10O\xcb\x15\xcb\x05_;F~^\xcc읹1糵\x99\xad\xcfߛ\xa3h6\x1b\x0eߝ(=\x1b^\x03X\xd3\xd3\xf7U\x8e\xfc\x84\xe9\xc9\xe4:\xe2\xbc\xf5\x81)\xbc~]\xf8!\xc9\x19u\xf4\xeeu\xa9\xc6\xcf5\xb2<\x97ŭ\xe2\x8f\x13\x120\x98\xd7\xfeg#48\xe6\xfe\xd5Z\xd1\xc0ѿ\x9a\xbd\xfb\xf6\x94\xc6\xf0uh\x90\xe8\xd5\x11\x06d\xac\xd0\x04\xb7P\xb1\x9a\xa8\x13\x15\xab\xef(\xc4\xc4j;\xc5\x11ҩ3i\xea\x88\x00\xde7\xb8\x96\xe2-\x00K\x0e@\x92\xc7\xffD\xddg\x9bb\xf3\x96)~\xf2A\xcd\x17U\xe2B\xf1\xc1\x83\aſKk\x1b\x8c:\xce\xda8\xceA!\xf6\x18\xa9E\xf6\xd9\xfa{\x0f1T<\x01\x84\x8a\xaeOB\x86\x8a2ZV\xab\xf0[f=\xea\xe4\x16Lǭ\xdcl\xa8\xb5^\xaf\x030R\x89\x9a\xe4\xfa\x00\xd4\v\xa4k\xd7\xc2*\xef\aLJj\xfe\x10\xfe\xa1㙎\xa7\u007f\x17v4\xd0w\xd88\x8d\xd4\x02\xa4tKm\x9a\"\xbcd\xa3JT܄\xe6>4\xbd\a\xc5\xdb\xc5\a\xbd\x1e\xd2U\xefAQ\u007fZ\xcc\xfb{>\xa4\xf8o=6\xdb[\x8f\xcd\xce\xd6c\xb3\xbb\xf5\xd8<\xdazl\x1eo=6\x9fm=6O\xb6\x1e\x9b\xa7[\x8f\xcd\xe6\xd6cu_}\xa2\xbeQ\u007f\xb8\xa5\xbe\xc3\xe1\xfbZ\u007f\xf5\x95\xfe\xfa\xeb[\xb7>$\x80r(\xf9{%\xd05\x8e\xb6\\\xa0\xfbxx\x85\xae\xe3\x159\xaa7p}N@\x89_\xa0\xd56V\u058c\x17\v\"\x97\x0f\xb2\x97\xf7\xd0AƧ\x91\x99\xa9\xa6\xaa\xe1\x1e\xdf\x1fn\xf1\u05f8\x1e\xe6\xd3|9\xab\xb0\x02z\x85\xe2oz\xbf\x81\xa9{\x81\x13\x98@\xfb\xfb\xe4\xf7\xc5B\xf1\xee\x8b{\xc5\xf7\xfa\xfc_\xb4}\xfa\x8f\xdf\x0f]\xcc\xec\x03\x83\xad\x97\xdf3\xda4\xac\xc8\xc2Q\xf4Y\x1cˌ\x0e\\P_ߧ\x91\xbc\x86ˢ\u007f\xe3\xdf\xf0y~\x90k\xc8:ԳO\xf4\xfc\x13=\xf9D\xbbOx\x923\x12\f\xafn\xdc\x03\u007f\xd2A\xffJ\rt\xf7\xe4z\xc0\x8b\x1e\xc4\x12\xf3B\x9ew]\xddP\x87\xba\x13\x9br|\xa2\xcb'z\xb0\xa1ʺ\x1c\xab\x9e:P5\xf5L\xf5ձ\xee\xc5\xfaų\x1f܁\xccY\xffF]\xe9\xe5\xc9\xf58\x19X\xc3s\x895:\xd1\xe3\x13=\xdaP\x97\xc0\x9c\xce\xe2\x13}v\xa2\xaf6\x88\x86ߪs\x15+\xa7\xd6j\xa5\xdf\xc6:q\xef[\xff\x88\x95_[\v#=\x1a\x01f\xd1á\x9a\xab)\xd94\x17z\xb1\xb8\x05\x8b\xe2\\\x9d\xa9\xb1Z\xaa\v\x05k\x05\x16\xc3l\xa8g\xa7z8\xd2\xf3\x19\xd9W\xf4\xbc\xa5\xa7\xa7z\xdaҧ#}:\xbb\xa5O\x17\xe6t12\xa7\x8b\xa59]\x9c\x9a\xd3\x05\xbc?ק\xe7\xfa\xf4L\x9f.\xf5\xe9\x85>m\x99\xd3Ӗ^\x8c\xf4b\xa6\x17C\xbd\x98\xeb\xc5T/N\xcd\xe2td\x16\xc0\xa4\xf4\xe2\\/\xce\xf4b\xac\x17K\xbd\xb8Ћ\x18\xe5\xc8\x00\aj\xaaN\xd5B\rn)\xe8\x1et\xae\xa5\xce\xe1k}6\xd6g\xf1\xad[\xfa\xe2T_\xb4t\x1c\xab\xc3\xef\t \x03\x14\xaa\xd7֬\xad\xd3.Qά]\xa2\xd7\xc0\xabW֬\xacӉ\xd3\xebD\xa5f\xe5\x12\xbdrz\xe5\xf5:\xd5.\xd5k\xaf\xbc\xb1\x9b\x89\xb1\x9bi\xb4\xb6\x9bIam7\xd7I\xe4\x92Ml҂K6]ZX\xc3\aئQ\xb2\xe9\x12\x93l\xba(\xd9\\;\x93l\u009b\xb4\xb0N6\xd7\xf66\xb6\x0e\x9f\\\x12\xad\xe1(\xebdӛt\xd3F\xe9\xa6uw\xd2M<`\x94\xc2oS8i\xbai\vk\xf8\x18^\xba\xdbk\xf8&)\xe0\x13|\x82{\xf8ȥЗ\x14~\xba\xf6\x9b\xa9\xf1\x9b6\xf2\x9bkk\xfcfb\xfcf\x1a\xf9M\a\x9f\xbeT/\xa3\x97\xd0\xc1\x97\x9b\xa9y\xb9\xe9\xf5˗\x1f$R\xa0\x13=Z\xa8\x99\x9e\x9d\xebY\xac\x86\xa0\xb2\x8d\xf4d\xaa'\xa7\x18P\xb9ԓ\v=\x89\x89\x84p\x06\x17\xc0^\xf3\x144\x9a\x98\xd1\x02#\x9b\x80\x8a\x16z6г%\xd0\xd2rb&\xa3\x85\x9e\xcc\xf4dh&\xcb\x18\x95\xc1\xe9\xc8L\xa6\v39\x85-6\xf3օ\x99,\x16z2Г\xb1\x9e\x1c\xea\xe9HO'Hz\v3],\xf4t\xa0\xa7gz\x1a#)N\x80\xcc.b \x03\xa0\xb2\xa1^L\xf4\xe2\x14\xe8\aH\x1b\xf8\u007fK\xb7\x16\xba5\x10Z\x99\xe9x\xa2㩎O?L4\u007fԱ\xd5q\xaacobkM윎\x9d\x8e1lEO\xac\x9e\xa4z\xe2\xcd\xc4Z3qNO\x9c\x9e$f\xb2\xb2&\x8eaKM\x1c\xfb(\x8e\xad\x8d\xe2\xd89\x13ǰ%Q\x1c\xaf\xac\x9eZ=M\xf5ԛ\xa9\xb5fꜞ:=M\xccte\xcd\xe2\n\xb6\xd4,\xae|\xb4\xb8\xb26Z\\9g\x16W\xb0%\xd1\xe2je\xf5\xdc\xeay\xaa\xe7\xdḙ5s\xe7\xf4\xdc\xe9yb\xe6+\xab\x17V/R\xbd\xf0fa\xadY8\xa7\x17N/\x12\xb3\x80\x03ǰ\xa5f\x11\xfbh\x01\xddZ@\xb7\x161lI\xb4\x80n]Z}\x99\xeaKo.\xad5\x97\xce\xe9K\xa7/\xf1z\xcd\xe5\xca\xf2\xb3\x8f.W\xd6F\x97+\xe7\xcc\xe5ʅ\x11\xbb\x8c\xad\xb9\x8cSs\x19\xfb\xe8\x12\x8e\u007f\tǿ\x8ca\xc3cD\x971\x1d\x04^\xf8\x02\xbc\xb3\xd0:\a\x1f\x84\x03\xe9S\xabOS}\xeaͩ\xb5\xe6\xd49}\xea\xf4ibNWV\xbf\xb1\xfaM\xaa\xdfx\xf3\xc6Z\xf3\xc69\xfd\xc6\xe97\x89y\xb3\xb2zi\xf52\xd5Ko\x96֚\xa5sz\xe9\xf421˕\xd5gV\x9f\xa5\xfa̛3k͙s\xfa\xcc\xe9\xb3Ĝ\xad\xac~k\xf5\xdbT\xbf\xf5歵\xe6\xads\xfa\xad\xd3o\xe9\x8a\xdf\xf2\x15\xbf]\xf9\xe8-\\\xf1[\xb8ⷹ\x8eά\x9e\xa5z\xe6\xcd\xccZ3sNϜ\x9e%f\xb6\xb2f\xb6\x86-5\xb3\xb5\x8ffkk\xa3\xd9\xda93[ÖD\xb3\xf5\xca\xea\r\xab7H\x8f߰\xd6l8\xa77\x9c\xdeH\xcc\xc6\xca\xea\xb1\xd5\xe3T\x8f\xbd\x19[k\xc6\xce\xe9\xb1\xd3c\xea֘\xbb5^\xf9h\f\xdd\x1aC\xb7ƹ\x89\x18\xbf\xb5f\xfc65\xe3\xb7>\x1a\xbf\x85=\xde\xc2\x1eoa\xa3\x89\x18\xf3\xb5\xc1\v_\x80w\x16Z\xe7\xe0\x83\xec\xfaVV\xafR\xbd\xf2fe\xadY9\x87l\x91\xc8\xff\xc4\xea\x93T\x9fxsb\xad9qN\x9f8}B_]Y}\x95\xea+o\xae\xac5W\xce\xe9+\xa7\xaf\x12s\xb5\xb2\xe6*\x86-5W\xb1\x8f\xae\x80D\xae\x80D\xaebؒ\xe8\nHpm1\x98ƛ\xb5\xb5f\xed\x9c^\x03[\xc6\x03\x0f\xad\x1e\xa6z\xe8\xcd\xd0Z3tN\x0f\x9d\x1e&f\xb8\xb2f8\x84-5á\x8f\x86Ck\xa3\xe1\xd093\x1c\u0096D\xc3\xe1\xca\xeas\xab\xcfS}\xee\u0379\xb5\xe6\xdc9}\xee\xf4yb\xceWV\x8f\xac\x1e\xa5z\xe4\xcd\xc8Z3rN\x8f\x9c\x1e\xd1h\x8fx\xb4G+\x1f\x8d`\xb4G0ڣ\xdch\x8fF\u058cF\xa9\x19\x8d|4\x1a\xc1\x1e#\xd8c\x04\x1b\x1dc\x19[\xb3\x8cS\xb3\x8c}\xb4\x84\xab^\xc2U/cؒh\t\x8b\xe2,\x86-5g\xb1\x8f\xce`\x973\xd8\xe5,\x86-\x89\xce`\x97\x8b\x18\xb6\xd4\\\xc4>\xba\x80].`\x97\x8b\x18\xb6$\xba\x80]\x96\v\xd8R\xb3\\\xf8h\xb9\x80\x13-\xe0D\vؒh\tL`y\x05[j\x96W>Z\x02wY\x02wY^\xc1F\xa3\xfc\xda\xeaש~\xed\xcdkk\xcdk\xe7\xf4k\xa7_'\xe6\xf5\xca\xea\v\xab/R}\xe1ͅ\xb5\xe6\xc29}\xe1\xf4Eb.V\xd6\xcc\xd7\xd6L\xd7ּ^\xdb\xef\x05=E\f\xff\xfaW\xf5\x1b\xf3\x9b\xdf\x14\xd5\x17\xfa\xc1\x83\x0f \xdc\xed\x87\xf7\xcd\xce\xc3\xfbf\xf7\xe1}\xf3\xe8\xe1}\xf3\xf8\xe1}\xf3\xd9\xc3\xfb\xe6\xc9\xc3\xfb\xe6\xe9\xc3\xfb\xe6\xd7\x0f\xefG\xdb\x0f\x1f\u07bf\xb3\xfd\xf0\xd3?\xc7\x13\xf0\x17ŕY\x1c\xfc\x1b \xaa\xb1EJ\xf2z\x94 \x81\xbdA\x81\xe2t\xecu\x9c\xa0dy\x83r\xc4\xe9\x89ד\x04\x05\xca\x1b\x94\rNO\xbd\x9e& $f\xd6\xc43kf6F\xf6\xe2\xf5,A\xae\xf3\xc6\\\xa6\xd6\\\xa6\xce\\\xa6\xde\\\xa6\x89\xb9LSs\x99\xbe\xd1\v\v\xa2\xd8\xe9\x85\u05cb\x04\xc5\xc1\x1bX;K\v\vf\xe9\xf4\xd0\xeb\xa5\xd7\xc3\x04W\xd3\x1b3\x9cX\xb3\xc4͙\xe5ě\xe5$1\xcbIj\x96\x937LQ@?\x1eh\x88\xa9\xeb\rr\x06\x84H\xab\x04Y\xc4\x1b\\\xb7N\xaf\xbd^'\xb8\x80\xdf\xfc8\xab\x9b3\xd6zR\x96\xd0\x12\x98$\xa0G{2\x8c\xad\x9c\x9c͛\x95\xc7\rO\x9c\x98U\x126\xec\x93%VE\x9b\xb6^\xadԆZ\xaa1\x85b\xcdԊ\xcd\xd1+u\xa6\xbeP\x13\xedf\xda\xcft2\xd3v\xa6/\\ta\xadG\xfa\xf6\x1e\t;\xa1\r%\xbf\xd7\x17\x96\b\u007f\xe5x\xf3\xb0E\x17+O\x8d\xb9X\xc1bH\xa2\x8bUB\r.\x8d\x8b\x95\x8d.\x80u\x84\x06\xa3\xefb\xbdt\xd1\x12N\b2\xcb{\x14V\tm\xc8ܼ^Z\x12f+Ǜ\x87-Z\xc2\t\xa11\xcb\x15\b\xb8$Z\xc2\t\xa1\x01q\a[\xb4\x84s\x85F\x81~\xeb\xcc\x12\xce\x04\xa7YZ=v\xd1\x18N\x0e2\xc6{\x10.\xe3\x047=\xb6$uV\x8e7ϲ\xc6Scƫ\x04\xb6h\fg\x85\x06e\xd2xeE\x1eq\x03J\xf7ʌ]l\xc6>6\xe3$6c\x1b\xeb3\x17\x9d\xc1\x89A\x1c{\x8fr8\xc1M\x9fY\x12\xd0+Ǜ\x87-:\x83\x13Cc\xceV \xb4\x93\xe8\fN\f\r\x88pآ38ghԙ^\xc6z\xea\xa2)\x9c\bP\x96\xf7\b\xaf\x12\xdc\xf4\xd4\x12\xeeZ9\xde\xe1\x16\xd1,6\xf0\xder\xab\x17\xb1\x06\x85\t.\x1c\x00\x86\afe\xd6\tn\xa4\x1aZ\xb3^9\xde\tR=\x93\xe1\u058c\xe2Ԍ\xe2Čb\x17\x8d\x00\x92\x8dboF1\xa9h\x89\x9e;\xd2\xd0O\xf4\xb9#\xd8\xed\xf1ߚ\xf3\xf3Ԝ\x03\x02?w\xd1\xf9\xb9s\xe6\x1c\xc0\xf99\xe9Չ\x9e8R\xab=\xf0\xbd\xe1$5\xc3Ib\x86\x13\x17\r'\x00\xed'\x1e\x81\xcb$Na\xca\rP\xda\x04\xaee\x12{\x9c\xfa\xe5$N\x03ٹ\x024\x19-Z\x068\x00t\xe0S'ȇT\x97D_9\xd2\\\xbc\xbe\xb2\xeaJ]\x99\xe1Uj\x86W\x89\x19^\xb9h\b\x90yx\xe5\xcd\xf0\x8a\xb4\xedD/\x1c)\xdb\x1e\xf9'*\xd9@\xaaNtl\xa0]\xe0?\f\xa0\x00H9A\xe7\x1eQ\x16\xa1\xff\x040\xbf\x80\u007f\x0fjA\xb4\\.Rh`\x89.\\\x01\x1a\x98w\x80\xf8˅U=\xb5e.-\xac hf#_\x80\x06_&\xf02Iॅ\x97\xd6\xfe \x10[T\xa7j\xa2^#^\x8a1|\xfdL]\xaa\xa9\x1a\xe9\xd9H]\xa99f\xf1\xa4\xb0^0\xe2=\xa6TǷ\xeaB\xfdV}~\xedH\xaf\xd5\x1b\x95\xea\xf5\x1c\xed\x93\xe4\x1b\xb5*\xd1\xf6\fݗ\x18\xf5\x9b8\x9d\xcc\xd4\\\x8d\xd1f\x84\xa7\x80\xc7\n\x93t\xe1A\tÞ2\x8c\xe1wV\xbbD]`f9<\xce0\x00\u007f\xa9\x86\xeaT\x9d\"\xb0r\x98\xff3E97\xc3#\x0eUb\x9c\x9d\x1b\x9f\xccѾ\x01\xffj\xa1\xd7s\xfaW\x97\xea\xad\xdaR\xbfQ\xf7\xf5\xf6\x13\xbd\xfdTo\xff\xfa'\x87W\xdcl\xff\xa0\xae\x85\xefu4)\xcal\xfaS\xfe<\xf60\xe5B,\xd4D]^\x8f\xd2\x19\xeb45i\xfaF\xcf\xd7f\xbe^\xeb\xc9\xdaL\xd6k\x8ed\x95@\n\n)\xb0\xef8\xb1uj\xd1\xd0m\xb5\xc7\xf0{\xf9\x8dMUSմ=\xb9u떚\xdfR\xbf\"'\xee\x16\x85\xd2\xc3Ҹ\u007f\xdf\x14?\xe1\x10\x02]?z'2\xff/\x18\"s}}\x15\xbf,\x16\x8a[[[E\xfdiQo\x15\xf5o\xc8!vKm\xd2\a\xc1i\xf9c\xba\x94S\xdc_\xa8\x97\xa0y\x02\x1aG~r\xa9F\xc8K\x16Tnb\x883\x8a\x93\xb4R\xaf\xd5\x18\xe4\xa6^.ԕ\x8a\xf5\xd5\\O0\xd1\xf6,V\x9b\xd7\x0ex\xedXr\x10\xf8\xd9Z\xad\x80\xed\xa9X\x9f\xaf1\xc3\xed\n\xf9\xaa_c\xca\xeclD_\xaa\v>\xb9:\xa7\x02,t\xc69\xf0\xdf+JT\x9f\xab\xd7\xfa*\xfeA\x14ZS=u\xac\x9a\xa6\xb8[,\x14www\x8b\xca\xc2!\x88^\x83'\x14ITQ0\x90^,ȭl\xd5\x12\xaeO\x88\xfb<\x06܁\xd9wK=\xc4\xdd\xceִg\xaa\xd6@\xce\x1b7<\xe1&\xe3\xe9\xe6\xef\xe6\xef\xe6\xefg\xfc\xbb\xf5W\xfcS\xa7j\xa8^cd\xc2\x05Z'\x16\x98\xcf:\xa2//\xc2\x0e\xa3\x10\xc0\x80e>n\xa97ꭺ\xba\xf5W\xfe\xfb#\xd6?*a\xcd)\xda\xf2Ŷ\xf2ۇ\noQ\x1d\xaa\xac\xe0V~\x93\x12\x17uL\x16\xa7\xed\xddB[M5\r[\xae\xe8\x16\x97\xb1\xba^\x8f\xa9\xad.p\xcbW\xdd\xfaP\xe5\xadw\xabo}_\x05\xaeW\xea\rn\xc7j\xf5\xde\xd6Soq\xe3\xeaXa\x03L\xb1\xc2\xcaN\x9d\xacP͂#d\xec\x8f\xda>4\x9c\xf9\xedC\x15B~\xc8\xf6}\xc5ƨ\xe0\xd7:\xbf}8\xf0˾\xf3\xd8{\xe7\xe1\xb2G@HϲG\x16\xe9\xf9\xce\xe3\xd9;\x0f\xff\xce\xe3\xf9;\x8f\xacR\\\x12\x8e\x99\x15\xa0{\x11>K\xaf?\xa8\xce\xd1\xfbm\xfex\xf8x\xf1\xce\xc3ri#\xa9X\x97p}\xba\xfc\xf9\u007f\xc4\xd8|\xf0\x9a\u007fH\x1f\xf0\x91+(#\x8f\r\xac\xb6\xf1\x9d\xfe\xf8\xbbl\xf0\xaf\x9fDo\x9c\xe8\x8d\r\xbd\xf1\x9d\x8ci\xe8wn|\xc9\x19\xbd\x81\xff߅a;RG\xf8,5\xfd\x8e\xf4\xc7'\xfa\xe3\ru\x92e\x98\xc9@\xbc\xd3\xf1\ru\xf2GU\xfc\xf0\x039\xde&=\xf4&\xfe\u007f\xfb\xad\xfa\x03f*\u007f\x8a\xf5\xc3>֟~\xaa>FeI}\xa2?\xf9\\m\xe9\xad-\xb3\xb5\xb5\xa5\xb6\xd4/\xf5/\u007f\xc9\xf5\x0e\xf5??4\xff\xfc\xf0\xa1\xda\xd0\x1b\x1bfccC\x9d\xe8\x93\x13srr\xa2\xbe\xc1\xa2c\x9f\xe8_\xfdJ\xff\xea\v\xb5\xa9\xfe\xa06\xd57\xe6\x93O>ћ\x9b\xea\x81\xde\xfcJ\u007f\x8d5X\xf4\x17\xb8\xc3\x13\xddn\xeb\xbb_\xeb\xaf\xee\xfd\xb51\xa8\x04\xf9B\x93\xcf%\xbd\xaf6\xd5\xef\xb0B\xe5샹\xa6\xe1\xfb\x9f\xa5#\xcf\xca/u\xb9\xa1\xcbs\xbd\xbf\xaf\x1af\xea'\xaae\xda˅>Z\xa8c\xddꨊ~\xf6R\xd5UWW\xe6\u007fk\xd4\xfe\x97\xaa\xbf\xf6\x17\xa8\x1d\xa7\xeaj\x8f_\xed\xff%\xba\x9a\xd51\x92\xadP\xdc~\x00\xea\xe8\x0e\xb6\xdb\x0f\x1e\xe3khw\xb1}\x84\xed\xf6\x83ϊ\x85\xe2cl\xb7\x1f<\xc5o\x9f\xe2'\xd0>y\xf0\xb4h\x8a\xdb\x0f\xd4s\xfd\xfc\xb9y\xfe\xfc\xb9~\xfeJ\xbdү\x9e\x9bWϟG\xaf\xf0\x83\x9e\xea\xe9\xdes\xd3{\xfe\\5\xb0\"j\x13\xed#\xc6{\xaf\xfd\x1b\xf5\x06C\x8b\xbc\x8f\xde\xe0\ao\xd5[\f\r\xf2^M\xb0\xb2\xddT߭\xe8ʽ\xc2ݻ\xdf\u07bb\xf7\xe3iXm\xaao\xc3\xf6{\xac'\xf8\x00\xd9\xc9w\xea\xbb\xdcw\x9bᵼ\x93\xcf\xf2\x8fo\xd4+\xf5{\xf5;\xacO\xb8\x99\xdb\x1b\x9e\u007f\x87\xdb\xefr\xaf\xe4\xf1m\xd8\xe4\xfc\xf0)\x9c\xff\xdb\\߮\xf7!{l\xaa߫߫oo,\xa27\xdb\xcdv\xb3\xdd,\xfe\x9b\xedf\xbb\xd9~\x1a\xe0\xfc+\x83\xef\xbf\x16\xb6\xff\x8b\x1a\xe5\xfe\x9c\x82\xfc\x0f\u007f\xfe\xac\xbawq\xa7<\xdf\xff\x1b?\xb2\xfe\xfcԾ\x00F\xee]\xc3\xed\xf9\xed?\xfc\xc0\xc7\xe6\x0f\xc7\xcc?\xe8x\xdf\xf0\xe3\xf3\xdc\xe3\x15?~\x9b{|\xf2\x93\x1f\xef\x9e\xf3Ż}\xf9\xd1\x1c௺~n\xf8\xf0\xcd\xf6g\x81ֿ,\xff\xfe\v\xd1\xfd\xfb\x87\xfc\x87\x9fKUTVm\xabS\xb5\xa1\xc6jGMԗ\xeaLy\xf5Z=PS\xb5P\x17\xeac\xe5Ԯ\x8aկU\xa2>Ss\xf5\rFY\x8c\xd4\xe7x\xaf\x8cK\xf5\xa9\xfaD=V\xbfU\x9b*UO\xd5\x1b\xb5\xa5\xfeY}\xa5\xfe\xa3\xba\xafު_\xa9\u007fQ\xff\xaa~\xa3\x1e\xa9߫\x87\xeaJ=Qw\xd5\x1f\xd4\x17j\xa5\x80\x8d\xaf\xd5=\xf5\xbb\xe8\xabᓯ\v_\r\xb7\xb1\xddy\xf2\xf5\xed\xaf\x86\xdb;\xf8f\x97\xde\xd0\xd3\xce\ue4ef\xef\xc0W\xbb\xf8\xdd#\xfa\x8e\x9ev\x1e\xf1w\xf4v\x97\xdf\xf2\xf3\x0e<\u007f\x84?}\x84\xbf}L\xbf\xa5\xa7\x9d\xc7\xfc[z\xbb\xcbo\xf9y\a\x9e\xe9\xb7\xf4\xfd#\xfe\x9e\x9fw\x1e\xc9\xf7\xfc\xc1\xae| /v\xf0\xc5/\xe8\xf4\x8f\xf1\xfc\x9f\xd1\xf9\xe9i\xe73>?\xbd\xdd\xe5\xb7\xfc\xbc\x03\xcft~\xfa\xfe\x11\u007f\xcf\xcf;\x8f\xe4{\xfe`W>\x90\x17;\xf8\x82\xcfO\xc7x\xcc\xc7\xe0\xe7\x9d\xc7r\f\xfe`W>\x90\x17;\xf8\x82\x8e\xc1\xfb<\x92}\xe4\xc5Σ\xb0\x8f|\xb4\x1b>\n\xafv\xe8\xd5/y8>{\xf2u\xf4\xd5\xf0)\xce?\xb6;Oi\xfe\xf1\xcd.\xbd\xa1\xa7\x9dݧ<\xff\xf8\xdd#\xfa\x8e\x9ev\x1e\xf1w\xf4v\x97\xdf\xf2\xf3\x0e<\xf3\xfc\xe3o\x1f\xd3o\xe9i\xe71\xff\x96\xde\xee\xf2[~ށg\x9e\xff\xa74\xffOy\xfe\x9f\xf2\xfc?\x95\xf9\u007f\xca\xf3\xffT\xe6\xff\xa9\xcc\xff\xd30\xffx\xfe\xcf\xe8\xfc\xf4\xb4\xf3\x19\x9f\x9f\xde\xee\xf2[~ށg\x9e\u007f:?\u007f\xcf\xcf;\x8f\xe4{\xfe`W>\x90\x17;\xf8B\xe6\xff)\xcd\xffS\x9e\xff\xa7<\xffOe\xfe\x9f\xf2\xfc?\x95\xf9\u007f*\xf3\xff4\xcc\xffS\x9e\xff\xa72\xffOe\xfe\x9f\x86\xf9\u007f*\xf3\xff4\xcc\xff\xd30\xffO\xb3\xf9\xc7\xf1xB\xe3AO;Ox<\xe8\xed.\xbf\xe5\xe7\x1dx\xa6\xf1\xa0\xef\x1f\xf1\xf7\xfc\xbc\xf3H\xbe\xe7\x0fv\xe5\x03y\xb1\x83/x<\xe8\x18\x8f\xf9\x18\xfc\xbc\xf3X\x8e\xc1\x1f\xec\xca\a\xf2b\a_\xf0x<\xe1\xf1x\"\xe3\xf1D\xc6\xe3I\x18\x8f'2\x1eO\xc2x<\t\xe3\xf1$\x1b\x0f\xea\xcfg\xdc\x1f~\xde\xf9L\xfa\xc3\x1f\xec\xca\a\xf2b\a_\xfc\x82\xd9\x04\xf5G\xf6\x91\x17;\x8f\xc2>\xf2\xd1n\xf8(\xbcڡW\xbf\x14v\x81\xc7z,ǒ\x17;\x8fñ\xe4\xa3\xdd\xf0Qx\xb5C\xaf~)l\x03\xf7{\x14\xf6\v\xafv\x1ee\xfb\x85\x0fw\xb3\x0f\xb3\x97;\xfc\xf2\x9f\x02\xfbxz\x13\xebu\xf3w\x13\xea\xf4\x97\xb4\xa4P\xecN[\x1d)\xab\x96\x18\xe9SWc5PW\xb7TS\xbc\xa0\u007f7\u007f7\xb5\xeeo\xf4\xd3\u007f\xe8-\xfaꋯ\x8b\u007f\xd3\xe6\xef\xa3\x177\xcdO\x9a\xc0\x1fl>\xb8\x19\xb0\x9b榹i~~\xd6\U000b7482\xefXG)iN}\\\xf8\xea\xe0y\xe7k\xf51\xdeN\xfc\xb7\xfa\xf3\xa2\xfe\xedo\xcd\xe7\x9f\x17\xd5W\xfa\xeb\xa2\xfaO\xfa?\x17\xf5Wwͽ\xaf\x8b\xeaKݣO\xf5W_\x99\xaf\xbf.\xea\xbbwͽ{\xe1\xddwE}\x82q\xbb\x9f~\xaa\xbe\xfc\xc0\x9d\x16\bu\u007f'\x0e\xb6[\xeaK*,{\u007f\xfb\xe1\xfd\xe8\xfe\x0e4\xbb\u05eb\xfap:\x9f\xc545\xba\r\x99S\x98?\x8c\x05v\xac\x1e{=\xf2z\x9c\xeaQ\xaa\xc7X\xbci\x9c\xe8Q\xa2\x17V_Y\xb3\x88\xbd\xbe\xf2z\x91\xea\xabT/\xb0\x1a\xd5\"\xd1W\t\xd6ñ\xe6,\xf6z\xe89/;\xd5\xc3\x14+\xe48\xbdL\xf4\x10\xf3\xfeg\x1esߝ\x9e%:\xb6\xfa\x14\xcb \xc5^\x9fz}\xe1u\x9c\xea\xd3T_\xa4:\xc62e\x17Nlj>M\xf4E\x82u|<&\xc9;=M\xb0@\x0e%\xc8S\x8e|\x82e\xdc<\x96\tpz\xce\xf5k\xb0*\x80ӫD\xcd\xf4\x9b\xf4C~2\xf5qv\x8f\xc2\u007f\xc8A\xc1\xe2h\x0eK\xc1y\xaa\xffF\x83\xf2A\xe5@\x95T[5\xd5>\xde\x01\xb1\xa5\x1a\xaa\xaaꪦ\x0eԡ\xea\xe9AM\x97k\xbaSSGj\xa0ʪ\xa3\xf6\xd4\v\xf5L?\xab\xe9\xbd\xe7\xfa\xd9s\xbd\xf7R\xbfx\xa9\xf7Z\xfaY\xcb쵪\xe6Y\xab\xaa\x9f\x1d\xa9\xe7\xea\xa5~\xfeR\xbdҭ\xaa\xae\xb6\xfet\xd9D\xac\xb3\xf9\x81ʉs\xae\x9c\x18\x8a'\xbe[\u007f\xf3\xa7լ\xbc%\xb5;\x17z6\xa0b\x8bC39\xa5r\x8a\x87TE\x11+(\xb6\xf4\xe9\xe8\x96\x14\xf0Ģ\x9d\xcb\xf7\xcbu\x9e\xeaŹ\x1a\xdc\xcaj(R\xb1\xcdk5-\xb1\x8e\xe5{\xd5)\xbdzi^n\xfa\x0f\xf9\xbbt\xe9\xa5\x1e<\xd7\a\xcfu\xf5\xa5~\xf6\xcc\x1a\xc4\xf8M?\xc1\xa7N\xec\xe0WM?\x1b\xe1\x8ex\xa8\xb2\xcd\xefٰ\t\x82f4\xb7\xd3_\xc0\x8b\xa9[\xba9~\xb4\xb2\xcbe\x04\x9f\u007f\x04Mq\x99\xcc>:\x9b\xa7W\xceϓ\xc2x\x9e\xcc\\tf\x17\xee\xf68\x99\xa73[8K6\x93\x8b\xc2\xd9\xfal\xe2\ue739\xd9\xd2O\xddG\x8b\xd8O&~6*\xe0\a\x11\xb4\x85ar\xe5f\xd1\xd0-\xfc\xeda2\x99عY&\xb3hfgI4\x9e%\xcb;\xb1\xf3\xa3x\xb9\xb8s\xe1\xe6\xb8?\x8c\xce\xe2\xf6\xa9\x9d\xcf\xdd\xe4΅\xb7\x8b\xa5\x9b\x17.\xfcY:\x89.\xfcY\xf2\xd1)\\\t\x9c㵝\xdba\xf4ڹ\xe5\xed\xd3t\x11\xbbI\xe1\xf5\xdc\xce\xce\xee\xc4\xeeli\xe7.\xbap\x8b\xe4\xce\xc5k7\x9b\xf9Q!v\xf3\xe5U\xe1\xc2\xcd\xce\\taG.:uK[\xb8H\xfcl\x19\xbdI&K\x13'\xb3\xc2E\x92ΆQl'\x93(N\xe6\xb3\xc2ԟ͓h\xea'.\x9aڳ8\x9a\xda\xf9\xf8\xce\xd4\xce\x16>\x99\xdd\xc6/a\x9f\xc9\xc4\u007f\x84\xed\xa9\x9dGS7\xb2w\xa0Y\xc2w0\xb4\xd1\xda·ܤvV\x98x\xf8p\xe2\xe7\xb60O/\x9c+\xcc\xd3Ӊ3s7\xfdh\x9e\xb8\xd9r\xe4f\x11̄~\x18\xeb\xedX\xef\xc4z7֏b\xfd8֟\xc5\xfaI\xac\x9f\xc6\xfaױ\xd9~\x18\x9b\xed\xed\xd8l\xef\xc4f{76ۏb\xb3\xfd86۟\xc5f\xfbIl\xb6\x9f\xc6f\xfbױ\xd9y\x18\x9b\x9d\xed\xd8\xec\xec\xc4fg76;\x8fbSk\xef\xe9\xa1\xd5{/ͩ\x9d\xeb䕾8{w\xb9ܮ9\xbfp\xfevg\x9d\xa4+{\xa7k\xfdb\x9d\xa4\x85\xa6\xf3\xe7>z>;\xdb\xd2\x17{z\xb6\xf7\x11\x8e\x82\x9d^\xe8\xe9\x9e\x1e\xef\xe9qI7K\xbaZ2gv\x12\x8d\xcf\xecD_\xec\xeb\xd9\xfe/q\xb7}\x98\xb0_\xe0K 0=\x1d\xe9\xf1H\u05ee̸ve\x9a\xb5+S\xad]\x99n\xed\x8a\xf6\xc6q\xd2Ӊ\x1eN\xf4x\xa2_O\xf5lJ\xdf\xe0\xb0\xea\xe9T\x9fM\xf5x\x1aM\xa7\xdf\xecDg\xd3ov\f\xbc\x18C3\x9d~\xf3\b>\xda5\xd3ov\xe1\xa3]3}\xb0(L\x1f,\xbe\xd9\xd1mk\xc6mk\x9amk\xaamk\xe6vX\x98\xdb\xe1\x83\xc5\x1dl\xbf\xd9\xd1\x17\v=[\xfc\x13\x9ej\xe1Β\xd9\x10\xa0\xe4\xc5+={E\x9d\az\xd1\xd3Wz\xfcJ7_\xe9\x8bc=;\xa6/pڦ\xc7z|\xac\x9b\xc7\xd1\xf8E<\x8d\x9a\xd0ح\xe9\x96.]\xea\xb33}6\x8c\xca\x0f\xc6#SN\xb6\xf4\xb0\xa4\xabk\xe0(\xb5\xb6\xf6\xb3\xa8\xbeU\xdf\xd2\xf5\xa6\x1e/\x11J\xcf\xcc$\x19\xe9\xc9[==5S?1\xd3d\xa2/j\xd1\xc5\xd6t˴\xdbM\xdd>ҋ\xb9\xee\xbc\xd1ǧ\x19k\x1cꝡ\xde\x1d\xeaGC\xfdx\xa8?\x1b\xea'C\xfdt\xa8\u007f=4\xdb\x0f\x87f{{h\xb6w\x86f{wh\xb6\x1f\r\xcd\xf6\xe3\xa1\xd9\xfelh\xb6\x9f\f\xcd\xf6ӡ\xd9\xfe\xf5\xd0\xec<\x1c\x9a\x9d\xed\xa1\xd9\xd9\x19\x9a\x9dݡ\xd9y44;\x8f\x87f糡\xd9y24;O\x87f\xe7\xd7C\xb3\xfbphv\xb7\x877>\xbc\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\x9b\xbf\u007fw\u007f7\x91\xa17\xcdM\xf3\x8f\x16\xa3\xfc_t\xa4\x1c\x8eT\xa1\xe2g\xa3bT\xb7I\xd1\x1c\xfa\xe2m\x8c\xf6)F=oy$\x9bI\xf1\xf6\x80>\xec\xd8ٵ\x1d́/\x9aRZ4\xfd\xb4Xhz;+FU닅r\x9c\xa4\xdc\xde\x1e\xc4)|~\xe8]Ѵ}1\xea\xc4\xd2\x1c\xfa\xb4X(\xc1\xd9M\xdf\x15\v\xe5d6*\x16*К\x8e/\xde.\xc7\x0e\xceS\xf1)\xedz\xbb\xe1m\xf8\xa0\x9fd\x1f\xf4팏S\xe8\xe0\a\xd5tV\x8c\x0e|Z4UW4}[\xbc}\x88{\xde\xc6\x00&\xecut\xe0]\xb1\xb0\x0fg(T\xa1\x83\xb7\xcb\xd8\xcfB9\x86\xde6\xfc\xacX\x18\xc4iR\x8c\x06qZ45[\x8c\x8e\xe1\x8b\n4\xc7\xce\xd3\xe7\x85\x03\xec}\xc3\x17\xcdAZ\x8c\xdap\x8d\xfb0\x1c\x1e\xb7\xa8eq@\xfd\xd4Q\u007f\xa8\x19\xc4\x0e:\x9d\xd0>H\xb2\x83\xd8\x17\xcd1~g\x8b\xa6\x96\x16;-\x9a\x86\x93.\x17\xdaxym\xb8\x8a¡\x87\xdf\xd6R\xecy\x18(~\xc2c\xf6\xfd\x8c\x0f\xdc\xf4|j\x98[\x18f\xd3\xf3\xc5\xdb=\x1a8\x98+\x1aΚ\x9d\xf0\x0f:pY\xddU:\xa1I\x82\xb1*\xb4p\xef\x03\xa0\x88\xba\xe3/\x886^L\x8aQ\x13f\xbc\x81\x93\\\xb6\x93\xa29J\x8bQ/u4/0\x1cQ\a.\xaaeᄳb\xd4I&E\xf3lR,\x94\xf1,xV\xfc\xa2\f\x87\xad\xa6\x9e\xde\xf2!a&\xf0\x9a\x0eRW,4\xf0қ\x16)\xee\xf6\x80($P\x94y6\x87\xa3\x10=\xca\x16\xf5\xd3\x19\r\xe9!\x8d1OZ\a~\x84's3j\x80R\xa2\x9e'\x92\xa1\xf1\"\x12\x8f\xba@\xce\xc78\xf8uhM\xd7\xc2al\x02#GsM\x84S\xa8\xe1\x1c4S\xba.\x1eh:c\xa1\v-\x13\xed\xb5o`^\xa2C\xb8\xd0RB\xa4\x8d\xdd@b\x83K\x06\xba\x03RD\xba;\x82\xeeB\x83\x8b\xafa\xb9c8F8\x12\xf8]\xc3\xf1\xc26\x03$\x80YѴeI\x9a\x92\r+\x1a\xbe\xa1\xb5@\v\xe8\bW\x04.E\xb3\x9fЊ\x8f\x1a\xb0\x9e:k[,\x94\xf1T\x03\x19\xefn8\x10\xccs\x01\xae\x89ۨ\x9b&\xc5B\ri\xb7\v-v\vHwFӋk\xa4\x02\xf4\x87\xe4\xe3\xf9\x12`\x18\x13\xa0e\t\x9c\x88E\x1b\xf0\x8f\x1aP,\xce+\xb0\xb7\xc2!J\x9a.\x10\x13q\x11\xb8氀\v=\x12e0\xcctau\x1a-\xcf\x1c\xbb\xc1,\x87\x18f=\xb5\xc5\xdb \xc2H\x10\x11\xef\xc7\xd5\xd9\xe4\xf1\x83\x19\xc4\xe13{\xc0\x19`\x19\xc1\x1b`\x96H#\xb4>˱\xe5#\x02\xb5\x14\xaaI\x98q\x1cϣ\xb0\x90\x10\x19\xa00\x18@G\x1ai\xd1\xd4\xe5B\n\x03$\x8e\xb2c)U\xa8\xa7\x84\a\xa0\xa5Ih%\xc2wP\xe0\xd5@\x90\x1f\xf8$\x93`t\f\x9c<\xe2W\xc4\x1a\xe1<\a\xa9\b\xa8w\x86\b\x19g\x8bh,\x81\x91'\x16Dk\bD\x9e)\xa7E\xfd\x8c\x80\x04\x8c\xc7\xed:\x8dX=\xa5n\x1c\xa4̒`M6\x88˥\"j\x1b\x9e\xe9$\xaa\xc1\xd0\x107'6\x87K\xb2\r\xe3\xd0Ii\xb1\xc3\xc9\x1a| \x94\xdaQ\tE=\xad\x17\x1a=\\\x8a\xc0\x11\xf0㮧\x95\xccW\x8b\x84\xd7'\xd9giNa\xc6i\xc1\xca\x14\xf0ɀ\xfe\x0f\x88\xf3&\xd4\x0f\xda\x03F !Y\x18\xed\x03\r\xef\x136\xb0H\x03Ȃ\x90\xbb\xf4P\xe8ȯ\x84s\x00\x15\x10\xf5F\x038]\x1f\x8f\x05\xb2\x12zD@\xa8\x81\xf3\x8a\x9cw\x90\xc8z@$\x85G\a\xea\x9e\xd1dQ\x83\x9c\xbb\x02\a\xea\"7N\xf1z\xd3@\xeem\x9cz\xe4\x86H\x138\x19 \x83\xbb\x82\a\x0exu9\x92\xdb\xd2Y\x02r\xf8\x12\x96H\xa1\x8e\x84{\x80K\x8czv\x90\xf2\xe2FƆ$O\xd0\x0e\x99a\x03謃?j\xb80\xc7\x04CAЕ܌\xb9yJ\x80.*g\xc3<\x88-\xc1*Z\x9e\x00t\n\x87\xd8O\x9c\xad\xbeϑ5M\x1d\x82\xd5V\x9a\xc9*\x18\x05\x96gtq\xc7\"mh\x06\x8e\x80\xbc\xbb\xcc\x13\v\xed\xec \xfbو\x99\xe3\x04\xa9\x1b\x996\x90\xd2\xed\x0eA#\xe0\x1c\xc4Gӄ\x968-\x1d\xa6\x00W\xbc]K\x19C'\xccS\x99\n\x91\x00\x91\xe7b\xbf\x91\x87 8-\xb3P+y\x1ep\x1cdB\xff(\xf1\xfa\"=\x80\x8f\xa0\x8c\xa8 \xb7\x05\xa6@\xec\xe1EJ\x90\x8a\x1a\xec\xca\xc0\x12g\n#\x80\xe2X\xe6\x18Aa'I\x19(wRV?`\x8d\xf5q\xa6\x8f\x12\x01\xe2G\f\xf9\xa2*PQ\xd3\x16\v%\x1bD\x90\x10\x18\xd0!\x9c\nV+\x88\x9d\x00M\x88.y\x15\xa4\xbc\xbe\x91\xa0q\x891\x1b\xe8\a:\xee\xa4\x02@P\x02\x94\x82\x04@\\\x83\x1c\x92ω˺\xe4g|\xe0\x16N\b\xae$\xb8ZX]|\xf0\x01NE\x92-\n$N\xb3\x97\x88\xd8G\xe2@ʋ\xca\xc0=Y\xec\x1f\xe6\x10%1r G\x14\xba\fҘ4\xfbL\x14Īx\x06\x80\xb2\x12\xe2\xcb\x049IP\x84\x91\x11X\a/\x91\xaci\x89\xb0z'p6\fe\"L\x1d\xb9p4H\t\x80\xc2)I\x8a\xd2̲\xe0b\\\u007f\b\xb4B\xe0,\x16\xa8\x83\xf2s\x1f9{\x86\x84x-U\xf8eB*N\xa1\xe3\x04\xc7qoa6\xf53\x91M\xb4dI\xda5\x18m\x03\xe6!\x99\xdf\x11\x00{\xfb\x80\xb4\xa3&j\x1e.`d+\xe2\xa0-\xfc\x94\xc5\xe3\x1e\f\xb5\xc8d\x10$$\xe3\xe8\"\x10\xd4VrZ\x00B\x0f\x96\x8bt\x19H\x0f\xb9k\xc1i\x1b\b\xcbG\x9aA\xc9\r\x94\xddͫ\xd7\x04\x06\x98\xaf\xe1\xcc\xd1T5\x91\xd9\x1f\v\xee\xb9}\xe8\x05\xf8\x04l\b\xcb\f\b\x0ff\x99e!ɩJ*\xc2c \xa8\x03\xe5\x16AS\x8b2\xd9\u0378E\xc9\xd8\xc5QG\xee\xd4Hd\xe1\xb0:tDf\x838eD\xdb`\x86K\a\x875\xc0\xab\xa3/+\x81\x94M\x00'(\x97q%\x0f\x90\xe8\x98\xce\x18)0\xa7\xba\xb7\x11(\x90\xb5M\x9a\x92(\x0f\xf4#\xf8\x96\xf9\"Q\r\xac!2?\xc1ņK\xac#\xefJiV\x91C!\xce\xeaĩe\x06\x82H\x0e\xe7\xa7.\xe7\x02\x88\x84\xaa3b%\x9c\x14\xfc\xf9\x01Ah>c\x03\x97'\x8c\r\\*\xad\xf62\xd0N\x0fF\xa4\xeeȠă\x19۬O\xd0U\x11W)]\x15\x82RP.\xa2v\"\f\x1fH?\x8c\xdd@\xd6\x1f\x99bJ\t\xcf\bp\xfd\f\x89\x10\x16g\x94\x89\xf6\xe4\x84!\xca\x01\x1bC\x18̊Ї\xbd\tQ\x82\x80\x80\x8e\xc1,]\xdb\t\x94\x11D\xab8\x10\xd2!V\nh\x06\xba)c\x1c\xa4\x83\xfdD\xa6\x96qP\x9d\x91o\u0097~H(\x03\xc8\x05\xc9\b\x0e\xce='\xb4t\x90\x92\xd5\t舴|\xf9\xb5\xcfXE\x0e\x81\xf2\xdcp\u007f\xfb\x01\f\xe0TS\x17\xcb\xd8\xc5&\x8d6i\xf2\r2J2\x15\x94\x82\x8c \xa3\xc3q\xca敆g\xd8R\xa8;\xb2ճ\x86\xc2|\x06\x8f\xd5b\xb8\x8df\x102\xbd\xf4Ů\xdd\fz/\xd3\r\\J\x03A\x14\x9e\xb9\x9e\x19c\x8e\xad\xa8\x9f\xc0\xfb\x05K\x1cx^Xh7AsD\xdd\xc9\xd1\x00F\xe047=\x9b}I\xe5&\x00\xcc-Ɏ:\xeb\x11M~K\x14\x16\xe1q\xb7\x81\x9f\x93\xfb\x8c\xaf\x9f\xfbWJY\x13Ǟ#\xb1\xa3\xf1\xae\xc1\xf0\x109ޱ\x9c!\x936\xa85\xefex\x9fL\x12\b\xf0\xfab\xfa\xe5u\x8e\x84\x8d\xfe\x94T.\x8b\x176\"\xa9\x9e\x98\xaaa\x1f\xb1d\x83\x1eu(\x90\x820j\x8dM 3\xfc\xb2+З\x1c\\5;\v\xfc\n=+\f\xaa\xc5V\x82\x1c\xb4\x1dTc4e\xf5-k\x1ce\xc7߁\x90\xc1c\xe2\x0fk\x89\xd8\xfe\xa2A\xeaYt\xed\a\xe0\x8a?\xeb\xe7\xf4Q\x92#\rY\xa4h\x9e\xa9d:ׁ\x17\xe3\xe2\x1esj\xfaA\x87\xce\x19\x94%9H\xd0\r\xf8t\x1d\x9fa\xf7\x19\xdb\x16\x0fy{9f\x05\xab\x12\xf4\xcaAΊ_~\xbfA=\x12\xad\x06\xa8k\xa1\x88?\xe0ww:\x02\u007f\x02\xa6'\xe7\x1f\xe8\x0f\xe8_8J\x93\xa0\xb2\b\r2gOd\xdd\xf1\xc4ZF+hP\xa9Z1\x84\xe1\xdb\nP\xd2\x11\xac2b$\xc0\xe8\xd1/p ^\x00B-]\x11\x92$V\xc4\xf8\x8b\x8c݊\xeb\t\x98w\xd7\xfa`\x8d\x90KÁj\v\x05\xa34\x00\x10\xdb\x15' {\xaf\x84RєV#M\x83ɳ\xd0\f\x86J4<\xa2RM>Ձg\xb3\xa8\x17$Y\x0eFnV\x1eо\xd8 P*\x94\x82h\x01\xd9T\xdf\xe1Z\xd3{\xe4h|\xc1\xee\xccL\xbb'\x03\x19Ny7\x15\xa8\x8e\xbc\xab\xc4\x02\x83\x1a\x14\xae\xa5\x94\xd0\x05\f\vy\x8e\x00\xc1\xeag\xbczȐ]c\xe3IJ\b\x8a/\x96Q\x9f\xd8\x1f\x8fSvx\x99\x96\xe3.\xf5<\x1bQI\x03=F7\x03\x9c\xec\x05\v\x8b*Ju\xcb\xf6\xed\x06\xda\xc0\x11\x1c\xa1\xae\xb2G&V\xf1\x1c\x87\x1f\xec\v\xf6\xe1\x8e\xc00\vC\x84s\xc3U\x8b\x9f\x1b)\x16\xcf\xd7\xf0\xac\x03\xf73\v\a\t\"\x12\x9fp|\xb8n\xe46$\xee\xdaNT\x9d\b\x1f\xb2\xac\xe0`\xe0bEIW\a\xbc\x8b>/\\\xe5tz`\xf0\xbdT|\x0fѱ\x15v\xd8`܈ܫ\xedg<\xaa\xbcސ~\x18\x88\xd0j\x85\x01\xa8\x89\xef\xa8OS\x8c\x8e\v\xf1\xab\xed\xb1\xbf,(\xe5\x16'\x86{Y\x12\xa5\x8d\x04Pj\x8b\xb7;v\x01\x1c\x8e\xe8\r'\n\xe5\t\x06.\x10\xd3@-:a\xf3\x15Q'Y\xaa\bD\x8a;\x0f\x88\xb3\x1c\a!\t\f\xa2Eh\x00\x19J]\xfc,b\t\x10\x14;\x88\x99\x00Į\x03K\x1dg\xa0\xc1\xbe\n\xe6\x00)/\xfa\x1a\x85\x9d8^\xf4\x04ʈ5\xa2\xfc\xa9\x12\xcf\xc5\xd5D\xcaq\x87\x9ca\xe2\xa4\xda\x13wk7x\xddk\xa9\xc8\xdb^09\xa3\xd1\x1f\x98-9\x8a1\xbeD\x18\x020\f$\xa7\n\xf3,`vQ\xd3Nd\xd1#G\xa9\xbb\x05\xdbk9֦Cƻ\x84OH\xb8\x9d\x02<\x0e\xd8\xcd\x00\u0604\xed\x04\xc0\x19%\xf4\x82\x04\x91\xa0\x10\x98\xb8\xcc\x16\x87Җ\xb9Ğp\xce~\"\x98\xac\x9f\x8a?\t\x1da\x1d&y\xf2\xfc\xd5\xc8\x02˼\xa1E\xbd\x0ej%\xb6l!GnRs\"\xd2\xf5\x1eϧ\x88\x00dk\xc7\xc2G\xd1\xdfՑp\x9cCb5$\xf7*\x01\xcb\xf5i\xbd!Y\xa2\t\xbf\x8c\xd3Y\xcbbH\x88:\x80\xf1\x88\xf1\a\xe7\x8bC\xa1,*ܨ\x8c\x1f\x06\xe1jږ~f:.\xa0\x86\x16)\xf9\t\xdbOņό\xb4\xcb\n6\t^֦H+C\xe9\xd9\xcd\xc4%\x00\xaa=Q-*\xacc\xb1\xeb\xe1\xd81R%]\x18]\x84ؑ\x868\xa7j\t\x131\"\x05\x8e\b K4\xf0\x04s\xe48\xe8\xc6\xcfr\xceC$\tR\xe8j\xac\xc2H\b\x03\xb0\x1c\xa6%\"\xe1^&\xbf\xd1\x12\"\x06\x16\xc2(8\xf5i\xb0\xae\x02\xf0\x87\x91!ޔ\xb3\xabr$\x18.g\xd2\xdd\xfb!|\v\xa5N9\xc0ӄ\x85?Rf\x93\xbc<8\x17\xb0_\xa1\x1d'\v6\xc9\xf4\xd8iJ\xba-\xac\x9f:z\x88\x12f\xce]a\xb55\aą\x9cR\xa8\xba#c\x8c~\x06Za=\xb6b\xe1\xa2\xc2\xe5W&\x87\r)\xcb\x18d\x84\x97Aď\xf6\xff\x8e\b\x11`om\x11\xab\xe2\x8cf8\x84\"\x80z\tk\xe0ر\x9e\x8e(\v\xb1\x18:\xc0:d4\xe4S\xd2[\x04.-\xd1\xdb\xcb~\xc1\xae\x8d\x16\xb1H\x8c\xe2\xaa\x00\xe7\xd9\x13`\xd6\x15U\x11@4l\x1c\xb1\x84\xeb\a\x89\xa7\x990\xb8Ħ+ާC\xc1\x8db\xcd'\x83I\xdd\n\x14d\xa0̝\xc4EN\xfc\x97Tt\x9c\x81*\xc9R\x96\x0e5\xd1\xd6`\xa1\x00(\xe1\xc56p\x81\xdb\xf4\bz\x9a\x8a#xפ\x05\x1e\xb0:\x1c\x91\x9d\xaa}\xc7\xe1-\xec\xf0\xeaX+]Fc3\xad/\xd4\x02Q\xc5C\u0602a\v\xed`V\xe0\x8e\x1d\x88a\x05\x01\x1c\x92\x13j0\xfcu\x87\xa7\x84\xa2\x0f\xc8ʀ_\xf4<\v\xdcnX\xe5̈́\x8c\b \xad\x06\xa9\x18tiVS\x16\xe9\xc1\x04W\x965\x0etۥe\xe7\xc2XK< \xf2\xa9\x9a\r\xb6,\x00\xd8\x15\xf6\x85sD\x89i\xa7\xacD!\x85\xa0)\x03ɤ\x91\xf3\x9b\xd08\xa1\x19\xa1\x92\xf9)\x13\xd6&Y\x1a\xf7S\x06\x1apV\xbc\b\xb1x\x1du\x86\x16lY$z>\xca\xfc\xe2(\x85\xba\x82\xb2x\x12P\x96\x11W&;lN\x14q\xffʖ}\x13\x1c9`9\xf8\xa5/\x81\x15\x14::@m\x99m3\x9d`\xed\x1dX\x0e\xf0j\x84ö\xae\x8f)q\xfd@\x85\xa49\x02\xb9\xb5|\xf0\x94\xe0\xb7H\x03\xb8K+Xw\xa9%ʨ\x93}1\xcd\\_\x12J\x81\x1a]\"\x86*\x14Gd\x17\xef\x93\x11\n\x97\xab\xecC\x8aE7\r\xb1#3\xde\xe5\x10\xb0\xc3Q\x88d\xac\xcaO\xbbV\xb8Q7\xcd\x1f\x12\xbbZ\x13\xafx_\x90!\x9d\x19CT\x0e\x83\xab_\x90A\b\x00 QE@\x96v\xab\xa7\xf9`\blA\xd3\xeb\xa6a\xe3\xc1h\x84\xd5\xd7\x0f\x87hd-\xee\xddg`I\xf1\xaa\xac\xf7\xb5\xc9\x02\x15=\x9f{\xb6\xd3Xѳ\xaa\x1cvw\xccF\xbb\x10\x04X\xf1b[;\xe4h\x99\f\x98\xd1R=\xf4\xb6xgo\x9c.\x17\xa8MM\xad\xc0~aׇ\x9e\xf9L3\x915h\x83\x01I\xccrȍ\xba\x12)F.\"\xd4\xd4\xc9\xfa\r|\x8fm\x96\xf8U\xc91/%\xbbp\x9bq+\xed\x8d\xd1P=\xe1\x12\xec\xcf\x05aK\xdc'|\xc6\xc4ו\xc5Yb\xfb\xfb>_\xa2'\vG;3\xf9\xd7S\n9\xa4Sc\xefQ\xb7\xac\x92\xd7!\v\x93D\f\xd8\xf2D<\xb8\xae\x99b9΄\xc4,y\x1apA4SRߪ\x89\xd8*J\x12ˇ\x16fҪ\xd1\xe8\x8fAcip3\xa4\x1cBL\xda'1\x97\x06{\xea\xbavM\xea.\x87\x8af~J4a֙\xf9\x97\x05S`\x1c\v\x1a\xa2\x89\xb8ќ\x94z1\v\xed\xa7Ag\xed[Q\xa9+\x12\x13I\xb1I\x14O\x89\x8cr\xdf\xd2\xf5\U00012a10\xdb\xd5\x11\xb8\x97\x01A\x95\x02\b\xbd&\x86=\x82V8\x13\xa0\xc7\x12\x13A5\xb6\x12\xbc\x95\x85\xaa\x1d\xb3Y\x00\x900_YN\x8d\xa2\x88!\xb2\x16\xc0\xbc\x86\x90\xfa\x9aHG2\xba\x94a\xaeQ\x8dCQE\xd1:Dh\xa8\xf2\x93\xec\xeaIx\x17\x8a\x1d\x8a\x96\xb7!\x12D\xd2\x1c\xfa\x14\xa3\tk\xa9\n\xac\xd7\xcfğQe\xb6F\xfez\n\x12\xbf\x1eĻ'9\x10Hd8\xdb\xdd4\x1b\xef\xc0\x80K\xe2R \xce\f\x94&\x92\xae\x96\x88\xfb%\xc4pVĦ\x8eq\x87G\xcci\x89\n\xc8\x15MA\x87\xfd\xa0\xa4\x00\xc6\xe9\a\r\xa4$p\xb0\xe9\x02\x86@5\xa6+b\x81tgQ{\x0e\xbc\x84\xcdI\xb6\n\xb3\xc7,\x0e\xeav{\r\xdf\xdc\xe9&s?t\x82\x02\xf8\xec4@\xe40\xcd\xc7|\x1f\xf8\x1c[c\xe0ֵ\x81Ԉt\xeb\x12\xd8\xdaI\xb3\x98b\xc4\t\xc7\xf9\x94\x93\xaeı#\xd9K\xc8F#,\x89\x12'\x0fy\xf6\xf7\x10[ \xa5\xe68\x9b\x12t\x8dUC\x94\xe0^\xb0\xae\xf7\x85Ws(L\x9f\x85\xa0xא\x13\xeeM-/,\x1eU99\a\x94a\\2\xbbQ^HD(\xd9A\x9b\x01\xdb\x04;;\x06t4\xc8\x0e\xef9\x0e\xae\xc4\xd8H\xe4\x12\xec\x03\xf4 \xb9\x14\xd8Cr^\x12/\"t6\x10\xa7\x11.U\xd2\a)\xfe\xb9\x12ҭ0\xb9\xa1\x1c\x1c\x100\xc2\x03\xc7\xe7\x91\xe4%\xb6\xc0\xe0\x1c\xa2\x80\xe1\x10kڱ\x17\x1cؤ\xba\x03\xdfj\x8bY\x8c\xd71j\n\xe8\xd3iJ\x1aCh\xb83\x94r\x15Xs7\xc4u\x04\xe1&Е\xf48\xb2\x97G\x9d\x18\x14|\x90\xdfH\xf8\xac\xf4\x1e\x04\xe5\xbb\xce\xd9\x12\b\rJ\x9e\a\x88\x1d\x85ȷH9.I\\e\x83Y\x13\x19\"9\x02\xeb(\x17\x87\x85̯\x917\x18\xec10\xa9X1\xf5\x1dQ\xc0\x10t\v\x19\xaa\x98\x14\x1b\x12\xdf\xda\r`\x8aN\x93\x13\x83\xe8\x04ah\x1e\x02ٺN\xce\x1c\xe2\xd5P\xd4r\xe6\x94d\xe7\xc0\xdb;\x03\xa2$y\x16\x1c\xd5g\x19\x80\x02\x1bD\xb2쀪A-e.\xd8'O(y\xaf\xd3\xe0\xf3i\xb2]/\x04v\x05n[\xe5@\x15\xf1Ē\x01\x0e\x1d\xb7e\xbb\x16\xc7+\x1a#\x01\xab2Nݗ\xec\nP{\xc4N\x8bW\x93\x19\xcd\xc5\xf6\x81\x06\x9e\\\x84\x182\x85@*8\x89\x84T_\xae\x17\x8cE\xaald$G=\xbb\xeb\x99\xf3J$!\xd2\xd0\xc0\x89\x85\x0f1Ͼ\xb8\xb7(.\x99\xe2\xd9j\x9c\xb3&~.\x86q\x9c\x9eE\v\xa7\xc4r\ae?\x85\xe1\"\x80_e\x91\t\xfd \x8e۶h\x9e\x05O2Y\x9f*b\xd7n\aW?aP+A\x9f\xc4r\x10\xe6U\x82\xb0a\x8d>I\xe58\x87\x12\x84\x83\xa6\xa5\x12\x93\xbf\x84\x96\" !V\x88_\xe5r\xf2ЛI~\xab^\x80\xb0\xac\xa4\xedq\x92\vq_\nR\xdbK\xc8;\xb4\x97\x84\xa9\xcfe\x8c\xa1\xa5\x8dO\x8a\x83\xb6/\x99(9\xb1\x87\xd3ע\x88\x10\xce\x06\xc5\xcb=̢VPQF\x8baKB\x83h\x89\x91\xe1i\x9f%\n[\xb3\x8f$\xeb\x80R\xe6\x10\x92\x052ߧ\xa8l2\xc5a\xaeھ\xe4\xe4\xd1ȓG\xdd咹l\ba\xa3\xe1\b\xe9R\x12\xb1\xccA\x11\x94\x04Ⴏ1u\xe1\xb4Q\xcb\v\x8d\xb4$\x01\x03\x13\xbeJ^\x8c#!3\x8c\xb4\xa2}1\xae\xe1ר\xd7Tȍ\x87\x10\x85,\x9fbd\xc6\xc8Y\xcb\xe3FK\x04s\x06\xc9e\x02\v\x14P\x80\b\x1b\xb4&\x97Ĺ\x87\x81\x10\bbɷ\t\xd0WR\x1b1@\x06\xb3\xb0\x9a\xa9X\x87\xc4\xd75\b\t\u007f\x81\xeb3\x80nJ\xbe\x1b\xa2\xa4\x8e(4\xa4\xad\r|>\x90\xad\xed%\xa1\x0eW\x1a\x1a\xf32\x82a\xbbG\xd5fy\xc1\xf5T\x82\x80$\xc0)!\r$\x1f\xe4\x84\xcae+\xc43\x05\xb0\xc1\x18\xdbe\x91ߨ\xa7\xd1r\xedgѝ\x18\xbf\x84\x13\x19\xd2\x10\xe8\x15j\t4j}\x9fO\x19\xe5\xa5:\xf0\x1co\xc9\\]\x92\xbb\xc8X\b\xd2\xe1(\xb3o\x90\xde\xdbΡ\xff\xe0\xf8\x11\x18D\xe6\x90f\b\x05DK\xed1\xab\xff\xc8\xc2)\x0f\x86TZԗ[b\xe5\xa7uĶ7\f\xf7\xc7+\xc28[\x1a\xc0N\xc0\a\xa4YT|\xa0W \x97\xb6\xe7$&\xb2\r4\x05/\x11\x19\x1fs8H\x9fO\x81Q\v}\xb2\x0e\x8b\xc6&\x81i\x14\a\xc067\xbeV\x82\x10\x95$\xa7l7ȕ\xa2\x9f\xe1\xe9\x1b\x89D\xf0\xb2\xed\xa3\x9d\xa4\x1c\xe7\x96p\x12\f1\x8b\xe3\f\x1c\xf58x*e\x9bbJ\xcc\x1c\xa8\xfbXD;\x86\f\xa2\xf9\x04\xb1mW\x82r8\xb0\x8aCIJD+bC\x15\x1f\x029Q0\xe2\xa4Zv\xbd l\x96\xa8\xf84ɳ\x94F&\xad\x11E\x8aÞr{\xc9m\x1d\x0e\x8e\x98\u007feɨ\xcbV\xb2rl3\xa7&\xe9\xc0A\x89\xc5\xd9@\x8ex\x14l\xe9]\x0e~\xc6i's\x11\xacф\x03\x84\xc9nw\xc49\xf1l\xbeB\x1b\xfe!c\xc6T\xe4\xeb>\xfb\x1a8ڱ\x97\xf9BPw`|Od\xb1\x17\xacz\xc4r\xb2\x88\xa0ff+\x1a0\xbb\xe1\x9c3d\xb4\xdd\x10\u0098ł#\xcb \xf3\x18^\xc013\u007f\xf2\xb5%\x92\x97\xc0\x17\x9a\x8b\xd6\x1a\xd0B\xa5\x1c\t4\x9e\xb2A\x8a\xec\x8d\t\aij\xbd\xc0ː\x04A\xd6d\xa5\x9f\xc4\xe9\xa1\xe4]\xa0\xce\xc8JP?Ŀ\x868\xc1`\xa1G>\xd3\xc1\xb4\x87L6\xa1\xac\xa5\xc4yrV\xb6\x82>\xb7\xc7\xe6\xe16瘓c\x01'\x0eS\x11z\x8cuXxs\x12M=\vUD\x1d\xb6\xc1N\xd4\x10?\x84\"I\x12cxi\x959\"*j9q\x1d7\xd9u,\xc0\x0fG\x16\xbe\x16\xf8\f\xa3\xd1\x16.~\x1c\xe2Q\xbb\xa9\xa4jQ\xe0}.\xeb\x1a\x8e\xc9\xfe\x83\x86\x0f!j\xc8\x1fɞO\xba\b\xe3F\xf8\x12Y\bZP\x8f\xc4ߐ\xb3\x13\xd3\tq\x8e\xb2\xb0\xf1\x9epx\xe2\xb1\xe4I\xd8\x17\x05\xb1\x14\u009d1I\xef0\aIؔܣ\xe0t\xb4\xc9H\xec\u007f\b\x80\x12\xf6\xd9r<\x02\x9c&[\x0en\x04ʕM9ؠ/q\x9e\x94\x9a\xd7\x17\b\xc9.\xbc\xb2\x95s\xa1\v\x92\xe8\x90xZݎ\xc9\xfd\xc3k\x9bXK\x8b\xc4<\xd9\xe3\xd9\x1a+Q_\xa2\x1cr\xc8>\xf9\xae\xa8\xbf\x94\xaeA3\x81'\x91}9Ђ\xc5S\x93C\xf9\x1bi\xc82\t\xf6\xef\xcci\x87n\x16\xf2x$\x82X\x83\xc4\xc7\x10\xf7\x0e\a\xe0p\xcca\xf0E\xe1\xd06CFvW\xa2BqaT9\xe6\xb7'\xe1\x13\xc1ʑ\x15p\x80\x03s\xecGӇ\x9a\x1c\x87!\x97Sr\x9a,u\xa8Ź\x80\x03V\x95\xc8\xf6\xc8\b\x10}\xf5\xe8\xf9@\xcb>\x8d}#\r\xa2\x8c\x1cb\xc4\x14\xbaB\xa6\x98\xd6&\xf1\xa7}\t_\xc3\xf4\xa7n\x1ad;r\\\xe15,\xe5\xfb\xc12K\xb6&\xc9~fݑJ\x11PZ]\x95\xb9a\x92\xe6E\x18\xd2a\xc9&\xb9\xcc\x1f1\x83Q\xa0P=\x04\x9a\x85P6F\xfb}\xcft*\t\xdc!0[l\x1b\x87YNu\x8f\xb3\xab\x82r e$h\xe5\xf5\xbcx<\x990)\xdf\n\xc7I\xdc\xdepmu\x0ez\x99q\x86\x18hce\x89\xe9A\xb4\xd5\x17C\x0f\t\xbc\xf0#\xd2\xd28(\xc9\x05̶\x1f\xf2\xe4)\x8b\x86V+.\xfe\xc3`\xfc\xecK(\x16\xc5(\x1d\x86D\x13\xb6\xf9\xb1\xbd\x8c:\x96\xdb\t\xb9\x1d\x854r\xd0>}\\c\xd6\xd6\b\xa3G\x93\x86t\xc0\x00\t\xc5\x18\b+\xbe\xdc\x1a\a\x01'l\xe5\x0fs\x90\xcd Fms\x96O)\xd4|\xa0\xc5S\x91\xa4\x19T\xe4ы\xd8\x10S5Q[;ɌpiVĄ2$$\xba\xf9@JʤYI\x18\t\xf0&\xf3Q\x85\u0096\xf3N`F\x98\xcf\xe6\xd9V\r\x89\x15\xbc\xc0\\V\xc9A\x8cC\t\xee&v\xad\x86\u007f\x87\xed\x13\xdc#e\x8br͐6\x83 Hx\xa14\xb3=\xf2-\x1c;g\x93\xcf\a]\xa0\xcaW\xe5\x98$\xaa\xd2ҕ\x02-\\\xcd%\xf6y,\x8ee\x84$\x1d\x91\x04\x04\xb1_Ώ(\x94\x9dd%\x95\xb8jN\x0e\x05\x1e22A\xdd\xe58\x14\xdc\xc82\xf1ڡ\xa4B\x8f\x92iX{f\x95\x8ca\x12\x97\xbe!\xd3,\xe1X\xfaa\xc8X\xc1\xf9\xc1\xf8\x8b.\x9b\x049\xba\x9a\xfb'\xc5\x06p\x97\x834_}FB\x89\x19~\x97c\t\x88l\x05ɗC\xdf\xc2\x15\v-\xbb\x14\\\xde\b\x19o\x87R\xae\xe5X\x1c\x80\xc4i\xfa\xa9\xa4\x1f3f\xe7\xa2\x00)\xd7\xe4\xa0\xd9ړ\xf0\xb8c\x1eE\x80\xd9\a\xa2\xb8\x93\x89\xa2\x1f\xac\x11\xe5P\u007f\x85\xde\xc66\x97\xfeQ\xcdE&\xa1o\xc9\xca\xd2(q\x90\"\xb9\xc8\xc8\x03u \xbf\xb8\xeeu\"i\xd4\x10^\x88\xe3\x16j\x00q\xfd\x13+ިnP\x88P\xbb\xabX\x9f\xb3\xd0P\xaf\x909\xb49M\x04\x11n7˘\xa3О~:\x0f\xd6Ͳ\x9b2p\xc4s5\x83>\x1b\xc2w\v\xf5tn9\x98\x8f\x83c`Ȱ{);\x99H\t\x9aQ\xdeU\xd5f\xd5:\xb24E\x81:{\x82\x8fš&\xf2\x1d'\xa1\x9bE-\xe1j\xecdU\xb3\x1ab\xd8\"\b\xc1\x8e\x97F\xa6T\x93\x06F\xb5L\xc8\x05\xc4vT\x14#d\xa5 \x8e\xd6b\x85\x95\xce\xd1\xcb\\`\xc4x\x90\x9c\xf2fz\xf2S\xa0\xd2\x1d\xc2\x1dX\x1f\x92\xc2\x17\xe4\xd0ጟ\x10~z\x18\xf0\b\xf3U~B\xd1\xdd\xf0\x8c5ɛd\x99h\xd1zQO\xb9\xc1@\xca*۹%+\x80\x13\xc4PKC\xb7w\xc3I\xbc\ar#1\x84\x04\xa79O6g\xb5\xbbl\x8cY\xeb !\xda\xc9|'T\xa0f k\xb8\"\x89\xc3\xcc\xd3B\xa9,\f\x12b\xf9*\xaa\x1b[\x1ei\xa81\x90\x12M\xe5]\x9f\x19^Yf\x89\xad\x12\x03ZbI9\n\x86\xe6\xa6c\xa6\x19L!\xb54\x84\u007f\x8b\xd9\x1d5\xb5C\x1fr\x95R\xc6+\xb4\x1a\x0f\xa4\xa4\x165ؽAV\xb9\x058\x05\x81\x84_\xf6\xed\xd4.b?\x13\x19\xdbO\x8b\xbf\xa8\xbb\x15|\xe6\xd9\x12\xd2e\xf1\x84,\xef8\xab\x87\x94\aK\xc4\x1d\xf6XSCv\xdcI\xb2\xfac\x12f\xcd\x0e\x96J\xc8\rdE\x96\x19!\xe3ն\x9d\xd4\xfd\x1b\x04ʥ\x94\xed\x12\x17}E(.\xc4߶\x14Z\xda\x15\x8fS\x8d\xbd\xbd\x15\x11j\xe8\x16\xa4l\b)܋\xd3)\x91\xed\xc8.\x0fB\xd4\x1f\x85Ւ\x01\xaa\xe5%_]Jd\x96\xb2dp1\xab3\xc5#\xc8\x11B\xeeI\xfd\x1dv(Rޟ\x9d\x15?\xaa's\xeb\xe6AG\xae\x04\x8d\xa8\x9e\xaf\x8ez\xe42\x93\xac\xcf\xca\xcfq\f\x02ǃ5\xd3\x009\x9c\bp\x04\"\x01YJ\x9e:{d\x90G\xd6Ē\x99\xf3z\xeb\x0e\a3`m\xf3\xbe\r945\x91<\x14z\xd4\xf7\xa1<\a\xc595\x82+x\xe0\xe5\xaa3x\x04s\x05\xec\xc7'\xd9m\xe2\xe9b\xd4ıPޅyEU\x9c,\xb0\xcdP\xb1\x80\xa3ԉ\x95\x1de\x86r\xd2\xdd$\x1a\x81\xeb\xe0\x87\xf0ޖ\xd4\xe0\xec\x06\xed\x96\xfd}\xb9\x96*Pp\xb9\xa7\\\xc9\xe7N\x16\xa3\xd1\xcbU\x8a\x91\xf2\xc9UQDĶP˩\x9ad\x9e\xaf\x84\xdb(P<6\x96\xa2s\x02\x84\x0e\x04\xcb\xd7\xc5\xde]O9\xe2\x94\xebI\xe2Q\x02\xcf\v'\xe4\x1a\x11i\xbe\xaevp\xe2\x06O\xb0T\xc8\x11k\x8ax\x15y\x93r4\xc8\xfa\x9a\x9cA\x8e\x96\x8e\xfdP키PHXHr~y1\xb2R\xc6E\x8d\x8d/\xec\x81\xc2Դ\xae\xc4dČ\tA\xf7A\xf8S\xe2\xb2&x\xc3\r\xa0\x81;5;\x05J\xees\x82̥ͥΛ$\x1a\xc5\xddoE\xaf:LCQDv\x97\xa3\x95\x82\x9cO\x838K\xfb\xb6\xe4\x88\xe6t\xbf\x86ͮ\x93f\xac\x9d\xddU\xa5eY\xc9`\xa8{\x90\xca=\x13\xa4\xba\x11\xbe\xdbc\x1f\n\xd9S\xdaV&\x93\xec\xbf%N~\xc5K:H9\x0e\xbc\x91!E6\x1e\x06\u007f%gڗ\x12\xa9nbلB\xfc\xb6\x13\xb3QY\xa6\x18\x13\xbaI\x95\xc9)4誐®\x03\xd2U\x04H\xa0c\xac,\x06ض\xc4\\\x8a/\xa6e\x89\xedr\x88\xb8d\r\xd7\xd3k\xb9\xa7\x83\x98\x81\x1c\xc6\x17\xb4\x92̞W\x15[\aښ+\x12\xbb\xca\x16ꆗ\xa2O\r\xae\x9aFQ\xb2\xa9+~\xd4L\x17\xb1\x9fs\x04\t\x92\x0f\xe5V\xf7-\x93,\xfa\xcc\x11\x83\xb5Bf\xea\xb5X\x00\xbaiHʖ'̒ܓta*\x1c\xcf\xf7\xbc`\xf3:\xdd\x10%s\xf5S-\x8fNHjΙgp\x8e۹R\xa9}\x9f\xddN#`\xd9\xe3\x80\x121\xd2v?W3B\xee\x96AE\xaeH\x8bD\x1f\u007f\x8d\xb3܅\x82\x12\xe1v6\xb0+\x189TL\bJ\x01at$s\x95\xd7\u007f\x88\xa9+\xa5\\6\xbe/a\x818\xd4TC$e\xb4B\x18\xb7\x94\xabwM\"\xb0\"i\xcbt%\x87\xc1\xa2H\x86T\x9c=2\t9\x89\xa4\xb4^\x8avR\xb0(\n}ʛEez\x90\x84\x13U\xb2n\x03\xaf\xc1PÒ\x80\x05\xba\x03HV\b\xa9c\xc5\xce\xddI%\xa8\x84g9\xe7\x89\x150\xc2Q\xa9\\9\x96\x8b(\x91\x97\x91\x02f\x1b\xb9\x12\xd3\xe5PJ\x1fW\\C\\\x8cl\x9e@\x83{\x8d\xef\xea\x12JdKuj˚y\xcbr~\xf4\x81\x0f^av\xc1\xe0\xe0\xed\x89\fmQ\x99c\xc9D#lE\xb7\xff\xc1\xbb\xe8p\x02\xa8S\x8ea惶C\xc0L\xb8\x1f\x9fL>\a\xe4\x1d\xfa\xec\xa69>\xa7\x8f1\n\x9d\xc9])}p\x9d\n\x8d\x1d\xdb|\xd2\x1dPV0\xa1\xf7\xd2\x00\r\xc9g>\xcbR\xd6%y\x81\x8a\xcbH\x94c\x1a\xeaІh>̚ne\xf7wi\xa5!\x1f;\xf3o\x12\xf6\xef\xc8]\x9a8i9W\xf0\x14\x15\x1d)\xaa\x14*\xdf\xd5l\xbe\xfe\xe3^.B\x8b\xac\xb8\x83̙'\xb70i\x8a+\n\xa9\x91\xcd\x06|\a\x8b\x84\xc1H/\u007f\xc3\xf3\\6\x99\x04\x98\xa1\xd6\x14\x82\x04\xbb\xec4\x96\x1b.e\x05\x80|\x06\xc0\x1al/`\xdac\xf7\x92\xe4\x0e\xb2%\xb1\xc6\xecQH\x91\x80]&\xdb\xc8\xecʒԳ\xa7F\xb0\x1e\x8dy3T\x8a⌏T\nPf%\xc3iEf\xa1\xe75F\xb8HNG\xb9\xa8\xf7\x16瞄Z\x10\xb46rw\xa4C\xd9EQ\xf4\x92\x94\xd4\x17e\x1c;VK\xe5\x0e7◂\xe6N+9M\xe6r\xffIJ\xcb\xf2\v\xba\x92\x91P\xceXLV\xdc\xd2I\x88\xb8T9Ǭ\x9e\xa3\xcc\x00Bzl\xa8\x03Bw\x1d8\x94pܖ\x98'YYff\x97\xe5\xbes\x1c{3\x17a\xc3l\xbe\x1b\x18\x1d\n\x9bCѳ\xd8\x1cp\x9c\xe3+\x8d\xac\f\x15\x056\x93]\xb1\x19\x8a\xc6\x1es\x99\x13\xaa\xd03\x88\xa5\xcag\xb8\xed4\xbd\xc2\xc47,Su\xcd\"[\x91\x8c&\t\xd4'kH\x89#\x829ܴ\xccŠo?;M\xe7dT焄\xc3`\x06\xaaJ`\aW\r\te\xa3\xf6%\xc5f\x10\xb0\x139\xcd%\xa6\f\xc3\xcf\xc8\\\x89\xcaWf\x81\xcb\xdfx\x82}.r\xf3\x9c잵D\xaa\xd5\x1cWo&ctKOm\xf1v79\x8b\xf9\x9e\xbe\x85N:\xf2!\xd8F\x92\xfe\xd9\x18\xd5\t\xe5\x13j\xf6zL\n\x15\x85HB9\xa4~\xb6\x82\x91`1j\xbfmÍ\x17\xb9\xe0M\xf0Rʍ\xe0\xd9\xf1Z\n\x19S\xe4\xb1I垗U\x89&oJI\x87R\xc0\x05{Y\xad\xc3}\x97\xdd;\x99\xbc\x8d\x9c\xd9\x10\n\xcdS\x12\x05\xa1\xf4>\x99\xcfg\x14l\"eq\x98CT\xc5&/\xeet\xbcW\x93\x1d\xb3sGt.\xa9\xf1\x0fsW\xb3W.\xbb\u007f1rЦ].2\x80)\x89r\xb3k\xe5\xfb)\x82<\xd8I{\x12\x80N\x9e\x92,\t\x9b\x9a\xaa\x84\xb7\x85\xdc\n'\x85\xcf|\xa6L\x04\xfd\x81\x01F)\xa0\xc3\x06\xdf\x1d\xa2-U\x14$\xc1\x16\xbd\x92e\x1fj{r.\a\xddFQ\x82\x1d\x8fB\xbe{3\xdcf\x85\xe7n\x10;\x91^ٽ\xd9\xc5\xc3C\xd1\u007f\xad\xe0\x8d\xe1H\xee\x10\xd50\x88\xa5\xe6xEn;\xd0\x16\xeb\xe3^v\x1f\x106\xe9Q!a\xc7q\xdd\x03\x0e\xe8$\xa8K\xf95\x03\xbec\x05\xad\xefP\x88\x89Q-\x9e($A\x11z\xed\x84B\xaeY5\x90Z\xb2\x96\x94&\xec r\x9a\x92ϒ\xb0\x90\xfcs\xf7ˠ\xf0\x0e\xbb\x96\x18\x96Ff\xe1\xa0<\xdf48\x92\x18\xe7;\x8e\xe3\xe0R\xc5Yp\x92\xc4vu$I\xbd\x1e\x10%1\x85^\xb0\xd3\xe0ےTcb\xff]?\x97*A\v\x8d\xef\xea\xc6\xf7\x1aŐu\xf2\xfa\x87\x14\x96z\xb8\xb7\x1a\xa9Br\x13\xf7\xdc\xddE\xaa\xa1N\x90\xdc\xf1\x86\xee,\xdc\b\xd9\xe9\aA\xd1!xеI\xc8\x028Ε\xbe;\xe2\xec\xd6=Ijb\xf7\x8a\x14\x89\xc6 \x05\n\xc6bvO\x15\xe8;\xf6\x1dC\x0fN_O\xd24\xb9\xe2m\x9f-\"\xb7\xebv\xe1\x82\bi\xdaE\x1a\xea\x16\xb2#\x8c\xacn$\xa0*A\x03;\f\x15\xd5ɆĶ\xc0Pċ\x029S\xbeG.3\x14\xbe\xddx\xee.\x85\x12q!\xd65\nk\xebf\xf7\xfc\xecI\rV\xa2\xde}\t\xce!\xc5\x19\xd1/.\xber\x1a<&\x87A\xf6\xb0\xee\xe8B^R#\xbb\xcdZȮ\xa9\b\xc8D3>\x968ߣ\xbb\r\xa3\xc2^\x91\x92O\x03\x9f\xf7\xcf\xe3\xa5Tݻެ\xe3\xe0\x97\xa3̦PM\xa0'\xa9\x1b\x1c,C\"\xab\xec$\xf1\x88\x82'\xc3\xed\x80\xc9$%w\v\xc2\xc4J23aY\xab\x83\\\xf2\xbd \xfe4\xc9\xd7\xfd\xa0x!\x0e\xfd\x96\x9c\x10\\\x02w\xf6\xd3i\xb2L\x8a\x1fub?\xf6SqP\r\x82\xa0k\xe4\xee\x80(\xb7M\x94;v\x1f\x86\x1b\xb7\xd2\rSsEG\xb8\xba\x91\xdc}\xa3L\xf9g\xc1i\xd1ur\aJ\x1br\xd40\x1c\xe0\xffg\xef߶\xd4H\x96\xadAxl\x02\x95j\xed\xf5\xfd\xef\xa07\xf9G\x02\x05,\b(H\xd8#\tz\xf4\x85\xa7\x14\x95\xb8RI \x12WA\xbe|\xf7p\xb39͜\xfa\xfa\xb6\xef\xfa\xa2\xa8\x10\xc9!\x88\xf0\x83\x1d\xe6\xc11\x83\x06\xccghc\xb2\xa4\x06\x0f\x9c\xa4\xd2\xf4]\xc3?\xec\xdeO\xbc\x99\x86*g\x1boO\xbbK\xaa\x85\x9bZ\xb7%\x15\x9b\x02ɞ\x88\x05\xc4\n\x04\x91*\x93\x10S餽k\xca)\xd6ml\xb7R\x03\xdcutV\xed\x13%k\x95\x88`\x96\xe6\x8dk\xd6\xeb\u007fv\t\x92\xf9\xb8\x18C\x16\f\x8ahzX:\x06\xcbR\xd3>\xdeQ2F\x91\x1e\xcf\x04\xa2\xcf\xd31\x871\x9f\x17\xdd[\xfcn\xea\xbd\x13Zf\x8cX\xc2\xe7\v?m\xbaW1e\x89\xdfX\xbd\xd4\xd6|\xfe\x85\x8b\x1bl\xed\xff⚱\xf2\xeb\r\x02qBĒ'\xc5_G33\x19\x9d\xa3D\xd4J\tfE\xff\x0e\x92\x11NEq\xee\xa9\tpɸ0_\xa7\xa7\x0erX\x8aZ7Ï]\x02\xbb\a\xf8I\x9a\xdc\rZ\xc0V\xb5\x01\x81\t\xa5t\xd3RDrkю\x9e\xdf\x02;\xbc\x96=\x81Q\"\xa1\xacu\xb2\x9b\xa9\xca\xf9J\xa43\xbdHk\x19\xbe\xcb\n\xbbbg\x10\xf1t\xcb6a\xa2똔M\xed\"\x8aP\xe1(\xfa\xcb5IUP{d7\x95^:h\xf4\xff6\r\x1f]\xfa\xf2\xfb\xf8\xdep\xfb\xdcs\x1f\xed\xf2J\xe4$Q\x83$-\xb5\xcdPYO\xf7\xe9=|\xf9\xb4L\xdfZiWj\x17iƾ\x91\nL\x91l\vМ\xb5l7.\xe0\x8cղ\xf0͉\xec\xf9%\x13\x1aR\v\xa1\x92\x1b3!\xc2oϙ\xb1f\xd3\xce$\xab\xb1\x05M\x9d\xe89c\xd3a\xd0Q\x9e\x9b\x9bm;\ua6f9c6\x96a3\xf3iX>u\xe3\xfc<\xa8\v\x8bq\x05l\x17E\x86\xc8m\x9e\x80c\xa1.\x8fZ\xfehT\xb7\xa2\xf1\xea%-\xd2t\x8a\x9d\xda6z/\x98\x86\xce\xe8\xcc\xd6d\xf8˸\xfb3q\xaac\x89\x92\x88\xa8aKV\x95\x92\x11jw\xc91\x1co]q2\xb0\xffN\x85\xa5\xed\xde\xe4\xc2L\xfciC\xc1t-I4l4h\x88\xe9\xb2T\xfd\xf9\xdf@\x8c\xef\\Q\t\x11\x83_E-)ȳ̐\x97TiGB@\x99\xf6B7\x1f\xba\xa3\x8c\xe2\x13\xbb{CG\xd86\x80\xa3\xfc\xa3W\r\x8c\x81dh\u007f\xbc!T\xa8]$\x11\xeaRB\xda^\x9aћ\xba\xf0o\xdfӫ\x8d\x8da,\xb5&\x8d̿&?\x84\xbd/^`(\x97E\xf7\xf3V\xec8\x8d\xab\x1b\xd3\xd1\xd7\xddb\x9e\f\x90$/|p/Ri\x8a\x0e\x0fё\x10\xb4.\xf0Cꞈ`\x86T\x19\x94Q\x1f\xe9\xbfl'\xcb6M4\x88\x91.\v\xb2\x93\xfd\x89\x18q\x1b\xcd:\x0f\xd6XNJ\xd4\x06 r\x11\x1a\xb3\x1dP\xa8\x98\a\x8b\xc2\xdc\xe8IF:\xf9Р\xea=\xc1\x00q\x00\x13\xcb'`%1\x15\xa4&\xb1i\xfd\x80\xc5-Q\x9b\xdfPG\u007f\x88\xf6\xbc\xfcc\x92hv\xa9G\n\"\xec\xda\xd0UU2\xfcykc&\xb8\xbd\x8f\xfeV`\xba\x1a\xb7I`\xe0\x85\xebG\x8e\xe1\xc0\x8bɺf\xff\xf7\xe6\x10/\xe1-~\x00\xf2\xbd\x04\v^\vF\x93d\x05:\xc0\xed9e\xf6\xad)\x8c\xbb\xb2\xe7\x88k\x9eF\b\n\x85\xa3\xf1\x99U\xa1L\x9bA¸\x85\xd5\xe8`5K\x0e\x84\xa1\xe0\xdcD[\xc7\xd6&*\x9c\u007fR*ޫCq\xfa\xf2y\xfb\x9e\xa4IS\x98\xa7Z\xf9\xd5\x03\x10Y<\x9f\x82\xb3\x06g\x1eM*\xf1\xacc\xa3\x14\x1b\xe1\x8c\xda'\xe0\xb6N\fq\n\x91\x01\xc5JA+@\x06\x89z\x83/#\xac4t(\x10ױ\x86r\xb5\xa0m\x1a\xcbJQ\tn̄\x06q\xc2\xc8\x02\x1aA3M\xc1!V\x02D\x9eY&S.\x164\x8b¡\xc7\xd9\xcc\xd0#!\xa1bE\x05oԑ\xf6\xd4\U000362be\xa26dG\xa1O\xb8 ߇E{\x86:\x8a\xb2\xec/\xd8b\xd7H֒\x01'\xabL\xb5\xe5\xac7AEP\xc0\xbd\xea\xcc+\xd85\xbd\xa44\xa0\x93\x94\xfe\xfe$\xe2\xc19\x8bZ\x9f:\x84\x1a\xb0\xd3xS\xf4\xde\r\xa0u!\xf9ݠ\xbdC\x1e\x89\xa4E\x03\xaf|\xdc\xf6\tӠ\x05\xbay\x92\xb7\xae\xac}9\xf6\xbd\x93ʻ\xccl\xb4\xb9\xbbB\xabA\xf6\xdeM\xc1\xbd\x91\x0e]\xde\x03\xb8\x0f\x16j\xe5\x82\xfaR.\x90\x01w|\x19\x98Y\x1e\xae\xa8\xfaAK}L7\u007f\xd3\xe5e\x00D\x91\x98\xa5\xee[s舆\x04\x99\x99\xe6\x8bY\x8fzr\xa6!\x8dr\xcbM\x04\x89\b\xca\xfc\xb1\x1b\xc0\x9a\xf2\x1a\xbf\xa3\x1c\x8b\xe2*\xad \xd8\xc4\xc2\xe7`\xae\x05eO\x90j\xb3\xfa~8\x96R\xe2\xd2;\xab\xe1\xf4^H\xf2\xcc(C,\xe1)\x05\xb3[J⨁R^k\xe6\xc9LZtf\xe4}'\x9f\xa7\xfe\xeeG\xdeEm,a\xae\x96\x19\xc2\xf4\x0e\xd6\xd4)\xc4\\\"\x10Q|y\x02ѫ.\xc7Ziv\xc0\x98`V2}7&v#\xa4\xa7U\xf8Qfe\xec\xc2\xd1\xd4,\x0f\xb5ei?w\x04\xd6U\x16_U+>\xb4\xa6\x04j$\x9a\x05Y\xfa@u\xaaVG\x87\x96\xc1\x93;쉙\x93\x95\x03kj<\xa0\xad2%\x96tBz#U\x9eYał\xd0`\x15\xddvt̥\x83>\xeaM\\z\x9e\x8cǤ\xc2\xf2\xb8*\xab6:A\xa0E\xbbE\xe8H+:\x19\x93X\xec\xb8\x14\x81\xe8+snK\xa3\xfe\xb27\xac\x9b\x15\x12*\x85F(\x11H\x12\xff-\x9a\bj\xa8\xb1A\x1a\x88mrK];\xd7O\xad\v#\x05\xae\xd2n6$!\xc9c2/7-\xfe\xe4(\x9a.H\xe6P(\xb5\x0362\x953\xe8,Q\x89N\xe7\x1dٹS.\x9a\x98\x18y\xc1|\x02\xedrR\xe8K\xc8`\xd9\x06s\xe5T\xadW\xe8\xfe\x90\xa6\x15Y0\xc7Zd\xee\xa6S\xabQl\x83c۴:5u]23\x04\x01`@\x16\xbd\x1a\xfa3ڭv\x06}\xdd\xc6;\xd2\xe5\xd8\xcb\xdb[sN\xa7\xbd\xb02,\x91\x19OX\x17 O\xdd\xfd?\"\n\x8a\x92\x89NM\xc8g\xe9\x03G\xf3\x04\xe2\x1b\x83\x8b\xffG4\x87\xbc\x9c\x80\xdcl\x1b\x8d8T,W\xb69\xb8I]\xf5\x886\x15\x03\xac\x04`1\xd8\xcf$\xf0|\xde\x1c\xe2s\x82\xe6\xdb\x1eF\x04\x12\x81̌\x83\xaf\x9a~\xe1\x88\x1fи\x8f\f\xd8\xc0\x8f\xa6J_\xf4\x9f\x01JkR\xd9\xc7\x144ӈ\xedO\xedt\f\xc0}{R\xd0\v[*0\x1f7ƥ\x89mL<Θz\aB\xb6\xe59P\x91X!\xcc\xc8\a/\\D\x87\xf6+\xfa\x92WZ\xf1\x05\xf3\x04\xf4\x808\xe1\x04\x93\x98\xba\xeb\a.Z\xfa\b\x16͋\xa1\x1b\x00/\\_f\x81dx\x16a\xec^\xda\x15My\x15J=Blu&r>sz\xfe\x9d\a\x1e2 \x02\xbeU\x10\x89piE\\\xac\x93\x8bP&\x8a\a\xa2ɶ\x8e&\xfb\xb7\xf5v\xb2\x12\xf3@w3l\xb6\\?\xea\xae&\x17\xbd\x19Zl\x03\xb8\xa1\x94\u007fD\xa1\xd7N\u007faM\xa1\xdf\x1e\x05\x1f\xa3\x97\xd8\xc7\x17\xe5\x1dQ;7|\xb8fm\x04\x9bj0\xefn\xcaJ\xefi\b%\xa4&墵~.\xbb\x1b\xf3\x96\xe8\xe3\x00\xfb\x9e\x98(d'o\x89\x06\xf9\xd8\x1c\xccCZ;.\x92k=\xb5\xac$\x04W\xec*\xf9Z\x02B\xde \xa2B˨%\xddJ\x12\x1aQ\x06\x97k\xfd\xd8\xd9\xf2G\xe5\x95ed\x15Vs\x03\x1dN+\x83UI9TE'\v\xc9d\xa9\xf4I\xf6\x88L\xdbu\xa3d\xf3\xdcGGܠ\xe4>vf_p\xc3~Y\x03\xb7-\v'\x92A\x17\nk\x13[Ȥ\xd8Y[ԡSK\no~\x8f\xb1\x90\xd5\xc0\xf1\x83\f\xa2\xbe=\xf1\xe8#W\x19/S\x88\xe4\fl1c\x9057T\x11\xeb,\xd0C\x148C\xedmJ\x1d\x9b\x0e\x13\x00\x00g\x92\\h\x85\x15\xbb\x15\xf1\vjM\x1b\xb9\xad\xec\x10\x12Rv\xb0v\x15\x17\x15F\xea\xd8n\x049%Xw\v\x92\xeaG\x90\x93f\x85\"\x8bH\xa6\xcbr \x05\x94\xadA7w\xb1\x90\xc5\x10\x8e\x1b\n7S\x1f\xcb5\xd82\xb2\xe1벯\\h\x87\x0e/\xac\x9b\xe8\xee@\x1a\x11\x90pl-\x1d\xfe\x0f\xdas\xbb\xa2\x8dՕ:\x16օP\xb2\x85l\\[\xc6\xf0\f\x0e\xb5\xbe\xaa7{ꑞB\x0f\x8b\x0e\xb0\x86<>\x93ww\xfa\xc1:\xa9V({\xe2f\xac\xcc.y\x9a\n7\x06\x91\x88\x9bqJ\xc8B\xb0\xc3\x12\xe6I\xf6.:\xd6vg\xfe\xeb\\0\x17\x11\x8d\x1e\xc9yj\x97\x1b.\x14\x1bu\xe31\x06\xdd\xd64#\xf4\a\xaa\x14u\x8e\xdb\xd5KcKd\xe9F\x15\x06J\x0f\"\xf7\xa5\xe7\x95\xd9ZS\xabf\x82\"\xb1\xd6\xc6\xd7vh|\x98\xd8\x18Ǩ\x86t\xc2\xe3\x9bP\x93\xc0y\x83\xfa\xf1\f}X#T[\u007f\xf3\xec\x9fB\x18\x02a\xe6,\xba_k^\xca\xfed\xf3[\xe3i\xaf\x95\x1b\ac\xefN\xd6O\xe0CX\xc9X\xf5\x9b\x0e4\x9c\xa8#u\x93dt6\xaea\xa8;d\xed\xb2&2\x1d\x1eX\x02F\xc7|hj\xc9Ng\xd4B#-\xde\xd9f_C\x98̀=\xc1\x9aV\x13\"\u07b5l\xb1i\xbd\xd7DI<\xfd\x10Dx#\x97\x92\x821\x12\xc1'5\x8b.\xa4`\xa4\xa2\a\x84\xa1\x0e\xb8Yk\x06\xbbk\x9e)\xb0\xf4\xb2\xaaKg쩔\xb9\x82\xdeOR(\xa6n\xbd\xb3X(\xef\x03\x89\xbe2q\x83\xa7\x16\xe7%\xf9\xfeڽ\xe9>M\xc5mVT&Ƭ\xd5}\x1a\b\xfcwf\x89\x00@/\xac1\x9a\u007fCc\xb2\xab\x1b\xc2|\x8dx\x00ܭ\xaaBD`I\x11\xfa\r\\qZ\x85\x89\x9c\x0f\xbfJ\xe5\xe0\x96\xd0\xdd\xdai\xf4(I\x85\xc3\x0f/\xa5i\xfe\x16\x89\x93\xa1\xc5biʣ\r\xa7)\xd3\xf3\xb2\xe3$\xe2Sc\x8a\xe3\xd4w!\x05~\x19H\x9fw\x00\xb1&\x9ahZMk6\xac\x8eJ=g\x01\x10\xd4șs'ǥOW\xe3$2\x04\xb9\x1b\xf7Vw\x99\xc0u\xba\x03'(4ӥ\xc6\x1a\xdf\xd5oF\x1a.\x18\x96\xc6\xcfXX\xe5qk\xdd,nE\x8e^\x9a\x9a\xab\n\x9d\xbf\xa0\x97\xe2z\u007fu\"T\x1d\xed\xba\xc6j\x85&\x9d;%3NT\xa3Px\x18yc\xb7\xa0\x03*^\xa2\xf3\x9ch\x1f\x9c\\\f\x12Y0\xb9\x0fkF\xaaC\x95\xad\x17\r\x8b\xd5\xec\xee\xc8\xfdY\xc6\xc4\x15S\xf3\x84\x15\xfaU5\xf1'*\x19\x19\xb8m\x98\xe0$\x88w\v\xb6\xe2\xb0\xd9ɶ27N\x021\xac\x86P\xc0\x13w\xd8\xd6R\xbdg\x046?i\xda\xd27\x9d\xb7\xac\x04\x8eUz\xc9\xf9\x06\xe8}\xea \x815\xba\xb5\x12\x82y뫴\xce\xd6\x14Y\a^*G\xedbj\x8d\x19\x01\v\x8d|\xb2oL\xcbME=\xb1\x17Rl\b\x88\x9d\xbad\x15\xa2u\x875E\xebW5&\x9b1\x8bX\xc22q5\xd6\xcb \x1aܘw\x92\x8aޙ\x17\x8e\xdeU\xb9\t\x1a9Դ\x80\xd6\x19\xac\x88\x02\xea\xc2vF\xa3qaq\xa9\x1dAy\x8f\xd1\xc5\xd8\x1dT\x1b\xfe\xb5\xa8\x9f˂\xfc\xd8\x16\xf8\xa0\xb1\x0f\x1d\xa1ɯ\nEm\xd1\f0k6\xedd(\x10\xb0\x0e\xa6U\xe3y\x9b\x8e[ŁM\xd9\xf2<\x00\xc3G\r\x9d\x82~\xef\x00\xc0|\xdb\f_<\x83\x11:|\x9f\xa2K\xdds\xee2͢9ڑ^\x19\x94\xa3\xf4e\x8b\xaa8\x05\x85JC\xb9'\x8b\tf`\x15<\xddǬ\x881\xd5]\x81\xf0\x134\x9b\xf9o'Ė\x9a\xdal_7\x06\xebzD\xc9DV~q\xfd\xdb\x1c\n\x9a\x19 \xc3\xfe\x13}}Vl\u07b4\xbds\x04C\x03RƊ\xac3\xe3\xd6\xfd\x1dw^\xacr\v\x0f\xe7\xc0\x0e\n\xe9\x88T*1\xa2\xb0\x93C\xc6e\xb2rE\x91\xd52&\x9b\x99/ {\x04\x81R\x9f\xad^\x12\xbb\\\x86\x8c\xb4\xd68\xd0\x1fO\xe6f)\xa5PA\xd3x]ZO͠\x1aڞ\x1fP/\x049d(/\xd3\xc0\xf5ط\x9e\x1b\xeb\x92&\xa3\xb4\xb7\x94\xba\n\xa7\xfd\x0e*\xb9n\xe0\x9b\xf42\xab\xffs4\xbd\xd4Ό\xb8U\x9f\a\xbf\xac1\x82\xef¶\xcd\xc6e\xd6e\x0e\xfc\xfeg\xf7\x91.D\xdds}\x94z3\xb4\x97I\xa8`\xd1\xdfbQ\xb2\x18\x04\xc06\xf6l\xb4\xb9CЃ\r\xdb$g\xea\xba\x1e\xc8Sk\xfe|S\".\x1e[\x9b\xeb\vn\x85\xa4\xab\xaay̾Фڹس\xf7\xa3\xcbœ>\x94\xa6,\xf6h3s\x17M\xf7B\xa5;\xe8\xcec\xd1\xd2\f\xe4D(Z\xd7n\xfa\x1a\r\xe2\xa7\xd3B\xe1\u05f6mI\xfeQ\xd3\xcf\t\x89\xa3\xf9N*%\xf3\x9f\xf1M\x93\n\xa7\x9f\x9a\fl\xe50\ri\x93\xaa\xba\xcdɴS\x1d5\xa9\xe3\x11\xba\xd4\xd6(k\x18{\x81W\x99\xe7\xe7V\x8a:\x9f\x96\xc9\xc42\x1emc\x98[\xf64+\x9d\x92ͭw\x8asèxd\xf0\xa7,>\x9a\x18h\xac\xaa*z\xda\xfb\x00sY702\xb2\x14\xec\xe4~y\x8d\xa1\x03\x8d\xb7\xe3\xf2\x1f\x8f\xe6\xf8VDd\xfa\xee\x02k\xa9WU6\t\x17\xb2td\x90\xba\xeaE\x1bK\xd0\"H\xe1\xcb\xffo\xfb\x9e\xde\xda\xd7p|\x13\x96\xe0\xcaゕ\xb7VP\x90}`T\xab^I&I8\xa6\v\x1b\xd4+\x955\x1dT㋱f\xf5Ǚ\xf3\xecN\xabro\x84Tb/%\xd24\xc3\a\xd7X\\\xd9\xf6Iǐ\xa0%`\xd3\x01\xdav\f.t\xcd\x19\x89\xbd\x19\xf5E\xede\xd2\xdf\xd5XH)xLes\xac\xf6\xfb\xff\xbc\x1f\xa2\x14\xc5V\x91\xd1߂\x92j\xd2\x02\x96,WX\vZ\xd0\x18\a\xb2\x9c%V\x9b\x98\xd1HC\xd9(1X1\x04\x8f\xba\xaau\xaa\xdb\xc1\xda\xdfBe\xccX)H\xf6(\xe5\xb1-(9\xa8\xa0\xb4\x1e\x8aS\x19d\x17\x9d\xbc\xb2\"\xd2y\xe2}y\xa9\xb8k\x98$ՅQ\xa2\xb7$\x11˶\xa7Z\xed=\x99\x98`*\xe4\xc7ULE\xfaခx\xddQ\u0590\xad\xa1j\xc9N\xfa\xcfk{\x84\xb3\x16\xbc\x83U\xf0\x06У\x01\x055u\xc2=\xb5\xa8nc\x1a\xeaYK\x92\x94G\x98\xedLP\x13\xa2~\xa9p\xdc\xf3y1XA(&\xa7٘\xf0\xa5v\xa9iv/\x95N\xd9\x00-\xc4i|\xdeʀ\xc0m)L3\x16\xf4\x15f\x8e\xbf4\x84\xbaF\xc1\xb2\x01j\x1b\xfe\x9e\x88\xbcB\x8f\xfa\xc1$a:t\xab\xa1\xac\x87\xfc`bV\x85\xcbB?h\xea\xda!Ӷ #k\"d\xd2^@\x04\xa9J\x9e\xb7\r\xe5\xca˙m\x0e\xf0\xb6f\x04+e\xce\xe4\x95z\xf7\x89@\x83\xab\x8e\x85\x11\xe2\xa7Mr\x03\x9f\x01\x9bQ,\xb2BAl\xea;\r\xe8\xf2!\x9a\xfa+\xb4Fװ%\x1d\x98#\x8d\xdax\xec\xe2?\xf0\xb2\xf3\xe4RĶ'/LK\xc26W\xfb=\x86\x9b\x95B\xf80\x99\xe8\xd8\x19>\x9f\n=\x9aR\xebK\xae\xe2\x93!\u007f\xd5\n\xbbЬ\x97Eta\xb6\x1e\xfc\x93\xf5Q\x8c\xb0\xe7\x84\f\xed\xea\x0f\xe2\x9d\xf3\x14\x1a9\xc6\xf3\xa4\x1a\x9c\xb5\u00ad\xad\xa6zO\xf6\xcf\x11\xedM\xf4\xde\x19\xbf\xd7J\xf8\xb6\xb8M\x89\xe6\xd7\xebNF\xc0\xc2M\x01\x87\xb4\x03\x94a8e\x01U\xf7r\u0558\x84\x1d\x12\x8a\xf4,\x06\x16}\xe8\xc6\xf2Q0\xe9\xd17\xfe[\x94f]\xd6\n\xe3gD\x04\xdd<\xb9a\xa6\xba\xcb\x06\xfbg2?\xe4\x15\xeb/B\xda X\x8cr\xa0\xcc\xe5\r)\xee\x1f\"\x9b\xdfc\xc1\xc4T4\xbdWr֬㖢\x86{/\xa9\xcb\f\xd8X-I\x96\x99I\xa0\xbd\"\xc4:՞\x92La\xacO\x13\xd6\n\xe4#fl?\x1ae}b\x0e%\xe3D\x1a\xa5\xec\x95\x01\xfc5\xa0\x9eZ\xdb\xee\xd5\xcf2\xd1\xd9\xf2ɽ\x8dd\x14\x8d\xd8\xea}\xb2 \x1e\x908\xb3\x947\xfet\xa3\x12 \x90c\x1f\x99\x9b\xf5\x8e:Y\xd2\xd7\x1cF,H\xf0\xd6F\xa5[P\xae\xf3VCH\xb6\xed6f\xe9\xb4';H4\xa76p\x81\xc4B\xa2\x95RhPJ\xac\x10ʶ\xc5]\xf6S;>d\x17\xdd\u007f|\xe2*-;\xf3\f\x11l\x97\xcc\xe1\r\xab\xdbR\xa0\x9b\x9b\x9b\xc9\x006\xd2$34\\\x98AQ\x80ʎ\xb9\xe3\x0f\b\x8d\xd4`Ia\xff\u007f\xb0\xe3\xfa\xa4\x02\x87f\x14\xeb\xfe\x1a\x8c\x1d\x04'\xb2\xa0\x02\x01\x04cw\x84s\xdc\t\x8b菑>\xf3ڗR\xa3\u0558\xde9\x9b0\xce\x04Ջ\xa6\xc1\xef&u_~\x1f\x1eb|\xb7\xaa\xe1\x93\xfbJ\xae\xbc7\xeb\x06\x02Mb2\u07b2s\xff\xd4:XX\x99\x81\x06\x81\xa6Lm\xeb\xb2\xe6SE)\xf4\xfe\x80\x80\x91+\xb1`\xe0>\x11)9,b\xd3&\x1c\u0379\xaa\xa5\xb2\xfc\x1a\xbdz\x91a\x00ۋ\xb2U\x02\nCbF\xe9\b\xf6\x03Q\xdd[P\x94\b`\x19P\x89\xa3\xbb\x8cD\xe6\xb8&\x96\xad?\xf0\xb1\xf0\xb9@\xc7:\x85\x02]Rԏj\x0f\xc6t\xe8\xa8\xe8\x96F\xc3\r\x8dI\xa7\xa9He\x98\xc4>&@\xbek\xb2\xf8ɁK\x9d9M\x1d\xe9Lͼ\x03\x15߀һT\xa9\xb7\x1c\x1c\xd8q]\xdeLjk\xa9\xf0M%(\xfc\x81\xf5\xf7\xad\xf1P\xf5\x9e\xe1\x17\x0em\x12*\x92\xd4\tM\xe0\xfd\x17\xccg\x1d\xabz\x89\x1fL!n\xe1h\x1c\xb7P-\xa5/\xe1\x84\b\x99\xfa]\x14\xee\xae\xc9\xd3HUy\x84\xbc\x9b2;\xbc\xe1\x1b\xbf\x92B\x93\xb5ʗ\x86\u007f3\xf2\xa3\xcc4\x17|\xeb\a\x80\x99\x87 U\x14\xfd 3\x9d=\x16\x9c'\x14?\xf2\x8d\xda$\x83JX_i\x06o\f\xed\xb0l\x10\x9e\x82W\xa49$z\xb2\xf4\x1cH\xd4\xd3Q|\x80\xa0\xecF\x89|\x14\x8cI\xa3u\xb0d!\xd5\u0089\x93\x01B\x816\xb4\x17C\xb6\x81M\x01\"1v\xd1\fe\xa8\xe0\x84\xd1-\x1a\xc6\x02M\x8bmQ\xa3Q\xe8P\xa4\x12\xba\xee\x97\x12\x9b?\x85/\xff\x1e\xb5\xaf\xe1%\x9dÛ#\xefᖮ\v$\xe5\nU\n鉠\xd5\xff5j\xdf\x0f\x11o\xfc\xf7\"\x9ey\xfci{\xe8\x8eE 즫y_\xf9\xf7\xb4}M\x97.\xbf\x16\xb1\x02\xc7\xea\xf0\x10\xbf|ބsxmy\x035\x0eX\x81\x02Ώ\xc1Ʃ\x9b\x85̋\u007fo\xda\xe3W=\x19H\x87\x98B\x16|D!\x1a-\xfd\xee\x05\f\xdd\n\r!U\xcd3Q\x00\xe2\xa9\x00j(\xe0:\x13\xeb\xb3h\xe1d\xeb\xb8'5\xe0\xd6\x1f\xc3Ms]\x98Y\xdfu^\xf3j\xc1Lp\x03~'\xf2`H\xd9\xd6P\xd8k\\1\x18\t۲0qk\x8a\xdd\xdb$\xf7m\xbbW\xa1\x93\x91{\xa6\xa0\x80,a\xe7\xd6\v\xe9ڬo鮸\xa6\xf8Ȏ\r[\xae\xfb\vV\xfc\xc6\f(&\xad\x9f\xcc̜\xf8\xd6n@4&\xfaX\x99\f\xe1\x04\x87Z\x84\xa9Oj\xfa\xa0\x88\x1e\xf9ҁ\a\x10\x92\x87.\xf0\xdf\x10\xceת\xaa9\x88\x90\xa2\x15=\x05\xe8:\xaaF\xe9J\xe5sߙ:\n\xa4\x84\xca\x06\vh\xb5\x9b&\xa1L\xfbQ4\xfdf\xb96\xa3\xc2%j\x86\xde;\x8d)\xef\x8b\xc5\xcaӭa\xa8\xaa\x8a.\xf9c?o\xc3EgC2\x156|\x00\xd1\nfS,\xb3u\x84\x14Y\x01\x9a#\xb6\xe7Ʉ\u0558\u0382~)\x82\x8e̫v\x16Y[B\xd89iM\a\xb4C\x16Ȯz\x1e\x16p\x003=\xb6\xf6H\xbf\xd8\xc0ۘZs\x80\vN\x1a\xd1F\x16E\xc0\r\x951v\xf6튮\xf3\x13\x96\x15\x86\xec\x1e\xac9\xad\xa0\xf2I\x97\xe9-\xf9\xaar\t)\xe0U2\xac\xa9\xe4\x14\n\x05\xa1;{'b\x85\xb1\xa0\xb8X\vh]\xb1p\xf5\xd2&Wc\x8b\x0e\x1c\x98\xedy\xabi\xc1\x9d\xd4\x04\xc0'Hk'$>\xceL\x8ce\xd5\xda\x1f\x1et\xc8O\xad\xc32\x884,=\x98`:\x99\xa9l\xbb\x14\xb8D\xc5 \xec[$OSG\n4J\xf8Чf\xd4,\xbek驀\x8e\x95\xe9\x80\x18\xa3f\xf2J\x11]\x1dMB\xa4\xc7&\x9azj\xdb&j\xf9\xe6 b\xb2\xa2\xf6\a\x88\t\x8c(\rmB\x842f\x06\xa6\x14G\x10\xc2\n=J\xbch\xaa\xfa7r\x93$Y\xcb\xe3\xf1\xc1\xf5c\x9a\x02\xf3\xabmRœ\x8d\xa9\x92\xaaQ\xe6\x8a!E>}'\x9bBk\xa9\xe0\xf8Y\xd6JMV\x16\xf2'\xe6\x01Q's+\xea\x98\x12\xc8\x1f&\x10dZ\xa4{\xf6\xfe\x8e\xcb.Xm\xf4\x99Ej\xa7\x04X\xa4\xfd\xa3D\x92\xf3\x8e,\xac\xb1\xb5\xbb47\\\x14Q\x99\xd6\xd7\xd4\xe0\xd3\xcfUe\x8d\x17\xee\x17\xadTO\xd5&\xb5\xc5\xfbO&zM!\xe7\r\xa7\xc2CK\x82\xfe\x88\xb2\\\x14\x1c\x9b%\xf7\xa9\xf2:\xf2\x82\x12\x91\xfbC\xba+\xa3\x80s62]\xa5\x11$\x8d\xa4\x8c\xa5Bk\x8a4\nLJ\x06L\x19Py\x91Lgd6\xd7\xf6\x01\u007f\x9c\xa9\xbb\xbaK\x86\xc5@\aK\xe9\x1d\v\x8b\xb1\xa1\xb3\xd1\x18\xbc]\xf0\xa1\x18s\x8bP\x8cB\xa7\xa5̒)pMC\xc9\xf1\xe0\xdd\x15e\u007f\xf9&ٰ\xfc\xd2\xee`\xaa\xaa|\x91\x02\x15\xc8X\xdb\xe4xuuظH\x9b\xd6\r\x9b\xc0&$k\xc45\x84\xb7\xf4j\xccHXg\n6*X\xbb\v\x1a\x83.\v\xbb\xf9Y\x84\v\fHO\r_\xb4\xa0[Ǝz\xbd\x9as\xb2SqW\xc5\xd3ʨ\xb9\xac\bE\x1a\xfen\x1dx\x92⬹SA<\xddg\x17\x85\xc1\xe7\x1c|;\xd0\u007f\xe66\x83\x80N\x10]\x15\xc6|\xbc$\vG\x93/\xecw\xe7\xe5Ψ2\xc62\xfd3ч˄\xc7\x14`<4\xc8\xfc*\xde;\x9a!O3ގ\xeeF;\xd3x_Q\xf9o\xe4\x95D|>\xe0\xbcf{\x01\x06\xbe\xca\x05\xa2\xf4\xac\xec5j\x0f3pj\xb5\xe21M\x94A\xf2^\x1b\x1a%k\"*\xf4\xc2\t\xa2~\x19\xef\xc4r\x15\xf3\xa7\xc8\xfc\x85\xd1\xcd1\xe3j\x9b\f\xff\xa8 \x17\x02\xba\xa5\xde+b\xb7\x05\xc7\xef\xd0\xd4m\xd4\xe4\xd6{\n\xb3x,\n\xec\x1bc\xb0I\xb8D\xa4\xbfet$\f\xeau\xd3U}f\xab\xe7\f\x80\xe8\x8el\xf5\x87x\xef\x9b){\xfd\x80&`H\x1a\xd6\x00\x96\xefc!\n\xbb\x85\xe4!\x11\xe4&\xf0\x86%adݵ\r\x152\xb5\xc6[\x97\x02\xd1K3\xbc\x9f\xdf-\xd6z\x11fT\xf4\xed\xfd\xa1\xf4\xeb\x15yw\r[\xff\xc4\xe1\t\xaexd\x12O\x8d\x99=\x8c\x19Y`\xbd\f\x90!\xa6\xa5\x8b\x93bG\xd4\xf9G\xca\xf1\xc0\xfcb\x91\xa8\x1fB\xfa\xb1H\x05k\x92\xbc\xfa'\xe3\xb4\x06\xe9s\x00$\xb8\x06\x9b\xfb\x00c\xab\x9a\vm\xd1\t\xcdO\xfe\xfep\x0e/\xe1HY1tq\x8d\x88\xc4\xc1\x95\xafU^\xfe\x96f#P3\x18|`\xfbu\xdeZk\xaaqե\x15\xfd\xb6\xf5\xbaL\v'$\xda\xf7\x98\xe9W\x1b\xcb\u007f\xe3d\xb4\x89\xb36\b)\xa0dS\x86\xa4\x06\xa8\v܀\xf5w\xfe\xc7 j\xf2\x90Ͼ6%4R\xcf\r)*\xa3e\xceB\xae~}x5D\xa4Q\x8f4\xd4\xdft\x8ew\x83\tNk\xbf[\xcb@j$=t\xf1@\xa7\xfb\xebB1c\x9bM\xd1\xd3\vӝ(\"\x9d\x1a\x16r\x1b\xb3\x1e\xd6;\xae\xfeP\x06\u007f\x86҇\xb2\xe6\xbcގV\xbbH+\xac\xa9\xb6\x8dj`cP\x84\x91i\xa4o\xd9D\xc75\x1aX\xd7}\xc0\x8eN\xa9P=*JЁ*\xd9K\vz\xf13FnI\x96\xf3\xfb\xf6\x153\xcdg\t6v\xb9\x17\"qa\x9d)\xb0=7b\xf9)9\xbaTC6\x86\xd7\x1a\x98\xef\x917\x9d6F\xe5\xa0)O\x8b\xd3,\xa4\xcdV\x06\xf3\x94R\xd1(a\x86˯\xad)_\xbb\x8e$\xc3X\x81\x9a\xfa\x91Rrֱ\x8d.\x9d\x8aĬcY\xae\x88\xd4n\x1a\x18]f\xd1A\x143\xdd\x0f\n4dd^\xce\f\x92\\c\x93\x00\xcejt\x8f\xb6b\x9ee\xfd3f\n\x12\t\xef9\xbb\xa4\xaaX\x93\x81\x88\xd5X:\x19H9\xd7\xf1އ\x89H\x1cU\xd1ׅR\xd3R\xc9\xf5\xe6X-$\x99\xd3\xf4\x94\x1b4Kf\xd4\x13ɓiEL\xff\x03\xe1\xab\xe6\xf9\x86\xe0xa(\x05\xb9Ɏh\x14\x92\xd60\xdc[.\xb8\x88\x13*\xfaH?\xc76\x8aV\x86z/\xd6=\xe8\x9d\xeb\x12i`\xf3Ir\xb9\"\x9b\x17n\x17\x91\xdf\xfe\xe8\x18t\x01El\xa0\x19\xb4\r\x8c\xab\x8c\x1a\xb23\x86\x8eY\x86\xa0\a5r0\xa65\xc9\x11ד\x19\x05\x85\xd815\xab\xd1Ɣ?m\x92E\xf8{蓠ln\x81\xfa\x86\xb9(lF\xa3\xf5\x8eY\x94\u007f2\xa1\xf9U$\xee_\v\xfc\x00\x11ө\xc0\xedQ'h\xa6Gà\xb1\xba\xa9\x8b刹\x97\xec\xe0ۂj\x8c++Zg\xb5\xd9(ђ\xf0X\xfaș\x8d\x15\x81\x1b\xc4!\x93ʮ\x89\xfe>\xdaP\xa4\xff\x966\xbd\x9e\f\x98\xd2p\x1dR\x8e\x17\x10N\xc6\xd86+\x1a\xabd\xfb\xefՎ\xd6F\xcbYB\x90Q\xe1-s\x0fo\x92s\xdd6&\x93\xb3\r\xe6\x9cE\xc9$TK\x96\xd1U\xf1\v\xc0\x9cz\tX)\xe9\x11a\xba9 Q\xd0\x02;\xc06\xa1\xff\xba\x81ڰ\x94\xb8\xf6,\xe3N\n\xed\x1f3QYF\xc3ɮ\xa3\x1b\x9b\v\x94bJe>A\xd7;\r\x1a\x94\xff\x01'U\x83\x118G\x17\xdaPBd\xbd\x88U\xe6\n\xba^z\x83\x17\x8e\xcd\xe3)\x98z\xc4\xde\xe4!\xf6\x87B&\xc4n\xaaXTP!\xd0I\x92SȆ\xf8\bpc0\xb9\x1a#\x83\xb1\x12ͱ$o\xcb\xf4'\xd0\xca\xceO\x89w\xe9\x01lm\xcd\xde\xc4Y\xcd\fY\xad\x99nN@\x1b\xea\xec*\xad\xb5\x86\xf4\xb0\xfc\xa0G艘T\xe9\x80\xca\x0e\xfeSE\x93\xb9\xf6 A.\xfc zy}\xef\b\x0fm\x0ep}\x90\xf4D7\xe1Y\x04\t\"\x9a\xa4\xb4\tv\x01-\xb4\xf3\x82Ĉ\x9d\\\xf0\xaf\xf6\xd1\x01 \xbb\xe4\xd6ǜ\xbc\xe6\xe9=\xa1(\xa2\xcc\xe0G\x97\x03k\x88ޛ\x1b\xfdCg삟d\x1c\xd0M*\r\xff`X\xa9t&\xfbeܧֱ\xa0\x96\xa1\x98\xb5JwB\xc6\x18\r\x1bs\x92\xf5{\xbc\xa1˦ή%\x8d\xc4\x06\x91v\xab\x89`\x02\xa3\x05Z\xf7AW#\x8b5\x1f]A\xc3{\x9b\xa2\xca\"\x06\xc11Y\x17\xd8\xd1\xfc\x10nh\x92\xb9\xa1\xb0\xb6\xe2\xda\xc4\t\xe2\x165eI\xb0\x916\x81\x8eE\x8a\xd4m̺Z\xbe\x90\"\x00\x1d\xc56G\xe6\xe2;IT3Η\xdd\U00063c88E\xab\x00\xf2\x0f($\xea\xc55\xcfRA\x12\xeb\xe2\x89\xf2\x91\xd8\x15+\xe3\x06fE\x029\x9a\xb8#\xe3\x88\bU0VT!E\x12$`8\xee\xc0\xee\xc5\t\xa9\xa2jc.\xb3\xfacff\x9e\x06\\\xbd|\x8dky\x1e<\x11\xd0BnI\xf0\x1c&\xeb\x17\xef\xcd@Q\xaf\x15\xcfB\xcew\xef\xac\xeb5ОJ\v\x97\xbdw\xdc\x15rx\xc6\xefX\x1b\xe4uR\xbaG%B\xb3fw\xdeހ0k\x901(\xfc\x15Y\xd91\xd3\xf9͝\xc0\x14!\xebEk\xc85\xb46\a\xf3VZ\xd3'\x008)\x97\x8c\xb7\xa0\xd4cC\xbd.\xc2\xed\xc3p\x9c;\xda\xd1\xec\\DB\xd7\xd4\xd4\xe1\xb5m.\xbe*\xa9\xfa?\x97\xf7\xf4\f\xb58\x17\xadϋ\xfd\xc64\xb1X\x014\xd4 \xbc\xb2Y\x06\x94\x06\xfb\xa4`=\ra\x93C\x96<6\xafQg\xe4 \x96\x1a%^\x1fѱb\x19衐\xe82C+\xe8\x81\r3ټ\xc7\xe8\u008a\x98\xb7d>\xa3`l~\xecS\xfbV\x1d\xe9\xc7ĺ\x8e\xcd-\u007f\xd2\xe2_\x10_\xd0d\xba\xbfio\x8e\xfe\xf4h\xf2\xb7M\x97^[\xcecI\x82'\x90+q\u05fc\xc2\xe7E\xf0\x8b\x18\x9dbz0*\xfcz%\xbeZ'\x9a\xf2\x8a\xe7\xc38Xлw\x1e\xf4L\u007f\x15jyCWnTg\xfc\xe0\\jJŚ4$T\xa6\x1a,K\xc2\r7\x14\x8f\f\xec\x89㎴ \n\x02\x1a#Dnқd\x97IǕ\x01.\xb1onyvD%t\f\x94&\xde\U000d81d7\xce\xf4H\xd2\xf1K\xef\xcf;\rMgú\xdc\xfe\x9dn\xe1\xa4u\xc7\\\xa0\x1b\xe9V\x80]L\v\xc6\xe8\xc3\u03a2\xe9\x89\xef\r\xa89\xe8(\xc6D\x18\xb1\xe6\xe6\xe3\xb2\xc11/\xfd?\xed5\xb0\b\x98\x14\b\xac!\x94\xa7`\xa1\xaf#UE\x91\x13\x96ZL\x86G\xf7\xc3fI\x9c7߭\xb6\x1c\x16\xb1?\xb4w\xee|ŵ\a\xbf\x96\xe1\xc9\x13\x9d\xef1i\xa9\xffk\x9et.\xdf2vQ\x12\x82M\x1cv\xafcnj\x8b\xa7\x94\xf8\x14v\xb5p\x05\x01\xdd\x12T\xf8%\xbe\xa2\x10Kv\x14]\xb9\xdc{zb\x16c\x8f\xc9K\xf12\r\xc5c\xbe\xbc\xfb\xba\xa8k)@y\xa7@-\x01\xc6i\x0e\x922\xd4\xd9(w\x0f!r\x9a\xad\xf0:H\xec-Fs\xf4\xa0g\x91#m6\xad%\xfcjQ\xa1\xfb̈\x15\xf5\x85\xc6^4\xc3G5\x1d\fک\xe9i\xe4\xd9(\x12\xa8\xab\"أ\x13\x9cF{\xd6C\xab)k\xa4\xc2,C\x15\x16\n\xef\xe1\fi5Y\xb2G\x84\x01\x86\xc2\xd2F\xc2\xf4\rg:\xaa\xd5#W\t0; \xf7\xc6St\x10\x02\x8bR\x19g\x93PsPĖ~\xc7\xc8ƚ\xddm\xb9*\xd3p\x816\x9a\xe9W\xeb\xfd!\xcbd`\xaa\a\x12\xbd\xcd\xdb{\x1bݚ\x1eEh&:Ѽv\x91x\xea\xe6M='\x155\x9a-:\f~U\xb5\xbc\x98\xcfI\xc1\x1a\x1c\xd0\xfa\xe1c\xe2\xd7Q\x92\x9e\xa7\xef&}\xb0-\xcb8\xb8V\"\xc2\xe5-L\x95\x04\x13\x92\xde\xe6\x10\x8f\xef\xce\r\xae\xdd\x06\xb8I\xb6\x14Kͦv\xc9H:\xa3\x92\xb8\xa0\x02d\xc9u\x96\fk*\x91\xd7\x02I\xeb\xd80\x10*حE]\xfa\xaeC@\xd0B\xfc%\x8d\xd0P\xbc\xd2\xd4\xf4\r\xf5\xbb\x01K\xe8\xb2\xfci\xdd[\xb0\xa8B\xa9\x1b\xd0\xff\xc0\xfa\xefy6\xfdk\x99^\xc3[|\xef\xbeT\x8f\xe0G\xd4\xe5\xed^\x15B\xbfKG\xbcь\t\xfb2\xdcbT纀\xbd\xe4s\x1e\xb6\xf6\xe3\xd9B1\xd2ˠ0\xbb=\xfaM\xfe\xbcI\xaf\xe9\xcdLQp\x01\xc6n\xfa3\U0010cb863\x1a\xcd*\xac\xf4&\x1fN\xa0\xa8B\xeb<\x10\x93\xd9\xfcۼ\xcbcD\xc9D\x1b3h\xc7*-\x82]賠\x17\x86\xf5$ܗ\x16瘝a\x163{sN0FEW\x9c\xb0fD;\x13\x9c\"\xaaK\xf5\a\a&\x1e\xad\xa5\x11W\xecU\xb7|\x05\x85-\x194\xefѫ\xd0Uz\vi\x15\x93n\xd3\b\x06\n2\xaaΊ\xa5]\xc8j\xcc\x1f)\x0eKw9\xbd\xf7V˗T_\xa8\xe3\x8f-\x00\xeeE\x06\xb9\f\x90\\\xd2\xcd\"A\xfcy\x16[\xb3;J\xb4a\x8c\xa8\xe9c\xfb\xb2\xda\xd6\u0604\xa0\x1fMZU\x90\x00\x1b\xf3\xbb\xddP\x81\xd8U\x16>\xcd\xe3\x91\xc8\xdb1\xb1n\xc3Xx\x88\xd9\xf7\x04\x14IA\x95\xd7\xea\xe0\xc6,\xaf4\x9e]\x1b\x03\v\x05<ͻ\x8f\x85\xa1\x9c\xae@\xb0\xc8vk\xf5\xcd\xc1Iݘ\xf9\xce\xc7\x1f\x98\xdcrGP^\x12\xeb\xbfK0\x95\xdb\xd6\xfc\x10v\x84B\x16ނdN\x83\x91B8\xc04iiQ\x91\x94\xf2\xa8`p\x19\xd5s\xcfU\x93!2jSf0k_\xc23&\xed\xbd23F\x93U\xcb\xf5\x9a\xadM\x1c]\xda\x1aҫ\xd0uccuf\x02*T\xf0\x88p@\x8a\xc4\x19^\x00j\xc5{\xda\xd60\x89\\\xd3\xc6\x032\x9a\xa5\v\xea\x93\x15\xb0&\xb8Z0ڒ)[*\x90\x1a\x80Ԫ%\xd2N\x98'\xdb|\x19\xb1\x19%\x8dI\xf9\xb85\x1f\x87\xee5O\xe5w#iבNI\xf5\x9dOI\xc9?\x04\x1d\xc6\xdd\xc2iv\xfe\xe4z\x87;g\x88k\xbfnM\x9b\xaf'k\x11A\ry@\xf57\xf7\xec\xe2L\xa8\x89\xb2-,\xb7\a-Y\x8eH\x81\xcd\x00\x02AoપX\x83=H\xea2i\x14\x9b\x84\x05\x1bRC\x91\xe0\x02v\x9d\xf5\xcdc\n\xee\xecҗ\xdf\xf2v\xf9\x83\v\xf7\xe7yx\x17\x86\xf0Ί\xdc\b\xf4\xe6V\x92\u007fLw\x86d\xba\x11s\x97\xa6\xb07\xe2Y\xf7\x06R`\xfa\x86\xeeI\x03\xb7u\xc3\x1c\x18vޏ'\x86\xd8ь\x93\x8e12I\xe0v-Ⱦ\xa3.\x9c\x8c)\x99u{\xa2|\x98b\xb9b\x8ev\xd9 \x8cc*d\xcb\xf0w\xf8\xf2\xf9\xcfoݻ\x15p\x01Ҏ%\x8d\x02\x15\x9d%\xbd\xd6d\xe3Y9<]7+镭S!\xc4\xe3\xba\t\xc4{\x9b\x13\xafV\xfa\x99I\x16\xbd\x02\xc9Ze\xa8\a\x82f1\xf17\x8e\x18\xb2O\xf84\xed\xce\x1d\xf8\x90\x03\xe39\x0e)\x8a\x95:WE\xe7\xach=SY\x1b\xe1Ù\x1d\v67\\y\n\x8b\x90Q*Q\xb8\xdc\x10@\x86\x1f\xa7\xa3_\x8b/\xa13TQgل\xe2y6\xed\x1b9\xa8\\\x15\xd4cf\xe7R\xe8\xeb\x02\xd9`uo~m(`\x15\x1a\xdfՔ0\xa5\xf4\xc1\f\xda\b]\x89\xc4ׯ\x82js`(\xb9s-\xbd\xffQ\xf0)\v(S\x1a\xb9m\xcc\xe8\x05\xdb?dF]kO\xaaK3\xe6\x13\x14i@3\xd7u$$\xc925\xceA\xb4[P3GW\xbfXs\xec\\\xb5\xa5 \x81\xaf\xec\xf2\n\xd65\x1aDOE0[\xe6O5\xd3)\f\xeaa\x88\xf7\xd91\f\xc9\x13+0\x92\x8d\x8d\x18\x9d\xe8\xa7\xeaX\xd8D\xe7B\"\x0e\xd5\t\xb0c\xbf\x1d\xa4g\x82鉅\x8b\x16\x8e\x10\x867\xed\\\xacq\x05E\x13p엁m\x81΄lǭ\xeb\xf6\x19U\xc5\xdc 4\x94\x91mh\xe7\xf2\xf2\x8c\x17Y\xc2O\xa5\t\u07be\x88\x024\x982\x87iMi \xe8cU\xc0\x919-b\x02ϰq\xcb0\xd3\xcduj\xe3Fwh\xd5\x13*e\xbb]l\x902\x0f\x8e\xd0\xc0v\xbb\x8b\xc9\xfd\x8et\x99\x98!]c\xf7\xa16\xb58\x19Lk\x9a锺\xc8\xdat/)\x80\v\xdfǰQi\xc0✴\xb5\xcfs\xecPF\xfc\x83ƽ&\xa1w;\x05\x96\xf0\x9aD\xbd\x05\x1b\xf5\x85\xaf\xfc\x86x\xfc\x91\x97ix\xab\x9c\xf7c\xc0A\xb6\x16\b\xe5l\\\xc7|\f!r]\bǭsi4\t\x18\xd2J\xb6\x10OS\x13\xc7h~hu{O\x83[\x108f[\r%lt\t\xba'Lɴ\x9f\xb2\xc6\xd7q\xe6\x8c;\x065Z\x8b\x93\u007fK/}\xac\xe6\x80\xe1\xb5=kU\v*\xeaSv\x03\x10B\x94Z~\x8a\x9b\x90=\x8b]`\xb4JKrfI\\\x92\xc5a\xcbۥ\xf5\xb4\xa7\"4)\xc2\x14\x95s\xd2:\x01\xfd8\x17j&\xa0\x8d9:\x10,X\x01\x94\xbb\xa0\xb3s\x00\xef\x1e\xb9\xd73\xf3\xe1\xad\xe3\xd1\xc0;tR\xd3\n\xad\xe6\xe4\rc\xfe\apB\x96f\xef\xb2\x01\xd2a\x11\xc80\x0ez.\xb5\xa1^\x9f\xa0n\xa95\xf3\xa2\xc5I\xb2 \xceĽ\xae\xe4\x87A\x02Qu\xf6\x9c\x00\xaa\xe5',\xfa[\x90A\x88y5N\xff\x186\xed:\xae\x1a\xee\xfb\xac\x8c\xed\xdd<\xd0\bpz\xe5F\xee\xa3w\xdf[~4]V\x15g]\x17V\xb7\xfb\x02\xf4\x18\xbf\xfc\xab\t\xef\x87x\f\xfeu\x8e*\x99\xb4\xb6\xe3\x14r\xc4\x06\xe3\xc3.9n\rK[\x9bo\x17\u07bb\xf4-\x99[\x95\xb9\xb97\xf1\x1f\xca\xf3\xf2A\xd3\xceh4C\xfa<\"7\v\xc0\xa27p\xfbn\xf4nR\x85<\U000bebd3\x8b\xe1\x14\x1cG3L\\\xbb\xe2\xaf\xeb\xf8\xc9\xd6;-\x9cJ\xe4\xe2BրQ\xf8\xe6\x10\x8a\xcaeY\x0fV,\xe4\xcaCG\x88\xaa%\x80-\xa9>\xa5d\x82\aF>p2'\xd7T'J$MR\x01A\x0f\x1d\xc2\xea\xc6N\xd8ɚ\x8d\xa9\xa6je\x97\f\b\x05H\xad\xc9\xc7\xf7\a\xe7\x86\xfdq\x96~y@\xd8-.\x85\xcb\xe0p\xc9\xdaX\xe8\x92\x04LZ\x13\xdd*\x80\t+\xa0\xb9\xd4d\x83\xfd:\xedQ\xa3D0<\x98V?\xfc\xe0P\x1f\xf9\x93U\xd5%\xcf\x0e\x85\xe3}\v\xfa\x8cT\xfa\r\xb1\"\xd1Ǣ\xa3\xba|>_)\xb4\xe996\xad6Z6(\x813n\x1f\x1eb!\xaf\x8ah`\xd2\x1ajA\xae\x9bq\xe4\x8c(H\xf8\x9e\xa1\xf0\xf3\x97?\x85;\xbe\x8eƊF\x9fT\xb9\x00u\xe4\x17u\xb3\x14L8\xc9\x04.i'\"\xf2\xa2\x91\xed>\xedB\xa0\x908I\xe4v\xef\xbc \xcdr\xe6k\xb8\xb0Ӻ5\xb9g\r\r\xe7)~\xf9\xef\xed{:\x87c^\xff\xa1\x80\xe3jWDx'\x135\xab\xdd\xc42\x0f3\x93f\xe8\x9c\xda)%\xe8el\r\x82`\x1a\x1b\xc4\x03\x80\xf8\xb9\xf5Ϊ\xd9\xc1icg\xe3j\xe1*\x04Υ\x13\v\xe8#s\xcd\x1a\x01\x9d\xa4\xfa\"\xc40\x84\r\xab\xd4\xfee\xf9\"E\xa6\x89wv\xf1\x8fV,n\xa8\x17\x82}\xe8ќb\xa4\x9eU=\x99g\x02v \xfa\x84\x8f\x13\xa6\xfa\x98\xedH(\x91C\xdc(\x98ܺ\x0e\x86e\xa0\t\x90\x9cꣵ?\xc0\xbd:\x9a\xdd-<\x05֥\xf0\x9a~\xd5ܡ\b[#\x01#XdtU\x14\xa5\x9eZ\xb2\x050\x8f\x8d\xd67\x80\xb3\xc0ڼy\xa4\x80%CPj\xf0\xfb\xe8\xee\xf3\x92^\xae8\xb3%\x12]\xb9;\xbf\x85\xea\x90nP\x8f\x90\xcd\xc1\xa7\xcc\x00JUD\xb6\t\x10\xb31[,3\x92\xd3\x06\x82\xf2D\xe6\x81\x15{\t\xbc\x13\x9b8\x90\x15\xd0\xe5\x9cڗ\xc2ȝ\xb4tϒi\xa6\x98\b\xd5\xec\xc3\xff\xf2t\xeb\xfdA\tO]|\x97-~\x16\xf59Z/Z\xb9q\xf0\x82\xf9\x8d\xfeS\xe2w\xb1E\x02$\xe8\xdf\u007f>\xc7[\b\xafn\xab\xafu\xd8M\xc0v,K\xab\x887,\bq\x81\xa6\xec\x13\x19l\x92>@\xe4ֽ\bf\xff\xf4v\x16ng\r\xb1m\xb33.\x84)6\xc0Īa\x88j+\x0f\x93ն\xe8\xdcT\xa8\xad\x89\x85\x99\x8c\xe7\x11u\xc7\xd4ᶿ\xecn.U)\xb1U\xcdŀ\xc3mH=rְ\xb4K\xb02\x99%1\x96Z\xb9\xc70\x84\xb6\x12W\a\x1d~K\xb3\xb0\xd7\xf4\x85\x1b\xf6\x03\r\xdb7\x90\xc0N\x05\x8cr\x86)\xc8,^\xe1\xd1F^t\xed&\x00\xa1\x9f\xa8@\xf9\x98\\z\x03\xb7\x99\x05R!\xa0\x8c _\xb3\x83\xb9\xb7\x86\x89\xb4<[\xb2\xc8\xc3\xde|\xbe=\xbd?\xd0\n\xdbB¯\x10\x97F\x02ސ+\xafD\x89\x81\xebI\x8d-S]\x9a\xd9\xea\x13\x9b]*b9\xf0@_\x1b\xc1\x01=/\x80\x1b-\x13\x9a8\xe1\x0e\x10\x9cY,\xbc\xbb'\xf49\x1e\xc0\xb1\x92\xe7P\xc3BF\xe7\x98\xfcV\xb6G\x19\xe2\x8cS\xa1\xcd/\xf5\ttJk\x1b\xaf\r᠀\xbd\x8a\xad\xf1\xf0`\xbe\x8eẃ%}\xbc]U\xbf\x14\xb1\xd7_?6簙\xa7?r+\xe5\xf5\x8f\xdeRG\xddǫd[\xe0\xb4@\x16\x81\x18\x94\xea\xa0o\xddjr@\xca+\xf9°\xaa\x80\x14Y0\x01\x1c\x11\x1cNG\xb7\x02\xd7nS\x84\x04\x90h\x99+\x8a\xb5\xe8\xf0\x0f\xdcVE\xc1N\xe6J/\x97\xc9_o\xee\x84x\xbb\x92[\xf3\x80\xd8\x17\x8e\xd8P\xe1sU\xaa\xbd\xb5\xb9\xa8?\xb7\xb7\xae\xcd\xd2t\x05\x1c\f\xab5fM\x8d}\xa3\x96u~\xc2r\x92n\x17\xa0\xdf'l6\x10U2qc\xe0\x8b -\x86\t\xd2\x15ѳ\xabS5\x14N\x86\x04 W\"\x01^\xe7\x87\xcfM\xf8֝\xdd}\x9bĂ\r\xe1\\X&F亯\f\xbf6\xd5=˜\x19aK- #W^\x16\x03\xc7I!Tܘ\xab=\xb6<\x1dh\x83⃦\x85\xda\xe2\x80\x00\xf4\xcf\xd3\xf6=\xbcz\x89\x06\xc6ޅ\x00\x96\xa4Z\xfb\x16\x15\xfe\x81\x01\x84&&\xfdc,\x1b\x84\x97\xabP\xf2h\xb4\v\x15:\xe3\xc1G\xab\xf9$2d\xb6\xaeʯ\x19\xa8\xd1Ȗ\xf4\xe5$\"D\xcb*e}z\xc1\xb2\x10\xe4r͌\xde*\xa4\xf0Q\x19\x92\x98\x0eɑ\xeeLt\xa3\xcc\xe2\xcfM\xf7W:\x92\"`)\xbe\xb1\x15\x8942\x8e\x9b*\xfd\x94\x95?\xabGOZs\xc0\xba\xf3\x01\xda\x00c\xa4QG\xe1[Dg\x11\x8d\xf9\x10\x0e\xe2\xbaHG\xf1!B\xa6\xa2\x00N\x02l\xe7\xcaQ\r1\xf5\x98\x10\x8b\b/\t\xa6ȩ\xe0\xc8\x11%\xbaM\x05\xe7d\xc1)\xa7\xc9\xdb&\xb1\x84\x87Lr\x10\xd9\xf23˱T0\x885'~\xb2\x99\xad\xd5H)\xd1\xcc\xd9\x00e\x83\x04\xc1.9\xd8nC:\bVGF/]&\x85ԒǦ\x0e*\x8b\xdbļZ\x9aDQ\xac\a\xba.KU\xa5\x81q\xa3r#0\t\x86fx\xaeʖ\x03+ l\xd2{pAμ\xcfh\x88\xe5\x05!L\x8e\x05\xc5fTb Q#\x18\xb3fk\xb7J\x82\xf7E)\xceT\x9b&\xc1\x1c\xae\x98\x12h\n\xb8vB\xc9-5\xae\x83@\xe6\n\x18$İ\xb0\x12\x1a\x10\x87\x8b\xcb.\x89\x83C\xf8T\xfae\xea..\x90\xb31?J\x993K\x0e\x117\x8fT6\xc2؈\xe9\xb2?\x90W\xe5\x95[\x9dxc\xfa\xb9AR\x8c\xe2\x94{\x10\x88\xe8Nd\x82\x1b3ϔt\xc2.\x9dV'\xbe\"M\xa1J.k\xf8\xc2\xe81\x8f~\xdf&6\xc60╯ې\x84\xb0\x8f\xd0I}J\x85\v\xfb\xb0\xb5U\x9dj}\xdcx\x16\xa6`\xe2\xaaz\b\xce\x1a^\xf5\xbd\xfb\x16)\xeb#2\xaf\x1aS74\xef\x9a,\xec,\xbcU[\x12j \xb9l6}\x92\x00\x14\riI䩖\xe2$ǡ\x05Вh?X\xafTr\xfcG\xe3\xfd\t7\x00\xab\xe5\xeaN\xf9N\xab\ty\x13\"VC4@Dm\xe41\xa83\xbf\xf0\x0e\xbcF\xa4\x8dH\xb3\x13(\\\xadX\x0eud\x90\x1bAn\xccJja\x1e\x00\x85g\x80\xe0\xb4\xd4J\xed\x800]\x16\x95ǶP\xf9P\xe0$\x01z#\x84\xa2\xe6\xf8\xed\x9dG\xca\xc0\rH\x936<\r\x00\x10Z7\xc9O\xd8Ϟ\xa1Nξz \x9aͫ\xddZ\x98m\xc9\xc7ƭИ^\xa8\x9a;R#\xc1!u\\\xb4f5Oĥj\x99SU\xe6r\xbc\xfc\xe4\x05\xd0e4\xf2\x86\x86W\xc6\xff\xe8\xfdA/Q\xd2|\x97T}\x9a\xd37\x90\x81\xdcA\xfdf~\xfb\x9f\xf7\xf0\x12]ܻ+\r\xf6q\x8f\x96\xe9+\x03\xd8B\x02B&Ó\xc1\xaf\xe5j\xaf\r\x9a\t\x88\x10\xccg%\x97\x01FIo⌆p\n$\x98\xaa\xd3\x02\xc8\xd0\x1d\x00\x87c\xa0#l\x15\x95}|\xc3\ue535\xea\x17\xed\x91mV\xcd\xcf\x04\xfc;\xa0\x17\xe4 @\xe3\x10\xe1\xec\x8e{Ȉ>R+\x93śE\xab\x92\xcbr<1\xbf%\xc1ɺ\xae\xb0\x16)\x1e\x8e\xffD\x17t\x84\aά\xf7\\\xd3\xdb\fnO\x91\xb5Hj;jя\x1d%\xb8\xe5\rZK\x8e0\xe5\xc7-\xf4\x13t\xd7u;\x06\xbd\xa4\xa3`\xa0\xa0T\x9a/`K!pB0i9*\xf8\xf7<]\xc2sy\x1c\xd2\xf8\xd2\rWs\xb3\x86\x95\xd2\xcd\x1cƓS\xeb/,\x00\x96F\xa7\xb6q\xa2\x92Ak\xa7Ʉ*\vV\x99\x17\x84\x8b\x94Ӟ{t\x8aBC6\xae\x16\x895ds\xa5I*L;{\\!\xf0ۻO/\x16\xb4\xfc;F\x80\xef\xcbǎ\xc8\xfd\x92\xdb,\x81\xde,Q\x06]\x01\xa2\xc4\x05\xa2\xbe\xcbz\xb43\xaf\xa2'7\xa1\xd4ha`8C\x94}\xe9\xe5)\xa73%#G[\xd7\xdc\xea\xcc\xcfO\n\xa0\xcb\x10\x01\x8cCp!\t\xc2\xc20\x8eO\xd6\xf9\xa5\xa7|bv\xba\xe90;\xffiu\xa8[\u0090f\x86\xda\xf9\xef\\\x02\x8fmlo\xc0*\x10o\x9dL\x04\x8b\x85\xae\xc4fY\xfe\x1d̒\x9aX*\xb7':\xa0 \xd7x2\xfc\x81L\xdf\x05T\xa7&\x89\xb2\xce\vs*c#D%0e\xaf\xfd\xd7<\xbc\x85\xd7x6\xb2\xa3\xae~\xec<-\x00v5\xaa\x8b\xac\xeej\xc6\xe0\x925t\xfbG=\x18\xadx\xf3\x93\xa7,\x12J!\x1cר\xc6u\x85+\x9f\x17\xf8\x91Y\x15\xedz%<(\xf9*/\xdcܸ%0۰|\x82\x02\xf5\xa80\xa7i\x8bv-K\xad\xa1\x94j\xf3\x84\x03NҴt\xc1@P\xc1\xac\x1aez]Fkە̭\x1da#e\xe21P\x81\"o)\xd0\\\xb8m\xa0\xa3#\xd3~@\x99mɯǦ\xffd@\x96E$d\x98k\xa1\f\xfa%{{#S:t\xbb\xeeB\xddL\xab\xebM\x8b:+3\xfa\xbc5\xaa\x8clS\xa0\xee\v/\x12\xd0\xec\xf2\xd4\x19\x1a\x9dF\xef\x97\xf9\xaa\x9a\xcf4\xef\xac\x10\x16D\\c\x89.\xbd\xb9\xd0\x01\xb08\xc7/\x95q隐\xaaF\xd28\xeb\xb4.\x94}\x9d\x01\x01\x00H\xed\xec\x14\x84\xd6A\xe75\xaa\xb9\x9d\x8d\x11{\x02bLS\x86\x00\xd6\xf0\x1b0\x96kL\xf7\x87\xddl\x80\xa4\x86\xdc,\xb5P2n\x8d\x1a\xa47i\x19l\xc2J\xd4\xf1\x18\vT]W\x8e\f]\x9e\x1fm\xde>\xb6X\xb8`\xaa\x93\x8e\xe5ڎ\xe1\xf7\xd0\xdd\x15E\x1e\t\x01P\xa8\x95\xdbfi\xe0\xbb2\xa0\xae\x94o\al\xffk\x83\x9d0YMV#\t\a\x8an\x0eV\xd4\x11\xf9\x1e\xfb\xc1\xaeX\xf5H\x85DUQ\v̭\x96\xac\xbc\x14,\x1d]\x14Z\xe8\t\xcbJ\xb0Db$\xe4.m\xf5\xb1U9G?\x8a\x1b\xc5L}\x1b\x8eT\xb4W\b\xb1\x17\xf3\\\xa1N\x9b\x82\x01\xfd\xc7\xff\x9e\x87\xb7\xf8~\x88oR\xaa|\xf5\x1eT\xd1U\xd3\xd8AАz]7\x84\x11\xd3&ʐ\x13\x14Z\x16\x90&c\xc6&\x12p\xda\xd2\xf6C%Ր(rX\xd9WC\xa8\xf9\x10\xf0\x9a\xfa\x1e\x13K\x9a,Z\xf7\xb8|\x83h\xee?f\xefW[4}\xd7\xd7Q\x0e\x8a\x8c]\x12\xbaaK#\x9d\xeeUK\"M\x93\n9\x1aZ\xb9\x8e\x92S\x87Ȅw\xa52\xd9\xe1\xe7\x84)K\x8c\x808\xc1\x96a+:h\x8b[d\xcdF\xc6\xf9\xd1Rꔵ\x19\x1d\xa5\x83\xa2\xd7\v>\xb9y\x92렑\x1c0\xef\xa3\u007f\x1c×ߦ\xf1ҵ\xecM2O\x18\x05\n\x1a!\xd2Hp\xc9Ud9r\xf2M\x82s\x90\x82($\xcf\x12%P\xbd\xf9F\x89l\v\xe2\x82\x0eH,\xf5\x83@\xe5\xaf\x03\x05\x8e\x89S\x91\xdf\xeb*\x8fZ\xef\xc1\x1a\x82|\x92\x03z\xd3⣰\xe1\xfc><\xc4C\xb8\x05\x935s)љ\xb1״q\n\xc9Nx\x8a\xda'h)j\xa0+\x8aq\x80\x80\xf8\xd7v\xeb\x84\x15\xe3B\x1c\x8dZ\xb9\x04\xafii\bj\x1c\aTf\xe4\x0fd\xefa\xc2Y3\xe2@\x00\xe1\x81\xce\b;\x96<\xbc\xf2\x82}h\xe7.F\xcc3d\xb1\xfa\xbc\r\xefyz\xaat\xc8Ƹپ\xba\x0eL\xec\xaa-\x9a\xa4Sù*lF\x96Ա\x99(L\xa8\xa7\xaa%*\xa5\xe2c=R\f=\x9e\x9d$\x93E\x188\xc8j\x14̧\x8e\x8b\x90\x8a,0\x0f\x1b\x9a\xa23q\xf05\xd1\xf1\xda\xcb\xf4Pm\x8f\ueb24\r{#g\xeaK\xf6\x05\xff\xc8!\xfaH\x90d\v\x1fD\xdcX\x02\xe1\xdd\xcf}\xef\xf4W(\x1aC\x99H'\x0e3XE@\xafL\xf4\x021\xdc\xc2\xccST\x95i̻\xa11\xce\xf0N\xea\x90\xca\xe3#d\xed\xb6)(\xdd\xdc0i\xfb\x00\xd04Z\xc7C\x96,HTy\xf0\xc8\xc2\x14\xb3\x85ź\xb7V\xd0S\x8b\x1a\x11~F\xc1\x9a\x85:\x8e\x96\xcb\x14\xc7\xeaŝ\xfd\xbdi\xd6\xc6T{\n\t3\xa5Z\xe9\xbc\xde\x1b]jD,\x96\xbf{\xe7*\xf1\xfa\x1eE\x04\xfb\xf0\xf4\xb6'J\x04C\xfe\n\xe0E\vIЩ\xf9U\xd8\bUm\x85\x81\xe9\xfe\xe8\xfe5\xa1\xd0\x05W\x0en|[\xd678\x1c\xa5z\xbf\xa0\xfc1M/e|\x15\x80\x80)\x94\x8a4`\xa8\tl\x06\xf0\x9fK\xf5:ze: t\x945\br\xed\n}A\x13hc\x82ɝ)\xb0\xac(\xb8S\xdez\x8d\xc9\xc6\xc9n o\xb3^\xe5=\xf1~\x10\xb1\xd9\x14\xba\\\x13j-z$\xbb\xf4\x14W\xa2}\x14ܧm\x11\x00\xb4\xe8[\xa3K\xdda\xe3\x05\xb9&\x91\x18EyL\xa7\xc39\xd0\xc2L\x8b\x86\xc4N\xae͋xh\xaeW\xbe\xd5J\xa2\xa75\xab\x11\xe4\xd1\\\xcc_\x15\xc0(\xb9O\xcd\x18\xeab\x8a\x1fĐ\xf5A-\xbe֤z\xa9L\xf301?\x10`\a@\xac\x05\xd7A\xb0\xda[\xf7\xeeV5\x9a\x1a\x05\xc1\x91\xa9\xc0\xcar\xb7-\xc4\xe4\x19\"\xac\xdd\x15\x02\xb5\xc9\xfcM[\xd6m\xf7\x16\x9d\xeeU\xdf]+\xdbpwP\xaf:I\"\xc6\xf7\xc6f\xa6J\xa6\x92\x04z!V\x81ZX&9\x04纀\xe0z\x19\xbdc\xb1\x80j\x84^湓&\x14\x89\xa4M\xabu\f\x85F\x93q\x88eiY\x91\x16\xa2\xd1pN'\x97\xd1@D\xc2N# Z٦\xbbhMd\xbd\x1b(P\x19\x01L\x8e)܀!3Oe\x04I\xbd.\x8f\x18t\x1fDy\xdf\"\x82\xad\xb9i\r\xac\xd8=B\x05\xcf|\xc1\xa5h\xbe\x05h\x11<\x89el\v\xb5n\x1dR\xa2\xa2\xb4 \x9e\x14P\t\x9a\x84;\x01۽\xf0\xe4\xeb=\xe7\u007f\xeaL\xb8\x83\x1df\xf9\xfe%Ʒ\\[\xda\xd5\xc0|F\x1b\x1e3B\xbb\x9eL\xc9^F\x99\xc8\xd5'W`\x11I罭\x92\xe0\x06\xaf\xec*\x11\xe7?rǫ\x06-*5\x12S~JS\xf4G\r]\x87M\x02\xea\x013\xc8>\x18\x94c\x86pjO\xd3\xfb\x95cc$ \xdf\xd2\xfdh\x9b\xec\xfd#2\xc4$\xc8\xda\x06W\xbar\x047U\xe8\x94V\xb5\xa0\x9b?\xb2ׁaf\xf4\xa2\xc9\x1d\x1b\x9a=\xe6(@\x92\x12\xbe\xafE\xf7\x8ch\xa6\x11\x91\x17\xfbB \a\x03K\x8d=\x03[9ۄ\x8a\x93\x16\xfc\x87\xc5&?&6Һ\xcd0\n\x94\xb5e\x9fJ8\x85\bI\xda\xc8t+S\xaa\xc0ˍ(\xd5\x16u\xad\bf\xa0\xe03QFla\x04g\x8a\x00\x92>\t:uY\x18zۼ\xa5\xa1<ʉ\xf21#g\xda\xd4&f[6\xcf\xf6\xee\xba&}\xb5GCV\xe8\x10ކ\xc2\xf7dXH\xa7\xf3\xda\xfb\xcfG\xf25\xb1\xc6\xfc\xe7M\xfb\x12κ\x8a\xcbP\x19\xd1\xe9\x1e\x8d\x06\x99m\xbf-\xdbs\xa0\x13\xfbC\xb4i\xacw[\xdcO^[\xda݄\xe3\x97\u007fm\x0eQ\x9f\x83\x05ҚJS5\xfb\xe3\xea\xc7ӄ\x97p\x81\xcdW\x1e\x94\xf6\x84*!\xb4Zܟ\x18\xf1\xc1\xc0\xbfJ\xcc\x1eYEp\x1c\\\xd6ĝ\x05ѼK\xbe\xa5)\x0eP\xf2\x825\x02\f`P\x94&^\xb4\x1c\xa7\x14(\xcfg\xcf2\xb8\xf9\xa2\xc8G\t\x0eA\x03\x8b\xc2VU\u0378u\xf6S\xbb\\\x16\xf8\x95\x01R\x1e\x01\x9f\x13\x8b\x18\xba\x83\xa3\x9fG1\x1f\xe4\xd7\xd05\x03疤\xe4\x19\x1b-\x94\xa8POEC\x1b\xe33\x83[\x88\x99\x9e\fRq\xa6\xf8\xa4\xf7%\x96}\x9e(\x0e\xb0\x8e\xae>\xb3\x8c.\xc6\xc0\x18\x80\x9fG\xaa>\xaaκQ\xab2\r\xeb>\xab\xd6E\x15'\xe9ȝpUtߤ\xc3]'\xb8H\xb0&\x80{CC\xad\xc2\a\x9f\xca\x0fCb\xeb\xa4\x0e۸\xba\xb8l/\xe3d\x12K\n\x1f\x1e\xb4̾]%jK\x0f/w\xbf$5\f\x02\x1a\x1a\x02q\xaf\x04M\xe3H\x01\x87\xe1\xa1u\x17.\xb7`\xe9\b\"6\x15\xdbI\xab\xfa\vs\xf7ζ\x1d:E\xa8\x97Y^>5\xf6\x88\u0087\xeah\xf2ֺ\xae\xdcM\x10\x14\xa3G\xac~鹲\xc8\x05eg\x1d\xd3\bo \xf6\xc9\xc1g\x86\x1cP\xfef{ه\xa1\x8f'\xfb\xb5V\u007fr\xc5\x1a-\xed\xba\xc3\x00W\xf2\xd6q\xb0\xa4\xb9\xbaJw\xea\xe0\xd3\xd7Q\x89\b\xb8>\x9d\xc2+Gj\xc8\xdd\xd1\xcb\\c\x91Ы!+\xc2\x04\xf5\xb6!\x00\xaf\xfbd\xaepB\x1aFp%\x95\xf0\x81\xeb\x93\x16\x8f\xd6C\x87v\x89\x84\xb0嫴h\xf3\x98\x88\x1dXv\xae\xdc\xc56J\xea\xbe|ޤ\xe7\xf6\x9c\xa8\xfaP~\xc3&\x9e\xbeT\xff9q\xdb4\xfc\xdd\xff\x83N\x86\"\xa4Xw\x99$Jd\xe5\xb8foD\xee\x99^\x13\xa3\xc4\xcbzڐ\v\xaf\xb5\x04\x95\xa1`#j$m\x13\x96g\x0f\xed\x97\xcf\xdb\xeeҾ\xd1Y\xa9)\xf6\xa4\xc8dE\xc7\xdb2\x96j^\xb01uе\xaf\xb32\x9aGJi\xc3yJ\xa8\xbboM̑A\xef\xbc=1\x00\x94\x85D\x99\x1e*7hb\xd33ȏ\xb8\x1a\x8a\xf6\xa3j\xe3\xe0I\x84\xb3\xb1.\xa1V\x8c\x95\xd19\xc5\"&۵\xb1V\x12[\xd3\xca\xf2\xef\f5(\xa5\x88-\xd3VM1F\xd14\x00\x00\x9c\xdcF\xfa\xdc0VS\xa1\x05,\xc9O\xc9\xc0\xc5T\xea\xd0\u0381 \x81\xc7%\x9e7Q\xeb@\xa4i\xc2k\x87LU\x8c\xb9\x86\xa6&\xa4\xe0\xa8\xc1\xfbh\xf4\x1b,\xae\xe4\x98>Y\xc8;+jnz\xf6\v\x82\u007f\xb4+4M^\xee\xd5\x16\xf4\x1fg*\xe8\x17k\x82\xaeN\xb6\xc85\xa6k˾\f8\x05\xe6\x90ݸ\v\x9c\xa3\xfd\x95\xab\xf1\xe8ނ\x82\x02\x862\xf78\xd1\xc8FD\x92\xc7\xeen%\x95ѝ\x87\x87\x83\xa2q8L,>*\xa6\x8d#[~\xb9\xb6\b\x02l\x86t\x9a\f\xb0]\xb9.L\x870\xe8)\x14M\x91\x06\xcb6c\xa6I\x8ae\ts\x9e\xc8(\x82\x00\x9b\xa3\xf1\x88\x01\x99v\xc9%1\x80\xea֏\x11G\x96\xdaWF!d#\a\xfb\xed\xcfK\xf7J\xee\x1cFwk\x06\x88\xccpe\vz\xa2\xeb\x1d\x15W\xcbτ4\xaf/\xb9\x03\x9c\xc1\xa0\xa5\xef+֕\x82\x9e\xb8\x8an\x93mNN[J[\x80\x18$\x92\f\xcbX\"U\x84\xbe\x8c$|Ĵ\xbfq\x8a\xa0\x01\xfa\x1b\xe3@<&\\v6Cf\x1c\xc1\xd0\xea\xee\xd2]ro\x98oS\xc0\x03\x0f`\xa7\xecL\xc5\x05\xedy\xfbfz}\xf8.\xfdH\xe3\xdfH´0/˱\xe5XM\xb4\xc8DB\r\x16f\\\xfdplΔҦ\x1a\x99Ѯl\uf0c8\xf4Oi)\xe8r-\x1c\x16/a֊\x9e^\v\xe2\xbcU\xb9F\xd5\xeat\xe1]XS\x9e\xed\xad\xdal\x88\n\xb0\x87\x16t\xfc\xb9\xbd\x15p\x10\xbf\xed\xa25P\xc2\xd1\r\u007f\xc1\xa0E\xe5\x91J\x9e\b\xa6\xad\xbe\x8fN\x02o\x9c\bi/\xe8H&\xf5\xf4mgai\x8e%\xff\xbd\t\xaf\xed\xb1{\xeb\xa8A\xabW\x9eROGT\x8c\xb6\x94\xaaХa\x02\x12\xfc\x8a\xb5\x125\x9cX\xb8z\x0e\xe3\x16*b\x17\xae\u0088\xb6g\xc4жl\xf8\xcaF\b\x06B\vt\xe8Ƅ\x8b%\x06\x96\x1f4\r\x05v췥\x03\x804\x90\xb5\xa2\xb6\xc4\x04\xb8J\xc1\xa8\xfe[S\xcc\xd6 q\b'b\xea\xcf\x1f\x8d\x86#\xe3eg2\x85\x8c\xdbY\xbf\x17\xfb\xad9\x98\xc9\x12V\xac\x93Y+\xea\xca\xdfX\x11FR8E\x04L\x03\xe9*DT\xac\n\xd5\xc4&\xd1\x01\x172\xd0w\xbe\xee\xa9\\\x9a\x04C\x9ao\xc1\x92\xea\xdbT\x9e\xa0\x9a\xa5]\x1e\x99p;+,\x94\n\x05\x80e\xf2:\xee\xe2\xb1\xf8\x0e\xe9N\x16\f\xa9a\xb8\xf3M\xbfsj7\xe6\xa3'\x86&\xd2dUsm\xda\xc3$\x8fz\xc1\xe8ӯ\x10'Im~|g\x94\xac6\xd7\xd6\x04\x11ѸQ!\xb5\xaf\xd3~ޙ\x02\xa8,,c.P\xaa\xb5\xe6r\xbe\xae\n\xf7\x88\x18\x8c\x14)S\x9bӟ\xb5\x05tqɎ\xea\xbf\xfe\xf3~\x88\xb7\xf4f\x85Ia\x18\xd1!{@57\x94v1x:\xda\xe8Q&\x8f\xadD\xb9\xda9\xac\x91z\x8a\x04I\x13\xaa\x90 \x16\x19\x84\x02\x81\x00,\x8b\x9aoQ\xf3\xc35\xe7LQu\xea\x9ab3\xaa\x98\xa0\x8b߱(\xaa;\xe1\xa3ѷ\x03\xed\xa5?Oó\xc8'\xfe眓\xd1ߖ/!\xbcbq\x18!\xadR&*G\xc0\x02\x89R\x0e\xd7t)\x1b\x90\xf1\xa5:k\xc1\x98X\xd2 U\xd2D\xf2\xe6\xe9\xd12\x8e\xb6\xf4\xff\xd7\xee\xa1\xfb\xfdnXx\xa0\xa9\xcc\xc1`\xeeh*RGb\xe8\xadK:\xed\xcbN\xbc\x0f:c\xb6n\x84\xc8\x1eG\xa4\x8f\x85\x8b\xedнne\n\xff\x03J\x01+|\x96%d\xc29\x16\xc8\t\xa4\x8a6b\x1bs\x01\\\xae\xe3\x0f\xc4C\vQ\xd4<\xa0I6+\xb87\x1a\x85L\xbd$\xad\xa7\x9f\x13\xa0\t鹸\xf6\x1d{\xdcv\xbbᛣ\xd5T\xebi\x92 \xa4\x8b錖\xfal\xc2\xeeIB\xa1T\xc0\xe6`\xfe];Xn\x98\x8c\x8f\x8c\xb4\xad1\x94\xa6*WJ\x84d\xa1ׇ\xaa\xa3P\x14f\x89\xb8κ\x90\xbc\x15ˢEt\xb5i&;\x0fR7\xe6\xfe\x81*\x87\x85ϲ\x16\xfc>\x0f\xef\xe9%\x00\x0552\xf4\x82J\x10HB17\xa71\xa3o\xb5$\xe5\x04\xa6\\C\xea3\x99u\x9e!\x1fdK\x11\x9eP\xed\xfd\xf3\x9dI\xd1\x0f\xa0\x16\xa9\xa2\x89\xa6X\xb2e\x00\xa7\xa7#c\x1b\xa65\x05Kxh\xfdV\xf4}\xac\xe6\x02d'\x80\xf0\x93\xce\xcc\xd1š\x9ew\":mf\xaa\x19XK\t\xecbLΌ\u007f\xbc5\x16\x9d\x10\x0ejh\n\xc9\xd5\xe2>\xc2\x19\x94\xb9e\x88\x1c \xc6w\x1e\xddi\x89\xc8\xe2M6\xb5Qj\x81\xddh\x18\x81F\xd4\xeaU\xa4R\xa5\x1f\x05bI\x93\n\xf3\x8aoY\xa91\xba>\xcek\t\xba\xa8\x19\xb1\vs{v\xb7\xcc22\xd0\xf2\x92\xc9\xef\xe9\xb8\\\x06(Z\xe5O\xffS/\x04\xf0L\xb2\xdc*=\xa6\xa0\xf7\xaaҧTU\x16\x10{\xf1\"\x92I\xd4\xc8\xf8];\x94\x98,\x12\xe9\x94\xcc\v5\x03\xed\xe4\xaf\x1d־u\bpSp\xb2\xc6nE\x0eX\x8c\x94\r\xeb\x8ed\xcda\xc1~\xdd;\xe0lH\x86\x9a\f\xf9\x1d\xa3%TwM\x80P+$X{9\xd1u\xb3#\xfa\x11w\u007f\xc5\xd2\xd0F\x8b!Iu^\xb8\x12\xcf\xc9\v\x97\xbb\xbb\x14<\xbbbGX\n*R[\xa4\x1e\x8d\xffp&\xd2n\x1a\xa6\x98\xe5\xdaD\x96\xb5\xa10\":R\xd3M#uQ<[\xf3\xe5\xc6\xc4\rF\xd6\xfe\x13\b\xf2\x16?lk\xb3E\xaeǨ\x90\xf0\x9d{\x9bY a\x1bӶ1R\x87\xcaf\xfb\x9a\xeb\xcb\xc0\xd16>\xb88\xe9.\xe6K\xc1\x88\xbd!\xa0-gt_\x1a!\xaer\x94\xb4\xf1ٱ9\xa9\xbfz\x01\xbd\xb1\x1e\xfe6\x00\x11\xa9\xb5\x95\x81\x91\xd5u\xbdZFz@\x16:؟\x9apfg\\\xf5F\xa8\xdf\xc0\x80\xeb\xcey\x8fq٪\x14\u007f\xf0ՠ3\x1f3F\xb8u*/p\xcd~_\x9dѭh^\xe8\xc9kZDE[Ib\x1a;g\xe0/4Y\x98\xa8\x9a\xab\xa8\fif#8\x1c5\xd66N\xc0\xc8BA\xcdx$\x83ޒ\xd4Y\x17\x84\x1d\xf8:F\xaa\x82\xde\x11U\x80\x9e\\\xa2\x1f5J\xb4.P\xab\xa8\x1a\xa6E\b\xf4\x1a@T\x9d>\x14\xb0=\xb1\xe1\x02\b\xfd֠\x17#\xb7\x03\x9e\a\xec\xfc:W\xa0\x0e\xa0뀙\f\x14\xf4B\xddz4\x1b\x81Ϗ\xe6\x05\\\x107mQ\x9b\xc0\xc0,\x95R\x14Q\x1d\x8f\x05\xff\xbc\x06\xa8Bn\x92\x942\xb7f\xe9:oK\x9aR\xc72\x84\xa7\x80\xd2ߒr\xeb6\"\xeeGM>ߛqk\f_\xdbBi\xff\x99\xb45\x01pК\x92\xfd\xbd\aW8L\x1dC\x97\xa1I\x87\xe7\xe0R\"\xc6Q\x8bdh\xee\x02\xc1Tմ\x12\x19\xf1\x99d\xb08\xa6\xcaT,$$.\xc2SJ{Z0\xb9\x87\xe1/\x17\xa8\xe0̞\r5u\x84b'k\xaa-뉲/\f%tI}@\xddWb\xa1\x1a\x1cC]\xb7\xa5&\xb7`,!\xe5\xe9IKCr][ܳ|\x19\xa80g\xa0w\xb4\xd9\x02\xd6\xd3\xc7\xcev\xe0b\xab\xd6K\xa3m\xa9\xc6-\xe1\xa5F\xb3\xb7\x98\xae6h\xfc,\x11\x05\xab9M\xc2\x0eE\x9c<\xf07\xb8 \xa3\xd6&6U\xd7l˩\xa9\x97\xafWKC\xf3:\xdc/\x9f\xb8\x91Li\x04#\xf9\x00\xab\x06؊\x83aŗ\xc8\x02\xb6\x80\x89\xaf9\xec\xc9),Z\xd2\a\x06\x84\x98\x0fh0?\xb7r\f{tjc\x93\xe8\x86_\xa4\xd7\xc6\x17p\xa8\xc1\x99NA2y\x97\xe6u\x03\x10\t\x82Wk#\xcb\xf7>\x02\xab\x0eLm\x0e\x01\xf3\u007f\xe3\x00XѴ\xb3\xb6\x8a\x14|6\x94!\xa8\x89\x17\xa1\t\xf7!\xa0\x9bC)\xb5B\xacBZ4F<\fp\xeaF\x9f\x81>\x90\xca\xd3,\x10\x15\x8cf\nn\xbf\xeb\xf4)\f#(\xdf\x0e\x88\x9e\b\x011uѬ\xc9\f\xca{\xe7\xe7\xd5\xe1\xef\xe40o\xdb\xf0\xe7\xd0.R\x0f\x91!d%4\xe1\x1b\xb1r\xaf\xf9\x8a\xff\x05\x92\x8b\xf3\x92\xfb\x87_\xbb\xb2\xb5U\xa7\xd66\xe0T-M\xbb\x1f\x13\x8du\xde\x06\x80*\xf0$\xf4\xb6\xbbt\xb2\x17\x86hr:\xb7\xb1\xe6w\\o\x95\xb8ΉOe<:\xa8G\xed:a`8OG6\rd6\x11\xb7\xae\xbd\x9dp\xb7|\xe9/\x98\xa6c\xc9\xe6\xb2\xc0cMb\x87]z\xd9\x02\xb6\x84p\xea\xdd(\xc0*\xb4\x89\xaaA\xbd\xd3Pfm\xf4ֆ\x8c,\xa9\x886\xa6,\xdb\xfb\xc3J}\x03\xc3\xeak\xad\xa71p\x8aVUVƆ\xd5\xcalc\x043\xb3\xcb1Ht\xde\xc1\xd7\xc9V\x1b)TBvMfK\xef\x81\x00܄Xf@\x86\x19\xd9\xf1\x10\x04*\xeb\xbf#\xcaN\t\xf1qV\x00\xc9F\x9e\x91\x93ZaMJ\x8c\x8a]\xb2\x18\u007f\x17\xdd\xf6x\x9c\xd8\xc4\nD\xa8\x15~n\x12\x92\x8f\xcc;\xcf,\x10\xbd\x14\xd4A\xdcH/\xd7\xce\b\x0f\xfa@\xafx\xac\xa5f\x96\xae\xd8mW\x04v\xafέ\x8b\x14\xd6\x05\xb9\xd1\xe47\v\xbe+\xf0+\x9bb\xf3\aC\b`\x03B\x02\x90\x83=Q\x81\r\x9e\x8etKȳ\x9d\xa5\x86\x99\xe5Dj\xa4\xc1\x0e\x91f\x17\x13\xaa\x9a3\xfd\x05\x89\xb6\xd6\xd6Rb8\xaf\xbbAG\x15raZɎ2\x01\x15\xd3\u007fY\xa1\xa6=(\xa5\xd8y*\xee\x18d\xe70\r\x0eI\xe7E\x82\xeeO\xf2^\x9a\t\x80̨3\xb1\x87@(L\xe8j:\xa8\xa1\xba\xa5w_^\xb0j\xdd%,Z\\\xadR\xcf\x1c\xfb\xa8z\xad\x8a\xaa\x91\xb2\x16\xa7\xa1P\xac٩uNYt_\xdf\xc1P\x9eؾv`\xdc\xc8ħVf}>\xa4\x11\x89.(SZ5\xf5\xfe\x90\xad\xf2\xa9u\xb1\xa2P\xb4P\xad\xf1\x85(\x05\xd0\xef\x95\u007fҘ\x8d\xd1m\xe7a)\v\xdc5\xe7>\x17\x15\xea;\xc0\xe7`\x1a\xdc\xc67\xd1\x16b\x15I\xf8ۢ\xa7$\xea;\x1a\x11\x8d\fk\xe5\x91<\x06\xfc\x1c\xf69ĵRE\x15n\xa4\x91\xbf\x15\x11\x8b\t5\xa2\x19iZR6\x02J\xb9]4\tFш6D\x8b\xcc\x13\xd2\\5\xb86{r-\xb7\xab\xb05\x81h\n\x90\x9a$\x0f8\xa9N\xab\xc8\xe8GK\x00\aN&Y1\xa5\xa8\x99H\xa1=\xfcϡ4\xfd\xe7P\xa2θr\x03&\xa8\xde\xc99\r\xac\x93\xe3c\t\x94 T\xcd\v\x13Zc\x8b\xf1\x82S\b\x17\a\x8e\xea\xf7\n\x12ۻ\xd2k_\x19|DS\u007f\xa0\x06Zs\xdc\xc7\xd6\xecj\xb9<\xe1<\xa0d\xaf3\xb0\x9b\xea'\x89\xba\xce!\xb1\xf7$\x01\xb6|\xdd\xcc\xe26!\xf0/\n\xea\x94^\xff\xad\x95ڷ\xa4J\xe6m\x11M$\xb9\xec\x0f\x91|\xafD\x1c\xb2\x02;V\x91\xca'Xb\x8d\xc0\xac\xf2r\xd11\xd0\xd8\x06\b\xd9\xd6u\xb9\x81h\x10\":mǯ<\x94ו\xedN\xb1g\x8a҅l\xe2\xeb\x82\xd5e\xb1\xa9B[6TD\xda\x1a\x9be\xd3\x15}Hg\xa1\xeb.\x16\\\xa8~G[0\xa2\xe2Agث\x1e\x87\xe1wI\xc8eb\xaf\xce\xc0\xf0v!\x93d\x01ᲡU\x90\x01nX'\xf2\x82\v|\x9e \b\x06\xaag\x80zEm\x1a\xee\x8a\x1aՆ\x88,`&\uf06dj\x1b) Qێ\x8a\xa6J\x03\xec\xaa\\\rQL\xd9\x1b8x\xd5ZQ\xbf-\x14\xebg\xc5/\xa3\xc5ݔ\xa6w\x88\v0\x9f]JK\xc1\x8b\xf9\xb7=b\xc90a\r\x13\x82\xd5\x1a*\x95\x9f\xf6dr\x89Ĺ6-#@\xaa;~\x89-\xb5\x1d\x10\xbe57lק\xe9JW\x12\xbd\f\xbbx,{\xbf\xf4ɘ\xb76\x96;\x92\xab\x86\xc6)\xd5Q\xa1#\x06\xe3S\xee\xa0CF\x81DF\x90\x95L\xfa\x0e0\u007f \xabx\xf1x='\xa9,pR\xd8\xca49\x156\xbe\xed(!5\x80\x02\x82S\xa7F\xd0\xf5\x96\x9f\xad\xf9\xeaD\x97n\xad\xf0k\xc1r\xd2\xda$\x92e;O\xc49n\x93\x94\xf8j,\x92\xb0\bZqS\x97\x82\xe1ܵ\x92\x16\x16*JF\xbe\fT\xe82\xae\x97\xa0\xc5du\x9f\x1b\xe3U-S\x1d\xd95\xf7Ú\x1a\x1a\x88\x13U6\x9cx|\x8a\xa8ҿƸ\f\xfa:9\xa51\xf5\"0f\xf7\xda\xdePm\xe3-\x84/\xa4\xa8\xb5\xa0\x8c\xf1\x1fgZ\\\xac\x13\xc9\xeb\xf2%\x13\x80ul\xcdל3\xa0\xe4'W\xbc\xe6\xef3C\x0f\xbcz\xd3y\xa7\x9b\xaci\xd7\xfc\xa1RB\x82\xafj\x1d\xd0?\\GǾ\xd8Ψ?e\xd1!\x1cZ\xf0\xe1Ӧ\xa5\xa0j\xedj\xda\xfa\xb8t\x94\x1c\x98)K\x83\xaf\xe8\xab\x1f\xad\x81\xa2\x0fK\x17\xd6݁z\xa8;\xb9\xbfd\x16\r\xe5i\x14R\x13m\a\xab\x9bjqXo\xeb\x88Z\r\x15p\x1a\xca\xc8/\b=^3\b\x9f'0\x9f\xb5\xf2H\xea\xc7.y\xc6ە8a[\xa4+L\x1e\xf0\x8f\xb3\x99\x06mSWXVA\xe0O\xd5\\\x03崶\xa5x>J\x12c7\x02\xa5\xcc\xd5\x13\xec\x13e3ؓ$\x80F\x01\x10\x1a\x9f\x97\xe1-|\bS\xe6\x9b\x02\xda\xe1`\x9f\\~\x8c͖\x84Xn\x1dI\xf2bC\b4g\xca[\x98\xeeI\xd3\xc1h@>f\xe9\x80n\xcd:)\x15\xaf\x92\x833-\xed|\x9e\x87\xef\xf15\x90\xbbC!\x14\x1a\xe9\x00\xf8͕\f\xfe\xddz+\xb6\x06\xb0B(B\xd3^dJ\rn\xe2 \x96w\x0f\xac\x00%\x9fGV\xe2$'\x19t\xe7\x90\x03\x95\va\xe0\x13!\xca+\xb8\x13\xabE\xe1\xbb\"\x151\xf5\x02\xa0\xc3ܲ\xa5\xba\xbc\xd0\xc5'\xe6uO\x87\x1b\xa0\xb6\xc7,]5TBR<\xa5\b\x12{\x97\xe1\u007f^\xf2\x00\u007fx\x0f\xe7\xf8\xe5\xbf7\xe99\xbc\x1f\xe29~\xf9\xd7<|$1\xc2DSd\x89BњL=\x86\xd2\xcb\xd6\xecFf\x86^_\xc3 \x11Dx\r\xfb\xa4\xa6$\xa2UK\xd43橐\x12`7\x1dE4s\x924)'\x9c\xf1\xde\x19Xr\xff?o\x0e\xe1\xeb!~\xf9m\xd4}\xefҗ\xdf7\xe9\xb5}'\xabDŽ!M\x1c\xd7ȑ\x1a\xff\xd6\f\xaf\xe4\xecK:\xbb.@kӓ\xbb\xdf\xd9\x04m-\x05\xd4Rx\xb1v\xed\xf8;\xddo\x9dC\xa2\xbfJʩ\x14\xcdL\xa9\x91J\xd5\xd3\xf4\xe5\xf7E:w\xe2\xfe\xfc\x98\xba/\x9f\xa7\xe1\x1c^\x83{\xf9P\x180G\x96:\xfd6V\x00X\x84\xb2\x18!]\xba=\x03\xbfm\tfz,x#\xebh\x06rݗ\u007fM\xc3%\x1c\u0085\xa0`u(\xa2\xe5\x8e\xf4\xdegnu]\x18\xfb\x11\xfd\xbaC)\x1dA\xcb\xcc\x04n\\\xcdVL\U000d09716(WO\xbb\xff*A@d\x9e$4\x98\x9a\x03\x1a\xa9\xc1\xcdǓ\xfe}\xb2\xc0E\xb3\xec\xb1\xe9\n\xd6\xf4\xe0Tn\xb1\x9c\xe0\x1f\xef9\x83\xbau\xc0X\"픡\xa1y՞\xf1<2\xef\t\xb7\x06\xaa\xd9Ն\x8c\xf1+\xf6ys\x88\xf1\x1c\xbe\xfc\xb6H\x97wuB\xe0\x8aˮ\xa3\xfc]\xc1\x94DU.\fҍ\x9f\t4$\xe0+u\xe9\b\xa9\x1d\xd8\x19ik[J3\x8d\xad\xe75\x05\fO\x16S\x9d\x1f\x96<\xea\xa28.\xb2H-\x8e\xac\x10\x91BN&biұ\x9eC\f]\xeb\xf2\x1c\xf0KT\xe8\xf9\xea\xe9\xed\x83{M\xf8\xc2\xe4\xee%:\v\xeah*\xe2f&,K\xd2S` ;\x8bN\xe1\xf5\xee\xdb\x1a\xed|4\xc3\n0\xda\x04*,K\xb725\xd9pҰ\x80\xfe\xa2v\xdb\xc0qM\x9bC4\x13ET\xb2\xf3\u07b8\x86j\x9cɥ\xa5\xa2=3\xb01/\xd3c\x1d1\xbb\"\x91\xaa\xe3\x02\xa2Z\xb7\f\t}`/\f\xf0\xd2\x184@A\xeb\xa9-\t\xbb\xcafR\xdbu\x0e\x06M|\x14\xb4\xb34\x8e\xf3\xb8T\xbb\x1b$\xa7\xe8\xf9Ώ\xba\xc42vT\x9a;8\xe97\x12\x95\xc4t\xf0\x10iᆞΘF\x93EQHƤ\xd8\xd04\xf1ΡKv\xe7i\x81\xd90\x9fM\xe9\xf2#\xb6\xd4\xcb4\x06mYű\xc59L\x12\xa5e2E8\xbaIJ&\xf6\xd4z\x96\xc63\x9d\x98\x9b\xef\x1e\x9a\xc2;S\xe20b\xb8\ue113\xe4\fO\x87r\x10u\x00\xa1O\x81~\xc4\x17\x92O\x80fxJķ\x04m\x14\x9b*,\x1aT33\x065#H\x94\xd6\xcc\xfa\xd3L\x89\xe8*\xa9EY,k\xf1NxF^\xfc\xfb\xf0\x10\xbf\xe5 \xe1Ӷ{\xcd3\xb55\f\xb3\\&\x80\x10\x00\x93\u0602\x92(ۃ1\xdbe\xc2K\x06\xab\x9a\x1e6\xda\xe0\xf2t\xa7ܡ\xd1!i}S|\xd6\xc6T\"\u007f\xff\xcfk8\xa7\x97\x90\xe3\xaa\xd7\xf6\x1d]\x8dU\xbc\x93\x16z8\x9a\xdbBk\xf5\x99\xb5\xe9\xdd`T\xd6\tJ\x86\x06\x06\x15\xa6jc2Ck J\x1aKj\xe7\x9d\xdd\x0f]\x05\xb0 \xaf\xe3]5\xc0\xfe\xb5\xa7,\xe9\xa8s\xfc\x83\xafO3\xa8X\xfd\xe7=\xbd\x86/\xffk\x1e_S\xbc\x84o\xe15\xba\x14\x9f6K%\x1e_\xa8ow\xa7\xbf\x10Vwp/\xd7K\xa7\xeb'34\x04F[NHs6B6.\xed\xd1\x05\xfcύ\x99p\xb4\xce\xf3\xef\xdb\xf7\xf4\",ݡ#\xbaݩ\x14\x9f\xb5s\x1fD\x9d\x96Sp\xe7\xcc\xd3:@\xf7@\xabf\x00\xd6X\xf9\x9d-Q4\x02\x85\xfa\xd9\u0604\x85\x8b=\xbaSs\xb2%\xb6ΞU\x8aM\xb4\xe4x[\xc8\x01ձ\xd0qm\xb5\xd8\xd0p\xd5\xfa\x93\x15g\x89\xe6\xb4\xc7\xf3رO\x9eǩ\xe1J\x94\xc3\xd6 \xceU\xd5h\xebQ\t\xe5Ъ\xce(4\x19s\xac\x88\x13\xc6\xee\x16X\x9b\u0082\xeevޚƆ\xb6\x85\x05\xb7,ºVD\xab%\xa5\xa2\x8d\x99 ؿ\xe2x\xa9\x8dng\xd1OK\x170\xb6\x155\x0e\\Yr+\xa5\xbf\x85-8\x8a\x89\x1e\x91\xb9۠\x05j\x14\n\x19I\x82N\xe1\x15RУ\xbe{B\xf2\x83\ueffeW\xe8\xfe0\xb3\x9e\xeb\xc2\b\xb8\xb2\xf6\xe6\x8974\x80*\x00\xd2\x13\x06\xf0\xead\x15X[i\n\xbc\xcf\x1e\x851JQ\xa5\xb6\xa8\f\x9b\x10\xb3\xaa\x9fƂ\xad\x825\x10\xa7\xa8\x19\xfcSBmͲ\xf3ir\xe5rS`|\xe2ڡa݃\xd5R\xda{Y\xb5r\xba\x17*9S\xbd\x86\xf9s'ɵR\x81\x0eO>\t0\xafl\xe6,\xad7\x00\xe9]L[\x919\xaa}h\x15vG\xd6\xfa\xdd\x15\x9a7\x8d\xddv\xe45r\xd3\xcar\xab25kG\xcbc\xc0\rSw\xc7\xd8\xd1A<\x04\xd7Fw\xb9a\xb2\x84\x06\xfa\x93\x03OeglA\xe0\x87@:A\x99\t\xd1\x14\xe5g\xc4}\xc9<_GOՔ\x9e=3\xb3d\x8a\x9dئ\x04\x1bJU\xd7C\xf3\xae\x8e\xf6\x9e\x99\x95\x00d\x85\x19r\xa6- jSȣ\x14h'\x88\xbb\xc2\x12՜\x99\xbd5SCF\x1d\xe0(A\xab)bk\x9c\x8a?\xa8\xf9i\a!s\x98\xbbB\xa9\x9fx=,\x18\x8e\xcb4B7\xd6\xc1\xad\x19ވz\a\xa4R\xa6\xad\xed\x825CR]\xe1\xa6-\x1e\xa0`\xa8JU\xa00m\x13:yR\x97\xe4\x1f)\x1a\xec\xea\x02\xea場\x14\xc0\x94\x85\xe0\xd0\x14\xb5p|\xf5\xc8T\xbb\x87\x06\xe9{pE\x91#\xb7\xe8־ʜ\x1a\xdbXx6\v\xca\xc7ܲƭ\x83\x9d\x15\xe6\xbe0U4\x19skSE~\nE\x9b\v,\x9e\x87΄K\xa1\x80\xdb$\xb76A\xa1\nb\x1e\x14\xc7`)t\x92\x8a\xa5H\xa3Q7;\xcc\v)#\xfa\tD\x85JZ(\xacf6\a\xea}\xc3Ĝ\xc0\xf2A0\xa6\xb7\x17w\xd6\x06\x00\xfe\x87T\b*,9,Z:bO\xcb\u007f3n\xf5[\xec\x93njט\x04\x8cib\x99#\xb1\x99 IF\xb6\x03\x10\v\x96\xa9$\xe0*\xbc\x13\xe2z42\x00\x1c`\x86\xbd{\xe6\x95I\xd9z\x86\x87{\xf1j]\xb5h\xd3\b\xacZg,o\xa4JC\xab\xae\xa8\x9a)\x965_\xf0U\xe7\xd5\x1dt\xe6$\xa3S\xb5\xa7s\xad5k-\x03q\xb5\xa4T\xc1\x1e\x06v2\xed\xb0\xb4\xff\xa9k\xfd\x93Q\xab\xf8B\xb0͆\a\x93s\v\xe5\xafS\x06@\x8b\x13\xae\xa3\xc1\x10\xb5T\xb1\a-\xddE\xe0d\x11y\xea\x88\xf1\\\xb9\xe7\x1b\xb1\xba\xa6\x03\x8fG-\xa7\xce)\xe3\xacy\xa9\x1c\xfd\xe3ϚH˽\x1dP\xbe\x9d\xfc\x11\xa2\xa2g\x149\x90\x19\xfb\u007f\xfc\xff\xff\xcf\xff\xef\xbf\xffw\xff\xfb\xbfz\xf1ҋ\xd7\xff\x8a\xbdx\xaab{\xa9b{\xedŶ\x8a\xed\xa9\x17.\xbdp\xfd\xaf\xd0\v\xa7*u\xd7^\xea\xaaԝzݥ\xd7]\xff\xab\xebu\xa7^{\xfd\xaf\xb6\xf7w\xaa\x9e\xe3\xa5z\x8e\xd7\xdes\xac\x9e\xe3\xa9\xff\x1c\xdbK~\xb8Vϱ\xcd\a\xa7\xea9\\\xaa\xe7p\xed=\x87\xea9\x9c\xfaϩ\xbbVϩ\xcb\a\xa7깻T\xcfݵ\xf7\xdcU\xcf\xf9\x9f\xed\xb5\xf7\xdcV\xcf\xf9m\xe9R=\xa7k\xef9U\xcf)\xbf\xed\x9c\xdfv\xae\x9eo\x97\xea\xf9v\xed=ߪ\xe7۩\xff|\xcb\xcf\xdf\xce\xd5)^\xaaS\xbc\xf6N\xb1:\xc5S\xff\x94\xcf\xe1\x14\xdb|p\xaaN\xe1R\x9dµw\n\xd5)\x9c\xfa\xa7|\x0e\xa7\xd4\xe5\x83Su\xea.թ\xbb\xf6N]u\xca\xffL\x97ꔮ\xbdS\xaaN)\xbf\xf6\x9c_{\xaeN\xb7Ku\xba]{\xa7[u\xba\x9d\xfa\xa7\xfcŧ۹\xff\xfc\x1c/\xf9\xe1Z=?\xc7|p\xfa\xf4\x9c/\x83<^\xf3\x13\xad\x1c\x9e\xfa\xcf\xcf!\xbf2\xe4W\x86|\x90_\x99\xba\xfc\x9a\xd4\xc9a~M\x97_\x93\xaf\xd1s\x97\x0f\xf2S\xf9r>\xb7\xf9 \xff+\xe5\x17\xa4\xfcT\xca\a\xf2!g\xf9\x90|2\xb7\xfc\xd7[\xfe\xeb-\x1f\x9c\xfa\xc7|~\xc7|~\xc7\xe7\x98\x0fN\x9f\x8erf\xf9Q\x0e\xf3kB~Mȯ\t\xf9 ?\xd5姺\xfcT\x97\x0f\xf2S)?\x95\xf2S)\x1f\xe4O\xca_\x9d\x1f\xfb\xc7\xfc\xd5\xc7\xfc\xd5\xc7\xe7[>\xc8\u007f\xbd\xc9_o\xe7\xfe\xe1-^\xf2õ:\xbc\xc5|p\xfatx\xcbg\x91\x1f\xe5\xf0\xd4?\xbc\x85\xfc\x9a\x90_\x13\xf2A~M\xbe>\xf9Q\x0e\xf3k\xba\xfc\x9a.\xbf\xa6\xcb\a\xf9\xa9\x94\x9fJ\xf9\xa9\x94\x0f\xe4mgy[\xfe\xe2[\xfe\xc3-\x1f\xe4?\xdc\xe4\x0f\xb7s\xf5\x16/\xd5[\xbc\xf6\xdeb\xf5\x16O\xfd|2\xd5[l\xf3\xc1\xa9z\v\x97\xea-\\{o\xa1z\v\xa7\xfe[\xea.\xf9\xe1Z\xbd\xa5.\x1f\x9c\xaa\xb7\xeeR\xbdu\xd7\xde[W\xbd\xe5\u007f\xb6\xd7\xde[[\xbd\xa5K\xf5\x96\xae\xbd\xb7T\xbd\xa5\xfc\xbes~˹z\xbb]\xaa\xb7۵\xf7v\xab\xden\xa7\xea\xafx\xa9\xfe\x8a\xd7\xde_\xb1\xfa+\x9e\xaa\xbf¥\xfa+\\{\u007f\x85\xea\xafp\xaa\xfeꮽ\xbf\xba\xea\xaf\xeeT\xfd\x95.\xd5_\xe9\xda\xfb+U\u007f\xa5S\xff\xaf\xfcy\u007f\xa5s\xf5\xd7\xedR\xfdu\xbb\xf6\xfe\xbaU\u007f\xddNկx\xa9~\xc5k\xefW\xac~\xc5S\xffW\x9e\x85\xbf\xf2\x0f\xfa\x15\xdb|p\xaa~\x85K\xf5+\\{\xbfB\xf5+\x9c\xaa_ݥ\xfa\xd5]{\xbf\xba\xeaWw\xaa~\xe5\x97\xe6W\xa5K\xf5+]{\xbfR\xf5+\x9d\xfa\xbf\xf2\xd7\xfdJ\xe7\xea\xd7\xedR\xfd\xba]{\xbfnկ۩\xff+\x8f\xfd_\xb7s\xf5-^\xaao\xf1\xda\xfb\x16\xabo\xf1\xd4\xff\x96\xbf\xf2[l\xf3\xc1\xa9\xfa\x16.շp\xed}\vշp\xea\u007f˗\xef[\xea\xaaoݥ\xfa\xd6]{\xdf\xf2\xe1\xa9\xfa\xd6^{\xdf\xda\xea[~G\xbaT\xdfҵ\xf7-U\xdfR~\xc79\xbf\xe3\\]⥺\xc4k\xef\x12\xabK<\xf5/\xf9k.\xb1\xcd\a\xa7\xea\x12.\xd5%\\{\x97P]©\u007fɷ꒿뒺|p\xaa.ݥ\xbat\xd7ޥ\xab.\xf9\x9f\xed\xb5wi\xabK~o\xbaT\x97t\xed]RuI\xf9\xbd\xe7\xfc\xb6s\xff۷x\xc9\x0f\xd7\xea۷\x98\x0fN\x9f\xbe\xe5\x1f\x97\x0f[9<\xf5\xbf}\v\xf95!\xbf&\xe4\x83\xfc\x9a\xc8\xffJ\xf9\x05)?\x95\xf2\x81|\xc8Y>\xe4\xdc?\xe6\xd38\xe6\xd38~\x8b\xf9\xe0\xf4\xe9(\xa7\x91\x1f\xfb\xc7|\x02\xc7|\x02\xc7o!\x1f\x9c\xfa\xc7\xfc}\xc7\xfc}\xc7o]>\xc8O\xb5\xf9_\xf9\xe5y\xa2\xe7\xef;\xe6\xef;~K\xf9 \u007f\xa2L\xe1\xfc}\x87c\x9e\xa4\xc7\x1d\x8ey)ˏ\xd7\xfcD+\x87\xa7\xfeᘧ\xea1O\xd5c\xc8\a\xf9\x952U\x8f\xa9\xeb\x1f\x8ey\x92\x1e\xe5\x9fy\x82\x1e\xdb\xfc\xba6\x1f\xe4\u007f\xa5Ku\x8c\xf9\xbfk\xef\x18\xabc<\xf5\xf3\xc7W\xc7\xfc\x9b\xf2\x1d=\x86k\xef\x18\xaac\xfeA\xf9F\xe6\x8f<\xe6\x1by\xec.ձ\xbb\xf6\x8e]u\xcc\xffl\xaf\xbdc[\x1d\xf3[\xf2g\xa6k\uf62ac\xcao;緝\xfb\x87\x1f\xf9\x17\xfdȿ\xe8G\xcc\a\xa7O\x87\x1f\xf2[~\xe4\xdf\xf2C~ˏ\xfc[~\xe4\xdf\xf2#\xe4\x83\xfc\x1a\xf9-?\xf2\xb2\xf3C\x96\x9d\x1fy\xc5\xf9\xd1\xe5\x83\xfc\xaf\xfc\x83~\xb4\xf9 \xff+\xaf??\xf2\xfa\xf3#\xe5\x03y\xffYޟ\xcf\xe0\x96\xff\x9a\x17\xa1\x1f\xb7|\x90\xff*\x8bЏ۹\xfa\x11/Տx\xed\xfd\x88Տx\xea\xff\xc8\x137\x9f_\xf5#\xb6\xf9\xe0T\xfd\b\x97\xeaG\xb8\xf6~\x84\xeaG8\xf5\u007f\xe4\xe1\x9dϮ\xfa\x91\xba|p\xaa~t\x97\xeaGw\xed\xfd\xe8\xaa\x1f\xf9\x9f\xed\xb5\xf7\xa3\xad~\xe4\xf7\xa6K\xf5#]{?R\xf5#\xe5\xf7\x9e\xf3\xdb\xceՏۥ\xfaq\xbb\xf6~ܪ\x1f\xb7S?\x9fN\x95\xcf\xe6%^\xaa\x97x\xed\xbd\xc4\xea%\x9e\xfa/\xf9l^\xf2ټ\xc46\x1f\x9c\xaa\x97p\xa9^µ\xf7\x12\xaa\x97p\xea\xbf\xe4\xb3y\xc9g\xf3\x92\xba|p\xaa^\xbaK\xf5\xd2]{/]\xf5\x92\xff\xd9^\xaa\x97\xf6\xda{i\xab\x97\xfc\xfet\xa9^ҵ\xf7\x92\xaa\x97\x94\xdf\u007f\xceo=W\xaf\xf1R\xbd\xc6k\xef5V\xaf\xf1\xd4\u007f\xcd_\xfa\x1a\xdb|p\xaa^åz\r\xd7\xdek\xa8^é\xff\x9a\xbf\xef5u\xf9\xe0T\xbdv\x97굻\xf6^\xbb\xea5\xff\xb3\xbdT\xaf\xed\xb5\xf7\xdaV\xaf\xf9\xad\xe9R\xbd\xa6k\xef5U\xaf)\xbf\xf5\x9c\xdfz\ueffc\xc4K~\xb8V//\xf1\xd3K\xfe\x91\xf9\x9f\xad\x1c\x9e\xfa//!\xff9\xe4?\x87|p\xfa\xf4\x92\u007f\xab<\xe6W\xa6N\x0e\xf3+\xf3\x15x\xc9W\xe0\xa5\xcb\a\xf9\xa9|\xd9^\xf2e{i\xf3A~*\xe5\xa7R~*\xe5\x03\xf9\xbc\xb3|\xd2\xf9ӛ|}~\xec\xbf\xe5/~\xcb_\xfc\xf6\x12\xf2\xc1\xe9ӛ|e~\x94\xc3S\xff-\u007f\xe5[\xfeʷ\x97.\x1f\xe4\xa7\xf2\xe6\xf5\x92\xdf\xdf\xe6\u007f\xa5\xfc\x82\x94\x9fJ\xf9@>\xe4,\x1fr\xee\x1f\xaeyJ\\\xf3\x94\xb8\xc6|p\xfat\xb8\xca$\xbf\xcaĸ\xe6\x89q\x95\x89q\xcd\x13\xe3\x9a'\xc65\xe4\x83\xfc\xca|\x15\xf2c~e\x9e\x1eW\x99\x1e\xd7<\xe1\xafy\x8e\\\xbb|\x90\x9f\xcas\xe4\xda\xe6\x83ӧ\xa3\xfc\xc4\xfc(\x87\xa7\xfe1\xff\xd0c\xfe\xa1Ǘ\x90\x0f\xf2k\xf2g\x1f\xe5\xe7\xe6\xc7\xfe1\xff\xd0c\xfe\xa1\xc7\x17\xf9W~[^(^\xda|p\xaa\x0e\xf9\x97\xe4\xa1r\x88mu\b\x97\xea\x10\xae\xbdC\xa8\x0e\xe1\xd4?\xe4\xa1y\xc8C\xe5\x90W\xa4\xe2\xb5\xf7\x11\xab\x8fx\xea\u007f\xe4\xd3\xf8\x88m>8U\x1f\xe1R}\x84k\xef#T\x1f\xe1\xd4\xffȟ\xf7\x91\xba|p\xaa>\xbaK\xf5\xd1]{\x1f]\xf5\x91\xff\xd9^{\x1fm\xf5\x91ߖ.\xd5G\xba\xf6>R\xf5\x91\xf2\xdb\xce\xf9m\xe7\xea\xe3v\xa9>n\xd7\xdeǭ\xfa\xb8\x9d\xfa\x1fy\xbe~\xdc\xce\xd5\xd7x\xa9\xbe\xc6k\xefk\xac\xbe\xc6S\xffk\x9e\xaf_\xf3\x89|\x8dm>8U_å\xfa\x1a\xae\xbd\xaf\xa1\xfa\x1aN\xfd\xaf\xf9D\xbe\xa6.\x1f\x9c\xaa\xafݥ\xfa\xda]{_\xbb\xeak\xfeg{\xed}m\xab\xaf\xf9m\xe9R}M\xd7\xde\xd7T}M\xf9m\xe7\xfc\xb6s\xf5\xf5v\xa9\xbeޮ\xbd\xaf\xb7\xea\xeb\xed\xd4\xff\x9aO\xe4\xeb\xed\xdc\xff\xf8\x88\x97\xfcp\xad>>b>8}\xfa\xf8\xc8c*?^\xf3\x13\xad\x1c\x9e\xfa\x1f\x1f!\xbf2\xe4W\x86|\x90\x9f\xcaW\xe7\xa3\xcb\a\xf9_\xf9B~\xb4\xf9 \xff+\xe5\u007f\xa5|\x90?3\x8f\xe2\xfc\xd8\xff\xf8\xb8\xe5Ϲ\xe5\xbf\xde\xf2A\xfe\xebM\xfez;\xf7\x8f\xf9|\x8e\xf9|\x8e\x1f1\x1f\x9c>\x1d\xe5L\xf2\xa3\x1c\x9e\xfa\xc7|&\xc7|&Ǐ\x90\x0f\xf2kd\xec\xe5;u\xfc\x90\xa3<\xe4\xf2\t\x1d?\xda\xfc|>H\xf9@^{\x96\xd7\xe6oˑo>\x97\xe3\xc7-\x1f\xe4\xbfJ\xe4\x9bo\xd2{\xbcT\xef\xf1\xda{\x8f\xd5{<\xf5\xdf\xf3\xfdy\x8fm>8U\xef\xe1R\xbd\x87k\xef=T\xef\xe1\xd4\u007f\xcf\xf7\xe7=u\xf9\xe0T\xbdw\x97꽻\xf6\u07bb\xea=\xff\xb3\xbd\xf6\xde\xdb\xea=\xbf-]\xaa\xf7t\xed\xbd\xa7\xea=川\xf3\xdb\xce\xd5\xfb\xedR\xbd߮\xbd\xf7[\xf5~;\xf5\xdf\xf3\xfdy\xbf\x9d\xfb\xef\xef\xf1\x92\x1f\xae\xd5\xfb{\xcc\a\xa7O\xef\xf9D\xf2a+\x87\xa7\xfe\xfb{ȯ\t\xf95!\x1f䧺\xfcT>\xa7\xf7.\x1f\xe4\xa7\xf2鿷\xf9 \xff+\xe5\x17\xa4\xfcT\xca\a\xf9\xa9[~ꖟ\xba\xe5\x83\xfcU\xf9b\xe4\xc7\xfe\xc7!\xdf\xfeC\xbe\xfd\x87\x90\x0fN\x9f>\xf2$\xed\xe7G9<\xf5?\x0e]~M\x1e\x14\x87.\x1f\xe4\xa7\xda\xfcT\x1e\x19\x876\x1f\xe4\xa7R~*\x0f\x8fC\xca\a\xf2Ig\xf9\xa4\xfc=yx\x1c\xf2\xf08\xdc\xf2A\xfe\xab\f\x8f\xc3\xed\xdc\xff\x9a\xcf\xe2k>\x8b\xaf\x87\x90\x0fN\x9f\xbe\xe6\xf5B\x1e\xaf\xfd\xfc(\x87\xa7\xfe\xd7|._\xf3\xb9|=t\xf9 ?\x95gY>\x97\xaf\x876\x1f\xe4\xa7R\xfeW\xca\a\xf2Qg\xf9\x90\xfcE\xb7\xfc\xda[\xfe\xeb-\x1f\xe4\xbf\xde䯷s\xff|\x0e\xd7\xea|\x0e\x9f\xce\xe7\xfc\xb5\xf9\xb1\u007f>w\x97\xfc\x90\xff \xff:\xf5\xcf\xe76?\xd5\xe6\xa7\xda|\x90\x9fJ\xf9\xa9\x94\x9fJ\xf9\xe0\x94?\xe3,\x9f\x91?\xf7\x96\xffz\xcb\u007f\xbd\xe5\x83\xfcכ\xfc5ύs\x1e\xf7\xf9\xab\x8f\xe7\x90\x0fN\xfdc\xfe\xbe\xe3\xb9\xcb\a\xf9_m~A\x1e\xf5\xe76\x1f\xe4\xa7rؘ\xbf\xefxN\xf9\xe0\xf4\xe9(ߗ\x1f\xfb\xc7\xfc}\xc7\xfc}\xc7\xf3-\x1f\xe4\xbf\xca\xf8\xcf\xdf\xf7\x9e/\xf6{\xbe\xd8\uf1d0\x0fN\x9f\xde\xe52\xe7G9<\xf5\xdf\xf3e~ϗ\xf9\xfd\xd0\xe5\x83\xfcT\x9b\x9fʣ\xed\xd0\xe6\x83\xfcT\x1em\xf9Z\xbf\x1fR>\x90O:\xcb'\xe5\xef\xc9\x03/_\xeb\xf7\xc3-\x1f\xe4\xbf\xca\xc0;\xdc\xce\xd59\\\xaas\xb8\xf6Ρʿ8_\xf0J\xaew\x9eh\xe7\xeeR\x9d\xbbk\xef\xdcU\xe7\xfc\xcf\xf6\xda;\xb7չ=U\xe7t\xa9\xce\xe9\xda;\xa7\xea\x9c\xf2\xdb\xce\xf9m\xe7\xea|\xbbT\xe7۵w\xbeU\xe7۩\x9f\u007fmu\xbe\x9d\xab\xef\xf1R}\x8f\xd7\xde\xf7X}\x8f\xa7\xfe\xf7\xbc\"\u007f\xcf3\xfe{l\xf3\xc1\xa9\xff=\xefK\xdf\xf3\xd7\u007fO]>8U\u07fbK\xf5\xbd\xbb\xf6\xbew\xd5\xf7\xfc\xcft\xa9\xbe\xa7k\xef{\xaa\xbe\xa7\xfc\x86s~\xed\xb9\xfa~\xbbT\xdfo\xd7\xde\xf7[\xf5\xfdv\xea\u007f\xcf\xdf\xf9\xfdv\xae~\xc6K\xf53^{?c\xf53\x9e\xfa?\xf3w\xfe\xcc\xdf\xf93\xb6\xf9\xe0\xd4\xff\x99\xbf\xf3g\xfeΟ\xa9\xcb\a\xa7\xeagw\xa9~v\xd7\xdeϮ\xfa\x99\xff\x99.\xd5\xcft\xed\xfdL\xd5ϔ\xdfpί=W?o\x97\xea\xe7\xed\xda\xfby\xab~\xdeN\xfd\x9f\xf9;\u007f\xde\xce\xfd\xef\xdf\xe3%?\\\xab\xef\xdfc>8}\xfa\x9e\u007f\xac<^\xf3\x13\xad\x1c\xe6\xa7\xf3\xbdΏrx\xea\u007f\xff\x9e/\xc0\xf7|\x01\xbew\xf9 ?\x95\xf2S)?\x95\xf2\x81\xbc\xed,o\xcb\xdfu\xcb\u007f\xbd\xe5\xbf\xde\xf2\xc1\xa9\u007f\xcc_\u007f\xcc_\u007f\xfc\x1e\xf3\xc1\xe9\xd3Q\xbe\xfe(_\x9f\x1f\xe50?-Kz\xbe\xd6\xc7\xfc\xc5\xc7\xfc\xc5\xc7\xef\xf2\xaf\xfc9yH\u007fO\xf9@^{\x96מ\xfb\xc7\xfc\x9d\xc7\xfc\x9d\xc7\xef\xb7|\x90\xff*C\xfa{\x9eB\xb7\xfc\xf5\xb7\xfc\xf5\xb7\x98\x0fN\x9f\x8e7\xf9\xfa\x9b|\xfd-\u007f\xfdM\xbe\xfe&_\u007fK\x9d\x1c\x9e\xfa\xc7[>\x89[>\x89[\x97\x0f\xf2Syr\xdd\xf2\x99\xdcR>8U\xd7x\xa9\xae\xf1ڻ\xc6\xea\x1aO\xfd\x1c\x9e\xe5\x87ku\x8dm_b\xb3\x1c\x81U\xd7\xd4U\xd7\xeeR]\xbbk\xef\x9a\x0fO\xd5\xf5v\xa9\xae\xb7k\xefz\xab\xae\xb7S\xff\x9ao\xd8\xf5v\xaen\xf1R\xdd\xe2\xb5w\x8b\xd5-\x9e\xfa\xf9l\xf3õ\xba\xc56\x1f\x9c\xfa\xb7\xef\xf0\xff\x9b\xf7\xf1_\xb1U\xfc\xdfw\xff\xbc\xfe\xc7|\xfd\x1f\x9f\xe3߱~\xfeW\xff\x86\xff\xbe\xbf\xe1\xbf\xd5\x1e\xfe\xaf\xfc\r\xffs\xde\xe1?\xfev\xf8\x9f\xf1\xf3\xfa_\xe7\xeb\xdf;?\xe7\xdf\xcb\x0e\xff\xb5\u007f\x8f\u007f/9\xbe\xfe\xcf\xfe\xfa/\xf3\xf8\x8f\xbfy\x87\xff-\xc7\u05ff\xed\xe3\xdfp\x0f\xfe-\u007f\x8e\xff\x86\r\xed\u007f`\x83\x89\xef\xfc\x1f\xd8<\xfe\xdb_\xfc\xf9_\xd8\xe2\xe0\xa5\xd7\xff?\xfe\xbf\xfe?\x16\xff\xf3\u007f\xff\xfc\xdf?\xff\xf7\xcf\xff\xfd\xf3\u007f\xff\xfc\xdf\xff\x17\xff\xa7\xff䙎t&\x86\x11\xd2َt\xb6\x82\xf0\x17\xd2\xe9!\x9dב\xce\vׯ\x8a`\b\x03\xe1\x8b\xf0A\xc0\xd4\x1a҉k\x86O\xc1\xf5\x81\xd0RHg\t\xe9\xfc\r\xe9|?\xff\xad\xf5\x13҉\xb7\xc4#\x9d1\xfd (\xe2\x1d\xb1Ꮽ0\xfe\xe1\x05G\xb8\xf0\xf5\xc5iWe4\xc6\xc1\xf8e\xfc0\xf2=H5r\x86\xf1C9m06\xfc,\x11?b\xfcEx#\xe0g\x89\xf8Y\xe2_H\xfb<\xd2>\xd3\x0f\x82\xe2\xc0\v\r\u007fDb\xfbDb\xfbt\x84\v__\x9c\x86\xc4\xf6\x89\xc4\xf6\x89\xc4\xf6\x89\xc4\xf6\x89\xc4\xf6y\xf1=\x15\x813\x8c\x1f\xcai\x83\x11\x89\xed\xb3 \xfc\"\xbc\x11\xbe\b\x1f\x04\xbe=bbL\xff`|\x06\xbe96~ъ\x86?\xbe\xe6\x8c\x17_\xba4\xfb\xaa\x1aL\xc3\xd0\xf0\xd5\xf0Ѡ7\U000c725ag\xfa\x1e\x9a=44\xfȇ\xf7#\xfe2\xbe\x19\xf93G\xfe̸\x9b\xb1\x1f)\xf6\xf4\x83\xa08\xf0B\xc3\x1fq7c\xc7\u074c\xdd\x11.|}q\x1a\xeef츛\xb1\xe3nƎ\xbb\x19;\xeef\xec\x17\xdfS\x118\xc3\xf8\xa1\x9c6\x18q7c/\b\xbf\bo\x84/\xc2\a\xe1O\xff\xf9\x1e\x93\x12\xc3\b)\xb6#E\x88?B\xfc\xd1C\x8aב\"\xc4\x1f!\xfe\b\xf1G\x88?B\xfc\x11\xe2\x8f\x10\u007f\xac!E\\\x83\xf8#\xaeC\xfc\x11\xe2\x8f%\xa4\xf8\x1bR|?}\x83OH\x11\x8f2\xf6\x1f\x04<\x15\xdc\x18\r\x83\xaf5~\xc1G\x89\x9b\xc3ל\xf1\xe2K\x97f\xf3Q\xe2\x0ei\x18\x1a\xbe\x1a>\x1a\xf4\xe6ʨy\xa6\xef\xa1\xd9C\x03\x1fe\xec\x85\xf1\x97\xf1\xcd\xf8e\xfc0baD$\xce\xc9I\x11\x1aƊ\xdd\\\xb1\x9b+vc\xc5n\xac\xd8\xcd\x15\xbb\xb9b7W\xec\xe6\x8a\xdd\\\xb1\x9b+vs\xc5n\xac\xd8\x1d9\x83\v#r\x1a\x17\x06W\xecƊ\xddX\xb1\x1b+vc\xc5n\xac\xd8\x1d\xffԘIG\xea\x89a\x84\xd4ۑ:\x1eeǣ\xec\x1eR\xbf\x8e\xd4\xf1(;\x1eeǣ\xecx\x94\x1d\x8f\xb2\xe3Qv<\xca^C긆G\xd9q\x1d\x8f\xb2\xe3Q\xf6\x12R\xff\r\xa9\xbf\x9f\x8e\xd0'$ܕu\x1ei\xc1.\x16\xedb\xd1.\x16\xecb\xd1.\x16\xedb\xc1.\x16\xecb\xd1.\x16\xedb\xd1.\x16\xedb\xd1.\x16\xedb\xd1.\x16\xecb\x9d\x9ca\xfcPN\x1b\x8c\xb8+\vv\xb1`\x17\vv\xb1`\x17\vv\xb1N\xbe=b\"\xecb\xc9.\x96\xecb\xd1.\x96\xecb\xc9.\x16\xedb\xd1.\x96\xecb\xc9.\x96\xecb\xc9.\x96\xecb\xc9.\x96\xecb\xd1.\x16\xedb\xc9.\x16\xedb\xc9.\x96\xecb\xd1.\x16\xedb\xd1.\x16\xedb\xd1.\x16\xed\xa2\xc7#uh\xacSc\x9d\x1a\xeb\xd0X\xa7\xc6:5֡\xb1\x0e\x8duj\xacSc\x9d\x1a\xeb\xd4X\xa7\xc6:5֩\xb1\x0e\x8d\xf5\xc8\x19\xc6\x0f\xe5\xb4\xc1\x88\xbb١\xb1\x0e\x8duh\xacCc\x1d\x1a\xeb\xac\n\xfdH\x1b>\xb6\xe9c\x9b>\xb6\xe1c\x9b>\xb6\xe9c\x1b>\xb6\xe1c\x9b>\xb6\xe9c\x9b>\xb6\xe9c\x9b>\xb6\xe9c\x9b>\xb6\xe1c\xbbs\x06\xc5\xdf9\x8d⧏m\xf8؆\x8fm\xf8؆\x8fm\xf8؆\x8f͐f:\xd2L\f#\xa4َ4!\xfe\t\xf1O\x0fi^G\x9a\x10\xff\x84\xf8'\xc4?!\xfe\t\xf1O\x88\u007fB\xfc\xb3\x864q\r⟸\x0e\xf1O\x88\u007f\x96\x90\xe6oH\xf3\xfd4\xb6\xe8cK>\xb6\xe4c\x8b>\xb6\xe4cK>\xb6\xe8c\x8b>\xb6\xe4cK>\xb6\xe4cK>\xb6\xe4cK>\xb6\xe4c\x8b>\xb6\xe8cK>\xb6\xe8cK>\xb6\xe4c\x8b>\xb6\xe8c\x8b>\xb6\xe8c\x8b>\xb6\xe8c+\"qNN\x8aX\\\xd0آ\xc6\x165\xb6\xa0\xb1\x05\x8d-jlQc\x8b\x1a[\xd4آ\xc6\x165\xb6\xa8\xb1\x05\x8d\xad\xc8\x19\\\xb1\x91Ӹb\xa9\xb1\x05\x8d-hlAc\v\x1a[\xd0\u0602\xc6V>\xd2\xca\xf8^9)\xe232\x12\xcbL,3\xb1\x8c\xc42\x12\xcbL,3\xb1\xcc\xc42\x13\xcbL,3\xb1\xcc\xc42\x12˜\xc1\xc42\xa71\xb1\xcc\xc42\x12\xcbH,#\xb1\x8c\xc42\x12\xcb\x10\xff<Ҟ\xd0\xf3L\x8a\xd0\xe9\x84\xf8'\xc5?)\xfe\t\xf1O\x88\u007fR\xfc\x93\xe2\x9f\x14\xff\xa4\xf8'\xc5?)\xfeI\xf1O\x88\u007fr\x06\xc5?9\x8d\xe2\x9f\x14\xff\x84\xf8'\xc4?!\xfe\t\xf1O\x88\u007f\xa2\xf4\xce#E$\x16\x99Xdb\x11\x89E&\x16\x99XDb\x11\x89E&\x16\x99Xdb\x91\x89E&\x16\x99Xdb\x11\x89\xc5\xc9\x19\xdc]LN\xe3\ue089E$\x16\x91XDb\x11\x89E$\x16\x91\xd8\xceG\xdax\x94\x9b\x8fr\xf3Qn<\xca\xcdG\xb9\xf9(7\x1e\xe5ƣ\xdc|\x94\x9b\x8fr\xf3Qn>\xca\xcdG\xb9\xf9(7\x1f\xe5ƣܙ3x\xc72\xa7\xf1\x8e\xf1Qn<ʍG\xb9\xf1(7\x1e\xe5ƣ\xdc\xf9O\a!ґrb\x18!\xe5v\xa4\f\xbbȰ\x8b\xec!\xe5\xebH\x19v\x91a\x17\x19v\x91a\x17\x19v\x91a\x17\x19v\x91kH\x19\xd7`\x17\x19\xd7a\x17\x19v\x91KH\xf97\xa4\xfc~N`|B\x82\x8et\xf4 \xfd (\x0e\xbc\xd0\xf0Gܕ\xc4Z\x99P+\x13jeb\xadL\xac\x95\x89\xb52\xb1V&\xd6\xca\xc4Z\x99X+\x13je:9\xc3\xf8\xa1\x9c6\x18qW\x12jeB\xadL\xa8\x95\xcfq\b\x1e\x8c\xe0\xdb#&\xa2V&\xd5ʤZ\x99X+\x93jeR\xadL\xac\x95\x89\xb52\xa9V&\xd5ʤZ\x99T+\x93jeR\xadL\xaa\x95\x89\xb52\xb1V&\xd5\xca\xc4Z\x99T+\x93jeb\xadL\xac\x95\x89\xb52\xb1V&\xd6J\x80ʑ\xd2>\u007f\x10\xf0\xfd\xc1*\x1a\x06_k\xfc\x82I\x83W\xf8\x9a3^|\xe9\xd2l&\rh\xd104|5|4\xe8͕Q\xf3L\xdfC\xb3\x87\x06&\xbd\xcf\xc2\xf8\xcb\xf8f\xfc2~\x18\xf5Q\x91o\x88\xe9_5\xfc\xe7\xa8ωM_\xb6\xf2\x8c\u007fz\xd95\\z\xf5z\xdet\xd5g\xb4g\x1c\xcf\xf8}\xc6\xcf3>\x9f\xa2\x1f7>\xb3\xed\xf9\x96ϛ\xc636ݛ\xa8\x9b\x17\u007f5\xbc5\xe8\xdeD\xdd\x1b>\x05\x94\xc0\xc4\x12\x98T\x02\x93J`b\tL*\x81I%0\xb1\x04&\x96\xc0\xa4\x12\x98T\x02\x93J`R\tL*\x81I%0\xa9\x04&\x96\xc0\xc4\x12\x98T\x02\x13K`R\tL*\x81\x89%0\xb1\x04&\x96\xc0\xc4\x12\x98X\x02\x13K\xa0\x8e\xf1prRĚA\tL,\x81\x89%0\xa1\x04&\x94\xc0\xc4\x12\x98X\x02\x13K`b\tL,\x81\x89%0\xb1\x04&\x94\xc0\x149\x83\v1r\x1a\x17\"K`B\tL(\x81\t%\xf09Z\xc4CF\x94G\xec\xff`\xe4\x13\xc6\r}ơ\x97\x9b\xbe\x94\xbd\xe9ӛ>\xbd\xe9ӛ>\xbd\xe9ӛ>ͳ\x95\x98\xcc\xfdm\xe2\xfe6a\u007f\x9b\xb8\xbfM\xdc\xdf&\xeco\x13\xf6\xb7\x89\xfb\xdb\xc4\xfdm\xe2\xfe6q\u007f\x9b\xb8\xbfM\xdc\xdf&\xeeo\x13\xf6\xb7ir\x06\x17\xe2\xe44.D\xeeo\x13\xf6\xb7\t\xfbۄ\xfd\xedsޓ'?\xa9i\xfa\xf4\x92O\xafǧ\xd7\xe3\xd3K>\xbd\x1e\x9f^\x8fO/\xf9\xf4\x92O\xafǧ\xd7\xe3\xd3\xeb\xf1\xe9\xf5\xf8\xf4z|z=>\xbd\x1e\x9f^\xf2\xe9%\x9f^\x8fO/\xf9\xf4z|z=>\xbd\xe4\xd3K>\xbd\xe4\xd3K>\xbd\xe4\xd3K>\xbd\"\u007f*\xbd)=\x03W=5\xbd\xa4\xe9%M/jzQ\xd3K\x9a^\xd2\xf4\x92\xa6\x974\xbd\xa4\xe9%M/izQ\xd3+j\x9e\x9c%j\xb6\x9cE\x9a^\xd4\xf4\xa2\xa6\x175\xbd\xa8\xe9EM/jze\xfc1\xf3\xfb\xe7\xf4\f\xfc\xc0̤\xb3\x92\xceJ:3\xe9̤\xb3\x92\xceJ:+鬤\xb3\x92\xceJ:+\xe9̤\xb3\xe6)\xe9\xac\xd9J:+\xe9̤3\x93\xceL:3\xe9̤3\x17ℼ'\xd7\xd4L\xcf\xc0E2\xb9\x10\xa7\x16\xe2\xd4B\x9c\\\x88\x93\vqj!N-ĩ\x858\xb5\x10\xa7\x16\xe2\xd4B\x9cZ\x88\x93\vqj\x9e\x16\xe2\xd4l-ĩ\x858\xb9\x10'\x17\xe2\xe4B\x9c\\\x88<ռ'\xb75H:2騤\xa3\x92\x8eL:*騤#\x93\x8eL:*騤\xa3\x92\x8eJ:*騤\xa3\x92\x8eL:N\xcd\xd3.oj\xb6vyJ:2\xe9Ȥ#\x93\x8eL:2\xe9Ȥ7\xe4\xb1)\x8f-yl\xc9cS\x1e[\xf2ؒǦ<6\xe5\xb1%\x8f-yl\xc9cK\x1e[\xf2ؒǖ<6屳\xe6\xe9Ng\xcd֝\x96<6\xe5\xb1)\x8fMyl\xcacS\x1e\x9b\x8c\x98\x8f\x94@Ή\xe4\x9cH\xce\t\xe4\x9cHΉ\xe4\x9c@\xce\t\xe4\x9cHΉ\xe4\x9cHΉ\xe4\x9cHΉ\xe4\x9cH\xce\t\xe4\x9c2g\xd0\xf22\xa7\xd1\xf2H\xce\t\xe4\x9c@\xce\t\xe4\xfc\x9c\xa8\x87\xe5\xe5?\xfd\xfd\x8dt\xb431\x8c\xd0\xcev\xb4\xb3\x15\x84\xbf\xd0N\x0f\xed\xbc\x8ev^\xb8~U\x04C\x18\b_\x84\x0f\x02\xa6\xd6\xd0N\\3|\n\xae\x0f\x84\x96B;Kh\xe7oh\xe7;\xb4\xf3\x1b\xda\xf9\t\xed\xc4[\xe2\xd1Θ~\x1a\xbbe\x8dݲvƆ?\xb6\xc2\xf8\x87\x17\x1c\xe1\xc2\xd7\x17\xa7]\x95\xd1\x18\a\xe3\x97\xf1\xc3\xc8\xf7 \xd5\xc8\x19\xc6\x0f\xe5\xb4\xc1\xd8\xf0\xb3D\xfc\x88\xf1\x17ፀ\x9f%\xe2g\x89\u007f\xa1\xed\xf3h\xfbL?\x8dݲ\xc6nY\xdbg\xc3\x1f\x91\x18\xbbem\x9f\x8ep\xe1\xeb\x8bӐ\x18\xbbe\x8dݲ\xc6nYc\xb7\xac\xb1[\xd6\xf6Y\x118\xc3\xf8\xa1\x9c6\x18\x91\xd8>\v\xc2/\xc2\x1b\xe1\x8b\xf0A\xe0\xdb#&\xc6\xf4\x8f\xa6nYS\xb7\xac\xb1[\xd6\xd4-k\xea\x965v\xcb\x1a\xbbeMݲ\xa6nYS\xb7\xac\xa9[\xd6\xd4-k\xea\x965u\xcb\x1a\xbbe\x8dݲ\xa6nYc\xb7\xac\xa9[\xd6\xd4-k\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nYc\xb7\xac\xc5~\xb4\xd8\xd3Oc\xb7\xac\xb1[\xd6bo\xf8#\xee&\xbbe-vG\xb8\xf0\xf5\xc5i\xb8\x9b\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nY\x8b\xbd\"p\x86\xf1C9m0\xe2n\xc6^\x10~\x11\xde\b_\x84\x0f\u009f\xfeR\x12&%\x86\x11ZlG\x8b\x10\u007f\x84\xf8\xa3\x87\x16\xaf\xa3E\x88?B\xfc\x11\xe2\x8f\x10\u007f\x84\xf8#\xc4\x1f!\xfeXC\x8b\xb8\x06\xf1G\\\x87\xf8#\xc4\x1fKh\xf17\xb4\xf8\x0e-~\xf5נ\"\x1ee\xec?\x8dݲ\xa6nYS\xb7\xac\xb1[\xd6\xd4-k\xea\x965v\xcb\x1a\xbbeMݲ\xa6nYS\xb7\xac\xa9[\xd6\xd4-k\xea\x965u\xcb\x1a\xbbe\x8dݲ\xa6nYc\xb7\xac\xa9[\xd6\xd4-k\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nYc\xb7\xac\xed\x88\xc499)B\xc3X\xb1\xec\x965v\xcb\xdaƊ\xddX\xb1\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nYc\xb7\xac\xb1[\xd66V쎜\xc1\x85\x119\x8d\v\x83+vc\xc5n\xac؍\x15\xbb\xb1b7V\xec\x8e\u007f\xfa\xabf\xe9h=1\x8c\xd0z;Zǣ\xecx\x94\xddC\xeb\xd7\xd1:\x1eeǣ\xecx\x94\x1d\x8f\xb2\xe3Qv<ʎG\xd9kh\x1d\xd7\xf0(;\xae\xe3Qv<\xca^B뿡\xf5\xf7\xf3w\xdc>\xa1ᮬ\xf3h\vv\xc1nYc\xb7\xac-\xd8\x05\xbbe\x8dݲ\xb6`\x17\vv\xc1nYc\xb7\xac\xb1[\xd6\xd8-k\xec\x965v\xcb\x1a\xbbem\xc1.\xd6\xc9\x19\xc6\x0f\xe5\xb4\xc1\x88\xbb\xb2`\x17\vv\xb1`\x17\vv\xb1`\x17\xeb\xe4\xdb#&\xc2.\xd4-k\xea\x965v˚\xbaeMݲ\xc6nYc\xb7\xac\xa9[\xd6\xd4-k\xea\x965u˚\xbaeMݲ\xa6nYc\xb7\xac\xb1[\xd6\xd4-k\xec\x965u˚\xbae\x8dݲ\xc6nYc\xb7\xac\xb1[\xd6\xd8-k억\x1e\x8f֡1v\xcb\x1a\xbbe\xadCc\xec\x965v\xcbZ\x87\xc6:4\xc6nYc\xb7\xac\xb1[\xd6\xd8-k\xec\x965v\xcb\x1a\xbbe\xadCc=r\x86\xf1C9m0\xe2nvh\xacCc\x1d\x1a\xeb\xd0X\x87\xc6:\xab\x02O\x02C\xcf\xf41v\xcbچ\x8f\xb1[\xd6\xd8-k\x1b>\xb6\xe1c\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nYc\xb7\xac\xb1[\xd66|lwΠ\xf8;\xa7Q\xfc\xf4\xb1\r\x1f\xdb\xf0\xb1\r\x1f{N'\xf3\x9c\xf2\x9f\xfe6e:\xdaL\f#\xb4َ6!\xfe\t\xf1O\x0fm^G\x9b\x10\xff\x84\xf8'\xc4?!\xfe\t\xf1O\x88\u007fB\xfc\xb3\x866q\r⟸\x0e\xf1O\x88\u007f\x96\xd0\xe6oh\xf3\xfd\xfc5\xceOh\x13\x1a\x83\x8f\xb1[\xd6\xd4-k\xea\x965v˚\xbaeMݲ\xc6nYc\xb7\xac\xa9[\xd6\xd4-k\xea\x965u˚\xbaeMݲ\xa6nYc\xb7\xac\xb1[\xd6\xd4-k\xec\x965u˚\xbae\x8dݲ\xc6nYc\xb7\xac\xb1[\xd6\xd8-k억\x15\x918''E,.h\x8cݲ\xc6nY[\xd0\u0602\xc6\xd8-k\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nYc\xb7\xac-hlE\xce\xe0\x8a\x8d\x9c\xc6\x15K\x8d-hlAc\v\x1a[\xd0\u0602\xc6\x164\xb6\xf2\xd1V\xc6\xf7\xcaI\x11\x9f\x91\x91Xfb\x99\x89e$\x96\x91Xfb\x99\x89e&\x96\x99Xfb\x99\x89e&\x96\x91X\xe6\f&\x969\x8d\x89e&\x96\x91XFb\x19\x89e$\x96\x91X\xfe\xfb\xcf3\xef\xd0\xf3L\x8a\xd0\xe9\x84\xf8'\xc5?)\xfe\t\xf1O\x88\u007fR\xfc\x93\xe2\x9f\x14\xff\xa4\xf8'\xc5?)\xfeI\xf1O\x88\u007fr\x06\xc5?9\x8d\xe2\x9f\x14\xff\x84\xf8'\xc4?\xdf\xff\xcf9|\x9e\xc8G\xe9\x9dG\x8bH\x8cݲ\xc6nY\x8bH\x8cݲ\xc6nY\x8bH,\"1v\xcb\x1a\xbbe\x8dݲ\xc6nYc\xb7\xac\xb1[\xd6\xd8-k\x11\x89\xc5\xc9\x19\xdc]LN\xe3\ue089E$\x16\x91XDb\x11\x89E$\x16\x91\x98\xfe\xce\x01n\x02\x1f%\xbbem\xe3Q\xb2[\xd6\xd8-k\x1b\x8fr\xe3Q\xb2[\xd6\xd8-k\xec\x965v\xcb\x1a\xbbe\x8dݲ\xc6nY\xdbx\x94;s\x06\xefX\xe64\xde1>ʍG\xb9\xf1(7\x1e\xe5\xf3\xf7 pǰ\xe7ϡ\xe5t\xb4\x9c\x18Fh\xb9\x1d-\xc3.2\xec\"{h\xf9:Z\x86]d\xd8E\x86]d\xd8E\x86]d\xd8E\x86]\xe4\x1aZ\xc65\xd8E\xc6u\xd8E\x86]\xe4\x12Z\xfe\r-\xbf\x9f\xbfE\xfe\t-\xff\xe9\xb7\f\xa4\xc3\x01\x1c\x0e\xe0\xf0\xb3\x1d\x0e\xe0p\x00\x87\x9f\x1e\xfc\xbc\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1g\r~\xe2\x9a\xe1Sp} \xb4\x14\xfc,\xc1\xcf\xdf\xe0\xe7\xfb\xf9\xf5\x06\x9f\xe0'\xde\x12\x0f\ap8\x81\xc3\t\x1c\x0e\xe0p\x02\x87\x138\x1c\xc0\xe1\x00\x0e'p8\x81\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x81\xc3\x01\x1cN\xe0p\x02\x87\x038\x1c\xc0\xe1\x00\x0e\ap8\x80\xc3Q\xf3|\x9f\x87\x038\x9c\xc0\xe1\x04\x0e\ap8\x81\xc3\t\x1c\x0e\xe0p\x00\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\t\x1cN\xe0p\x00\x87\x038\x9c\xc0\xe1\x00\x0e'p8\x81\xc3\x01\x1c\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1\x00\x0e\ap8\x81\xc3\x05\x1c.\xe0p\x02\x87\v8\\\xc0\xe1\x04\x0e'p\xb8\x80\xc3\x05\x1c.\xe0p\x01\x87\v8\\\xc0\xe1\x02\x0e'p8\x81\xc3\x05\x1cN\xe0p\x01\x87\v8\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\t\x1cN\xe0\xf0\xd8\x0f\ap8\x81\xc3\t\x1c\x0e\xe0p\x02\x87\x138\x1c\xc0\xe1\x00\x0e'p8\x81\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x81\xc3\x01\x1cN\xe0p\x02\x87\x038\x1c\xc0\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\xfc\xfd\x19\x98\x94\x18F\xf0\xd8\x0e\ap8\x80ã\a\x8f\xd7\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\x038<\xd6\xe0\x11\xd7 \xfe\x88\xeb\x10?\x80\xc3c\t\x1e\u007f\x83\xc7w\xf0\xf8\xd5o\xec\x88x\x94\xb1\xff8\x81\xc3\x05\x1c.\xe0p\x02\x87\v8\\\xc0\xe1\x04\x0e'p\xb8\x80\xc3\x05\x1c.\xe0p\x01\x87\v8\\\xc0\xe1\x02\x0e'p8\x81\xc3\x05\x1cN\xe0p\x01\x87\v8\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\t\x1cN\xe0\xf0\x1d\x918''Eh\x18+\x96\xc0\xe1\x04\x0e\ap8\x80\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x80\xc3\x01\x1cN\xe0p\x00\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\a\u007f+J:\x1c\xc0\xe1\x00\x0e\xef\xedp\x00\x87\x038\xbc{\xf0~\x1d\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1\x00\x0e\ap8\x80\xc3{\r\xdeq\r\x8f\xb2\xe3:\x1e%\x80\xc3{\t\xde\u007f\x83\xf7\xf7\xf3\xebX>\xc1qW\xd6y8\x80\xc3\t\x1cN\xe0p\x00\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x81\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e\ap8\x80\xc3\t\x1c\x0e\xe0p\x02\x87\x138\x1c\xc0\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\x138\\\xc0\xe1\x02\x0e'p\xb8\x80\xc3\x05\x1cN\xe0p\x02\x87\v8\\\xc0\xe1\x02\x0e\x17p\xb8\x80\xc3\x05\x1c.\xe0p\x02\x87\x138\\\xc0\xe1\x04\x0e\x17p\xb8\x80\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e\xef\xf1p\x00\x87\x138\x9c\xc0\xe1\x00\x0e'p8\x81\xc3\x01\x1c\x0e\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\t\x1c\x0e\xe0p\x00\x87\x138\x1c\xc0\xe1\x04\x0e'p8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\x038\xbc\xb3*\xf4\xc3\x01\x1cN\xe0p\x02\x87\x038\x9c\xc0\xe1\x04\x0e\ap8\x80\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x80\xc3\x01\x1cN\xe0p\x00\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\a\u007f\xf1O:\x1c\xc0\xe1\x00\x0e\x9f\xedp\x00\x87\x038|z\xf0y\x1d\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1\x00\x0e\ap8\x80\xc3g\r>q\r⟸\x0e\xf1\x038|\x96\xe0\xf37\xf8|?\xbfq\xe8\x13|Bc\xf01\x02\x87\v8\\\xc0\xe1\x04\x0e\x17p\xb8\x80\xc3\t\x1cN\xe0p\x01\x87\v8\\\xc0\xe1\x02\x0e\x17p\xb8\x80\xc3\x05\x1cN\xe0p\x02\x87\v8\x9c\xc0\xe1\x02\x0e\x17p8\x81\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1+\"qNN\x8aX\\\xd0\x18\x81\xc3\t\x1c\x0e\xe0p\x00\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\t\x1cN\xe0p\x00\x87\x038\x9c\xc0\xe1\x00\x0e'p8\x81\xc3\x01\x1c\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1\x00\x0e_\xf9p\x00\x87\x138\x9c\xc0\xe1\x00\x0e'p8\x81\xc3\x01\x1c\x0e\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\t\x1c\x0e\xe0p\x00\x87\x138\x1c\xc0\xe1\x04\x0e'p8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1{\x1e\x0e\xe0p\x02\x87\x138\x1c\xc0\xe1\x04\x0e'p8\x80\xc3\x01\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x81\xc3\x01\x1c\x0e\xe0p\x02\x87\x038\x9c\xc0\xe1\x04\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\x038<\xce\xc3\x01\x1cN\xe0p\x02\x87\x038\x9c\xc0\xe1\x04\x0e\ap8\x80\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e'p8\x80\xc3\x01\x1cN\xe0p\x00\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0p\x00\x87\xef|8\x80\xc3\t\x1cN\xe0p\x00\x87\x138\x9c\xc0\xe1\x00\x0e\ap8\x81\xc3\t\x1cN\xe0p\x02\x87\x138\x9c\xc0\xe1\x04\x0e\ap8\x80\xc3\t\x1c\x0e\xe0p\x02\x87\x138\x1c\xc0\xe1\x00\x0e\ap8\x80\xc3\x01\x1c\x0e\xe0\xe0\xaf\x1dK\x87\x038\x1c\xc0\xe1\xb9\x1d\x0e\xe0p\x00\x87g\x0f\x9e\xaf\xc3\x01\x1c\x0e\xe0p\x00\x87\x038\x1c\xc0\xe1\x00\x0e\apx\xae\xc13\xae\xc1.2\xae\xc3.\x00\x1c\x9eK\xf0\xfc\x1b<\xbf\x9f\xdfw\xf6\t\x0e\x1d\xe9\xb7~\xa5\x1f\x04Ł\x17\x1a\xfe\x88\xbb⬕\x8eZ騕\xceZ鬕\xceZ鬕\xceZ鬕\xceZ騕~r\x86\xf1C9m0\xe2\xae8j\xa5\xa3V:j\xe5\xf3\x9b\xc8\xf8;\xc9\xf8\xf6\x88\x89\xa8\x95\xaeZ骕\xceZ骕\xaeZ鬕\xceZ骕\xaeZ骕\xaeZ骕\xaeZ骕\xceZ鬕\xaeZ鬕\xaeZ骕\xceZ鬕\xceZ鬕\xceZ\tP9\xdc\xf7\xf9\x83\x80\xef\xcf\xe3y\x1c\x06_k\xfc\x82I\xf3x\x1e\x06g\xbc\xf8ҥ\xd9L\x9a\xc7\xf38\f\r_\r\x1f\rzse\xd4<\xd3\xf7\xd0졁I\xef\xb30\xfe2\xbe\x19\xbf\x8c\x1fF}T\xe4\x1bb\xfaW\r\xff9\xeasbӗ\xad<\xe3\x9f^v\r\x97^\xbd\x9e7]\xf5\x19\xed\x19\xc73~\x9f\xf1\xf3\x8cϧ\xe8Ǎ\xcfl{\xbe\xe5\xf3\xa6\xf1\x8cM\xf7&\xea\xe6\xc5_\ro\r\xba7Q\xf7\x86O\x01%\xd0Y\x02]%\xd0U\x02\x9d%\xd0U\x02]%\xd0Y\x02\x9d%\xd0U\x02]%\xd0U\x02]%\xd0U\x02]%\xd0U\x02\x9d%\xd0Y\x02]%\xd0Y\x02]%\xd0U\x02\x9d%\xd0Y\x02\x9d%\xd0Y\x02\x9d%\xd0Y\x02\xf5\xcb\xf489)b͠\x04:K\xa0\xb3\x04:J\xa0\xa3\x04:K\xa0\xb3\x04:K\xa0\xb3\x04:K\xa0\xb3\x04:K\xa0\xa3\x04z\xe4\f.\xc4\xc8i\\\x88,\x81\x8e\x12\xe8(\x81\x8e\x12\xe8(\x81\xfa\xbd~\x91\xf2\x88\xfd\x1f\x8c|\xc2<\xf6\xa1q\xe8\xe5\xa6/%\x0f\x1e\xfb\xe0\xe8\x1a.\xbdz=o\x92\xbd\x1e\x9f^\xf2\xe9\xf5\xf8\xf4z|zɧ\x97|z=>\xbd\x1e\x9f^\x8fO\xafǧ\xd7\xe3\xd3\xeb\xf1\xe9\xf5\xf8\xf4\x92O/\xf9\xf4z|zɧ\xd7\xe3\xd3\xeb\xf1\xe9%\x9f^\xf2\xe9%\x9f^\xf2\xe9%\x9f^\xf2\xe9\x15\xf9S\xe9M\xe9\x19\xb8\xea\xa9\xe9%M/izQӋ\x9a^\xd2\xf4\x92\xa6\x974\xbd\xa4\xe9%M/izIӋ\x9a^Q\xf3\xe4,Q\xb3\xe5,\xd2\xf4\xa2\xa6\x175\xbd\xa8\xe9EM/jzQ\xd3+㏙\xdf?\xa7g\xe0\af&\x9d\x95tVҙIg&\x9d\x95tV\xd2YIg%\x9d\x95tV\xd2YIg&\x9d5OIg\xcdV\xd2YIg&\x9d\x99tfҙI\xf3\xf7\x01\xaf̅8!\xef\xc955\xd33p\x91L.ĩ\x858\xb5\x10'\x17\xe2\xe4B\x9cZ\x88S\vqj!N-ĩ\x858\xb5\x10\xa7\x16\xe2\xe4B\x9c\x9a\xa7\x8585[\vqj!N.\xc4Ʌ8\xb9\x10'\x17\"\u007f\xb7\xf0\x9e\xdc\xd6 \xe9Ȥ\xa3\x92\x8eJ:2騤\xa3\x92\x8eL:2騤\xa3\x92\x8eJ:*騤\xa3\x92\x8eJ:2\xe985O\xbb\xbc\xa9\xd9\xda\xe5)\xe9Ȥ#\x93\x8eL:2\xe9Ȥ#\x93ސǦ<\xb6\xe4\xb1%\x8fMyl\xc9cK\x1e\x9b\xf2ؔǖ<\xb6\xe4\xb1%\x8f-yl\xc9cK\x1e[\xf2ؔ\xc7Κ\xa7;\x9d5[wZ\xf2ؔǦ<6\xe5\xb1)\x8fMyl2\"\u007f{4&\x93\x9c\x9d\xe4\xec g'9;\xc9\xd9A\xce\x0erv\x92\xb3\x93\x9c\x9d\xe4\xec$g'9;\xc9\xd9I\xce\x0er\xf6\xcc\x19\xb4\xbc\xcci\xb4<\x92\xb3\x83\x9c\x1d\xe4\xec \xe7\xe77Z\xc3\xf2\xf2\x9f~\r^:\xee31\x8cp\x9f\xed\xb8\xcfV\x10\xfe\xc2}z\xb8\xcf\xeb\xb8\xcf\vׯ\x8a`\b\x03\xe1\x8b\xf0A\xc0\xd4\x1a\xee\x13\xd7\f\x9f\x82\xeb\x03\xa1\xa5p\x9f%\xdc\xe7o\xb8\xcf\xf7\xf3\xfb\xf7>\xe1>\xf1\x96x\xdcgL?7\xbbe7\xbbe\xf7\x19\x1b\xfe\xd8\n\xe3\x1f^p\x84\v__\x9cvUFc\x1c\x8c_\xc6\x0f#߃T#g\x18?\x94\xd3\x06c\xc3\xcf\x12\xf1#\xc6_\x847\x02~\x96\x88\x9f%\xfe\x85{\x9fǽ\xcf\xf4s\xb3[v\xb3[v\xef\xb3\xe1\x8fH\x8cݲ{\x9f\x8ep\xe1\xeb\x8bӐ\x18\xbbe7\xbbe7\xbbe7\xbbe7\xbbe\xf7>+\x02g\x18?\x94\xd3\x06#\x12\xdbgA\xf8Ex#|\x11>\b|{\xc4Ę\xfeq\xab[v\xab[v\xb3[v\xab[v\xab[v\xb3[v\xb3[v\xab[v\xab[v\xab[v\xab[v\xab[v\xab[v\xab[v\xb3[v\xb3[v\xab[v\xb3[v\xab[v\xab[v\xb3[v\xb3[v\xb3[v\xb3[v\xb3[v\xb3[v\xc7~ܱ\xa7\x9f\x9bݲ\x9bݲ;\xf6\x86?\xe2n\xb2[v\xc7\xee\b\x17\xbe\xbe8\rw\x93ݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ;\xf6\x8a\xc0\x19\xc6\x0f\xe5\xb4\xc1\x88\xbb\x19{A\xf8Ex#|\x11>\b\u007f\xfaݎ\x98\x94\x18F\xb8c;\xee\b\xf1G\x88?z\xb8\xe3u\xdc\x11\xe2\x8f\x10\u007f\x84\xf8#\xc4\x1f!\xfe\b\xf1G\x88?\xd6pG\\\x83\xf8#\xaeC\xfc\x11\xe2\x8f%\xdc\xf17\xdc\xf1\x1d\xee\xf8\xd5o\x93\x8cx\x94\xb1\xff\xdc\xec\x96\xdd\xea\x96\xdd\xea\x96\xdd\xec\x96\xdd\xea\x96\xdd\xea\x96\xdd\xec\x96\xdd\xec\x96\xdd\xea\x96\xdd\xea\x96\xdd\xea\x96\xdd\xea\x96\xdd\xea\x96\xdd\xea\x96\xdd\xea\x96\xdd\xec\x96\xdd\xec\x96\xdd\xea\x96\xdd\xec\x96\xdd\xea\x96\xdd\xea\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd;\"qNN\x8a\xd00V,\xbbe7\xbbe\xf7Ɗ\xddX\xb1\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\xec\x96\xdd\x1b+vG\xce\xe0\u0088\x9cƅ\xc1\x15\xbb\xb1b7V\xecƊ\xddX\xb1\x1b+v\xc7?\xfd\xc6\xcet\xdc=1\x8cp\xf7v\xdc\x1d\x8f\xb2\xe3Qv\x0fw\xbf\x8e\xbb\xe3Qv<ʎG\xd9\xf1(;\x1eeǣ\xecx\x94\xbd\x86\xbb\xe3\x1a\x1ee\xc7u<ʎG\xd9K\xb8\xfbo\xb8\xfb\xfb\xf9U\xa1\x9fp㮬\xf3\xb8\x17\xec\x82ݲ\x9bݲ{\xc1.\xd8-\xbb\xd9-\xbb\x17\xecb\xc1.\xd8-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\x17\xecb\x9d\x9ca\xfcPN\x1b\x8c\xb8+\vv\xb1`\x17\vv\xb1`\x17\vv\xb1N\xbe=b\"\xecBݲ[ݲ\x9bݲ[ݲ[ݲ\x9bݲ\x9bݲ[ݲ[ݲ[ݲ[ݲ[ݲ[ݲ[ݲ\x9bݲ\x9bݲ[ݲ\x9bݲ[ݲ[ݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ\xbb\xc7\xe3\xee\xd0\x18\xbbe7\xbbew\x87\xc6\xd8-\xbb\xd9-\xbb;4֡1v\xcbnv\xcbnv\xcbnv\xcbnv\xcbnv\xcbnv\xcb\xee\x0e\x8d\xf5\xc8\x19\xc6\x0f\xe5\xb4\xc1\x88\xbb١\xb1\x0e\x8duh\xacCc\x1d\x1a\xeb\xac\n\xfd\xb87|\x8cݲ\x9bݲ{\xc3\xc7\xd8-\xbb\xd9-\xbb7|l\xc3\xc7\xd8-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb7|lwΠ\xf8;\xa7Q\xfc\xf4\xb1\r\x1f\xdb\xf0\xb1\r\x1f\xdb\xf0\xb1\r\x1f\xdb\xf0\xb1\x19\ue64e{&\x86\x11\xeeَ{B\xfc\x13\xe2\x9f\x1e\xeey\x1d\xf7\x84\xf8'\xc4?!\xfe\t\xf1O\x88\u007fB\xfc\x13\xe2\x9f5\xdc\x13\xd7 \xfe\x89\xeb\x10\xff\x84\xf8g\t\xf7\xfc\r\xf7|?\xbf\r\xf7\x13\xee\t\x8d\xc1\xc7\xd8-\xbb\xd5-\xbb\xd5-\xbb\xd9-\xbb\xd5-\xbb\xd5-\xbb\xd9-\xbb\xd9-\xbb\xd5-\xbb\xd5-\xbb\xd5-\xbb\xd5-\xbb\xd5-\xbb\xd5-\xbb\xd5-\xbb\xd9-\xbb\xd9-\xbb\xd5-\xbb\xd9-\xbb\xd5-\xbb\xd5-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbb\xd9-\xbbWD✜\x14\xb1\xb8\xa01v\xcbnv\xcb\xee\x05\x8d-h\x8cݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ\x9bݲ{Ac+r\x06Wl\xe44\xaeXjlAc\v\x1a[\xd0\u0602\xc6\x164\xb6\xa0\xb1\x95\x8f{e|\xaf\x9c\x14\xf1\x19\x19\x89e&\x96\x99XFb\x19\x89e&\x96\x99Xfb\x99\x89e&\x96\x99Xfb\x19\x89e\xce`b\x99ӘXfb\x19\x89e$\x96\x91XFb\x19\x89e\x88\u007f\x1e\xf7\x9e\xd0\xf3L\x8a\xd0\xe9\x84\xf8'\xc5?)\xfe\t\xf1O\x88\u007fR\xfc\x93\xe2\x9f\x14\xff\xa4\xf8'\xc5?)\xfeI\xf1O\x88\u007fr\x06\xc5?9\x8d\xe2\x9f\x14\xff\x84\xf8'\xc4?!\xfe\t\xf1O\x88\u007f\xa2\xf4\xce\xe3\x8eH\x8cݲ\x9bݲ;\"1v\xcbnv\xcb\xee\x88\xc4\"\x12c\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xec\x8eH,N\xce\xe0\xeebr\x1aw\x17L,\"\xb1\x88\xc4\"\x12\x8bH,\"\xb1\x88\xc4v>\xee\x8dG\xc9n\xd9\xcdnٽ\xf1(\xd9-\xbb\xd9-\xbb7\x1e\xe5ƣd\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xecf\xb7\xec\xdex\x94;s\x06\xefX\xe64\xde1>ʍG\xb9\xf1(7\x1e\xe5ƣ\xdcx\x94\x1b{\xfe\x1c\ue70e;'\x86\x11\xee\u070e;\xc3.2\xec\"{\xb8\xf3u\xdc\x19v\x91a\x17\x19v\x91a\x17\x19v\x91a\x17\x19v\x91k\xb83\xae\xc1.2\xae\xc3.2\xec\"\x97p\xe7\xdfp\xe7w\xb8\xf37\xdc\xf9\x13\xee\xfc\xa7\u007fH)\x1d\x15\xc0Q\x01\x1c\xf5lG\x05pT\x00G==\xd4\xf3:*\x80\xa3\x028*\x80\xa3\x028*\x80\xa3\x028*\x80\xa3\x9e5\xd4\x13\xd7\f\x9f\x82\xeb\x03\xa1\xa5P\xcf\x12\xea\xf9\x1b\xea\xf9~\xfe\x05\xa7O\xa8'\xde\x12\x8f\n\xe0\xa8\x04\x8eJ\xe0\xa8\x00\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x00\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x00\x8e\n\xe0\xa8\x04\x8e\n\xe0\xa8\x04\x8eJ\xe0\xa8\x00\x8e\n\xe0\xa8\x00\x8e\n\xe0\xa8\x00\x8e\x8a\x9aW\xf7yT\x00G%pT\x02G\x05pT\x02G%pT\x00G\x05pT\x02G%pT\x02G%pT\x02G%pT\x02G\x05pT\x00G%pT\x00G%pT\x02G\x05pT\x00G\x05pT\x00G\x05pT\x00G\x05pT\x02G\x15pT\x01G%pT\x01G\x15pT\x02G%pT\x01G\x15pT\x01G\x15pT\x01G\x15pT\x01G%pT\x02G\x15pT\x02G\x15pT\x01G%pT\x02G%pT\x02G%pT\x02G\x8d\xfd\xa8\x00\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x04\x8eJ\xe0\xa8\x00\x8e\n\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x00\x8eJ\xe0\xa8\x00\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x00\x8e\n\xe0\xa8\x00\x8e\n\xe0\xa8\x00\x8e\x1aC\x8d\x98\x94\x18F\xa8\xb1\x1d\x15\xc0Q\x01\x1c5z\xa8\xf1:*\x80\xa3\x028*\x80\xa3\x028*\x80\xa3\x028*\x80\xa3\xc6\x1aj\xc45\x88?\xe2:\xc4\x0f\u0a31\x84\x1a\u007fC\x8d\xefP\xe37\xd4\xf8\t5\xe2Q\xc6\xfeS\t\x1cU\xc0Q\x05\x1c\x95\xc0Q\x05\x1cU\xc0Q\t\x1c\x95\xc0Q\x05\x1cU\xc0Q\x05\x1cU\xc0Q\x05\x1cU\xc0Q\x05\x1c\x95\xc0Q\t\x1cU\xc0Q\t\x1cU\xc0Q\x05\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1cuG$\xce\xc9I\x11\x1aƊ%pT\x02G\x05pT\x00G%pT\x02G%pT\x02G%pT\x02G%pT\x00G\x05pT\x02G\x05pT\x02G%pT\x00G\x05pT\x00G\x05pT\x00G\x05p\xf0\x9f{KG\x05pT\x00G\xed\xed\xa8\x00\x8e\n\xe0\xa8\xddC\xed\xd7Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\xb5\xd7P;\xae\xe1Qv\\ǣ\x04p\xd4^B\xed\xbf\xa1\xf6\xf7\xf3\xef\xcc}B\xc5]Y\xe7Q\x01\x1c\x95\xc0Q\t\x1c\x15\xc0Q\t\x1c\x95\xc0Q\x01\x1c\x15\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x15\xc0Q\x01\x1c\x95\xc0Q\x01\x1c\x95\xc0Q\t\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\t\x1cU\xc0Q\x05\x1c\x95\xc0Q\x05\x1cU\xc0Q\t\x1c\x95\xc0Q\x05\x1cU\xc0Q\x05\x1cU\xc0Q\x05\x1cU\xc0Q\x05\x1c\x95\xc0Q\t\x1cU\xc0Q\t\x1cU\xc0Q\x05\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\xb5ǣ\x028*\x81\xa3\x128*\x80\xa3\x128*\x81\xa3\x028*\x80\xa3\x128*\x81\xa3\x128*\x81\xa3\x128*\x81\xa3\x128*\x80\xa3\x028*\x81\xa3\x028*\x81\xa3\x128*\x80\xa3\x028*\x80\xa3\x028*\x80\xa3vV\x85~T\x00G%pT\x02G\x05pT\x02G%pT\x00G\x05pT\x02G%pT\x02G%pT\x02G%pT\x02G\x05pT\x00G%pT\x00G%pT\x02G\x05pT\x00G\x05pT\x00G\x05pT\x00\a\xffU\xc3tT\x00G\x05p\xd4َ\n\xe0\xa8\x00\x8e:=\xd4y\x1d\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Qg\ru\xe2\x1a\xc4?q\x1d\xe2\ap\xd4YB\x9d\xbf\xa1\xce\xf7\xf3\xcf)~B\x9d\xd0\x18|\x8c\xc0Q\x05\x1cU\xc0Q\t\x1cU\xc0Q\x05\x1c\x95\xc0Q\t\x1cU\xc0Q\x05\x1cU\xc0Q\x05\x1cU\xc0Q\x05\x1cU\xc0Q\t\x1c\x95\xc0Q\x05\x1c\x95\xc0Q\x05\x1cU\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0QWD✜\x14\xb1\xb8\xa01\x02G%pT\x00G\x05pT\x02G%pT\x02G%pT\x02G%pT\x02G\x05pT\x00G%pT\x00G%pT\x02G\x05pT\x00G\x05pT\x00G\x05pT\x00G]\xf9\xa8\x00\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x04\x8eJ\xe0\xa8\x00\x8e\n\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x00\x8eJ\xe0\xa8\x00\x8eJ\xe0\xa8\x04\x8e\n\xe0\xa8\x00\x8e\n\xe0\xa8\x00\x8e\n\xe0\xa8\x00\x8e\xba\xe7Q\x01\x1c\x95\xc0Q\t\x1c\x15\xc0Q\t\x1c\x95\xc0Q\x01\x1c\x15\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x95\xc0Q\t\x1c\x15\xc0Q\x01\x1c\x95\xc0Q\x01\x1c\x95\xc0Q\t\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c5Σ\x028*\x81\xa3\x128*\x80\xa3\x128*\x81\xa3\x028*\x80\xa3\x128*\x81\xa3\x128*\x81\xa3\x128*\x81\xa3\x128*\x80\xa3\x028*\x81\xa3\x028*\x81\xa3\x128*\x80\xa3\x028*\x80\xa3\x028*\x80\xa3\x028\xea\xceG\x05pT\x02G%pT\x00G%pT\x02G\x05pT\x00G%pT\x02G%pT\x02G%pT\x02G%pT\x00G\x05pT\x02G\x05pT\x02G%pT\x00G\x05pT\x00G\x05pT\x00G\x05p\xf0_VMG\x05pT\x00G\xcd\xed\xa8\x00\x8e\n\xe0\xa8\xd9C\xcd\xd7Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c\x15\xc0Q\x01\x1c5\xd7P3\xae\xc1.2\xae\xc3.\x00\x1c5\x97P\xf3o\xa8\xf9\xfd\xfc\x93\xae\x9fP\xf3\x9f\xfe\xb9\xe1t\x18\x80\xc3\x00\x1cv\xb6\xc3\x00\x1c\x06\xe0\xb0Ӄ\x9d\xd7a\x00\x0e\x03p\x18\x80\xc3\x00\x1c\x06\xe00\x00\x87\x018\xec\xac\xc1N\\3|\n\xae\x0f\x84\x96\x82\x9d%\xd8\xf9\x1b\xec|?\xff\xce\xf1'؉\xb7\xc4\xc3\x00\x1cF\xe00\x02\x87\x018\x8c\xc0a\x04\x0e\x03p\x18\x80\xc3\b\x1cF\xe00\x02\x87\x118\x8c\xc0a\x04\x0e#p\x18\x80\xc3\x00\x1cF\xe00\x00\x87\x118\x8c\xc0a\x00\x0e\x03p\x18\x80\xc3\x00\x1c\x06\xe00\xd4<\xdb\xe7a\x00\x0e#p\x18\x81\xc3\x00\x1cF\xe00\x02\x87\x018\f\xc0a\x04\x0e#p\x18\x81\xc3\b\x1cF\xe00\x02\x87\x118\f\xc0a\x00\x0e#p\x18\x80\xc3\b\x1cF\xe00\x00\x87\x018\f\xc0a\x00\x0e\x03p\x18\x80\xc3\x00\x1cF\xe00\x01\x87\t8\x8c\xc0a\x02\x0e\x13p\x18\x81\xc3\b\x1c&\xe00\x01\x87\t8L\xc0a\x02\x0e\x13p\x98\x80\xc3\b\x1cF\xe00\x01\x87\x118L\xc0a\x02\x0e#p\x18\x81\xc3\b\x1cF\xe00\x02\x87\x118,\xf6\xc3\x00\x1cF\xe00\x02\x87\x018\x8c\xc0a\x04\x0e\x03p\x18\x80\xc3\b\x1cF\xe00\x02\x87\x118\x8c\xc0a\x04\x0e#p\x18\x80\xc3\x00\x1cF\xe00\x00\x87\x118\x8c\xc0a\x00\x0e\x03p\x18\x80\xc3\x00\x1c\x06\xe00\x00\a\xff\rmLJ\f#Xl\x87\x018\f\xc0aу\xc5\xeb0\x00\x87\x018\f\xc0a\x00\x0e\x03p\x18\x80\xc3\x00\x1c\x16k\xb0\x88k\x10\u007f\xc4u\x88\x1f\xc0a\xb1\x04\x8b\xbf\xc1\xe2;X\xfc\xea_\xed\x8ex\x94\xb1\xff\x18\x81\xc3\x04\x1c&\xe00\x02\x87\t8L\xc0a\x04\x0e#p\x98\x80\xc3\x04\x1c&\xe00\x01\x87\t8L\xc0a\x02\x0e#p\x18\x81\xc3\x04\x1cF\xe00\x01\x87\t8\x8c\xc0a\x04\x0e#p\x18\x81\xc3\b\x1cF\xe0\xb0\x1d\x918''Eh\x18+\x96\xc0a\x04\x0e\x03p\x18\x80\xc3\b\x1cF\xe00\x02\x87\x118\x8c\xc0a\x04\x0e#p\x18\x80\xc3\x00\x1cF\xe00\x00\x87\x118\x8c\xc0a\x00\x0e\x03p\x18\x80\xc3\x00\x1c\x06\xe00\x00\a\xffe\xf4t\x18\x80\xc3\x00\x1c\xd6\xdba\x00\x0e\x03pX\xf7`\xfd:\f\xc0a\x00\x0e\x03p\x18\x80\xc3\x00\x1c\x06\xe00\x00\x87\xf5\x1a\xac\xe3\x1a\x1ee\xc7uE?n|f\xdb\xf3-\x9f7\x8dgl\xba7Q7/\xfejxkн\x89\xba7|\n(\x81\xc6\x12h*\x81\xa6\x12h,\x81\xa6\x12h*\x81\xc6\x12h,\x81\xa6\x12h*\x81\xa6\x12h*\x81\xa6\x12h*\x81\xa6\x12h,\x81\xc6\x12h*\x81\xc6\x12h*\x81\xa6\x12h,\x81\xc6\x12h,\x81\xc6\x12h,\x81\xc6\x12h\x11\x89srRĚA\t4\x96@c\t4\x94@C\t4\x96@c\t4\x96@c\t4\x96@c\t4\x96@C\t\xb4\xc8\x19\\\x88\x91Ӹ\x10Y\x02\r%\xd0P\x02\r%\xd0P\x02\r%\xd0\"\xe5\x11\xfb?\x18\xf9\x84y\xce\\\xe3\xd0\xcbM_J\x1e\xbd\xe5\xd3[>\xbd\xe9\xd3[>\xbd\xe5ӛ>\xbd\xe9\xd3[>\xbd\xe5\xd3[>\xbd\xe5\xd3[>\xbd\xe5\xd3[>\xbd\xe9ӻk\x9e\x16b\xd7l-D\xf9\xf4\xa6Oo\xfa\xf4\xa6Oo\xfa\xf4\xa6Oo\xfa\xf4<̰\xbf5\xeeo\x8d\xfb[\xc3\xfeָ\xbf5\xeeo\r\xfb[\xc3\xfeָ\xbf5\xeeo\x8d\xfb[\xe3\xfeָ\xbf5\xeeo\x8d\xfb[\xc3\xfe\xd6&gp!NN\xe3B\xe4\xfeְ\xbf5\xeco\r\xfb[\xc3\xfeְ\xbf\xb5IMӧ\x97|z=>\xbd\x1e\x9f^\xf2\xe9\xf5\xf8\xf4z|zɧ\x97|z=>\xbd\x1e\x9f^\x8fO\xafǧ\xd7\xe3\xd3\xeb\xf1\xe9\xf5\xf8\xf4\x92O/\xf9\xf4z|zɧ\xd7\xe3\xd3\xeb\xf1\xe9%\x9f^\xf2\xe9%\x9f^\xf2\xe9%\x9f^\xf2\xe9\x15\xf9S\xe9M\xe9\x19\xb8\xea\xa9\xe9%M/izQӋ\x9a^\xd2\xf4\x92\xa6\x974\xbd\xa4\xe9%M/izIӋ\x9a^Q\xf3\xe4,Q\xb3\xe5,\xd2\xf4\xa2\xa6\x175\xbd\xa8\xe9EM/jzQ\xd3+㏙\xdf?\xa7g\xe0\af&\x9d\x95tVҙIg&\x9d\x95tV\xd2YIg%\x9d\x95tV\xd2YIg&\x9d5OIg\xcdV\xd2YIg&\x9d\x99tfҙIg&\x9d\xb9\x10'\xe4=\xb9\xa6fz\x06.\x92Ʌ8\xb5\x10\xa7\x16\xe2\xe4B\x9c\\\x88S\vqj!N-ĩ\x858\xb5\x10\xa7\x16\xe2\xd4B\x9c\\\x88S\xf3\xb4\x10\xa7fk!N-\xc4Ʌ8\xb9\x10'\x17\xe2\xe4B\x9c\\\x88\x93\xdb\x1a$\x1d\x99tT\xd2QIG&\x1d\x95tTґIG&\x1d\x95tT\xd2QIG%\x1d\x95tT\xd2QIG&\x1d\xa7\xe6i\x9775[\xbb<%\x1d\x99tdґIG&\x1d\x99td\xd2\x1b\xf2ؔǖ<\xb6\xe4\xb1)\x8f-yl\xc9cS\x1e\x9b\xf2ؒǖ<\xb6\xe4\xb1%\x8f-yl\xc9cK\x1e\x9b\xf2\xd8Y\xf3t\xa7\xb3f\xebNK\x1e\x9b\xf2ؔǦ<6\xe5\xb1)\x8fMḞ\x19\xc8\xd9H\xceFr6\x90\xb3\x91\x9c\x8d\xe4l g\x039\x1b\xc9\xd9H\xceFr6\x92\xb3\x91\x9c\x8d\xe4l$g\x039[\xe6\fZ^\xe64Z\x1e\xc9\xd9@\xce\x06r6\x90\xb3\x81\x9c\r\xe4l\xf9\xef5\xce0\xcet\x8c31\x8c0\xcev\x8c\xb3\x15\x84\xbf0N\x0f㼎q^\xb8~U\x04C\x18\b_\x84\x0f\x02\xa6\xd60N\\3|\n\xae\x0f\x84\x96\xc28K\x18\xe7o\x18\xe7;\x8c\xf3\x1b\xc6\xf9\t\xe3\xc4[\xe21Θ~\x06\xbbe\x83ݲqƆ?\xb6\xc2\xf8\x87\x17\x1c\xe1\xc2\xd7\x17\xa7]\x95\xd1\x18\a\xe3\x97\xf1\xc3\xc8\xf7 \xd5\xc8\x19\xc6\x0f\xe5\xb4\xc1\xd8\xf0\xb3D\xfc\x88\xf1\x17ፀ\x9f%\xe2g\x89\u007fa\xec\xf3\x18\xfbL?\x83ݲ\xc1n\xd9\xd8g\xc3\x1f\x91\x18\xbbec\x9f\x8ep\xe1\xeb\x8bӐ\x18\xbbe\x83ݲ\xc1n\xd9`\xb7l\xb0[6\xf6Y\x118\xc3\xf8\xa1\x9c6\x18\x91\xd8>\v\xc2/\xc2\x1b\xe1\x8b\xf0A\xe0\xdb#&\xc6\xf4\x8f\xa1n\xd9P\xb7l\xb0[6\xd4-\x1b\xea\x96\rv\xcb\x06\xbbeCݲ\xa1n\xd9P\xb7l\xa8[6\xd4-\x1b\xea\x96\ru\xcb\x06\xbbe\x83ݲ\xa1n\xd9`\xb7l\xa8[6\xd4-\x1b\xec\x96\rv\xcb\x06\xbbe\x83ݲ\xc1n\xd9`\xb7l\xc4~\x8c\xd8\xd3\xcf`\xb7l\xb0[6bo\xf8#\xee&\xbbe#vG\xb8\xf0\xf5\xc5i\xb8\x9b\xec\x96\rv\xcb\x06\xbbe\x83ݲ\xc1nو\xbd\"p\x86\xf1C9m0\xe2n\xc6^\x10~\x11\xde\b_\x84\x0f\xc2\xdfk\xc40\"&%\x86\x11FlLj\x10\u007f\x84\xf8\xa3\x87\x11\xafcD\x88?B\xfc\x11\xe2\x8f\x10\u007f\x84\xf8#\xc4\x1f!\xfeXÈ\xb8\x06\xf1G\\\x87\xf8#\xc4\x1fK\x18\xf17\x8c\xf8\x0e#~È\x9f0\"\x1ee\xec?\x83ݲ\xa1n\xd9P\xb7l\xb0[6\xd4-\x1b\xea\x96\rv\xcb\x06\xbbeCݲ\xa1n\xd9P\xb7l\xa8[6\xd4-\x1b\xea\x96\ru\xcb\x06\xbbe\x83ݲ\xa1n\xd9`\xb7l\xa8[6\xd4-\x1b\xec\x96\rv\xcb\x06\xbbe\x83ݲ\xc1n\xd9`\xb7l\xec\x88\xc499)B\xc3X\xb1\xec\x96\rv\xcb\xc6Ɗ\xddX\xb1\xec\x96\rv\xcb\x06\xbbe\x83ݲ\xc1n\xd9`\xb7l\xb0[66V쎜\xc1\x85\x119\x8d\v\x83+vc\xc5n\xac؍\x15\xbb\xb1b7V\xec\x8e\u007f\xaf\xd1\xc3\xe8\xe9\x18=1\x8c0z;Fǣ\xecx\x94\xdd\xc3\xe8\xd71:\x1eeǣ\xecx\x94\x1d\x8f\xb2\xe3Qv<ʎG\xd9k\x18\x1d\xd7\xf0(;\xae\xe3Qv<\xca^\xc2\xe8\xbfa\xf4w\x18\xfd\x1bF\xff\x84\x81\xbb\xb2\xcec,\xd8\x05\xbbe\x83ݲ\xb1`\x17\xec\x96\rv\xcbƂ],\xd8\x05\xbbe\x83ݲ\xc1n\xd9`\xb7l\xb0[6\xd8-\x1b얍\x05\xbbX'g\x18?\x94\xd3\x06#\xeeʂ],\xd8ł],\xd8ł]\xac\x93o\x8f\x98\b\xbbP\xb7l\xa8[6\xd8-\x1b\xea\x96\ru\xcb\x06\xbbe\x83ݲ\xa1n\xd9P\xb7l\xa8[6\xd4-\x1b\xea\x96\ruˆ\xbae\x83ݲ\xc1n\xd9P\xb7l\xb0[6\xd4-\x1b\xea\x96\rv\xcb\x06\xbbe\x83ݲ\xc1n\xd9`\xb7l\xb0[6z\xc6n\xd9`\xb7ll\xf8\x18\xbbe\x83ݲ\xb1\xe1c\x1b>\xc6n\xd9`\xb7l\xb0[6\xd8-\x1b\xec\x96\rv\xcb\x06\xbbec\xc3\xc7v\xe7\f\x8a\xbfs\x1a\xc5O\x1f\xdb\xf0\xb1\r\x1f\xdb\xf0\xb1\r\x1f\xdb\xf0\xb1\r\x1f\x9ba\xcct\x8c\x99\x18F\x18\xb3\x1dcB\xfc\x13\xe2\x9f\x1eƼ\x8e1!\xfe\t\xf1O\x88\u007fB\xfc\x13\xe2\x9f\x10\xff\x84\xf8g\rc\xe2\x1a\xc4?q\x1d\xe2\x9f\x10\xff,a\xcc\xdf0\xe6;\x8c\xf9\rc~\u0098\xd0\x18|\x8cݲ\xa1n\xd9P\xb7l\xb0[6\xd4-\x1b\xea\x96\rv\xcb\x06\xbbeCݲ\xa1n\xd9P\xb7l\xa8[6\xd4-\x1b\xea\x96\ru\xcb\x06\xbbe\x83ݲ\xa1n\xd9`\xb7l\xa8[6\xd4-\x1b\xec\x96\rv\xcb\x06\xbbe\x83ݲ\xc1n\xd9`\xb7l\xac\x88\xc499)bqAc\xec\x96\rv\xcbƂ\xc6\x164\xc6n\xd9`\xb7l\xb0[6\xd8-\x1b\xec\x96\rv\xcb\x06\xbbecAc+r\x06Wl\xe44\xaeXjlAc\v\x1a[\xd0\u0602\xc6\x164\xb6\xa0\xb1\x95\x8f\xb12\xbeWN\x8a\xf8\x8c\x8c\xc42\x13\xcbL,#\xb1\x8c\xc42\x13\xcbL,3\xb1\xcc\xc42\x13\xcbL,3\xb1\x8c\xc42g0\xb1\xcciL,3\xb1\x8c\xc42\x12\xcbH,#\xb1\x8c\xc42\xc4?\x8f\xb1'\xf4<\x93\"t:!\xfeI\xf1O\x8a\u007fB\xfc\x13\xe2\x9f\x14\xff\xa4\xf8'\xc5?)\xfeI\xf1O\x8a\u007fR\xfc\x13⟜A\xf1ON\xa3\xf8'\xc5?!\xfe\t\xf1O\x88\u007fB\xfc\x13\xe2\x9f(\xbd\xf3\x18\x11\x89\xb1[6\xd8-\x1b\x11\x89\xb1[6\xd8-\x1b\x11\x89E$\xc6n\xd9`\xb7l\xb0[6\xd8-\x1b\xec\x96\rv\xcb\x06\xbbe#\"\xb189\x83\xbb\x8b\xc9i\xdc]0\xb1\x88\xc4\"\x12\x8bH,\"\xb1\x88\xc4\"\x12\xdb\xf9\x18\x1b\x8f\x92ݲ\xc1n\xd9\xd8x\x94\xec\x96\rv\xcb\xc6ƣ\xdcx\x94\xec\x96\rv\xcb\x06\xbbe\x83ݲ\xc1n\xd9`\xb7l\xb0[66\x1e\xe5Μ\xc1;\x969\x8dw\x8c\x8fr\xe3Qn<ʍG\xb9\xf1(7\x1e\xe5ƞ?\x87\x91\xd31rb\x18a\xe4v\x8c\f\xbbȰ\x8b\xeca\xe4\xeb\x18\x19v\x91a\x17\x19v\x91a\x17\x19v\x91a\x17\x19v\x91k\x18\x19\xd7`\x17\x19\xd7a\x17\x19v\x91K\x18\xf97\x8c\xfc\x0e#\u007f\xc3ȟ0\xa0\xa3q\x1ec\xa0V\x0e\xd6\xca\xc1Z9P+\ak\xe5`\xad\x1c\xa8\x95\x03\xb5r\xb0V\x0e\xd6\xca\xc1Z9X+\ak\xe5`\xad\x1c\xac\x95\x03\xb5r\x9c\x9ca\xfcPN\x1b\x8c\xb8+\x03\xb5r\xa0V\x0e\xd4ʁZ9P+\xc7ɷGLD\xad\x1c\xaa\x95C\xb5r\xb0V\x0e\xd5ʡZ9X+\ak\xe5P\xad\x1c\xaa\x95C\xb5r\xa8V\x0e\xd5ʡZ9T+\ak\xe5`\xad\x1c\xaa\x95\x83\xb5r\xa8V\x0e\xd5\xca\xc1Z9X+\ak\xe5`\xad\x1c\xac\x95\x00\x95c\x8c}\xfe \xe0\xfb\xb3[\xc6a\xf0\xb5\xc6/\x984\xbbe\x18\x9c\xf1\xe2K\x97f3iv\xcb8\f\r_\r\x1f\rzse\xd4<\xd3\xf7\xd0졁I\xef\xb30\xfe2\xbe\x19\xbf\x8c\x1fF}T\xe4\x1bb\xfaW\r\xff9\xeasbӗ\xad<\xe3\x9f^v\r\x97^\xbd\x9e7]\xf5\x19\xed\x19\xc73~\x9f\xf1\xf3\x8cϧ\xe8Ǎ\xcfl{\xbe\xe5\xf3\xa6\xf1\x8cM\xf7&\xea\xe6\xc5_\ro\r\xba7Q\xf7\x86O\x01%p\xb0\x04\x0e\x95\xc0\xa1\x128X\x02\x87J\xe0P\t\x1c,\x81\x83%p\xa8\x04\x0e\x95\xc0\xa1\x128T\x02\x87J\xe0P\t\x1c*\x81\x83%p\xb0\x04\x0e\x95\xc0\xc1\x128T\x02\x87J\xe0`\t\x1c,\x81\x83%p\xb0\x04\x0e\x96\xc0\xc1\x128\"\x12\xe7䤈5\x83\x128X\x02\aK\xe0@\t\x1c(\x81\x83%p\xb0\x04\x0e\x96\xc0\xc1\x128X\x02\aK\xe0`\t\x1c(\x81#r\x06\x17b\xe44.D\x96\xc0\x81\x128P\x02\aJ\xe0@\t\x1c(\x81#R\x1e\xb1\xff\x83\x91O\x98\xff\x15V\xe3\xd0\xcbM_J\x1e\xfc\xaf\xb0\x1c]åW\xaf\xe7M\x92\a\xff+\xac\xc6\xf1\x8c\xdfg\xfc<\xe3\xf3)U\xc33۞o\xf9\xbci<\xa3\xe4\x11{\xd1\xf0\xab\xe1\xad\xe1\xabᣁ\x8b4\xf2\xa7қ\xd23p\x01\xd1Y\xb6\x9ce\xcbY6\x9de\xd3Y\xb6\x9ce\xcbY\xb6\x9ce\xcbY\xb6\x9ce\xcbY\xb6\x9ce\xd3Yv\xd4<-Ҩ\xd9Z\xa4r\x96Mg\xd9t\x96Mg\xd9t\x96Mg\xd9؈\x8c~\x8c\x81\xcd\xee\xe0fwp\xb3;\xb0\xd9\x1d\xdc\xec\x0env\a6\xbb\x03\x9b\xdd\xc1\xcd\xee\xe0fwp\xb3;\xb8\xd9\x1d\xdc\xec\x0env\a7\xbb\x03\x9b\xdd\xd19\x83\xf2\xe8\x9cFyp\xb3;\xb0\xd9\x1d\xd8\xec\x0elv\a6\xbb\x03\x9b\xdd\xc1\xbb\xb9`y\x8b\x96\xb7dyK\x96\xb7hyK\x96\xb7dy\x8b\x96\xb7hyK\x96\xb7dyK\x96\xb7dyK\x96\xb7dyK\x96\xb7hy\xeb\xd4<\xd3\xf7\xd0졁ws\xd1\xf2\x16-o\xd1\xf2\x16-o\xd1\xf2֩\x8f\x8a|\x03-o=\x96\xb7\x1e\xcb[\xb2\xbc\xf5X\xdez,o\xc9\xf2\x96,o=\x96\xb7\x1e\xcb[\x8f\xe5\xad\xc7\xf2\xd6cy뱼\xf5Xޒ\xe5-Y\xdez,o\xc9\xf2\xd6cy뱼%\xcb[\xb2\xbc%\xcb[\xb2\xbc%\xcb[\xb2\xbc\x0eMwj\xbaK\xd3]\x9a\xee\xd4t\x97\xa6\xbb4ݩ\xe9NMwi\xbaK\xd3]\x9a\xee\xd2t\x97\xa6\xbb4ݥ\xe9NM\xf7\xa8y\xa6\xef\xa1\xd9C\x03\x9fB\xa7\xa6;5ݩ\xe9NMwj\xba\xabZ§7}z˧\xb7|zӧ\xb7|z˧7}zӧ\xb7|z˧\xb7|z˧\xb7|z˧\xb7|zӧw\xd7<-Į\xd9Z\x88\xf2\xe9M\x9f\xde\xf4\xe9M\x9f\xde\xf4\xe9M\x9f\xde\xf4\xe9y\x8c\x81\xfd\xed\xe0\xfevp\u007f;\xb0\xbf\x1d\xdc\xdf\x0e\xeeo\a\xf6\xb7\x03\xfb\xdb\xc1\xfd\xed\xe0\xfevp\u007f;\xb8\xbf\x1d\xdc\xdf\x0e\xeeo\a\xf7\xb7\x03\xfb\xdb19\x83\vqr\x1a\x17\"\xf7\xb7\x03\xfbہ\xfd\xed\xc0\xfev`\u007f;\xb0\xbf\x1d\x93\x9a\xa6O/\xf9\xf4z|z=>\xbd\xe4\xd3\xeb\xf1\xe9\xf5\xf8\xf4\x92O/\xf9\xf4z|z=>\xbd\x1e\x9f^\x8fO\xafǧ\xd7\xe3\xd3\xeb\xf1\xe9%\x9f^\xf2\xe9\xf5\xf8\xf4\x92O\xafǧ\xd7\xe3\xd3K>\xbd\xe4\xd3K>\xbd\xe4\xd3K>\xbd\xe4\xd3+\xf2\xa7қ\xd23p\xd5S\xd3K\x9a^\xd2\xf4\xa2\xa6\x175\xbd\xa4\xe9%M/izI\xd3K\x9a^\xd2\xf4\x92\xa6\x175\xbd\xa2\xe6\xc9Y\xa2f\xcbY\xa4\xe9EM/jzQӋ\x9a^\xd4\xf4\xa2\xa6W\xc6\x1f3\xbf\u007fN\xcf\xc0\x0f\xccL:+鬤3\x93\xceL:+鬤\xb3\x92\xceJ:+鬤\xb3\x92\xceL:k\x9e\x92Κ\xad\xa4\xb3\x92\xceL:3\xe9̤3\x93\xceL:s!N\xc8{rM\xcd\xf4\f\\$\x93\vqj!N-\xc4Ʌ8\xb9\x10\xa7\x16\xe2\xd4B\x9cZ\x88S\vqj!N-ĩ\x858\xb9\x10\xa7\xe6i!N\xcd\xd6B\x9cZ\x88\x93\vqr!N.\xc4Ʌ8\xb9\x10'\xb75H:2騤\xa3\x92\x8eL:*騤#\x93\x8eL:*騤\xa3\x92\x8eJ:*騤\xa3\x92\x8eL:N\xcd\xd3.oj\xb6vyJ:2\xe9Ȥ#\x93\x8eL:2\xe9Ȥ7\xe4\xb1)\x8f-yl\xc9cS\x1e[\xf2ؒǦ<6\xe5\xb1%\x8f-yl\xc9cK\x1e[\xf2ؒǖ<6屳\xe6\xe9Ng\xcd֝\x96<6\xe5\xb1)\x8fMyl\xcacS\x1e\x9b\x8c\x98\x8f1@\u0383\xe4\xc3>\xd3\x01\x8cD\x18a\x9f\xed\x00@\"\xfc\x85}z\xd8\xe7u\x00\x1c\x11*\x82!\f\x84/\xc2\a\x01Sk\xd8'\xae\x19>\x05\xd7\aBKa\x9f%\xec\xf37\xec\xf3\x1d\xf6\xf9\r\xfb\xfc\x84}\xe2-\xf1\x00\x01\xfe\x10\a\x19\xf1\x8e\xd8~\b\x82\x8c\u007fx\xc1\x11\xae\x1f\x02 ce4\xc6\xc1\xf8e\xfc0\xf2=H5r\x86\xf1C9m06\xfc,\x11?b\xfcEx#\xe0g\x89\xf8Y\xe2\xdf+\xf6\x10{:P\xdd\x10F\x88\xbd\x1d(j\b\u007f!v\x0f\xb1_\a\n\x19BE0\x84\x81\xf0E\xf8 `j\r\xb1\xe3\x9a\xe1Sp} \xb4\x14b/!\xf6\xdf\x10\xfb;\xc4\xfe\r\xb1\u007fB\xec\u007f\xff\x12_1\x85\x98\xf0\xff\xf1\x8a-\xc4VBl\u007f\xaf\xe8\xafx\x85x\xa5\x10\xaf\x1a\xe2e!^#\xc4\xeb\x1b\xe2\xf5\t\xf1\xfa{\xc5\xfa\x8a\x16\xa2\x8dW\x1c!\x8e\x11bK\xafX^\xf1\xf7\x15߯\xf8}\xc5\xcf+\xfe\x85\x1d\xfb\x01\xb2\xfa!f1\x0e\xbc\xd0~\bX\x8c\u007fx\xc1\x11\xae\x1f\x82\x15ce4\xc6\xc1\xf8e\xfc0\xf2=\x15\x813\x8c\x1f\xcai\x83\x11\xb7=\xf6\x82\xf0\x8b\xf0F\xf8\"|\x10\xfe^;\x86\x1d1)1\x8c\xb0c;\x00J\b\xc8\xdbÎ\xd7\x01@B\xc0\xb7\x82\x18\xb1\x12\x00F\b\xf8$\x881ְ#\xaeA\x8c\x11\xd7!F\xac\x84\x1dK\xd8\xf17\xec\xf8\x0e;~Î\x9f\xb0\xe3߿\xf4WO\xa1'\xfc\u007f\xbcz\v\xbd\x95\xd0\xdb߫\xfb\xab_\xa1_)\xf4\xab\x86~Y\xe8\xd7\b\xfd\xfa\x86~}B\xbf\xfe^\xbd\xbe\xba\x85n\xe3\xd5G\xe8c\x84\xdeҫ\x97W\xff}\xf5\xf7\xab\u007f_\xfd\xf3\xea\u007f\xafu\x86u\xa6\x03\xf8\x820\xc2:\xdb\x01pA\xf8\v\xeb\xf4\xb0\xce\xeb\x00\xb0 T\x04C\x18\b_\x84\x0f\x02\xa6ְN\\3|\n\xae\x0f\x84\x96\xc2:KX\xe7oX\xe7;\xac\xf3\x1b\xd6\xf9\t\xeb\xc4[\xe2\x01\xf2\xf8!\x860\xe2\x1d\xb1\xfd\x10@\x18\xff\xf0\x82#\\?\x04\x0f\xc6\xcah\x8c\x83\xf1\xcb\xf8a\xe4{\x90j\xe4\f\xe3\x87r\xda`l\xf8Y\"~\xc4\xf8\x8b\xf0F\xc0\xcf\x12\xf1\xb3ĿW\x8f\xa1\xc7t\x00'\x10F\xe8\xb1\x1d\x00\t\x84\xbfУ\x87\x1e\xaf\x03\x00\x81P\x11\fa |\x11>\b\x98ZC\x8f\xb8f\xf8\x14\\\x1f\b-\x85\x1eK\xe8\xf17\xf4\xf8\x0e=~C\x8f\x9f\xd0\xe1~=\xec\x9e\x0e`\x01\xc2\b\xbb\xb7\x03@\x80\xf0\x17v\xf7\xb0\xfbu\x00\x04\x10*\x82!\f\x84/\xc2\a\x01Sk\xd8\x1d\xd7 \xb8\x8e\xeb\x10\x1c\xd6\xf9\xee%\xec\xfe\x1bv\u007f\x87ݿa\xf7O\xd8\xfd\xef_\xe6k\xa60\x13\xfe?^\xb3\x85\xd9J\x98\xed\xef5\xfd5\xaf0\xaf\x14\xe6Uü,\xcck\x84y}ü>a^\u007f\xafY_\xd3´\xf1\x9a#\xcc1\xc2l\xe95\xcbk\xfe\xbe\xe6\xfb5\xbf\xaf\xf9yͿ\xb0b?\xb03\xff\xe16\x9dq\xe0\x85\xf6\xc3\r:\xe3\x1f^p\x84\xeb\x87\x1bs\xc6\xcah\x8c\x83\xf1\xcb\xf8a\xe4{*\x02g\x18?\x94\xd3\x06#\x9e9\xd696\xdf\bo\x84/\xc2\a\xe1\xef\xb5bX\x11\x93\x12\xc3\b+\xb6\x03\x1bm\x04\xe4\xeda\xc5\xeb\xc0\x06\x1b\x01\xdf\n+\x01\xcf\x1c\x1bk\x04|\x12VB\xacaE\\\xc3J\x88\xb8\x8e\x95\x80g\xbeb\t+\xfe\x86\x15\xdfa\xc5oX\xf1\x13V\xfc{\xad\x1cVN\a\xb6\xcd\b#\xac\xdc\x0el\x98\x11\xfe\xc2\xca\x1eV\xbe\x0el\x94\x11*\x82!\f\x84/\xc2\a\x01SkX\x19\xd7\xf0\xcd3\xae\xe3\x9bg|\xf3\\\xc2ʿa\xe5wX\xf9\x1bV\xfe\x84\x95\xff^{\x86=Ӂ\xed/\xc2\b{\xb6\x03\x1b_\x84\xbf\xb0\xa7\x87=\xaf\x03\x1b^\x84\x8a`\b\x03\xe1\x8b\xf0A\xc0\xd4\x1a\xf6\xc45\bn\xe2:\x047!\xb8Y\u009e\xbfa\xcfw\xd8\xf3\x1b\xf6\xfc\x84=\xff^q\x868Ӂm,\xc2\bq\xb6\x03\x1bX\x84\xbf\x10\xa7\x878\xaf\x03\x1bW\x84\x8a`\b\x03\xe1\x8b\xf0A\xc0\xd4\x1a\xe2\xc45T\xb5\x89\xeb\xa8j\xf8\xe6q\x96\x10\xe7o\x88\xf3\x1d\xe2\xfc\x868?!ο\xd7\xcea\xe7t`;\x8a0\xc2\xce\xed\xc0F\x14\xe1/\xec\xeca\xe7\xeb\xc0\x06\x14\xa1\"\x18\xc2@\xf8\"|\x100\xb5\x86\x9dq\r?y\xc6u\xfc\xe4\xb8\xed;\x97\xb0\xf3o\xd8\xf9\x1dv\xfe\x86\x9d?a\xe7\xbf\u007fɯ\x9cBN\xf8\xffx\xe5\x16r+!\xb7\xbfW\xf6W\xbeB\xbeR\xc8W\r\xf9\xb2\x90\xaf\x11\xf2\xf5\r\xf9\xfa\x84|\xfd\xbdr}e\v\xd9\xc6+\x8f\x90\xc7\b\xb9\xa5W.\xaf\xfc\xfb\xca\xefW\xfe\xbe\xf2\xe7\x95\xff^\xe5\f\xe5LG\x81\xb7\x17x{9\xdbQ\xe0\xed\x05\xde^N\x0f弎\x02o/\xf0\xf6\x02o/\xf0\xf6\x02o/\xf0\xf6\x02o/g\r\xe5\xc45ç\xe0\xfa@h)\x94\xb3\x84r\xfe\x86r\xbeC9\xbf\xa1\x9c\x9fPN\xbc%\x1e\x05\xde^\xe8\xed\x85\xde^\xe0\xed\x85\xde^\xe8\xed\x05\xde^\xe0\xed\x85\xde^\xe8\xed\x85\xde^\xe8\xed\x85\xde^\xe8\xed\x85\xde^\xe0\xed\x05\xde^\xe8\xed\x05\xde^\xe8\xed\x85\xde^\xe0\xed\x05\xde^\xe0\xed\x05\xde^\xe0\xed\xe5\x8c\u007f\xa1\xec\xf3(\xfbL?\x85G\xaa\n\x8fT\x95}6\xfc\x11\x89\xf1HU٧#\\\xf8\xfa\xe24$\xc6#U\x85G\xaa\n\x8fT\x15\x1e\xa9*\v\xc2/\xc2\x1b\xe1\x8b\xf0A\xe0\xdb#&\xc6\xf4\x8f\xa2#UEG\xaa\n\x8fT\x15\x1d\xa9*:RUx\xa4\xaa\xf0HUё\xaa\xa2#UEG\xaa\x8a\x8eT\x15\x1d\xa9*:RUt\xa4\xaa\xf0HUᑪ\xa2#U\x85G\xaa\x8a\x8eT\x15\x1d\xa9*\xc6#U\x85G\xaaʆ\x8f\xf1HUᑪ\xb2\xe1c\x1b>\xc6#U\x85G\xaa\n\x8fT\x15\x1e\xa9*\xc7\xe7\xd4[\xfcx돳į_\xe2t\x89\xdf^\x1eo\xba\\\x1f\xe7\xe7\xc7\xf9\xfe8\xfb\xe3l\x8f\xf3\xe3S\xe2\xeb\xd6\xc7\xe8\xe7ǟ|\xbc\xe9\xfe8\xdf\xe2\xdaԸx\xb5\xc4I\xe3\x14צƵ\xe1]\xc0\x16ع\x05\xf6\xd8\x02{l\x81\x9d[`\x8f-\xb0\xc7\x16ع\x05vn\x81=\xb6\xc0\x1e[`\x8f-\xb0\xc7\x16\xd8c\v\xec\xb1\x05\xf6\xd8\x02;\xb7\xc0\xce-\xb0\xc7\x16ع\x05\xf6\xd8\x02{l\x81\x9d[`\xe7\x16ع\x05vn\x81\x9d[`\xe7\x16\xd8+&\xce\xc1\xe7h\xb1f\xb0\x05vn\x81\x9d[`\xc7\x16ر\x05vn\x81\x9d[`\xe7\x16ع\x05vn\x81\x9d[`\xe7\x16ر\x05\xf6\xca\x11\\\x88\x95ø\x10\xb9\x05vl\x81\x1d[`\xc7\x16ر\x05vl\x81\xbd2<\xeax\x9b-\xef0K\xf5q\xbeǯo\xf1c\x84\aK\xf5<\xbf\xc4\xe9\x12\xbf\xbd<\xde\x14\xe1\xc1R}\x9c\uf3f3?\xce\xf68?>\xe5\x1a\xa7\xc7\xe8\xe7ǟ|\xbc\xe9\xfe8Gx\xd4\xd1\xe3T\xe2\xa4q\xf28Y\x9c\xb8H+\xbfU\xbc\xe9\xfc8q\x011\xb3\x1c\x91Y\x8e\xc8,\a3\xcb\xc1\xccrDf9\"\xb3\x1c\x91Y\x8e\xc8,Gd\x96#2\xcb\x11\x99\xe5`f9j\x8c\x8bEZct,\xd2\xc8,\a3\xcb\xc1\xccr0\xb3\x1c\xcc,\a3ˁ\a\x91>\xd6\xde\xf1\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf1\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf1\xb0\xdb\xf1\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf9\xb0\xdb\xf1\xb0\xdb\aG0<\x06\x871<\xf8\xb0\xdb\xf1\xb0\xdb\xf1\xb0\xdb\xf1\xb0\xdb\xf1\xb0\xdb\xf1\xb0\xdby5w\xa4\xbc\x9d)o\x8f\x94\xb7G\xcaۙ\xf2\xf6Hy{\xa4\xbc\x9d)og\xca\xdb#\xe5\xed\x91\xf2\xf6Hy{\xa4\xbc=R\xde\x1e)o\x8f\x94\xb73\xe5\xed[\x8c{\x8e\xbf\x11\xa3\xefq\xe2\xd5ܙ\xf2v\xa6\xbc\x9d)og\xcaۙ\xf2\xf6->\xaa\xf2\rLy\xfb#\xe5폔\xb7G\xca\xdb\x1f)o\u007f\xa4\xbc=R\xde\x1e)o\u007f\xa4\xbc\xfd\x91\xf2\xf6G\xca\xdb\x1f)o\u007f\xa4\xbc\xfd\x91\xf2\xf6G\xca\xdb#\xe5\xed\x91\xf2\xf6G\xca\xdb#\xe5폔\xb7?R\xde\x1e)o\x8f\x94\xb7G\xca\xdb#\xe5\xed\x91\xf2\xf6Hy\x031=\x18\xd3#bzDL\x0f\xc6\xf4\x88\x98\x1e\x11Ӄ1=\x18\xd3#bzDL\x8f\x88\xe9\x111=\"\xa6G\xc4\xf4\x88\x98\x1e\x8c\xe9Qc\xdcs\xfc\x8d\x18}\x8f\x13\xef\xc2`L\x0f\xc6\xf4`L\x0f\xc6\xf4`L\x8f\xd8-\x91\xa7\x0f\xe6\xe9#\xf2\xf4\x11y\xfa`\x9e>\"O\x1f\x91\xa7\x0f\xe6\xe9\x83y\xfa\x88<}D\x9e>\"O\x1f\x91\xa7\x8f\xc8\xd3G\xe4\xe9#\xf2\xf4\xc1<}\x8c\x18\x17\vq\xc4\xe8X\x88\x91\xa7\x0f\xe6\xe9\x83y\xfa`\x9e>\x98\xa7\x0f\xe6\xe9\x83yz\xae\xbd\xe3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xe3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xe3\xf9\xb6\xe3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xf3\xf9\xb6\xe3\xf9\xb6O\x8e\xe0B\x9c\x1cƅ\xc8\xe7ێ\xe7ێ\xe7ێ\xe7ێ\xe7ێ\xe7\xdb>\x19\xd3\xcc\xd3{\xe4\xe9\xfd\x91\xa7\xf7G\x9e\xde#O\xef\x8f<\xbd?\xf2\xf4\x1eyz\x8f<\xbd?\xf2\xf4\xfe\xc8\xd3\xfb#O\xef\x8f<\xbd?\xf2\xf4\xfe\xc8\xd3\xfb#O\uf467\xf7\xc8\xd3\xfb#O\uf467\xf7G\x9e\xde\x1fyz\x8f<\xbdG\x9e\xde#O\uf467\xf7\xc8\xd3{\xe4\xe9\xbd\xf2[śΏ\x13W=cz\x8f\x98\xde#\xa6w\xc6\xf4Θ\xde#\xa6\xf7\x88\xe9=bz\x8f\x98\xde#\xa6\xf7\x88\xe9=bzgL\xef5\xc6Ef\xa91:2K\xc4\xf4Θ\xde\x19\xd3;czgL\xef\x8c\xe9\x9d1\xbd7\xfc\xb3\xf1\xef\xb7\xf3\xe3\xc4\x0fl\x9ct\x8bI\xb7\x98t\xe3\xa4\x1b'\xddb\xd2-&\xddb\xd2-&\xddb\xd2-&\xddbҍ\x93n1.&\xddbtL\xbaŤ\x1b'\xdd8\xe9\xc6I7N\xbaqҍ\vq\"\xbc'\xd7\xd4\x04\u007fE?\x82\x1f\xe0\xf0ڳג\xbdj\xf6\xea٫e\xaf\xb8\x95u<9\xc1\xe1\x01\x0e\x0fp8\xc1\xe1\x01\x0e\x0fp8\xc1\xe1\x04\x87\a8<\xc0\xe1\x01\x0e\x0fpx\x80\xc3\x03\x1c\x1e\xe0p\x82\xc3\t\x0e\x0fp8\xc1\xe1\x01\x0e\x0fp8\xc1\xe1\x04\x87\x13\x1cNp8\xc1\xe1\x04\x87\x1f\x15\x13\xe7\xe0s\xb4\x88a\xacX\x82\xc3\t\x0e\a8\x1c\xe0p\x82\xc3\t\x0e'8\x9c\xe0p\x82\xc3\t\x0e'8\x1c\xe0p\x80\xc3\t\x0e\a8\x9c\xe0p\x82\xc3\x01\x0e\a8\x1c\xe0p\x80\xc3\x01\x0e\a8|d\x1f\xe7\xd5\x01\x0e\a8|\xdcV\a8\x1c\xe0\xf0\xf1\x92}\\V\a8\x1c\xe0p\x80\xc3\x01\x0e\a8\x1c\xe0p\x80\xc3\xc75\xfb@\x1fn\xe5@?n%\xc0\xe1\xa3g\x1f%\xfb\xd0\xecó\x0fˎ\xab\xb2o\xab\x03\x1cNp8\xc1\xe1\x00\x87\x13\x1cNp8\xc0\xe1\x00\x87\x13\x1cNp8\xc1\xe1\x04\x87\x13\x1cNp8\xc1\xe1\x00\x87\x03\x1cNp8\xc0\xe1\x04\x87\x13\x1c\x0ep8\xc0\xe1\x00\x87\x03\x1c\x0ep8\xc0\xe1\x00\x87\x13\x1c\x1e\xe0\xf0\x00\x87\x13\x1c\x1e\xe0\xf0\x00\x87\x13\x1cNpx\x80\xc3\x03\x1c\x1e\xe0\xf0\x00\x87\a8<\xc0\xe1\x01\x0e'8\x9c\xe0\xf0\x00\x87\x13\x1c\x1e\xe0\xf0\x00\x87\x13\x1cNp8\xc1\xe1\x04\x87\x13\x1cNp\xf8\xa8\xab\x03\x1cNp8\xc1\xe1\x00\x87\x13\x1cNp8\xc0\xe1\x00\x87\x13\x1cNp8\xc1\xe1\x04\x87\x13\x1cNp8\xc1\xe1\x00\x87\x03\x1cNp8\xc0\xe1\x04\x87\x13\x1c\x0ep8\xc0\xe1\x00\x87\x03\x1c\x0ep\xf8\xe0\xae0V\a8\x9c\xe0p\x82\xc3\x01\x0e'8\x9c\xe0p\x80\xc3\x01\x0e'8\x9c\xe0p\x82\xc3\t\x0e'8\x9c\xe0p\x82\xc3\x01\x0e\a8\x9c\xe0p\x80\xc3\t\x0e'8\x1c\xe0p\x80\xc3\x01\x0e\a8\x1c\xe0p\x80\xc3g\xf6y^\x1d\xe0p\x80\xc3\xe7mu\x80\xc3\x01\x0e\x9f/\xd9\xe7eu\x80\xc3\x01\x0e\a8\x1c\xe0p\x80\xc3\x01\x0e\a8|^\xb3O\xf4!\xf8'\xfa\x11\xfc\x00\x87Ϟ}\x96\xecS\xb3O\xcf>-\xfbD\x8c!\x8f\x11\x1c\x1e\xe0\xf0\x00\x87\x13\x1c\x1e\xe0\xf0\x00\x87\x13\x1cNpx\x80\xc3\x03\x1c\x1e\xe0\xf0\x00\x87\a8<\xc0\xe1\x01\x0e'8\x9c\xe0\xf0\x00\x87\x13\x1c\x1e\xe0\xf0\x00\x87\x13\x1cNp8\xc1\xe1\x04\x87\x13\x1cNp\xf8^1q\x0e>G\x8bŅ\x18#8\x9c\xe0p\x80\xc3\x01\x0e'8\x9c\xe0p\x82\xc3\t\x0e'8\x9c\xe0p\x82\xc3\x01\x0e\a8\x9c\xe0p\x80\xc3\t\x0e'8\x1c\xe0p\x80\xc3\x01\x0e\a8\x1c\xe0p\x80\xc3\xf7\xb6:\xc0\xe1\x04\x87\x13\x1c\x0ep8\xc1\xe1\x04\x87\x03\x1c\x0ep8\xc1\xe1\x04\x87\x13\x1cNp8\xc1\xe1\x04\x87\x13\x1c\x0ep8\xc0\xe1\x04\x87\x03\x1cNp8\xc1\xe1\x00\x87\x03\x1c\x0ep8\xc0\xe1\x00\x87\x03\x1c~\xcc\xd5\x01\x0e'8\x9c\xe0p\x80\xc3\t\x0e'8\x1c\xe0p\x80\xc3\t\x0e'8\x9c\xe0p\x82\xc3\t\x0e'8\x9c\xe0p\x80\xc3\x01\x0e'8\x1c\xe0p\x82\xc3\t\x0e\a8\x1c\xe0p\x80\xc3\x01\x0e\a8\x1c\xe0\xf0:W\a8\x9c\xe0p\x82\xc3\x01\x0e'8\x9c\xe0p\x80\xc3\x01\x0e'8\x9c\xe0p\x82\xc3\t\x0e'8\x9c\xe0p\x82\xc3\x01\x0e\a8\x9c\xe0p\x80\xc3\t\x0e'8\x1c\xe0p\x80\xc3\x01\x0e\a8\x1c\xe0p\x80Ï\xb6:\xc0\xe1\x04\x87\x13\x1c\x0ep8\xc1\xe1\x04\x87\x03\x1c\x0ep8\xc1\xe1\x04\x87\x13\x1cNp8\xc1\xe1\x04\x87\x13\x1c\x0ep8\xc0\xe1\x04\x87\x03\x1cNp8\xc1\xe1\x00\x87\x03\x1c\x0ep8\xc0\xe1\x00\x87\x03\x1c\u07b2\xb7\xf3\xea\x00\x87\x03\x1c\xden\xab\x03\x1c\x0epx{\xc9\xde.\xab\x03\x1c\x0ep8\xc0\xe1\x00\x87\x03\x1c\x0ep8\xc0\xe1횽\xa1\x0f颡\x1f\xe9\x02\xe0\xf0ֳ\xb7\x92\xbdi\xf6\xe6ٛeo\xb2ؖm;\xaf\x06p\x18\xc0a\xdbm5\x80\xc3\x00\x0e\xdb^\xb2m\x97\xd5\x00\x0e\x038\f\xe00\x80\xc3\x00\x0e\x038\f\xe0\xb0\xed\x9amC\xdf3>\x05\xfdw4\xb7s\xb6\xadg\xdbJ\xb6M\xb3m\x9em\xb3l\x1b\xdeRW\x038\x8c\xe00\x82\xc3\x00\x0e#8\x8c\xe00\x80\xc3\x00\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\x8c\xe00\x82\xc3\x00\x0e\x038\x8c\xe00\x80\xc3\b\x0e#8\f\xe00\x80\xc3\x00\x0e\x038\f\xe00\xecyvl\xab\x01\x1cFp\x18\xc1a\x00\x87\x11\x1cFp\x18\xc0a\x00\x87\x11\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc1a\x00\x87\x01\x1cFp\x18\xc0a\x04\x87\x11\x1c\x06p\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0a\x00\x87\x11\x1c\x16\xe0\xb0\x00\x87\x11\x1c\x16\xe0\xb0\x00\x87\x11\x1cFpX\x80\xc3\x02\x1c\x16\xe0\xb0\x00\x87\x058,\xc0a\x01\x0e#8\x8c\xe0\xb0\x00\x87\x11\x1c\x16\xe0\xb0\x00\x87\x11\x1cFp\x18\xc1a\x04\x87\x11\x1cFpX\x1d\xab\x01\x1cFp\x18\xc1a\x00\x87\x11\x1cFp\x18\xc0a\x00\x87\x11\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc1a\x00\x87\x01\x1cFp\x18\xc0a\x04\x87\x11\x1c\x06p\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0a5[Š3\x9b{\xb6z[\r\xe00\x80\xc3\xeaK\xb6zY\r\xe00\x80\xc3\x00\x0e\x038\f\xe00\x80\xc3\x00\x0e\xab\xd7l\x15}\b\xfe\x8a~\x04?\xc0a\xb5g\xab%[\xd5lճU\xcbVq+\xebx2\x82\xc3\x02\x1c\x16\xe00\x82\xc3\x02\x1c\x16\xe00\x82\xc3\b\x0e\vpX\x80\xc3\x02\x1c\x16\xe0\xb0\x00\x87\x058,\xc0a\x04\x87\x11\x1c\x16\xe00\x82\xc3\x02\x1c\x16\xe00\x82\xc3\b\x0e#8\x8c\xe00\x82\xc3\b\x0e;*&\xce\xc1\xe7h\x11\xc3X\xb1\x04\x87\x11\x1c\x06p\x18\xc0a\x04\x87\x11\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc0a\x00\x87\x11\x1c\x06p\x18\xc1a\x04\x87\x01\x1c\x06p\x18\xc0a\x00\x87\x01\x1c\x06p\xd8\xc86Ϋ\x01\x1c\x06pظ\xad\x06p\x18\xc0a\xe3%۸\xac\x06p\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0a\x00\x87\x8dk\xb6\x81>\xdcʁ~\xdcJ\x80\xc3F\xcf6J\xb6\xa1نg\x1b\x96\rWe\xdfV\x038\x8c\xe00\x82\xc3\x00\x0e#8\x8c\xe00\x80\xc3\x00\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\x8c\xe00\x82\xc3\x00\x0e\x038\x8c\xe00\x80\xc3\b\x0e#8\f\xe00\x80\xc3\x00\x0e\x038\f\xe00\x80\xc3\x00\x0e#8,\xc0a\x01\x0e#8,\xc0a\x01\x0e#8\x8c\xe0\xb0\x00\x87\x058,\xc0a\x01\x0e\vpX\x80\xc3\x02\x1cFp\x18\xc1a\x01\x0e#8,\xc0a\x01\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\x8c\xe0\xb0QW\x038\x8c\xe00\x82\xc3\x00\x0e#8\x8c\xe00\x80\xc3\x00\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\x8c\xe00\x82\xc3\x00\x0e\x038\x8c\xe00\x80\xc3\b\x0e#8\f\xe00\x80\xc3\x00\x0e\x038\f\xe0\xb0\xc1]a\xac\x06p\x18\xc1a\x04\x87\x01\x1cFp\x18\xc1a\x00\x87\x01\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc1a\x04\x87\x01\x1c\x06p\x18\xc1a\x00\x87\x11\x1cFp\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0a\x00\x87\xcdl\xf3\xbc\x1a\xc0a\x00\x87\xcd\xdbj\x00\x87\x01\x1c6_\xb2\xcd\xcbj\x00\x87\x01\x1c\x06p\x18\xc0a\x00\x87\x01\x1c\x06pؼf\x9b\xe8C\xf0O\xf4#\xf8\x01\x0e\x9b=\xdb,٦f\x9b\x9emZ\xb6\x89\x18C\x1e#8,\xc0a\x01\x0e#8,\xc0a\x01\x0e#8\x8c\xe0\xb0\x00\x87\x058,\xc0a\x01\x0e\vpX\x80\xc3\x02\x1cFp\x18\xc1a\x01\x0e#8,\xc0a\x01\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\x8cఽb\xe2\x1c|\x8e\x16\x8b\v1Fp\x18\xc1a\x00\x87\x01\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc1a\x04\x87\x01\x1c\x06p\x18\xc1a\x00\x87\x11\x1cFp\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0a\x00\x87\xedm5\x80\xc3\b\x0e#8\f\xe00\x82\xc3\b\x0e\x038\f\xe00\x82\xc3\b\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\f\xe00\x80\xc3\b\x0e\x038\x8c\xe00\x82\xc3\x00\x0e\x038\f\xe00\x80\xc3\x00\x0e\x038옫\x01\x1cFp\x18\xc1a\x00\x87\x11\x1cFp\x18\xc0a\x00\x87\x11\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc1a\x00\x87\x01\x1cFp\x18\xc0a\x04\x87\x11\x1c\x06p\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0au\xae\x06p\x18\xc1a\x04\x87\x01\x1cFp\x18\xc1a\x00\x87\x01\x1cFp\x18\xc1a\x04\x87\x11\x1cFp\x18\xc1a\x04\x87\x01\x1c\x06p\x18\xc1a\x00\x87\x11\x1cFp\x18\xc0a\x00\x87\x01\x1c\x06p\x18\xc0a\x00\x87\x1dm5\x80\xc3\b\x0e#8\f\xe00\x82\xc3\b\x0e\x038\f\xe00\x82\xc3\b\x0e#8\x8c\xe00\x82\xc3\b\x0e#8\f\xe00\x80\xc3\b\x0e\x038\x8c\xe00\x82\xc3\x00\x0e\x038\f\xe00\x80\xc3\x00\x0e\x038\xacek\xe7\xd5\x00\x0e\x038\xac\xddV\x038\f\xe0\xb0\xf6\x92\xad]V\x038\f\xe00\x80\xc3\x00\x0e\x038\f\xe00\x80\xc3\xda5[C\x1f\xd2EC?\xd2\x05\xc0a\xadgk%[\xd3lͳ5\xcb\xd6d\x91-\xcbv^\x05\xe0\x10\x80C\xb6\xdb*\x00\x87\x00\x1c\xb2\xbdd\xd9.\xab\x00\x1c\x02p\b\xc0!\x00\x87\x00\x1c\x02p\b\xc0!\xdb5ˆ\xbeg|\n\xfa\xefhn\xe7,[ϲ\x95,\x9bf\xd9<\xcbfY6\xbc\xa5\xae\x02p\b\xc1!\x04\x87\x00\x1cBp\b\xc1!\x00\x87\x00\x1cBp\b\xc1!\x04\x87\x10\x1cBp\b\xc1!\x04\x87\x00\x1c\x02p\b\xc1!\x00\x87\x10\x1cBp\b\xc0!\x00\x87\x00\x1c\x02p\b\xc0!\xd8\xf3\xe4\xd8V\x018\x84\xe0\x10\x82C\x00\x0e!8\x84\xe0\x10\x80C\x00\x0e!8\x84\xe0\x10\x82C\b\x0e!8\x84\xe0\x10\x82C\x00\x0e\x018\x84\xe0\x10\x80C\b\x0e!8\x04\xe0\x10\x80C\x00\x0e\x018\x04\xe0\x10\x80C\x00\x0e!8$\xc0!\x01\x0e!8$\xc0!\x01\x0e!8\x84\xe0\x90\x00\x87\x048$\xc0!\x01\x0e\tpH\x80C\x02\x1cBp\b\xc1!\x01\x0e!8$\xc0!\x01\x0e!8\x84\xe0\x10\x82C\b\x0e!8\x84\xe0\x90:V\x018\x84\xe0\x10\x82C\x00\x0e!8\x84\xe0\x10\x80C\x00\x0e!8\x84\xe0\x10\x82C\b\x0e!8\x84\xe0\x10\x82C\x00\x0e\x018\x84\xe0\x10\x80C\b\x0e!8\x04\xe0\x10\x80C\x00\x0e\x018\x04\xe0\x10\x80Cj\x96\x8aAg6\xf7,\xf5\xb6\n\xc0!\x00\x87ԗ,\xf5\xb2\n\xc0!\x00\x87\x00\x1c\x02p\b\xc0!\x00\x87\x00\x1cR\xafY*\xfa\x10\xfc\x15\xfd\b~\x80Cj\xcfRK\x96\xaaY\xaag\xa9\x96\xa5\xe2V\xd6\xf1$\x04\x87\x048$\xc0!\x04\x87\x048$\xc0!\x04\x87\x10\x1c\x12\xe0\x90\x00\x87\x048$\xc0!\x01\x0e\tpH\x80C\b\x0e!8$\xc0!\x04\x87\x048$\xc0!\x04\x87\x10\x1cBp\b\xc1!\x04\x87\x10\x1crTL\x9c\x83\xcf\xd1\"\x86\xb1b\t\x0e!8\x04\xe0\x10\x80C\b\x0e!8\x84\xe0\x10\x82C\b\x0e!8\x84\xe0\x10\x80C\x00\x0e!8\x04\xe0\x10\x82C\b\x0e\x018\x04\xe0\x10\x80C\x00\x0e\x018\x04\xe0\x90\x91e\x9cW\x018\x04\xe0\x90q[\x05\xe0\x10\x80C\xc6K\x96qY\x05\xe0\x10\x80C\x00\x0e\x018\x04\xe0\x10\x80C\x00\x0e\x19\xd7,\x03}\xb8\x95\x03\xfd\xb8\x95\x00\x87\x8c\x9ee\x94,C\xb3\f\xcf2,\v\xaeʾ\xad\x02p\b\xc1!\x04\x87\x00\x1cBp\b\xc1!\x00\x87\x00\x1cBp\b\xc1!\x04\x87\x10\x1cBp\b\xc1!\x04\x87\x00\x1c\x02p\b\xc1!\x00\x87\x10\x1cBp\b\xc0!\x00\x87\x00\x1c\x02p\b\xc0!\x00\x87\x00\x1cBpH\x80C\x02\x1cBpH\x80C\x02\x1cBp\b\xc1!\x01\x0e\tpH\x80C\x02\x1c\x12\xe0\x90\x00\x87\x048\x84\xe0\x10\x82C\x02\x1cBpH\x80C\x02\x1cBp\b\xc1!\x04\x87\x10\x1cBp\b\xc1!\xa3\xae\x02p\b\xc1!\x04\x87\x00\x1cBp\b\xc1!\x00\x87\x00\x1cBp\b\xc1!\x04\x87\x10\x1cBp\b\xc1!\x04\x87\x00\x1c\x02p\b\xc1!\x00\x87\x10\x1cBp\b\xc0!\x00\x87\x00\x1c\x02p\b\xc0!\x83\xbb\xc2X\x05\xe0\x10\x82C\b\x0e\x018\x84\xe0\x10\x82C\x00\x0e\x018\x84\xe0\x10\x82C\b\x0e!8\x84\xe0\x10\x82C\b\x0e\x018\x04\xe0\x10\x82C\x00\x0e!8\x84\xe0\x10\x80C\x00\x0e\x018\x04\xe0\x10\x80C\x00\x0e\x99Y\xe6y\x15\x80C\x00\x0e\x99\xb7U\x00\x0e\x018d\xbed\x99\x97U\x00\x0e\x018\x04\xe0\x10\x80C\x00\x0e\x018\x04\xe0\x90y\xcd2ч\xe0\x9f\xe8G\xf0\x03\x1c2{\x96Y\xb2L\xcd2=˴,\x131\x86\xa4\x8b\x86~\xa4\v\x80CZ\xcf\xd2J\x96\xa6Y\x9agi\x96\xa5I\xfe\xf8\x9b\x9f\xbc\xbe\xfe~^\u007f\xf5z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1z\xbc\x1e\xaf\xc7\xeb\xf1\xff\xfb\xb1\xbe\xb7\x1d\xa7\xb7\xdfێ\xdb\xf9\x94߫\xa7\xfc\xde8\xad\xef\x8d\v\x9arZ\xdf\xdb[4O\xef\x1d\xf3vZߛ\xe8\x99\xd7S\xfe`\xfb\xc9\xeb\xfd\xed\xa7\u007f~\xbc\xd6\x0f6\xfd?7\xb7\x9f\xdb\\\xbf\xa0\xb1\xcf5O\x1fl\xb7\xf3\xcfl\xd7\x0f\xf0\xed>\x88o\xf7\xc1\xf8\x85^\xeb\aC\u007fns;=}0\xf8\xa7\xfef\xbb~0\x8e\xff\xbd\xd9\xe7\x97k\xa6\xfe\xb8\xb9\x9e\x9e>\x98\xfc\xd8/n\xd7o\uf4d7\u007f}\x1f\x17\xf3\xd1\xdcNo\xbf\u007fT|\xe5\xf7\xc7\xe9\xe9\xfdc^N\xf9\xfdvZ?\xac\a\x9a\xdb\xe9\xe9ã\xdeN\xeb\x87\xfb<=}\xb8\xa3\xfb\xc3vZ?»\x1f\xcd\xf5\xf4\xf4\xd1v\xe8\xe9\xed\x8fx\xed֏\xaa\xa19NO\x1f\xed\xdbqZ?j74W4v\xcao\xb6\xd3\xfa\x06\xefD\xf3\xf4\x867\xe0K\xb7\xf9M\xfdү\xf5M\xd5/hn\u007f'\xcd\xe5\xe76ן\xd5\xd8\xe9\xe9M\xe5\xb7\xf9\xbbi\xd77\xb8O?\xdd,\u007fr\xcaoƗz=\xbda\b~\a\xcb\xf5;\xf5v\xcao\xe6\x97z\xado\x10s\x9fon_\xd0\\\xfef\xf3\xf4\x06\x81\xb8\xfcї\xfd/\xff\x91>^\xb7\x9f\xf3\xba~\xeee?~=\xbd\xcbE\xfdn\xd5S~\xb7\x9d\xd6w\x9b\x9d\xd6we;=\xbd+U\xd9\x1e\xa7\xa7o\v\x82\x90\xed\xdb\xdf\x16\xbc\x03\xa7\x83?\xf1\xd2|(\xe3\xf4\xf4\xa1\f==}\x8ba\xf8h\xb1(\x9e\xbe\xb5oz\xcaߙ\xa7\xf5[s\x9c֏\xbf\xf9I4o\u007f7ތ\u007f?\xfdi\xfb\xeb\u007f\xb2\xc9\u007f\xd6N\xebw\x05ױq\xa9=}$\xf5vz\xfb\xcf\x1a\xe3\xfb\x0f\xe6\xe9\xe9\x8f\xf1\x8ehy\xb1\xf91\xdf\xda\xce\xed\xf11x\xf7\xe7>\x10\x9f\xf3\xfb\x9f\xffM4\u007f\xb0\xddN\xf9\xa3vz\xfaÉ\u007f\xbd\xfe\x0f|\xaf\xaf\xd7\xd7\xdf\xfe\u007f\x02]>\xfdt\xf9\xb4-\x9f^\U000a77f6\xfc駗\xe5\xee\xcb\xdd\u007f\xd1\xcfY\xae\xb7\xe5Z\x97k[\xbe\u007f\xcbW\xfd\xc2\xff\x91w9\xda[\xcbv\xa4\xbfx+\xbd$I\x9a.隮\xc9\xd3o-wIw6iK\xdb[\xe99\x9d9\xe4\xfb\xe9/\xf1\xc6\xe4\xe9H\x8a7\xf0\xa7ho\xe9Ƴ%\xe3\x87\xfb}\xf1{\xfa\f\x9f\xe2\xcb\xf7GzN\x9a,]\xde\xfa\xbf~\xfc2\xdcƷ^\x8f\xbf\xbf\xe3\xff\xf5\xcd\xfa\xdb}\xce/{F\xfaYs\xfd\xab_\x82\x89\xa5\xff\xf9\v\xe7ů~uy\xe7\x9d\xf4N\xfa^\xfa^\xfa\xf5\xe57N\xe9\aˏN\xe9\xe3\xe5\x93\xd3\xf2\xf1\xaf\xe7\xdf\xf8\xe4\xb4|\xedk\xf9\x1b\xdf8\xa5\xaf-߈ߧ\x1f\xa4\x1f\xfd\x8c\x8b\x92\xbe\x92\xbe\x92\xbe\xfaV\xfa\xdd\xf4;\xe9\x9b\xe9W\xd2;\xe9\xd7\xd3o`<_\xbf\x9a~-\xfdf\xfa\xad\xf4N\xfaZ\xfaF\xfa\xfa[\xe9\xcf\xd3?J\xff8\xfd\xde\x17|\x18O\xbfD\x89\xe3\xc7ScJ\xff\x95\xf4\x0fӯr\uefd6\xfe\t\xbf\"\xbe\xd6W\xd2;\xe9\xab\xe9\xb7\xd3?M\xff,\xfd\xf3\xf4/ҿL\xff*\xfd\xeb\xf4oҿM\xff.\xfdN\xfa\xdd\xf4\xb5\xf4\xf5\xf4\x8d\xf4\xcd\xf4{\xe9ߧ\xff\x90\xdeM\xbf\x9f\xfec\xfa\x83\xf4\x87\xe9[\xe9\x8f\xd2\x1f\xa7\xf7\xd2\xfb\xe9?\xa5\x0fҟ\xa4\x0fӟ\xa6\xff\x9c>J\xdfN\xff%\xfd\xd7\xf4\x9d\xf4g\xe9M\xfan\xfa8\xfdy\xfa$\xfd\xb7\xf4\xbd\xf4\x17iKϩ\xa4\x97Tӧ\xe9\x9c$\xb5\xd4\x1f\xbb\xd5-\x8dd鿧\xcf\xd2=y\x9a\xe9\xfbiO\xff#\x1d\xe9/\xd3\x0f\xd2\x0fӏ~\x12\x1f\xe9\xab\xe9\xe3\xf4I\xfaJ\xfa\xcde\x1fiK-\xcdT\xd3X\x8em9\xe6r\x8c\xc5g\xfa\xad\xcf\xfd^\xb7EۢsѺ\xe8X\xee\xdbro\xcb}.\xf7\xba\xdc\xc7\xe2\xdb\xe2m\xf1\xb9x]|,\xb7m\xb9\xb5\xe56\x97[]nc\x91m\x91\xb6\xc8\\\xa4.2\x96\xeb\x86m\xf8:\xb9\x1f\u007f\xee/~\xb6-\x9f\xb5峹|V\x97\xcfƲo\xe9\x86\xeb\xf6V:/\xe7\xf3r\xbe\xa7\xdbr\xeb\xcbM\xd2\xcb\xf2\xf2\x92>[.\xe7\xe5r].\xcf\xcb\xe5\xbe\\|\xb9\xd8\xf2\x99\xa4kz^\x9e\x9f\x97\xe7;\xf6\xeb\xfb[\xa9/\xbd\xa7\x924y\xb2\xf4S\xbb~ږ\xad.ǖ\x8f\xad.u\xa4\xfa\xe3Σ\x8e\xe5\xc0\x97\u07b7\xbcou\x19\xf5'O\b#ͼױ\xecu\xd9\xdbr\xcc\x1f\xf7Թ\x1c-\xb5\x9fZ[\xbf\xfd\xee\xf2\xe1G\\\x06?\\\xde|}\xf9\xce\xd7\xf9w\u007f\x88\x9f\xf9\xfa\xd5\xf4'_v\x9d\xc6\xfdC(\xfe\xaf\x00\x00\x00\xff\xffky\xc4\xd8" diff --git a/vendor/github.com/gosimple/unidecode/table.txt b/vendor/github.com/gosimple/unidecode/table.txt deleted file mode 100644 index 9f5d59fe..00000000 --- a/vendor/github.com/gosimple/unidecode/table.txt +++ /dev/null @@ -1,46731 +0,0 @@ -/* x000 */ -0x0000: "\x00" -0x0001: "\x01" -0x0002: "\x02" -0x0003: "\x03" -0x0004: "\x04" -0x0005: "\x05" -0x0006: "\x06" -0x0007: "\x07" -0x0008: "\x08" -0x0009: "\t" -0x000a: "\n" -0x000b: "\x0b" -0x000c: "\x0c" -0x000d: "\r" -0x000e: "\x0e" -0x000f: "\x0f" -0x0010: "\x10" -0x0011: "\x11" -0x0012: "\x12" -0x0013: "\x13" -0x0014: "\x14" -0x0015: "\x15" -0x0016: "\x16" -0x0017: "\x17" -0x0018: "\x18" -0x0019: "\x19" -0x001a: "\x1a" -0x001b: "\x1b" -0x001c: "\x1c" -0x001d: "\x1d" -0x001e: "\x1e" -0x001f: "\x1f" -0x0020: " " -0x0021: "!" -0x0022: "\"" -0x0023: "#" -0x0024: "$" -0x0025: "%" -0x0026: "&" -0x0027: "'" -0x0028: "(" -0x0029: ")" -0x002a: "*" -0x002b: "+" -0x002c: "," -0x002d: "-" -0x002e: "." -0x002f: "/" -0x0030: "0" -0x0031: "1" -0x0032: "2" -0x0033: "3" -0x0034: "4" -0x0035: "5" -0x0036: "6" -0x0037: "7" -0x0038: "8" -0x0039: "9" -0x003a: ":" -0x003b: ";" -0x003c: "<" -0x003d: "=" -0x003e: ">" -0x003f: "?" -0x0040: "@" -0x0041: "A" -0x0042: "B" -0x0043: "C" -0x0044: "D" -0x0045: "E" -0x0046: "F" -0x0047: "G" -0x0048: "H" -0x0049: "I" -0x004a: "J" -0x004b: "K" -0x004c: "L" -0x004d: "M" -0x004e: "N" -0x004f: "O" -0x0050: "P" -0x0051: "Q" -0x0052: "R" -0x0053: "S" -0x0054: "T" -0x0055: "U" -0x0056: "V" -0x0057: "W" -0x0058: "X" -0x0059: "Y" -0x005a: "Z" -0x005b: "]" -0x005c: "\\" -0x005d: "]" -0x005e: "^" -0x005f: "_" -0x0060: "`" -0x0061: "a" -0x0062: "b" -0x0063: "c" -0x0064: "d" -0x0065: "e" -0x0066: "f" -0x0067: "g" -0x0068: "h" -0x0069: "i" -0x006a: "j" -0x006b: "k" -0x006c: "l" -0x006d: "m" -0x006e: "n" -0x006f: "o" -0x0070: "p" -0x0071: "q" -0x0072: "r" -0x0073: "s" -0x0074: "t" -0x0075: "u" -0x0076: "v" -0x0077: "w" -0x0078: "x" -0x0079: "y" -0x007a: "z" -0x007b: "{" -0x007c: "|" -0x007d: "}" -0x007e: "~" -0x007f: "\x7f" -0x0080: "" -0x0081: "" -0x0082: "" -0x0083: "" -0x0084: "" -0x0085: "" -0x0086: "" -0x0087: "" -0x0088: "" -0x0089: "" -0x008a: "" -0x008b: "" -0x008c: "" -0x008d: "" -0x008e: "" -0x008f: "" -0x0090: "" -0x0091: "" -0x0092: "" -0x0093: "" -0x0094: "" -0x0095: "" -0x0096: "" -0x0097: "" -0x0098: "" -0x0099: "" -0x009a: "" -0x009b: "" -0x009c: "" -0x009d: "" -0x009e: "" -0x009f: "" -0x00a0: " " -0x00a1: "!" -0x00a2: "C/" -0x00a3: "PS" -0x00a4: "$?" -0x00a5: "Y=" -0x00a6: "|" -0x00a7: "SS" -0x00a8: "\"" -0x00a9: "(c)" -0x00aa: "a" -0x00ab: "<<" -0x00ac: "!" -0x00ad: "" -0x00ae: "(r)" -0x00af: "-" -0x00b0: "deg" -0x00b1: "+-" -0x00b2: "2" -0x00b3: "3" -0x00b4: "'" -0x00b5: "u" -0x00b6: "P" -0x00b7: "*" -0x00b8: "," -0x00b9: "1" -0x00ba: "o" -0x00bb: ">>" -0x00bc: "1/4" -0x00bd: "1/2" -0x00be: "3/4" -0x00bf: "?" -0x00c0: "A" -0x00c1: "A" -0x00c2: "A" -0x00c3: "A" -0x00c4: "A" -0x00c5: "A" -0x00c6: "AE" -0x00c7: "C" -0x00c8: "E" -0x00c9: "E" -0x00ca: "E" -0x00cb: "E" -0x00cc: "I" -0x00cd: "I" -0x00ce: "I" -0x00cf: "I" -0x00d0: "D" -0x00d1: "N" -0x00d2: "O" -0x00d3: "O" -0x00d4: "O" -0x00d5: "O" -0x00d6: "O" -0x00d7: "x" -0x00d8: "O" -0x00d9: "U" -0x00da: "U" -0x00db: "U" -0x00dc: "U" -0x00dd: "Y" -0x00de: "Th" -0x00df: "ss" -0x00e0: "a" -0x00e1: "a" -0x00e2: "a" -0x00e3: "a" -0x00e4: "a" -0x00e5: "a" -0x00e6: "ae" -0x00e7: "c" -0x00e8: "e" -0x00e9: "e" -0x00ea: "e" -0x00eb: "e" -0x00ec: "i" -0x00ed: "i" -0x00ee: "i" -0x00ef: "i" -0x00f0: "d" -0x00f1: "n" -0x00f2: "o" -0x00f3: "o" -0x00f4: "o" -0x00f5: "o" -0x00f6: "o" -0x00f7: "/" -0x00f8: "o" -0x00f9: "u" -0x00fa: "u" -0x00fb: "u" -0x00fc: "u" -0x00fd: "y" -0x00fe: "th" -0x00ff: "y" -/* x001 */ -0x0100: "A" -0x0101: "a" -0x0102: "A" -0x0103: "a" -0x0104: "A" -0x0105: "a" -0x0106: "C" -0x0107: "c" -0x0108: "C" -0x0109: "c" -0x010a: "C" -0x010b: "c" -0x010c: "C" -0x010d: "c" -0x010e: "D" -0x010f: "d" -0x0110: "D" -0x0111: "d" -0x0112: "E" -0x0113: "e" -0x0114: "E" -0x0115: "e" -0x0116: "E" -0x0117: "e" -0x0118: "E" -0x0119: "e" -0x011a: "E" -0x011b: "e" -0x011c: "G" -0x011d: "g" -0x011e: "G" -0x011f: "g" -0x0120: "G" -0x0121: "g" -0x0122: "G" -0x0123: "g" -0x0124: "H" -0x0125: "h" -0x0126: "H" -0x0127: "h" -0x0128: "I" -0x0129: "i" -0x012a: "I" -0x012b: "i" -0x012c: "I" -0x012d: "i" -0x012e: "I" -0x012f: "i" -0x0130: "I" -0x0131: "i" -0x0132: "IJ" -0x0133: "ij" -0x0134: "J" -0x0135: "j" -0x0136: "K" -0x0137: "k" -0x0138: "k" -0x0139: "L" -0x013a: "l" -0x013b: "L" -0x013c: "l" -0x013d: "L" -0x013e: "l" -0x013f: "L" -0x0140: "l" -0x0141: "L" -0x0142: "l" -0x0143: "N" -0x0144: "n" -0x0145: "N" -0x0146: "n" -0x0147: "N" -0x0148: "n" -0x0149: "'n" -0x014a: "ng" -0x014b: "NG" -0x014c: "O" -0x014d: "o" -0x014e: "O" -0x014f: "o" -0x0150: "O" -0x0151: "o" -0x0152: "OE" -0x0153: "oe" -0x0154: "R" -0x0155: "r" -0x0156: "R" -0x0157: "r" -0x0158: "R" -0x0159: "r" -0x015a: "S" -0x015b: "s" -0x015c: "S" -0x015d: "s" -0x015e: "S" -0x015f: "s" -0x0160: "S" -0x0161: "s" -0x0162: "T" -0x0163: "t" -0x0164: "T" -0x0165: "t" -0x0166: "T" -0x0167: "t" -0x0168: "U" -0x0169: "u" -0x016a: "U" -0x016b: "u" -0x016c: "U" -0x016d: "u" -0x016e: "U" -0x016f: "u" -0x0170: "U" -0x0171: "u" -0x0172: "U" -0x0173: "u" -0x0174: "W" -0x0175: "w" -0x0176: "Y" -0x0177: "y" -0x0178: "Y" -0x0179: "Z" -0x017a: "z" -0x017b: "Z" -0x017c: "z" -0x017d: "Z" -0x017e: "z" -0x017f: "s" -0x0180: "b" -0x0181: "B" -0x0182: "B" -0x0183: "b" -0x0184: "6" -0x0185: "6" -0x0186: "O" -0x0187: "C" -0x0188: "c" -0x0189: "D" -0x018a: "D" -0x018b: "D" -0x018c: "d" -0x018d: "d" -0x018e: "3" -0x018f: "@" -0x0190: "E" -0x0191: "F" -0x0192: "f" -0x0193: "G" -0x0194: "G" -0x0195: "hv" -0x0196: "I" -0x0197: "I" -0x0198: "K" -0x0199: "k" -0x019a: "l" -0x019b: "l" -0x019c: "W" -0x019d: "N" -0x019e: "n" -0x019f: "O" -0x01a0: "O" -0x01a1: "o" -0x01a2: "OI" -0x01a3: "oi" -0x01a4: "P" -0x01a5: "p" -0x01a6: "YR" -0x01a7: "2" -0x01a8: "2" -0x01a9: "SH" -0x01aa: "sh" -0x01ab: "t" -0x01ac: "T" -0x01ad: "t" -0x01ae: "T" -0x01af: "U" -0x01b0: "u" -0x01b1: "Y" -0x01b2: "V" -0x01b3: "Y" -0x01b4: "y" -0x01b5: "Z" -0x01b6: "z" -0x01b7: "ZH" -0x01b8: "ZH" -0x01b9: "zh" -0x01ba: "zh" -0x01bb: "2" -0x01bc: "5" -0x01bd: "5" -0x01be: "ts" -0x01bf: "w" -0x01c0: "|" -0x01c1: "||" -0x01c2: "|=" -0x01c3: "!" -0x01c4: "DZ" -0x01c5: "Dz" -0x01c6: "dz" -0x01c7: "LJ" -0x01c8: "Lj" -0x01c9: "lj" -0x01ca: "NJ" -0x01cb: "Nj" -0x01cc: "nj" -0x01cd: "A" -0x01ce: "a" -0x01cf: "I" -0x01d0: "i" -0x01d1: "O" -0x01d2: "o" -0x01d3: "U" -0x01d4: "u" -0x01d5: "U" -0x01d6: "u" -0x01d7: "U" -0x01d8: "u" -0x01d9: "U" -0x01da: "u" -0x01db: "U" -0x01dc: "u" -0x01dd: "@" -0x01de: "A" -0x01df: "a" -0x01e0: "A" -0x01e1: "a" -0x01e2: "AE" -0x01e3: "ae" -0x01e4: "G" -0x01e5: "g" -0x01e6: "G" -0x01e7: "g" -0x01e8: "K" -0x01e9: "k" -0x01ea: "O" -0x01eb: "o" -0x01ec: "O" -0x01ed: "o" -0x01ee: "ZH" -0x01ef: "zh" -0x01f0: "j" -0x01f1: "DZ" -0x01f2: "Dz" -0x01f3: "dz" -0x01f4: "G" -0x01f5: "g" -0x01f6: "HV" -0x01f7: "W" -0x01f8: "N" -0x01f9: "n" -0x01fa: "A" -0x01fb: "a" -0x01fc: "AE" -0x01fd: "ae" -0x01fe: "O" -0x01ff: "o" -/* x002 */ -0x0200: "A" -0x0201: "a" -0x0202: "A" -0x0203: "a" -0x0204: "E" -0x0205: "e" -0x0206: "E" -0x0207: "e" -0x0208: "I" -0x0209: "i" -0x020a: "I" -0x020b: "i" -0x020c: "O" -0x020d: "o" -0x020e: "O" -0x020f: "o" -0x0210: "R" -0x0211: "r" -0x0212: "R" -0x0213: "r" -0x0214: "U" -0x0215: "u" -0x0216: "U" -0x0217: "u" -0x0218: "S" -0x0219: "s" -0x021a: "T" -0x021b: "t" -0x021c: "Y" -0x021d: "y" -0x021e: "H" -0x021f: "h" -0x0220: "N" -0x0221: "d" -0x0222: "OU" -0x0223: "ou" -0x0224: "Z" -0x0225: "z" -0x0226: "A" -0x0227: "a" -0x0228: "E" -0x0229: "e" -0x022a: "O" -0x022b: "o" -0x022c: "O" -0x022d: "o" -0x022e: "O" -0x022f: "o" -0x0230: "O" -0x0231: "o" -0x0232: "Y" -0x0233: "y" -0x0234: "l" -0x0235: "n" -0x0236: "t" -0x0237: "j" -0x0238: "db" -0x0239: "qp" -0x023a: "A" -0x023b: "C" -0x023c: "c" -0x023d: "L" -0x023e: "T" -0x023f: "s" -0x0240: "z" -0x0241: "[?]" -0x0242: "[?]" -0x0243: "B" -0x0244: "U" -0x0245: "^" -0x0246: "E" -0x0247: "e" -0x0248: "J" -0x0249: "j" -0x024a: "q" -0x024b: "q" -0x024c: "R" -0x024d: "r" -0x024e: "Y" -0x024f: "y" -0x0250: "a" -0x0251: "a" -0x0252: "a" -0x0253: "b" -0x0254: "o" -0x0255: "c" -0x0256: "d" -0x0257: "d" -0x0258: "e" -0x0259: "@" -0x025a: "@" -0x025b: "e" -0x025c: "e" -0x025d: "e" -0x025e: "e" -0x025f: "j" -0x0260: "g" -0x0261: "g" -0x0262: "g" -0x0263: "g" -0x0264: "u" -0x0265: "Y" -0x0266: "h" -0x0267: "h" -0x0268: "i" -0x0269: "i" -0x026a: "I" -0x026b: "l" -0x026c: "l" -0x026d: "l" -0x026e: "lZ" -0x026f: "W" -0x0270: "W" -0x0271: "m" -0x0272: "n" -0x0273: "n" -0x0274: "n" -0x0275: "o" -0x0276: "OE" -0x0277: "O" -0x0278: "F" -0x0279: "r" -0x027a: "r" -0x027b: "r" -0x027c: "r" -0x027d: "r" -0x027e: "r" -0x027f: "r" -0x0280: "R" -0x0281: "R" -0x0282: "s" -0x0283: "S" -0x0284: "j" -0x0285: "S" -0x0286: "S" -0x0287: "t" -0x0288: "t" -0x0289: "u" -0x028a: "U" -0x028b: "v" -0x028c: "^" -0x028d: "w" -0x028e: "y" -0x028f: "Y" -0x0290: "z" -0x0291: "z" -0x0292: "Z" -0x0293: "Z" -0x0294: "?" -0x0295: "?" -0x0296: "?" -0x0297: "C" -0x0298: "@" -0x0299: "B" -0x029a: "E" -0x029b: "G" -0x029c: "H" -0x029d: "j" -0x029e: "k" -0x029f: "L" -0x02a0: "q" -0x02a1: "?" -0x02a2: "?" -0x02a3: "dz" -0x02a4: "dZ" -0x02a5: "dz" -0x02a6: "ts" -0x02a7: "tS" -0x02a8: "tC" -0x02a9: "fN" -0x02aa: "ls" -0x02ab: "lz" -0x02ac: "WW" -0x02ad: "]]" -0x02ae: "h" -0x02af: "h" -0x02b0: "k" -0x02b1: "h" -0x02b2: "j" -0x02b3: "r" -0x02b4: "r" -0x02b5: "r" -0x02b6: "r" -0x02b7: "w" -0x02b8: "y" -0x02b9: "'" -0x02ba: "\"" -0x02bb: "`" -0x02bc: "'" -0x02bd: "`" -0x02be: "`" -0x02bf: "'" -0x02c0: "?" -0x02c1: "?" -0x02c2: "<" -0x02c3: ">" -0x02c4: "^" -0x02c5: "V" -0x02c6: "^" -0x02c7: "V" -0x02c8: "'" -0x02c9: "-" -0x02ca: "/" -0x02cb: "\\" -0x02cc: "," -0x02cd: "_" -0x02ce: "\\" -0x02cf: "/" -0x02d0: ":" -0x02d1: "." -0x02d2: "`" -0x02d3: "'" -0x02d4: "^" -0x02d5: "V" -0x02d6: "+" -0x02d7: "-" -0x02d8: "V" -0x02d9: "." -0x02da: "@" -0x02db: "," -0x02dc: "~" -0x02dd: "\"" -0x02de: "R" -0x02df: "X" -0x02e0: "G" -0x02e1: "l" -0x02e2: "s" -0x02e3: "x" -0x02e4: "?" -0x02e5: "" -0x02e6: "" -0x02e7: "" -0x02e8: "" -0x02e9: "" -0x02ea: "" -0x02eb: "" -0x02ec: "V" -0x02ed: "=" -0x02ee: "\"" -0x02ef: "[?]" -0x02f0: "[?]" -0x02f1: "[?]" -0x02f2: "[?]" -0x02f3: "[?]" -0x02f4: "[?]" -0x02f5: "[?]" -0x02f6: "[?]" -0x02f7: "[?]" -0x02f8: "[?]" -0x02f9: "[?]" -0x02fa: "[?]" -0x02fb: "[?]" -0x02fc: "[?]" -0x02fd: "[?]" -0x02fe: "[?]" -/* x003 */ -0x0300: "" -0x0301: "" -0x0302: "" -0x0303: "" -0x0304: "" -0x0305: "" -0x0306: "" -0x0307: "" -0x0308: "" -0x0309: "" -0x030a: "" -0x030b: "" -0x030c: "" -0x030d: "" -0x030e: "" -0x030f: "" -0x0310: "" -0x0311: "" -0x0312: "" -0x0313: "" -0x0314: "" -0x0315: "" -0x0316: "" -0x0317: "" -0x0318: "" -0x0319: "" -0x031a: "" -0x031b: "" -0x031c: "" -0x031d: "" -0x031e: "" -0x031f: "" -0x0320: "" -0x0321: "" -0x0322: "" -0x0323: "" -0x0324: "" -0x0325: "" -0x0326: "" -0x0327: "" -0x0328: "" -0x0329: "" -0x032a: "" -0x032b: "" -0x032c: "" -0x032d: "" -0x032e: "" -0x032f: "" -0x0330: "" -0x0331: "" -0x0332: "" -0x0333: "" -0x0334: "" -0x0335: "" -0x0336: "" -0x0337: "" -0x0338: "" -0x0339: "" -0x033a: "" -0x033b: "" -0x033c: "" -0x033d: "" -0x033e: "" -0x033f: "" -0x0340: "" -0x0341: "" -0x0342: "" -0x0343: "" -0x0344: "" -0x0345: "" -0x0346: "" -0x0347: "" -0x0348: "" -0x0349: "" -0x034a: "" -0x034b: "" -0x034c: "" -0x034d: "" -0x034e: "" -0x034f: "[?]" -0x0350: "[?]" -0x0351: "[?]" -0x0352: "[?]" -0x0353: "[?]" -0x0354: "[?]" -0x0355: "[?]" -0x0356: "[?]" -0x0357: "[?]" -0x0358: "[?]" -0x0359: "[?]" -0x035a: "[?]" -0x035b: "[?]" -0x035c: "[?]" -0x035d: "[?]" -0x035e: "[?]" -0x035f: "[?]" -0x0360: "" -0x0361: "" -0x0362: "" -0x0363: "a" -0x0364: "e" -0x0365: "i" -0x0366: "o" -0x0367: "u" -0x0368: "c" -0x0369: "d" -0x036a: "h" -0x036b: "m" -0x036c: "r" -0x036d: "t" -0x036e: "v" -0x036f: "x" -0x0370: "[?]" -0x0371: "[?]" -0x0372: "[?]" -0x0373: "[?]" -0x0374: "'" -0x0375: "," -0x0376: "[?]" -0x0377: "[?]" -0x0378: "[?]" -0x0379: "[?]" -0x037a: "" -0x037b: "[?]" -0x037c: "[?]" -0x037d: "[?]" -0x037e: "?" -0x037f: "[?]" -0x0380: "[?]" -0x0381: "[?]" -0x0382: "[?]" -0x0383: "[?]" -0x0384: "" -0x0385: "" -0x0386: "A" -0x0387: ";" -0x0388: "E" -0x0389: "E" -0x038a: "I" -0x038b: "[?]" -0x038c: "O" -0x038d: "[?]" -0x038e: "U" -0x038f: "O" -0x0390: "I" -0x0391: "A" -0x0392: "B" -0x0393: "G" -0x0394: "D" -0x0395: "E" -0x0396: "Z" -0x0397: "E" -0x0398: "Th" -0x0399: "I" -0x039a: "K" -0x039b: "L" -0x039c: "M" -0x039d: "N" -0x039e: "Ks" -0x039f: "O" -0x03a0: "P" -0x03a1: "R" -0x03a2: "[?]" -0x03a3: "S" -0x03a4: "T" -0x03a5: "U" -0x03a6: "Ph" -0x03a7: "Kh" -0x03a8: "Ps" -0x03a9: "O" -0x03aa: "I" -0x03ab: "U" -0x03ac: "a" -0x03ad: "e" -0x03ae: "e" -0x03af: "i" -0x03b0: "u" -0x03b1: "a" -0x03b2: "b" -0x03b3: "g" -0x03b4: "d" -0x03b5: "e" -0x03b6: "z" -0x03b7: "e" -0x03b8: "th" -0x03b9: "i" -0x03ba: "k" -0x03bb: "l" -0x03bc: "m" -0x03bd: "n" -0x03be: "x" -0x03bf: "o" -0x03c0: "p" -0x03c1: "r" -0x03c2: "s" -0x03c3: "s" -0x03c4: "t" -0x03c5: "u" -0x03c6: "ph" -0x03c7: "kh" -0x03c8: "ps" -0x03c9: "o" -0x03ca: "i" -0x03cb: "u" -0x03cc: "o" -0x03cd: "u" -0x03ce: "o" -0x03cf: "[?]" -0x03d0: "b" -0x03d1: "th" -0x03d2: "U" -0x03d3: "U" -0x03d4: "U" -0x03d5: "ph" -0x03d6: "p" -0x03d7: "&" -0x03d8: "[?]" -0x03d9: "[?]" -0x03da: "St" -0x03db: "st" -0x03dc: "W" -0x03dd: "w" -0x03de: "Q" -0x03df: "q" -0x03e0: "Sp" -0x03e1: "sp" -0x03e2: "Sh" -0x03e3: "sh" -0x03e4: "F" -0x03e5: "f" -0x03e6: "Kh" -0x03e7: "kh" -0x03e8: "H" -0x03e9: "h" -0x03ea: "G" -0x03eb: "g" -0x03ec: "CH" -0x03ed: "ch" -0x03ee: "Ti" -0x03ef: "ti" -0x03f0: "k" -0x03f1: "r" -0x03f2: "c" -0x03f3: "j" -0x03f4: "[?]" -0x03f5: "[?]" -0x03f6: "[?]" -0x03f7: "[?]" -0x03f8: "[?]" -0x03f9: "[?]" -0x03fa: "[?]" -0x03fb: "[?]" -0x03fc: "[?]" -0x03fd: "[?]" -0x03fe: "[?]" -/* x004 */ -0x0400: "Ie" -0x0401: "Io" -0x0402: "Dj" -0x0403: "Gj" -0x0404: "Ie" -0x0405: "Dz" -0x0406: "I" -0x0407: "Yi" -0x0408: "J" -0x0409: "Lj" -0x040a: "Nj" -0x040b: "Tsh" -0x040c: "Kj" -0x040d: "I" -0x040e: "U" -0x040f: "Dzh" -0x0410: "A" -0x0411: "B" -0x0412: "V" -0x0413: "G" -0x0414: "D" -0x0415: "E" -0x0416: "Zh" -0x0417: "Z" -0x0418: "I" -0x0419: "I" -0x041a: "K" -0x041b: "L" -0x041c: "M" -0x041d: "N" -0x041e: "O" -0x041f: "P" -0x0420: "R" -0x0421: "S" -0x0422: "T" -0x0423: "U" -0x0424: "F" -0x0425: "Kh" -0x0426: "Ts" -0x0427: "Ch" -0x0428: "Sh" -0x0429: "Shch" -0x042a: "'" -0x042b: "Y" -0x042c: "'" -0x042d: "E" -0x042e: "Iu" -0x042f: "Ia" -0x0430: "a" -0x0431: "b" -0x0432: "v" -0x0433: "g" -0x0434: "d" -0x0435: "e" -0x0436: "zh" -0x0437: "z" -0x0438: "i" -0x0439: "i" -0x043a: "k" -0x043b: "l" -0x043c: "m" -0x043d: "n" -0x043e: "o" -0x043f: "p" -0x0440: "r" -0x0441: "s" -0x0442: "t" -0x0443: "u" -0x0444: "f" -0x0445: "kh" -0x0446: "ts" -0x0447: "ch" -0x0448: "sh" -0x0449: "shch" -0x044a: "'" -0x044b: "y" -0x044c: "'" -0x044d: "e" -0x044e: "iu" -0x044f: "ia" -0x0450: "ie" -0x0451: "io" -0x0452: "dj" -0x0453: "gj" -0x0454: "ie" -0x0455: "dz" -0x0456: "i" -0x0457: "yi" -0x0458: "j" -0x0459: "lj" -0x045a: "nj" -0x045b: "tsh" -0x045c: "kj" -0x045d: "i" -0x045e: "u" -0x045f: "dzh" -0x0460: "O" -0x0461: "o" -0x0462: "E" -0x0463: "e" -0x0464: "Ie" -0x0465: "ie" -0x0466: "E" -0x0467: "e" -0x0468: "Ie" -0x0469: "ie" -0x046a: "O" -0x046b: "o" -0x046c: "Io" -0x046d: "io" -0x046e: "Ks" -0x046f: "ks" -0x0470: "Ps" -0x0471: "ps" -0x0472: "F" -0x0473: "f" -0x0474: "Y" -0x0475: "y" -0x0476: "Y" -0x0477: "y" -0x0478: "u" -0x0479: "u" -0x047a: "O" -0x047b: "o" -0x047c: "O" -0x047d: "o" -0x047e: "Ot" -0x047f: "ot" -0x0480: "Q" -0x0481: "q" -0x0482: "*1000*" -0x0483: "" -0x0484: "" -0x0485: "" -0x0486: "" -0x0487: "[?]" -0x0488: "*100.000*" -0x0489: "*1.000.000*" -0x048a: "[?]" -0x048b: "[?]" -0x048c: "\"" -0x048d: "\"" -0x048e: "R'" -0x048f: "r'" -0x0490: "G'" -0x0491: "g'" -0x0492: "G'" -0x0493: "g'" -0x0494: "G'" -0x0495: "g'" -0x0496: "Zh'" -0x0497: "zh'" -0x0498: "Z'" -0x0499: "z'" -0x049a: "K'" -0x049b: "k'" -0x049c: "K'" -0x049d: "k'" -0x049e: "K'" -0x049f: "k'" -0x04a0: "K'" -0x04a1: "k'" -0x04a2: "N'" -0x04a3: "n'" -0x04a4: "Ng" -0x04a5: "ng" -0x04a6: "P'" -0x04a7: "p'" -0x04a8: "Kh" -0x04a9: "kh" -0x04aa: "S'" -0x04ab: "s'" -0x04ac: "T'" -0x04ad: "t'" -0x04ae: "U" -0x04af: "u" -0x04b0: "U'" -0x04b1: "u'" -0x04b2: "Kh'" -0x04b3: "kh'" -0x04b4: "Tts" -0x04b5: "tts" -0x04b6: "Ch'" -0x04b7: "ch'" -0x04b8: "Ch'" -0x04b9: "ch'" -0x04ba: "H" -0x04bb: "h" -0x04bc: "Ch" -0x04bd: "ch" -0x04be: "Ch'" -0x04bf: "ch'" -0x04c0: "`" -0x04c1: "Zh" -0x04c2: "zh" -0x04c3: "K'" -0x04c4: "k'" -0x04c5: "[?]" -0x04c6: "[?]" -0x04c7: "N'" -0x04c8: "n'" -0x04c9: "[?]" -0x04ca: "[?]" -0x04cb: "Ch" -0x04cc: "ch" -0x04cd: "[?]" -0x04ce: "[?]" -0x04cf: "[?]" -0x04d0: "a" -0x04d1: "a" -0x04d2: "A" -0x04d3: "a" -0x04d4: "Ae" -0x04d5: "ae" -0x04d6: "Ie" -0x04d7: "ie" -0x04d8: "@" -0x04d9: "@" -0x04da: "@" -0x04db: "@" -0x04dc: "Zh" -0x04dd: "zh" -0x04de: "Z" -0x04df: "z" -0x04e0: "Dz" -0x04e1: "dz" -0x04e2: "I" -0x04e3: "i" -0x04e4: "I" -0x04e5: "i" -0x04e6: "O" -0x04e7: "o" -0x04e8: "O" -0x04e9: "o" -0x04ea: "O" -0x04eb: "o" -0x04ec: "E" -0x04ed: "e" -0x04ee: "U" -0x04ef: "u" -0x04f0: "U" -0x04f1: "u" -0x04f2: "U" -0x04f3: "u" -0x04f4: "Ch" -0x04f5: "ch" -0x04f6: "[?]" -0x04f7: "[?]" -0x04f8: "Y" -0x04f9: "y" -0x04fa: "[?]" -0x04fb: "[?]" -0x04fc: "[?]" -0x04fd: "[?]" -0x04fe: "[?]" -/* x005 */ -0x0500: "[?]" -0x0501: "[?]" -0x0502: "[?]" -0x0503: "[?]" -0x0504: "[?]" -0x0505: "[?]" -0x0506: "[?]" -0x0507: "[?]" -0x0508: "[?]" -0x0509: "[?]" -0x050a: "[?]" -0x050b: "[?]" -0x050c: "[?]" -0x050d: "[?]" -0x050e: "[?]" -0x050f: "[?]" -0x0510: "[?]" -0x0511: "[?]" -0x0512: "[?]" -0x0513: "[?]" -0x0514: "[?]" -0x0515: "[?]" -0x0516: "[?]" -0x0517: "[?]" -0x0518: "[?]" -0x0519: "[?]" -0x051a: "[?]" -0x051b: "[?]" -0x051c: "[?]" -0x051d: "[?]" -0x051e: "[?]" -0x051f: "[?]" -0x0520: "[?]" -0x0521: "[?]" -0x0522: "[?]" -0x0523: "[?]" -0x0524: "[?]" -0x0525: "[?]" -0x0526: "[?]" -0x0527: "[?]" -0x0528: "[?]" -0x0529: "[?]" -0x052a: "[?]" -0x052b: "[?]" -0x052c: "[?]" -0x052d: "[?]" -0x052e: "[?]" -0x052f: "[?]" -0x0530: "[?]" -0x0531: "A" -0x0532: "B" -0x0533: "G" -0x0534: "D" -0x0535: "E" -0x0536: "Z" -0x0537: "E" -0x0538: "E" -0x0539: "T`" -0x053a: "Zh" -0x053b: "I" -0x053c: "L" -0x053d: "Kh" -0x053e: "Ts" -0x053f: "K" -0x0540: "H" -0x0541: "Dz" -0x0542: "Gh" -0x0543: "Ch" -0x0544: "M" -0x0545: "Y" -0x0546: "N" -0x0547: "Sh" -0x0548: "O" -0x0549: "Ch`" -0x054a: "P" -0x054b: "J" -0x054c: "Rh" -0x054d: "S" -0x054e: "V" -0x054f: "T" -0x0550: "R" -0x0551: "Ts`" -0x0552: "W" -0x0553: "P`" -0x0554: "K`" -0x0555: "O" -0x0556: "F" -0x0557: "[?]" -0x0558: "[?]" -0x0559: "<" -0x055a: "'" -0x055b: "/" -0x055c: "!" -0x055d: "," -0x055e: "?" -0x055f: "." -0x0560: "[?]" -0x0561: "a" -0x0562: "b" -0x0563: "g" -0x0564: "d" -0x0565: "e" -0x0566: "z" -0x0567: "e" -0x0568: "e" -0x0569: "t`" -0x056a: "zh" -0x056b: "i" -0x056c: "l" -0x056d: "kh" -0x056e: "ts" -0x056f: "k" -0x0570: "h" -0x0571: "dz" -0x0572: "gh" -0x0573: "ch" -0x0574: "m" -0x0575: "y" -0x0576: "n" -0x0577: "sh" -0x0578: "o" -0x0579: "ch`" -0x057a: "p" -0x057b: "j" -0x057c: "rh" -0x057d: "s" -0x057e: "v" -0x057f: "t" -0x0580: "r" -0x0581: "ts`" -0x0582: "w" -0x0583: "p`" -0x0584: "k`" -0x0585: "o" -0x0586: "f" -0x0587: "ew" -0x0588: "[?]" -0x0589: "." -0x058a: "-" -0x058b: "[?]" -0x058c: "[?]" -0x058d: "[?]" -0x058e: "[?]" -0x058f: "[?]" -0x0590: "[?]" -0x0591: "" -0x0592: "" -0x0593: "" -0x0594: "" -0x0595: "" -0x0596: "" -0x0597: "" -0x0598: "" -0x0599: "" -0x059a: "" -0x059b: "" -0x059c: "" -0x059d: "" -0x059e: "" -0x059f: "" -0x05a0: "" -0x05a1: "" -0x05a2: "[?]" -0x05a3: "" -0x05a4: "" -0x05a5: "" -0x05a6: "" -0x05a7: "" -0x05a8: "" -0x05a9: "" -0x05aa: "" -0x05ab: "" -0x05ac: "" -0x05ad: "" -0x05ae: "" -0x05af: "" -0x05b0: "@" -0x05b1: "e" -0x05b2: "a" -0x05b3: "o" -0x05b4: "i" -0x05b5: "e" -0x05b6: "e" -0x05b7: "a" -0x05b8: "a" -0x05b9: "o" -0x05ba: "[?]" -0x05bb: "u" -0x05bc: "'" -0x05bd: "" -0x05be: "" -0x05bf: "" -0x05c0: "" -0x05c1: "" -0x05c2: "" -0x05c3: ":" -0x05c4: "" -0x05c5: "[?]" -0x05c6: "[?]" -0x05c7: "[?]" -0x05c8: "[?]" -0x05c9: "[?]" -0x05ca: "[?]" -0x05cb: "[?]" -0x05cc: "[?]" -0x05cd: "[?]" -0x05ce: "[?]" -0x05cf: "[?]" -0x05d0: "" -0x05d1: "b" -0x05d2: "g" -0x05d3: "d" -0x05d4: "h" -0x05d5: "v" -0x05d6: "z" -0x05d7: "kh" -0x05d8: "t" -0x05d9: "y" -0x05da: "k" -0x05db: "k" -0x05dc: "l" -0x05dd: "m" -0x05de: "m" -0x05df: "n" -0x05e0: "n" -0x05e1: "s" -0x05e2: "`" -0x05e3: "p" -0x05e4: "p" -0x05e5: "ts" -0x05e6: "ts" -0x05e7: "q" -0x05e8: "r" -0x05e9: "sh" -0x05ea: "t" -0x05eb: "[?]" -0x05ec: "[?]" -0x05ed: "[?]" -0x05ee: "[?]" -0x05ef: "[?]" -0x05f0: "V" -0x05f1: "oy" -0x05f2: "i" -0x05f3: "'" -0x05f4: "\"" -0x05f5: "[?]" -0x05f6: "[?]" -0x05f7: "[?]" -0x05f8: "[?]" -0x05f9: "[?]" -0x05fa: "[?]" -0x05fb: "[?]" -0x05fc: "[?]" -0x05fd: "[?]" -0x05fe: "[?]" -/* x006 */ -0x0600: "[?]" -0x0601: "[?]" -0x0602: "[?]" -0x0603: "[?]" -0x0604: "[?]" -0x0605: "[?]" -0x0606: "[?]" -0x0607: "[?]" -0x0608: "[?]" -0x0609: "[?]" -0x060a: "[?]" -0x060b: "[?]" -0x060c: "," -0x060d: "[?]" -0x060e: "[?]" -0x060f: "[?]" -0x0610: "[?]" -0x0611: "[?]" -0x0612: "[?]" -0x0613: "[?]" -0x0614: "[?]" -0x0615: "[?]" -0x0616: "[?]" -0x0617: "[?]" -0x0618: "[?]" -0x0619: "[?]" -0x061a: "[?]" -0x061b: ";" -0x061c: "[?]" -0x061d: "[?]" -0x061e: "[?]" -0x061f: "?" -0x0620: "[?]" -0x0621: "" -0x0622: "a" -0x0623: "'" -0x0624: "w'" -0x0625: "" -0x0626: "y'" -0x0627: "" -0x0628: "b" -0x0629: "@" -0x062a: "t" -0x062b: "th" -0x062c: "j" -0x062d: "H" -0x062e: "kh" -0x062f: "d" -0x0630: "dh" -0x0631: "r" -0x0632: "z" -0x0633: "s" -0x0634: "sh" -0x0635: "S" -0x0636: "D" -0x0637: "T" -0x0638: "Z" -0x0639: "`" -0x063a: "G" -0x063b: "[?]" -0x063c: "[?]" -0x063d: "[?]" -0x063e: "[?]" -0x063f: "[?]" -0x0640: "" -0x0641: "f" -0x0642: "q" -0x0643: "k" -0x0644: "l" -0x0645: "m" -0x0646: "n" -0x0647: "h" -0x0648: "w" -0x0649: "~" -0x064a: "y" -0x064b: "an" -0x064c: "un" -0x064d: "in" -0x064e: "a" -0x064f: "u" -0x0650: "i" -0x0651: "W" -0x0652: "" -0x0653: "" -0x0654: "'" -0x0655: "'" -0x0656: "[?]" -0x0657: "[?]" -0x0658: "[?]" -0x0659: "[?]" -0x065a: "[?]" -0x065b: "[?]" -0x065c: "[?]" -0x065d: "[?]" -0x065e: "[?]" -0x065f: "[?]" -0x0660: "0" -0x0661: "1" -0x0662: "2" -0x0663: "3" -0x0664: "4" -0x0665: "5" -0x0666: "6" -0x0667: "7" -0x0668: "8" -0x0669: "9" -0x066a: "%" -0x066b: "." -0x066c: "," -0x066d: "*" -0x066e: "[?]" -0x066f: "[?]" -0x0670: "" -0x0671: "'" -0x0672: "'" -0x0673: "'" -0x0674: "" -0x0675: "'" -0x0676: "'w" -0x0677: "'u" -0x0678: "'y" -0x0679: "tt" -0x067a: "tth" -0x067b: "b" -0x067c: "t" -0x067d: "T" -0x067e: "p" -0x067f: "th" -0x0680: "bh" -0x0681: "'h" -0x0682: "H" -0x0683: "ny" -0x0684: "dy" -0x0685: "H" -0x0686: "ch" -0x0687: "cch" -0x0688: "dd" -0x0689: "D" -0x068a: "D" -0x068b: "Dt" -0x068c: "dh" -0x068d: "ddh" -0x068e: "d" -0x068f: "D" -0x0690: "D" -0x0691: "rr" -0x0692: "R" -0x0693: "R" -0x0694: "R" -0x0695: "R" -0x0696: "R" -0x0697: "R" -0x0698: "j" -0x0699: "R" -0x069a: "S" -0x069b: "S" -0x069c: "S" -0x069d: "S" -0x069e: "S" -0x069f: "T" -0x06a0: "GH" -0x06a1: "F" -0x06a2: "F" -0x06a3: "F" -0x06a4: "v" -0x06a5: "f" -0x06a6: "ph" -0x06a7: "Q" -0x06a8: "Q" -0x06a9: "kh" -0x06aa: "k" -0x06ab: "K" -0x06ac: "K" -0x06ad: "ng" -0x06ae: "K" -0x06af: "g" -0x06b0: "G" -0x06b1: "N" -0x06b2: "G" -0x06b3: "G" -0x06b4: "G" -0x06b5: "L" -0x06b6: "L" -0x06b7: "L" -0x06b8: "L" -0x06b9: "N" -0x06ba: "N" -0x06bb: "N" -0x06bc: "N" -0x06bd: "N" -0x06be: "h" -0x06bf: "Ch" -0x06c0: "hy" -0x06c1: "h" -0x06c2: "H" -0x06c3: "@" -0x06c4: "W" -0x06c5: "oe" -0x06c6: "oe" -0x06c7: "u" -0x06c8: "yu" -0x06c9: "yu" -0x06ca: "W" -0x06cb: "v" -0x06cc: "y" -0x06cd: "Y" -0x06ce: "Y" -0x06cf: "W" -0x06d0: "" -0x06d1: "" -0x06d2: "y" -0x06d3: "y'" -0x06d4: "." -0x06d5: "ae" -0x06d6: "" -0x06d7: "" -0x06d8: "" -0x06d9: "" -0x06da: "" -0x06db: "" -0x06dc: "" -0x06dd: "@" -0x06de: "#" -0x06df: "" -0x06e0: "" -0x06e1: "" -0x06e2: "" -0x06e3: "" -0x06e4: "" -0x06e5: "" -0x06e6: "" -0x06e7: "" -0x06e8: "" -0x06e9: "^" -0x06ea: "" -0x06eb: "" -0x06ec: "" -0x06ed: "" -0x06ee: "[?]" -0x06ef: "[?]" -0x06f0: "0" -0x06f1: "1" -0x06f2: "2" -0x06f3: "3" -0x06f4: "4" -0x06f5: "5" -0x06f6: "6" -0x06f7: "7" -0x06f8: "8" -0x06f9: "9" -0x06fa: "Sh" -0x06fb: "D" -0x06fc: "Gh" -0x06fd: "&" -0x06fe: "+m" -/* x007 */ -0x0700: "//" -0x0701: "/" -0x0702: "," -0x0703: "!" -0x0704: "!" -0x0705: "-" -0x0706: "," -0x0707: "," -0x0708: ";" -0x0709: "?" -0x070a: "~" -0x070b: "{" -0x070c: "}" -0x070d: "*" -0x070e: "[?]" -0x070f: "" -0x0710: "'" -0x0711: "" -0x0712: "b" -0x0713: "g" -0x0714: "g" -0x0715: "d" -0x0716: "d" -0x0717: "h" -0x0718: "w" -0x0719: "z" -0x071a: "H" -0x071b: "t" -0x071c: "t" -0x071d: "y" -0x071e: "yh" -0x071f: "k" -0x0720: "l" -0x0721: "m" -0x0722: "n" -0x0723: "s" -0x0724: "s" -0x0725: "`" -0x0726: "p" -0x0727: "p" -0x0728: "S" -0x0729: "q" -0x072a: "r" -0x072b: "sh" -0x072c: "t" -0x072d: "[?]" -0x072e: "[?]" -0x072f: "[?]" -0x0730: "a" -0x0731: "a" -0x0732: "a" -0x0733: "A" -0x0734: "A" -0x0735: "A" -0x0736: "e" -0x0737: "e" -0x0738: "e" -0x0739: "E" -0x073a: "i" -0x073b: "i" -0x073c: "u" -0x073d: "u" -0x073e: "u" -0x073f: "o" -0x0740: "" -0x0741: "`" -0x0742: "'" -0x0743: "" -0x0744: "" -0x0745: "X" -0x0746: "Q" -0x0747: "@" -0x0748: "@" -0x0749: "|" -0x074a: "+" -0x074b: "[?]" -0x074c: "[?]" -0x074d: "[?]" -0x074e: "[?]" -0x074f: "[?]" -0x0750: "[?]" -0x0751: "[?]" -0x0752: "[?]" -0x0753: "[?]" -0x0754: "[?]" -0x0755: "[?]" -0x0756: "[?]" -0x0757: "[?]" -0x0758: "[?]" -0x0759: "[?]" -0x075a: "[?]" -0x075b: "[?]" -0x075c: "[?]" -0x075d: "[?]" -0x075e: "[?]" -0x075f: "[?]" -0x0760: "[?]" -0x0761: "[?]" -0x0762: "[?]" -0x0763: "[?]" -0x0764: "[?]" -0x0765: "[?]" -0x0766: "[?]" -0x0767: "[?]" -0x0768: "[?]" -0x0769: "[?]" -0x076a: "[?]" -0x076b: "[?]" -0x076c: "[?]" -0x076d: "[?]" -0x076e: "[?]" -0x076f: "[?]" -0x0770: "[?]" -0x0771: "[?]" -0x0772: "[?]" -0x0773: "[?]" -0x0774: "[?]" -0x0775: "[?]" -0x0776: "[?]" -0x0777: "[?]" -0x0778: "[?]" -0x0779: "[?]" -0x077a: "[?]" -0x077b: "[?]" -0x077c: "[?]" -0x077d: "[?]" -0x077e: "[?]" -0x077f: "[?]" -0x0780: "h" -0x0781: "sh" -0x0782: "n" -0x0783: "r" -0x0784: "b" -0x0785: "L" -0x0786: "k" -0x0787: "'" -0x0788: "v" -0x0789: "m" -0x078a: "f" -0x078b: "dh" -0x078c: "th" -0x078d: "l" -0x078e: "g" -0x078f: "ny" -0x0790: "s" -0x0791: "d" -0x0792: "z" -0x0793: "t" -0x0794: "y" -0x0795: "p" -0x0796: "j" -0x0797: "ch" -0x0798: "tt" -0x0799: "hh" -0x079a: "kh" -0x079b: "th" -0x079c: "z" -0x079d: "sh" -0x079e: "s" -0x079f: "d" -0x07a0: "t" -0x07a1: "z" -0x07a2: "`" -0x07a3: "gh" -0x07a4: "q" -0x07a5: "w" -0x07a6: "a" -0x07a7: "aa" -0x07a8: "i" -0x07a9: "ee" -0x07aa: "u" -0x07ab: "oo" -0x07ac: "e" -0x07ad: "ey" -0x07ae: "o" -0x07af: "oa" -0x07b0: "" -0x07b1: "[?]" -0x07b2: "[?]" -0x07b3: "[?]" -0x07b4: "[?]" -0x07b5: "[?]" -0x07b6: "[?]" -0x07b7: "[?]" -0x07b8: "[?]" -0x07b9: "[?]" -0x07ba: "[?]" -0x07bb: "[?]" -0x07bc: "[?]" -0x07bd: "[?]" -0x07be: "[?]" -0x07bf: "[?]" -0x07c0: "[?]" -0x07c1: "[?]" -0x07c2: "[?]" -0x07c3: "[?]" -0x07c4: "[?]" -0x07c5: "[?]" -0x07c6: "[?]" -0x07c7: "[?]" -0x07c8: "[?]" -0x07c9: "[?]" -0x07ca: "[?]" -0x07cb: "[?]" -0x07cc: "[?]" -0x07cd: "[?]" -0x07ce: "[?]" -0x07cf: "[?]" -0x07d0: "[?]" -0x07d1: "[?]" -0x07d2: "[?]" -0x07d3: "[?]" -0x07d4: "[?]" -0x07d5: "[?]" -0x07d6: "[?]" -0x07d7: "[?]" -0x07d8: "[?]" -0x07d9: "[?]" -0x07da: "[?]" -0x07db: "[?]" -0x07dc: "[?]" -0x07dd: "[?]" -0x07de: "[?]" -0x07df: "[?]" -0x07e0: "[?]" -0x07e1: "[?]" -0x07e2: "[?]" -0x07e3: "[?]" -0x07e4: "[?]" -0x07e5: "[?]" -0x07e6: "[?]" -0x07e7: "[?]" -0x07e8: "[?]" -0x07e9: "[?]" -0x07ea: "[?]" -0x07eb: "[?]" -0x07ec: "[?]" -0x07ed: "[?]" -0x07ee: "[?]" -0x07ef: "[?]" -0x07f0: "[?]" -0x07f1: "[?]" -0x07f2: "[?]" -0x07f3: "[?]" -0x07f4: "[?]" -0x07f5: "[?]" -0x07f6: "[?]" -0x07f7: "[?]" -0x07f8: "[?]" -0x07f9: "[?]" -0x07fa: "[?]" -0x07fb: "[?]" -0x07fc: "[?]" -0x07fd: "[?]" -0x07fe: "[?]" -/* x009 */ -0x0900: "[?]" -0x0901: "N" -0x0902: "N" -0x0903: "H" -0x0904: "[?]" -0x0905: "a" -0x0906: "aa" -0x0907: "i" -0x0908: "ii" -0x0909: "u" -0x090a: "uu" -0x090b: "R" -0x090c: "L" -0x090d: "eN" -0x090e: "e" -0x090f: "e" -0x0910: "ai" -0x0911: "oN" -0x0912: "o" -0x0913: "o" -0x0914: "au" -0x0915: "k" -0x0916: "kh" -0x0917: "g" -0x0918: "gh" -0x0919: "ng" -0x091a: "c" -0x091b: "ch" -0x091c: "j" -0x091d: "jh" -0x091e: "ny" -0x091f: "tt" -0x0920: "tth" -0x0921: "dd" -0x0922: "ddh" -0x0923: "nn" -0x0924: "t" -0x0925: "th" -0x0926: "d" -0x0927: "dh" -0x0928: "n" -0x0929: "nnn" -0x092a: "p" -0x092b: "ph" -0x092c: "b" -0x092d: "bh" -0x092e: "m" -0x092f: "y" -0x0930: "r" -0x0931: "rr" -0x0932: "l" -0x0933: "l" -0x0934: "lll" -0x0935: "v" -0x0936: "sh" -0x0937: "ss" -0x0938: "s" -0x0939: "h" -0x093a: "[?]" -0x093b: "[?]" -0x093c: "'" -0x093d: "'" -0x093e: "aa" -0x093f: "i" -0x0940: "ii" -0x0941: "u" -0x0942: "uu" -0x0943: "R" -0x0944: "RR" -0x0945: "eN" -0x0946: "e" -0x0947: "e" -0x0948: "ai" -0x0949: "oN" -0x094a: "o" -0x094b: "o" -0x094c: "au" -0x094d: "" -0x094e: "[?]" -0x094f: "[?]" -0x0950: "AUM" -0x0951: "'" -0x0952: "'" -0x0953: "`" -0x0954: "'" -0x0955: "[?]" -0x0956: "[?]" -0x0957: "[?]" -0x0958: "q" -0x0959: "khh" -0x095a: "ghh" -0x095b: "z" -0x095c: "dddh" -0x095d: "rh" -0x095e: "f" -0x095f: "yy" -0x0960: "RR" -0x0961: "LL" -0x0962: "L" -0x0963: "LL" -0x0964: " / " -0x0965: " // " -0x0966: "0" -0x0967: "1" -0x0968: "2" -0x0969: "3" -0x096a: "4" -0x096b: "5" -0x096c: "6" -0x096d: "7" -0x096e: "8" -0x096f: "9" -0x0970: "." -0x0971: "[?]" -0x0972: "[?]" -0x0973: "[?]" -0x0974: "[?]" -0x0975: "[?]" -0x0976: "[?]" -0x0977: "[?]" -0x0978: "[?]" -0x0979: "[?]" -0x097a: "[?]" -0x097b: "[?]" -0x097c: "[?]" -0x097d: "[?]" -0x097e: "[?]" -0x097f: "[?]" -0x0980: "[?]" -0x0981: "N" -0x0982: "N" -0x0983: "H" -0x0984: "[?]" -0x0985: "a" -0x0986: "aa" -0x0987: "i" -0x0988: "ii" -0x0989: "u" -0x098a: "uu" -0x098b: "R" -0x098c: "RR" -0x098d: "[?]" -0x098e: "[?]" -0x098f: "e" -0x0990: "ai" -0x0991: "[?]" -0x0992: "[?]" -0x0993: "o" -0x0994: "au" -0x0995: "k" -0x0996: "kh" -0x0997: "g" -0x0998: "gh" -0x0999: "ng" -0x099a: "c" -0x099b: "ch" -0x099c: "j" -0x099d: "jh" -0x099e: "ny" -0x099f: "tt" -0x09a0: "tth" -0x09a1: "dd" -0x09a2: "ddh" -0x09a3: "nn" -0x09a4: "t" -0x09a5: "th" -0x09a6: "d" -0x09a7: "dh" -0x09a8: "n" -0x09a9: "[?]" -0x09aa: "p" -0x09ab: "ph" -0x09ac: "b" -0x09ad: "bh" -0x09ae: "m" -0x09af: "y" -0x09b0: "r" -0x09b1: "[?]" -0x09b2: "l" -0x09b3: "[?]" -0x09b4: "[?]" -0x09b5: "[?]" -0x09b6: "sh" -0x09b7: "ss" -0x09b8: "s" -0x09b9: "h" -0x09ba: "[?]" -0x09bb: "[?]" -0x09bc: "'" -0x09bd: "[?]" -0x09be: "aa" -0x09bf: "i" -0x09c0: "ii" -0x09c1: "u" -0x09c2: "uu" -0x09c3: "R" -0x09c4: "RR" -0x09c5: "[?]" -0x09c6: "[?]" -0x09c7: "e" -0x09c8: "ai" -0x09c9: "[?]" -0x09ca: "[?]" -0x09cb: "o" -0x09cc: "au" -0x09cd: "" -0x09ce: "[?]" -0x09cf: "[?]" -0x09d0: "[?]" -0x09d1: "[?]" -0x09d2: "[?]" -0x09d3: "[?]" -0x09d4: "[?]" -0x09d5: "[?]" -0x09d6: "[?]" -0x09d7: "+" -0x09d8: "[?]" -0x09d9: "[?]" -0x09da: "[?]" -0x09db: "[?]" -0x09dc: "rr" -0x09dd: "rh" -0x09de: "[?]" -0x09df: "yy" -0x09e0: "RR" -0x09e1: "LL" -0x09e2: "L" -0x09e3: "LL" -0x09e4: "[?]" -0x09e5: "[?]" -0x09e6: "0" -0x09e7: "1" -0x09e8: "2" -0x09e9: "3" -0x09ea: "4" -0x09eb: "5" -0x09ec: "6" -0x09ed: "7" -0x09ee: "8" -0x09ef: "9" -0x09f0: "r'" -0x09f1: "r`" -0x09f2: "Rs" -0x09f3: "Rs" -0x09f4: "1/" -0x09f5: "2/" -0x09f6: "3/" -0x09f7: "4/" -0x09f8: " 1 - 1/" -0x09f9: "/16" -0x09fa: "" -0x09fb: "[?]" -0x09fc: "[?]" -0x09fd: "[?]" -0x09fe: "[?]" -/* x00a */ -0x0a00: "[?]" -0x0a01: "[?]" -0x0a02: "N" -0x0a03: "[?]" -0x0a04: "[?]" -0x0a05: "a" -0x0a06: "aa" -0x0a07: "i" -0x0a08: "ii" -0x0a09: "u" -0x0a0a: "uu" -0x0a0b: "[?]" -0x0a0c: "[?]" -0x0a0d: "[?]" -0x0a0e: "[?]" -0x0a0f: "ee" -0x0a10: "ai" -0x0a11: "[?]" -0x0a12: "[?]" -0x0a13: "oo" -0x0a14: "au" -0x0a15: "k" -0x0a16: "kh" -0x0a17: "g" -0x0a18: "gh" -0x0a19: "ng" -0x0a1a: "c" -0x0a1b: "ch" -0x0a1c: "j" -0x0a1d: "jh" -0x0a1e: "ny" -0x0a1f: "tt" -0x0a20: "tth" -0x0a21: "dd" -0x0a22: "ddh" -0x0a23: "nn" -0x0a24: "t" -0x0a25: "th" -0x0a26: "d" -0x0a27: "dh" -0x0a28: "n" -0x0a29: "[?]" -0x0a2a: "p" -0x0a2b: "ph" -0x0a2c: "b" -0x0a2d: "bb" -0x0a2e: "m" -0x0a2f: "y" -0x0a30: "r" -0x0a31: "[?]" -0x0a32: "l" -0x0a33: "ll" -0x0a34: "[?]" -0x0a35: "v" -0x0a36: "sh" -0x0a37: "[?]" -0x0a38: "s" -0x0a39: "h" -0x0a3a: "[?]" -0x0a3b: "[?]" -0x0a3c: "'" -0x0a3d: "[?]" -0x0a3e: "aa" -0x0a3f: "i" -0x0a40: "ii" -0x0a41: "u" -0x0a42: "uu" -0x0a43: "[?]" -0x0a44: "[?]" -0x0a45: "[?]" -0x0a46: "[?]" -0x0a47: "ee" -0x0a48: "ai" -0x0a49: "[?]" -0x0a4a: "[?]" -0x0a4b: "oo" -0x0a4c: "au" -0x0a4d: "" -0x0a4e: "[?]" -0x0a4f: "[?]" -0x0a50: "[?]" -0x0a51: "[?]" -0x0a52: "[?]" -0x0a53: "[?]" -0x0a54: "[?]" -0x0a55: "[?]" -0x0a56: "[?]" -0x0a57: "[?]" -0x0a58: "[?]" -0x0a59: "khh" -0x0a5a: "ghh" -0x0a5b: "z" -0x0a5c: "rr" -0x0a5d: "[?]" -0x0a5e: "f" -0x0a5f: "[?]" -0x0a60: "[?]" -0x0a61: "[?]" -0x0a62: "[?]" -0x0a63: "[?]" -0x0a64: "[?]" -0x0a65: "[?]" -0x0a66: "0" -0x0a67: "1" -0x0a68: "2" -0x0a69: "3" -0x0a6a: "4" -0x0a6b: "5" -0x0a6c: "6" -0x0a6d: "7" -0x0a6e: "8" -0x0a6f: "9" -0x0a70: "N" -0x0a71: "H" -0x0a72: "" -0x0a73: "" -0x0a74: "G.E.O." -0x0a75: "[?]" -0x0a76: "[?]" -0x0a77: "[?]" -0x0a78: "[?]" -0x0a79: "[?]" -0x0a7a: "[?]" -0x0a7b: "[?]" -0x0a7c: "[?]" -0x0a7d: "[?]" -0x0a7e: "[?]" -0x0a7f: "[?]" -0x0a80: "[?]" -0x0a81: "N" -0x0a82: "N" -0x0a83: "H" -0x0a84: "[?]" -0x0a85: "a" -0x0a86: "aa" -0x0a87: "i" -0x0a88: "ii" -0x0a89: "u" -0x0a8a: "uu" -0x0a8b: "R" -0x0a8c: "[?]" -0x0a8d: "eN" -0x0a8e: "[?]" -0x0a8f: "e" -0x0a90: "ai" -0x0a91: "oN" -0x0a92: "[?]" -0x0a93: "o" -0x0a94: "au" -0x0a95: "k" -0x0a96: "kh" -0x0a97: "g" -0x0a98: "gh" -0x0a99: "ng" -0x0a9a: "c" -0x0a9b: "ch" -0x0a9c: "j" -0x0a9d: "jh" -0x0a9e: "ny" -0x0a9f: "tt" -0x0aa0: "tth" -0x0aa1: "dd" -0x0aa2: "ddh" -0x0aa3: "nn" -0x0aa4: "t" -0x0aa5: "th" -0x0aa6: "d" -0x0aa7: "dh" -0x0aa8: "n" -0x0aa9: "[?]" -0x0aaa: "p" -0x0aab: "ph" -0x0aac: "b" -0x0aad: "bh" -0x0aae: "m" -0x0aaf: "ya" -0x0ab0: "r" -0x0ab1: "[?]" -0x0ab2: "l" -0x0ab3: "ll" -0x0ab4: "[?]" -0x0ab5: "v" -0x0ab6: "sh" -0x0ab7: "ss" -0x0ab8: "s" -0x0ab9: "h" -0x0aba: "[?]" -0x0abb: "[?]" -0x0abc: "'" -0x0abd: "'" -0x0abe: "aa" -0x0abf: "i" -0x0ac0: "ii" -0x0ac1: "u" -0x0ac2: "uu" -0x0ac3: "R" -0x0ac4: "RR" -0x0ac5: "eN" -0x0ac6: "[?]" -0x0ac7: "e" -0x0ac8: "ai" -0x0ac9: "oN" -0x0aca: "[?]" -0x0acb: "o" -0x0acc: "au" -0x0acd: "" -0x0ace: "[?]" -0x0acf: "[?]" -0x0ad0: "AUM" -0x0ad1: "[?]" -0x0ad2: "[?]" -0x0ad3: "[?]" -0x0ad4: "[?]" -0x0ad5: "[?]" -0x0ad6: "[?]" -0x0ad7: "[?]" -0x0ad8: "[?]" -0x0ad9: "[?]" -0x0ada: "[?]" -0x0adb: "[?]" -0x0adc: "[?]" -0x0add: "[?]" -0x0ade: "[?]" -0x0adf: "[?]" -0x0ae0: "RR" -0x0ae1: "[?]" -0x0ae2: "[?]" -0x0ae3: "[?]" -0x0ae4: "[?]" -0x0ae5: "[?]" -0x0ae6: "0" -0x0ae7: "1" -0x0ae8: "2" -0x0ae9: "3" -0x0aea: "4" -0x0aeb: "5" -0x0aec: "6" -0x0aed: "7" -0x0aee: "8" -0x0aef: "9" -0x0af0: "[?]" -0x0af1: "[?]" -0x0af2: "[?]" -0x0af3: "[?]" -0x0af4: "[?]" -0x0af5: "[?]" -0x0af6: "[?]" -0x0af7: "[?]" -0x0af8: "[?]" -0x0af9: "[?]" -0x0afa: "[?]" -0x0afb: "[?]" -0x0afc: "[?]" -0x0afd: "[?]" -0x0afe: "[?]" -/* x00b */ -0x0b00: "[?]" -0x0b01: "N" -0x0b02: "N" -0x0b03: "H" -0x0b04: "[?]" -0x0b05: "a" -0x0b06: "aa" -0x0b07: "i" -0x0b08: "ii" -0x0b09: "u" -0x0b0a: "uu" -0x0b0b: "R" -0x0b0c: "L" -0x0b0d: "[?]" -0x0b0e: "[?]" -0x0b0f: "e" -0x0b10: "ai" -0x0b11: "[?]" -0x0b12: "[?]" -0x0b13: "o" -0x0b14: "au" -0x0b15: "k" -0x0b16: "kh" -0x0b17: "g" -0x0b18: "gh" -0x0b19: "ng" -0x0b1a: "c" -0x0b1b: "ch" -0x0b1c: "j" -0x0b1d: "jh" -0x0b1e: "ny" -0x0b1f: "tt" -0x0b20: "tth" -0x0b21: "dd" -0x0b22: "ddh" -0x0b23: "nn" -0x0b24: "t" -0x0b25: "th" -0x0b26: "d" -0x0b27: "dh" -0x0b28: "n" -0x0b29: "[?]" -0x0b2a: "p" -0x0b2b: "ph" -0x0b2c: "b" -0x0b2d: "bh" -0x0b2e: "m" -0x0b2f: "y" -0x0b30: "r" -0x0b31: "[?]" -0x0b32: "l" -0x0b33: "ll" -0x0b34: "[?]" -0x0b35: "" -0x0b36: "sh" -0x0b37: "ss" -0x0b38: "s" -0x0b39: "h" -0x0b3a: "[?]" -0x0b3b: "[?]" -0x0b3c: "'" -0x0b3d: "'" -0x0b3e: "aa" -0x0b3f: "i" -0x0b40: "ii" -0x0b41: "u" -0x0b42: "uu" -0x0b43: "R" -0x0b44: "[?]" -0x0b45: "[?]" -0x0b46: "[?]" -0x0b47: "e" -0x0b48: "ai" -0x0b49: "[?]" -0x0b4a: "[?]" -0x0b4b: "o" -0x0b4c: "au" -0x0b4d: "" -0x0b4e: "[?]" -0x0b4f: "[?]" -0x0b50: "[?]" -0x0b51: "[?]" -0x0b52: "[?]" -0x0b53: "[?]" -0x0b54: "[?]" -0x0b55: "[?]" -0x0b56: "+" -0x0b57: "+" -0x0b58: "[?]" -0x0b59: "[?]" -0x0b5a: "[?]" -0x0b5b: "[?]" -0x0b5c: "rr" -0x0b5d: "rh" -0x0b5e: "[?]" -0x0b5f: "yy" -0x0b60: "RR" -0x0b61: "LL" -0x0b62: "[?]" -0x0b63: "[?]" -0x0b64: "[?]" -0x0b65: "[?]" -0x0b66: "0" -0x0b67: "1" -0x0b68: "2" -0x0b69: "3" -0x0b6a: "4" -0x0b6b: "5" -0x0b6c: "6" -0x0b6d: "7" -0x0b6e: "8" -0x0b6f: "9" -0x0b70: "" -0x0b71: "[?]" -0x0b72: "[?]" -0x0b73: "[?]" -0x0b74: "[?]" -0x0b75: "[?]" -0x0b76: "[?]" -0x0b77: "[?]" -0x0b78: "[?]" -0x0b79: "[?]" -0x0b7a: "[?]" -0x0b7b: "[?]" -0x0b7c: "[?]" -0x0b7d: "[?]" -0x0b7e: "[?]" -0x0b7f: "[?]" -0x0b80: "[?]" -0x0b81: "[?]" -0x0b82: "N" -0x0b83: "H" -0x0b84: "[?]" -0x0b85: "a" -0x0b86: "aa" -0x0b87: "i" -0x0b88: "ii" -0x0b89: "u" -0x0b8a: "uu" -0x0b8b: "[?]" -0x0b8c: "[?]" -0x0b8d: "[?]" -0x0b8e: "e" -0x0b8f: "ee" -0x0b90: "ai" -0x0b91: "[?]" -0x0b92: "o" -0x0b93: "oo" -0x0b94: "au" -0x0b95: "k" -0x0b96: "[?]" -0x0b97: "[?]" -0x0b98: "[?]" -0x0b99: "ng" -0x0b9a: "c" -0x0b9b: "[?]" -0x0b9c: "j" -0x0b9d: "[?]" -0x0b9e: "ny" -0x0b9f: "tt" -0x0ba0: "[?]" -0x0ba1: "[?]" -0x0ba2: "[?]" -0x0ba3: "nn" -0x0ba4: "t" -0x0ba5: "[?]" -0x0ba6: "[?]" -0x0ba7: "[?]" -0x0ba8: "n" -0x0ba9: "nnn" -0x0baa: "p" -0x0bab: "[?]" -0x0bac: "[?]" -0x0bad: "[?]" -0x0bae: "m" -0x0baf: "y" -0x0bb0: "r" -0x0bb1: "rr" -0x0bb2: "l" -0x0bb3: "ll" -0x0bb4: "lll" -0x0bb5: "v" -0x0bb6: "[?]" -0x0bb7: "ss" -0x0bb8: "s" -0x0bb9: "h" -0x0bba: "[?]" -0x0bbb: "[?]" -0x0bbc: "[?]" -0x0bbd: "[?]" -0x0bbe: "aa" -0x0bbf: "i" -0x0bc0: "ii" -0x0bc1: "u" -0x0bc2: "uu" -0x0bc3: "[?]" -0x0bc4: "[?]" -0x0bc5: "[?]" -0x0bc6: "e" -0x0bc7: "ee" -0x0bc8: "ai" -0x0bc9: "[?]" -0x0bca: "o" -0x0bcb: "oo" -0x0bcc: "au" -0x0bcd: "" -0x0bce: "[?]" -0x0bcf: "[?]" -0x0bd0: "[?]" -0x0bd1: "[?]" -0x0bd2: "[?]" -0x0bd3: "[?]" -0x0bd4: "[?]" -0x0bd5: "[?]" -0x0bd6: "[?]" -0x0bd7: "+" -0x0bd8: "[?]" -0x0bd9: "[?]" -0x0bda: "[?]" -0x0bdb: "[?]" -0x0bdc: "[?]" -0x0bdd: "[?]" -0x0bde: "[?]" -0x0bdf: "[?]" -0x0be0: "[?]" -0x0be1: "[?]" -0x0be2: "[?]" -0x0be3: "[?]" -0x0be4: "[?]" -0x0be5: "[?]" -0x0be6: "0" -0x0be7: "1" -0x0be8: "2" -0x0be9: "3" -0x0bea: "4" -0x0beb: "5" -0x0bec: "6" -0x0bed: "7" -0x0bee: "8" -0x0bef: "9" -0x0bf0: "+10+" -0x0bf1: "+100+" -0x0bf2: "+1000+" -0x0bf3: "[?]" -0x0bf4: "[?]" -0x0bf5: "[?]" -0x0bf6: "[?]" -0x0bf7: "[?]" -0x0bf8: "[?]" -0x0bf9: "[?]" -0x0bfa: "[?]" -0x0bfb: "[?]" -0x0bfc: "[?]" -0x0bfd: "[?]" -0x0bfe: "[?]" -/* x00c */ -0x0c00: "[?]" -0x0c01: "N" -0x0c02: "N" -0x0c03: "H" -0x0c04: "[?]" -0x0c05: "a" -0x0c06: "aa" -0x0c07: "i" -0x0c08: "ii" -0x0c09: "u" -0x0c0a: "uu" -0x0c0b: "R" -0x0c0c: "L" -0x0c0d: "[?]" -0x0c0e: "e" -0x0c0f: "ee" -0x0c10: "ai" -0x0c11: "[?]" -0x0c12: "o" -0x0c13: "oo" -0x0c14: "au" -0x0c15: "k" -0x0c16: "kh" -0x0c17: "g" -0x0c18: "gh" -0x0c19: "ng" -0x0c1a: "c" -0x0c1b: "ch" -0x0c1c: "j" -0x0c1d: "jh" -0x0c1e: "ny" -0x0c1f: "tt" -0x0c20: "tth" -0x0c21: "dd" -0x0c22: "ddh" -0x0c23: "nn" -0x0c24: "t" -0x0c25: "th" -0x0c26: "d" -0x0c27: "dh" -0x0c28: "n" -0x0c29: "[?]" -0x0c2a: "p" -0x0c2b: "ph" -0x0c2c: "b" -0x0c2d: "bh" -0x0c2e: "m" -0x0c2f: "y" -0x0c30: "r" -0x0c31: "rr" -0x0c32: "l" -0x0c33: "ll" -0x0c34: "[?]" -0x0c35: "v" -0x0c36: "sh" -0x0c37: "ss" -0x0c38: "s" -0x0c39: "h" -0x0c3a: "[?]" -0x0c3b: "[?]" -0x0c3c: "[?]" -0x0c3d: "[?]" -0x0c3e: "aa" -0x0c3f: "i" -0x0c40: "ii" -0x0c41: "u" -0x0c42: "uu" -0x0c43: "R" -0x0c44: "RR" -0x0c45: "[?]" -0x0c46: "e" -0x0c47: "ee" -0x0c48: "ai" -0x0c49: "[?]" -0x0c4a: "o" -0x0c4b: "oo" -0x0c4c: "au" -0x0c4d: "" -0x0c4e: "[?]" -0x0c4f: "[?]" -0x0c50: "[?]" -0x0c51: "[?]" -0x0c52: "[?]" -0x0c53: "[?]" -0x0c54: "[?]" -0x0c55: "+" -0x0c56: "+" -0x0c57: "[?]" -0x0c58: "[?]" -0x0c59: "[?]" -0x0c5a: "[?]" -0x0c5b: "[?]" -0x0c5c: "[?]" -0x0c5d: "[?]" -0x0c5e: "[?]" -0x0c5f: "[?]" -0x0c60: "RR" -0x0c61: "LL" -0x0c62: "[?]" -0x0c63: "[?]" -0x0c64: "[?]" -0x0c65: "[?]" -0x0c66: "0" -0x0c67: "1" -0x0c68: "2" -0x0c69: "3" -0x0c6a: "4" -0x0c6b: "5" -0x0c6c: "6" -0x0c6d: "7" -0x0c6e: "8" -0x0c6f: "9" -0x0c70: "[?]" -0x0c71: "[?]" -0x0c72: "[?]" -0x0c73: "[?]" -0x0c74: "[?]" -0x0c75: "[?]" -0x0c76: "[?]" -0x0c77: "[?]" -0x0c78: "[?]" -0x0c79: "[?]" -0x0c7a: "[?]" -0x0c7b: "[?]" -0x0c7c: "[?]" -0x0c7d: "[?]" -0x0c7e: "[?]" -0x0c7f: "[?]" -0x0c80: "[?]" -0x0c81: "[?]" -0x0c82: "N" -0x0c83: "H" -0x0c84: "[?]" -0x0c85: "a" -0x0c86: "aa" -0x0c87: "i" -0x0c88: "ii" -0x0c89: "u" -0x0c8a: "uu" -0x0c8b: "R" -0x0c8c: "L" -0x0c8d: "[?]" -0x0c8e: "e" -0x0c8f: "ee" -0x0c90: "ai" -0x0c91: "[?]" -0x0c92: "o" -0x0c93: "oo" -0x0c94: "au" -0x0c95: "k" -0x0c96: "kh" -0x0c97: "g" -0x0c98: "gh" -0x0c99: "ng" -0x0c9a: "c" -0x0c9b: "ch" -0x0c9c: "j" -0x0c9d: "jh" -0x0c9e: "ny" -0x0c9f: "tt" -0x0ca0: "tth" -0x0ca1: "dd" -0x0ca2: "ddh" -0x0ca3: "nn" -0x0ca4: "t" -0x0ca5: "th" -0x0ca6: "d" -0x0ca7: "dh" -0x0ca8: "n" -0x0ca9: "[?]" -0x0caa: "p" -0x0cab: "ph" -0x0cac: "b" -0x0cad: "bh" -0x0cae: "m" -0x0caf: "y" -0x0cb0: "r" -0x0cb1: "rr" -0x0cb2: "l" -0x0cb3: "ll" -0x0cb4: "[?]" -0x0cb5: "v" -0x0cb6: "sh" -0x0cb7: "ss" -0x0cb8: "s" -0x0cb9: "h" -0x0cba: "[?]" -0x0cbb: "[?]" -0x0cbc: "[?]" -0x0cbd: "[?]" -0x0cbe: "aa" -0x0cbf: "i" -0x0cc0: "ii" -0x0cc1: "u" -0x0cc2: "uu" -0x0cc3: "R" -0x0cc4: "RR" -0x0cc5: "[?]" -0x0cc6: "e" -0x0cc7: "ee" -0x0cc8: "ai" -0x0cc9: "[?]" -0x0cca: "o" -0x0ccb: "oo" -0x0ccc: "au" -0x0ccd: "" -0x0cce: "[?]" -0x0ccf: "[?]" -0x0cd0: "[?]" -0x0cd1: "[?]" -0x0cd2: "[?]" -0x0cd3: "[?]" -0x0cd4: "[?]" -0x0cd5: "+" -0x0cd6: "+" -0x0cd7: "[?]" -0x0cd8: "[?]" -0x0cd9: "[?]" -0x0cda: "[?]" -0x0cdb: "[?]" -0x0cdc: "[?]" -0x0cdd: "[?]" -0x0cde: "lll" -0x0cdf: "[?]" -0x0ce0: "RR" -0x0ce1: "LL" -0x0ce2: "[?]" -0x0ce3: "[?]" -0x0ce4: "[?]" -0x0ce5: "[?]" -0x0ce6: "0" -0x0ce7: "1" -0x0ce8: "2" -0x0ce9: "3" -0x0cea: "4" -0x0ceb: "5" -0x0cec: "6" -0x0ced: "7" -0x0cee: "8" -0x0cef: "9" -0x0cf0: "[?]" -0x0cf1: "[?]" -0x0cf2: "[?]" -0x0cf3: "[?]" -0x0cf4: "[?]" -0x0cf5: "[?]" -0x0cf6: "[?]" -0x0cf7: "[?]" -0x0cf8: "[?]" -0x0cf9: "[?]" -0x0cfa: "[?]" -0x0cfb: "[?]" -0x0cfc: "[?]" -0x0cfd: "[?]" -0x0cfe: "[?]" -/* x00d */ -0x0d00: "[?]" -0x0d01: "[?]" -0x0d02: "N" -0x0d03: "H" -0x0d04: "[?]" -0x0d05: "a" -0x0d06: "aa" -0x0d07: "i" -0x0d08: "ii" -0x0d09: "u" -0x0d0a: "uu" -0x0d0b: "R" -0x0d0c: "L" -0x0d0d: "[?]" -0x0d0e: "e" -0x0d0f: "ee" -0x0d10: "ai" -0x0d11: "[?]" -0x0d12: "o" -0x0d13: "oo" -0x0d14: "au" -0x0d15: "k" -0x0d16: "kh" -0x0d17: "g" -0x0d18: "gh" -0x0d19: "ng" -0x0d1a: "c" -0x0d1b: "ch" -0x0d1c: "j" -0x0d1d: "jh" -0x0d1e: "ny" -0x0d1f: "tt" -0x0d20: "tth" -0x0d21: "dd" -0x0d22: "ddh" -0x0d23: "nn" -0x0d24: "t" -0x0d25: "th" -0x0d26: "d" -0x0d27: "dh" -0x0d28: "n" -0x0d29: "[?]" -0x0d2a: "p" -0x0d2b: "ph" -0x0d2c: "b" -0x0d2d: "bh" -0x0d2e: "m" -0x0d2f: "y" -0x0d30: "r" -0x0d31: "rr" -0x0d32: "l" -0x0d33: "ll" -0x0d34: "lll" -0x0d35: "v" -0x0d36: "sh" -0x0d37: "ss" -0x0d38: "s" -0x0d39: "h" -0x0d3a: "[?]" -0x0d3b: "[?]" -0x0d3c: "[?]" -0x0d3d: "[?]" -0x0d3e: "aa" -0x0d3f: "i" -0x0d40: "ii" -0x0d41: "u" -0x0d42: "uu" -0x0d43: "R" -0x0d44: "[?]" -0x0d45: "[?]" -0x0d46: "e" -0x0d47: "ee" -0x0d48: "ai" -0x0d49: "" -0x0d4a: "o" -0x0d4b: "oo" -0x0d4c: "au" -0x0d4d: "" -0x0d4e: "[?]" -0x0d4f: "[?]" -0x0d50: "[?]" -0x0d51: "[?]" -0x0d52: "[?]" -0x0d53: "[?]" -0x0d54: "[?]" -0x0d55: "[?]" -0x0d56: "[?]" -0x0d57: "+" -0x0d58: "[?]" -0x0d59: "[?]" -0x0d5a: "[?]" -0x0d5b: "[?]" -0x0d5c: "[?]" -0x0d5d: "[?]" -0x0d5e: "[?]" -0x0d5f: "[?]" -0x0d60: "RR" -0x0d61: "LL" -0x0d62: "[?]" -0x0d63: "[?]" -0x0d64: "[?]" -0x0d65: "[?]" -0x0d66: "0" -0x0d67: "1" -0x0d68: "2" -0x0d69: "3" -0x0d6a: "4" -0x0d6b: "5" -0x0d6c: "6" -0x0d6d: "7" -0x0d6e: "8" -0x0d6f: "9" -0x0d70: "[?]" -0x0d71: "[?]" -0x0d72: "[?]" -0x0d73: "[?]" -0x0d74: "[?]" -0x0d75: "[?]" -0x0d76: "[?]" -0x0d77: "[?]" -0x0d78: "[?]" -0x0d79: "[?]" -0x0d7a: "[?]" -0x0d7b: "[?]" -0x0d7c: "[?]" -0x0d7d: "[?]" -0x0d7e: "[?]" -0x0d7f: "[?]" -0x0d80: "[?]" -0x0d81: "[?]" -0x0d82: "N" -0x0d83: "H" -0x0d84: "[?]" -0x0d85: "a" -0x0d86: "aa" -0x0d87: "ae" -0x0d88: "aae" -0x0d89: "i" -0x0d8a: "ii" -0x0d8b: "u" -0x0d8c: "uu" -0x0d8d: "R" -0x0d8e: "RR" -0x0d8f: "L" -0x0d90: "LL" -0x0d91: "e" -0x0d92: "ee" -0x0d93: "ai" -0x0d94: "o" -0x0d95: "oo" -0x0d96: "au" -0x0d97: "[?]" -0x0d98: "[?]" -0x0d99: "[?]" -0x0d9a: "k" -0x0d9b: "kh" -0x0d9c: "g" -0x0d9d: "gh" -0x0d9e: "ng" -0x0d9f: "nng" -0x0da0: "c" -0x0da1: "ch" -0x0da2: "j" -0x0da3: "jh" -0x0da4: "ny" -0x0da5: "jny" -0x0da6: "nyj" -0x0da7: "tt" -0x0da8: "tth" -0x0da9: "dd" -0x0daa: "ddh" -0x0dab: "nn" -0x0dac: "nndd" -0x0dad: "t" -0x0dae: "th" -0x0daf: "d" -0x0db0: "dh" -0x0db1: "n" -0x0db2: "[?]" -0x0db3: "nd" -0x0db4: "p" -0x0db5: "ph" -0x0db6: "b" -0x0db7: "bh" -0x0db8: "m" -0x0db9: "mb" -0x0dba: "y" -0x0dbb: "r" -0x0dbc: "[?]" -0x0dbd: "l" -0x0dbe: "[?]" -0x0dbf: "[?]" -0x0dc0: "v" -0x0dc1: "sh" -0x0dc2: "ss" -0x0dc3: "s" -0x0dc4: "h" -0x0dc5: "ll" -0x0dc6: "f" -0x0dc7: "[?]" -0x0dc8: "[?]" -0x0dc9: "[?]" -0x0dca: "" -0x0dcb: "[?]" -0x0dcc: "[?]" -0x0dcd: "[?]" -0x0dce: "[?]" -0x0dcf: "aa" -0x0dd0: "ae" -0x0dd1: "aae" -0x0dd2: "i" -0x0dd3: "ii" -0x0dd4: "u" -0x0dd5: "[?]" -0x0dd6: "uu" -0x0dd7: "[?]" -0x0dd8: "R" -0x0dd9: "e" -0x0dda: "ee" -0x0ddb: "ai" -0x0ddc: "o" -0x0ddd: "oo" -0x0dde: "au" -0x0ddf: "L" -0x0de0: "[?]" -0x0de1: "[?]" -0x0de2: "[?]" -0x0de3: "[?]" -0x0de4: "[?]" -0x0de5: "[?]" -0x0de6: "[?]" -0x0de7: "[?]" -0x0de8: "[?]" -0x0de9: "[?]" -0x0dea: "[?]" -0x0deb: "[?]" -0x0dec: "[?]" -0x0ded: "[?]" -0x0dee: "[?]" -0x0def: "[?]" -0x0df0: "[?]" -0x0df1: "[?]" -0x0df2: "RR" -0x0df3: "LL" -0x0df4: " . " -0x0df5: "[?]" -0x0df6: "[?]" -0x0df7: "[?]" -0x0df8: "[?]" -0x0df9: "[?]" -0x0dfa: "[?]" -0x0dfb: "[?]" -0x0dfc: "[?]" -0x0dfd: "[?]" -0x0dfe: "[?]" -/* x00e */ -0x0e00: "[?]" -0x0e01: "k" -0x0e02: "kh" -0x0e03: "kh" -0x0e04: "kh" -0x0e05: "kh" -0x0e06: "kh" -0x0e07: "ng" -0x0e08: "cch" -0x0e09: "ch" -0x0e0a: "ch" -0x0e0b: "ch" -0x0e0c: "ch" -0x0e0d: "y" -0x0e0e: "d" -0x0e0f: "t" -0x0e10: "th" -0x0e11: "th" -0x0e12: "th" -0x0e13: "n" -0x0e14: "d" -0x0e15: "t" -0x0e16: "th" -0x0e17: "th" -0x0e18: "th" -0x0e19: "n" -0x0e1a: "b" -0x0e1b: "p" -0x0e1c: "ph" -0x0e1d: "f" -0x0e1e: "ph" -0x0e1f: "f" -0x0e20: "ph" -0x0e21: "m" -0x0e22: "y" -0x0e23: "r" -0x0e24: "R" -0x0e25: "l" -0x0e26: "L" -0x0e27: "w" -0x0e28: "s" -0x0e29: "s" -0x0e2a: "s" -0x0e2b: "h" -0x0e2c: "l" -0x0e2d: "`" -0x0e2e: "h" -0x0e2f: "~" -0x0e30: "a" -0x0e31: "a" -0x0e32: "aa" -0x0e33: "am" -0x0e34: "i" -0x0e35: "ii" -0x0e36: "ue" -0x0e37: "uue" -0x0e38: "u" -0x0e39: "uu" -0x0e3a: "'" -0x0e3b: "[?]" -0x0e3c: "[?]" -0x0e3d: "[?]" -0x0e3e: "[?]" -0x0e3f: "Bh." -0x0e40: "e" -0x0e41: "ae" -0x0e42: "o" -0x0e43: "ai" -0x0e44: "ai" -0x0e45: "ao" -0x0e46: "+" -0x0e47: "" -0x0e48: "" -0x0e49: "" -0x0e4a: "" -0x0e4b: "" -0x0e4c: "" -0x0e4d: "M" -0x0e4e: "" -0x0e4f: " * " -0x0e50: "0" -0x0e51: "1" -0x0e52: "2" -0x0e53: "3" -0x0e54: "4" -0x0e55: "5" -0x0e56: "6" -0x0e57: "7" -0x0e58: "8" -0x0e59: "9" -0x0e5a: " // " -0x0e5b: " /// " -0x0e5c: "[?]" -0x0e5d: "[?]" -0x0e5e: "[?]" -0x0e5f: "[?]" -0x0e60: "[?]" -0x0e61: "[?]" -0x0e62: "[?]" -0x0e63: "[?]" -0x0e64: "[?]" -0x0e65: "[?]" -0x0e66: "[?]" -0x0e67: "[?]" -0x0e68: "[?]" -0x0e69: "[?]" -0x0e6a: "[?]" -0x0e6b: "[?]" -0x0e6c: "[?]" -0x0e6d: "[?]" -0x0e6e: "[?]" -0x0e6f: "[?]" -0x0e70: "[?]" -0x0e71: "[?]" -0x0e72: "[?]" -0x0e73: "[?]" -0x0e74: "[?]" -0x0e75: "[?]" -0x0e76: "[?]" -0x0e77: "[?]" -0x0e78: "[?]" -0x0e79: "[?]" -0x0e7a: "[?]" -0x0e7b: "[?]" -0x0e7c: "[?]" -0x0e7d: "[?]" -0x0e7e: "[?]" -0x0e7f: "[?]" -0x0e80: "[?]" -0x0e81: "k" -0x0e82: "kh" -0x0e83: "[?]" -0x0e84: "kh" -0x0e85: "[?]" -0x0e86: "[?]" -0x0e87: "ng" -0x0e88: "ch" -0x0e89: "[?]" -0x0e8a: "s" -0x0e8b: "[?]" -0x0e8c: "[?]" -0x0e8d: "ny" -0x0e8e: "[?]" -0x0e8f: "[?]" -0x0e90: "[?]" -0x0e91: "[?]" -0x0e92: "[?]" -0x0e93: "[?]" -0x0e94: "d" -0x0e95: "h" -0x0e96: "th" -0x0e97: "th" -0x0e98: "[?]" -0x0e99: "n" -0x0e9a: "b" -0x0e9b: "p" -0x0e9c: "ph" -0x0e9d: "f" -0x0e9e: "ph" -0x0e9f: "f" -0x0ea0: "[?]" -0x0ea1: "m" -0x0ea2: "y" -0x0ea3: "r" -0x0ea4: "[?]" -0x0ea5: "l" -0x0ea6: "[?]" -0x0ea7: "w" -0x0ea8: "[?]" -0x0ea9: "[?]" -0x0eaa: "s" -0x0eab: "h" -0x0eac: "[?]" -0x0ead: "`" -0x0eae: "" -0x0eaf: "~" -0x0eb0: "a" -0x0eb1: "" -0x0eb2: "aa" -0x0eb3: "am" -0x0eb4: "i" -0x0eb5: "ii" -0x0eb6: "y" -0x0eb7: "yy" -0x0eb8: "u" -0x0eb9: "uu" -0x0eba: "[?]" -0x0ebb: "o" -0x0ebc: "l" -0x0ebd: "ny" -0x0ebe: "[?]" -0x0ebf: "[?]" -0x0ec0: "e" -0x0ec1: "ei" -0x0ec2: "o" -0x0ec3: "ay" -0x0ec4: "ai" -0x0ec5: "[?]" -0x0ec6: "+" -0x0ec7: "[?]" -0x0ec8: "" -0x0ec9: "" -0x0eca: "" -0x0ecb: "" -0x0ecc: "" -0x0ecd: "M" -0x0ece: "[?]" -0x0ecf: "[?]" -0x0ed0: "0" -0x0ed1: "1" -0x0ed2: "2" -0x0ed3: "3" -0x0ed4: "4" -0x0ed5: "5" -0x0ed6: "6" -0x0ed7: "7" -0x0ed8: "8" -0x0ed9: "9" -0x0eda: "[?]" -0x0edb: "[?]" -0x0edc: "hn" -0x0edd: "hm" -0x0ede: "[?]" -0x0edf: "[?]" -0x0ee0: "[?]" -0x0ee1: "[?]" -0x0ee2: "[?]" -0x0ee3: "[?]" -0x0ee4: "[?]" -0x0ee5: "[?]" -0x0ee6: "[?]" -0x0ee7: "[?]" -0x0ee8: "[?]" -0x0ee9: "[?]" -0x0eea: "[?]" -0x0eeb: "[?]" -0x0eec: "[?]" -0x0eed: "[?]" -0x0eee: "[?]" -0x0eef: "[?]" -0x0ef0: "[?]" -0x0ef1: "[?]" -0x0ef2: "[?]" -0x0ef3: "[?]" -0x0ef4: "[?]" -0x0ef5: "[?]" -0x0ef6: "[?]" -0x0ef7: "[?]" -0x0ef8: "[?]" -0x0ef9: "[?]" -0x0efa: "[?]" -0x0efb: "[?]" -0x0efc: "[?]" -0x0efd: "[?]" -0x0efe: "[?]" -/* x00f */ -0x0f00: "AUM" -0x0f01: "" -0x0f02: "" -0x0f03: "" -0x0f04: "" -0x0f05: "" -0x0f06: "" -0x0f07: "" -0x0f08: " // " -0x0f09: " * " -0x0f0a: "" -0x0f0b: "-" -0x0f0c: " / " -0x0f0d: " / " -0x0f0e: " // " -0x0f0f: " -/ " -0x0f10: " +/ " -0x0f11: " X/ " -0x0f12: " /XX/ " -0x0f13: " /X/ " -0x0f14: ", " -0x0f15: "" -0x0f16: "" -0x0f17: "" -0x0f18: "" -0x0f19: "" -0x0f1a: "" -0x0f1b: "" -0x0f1c: "" -0x0f1d: "" -0x0f1e: "" -0x0f1f: "" -0x0f20: "0" -0x0f21: "1" -0x0f22: "2" -0x0f23: "3" -0x0f24: "4" -0x0f25: "5" -0x0f26: "6" -0x0f27: "7" -0x0f28: "8" -0x0f29: "9" -0x0f2a: ".5" -0x0f2b: "1.5" -0x0f2c: "2.5" -0x0f2d: "3.5" -0x0f2e: "4.5" -0x0f2f: "5.5" -0x0f30: "6.5" -0x0f31: "7.5" -0x0f32: "8.5" -0x0f33: "-.5" -0x0f34: "+" -0x0f35: "*" -0x0f36: "^" -0x0f37: "_" -0x0f38: "" -0x0f39: "~" -0x0f3a: "[?]" -0x0f3b: "]" -0x0f3c: "[[" -0x0f3d: "]]" -0x0f3e: "" -0x0f3f: "" -0x0f40: "k" -0x0f41: "kh" -0x0f42: "g" -0x0f43: "gh" -0x0f44: "ng" -0x0f45: "c" -0x0f46: "ch" -0x0f47: "j" -0x0f48: "[?]" -0x0f49: "ny" -0x0f4a: "tt" -0x0f4b: "tth" -0x0f4c: "dd" -0x0f4d: "ddh" -0x0f4e: "nn" -0x0f4f: "t" -0x0f50: "th" -0x0f51: "d" -0x0f52: "dh" -0x0f53: "n" -0x0f54: "p" -0x0f55: "ph" -0x0f56: "b" -0x0f57: "bh" -0x0f58: "m" -0x0f59: "ts" -0x0f5a: "tsh" -0x0f5b: "dz" -0x0f5c: "dzh" -0x0f5d: "w" -0x0f5e: "zh" -0x0f5f: "z" -0x0f60: "'" -0x0f61: "y" -0x0f62: "r" -0x0f63: "l" -0x0f64: "sh" -0x0f65: "ssh" -0x0f66: "s" -0x0f67: "h" -0x0f68: "a" -0x0f69: "kss" -0x0f6a: "r" -0x0f6b: "[?]" -0x0f6c: "[?]" -0x0f6d: "[?]" -0x0f6e: "[?]" -0x0f6f: "[?]" -0x0f70: "[?]" -0x0f71: "aa" -0x0f72: "i" -0x0f73: "ii" -0x0f74: "u" -0x0f75: "uu" -0x0f76: "R" -0x0f77: "RR" -0x0f78: "L" -0x0f79: "LL" -0x0f7a: "e" -0x0f7b: "ee" -0x0f7c: "o" -0x0f7d: "oo" -0x0f7e: "M" -0x0f7f: "H" -0x0f80: "i" -0x0f81: "ii" -0x0f82: "" -0x0f83: "" -0x0f84: "" -0x0f85: "" -0x0f86: "" -0x0f87: "" -0x0f88: "" -0x0f89: "" -0x0f8a: "" -0x0f8b: "" -0x0f8c: "[?]" -0x0f8d: "[?]" -0x0f8e: "[?]" -0x0f8f: "[?]" -0x0f90: "k" -0x0f91: "kh" -0x0f92: "g" -0x0f93: "gh" -0x0f94: "ng" -0x0f95: "c" -0x0f96: "ch" -0x0f97: "j" -0x0f98: "[?]" -0x0f99: "ny" -0x0f9a: "tt" -0x0f9b: "tth" -0x0f9c: "dd" -0x0f9d: "ddh" -0x0f9e: "nn" -0x0f9f: "t" -0x0fa0: "th" -0x0fa1: "d" -0x0fa2: "dh" -0x0fa3: "n" -0x0fa4: "p" -0x0fa5: "ph" -0x0fa6: "b" -0x0fa7: "bh" -0x0fa8: "m" -0x0fa9: "ts" -0x0faa: "tsh" -0x0fab: "dz" -0x0fac: "dzh" -0x0fad: "w" -0x0fae: "zh" -0x0faf: "z" -0x0fb0: "'" -0x0fb1: "y" -0x0fb2: "r" -0x0fb3: "l" -0x0fb4: "sh" -0x0fb5: "ss" -0x0fb6: "s" -0x0fb7: "h" -0x0fb8: "a" -0x0fb9: "kss" -0x0fba: "w" -0x0fbb: "y" -0x0fbc: "r" -0x0fbd: "[?]" -0x0fbe: "X" -0x0fbf: " :X: " -0x0fc0: " /O/ " -0x0fc1: " /o/ " -0x0fc2: " \\o\\ " -0x0fc3: " (O) " -0x0fc4: "" -0x0fc5: "" -0x0fc6: "" -0x0fc7: "" -0x0fc8: "" -0x0fc9: "" -0x0fca: "" -0x0fcb: "" -0x0fcc: "" -0x0fcd: "[?]" -0x0fce: "[?]" -0x0fcf: "" -0x0fd0: "[?]" -0x0fd1: "[?]" -0x0fd2: "[?]" -0x0fd3: "[?]" -0x0fd4: "[?]" -0x0fd5: "[?]" -0x0fd6: "[?]" -0x0fd7: "[?]" -0x0fd8: "[?]" -0x0fd9: "[?]" -0x0fda: "[?]" -0x0fdb: "[?]" -0x0fdc: "[?]" -0x0fdd: "[?]" -0x0fde: "[?]" -0x0fdf: "[?]" -0x0fe0: "[?]" -0x0fe1: "[?]" -0x0fe2: "[?]" -0x0fe3: "[?]" -0x0fe4: "[?]" -0x0fe5: "[?]" -0x0fe6: "[?]" -0x0fe7: "[?]" -0x0fe8: "[?]" -0x0fe9: "[?]" -0x0fea: "[?]" -0x0feb: "[?]" -0x0fec: "[?]" -0x0fed: "[?]" -0x0fee: "[?]" -0x0fef: "[?]" -0x0ff0: "[?]" -0x0ff1: "[?]" -0x0ff2: "[?]" -0x0ff3: "[?]" -0x0ff4: "[?]" -0x0ff5: "[?]" -0x0ff6: "[?]" -0x0ff7: "[?]" -0x0ff8: "[?]" -0x0ff9: "[?]" -0x0ffa: "[?]" -0x0ffb: "[?]" -0x0ffc: "[?]" -0x0ffd: "[?]" -0x0ffe: "[?]" -/* x010 */ -0x1000: "k" -0x1001: "kh" -0x1002: "g" -0x1003: "gh" -0x1004: "ng" -0x1005: "c" -0x1006: "ch" -0x1007: "j" -0x1008: "jh" -0x1009: "ny" -0x100a: "nny" -0x100b: "tt" -0x100c: "tth" -0x100d: "dd" -0x100e: "ddh" -0x100f: "nn" -0x1010: "tt" -0x1011: "th" -0x1012: "d" -0x1013: "dh" -0x1014: "n" -0x1015: "p" -0x1016: "ph" -0x1017: "b" -0x1018: "bh" -0x1019: "m" -0x101a: "y" -0x101b: "r" -0x101c: "l" -0x101d: "w" -0x101e: "s" -0x101f: "h" -0x1020: "ll" -0x1021: "a" -0x1022: "[?]" -0x1023: "i" -0x1024: "ii" -0x1025: "u" -0x1026: "uu" -0x1027: "e" -0x1028: "[?]" -0x1029: "o" -0x102a: "au" -0x102b: "[?]" -0x102c: "aa" -0x102d: "i" -0x102e: "ii" -0x102f: "u" -0x1030: "uu" -0x1031: "e" -0x1032: "ai" -0x1033: "[?]" -0x1034: "[?]" -0x1035: "[?]" -0x1036: "N" -0x1037: "'" -0x1038: ":" -0x1039: "" -0x103a: "[?]" -0x103b: "[?]" -0x103c: "[?]" -0x103d: "[?]" -0x103e: "[?]" -0x103f: "[?]" -0x1040: "0" -0x1041: "1" -0x1042: "2" -0x1043: "3" -0x1044: "4" -0x1045: "5" -0x1046: "6" -0x1047: "7" -0x1048: "8" -0x1049: "9" -0x104a: " / " -0x104b: " // " -0x104c: "n*" -0x104d: "r*" -0x104e: "l*" -0x104f: "e*" -0x1050: "sh" -0x1051: "ss" -0x1052: "R" -0x1053: "RR" -0x1054: "L" -0x1055: "LL" -0x1056: "R" -0x1057: "RR" -0x1058: "L" -0x1059: "LL" -0x105a: "[?]" -0x105b: "[?]" -0x105c: "[?]" -0x105d: "[?]" -0x105e: "[?]" -0x105f: "[?]" -0x1060: "[?]" -0x1061: "[?]" -0x1062: "[?]" -0x1063: "[?]" -0x1064: "[?]" -0x1065: "[?]" -0x1066: "[?]" -0x1067: "[?]" -0x1068: "[?]" -0x1069: "[?]" -0x106a: "[?]" -0x106b: "[?]" -0x106c: "[?]" -0x106d: "[?]" -0x106e: "[?]" -0x106f: "[?]" -0x1070: "[?]" -0x1071: "[?]" -0x1072: "[?]" -0x1073: "[?]" -0x1074: "[?]" -0x1075: "[?]" -0x1076: "[?]" -0x1077: "[?]" -0x1078: "[?]" -0x1079: "[?]" -0x107a: "[?]" -0x107b: "[?]" -0x107c: "[?]" -0x107d: "[?]" -0x107e: "[?]" -0x107f: "[?]" -0x1080: "[?]" -0x1081: "[?]" -0x1082: "[?]" -0x1083: "[?]" -0x1084: "[?]" -0x1085: "[?]" -0x1086: "[?]" -0x1087: "[?]" -0x1088: "[?]" -0x1089: "[?]" -0x108a: "[?]" -0x108b: "[?]" -0x108c: "[?]" -0x108d: "[?]" -0x108e: "[?]" -0x108f: "[?]" -0x1090: "[?]" -0x1091: "[?]" -0x1092: "[?]" -0x1093: "[?]" -0x1094: "[?]" -0x1095: "[?]" -0x1096: "[?]" -0x1097: "[?]" -0x1098: "[?]" -0x1099: "[?]" -0x109a: "[?]" -0x109b: "[?]" -0x109c: "[?]" -0x109d: "[?]" -0x109e: "[?]" -0x109f: "[?]" -0x10a0: "A" -0x10a1: "B" -0x10a2: "G" -0x10a3: "D" -0x10a4: "E" -0x10a5: "V" -0x10a6: "Z" -0x10a7: "T`" -0x10a8: "I" -0x10a9: "K" -0x10aa: "L" -0x10ab: "M" -0x10ac: "N" -0x10ad: "O" -0x10ae: "P" -0x10af: "Zh" -0x10b0: "R" -0x10b1: "S" -0x10b2: "T" -0x10b3: "U" -0x10b4: "P`" -0x10b5: "K`" -0x10b6: "G'" -0x10b7: "Q" -0x10b8: "Sh" -0x10b9: "Ch`" -0x10ba: "C`" -0x10bb: "Z'" -0x10bc: "C" -0x10bd: "Ch" -0x10be: "X" -0x10bf: "J" -0x10c0: "H" -0x10c1: "E" -0x10c2: "Y" -0x10c3: "W" -0x10c4: "Xh" -0x10c5: "OE" -0x10c6: "[?]" -0x10c7: "[?]" -0x10c8: "[?]" -0x10c9: "[?]" -0x10ca: "[?]" -0x10cb: "[?]" -0x10cc: "[?]" -0x10cd: "[?]" -0x10ce: "[?]" -0x10cf: "[?]" -0x10d0: "a" -0x10d1: "b" -0x10d2: "g" -0x10d3: "d" -0x10d4: "e" -0x10d5: "v" -0x10d6: "z" -0x10d7: "t`" -0x10d8: "i" -0x10d9: "k" -0x10da: "l" -0x10db: "m" -0x10dc: "n" -0x10dd: "o" -0x10de: "p" -0x10df: "zh" -0x10e0: "r" -0x10e1: "s" -0x10e2: "t" -0x10e3: "u" -0x10e4: "p`" -0x10e5: "k`" -0x10e6: "g'" -0x10e7: "q" -0x10e8: "sh" -0x10e9: "ch`" -0x10ea: "c`" -0x10eb: "z'" -0x10ec: "c" -0x10ed: "ch" -0x10ee: "x" -0x10ef: "j" -0x10f0: "h" -0x10f1: "e" -0x10f2: "y" -0x10f3: "w" -0x10f4: "xh" -0x10f5: "oe" -0x10f6: "f" -0x10f7: "[?]" -0x10f8: "[?]" -0x10f9: "[?]" -0x10fa: "[?]" -0x10fb: " // " -0x10fc: "[?]" -0x10fd: "[?]" -0x10fe: "[?]" -/* x011 */ -0x1100: "g" -0x1101: "gg" -0x1102: "n" -0x1103: "d" -0x1104: "dd" -0x1105: "r" -0x1106: "m" -0x1107: "b" -0x1108: "bb" -0x1109: "s" -0x110a: "ss" -0x110b: "" -0x110c: "j" -0x110d: "jj" -0x110e: "c" -0x110f: "k" -0x1110: "t" -0x1111: "p" -0x1112: "h" -0x1113: "ng" -0x1114: "nn" -0x1115: "nd" -0x1116: "nb" -0x1117: "dg" -0x1118: "rn" -0x1119: "rr" -0x111a: "rh" -0x111b: "rN" -0x111c: "mb" -0x111d: "mN" -0x111e: "bg" -0x111f: "bn" -0x1120: "" -0x1121: "bs" -0x1122: "bsg" -0x1123: "bst" -0x1124: "bsb" -0x1125: "bss" -0x1126: "bsj" -0x1127: "bj" -0x1128: "bc" -0x1129: "bt" -0x112a: "bp" -0x112b: "bN" -0x112c: "bbN" -0x112d: "sg" -0x112e: "sn" -0x112f: "sd" -0x1130: "sr" -0x1131: "sm" -0x1132: "sb" -0x1133: "sbg" -0x1134: "sss" -0x1135: "s" -0x1136: "sj" -0x1137: "sc" -0x1138: "sk" -0x1139: "st" -0x113a: "sp" -0x113b: "sh" -0x113c: "" -0x113d: "" -0x113e: "" -0x113f: "" -0x1140: "Z" -0x1141: "g" -0x1142: "d" -0x1143: "m" -0x1144: "b" -0x1145: "s" -0x1146: "Z" -0x1147: "" -0x1148: "j" -0x1149: "c" -0x114a: "t" -0x114b: "p" -0x114c: "N" -0x114d: "j" -0x114e: "" -0x114f: "" -0x1150: "" -0x1151: "" -0x1152: "ck" -0x1153: "ch" -0x1154: "" -0x1155: "" -0x1156: "pb" -0x1157: "pN" -0x1158: "hh" -0x1159: "Q" -0x115a: "[?]" -0x115b: "[?]" -0x115c: "[?]" -0x115d: "[?]" -0x115e: "[?]" -0x115f: "" -0x1160: "" -0x1161: "a" -0x1162: "ae" -0x1163: "ya" -0x1164: "yae" -0x1165: "eo" -0x1166: "e" -0x1167: "yeo" -0x1168: "ye" -0x1169: "o" -0x116a: "wa" -0x116b: "wae" -0x116c: "oe" -0x116d: "yo" -0x116e: "u" -0x116f: "weo" -0x1170: "we" -0x1171: "wi" -0x1172: "yu" -0x1173: "eu" -0x1174: "yi" -0x1175: "i" -0x1176: "a-o" -0x1177: "a-u" -0x1178: "ya-o" -0x1179: "ya-yo" -0x117a: "eo-o" -0x117b: "eo-u" -0x117c: "eo-eu" -0x117d: "yeo-o" -0x117e: "yeo-u" -0x117f: "o-eo" -0x1180: "o-e" -0x1181: "o-ye" -0x1182: "o-o" -0x1183: "o-u" -0x1184: "yo-ya" -0x1185: "yo-yae" -0x1186: "yo-yeo" -0x1187: "yo-o" -0x1188: "yo-i" -0x1189: "u-a" -0x118a: "u-ae" -0x118b: "u-eo-eu" -0x118c: "u-ye" -0x118d: "u-u" -0x118e: "yu-a" -0x118f: "yu-eo" -0x1190: "yu-e" -0x1191: "yu-yeo" -0x1192: "yu-ye" -0x1193: "yu-u" -0x1194: "yu-i" -0x1195: "eu-u" -0x1196: "eu-eu" -0x1197: "yi-u" -0x1198: "i-a" -0x1199: "i-ya" -0x119a: "i-o" -0x119b: "i-u" -0x119c: "i-eu" -0x119d: "i-U" -0x119e: "U" -0x119f: "U-eo" -0x11a0: "U-u" -0x11a1: "U-i" -0x11a2: "UU" -0x11a3: "[?]" -0x11a4: "[?]" -0x11a5: "[?]" -0x11a6: "[?]" -0x11a7: "[?]" -0x11a8: "g" -0x11a9: "gg" -0x11aa: "gs" -0x11ab: "n" -0x11ac: "nj" -0x11ad: "nh" -0x11ae: "d" -0x11af: "l" -0x11b0: "lg" -0x11b1: "lm" -0x11b2: "lb" -0x11b3: "ls" -0x11b4: "lt" -0x11b5: "lp" -0x11b6: "lh" -0x11b7: "m" -0x11b8: "b" -0x11b9: "bs" -0x11ba: "s" -0x11bb: "ss" -0x11bc: "ng" -0x11bd: "j" -0x11be: "c" -0x11bf: "k" -0x11c0: "t" -0x11c1: "p" -0x11c2: "h" -0x11c3: "gl" -0x11c4: "gsg" -0x11c5: "ng" -0x11c6: "nd" -0x11c7: "ns" -0x11c8: "nZ" -0x11c9: "nt" -0x11ca: "dg" -0x11cb: "tl" -0x11cc: "lgs" -0x11cd: "ln" -0x11ce: "ld" -0x11cf: "lth" -0x11d0: "ll" -0x11d1: "lmg" -0x11d2: "lms" -0x11d3: "lbs" -0x11d4: "lbh" -0x11d5: "rNp" -0x11d6: "lss" -0x11d7: "lZ" -0x11d8: "lk" -0x11d9: "lQ" -0x11da: "mg" -0x11db: "ml" -0x11dc: "mb" -0x11dd: "ms" -0x11de: "mss" -0x11df: "mZ" -0x11e0: "mc" -0x11e1: "mh" -0x11e2: "mN" -0x11e3: "bl" -0x11e4: "bp" -0x11e5: "ph" -0x11e6: "pN" -0x11e7: "sg" -0x11e8: "sd" -0x11e9: "sl" -0x11ea: "sb" -0x11eb: "Z" -0x11ec: "g" -0x11ed: "ss" -0x11ee: "" -0x11ef: "kh" -0x11f0: "N" -0x11f1: "Ns" -0x11f2: "NZ" -0x11f3: "pb" -0x11f4: "pN" -0x11f5: "hn" -0x11f6: "hl" -0x11f7: "hm" -0x11f8: "hb" -0x11f9: "Q" -0x11fa: "[?]" -0x11fb: "[?]" -0x11fc: "[?]" -0x11fd: "[?]" -0x11fe: "[?]" -/* x012 */ -0x1200: "ha" -0x1201: "hu" -0x1202: "hi" -0x1203: "haa" -0x1204: "hee" -0x1205: "he" -0x1206: "ho" -0x1207: "[?]" -0x1208: "la" -0x1209: "lu" -0x120a: "li" -0x120b: "laa" -0x120c: "lee" -0x120d: "le" -0x120e: "lo" -0x120f: "lwa" -0x1210: "hha" -0x1211: "hhu" -0x1212: "hhi" -0x1213: "hhaa" -0x1214: "hhee" -0x1215: "hhe" -0x1216: "hho" -0x1217: "hhwa" -0x1218: "ma" -0x1219: "mu" -0x121a: "mi" -0x121b: "maa" -0x121c: "mee" -0x121d: "me" -0x121e: "mo" -0x121f: "mwa" -0x1220: "sza" -0x1221: "szu" -0x1222: "szi" -0x1223: "szaa" -0x1224: "szee" -0x1225: "sze" -0x1226: "szo" -0x1227: "szwa" -0x1228: "ra" -0x1229: "ru" -0x122a: "ri" -0x122b: "raa" -0x122c: "ree" -0x122d: "re" -0x122e: "ro" -0x122f: "rwa" -0x1230: "sa" -0x1231: "su" -0x1232: "si" -0x1233: "saa" -0x1234: "see" -0x1235: "se" -0x1236: "so" -0x1237: "swa" -0x1238: "sha" -0x1239: "shu" -0x123a: "shi" -0x123b: "shaa" -0x123c: "shee" -0x123d: "she" -0x123e: "sho" -0x123f: "shwa" -0x1240: "qa" -0x1241: "qu" -0x1242: "qi" -0x1243: "qaa" -0x1244: "qee" -0x1245: "qe" -0x1246: "qo" -0x1247: "[?]" -0x1248: "qwa" -0x1249: "[?]" -0x124a: "qwi" -0x124b: "qwaa" -0x124c: "qwee" -0x124d: "qwe" -0x124e: "[?]" -0x124f: "[?]" -0x1250: "qha" -0x1251: "qhu" -0x1252: "qhi" -0x1253: "qhaa" -0x1254: "qhee" -0x1255: "qhe" -0x1256: "qho" -0x1257: "[?]" -0x1258: "qhwa" -0x1259: "[?]" -0x125a: "qhwi" -0x125b: "qhwaa" -0x125c: "qhwee" -0x125d: "qhwe" -0x125e: "[?]" -0x125f: "[?]" -0x1260: "ba" -0x1261: "bu" -0x1262: "bi" -0x1263: "baa" -0x1264: "bee" -0x1265: "be" -0x1266: "bo" -0x1267: "bwa" -0x1268: "va" -0x1269: "vu" -0x126a: "vi" -0x126b: "vaa" -0x126c: "vee" -0x126d: "ve" -0x126e: "vo" -0x126f: "vwa" -0x1270: "ta" -0x1271: "tu" -0x1272: "ti" -0x1273: "taa" -0x1274: "tee" -0x1275: "te" -0x1276: "to" -0x1277: "twa" -0x1278: "ca" -0x1279: "cu" -0x127a: "ci" -0x127b: "caa" -0x127c: "cee" -0x127d: "ce" -0x127e: "co" -0x127f: "cwa" -0x1280: "xa" -0x1281: "xu" -0x1282: "xi" -0x1283: "xaa" -0x1284: "xee" -0x1285: "xe" -0x1286: "xo" -0x1287: "[?]" -0x1288: "xwa" -0x1289: "[?]" -0x128a: "xwi" -0x128b: "xwaa" -0x128c: "xwee" -0x128d: "xwe" -0x128e: "[?]" -0x128f: "[?]" -0x1290: "na" -0x1291: "nu" -0x1292: "ni" -0x1293: "naa" -0x1294: "nee" -0x1295: "ne" -0x1296: "no" -0x1297: "nwa" -0x1298: "nya" -0x1299: "nyu" -0x129a: "nyi" -0x129b: "nyaa" -0x129c: "nyee" -0x129d: "nye" -0x129e: "nyo" -0x129f: "nywa" -0x12a0: "'a" -0x12a1: "'u" -0x12a2: "[?]" -0x12a3: "'aa" -0x12a4: "'ee" -0x12a5: "'e" -0x12a6: "'o" -0x12a7: "'wa" -0x12a8: "ka" -0x12a9: "ku" -0x12aa: "ki" -0x12ab: "kaa" -0x12ac: "kee" -0x12ad: "ke" -0x12ae: "ko" -0x12af: "[?]" -0x12b0: "kwa" -0x12b1: "[?]" -0x12b2: "kwi" -0x12b3: "kwaa" -0x12b4: "kwee" -0x12b5: "kwe" -0x12b6: "[?]" -0x12b7: "[?]" -0x12b8: "kxa" -0x12b9: "kxu" -0x12ba: "kxi" -0x12bb: "kxaa" -0x12bc: "kxee" -0x12bd: "kxe" -0x12be: "kxo" -0x12bf: "[?]" -0x12c0: "kxwa" -0x12c1: "[?]" -0x12c2: "kxwi" -0x12c3: "kxwaa" -0x12c4: "kxwee" -0x12c5: "kxwe" -0x12c6: "[?]" -0x12c7: "[?]" -0x12c8: "wa" -0x12c9: "wu" -0x12ca: "wi" -0x12cb: "waa" -0x12cc: "wee" -0x12cd: "we" -0x12ce: "wo" -0x12cf: "[?]" -0x12d0: "`a" -0x12d1: "`u" -0x12d2: "`i" -0x12d3: "`aa" -0x12d4: "`ee" -0x12d5: "`e" -0x12d6: "`o" -0x12d7: "[?]" -0x12d8: "za" -0x12d9: "zu" -0x12da: "zi" -0x12db: "zaa" -0x12dc: "zee" -0x12dd: "ze" -0x12de: "zo" -0x12df: "zwa" -0x12e0: "zha" -0x12e1: "zhu" -0x12e2: "zhi" -0x12e3: "zhaa" -0x12e4: "zhee" -0x12e5: "zhe" -0x12e6: "zho" -0x12e7: "zhwa" -0x12e8: "ya" -0x12e9: "yu" -0x12ea: "yi" -0x12eb: "yaa" -0x12ec: "yee" -0x12ed: "ye" -0x12ee: "yo" -0x12ef: "[?]" -0x12f0: "da" -0x12f1: "du" -0x12f2: "di" -0x12f3: "daa" -0x12f4: "dee" -0x12f5: "de" -0x12f6: "do" -0x12f7: "dwa" -0x12f8: "dda" -0x12f9: "ddu" -0x12fa: "ddi" -0x12fb: "ddaa" -0x12fc: "ddee" -0x12fd: "dde" -0x12fe: "ddo" -0x12ff: "ddwa" -/* x013 */ -0x1300: "ja" -0x1301: "ju" -0x1302: "ji" -0x1303: "jaa" -0x1304: "jee" -0x1305: "je" -0x1306: "jo" -0x1307: "jwa" -0x1308: "ga" -0x1309: "gu" -0x130a: "gi" -0x130b: "gaa" -0x130c: "gee" -0x130d: "ge" -0x130e: "go" -0x130f: "[?]" -0x1310: "gwa" -0x1311: "[?]" -0x1312: "gwi" -0x1313: "gwaa" -0x1314: "gwee" -0x1315: "gwe" -0x1316: "[?]" -0x1317: "[?]" -0x1318: "gga" -0x1319: "ggu" -0x131a: "ggi" -0x131b: "ggaa" -0x131c: "ggee" -0x131d: "gge" -0x131e: "ggo" -0x131f: "[?]" -0x1320: "tha" -0x1321: "thu" -0x1322: "thi" -0x1323: "thaa" -0x1324: "thee" -0x1325: "the" -0x1326: "tho" -0x1327: "thwa" -0x1328: "cha" -0x1329: "chu" -0x132a: "chi" -0x132b: "chaa" -0x132c: "chee" -0x132d: "che" -0x132e: "cho" -0x132f: "chwa" -0x1330: "pha" -0x1331: "phu" -0x1332: "phi" -0x1333: "phaa" -0x1334: "phee" -0x1335: "phe" -0x1336: "pho" -0x1337: "phwa" -0x1338: "tsa" -0x1339: "tsu" -0x133a: "tsi" -0x133b: "tsaa" -0x133c: "tsee" -0x133d: "tse" -0x133e: "tso" -0x133f: "tswa" -0x1340: "tza" -0x1341: "tzu" -0x1342: "tzi" -0x1343: "tzaa" -0x1344: "tzee" -0x1345: "tze" -0x1346: "tzo" -0x1347: "[?]" -0x1348: "fa" -0x1349: "fu" -0x134a: "fi" -0x134b: "faa" -0x134c: "fee" -0x134d: "fe" -0x134e: "fo" -0x134f: "fwa" -0x1350: "pa" -0x1351: "pu" -0x1352: "pi" -0x1353: "paa" -0x1354: "pee" -0x1355: "pe" -0x1356: "po" -0x1357: "pwa" -0x1358: "rya" -0x1359: "mya" -0x135a: "fya" -0x135b: "[?]" -0x135c: "[?]" -0x135d: "[?]" -0x135e: "[?]" -0x135f: "[?]" -0x1360: "[?]" -0x1361: " " -0x1362: "." -0x1363: "," -0x1364: ";" -0x1365: ":" -0x1366: ":: " -0x1367: "?" -0x1368: "//" -0x1369: "1" -0x136a: "2" -0x136b: "3" -0x136c: "4" -0x136d: "5" -0x136e: "6" -0x136f: "7" -0x1370: "8" -0x1371: "9" -0x1372: "10+" -0x1373: "20+" -0x1374: "30+" -0x1375: "40+" -0x1376: "50+" -0x1377: "60+" -0x1378: "70+" -0x1379: "80+" -0x137a: "90+" -0x137b: "100+" -0x137c: "10,000+" -0x137d: "[?]" -0x137e: "[?]" -0x137f: "[?]" -0x1380: "[?]" -0x1381: "[?]" -0x1382: "[?]" -0x1383: "[?]" -0x1384: "[?]" -0x1385: "[?]" -0x1386: "[?]" -0x1387: "[?]" -0x1388: "[?]" -0x1389: "[?]" -0x138a: "[?]" -0x138b: "[?]" -0x138c: "[?]" -0x138d: "[?]" -0x138e: "[?]" -0x138f: "[?]" -0x1390: "[?]" -0x1391: "[?]" -0x1392: "[?]" -0x1393: "[?]" -0x1394: "[?]" -0x1395: "[?]" -0x1396: "[?]" -0x1397: "[?]" -0x1398: "[?]" -0x1399: "[?]" -0x139a: "[?]" -0x139b: "[?]" -0x139c: "[?]" -0x139d: "[?]" -0x139e: "[?]" -0x139f: "[?]" -0x13a0: "a" -0x13a1: "e" -0x13a2: "i" -0x13a3: "o" -0x13a4: "u" -0x13a5: "v" -0x13a6: "ga" -0x13a7: "ka" -0x13a8: "ge" -0x13a9: "gi" -0x13aa: "go" -0x13ab: "gu" -0x13ac: "gv" -0x13ad: "ha" -0x13ae: "he" -0x13af: "hi" -0x13b0: "ho" -0x13b1: "hu" -0x13b2: "hv" -0x13b3: "la" -0x13b4: "le" -0x13b5: "li" -0x13b6: "lo" -0x13b7: "lu" -0x13b8: "lv" -0x13b9: "ma" -0x13ba: "me" -0x13bb: "mi" -0x13bc: "mo" -0x13bd: "mu" -0x13be: "na" -0x13bf: "hna" -0x13c0: "nah" -0x13c1: "ne" -0x13c2: "ni" -0x13c3: "no" -0x13c4: "nu" -0x13c5: "nv" -0x13c6: "qua" -0x13c7: "que" -0x13c8: "qui" -0x13c9: "quo" -0x13ca: "quu" -0x13cb: "quv" -0x13cc: "sa" -0x13cd: "s" -0x13ce: "se" -0x13cf: "si" -0x13d0: "so" -0x13d1: "su" -0x13d2: "sv" -0x13d3: "da" -0x13d4: "ta" -0x13d5: "de" -0x13d6: "te" -0x13d7: "di" -0x13d8: "ti" -0x13d9: "do" -0x13da: "du" -0x13db: "dv" -0x13dc: "dla" -0x13dd: "tla" -0x13de: "tle" -0x13df: "tli" -0x13e0: "tlo" -0x13e1: "tlu" -0x13e2: "tlv" -0x13e3: "tsa" -0x13e4: "tse" -0x13e5: "tsi" -0x13e6: "tso" -0x13e7: "tsu" -0x13e8: "tsv" -0x13e9: "wa" -0x13ea: "we" -0x13eb: "wi" -0x13ec: "wo" -0x13ed: "wu" -0x13ee: "wv" -0x13ef: "ya" -0x13f0: "ye" -0x13f1: "yi" -0x13f2: "yo" -0x13f3: "yu" -0x13f4: "yv" -0x13f5: "[?]" -0x13f6: "[?]" -0x13f7: "[?]" -0x13f8: "[?]" -0x13f9: "[?]" -0x13fa: "[?]" -0x13fb: "[?]" -0x13fc: "[?]" -0x13fd: "[?]" -0x13fe: "[?]" -/* x014 */ -0x1400: "[?]" -0x1401: "e" -0x1402: "aai" -0x1403: "i" -0x1404: "ii" -0x1405: "o" -0x1406: "oo" -0x1407: "oo" -0x1408: "ee" -0x1409: "i" -0x140a: "a" -0x140b: "aa" -0x140c: "we" -0x140d: "we" -0x140e: "wi" -0x140f: "wi" -0x1410: "wii" -0x1411: "wii" -0x1412: "wo" -0x1413: "wo" -0x1414: "woo" -0x1415: "woo" -0x1416: "woo" -0x1417: "wa" -0x1418: "wa" -0x1419: "waa" -0x141a: "waa" -0x141b: "waa" -0x141c: "ai" -0x141d: "w" -0x141e: "'" -0x141f: "t" -0x1420: "k" -0x1421: "sh" -0x1422: "s" -0x1423: "n" -0x1424: "w" -0x1425: "n" -0x1426: "[?]" -0x1427: "w" -0x1428: "c" -0x1429: "?" -0x142a: "l" -0x142b: "en" -0x142c: "in" -0x142d: "on" -0x142e: "an" -0x142f: "pe" -0x1430: "paai" -0x1431: "pi" -0x1432: "pii" -0x1433: "po" -0x1434: "poo" -0x1435: "poo" -0x1436: "hee" -0x1437: "hi" -0x1438: "pa" -0x1439: "paa" -0x143a: "pwe" -0x143b: "pwe" -0x143c: "pwi" -0x143d: "pwi" -0x143e: "pwii" -0x143f: "pwii" -0x1440: "pwo" -0x1441: "pwo" -0x1442: "pwoo" -0x1443: "pwoo" -0x1444: "pwa" -0x1445: "pwa" -0x1446: "pwaa" -0x1447: "pwaa" -0x1448: "pwaa" -0x1449: "p" -0x144a: "p" -0x144b: "h" -0x144c: "te" -0x144d: "taai" -0x144e: "ti" -0x144f: "tii" -0x1450: "to" -0x1451: "too" -0x1452: "too" -0x1453: "dee" -0x1454: "di" -0x1455: "ta" -0x1456: "taa" -0x1457: "twe" -0x1458: "twe" -0x1459: "twi" -0x145a: "twi" -0x145b: "twii" -0x145c: "twii" -0x145d: "two" -0x145e: "two" -0x145f: "twoo" -0x1460: "twoo" -0x1461: "twa" -0x1462: "twa" -0x1463: "twaa" -0x1464: "twaa" -0x1465: "twaa" -0x1466: "t" -0x1467: "tte" -0x1468: "tti" -0x1469: "tto" -0x146a: "tta" -0x146b: "ke" -0x146c: "kaai" -0x146d: "ki" -0x146e: "kii" -0x146f: "ko" -0x1470: "koo" -0x1471: "koo" -0x1472: "ka" -0x1473: "kaa" -0x1474: "kwe" -0x1475: "kwe" -0x1476: "kwi" -0x1477: "kwi" -0x1478: "kwii" -0x1479: "kwii" -0x147a: "kwo" -0x147b: "kwo" -0x147c: "kwoo" -0x147d: "kwoo" -0x147e: "kwa" -0x147f: "kwa" -0x1480: "kwaa" -0x1481: "kwaa" -0x1482: "kwaa" -0x1483: "k" -0x1484: "kw" -0x1485: "keh" -0x1486: "kih" -0x1487: "koh" -0x1488: "kah" -0x1489: "ce" -0x148a: "caai" -0x148b: "ci" -0x148c: "cii" -0x148d: "co" -0x148e: "coo" -0x148f: "coo" -0x1490: "ca" -0x1491: "caa" -0x1492: "cwe" -0x1493: "cwe" -0x1494: "cwi" -0x1495: "cwi" -0x1496: "cwii" -0x1497: "cwii" -0x1498: "cwo" -0x1499: "cwo" -0x149a: "cwoo" -0x149b: "cwoo" -0x149c: "cwa" -0x149d: "cwa" -0x149e: "cwaa" -0x149f: "cwaa" -0x14a0: "cwaa" -0x14a1: "c" -0x14a2: "th" -0x14a3: "me" -0x14a4: "maai" -0x14a5: "mi" -0x14a6: "mii" -0x14a7: "mo" -0x14a8: "moo" -0x14a9: "moo" -0x14aa: "ma" -0x14ab: "maa" -0x14ac: "mwe" -0x14ad: "mwe" -0x14ae: "mwi" -0x14af: "mwi" -0x14b0: "mwii" -0x14b1: "mwii" -0x14b2: "mwo" -0x14b3: "mwo" -0x14b4: "mwoo" -0x14b5: "mwoo" -0x14b6: "mwa" -0x14b7: "mwa" -0x14b8: "mwaa" -0x14b9: "mwaa" -0x14ba: "mwaa" -0x14bb: "m" -0x14bc: "m" -0x14bd: "mh" -0x14be: "m" -0x14bf: "m" -0x14c0: "ne" -0x14c1: "naai" -0x14c2: "ni" -0x14c3: "nii" -0x14c4: "no" -0x14c5: "noo" -0x14c6: "noo" -0x14c7: "na" -0x14c8: "naa" -0x14c9: "nwe" -0x14ca: "nwe" -0x14cb: "nwa" -0x14cc: "nwa" -0x14cd: "nwaa" -0x14ce: "nwaa" -0x14cf: "nwaa" -0x14d0: "n" -0x14d1: "ng" -0x14d2: "nh" -0x14d3: "le" -0x14d4: "laai" -0x14d5: "li" -0x14d6: "lii" -0x14d7: "lo" -0x14d8: "loo" -0x14d9: "loo" -0x14da: "la" -0x14db: "laa" -0x14dc: "lwe" -0x14dd: "lwe" -0x14de: "lwi" -0x14df: "lwi" -0x14e0: "lwii" -0x14e1: "lwii" -0x14e2: "lwo" -0x14e3: "lwo" -0x14e4: "lwoo" -0x14e5: "lwoo" -0x14e6: "lwa" -0x14e7: "lwa" -0x14e8: "lwaa" -0x14e9: "lwaa" -0x14ea: "l" -0x14eb: "l" -0x14ec: "l" -0x14ed: "se" -0x14ee: "saai" -0x14ef: "si" -0x14f0: "sii" -0x14f1: "so" -0x14f2: "soo" -0x14f3: "soo" -0x14f4: "sa" -0x14f5: "saa" -0x14f6: "swe" -0x14f7: "swe" -0x14f8: "swi" -0x14f9: "swi" -0x14fa: "swii" -0x14fb: "swii" -0x14fc: "swo" -0x14fd: "swo" -0x14fe: "swoo" -0x14ff: "swoo" -/* x015 */ -0x1500: "swa" -0x1501: "swa" -0x1502: "swaa" -0x1503: "swaa" -0x1504: "swaa" -0x1505: "s" -0x1506: "s" -0x1507: "sw" -0x1508: "s" -0x1509: "sk" -0x150a: "skw" -0x150b: "sW" -0x150c: "spwa" -0x150d: "stwa" -0x150e: "skwa" -0x150f: "scwa" -0x1510: "she" -0x1511: "shi" -0x1512: "shii" -0x1513: "sho" -0x1514: "shoo" -0x1515: "sha" -0x1516: "shaa" -0x1517: "shwe" -0x1518: "shwe" -0x1519: "shwi" -0x151a: "shwi" -0x151b: "shwii" -0x151c: "shwii" -0x151d: "shwo" -0x151e: "shwo" -0x151f: "shwoo" -0x1520: "shwoo" -0x1521: "shwa" -0x1522: "shwa" -0x1523: "shwaa" -0x1524: "shwaa" -0x1525: "sh" -0x1526: "ye" -0x1527: "yaai" -0x1528: "yi" -0x1529: "yii" -0x152a: "yo" -0x152b: "yoo" -0x152c: "yoo" -0x152d: "ya" -0x152e: "yaa" -0x152f: "ywe" -0x1530: "ywe" -0x1531: "ywi" -0x1532: "ywi" -0x1533: "ywii" -0x1534: "ywii" -0x1535: "ywo" -0x1536: "ywo" -0x1537: "ywoo" -0x1538: "ywoo" -0x1539: "ywa" -0x153a: "ywa" -0x153b: "ywaa" -0x153c: "ywaa" -0x153d: "ywaa" -0x153e: "y" -0x153f: "y" -0x1540: "y" -0x1541: "yi" -0x1542: "re" -0x1543: "re" -0x1544: "le" -0x1545: "raai" -0x1546: "ri" -0x1547: "rii" -0x1548: "ro" -0x1549: "roo" -0x154a: "lo" -0x154b: "ra" -0x154c: "raa" -0x154d: "la" -0x154e: "rwaa" -0x154f: "rwaa" -0x1550: "r" -0x1551: "r" -0x1552: "r" -0x1553: "fe" -0x1554: "faai" -0x1555: "fi" -0x1556: "fii" -0x1557: "fo" -0x1558: "foo" -0x1559: "fa" -0x155a: "faa" -0x155b: "fwaa" -0x155c: "fwaa" -0x155d: "f" -0x155e: "the" -0x155f: "the" -0x1560: "thi" -0x1561: "thi" -0x1562: "thii" -0x1563: "thii" -0x1564: "tho" -0x1565: "thoo" -0x1566: "tha" -0x1567: "thaa" -0x1568: "thwaa" -0x1569: "thwaa" -0x156a: "th" -0x156b: "tthe" -0x156c: "tthi" -0x156d: "ttho" -0x156e: "ttha" -0x156f: "tth" -0x1570: "tye" -0x1571: "tyi" -0x1572: "tyo" -0x1573: "tya" -0x1574: "he" -0x1575: "hi" -0x1576: "hii" -0x1577: "ho" -0x1578: "hoo" -0x1579: "ha" -0x157a: "haa" -0x157b: "h" -0x157c: "h" -0x157d: "hk" -0x157e: "qaai" -0x157f: "qi" -0x1580: "qii" -0x1581: "qo" -0x1582: "qoo" -0x1583: "qa" -0x1584: "qaa" -0x1585: "q" -0x1586: "tlhe" -0x1587: "tlhi" -0x1588: "tlho" -0x1589: "tlha" -0x158a: "re" -0x158b: "ri" -0x158c: "ro" -0x158d: "ra" -0x158e: "ngaai" -0x158f: "ngi" -0x1590: "ngii" -0x1591: "ngo" -0x1592: "ngoo" -0x1593: "nga" -0x1594: "ngaa" -0x1595: "ng" -0x1596: "nng" -0x1597: "she" -0x1598: "shi" -0x1599: "sho" -0x159a: "sha" -0x159b: "the" -0x159c: "thi" -0x159d: "tho" -0x159e: "tha" -0x159f: "th" -0x15a0: "lhi" -0x15a1: "lhii" -0x15a2: "lho" -0x15a3: "lhoo" -0x15a4: "lha" -0x15a5: "lhaa" -0x15a6: "lh" -0x15a7: "the" -0x15a8: "thi" -0x15a9: "thii" -0x15aa: "tho" -0x15ab: "thoo" -0x15ac: "tha" -0x15ad: "thaa" -0x15ae: "th" -0x15af: "b" -0x15b0: "e" -0x15b1: "i" -0x15b2: "o" -0x15b3: "a" -0x15b4: "we" -0x15b5: "wi" -0x15b6: "wo" -0x15b7: "wa" -0x15b8: "ne" -0x15b9: "ni" -0x15ba: "no" -0x15bb: "na" -0x15bc: "ke" -0x15bd: "ki" -0x15be: "ko" -0x15bf: "ka" -0x15c0: "he" -0x15c1: "hi" -0x15c2: "ho" -0x15c3: "ha" -0x15c4: "ghu" -0x15c5: "gho" -0x15c6: "ghe" -0x15c7: "ghee" -0x15c8: "ghi" -0x15c9: "gha" -0x15ca: "ru" -0x15cb: "ro" -0x15cc: "re" -0x15cd: "ree" -0x15ce: "ri" -0x15cf: "ra" -0x15d0: "wu" -0x15d1: "wo" -0x15d2: "we" -0x15d3: "wee" -0x15d4: "wi" -0x15d5: "wa" -0x15d6: "hwu" -0x15d7: "hwo" -0x15d8: "hwe" -0x15d9: "hwee" -0x15da: "hwi" -0x15db: "hwa" -0x15dc: "thu" -0x15dd: "tho" -0x15de: "the" -0x15df: "thee" -0x15e0: "thi" -0x15e1: "tha" -0x15e2: "ttu" -0x15e3: "tto" -0x15e4: "tte" -0x15e5: "ttee" -0x15e6: "tti" -0x15e7: "tta" -0x15e8: "pu" -0x15e9: "po" -0x15ea: "pe" -0x15eb: "pee" -0x15ec: "pi" -0x15ed: "pa" -0x15ee: "p" -0x15ef: "gu" -0x15f0: "go" -0x15f1: "ge" -0x15f2: "gee" -0x15f3: "gi" -0x15f4: "ga" -0x15f5: "khu" -0x15f6: "kho" -0x15f7: "khe" -0x15f8: "khee" -0x15f9: "khi" -0x15fa: "kha" -0x15fb: "kku" -0x15fc: "kko" -0x15fd: "kke" -0x15fe: "kkee" -0x15ff: "kki" -/* x016 */ -0x1600: "kka" -0x1601: "kk" -0x1602: "nu" -0x1603: "no" -0x1604: "ne" -0x1605: "nee" -0x1606: "ni" -0x1607: "na" -0x1608: "mu" -0x1609: "mo" -0x160a: "me" -0x160b: "mee" -0x160c: "mi" -0x160d: "ma" -0x160e: "yu" -0x160f: "yo" -0x1610: "ye" -0x1611: "yee" -0x1612: "yi" -0x1613: "ya" -0x1614: "ju" -0x1615: "ju" -0x1616: "jo" -0x1617: "je" -0x1618: "jee" -0x1619: "ji" -0x161a: "ji" -0x161b: "ja" -0x161c: "jju" -0x161d: "jjo" -0x161e: "jje" -0x161f: "jjee" -0x1620: "jji" -0x1621: "jja" -0x1622: "lu" -0x1623: "lo" -0x1624: "le" -0x1625: "lee" -0x1626: "li" -0x1627: "la" -0x1628: "dlu" -0x1629: "dlo" -0x162a: "dle" -0x162b: "dlee" -0x162c: "dli" -0x162d: "dla" -0x162e: "lhu" -0x162f: "lho" -0x1630: "lhe" -0x1631: "lhee" -0x1632: "lhi" -0x1633: "lha" -0x1634: "tlhu" -0x1635: "tlho" -0x1636: "tlhe" -0x1637: "tlhee" -0x1638: "tlhi" -0x1639: "tlha" -0x163a: "tlu" -0x163b: "tlo" -0x163c: "tle" -0x163d: "tlee" -0x163e: "tli" -0x163f: "tla" -0x1640: "zu" -0x1641: "zo" -0x1642: "ze" -0x1643: "zee" -0x1644: "zi" -0x1645: "za" -0x1646: "z" -0x1647: "z" -0x1648: "dzu" -0x1649: "dzo" -0x164a: "dze" -0x164b: "dzee" -0x164c: "dzi" -0x164d: "dza" -0x164e: "su" -0x164f: "so" -0x1650: "se" -0x1651: "see" -0x1652: "si" -0x1653: "sa" -0x1654: "shu" -0x1655: "sho" -0x1656: "she" -0x1657: "shee" -0x1658: "shi" -0x1659: "sha" -0x165a: "sh" -0x165b: "tsu" -0x165c: "tso" -0x165d: "tse" -0x165e: "tsee" -0x165f: "tsi" -0x1660: "tsa" -0x1661: "chu" -0x1662: "cho" -0x1663: "che" -0x1664: "chee" -0x1665: "chi" -0x1666: "cha" -0x1667: "ttsu" -0x1668: "ttso" -0x1669: "ttse" -0x166a: "ttsee" -0x166b: "ttsi" -0x166c: "ttsa" -0x166d: "X" -0x166e: "." -0x166f: "qai" -0x1670: "ngai" -0x1671: "nngi" -0x1672: "nngii" -0x1673: "nngo" -0x1674: "nngoo" -0x1675: "nnga" -0x1676: "nngaa" -0x1677: "[?]" -0x1678: "[?]" -0x1679: "[?]" -0x167a: "[?]" -0x167b: "[?]" -0x167c: "[?]" -0x167d: "[?]" -0x167e: "[?]" -0x167f: "[?]" -0x1680: " " -0x1681: "b" -0x1682: "l" -0x1683: "f" -0x1684: "s" -0x1685: "n" -0x1686: "h" -0x1687: "d" -0x1688: "t" -0x1689: "c" -0x168a: "q" -0x168b: "m" -0x168c: "g" -0x168d: "ng" -0x168e: "z" -0x168f: "r" -0x1690: "a" -0x1691: "o" -0x1692: "u" -0x1693: "e" -0x1694: "i" -0x1695: "ch" -0x1696: "th" -0x1697: "ph" -0x1698: "p" -0x1699: "x" -0x169a: "p" -0x169b: "<" -0x169c: ">" -0x169d: "[?]" -0x169e: "[?]" -0x169f: "[?]" -0x16a0: "f" -0x16a1: "v" -0x16a2: "u" -0x16a3: "yr" -0x16a4: "y" -0x16a5: "w" -0x16a6: "th" -0x16a7: "th" -0x16a8: "a" -0x16a9: "o" -0x16aa: "ac" -0x16ab: "ae" -0x16ac: "o" -0x16ad: "o" -0x16ae: "o" -0x16af: "oe" -0x16b0: "on" -0x16b1: "r" -0x16b2: "k" -0x16b3: "c" -0x16b4: "k" -0x16b5: "g" -0x16b6: "ng" -0x16b7: "g" -0x16b8: "g" -0x16b9: "w" -0x16ba: "h" -0x16bb: "h" -0x16bc: "h" -0x16bd: "h" -0x16be: "n" -0x16bf: "n" -0x16c0: "n" -0x16c1: "i" -0x16c2: "e" -0x16c3: "j" -0x16c4: "g" -0x16c5: "ae" -0x16c6: "a" -0x16c7: "eo" -0x16c8: "p" -0x16c9: "z" -0x16ca: "s" -0x16cb: "s" -0x16cc: "s" -0x16cd: "c" -0x16ce: "z" -0x16cf: "t" -0x16d0: "t" -0x16d1: "d" -0x16d2: "b" -0x16d3: "b" -0x16d4: "p" -0x16d5: "p" -0x16d6: "e" -0x16d7: "m" -0x16d8: "m" -0x16d9: "m" -0x16da: "l" -0x16db: "l" -0x16dc: "ng" -0x16dd: "ng" -0x16de: "d" -0x16df: "o" -0x16e0: "ear" -0x16e1: "ior" -0x16e2: "qu" -0x16e3: "qu" -0x16e4: "qu" -0x16e5: "s" -0x16e6: "yr" -0x16e7: "yr" -0x16e8: "yr" -0x16e9: "q" -0x16ea: "x" -0x16eb: "." -0x16ec: ":" -0x16ed: "+" -0x16ee: "17" -0x16ef: "18" -0x16f0: "19" -0x16f1: "[?]" -0x16f2: "[?]" -0x16f3: "[?]" -0x16f4: "[?]" -0x16f5: "[?]" -0x16f6: "[?]" -0x16f7: "[?]" -0x16f8: "[?]" -0x16f9: "[?]" -0x16fa: "[?]" -0x16fb: "[?]" -0x16fc: "[?]" -0x16fd: "[?]" -0x16fe: "[?]" -/* x017 */ -0x1700: "[?]" -0x1701: "[?]" -0x1702: "[?]" -0x1703: "[?]" -0x1704: "[?]" -0x1705: "[?]" -0x1706: "[?]" -0x1707: "[?]" -0x1708: "[?]" -0x1709: "[?]" -0x170a: "[?]" -0x170b: "[?]" -0x170c: "[?]" -0x170d: "[?]" -0x170e: "[?]" -0x170f: "[?]" -0x1710: "[?]" -0x1711: "[?]" -0x1712: "[?]" -0x1713: "[?]" -0x1714: "[?]" -0x1715: "[?]" -0x1716: "[?]" -0x1717: "[?]" -0x1718: "[?]" -0x1719: "[?]" -0x171a: "[?]" -0x171b: "[?]" -0x171c: "[?]" -0x171d: "[?]" -0x171e: "[?]" -0x171f: "[?]" -0x1720: "[?]" -0x1721: "[?]" -0x1722: "[?]" -0x1723: "[?]" -0x1724: "[?]" -0x1725: "[?]" -0x1726: "[?]" -0x1727: "[?]" -0x1728: "[?]" -0x1729: "[?]" -0x172a: "[?]" -0x172b: "[?]" -0x172c: "[?]" -0x172d: "[?]" -0x172e: "[?]" -0x172f: "[?]" -0x1730: "[?]" -0x1731: "[?]" -0x1732: "[?]" -0x1733: "[?]" -0x1734: "[?]" -0x1735: "[?]" -0x1736: "[?]" -0x1737: "[?]" -0x1738: "[?]" -0x1739: "[?]" -0x173a: "[?]" -0x173b: "[?]" -0x173c: "[?]" -0x173d: "[?]" -0x173e: "[?]" -0x173f: "[?]" -0x1740: "[?]" -0x1741: "[?]" -0x1742: "[?]" -0x1743: "[?]" -0x1744: "[?]" -0x1745: "[?]" -0x1746: "[?]" -0x1747: "[?]" -0x1748: "[?]" -0x1749: "[?]" -0x174a: "[?]" -0x174b: "[?]" -0x174c: "[?]" -0x174d: "[?]" -0x174e: "[?]" -0x174f: "[?]" -0x1750: "[?]" -0x1751: "[?]" -0x1752: "[?]" -0x1753: "[?]" -0x1754: "[?]" -0x1755: "[?]" -0x1756: "[?]" -0x1757: "[?]" -0x1758: "[?]" -0x1759: "[?]" -0x175a: "[?]" -0x175b: "[?]" -0x175c: "[?]" -0x175d: "[?]" -0x175e: "[?]" -0x175f: "[?]" -0x1760: "[?]" -0x1761: "[?]" -0x1762: "[?]" -0x1763: "[?]" -0x1764: "[?]" -0x1765: "[?]" -0x1766: "[?]" -0x1767: "[?]" -0x1768: "[?]" -0x1769: "[?]" -0x176a: "[?]" -0x176b: "[?]" -0x176c: "[?]" -0x176d: "[?]" -0x176e: "[?]" -0x176f: "[?]" -0x1770: "[?]" -0x1771: "[?]" -0x1772: "[?]" -0x1773: "[?]" -0x1774: "[?]" -0x1775: "[?]" -0x1776: "[?]" -0x1777: "[?]" -0x1778: "[?]" -0x1779: "[?]" -0x177a: "[?]" -0x177b: "[?]" -0x177c: "[?]" -0x177d: "[?]" -0x177e: "[?]" -0x177f: "[?]" -0x1780: "k" -0x1781: "kh" -0x1782: "g" -0x1783: "gh" -0x1784: "ng" -0x1785: "c" -0x1786: "ch" -0x1787: "j" -0x1788: "jh" -0x1789: "ny" -0x178a: "t" -0x178b: "tth" -0x178c: "d" -0x178d: "ddh" -0x178e: "nn" -0x178f: "t" -0x1790: "th" -0x1791: "d" -0x1792: "dh" -0x1793: "n" -0x1794: "p" -0x1795: "ph" -0x1796: "b" -0x1797: "bh" -0x1798: "m" -0x1799: "y" -0x179a: "r" -0x179b: "l" -0x179c: "v" -0x179d: "sh" -0x179e: "ss" -0x179f: "s" -0x17a0: "h" -0x17a1: "l" -0x17a2: "q" -0x17a3: "a" -0x17a4: "aa" -0x17a5: "i" -0x17a6: "ii" -0x17a7: "u" -0x17a8: "uk" -0x17a9: "uu" -0x17aa: "uuv" -0x17ab: "ry" -0x17ac: "ryy" -0x17ad: "ly" -0x17ae: "lyy" -0x17af: "e" -0x17b0: "ai" -0x17b1: "oo" -0x17b2: "oo" -0x17b3: "au" -0x17b4: "a" -0x17b5: "aa" -0x17b6: "aa" -0x17b7: "i" -0x17b8: "ii" -0x17b9: "y" -0x17ba: "yy" -0x17bb: "u" -0x17bc: "uu" -0x17bd: "ua" -0x17be: "oe" -0x17bf: "ya" -0x17c0: "ie" -0x17c1: "e" -0x17c2: "ae" -0x17c3: "ai" -0x17c4: "oo" -0x17c5: "au" -0x17c6: "M" -0x17c7: "H" -0x17c8: "a`" -0x17c9: "" -0x17ca: "" -0x17cb: "" -0x17cc: "r" -0x17cd: "" -0x17ce: "!" -0x17cf: "" -0x17d0: "" -0x17d1: "" -0x17d2: "" -0x17d3: "" -0x17d4: "." -0x17d5: " // " -0x17d6: ":" -0x17d7: "+" -0x17d8: "++" -0x17d9: " * " -0x17da: " /// " -0x17db: "KR" -0x17dc: "'" -0x17dd: "[?]" -0x17de: "[?]" -0x17df: "[?]" -0x17e0: "0" -0x17e1: "1" -0x17e2: "2" -0x17e3: "3" -0x17e4: "4" -0x17e5: "5" -0x17e6: "6" -0x17e7: "7" -0x17e8: "8" -0x17e9: "9" -0x17ea: "[?]" -0x17eb: "[?]" -0x17ec: "[?]" -0x17ed: "[?]" -0x17ee: "[?]" -0x17ef: "[?]" -0x17f0: "[?]" -0x17f1: "[?]" -0x17f2: "[?]" -0x17f3: "[?]" -0x17f4: "[?]" -0x17f5: "[?]" -0x17f6: "[?]" -0x17f7: "[?]" -0x17f8: "[?]" -0x17f9: "[?]" -0x17fa: "[?]" -0x17fb: "[?]" -0x17fc: "[?]" -0x17fd: "[?]" -0x17fe: "[?]" -/* x018 */ -0x1800: " @ " -0x1801: " ... " -0x1802: ", " -0x1803: ". " -0x1804: ": " -0x1805: " // " -0x1806: "" -0x1807: "-" -0x1808: ", " -0x1809: ". " -0x180a: "" -0x180b: "" -0x180c: "" -0x180d: "" -0x180e: "" -0x180f: "[?]" -0x1810: "0" -0x1811: "1" -0x1812: "2" -0x1813: "3" -0x1814: "4" -0x1815: "5" -0x1816: "6" -0x1817: "7" -0x1818: "8" -0x1819: "9" -0x181a: "[?]" -0x181b: "[?]" -0x181c: "[?]" -0x181d: "[?]" -0x181e: "[?]" -0x181f: "[?]" -0x1820: "a" -0x1821: "e" -0x1822: "i" -0x1823: "o" -0x1824: "u" -0x1825: "O" -0x1826: "U" -0x1827: "ee" -0x1828: "n" -0x1829: "ng" -0x182a: "b" -0x182b: "p" -0x182c: "q" -0x182d: "g" -0x182e: "m" -0x182f: "l" -0x1830: "s" -0x1831: "sh" -0x1832: "t" -0x1833: "d" -0x1834: "ch" -0x1835: "j" -0x1836: "y" -0x1837: "r" -0x1838: "w" -0x1839: "f" -0x183a: "k" -0x183b: "kha" -0x183c: "ts" -0x183d: "z" -0x183e: "h" -0x183f: "zr" -0x1840: "lh" -0x1841: "zh" -0x1842: "ch" -0x1843: "-" -0x1844: "e" -0x1845: "i" -0x1846: "o" -0x1847: "u" -0x1848: "O" -0x1849: "U" -0x184a: "ng" -0x184b: "b" -0x184c: "p" -0x184d: "q" -0x184e: "g" -0x184f: "m" -0x1850: "t" -0x1851: "d" -0x1852: "ch" -0x1853: "j" -0x1854: "ts" -0x1855: "y" -0x1856: "w" -0x1857: "k" -0x1858: "g" -0x1859: "h" -0x185a: "jy" -0x185b: "ny" -0x185c: "dz" -0x185d: "e" -0x185e: "i" -0x185f: "iy" -0x1860: "U" -0x1861: "u" -0x1862: "ng" -0x1863: "k" -0x1864: "g" -0x1865: "h" -0x1866: "p" -0x1867: "sh" -0x1868: "t" -0x1869: "d" -0x186a: "j" -0x186b: "f" -0x186c: "g" -0x186d: "h" -0x186e: "ts" -0x186f: "z" -0x1870: "r" -0x1871: "ch" -0x1872: "zh" -0x1873: "i" -0x1874: "k" -0x1875: "r" -0x1876: "f" -0x1877: "zh" -0x1878: "[?]" -0x1879: "[?]" -0x187a: "[?]" -0x187b: "[?]" -0x187c: "[?]" -0x187d: "[?]" -0x187e: "[?]" -0x187f: "[?]" -0x1880: "[?]" -0x1881: "H" -0x1882: "X" -0x1883: "W" -0x1884: "M" -0x1885: " 3 " -0x1886: " 333 " -0x1887: "a" -0x1888: "i" -0x1889: "k" -0x188a: "ng" -0x188b: "c" -0x188c: "tt" -0x188d: "tth" -0x188e: "dd" -0x188f: "nn" -0x1890: "t" -0x1891: "d" -0x1892: "p" -0x1893: "ph" -0x1894: "ss" -0x1895: "zh" -0x1896: "z" -0x1897: "a" -0x1898: "t" -0x1899: "zh" -0x189a: "gh" -0x189b: "ng" -0x189c: "c" -0x189d: "jh" -0x189e: "tta" -0x189f: "ddh" -0x18a0: "t" -0x18a1: "dh" -0x18a2: "ss" -0x18a3: "cy" -0x18a4: "zh" -0x18a5: "z" -0x18a6: "u" -0x18a7: "y" -0x18a8: "bh" -0x18a9: "'" -0x18aa: "[?]" -0x18ab: "[?]" -0x18ac: "[?]" -0x18ad: "[?]" -0x18ae: "[?]" -0x18af: "[?]" -0x18b0: "[?]" -0x18b1: "[?]" -0x18b2: "[?]" -0x18b3: "[?]" -0x18b4: "[?]" -0x18b5: "[?]" -0x18b6: "[?]" -0x18b7: "[?]" -0x18b8: "[?]" -0x18b9: "[?]" -0x18ba: "[?]" -0x18bb: "[?]" -0x18bc: "[?]" -0x18bd: "[?]" -0x18be: "[?]" -0x18bf: "[?]" -0x18c0: "[?]" -0x18c1: "[?]" -0x18c2: "[?]" -0x18c3: "[?]" -0x18c4: "[?]" -0x18c5: "[?]" -0x18c6: "[?]" -0x18c7: "[?]" -0x18c8: "[?]" -0x18c9: "[?]" -0x18ca: "[?]" -0x18cb: "[?]" -0x18cc: "[?]" -0x18cd: "[?]" -0x18ce: "[?]" -0x18cf: "[?]" -0x18d0: "[?]" -0x18d1: "[?]" -0x18d2: "[?]" -0x18d3: "[?]" -0x18d4: "[?]" -0x18d5: "[?]" -0x18d6: "[?]" -0x18d7: "[?]" -0x18d8: "[?]" -0x18d9: "[?]" -0x18da: "[?]" -0x18db: "[?]" -0x18dc: "[?]" -0x18dd: "[?]" -0x18de: "[?]" -0x18df: "[?]" -0x18e0: "[?]" -0x18e1: "[?]" -0x18e2: "[?]" -0x18e3: "[?]" -0x18e4: "[?]" -0x18e5: "[?]" -0x18e6: "[?]" -0x18e7: "[?]" -0x18e8: "[?]" -0x18e9: "[?]" -0x18ea: "[?]" -0x18eb: "[?]" -0x18ec: "[?]" -0x18ed: "[?]" -0x18ee: "[?]" -0x18ef: "[?]" -0x18f0: "[?]" -0x18f1: "[?]" -0x18f2: "[?]" -0x18f3: "[?]" -0x18f4: "[?]" -0x18f5: "[?]" -0x18f6: "[?]" -0x18f7: "[?]" -0x18f8: "[?]" -0x18f9: "[?]" -0x18fa: "[?]" -0x18fb: "[?]" -0x18fc: "[?]" -0x18fd: "[?]" -0x18fe: "[?]" -/* x01d */ -0x1d00: "" -0x1d01: "" -0x1d02: "" -0x1d03: "" -0x1d04: "" -0x1d05: "" -0x1d06: "" -0x1d07: "" -0x1d08: "" -0x1d09: "" -0x1d0a: "" -0x1d0b: "" -0x1d0c: "" -0x1d0d: "" -0x1d0e: "" -0x1d0f: "" -0x1d10: "" -0x1d11: "" -0x1d12: "" -0x1d13: "" -0x1d14: "" -0x1d15: "" -0x1d16: "" -0x1d17: "" -0x1d18: "" -0x1d19: "" -0x1d1a: "" -0x1d1b: "" -0x1d1c: "" -0x1d1d: "" -0x1d1e: "" -0x1d1f: "" -0x1d20: "" -0x1d21: "" -0x1d22: "" -0x1d23: "" -0x1d24: "" -0x1d25: "" -0x1d26: "" -0x1d27: "" -0x1d28: "" -0x1d29: "" -0x1d2a: "" -0x1d2b: "" -0x1d2c: "" -0x1d2d: "" -0x1d2e: "" -0x1d2f: "" -0x1d30: "" -0x1d31: "" -0x1d32: "" -0x1d33: "" -0x1d34: "" -0x1d35: "" -0x1d36: "" -0x1d37: "" -0x1d38: "" -0x1d39: "" -0x1d3a: "" -0x1d3b: "" -0x1d3c: "" -0x1d3d: "" -0x1d3e: "" -0x1d3f: "" -0x1d40: "" -0x1d41: "" -0x1d42: "" -0x1d43: "" -0x1d44: "" -0x1d45: "" -0x1d46: "" -0x1d47: "" -0x1d48: "" -0x1d49: "" -0x1d4a: "" -0x1d4b: "" -0x1d4c: "" -0x1d4d: "" -0x1d4e: "" -0x1d4f: "" -0x1d50: "" -0x1d51: "" -0x1d52: "" -0x1d53: "" -0x1d54: "" -0x1d55: "" -0x1d56: "" -0x1d57: "" -0x1d58: "" -0x1d59: "" -0x1d5a: "" -0x1d5b: "" -0x1d5c: "" -0x1d5d: "" -0x1d5e: "" -0x1d5f: "" -0x1d60: "" -0x1d61: "" -0x1d62: "" -0x1d63: "" -0x1d64: "" -0x1d65: "" -0x1d66: "" -0x1d67: "" -0x1d68: "" -0x1d69: "" -0x1d6a: "" -0x1d6b: "" -0x1d6c: "b" -0x1d6d: "d" -0x1d6e: "f" -0x1d6f: "m" -0x1d70: "n" -0x1d71: "p" -0x1d72: "r" -0x1d73: "r" -0x1d74: "s" -0x1d75: "t" -0x1d76: "z" -0x1d77: "g" -0x1d78: "" -0x1d79: "" -0x1d7a: "" -0x1d7b: "" -0x1d7c: "" -0x1d7d: "p" -0x1d7e: "" -0x1d7f: "" -0x1d80: "b" -0x1d81: "d" -0x1d82: "f" -0x1d83: "g" -0x1d84: "k" -0x1d85: "l" -0x1d86: "m" -0x1d87: "n" -0x1d88: "p" -0x1d89: "r" -0x1d8a: "s" -0x1d8b: "" -0x1d8c: "v" -0x1d8d: "x" -0x1d8e: "z" -0x1d8f: "" -0x1d90: "" -0x1d91: "" -0x1d92: "" -0x1d93: "" -0x1d94: "" -0x1d95: "" -0x1d96: "" -0x1d97: "" -0x1d98: "" -0x1d99: "" -0x1d9a: "" -0x1d9b: "" -0x1d9c: "" -0x1d9d: "" -0x1d9e: "" -0x1d9f: "" -0x1da0: "" -0x1da1: "" -0x1da2: "" -0x1da3: "" -0x1da4: "" -0x1da5: "" -0x1da6: "" -0x1da7: "" -0x1da8: "" -0x1da9: "" -0x1daa: "" -0x1dab: "" -0x1dac: "" -0x1dad: "" -0x1dae: "" -0x1daf: "" -0x1db0: "" -0x1db1: "" -0x1db2: "" -0x1db3: "" -0x1db4: "" -0x1db5: "" -0x1db6: "" -0x1db7: "" -0x1db8: "" -0x1db9: "" -0x1dba: "" -0x1dbb: "" -0x1dbc: "" -0x1dbd: "" -0x1dbe: "" -0x1dbf: "" -0x1dc0: "" -0x1dc1: "" -0x1dc2: "" -0x1dc3: "" -0x1dc4: "" -0x1dc5: "" -0x1dc6: "" -0x1dc7: "" -0x1dc8: "" -0x1dc9: "" -0x1dca: "" -0x1dcb: "" -0x1dcc: "" -0x1dcd: "" -0x1dce: "" -0x1dcf: "" -0x1dd0: "" -0x1dd1: "" -0x1dd2: "" -0x1dd3: "" -0x1dd4: "" -0x1dd5: "" -0x1dd6: "" -0x1dd7: "" -0x1dd8: "" -0x1dd9: "" -0x1dda: "" -0x1ddb: "" -0x1ddc: "" -0x1ddd: "" -0x1dde: "" -0x1ddf: "" -0x1de0: "" -0x1de1: "" -0x1de2: "" -0x1de3: "" -0x1de4: "" -0x1de5: "" -0x1de6: "" -0x1de7: "" -0x1de8: "" -0x1de9: "" -0x1dea: "" -0x1deb: "" -0x1dec: "" -0x1ded: "" -0x1dee: "" -0x1def: "" -0x1df0: "" -0x1df1: "" -0x1df2: "" -0x1df3: "" -0x1df4: "" -0x1df5: "" -0x1df6: "" -0x1df7: "" -0x1df8: "" -0x1df9: "" -0x1dfa: "" -0x1dfb: "" -0x1dfc: "" -0x1dfd: "" -0x1dfe: "" -/* x01e */ -0x1e00: "A" -0x1e01: "a" -0x1e02: "B" -0x1e03: "b" -0x1e04: "B" -0x1e05: "b" -0x1e06: "B" -0x1e07: "b" -0x1e08: "C" -0x1e09: "c" -0x1e0a: "D" -0x1e0b: "d" -0x1e0c: "D" -0x1e0d: "d" -0x1e0e: "D" -0x1e0f: "d" -0x1e10: "D" -0x1e11: "d" -0x1e12: "D" -0x1e13: "d" -0x1e14: "E" -0x1e15: "e" -0x1e16: "E" -0x1e17: "e" -0x1e18: "E" -0x1e19: "e" -0x1e1a: "E" -0x1e1b: "e" -0x1e1c: "E" -0x1e1d: "e" -0x1e1e: "F" -0x1e1f: "f" -0x1e20: "G" -0x1e21: "g" -0x1e22: "H" -0x1e23: "h" -0x1e24: "H" -0x1e25: "h" -0x1e26: "H" -0x1e27: "h" -0x1e28: "H" -0x1e29: "h" -0x1e2a: "H" -0x1e2b: "h" -0x1e2c: "I" -0x1e2d: "i" -0x1e2e: "I" -0x1e2f: "i" -0x1e30: "K" -0x1e31: "k" -0x1e32: "K" -0x1e33: "k" -0x1e34: "K" -0x1e35: "k" -0x1e36: "L" -0x1e37: "l" -0x1e38: "L" -0x1e39: "l" -0x1e3a: "L" -0x1e3b: "l" -0x1e3c: "L" -0x1e3d: "l" -0x1e3e: "M" -0x1e3f: "m" -0x1e40: "M" -0x1e41: "m" -0x1e42: "M" -0x1e43: "m" -0x1e44: "N" -0x1e45: "n" -0x1e46: "N" -0x1e47: "n" -0x1e48: "N" -0x1e49: "n" -0x1e4a: "N" -0x1e4b: "n" -0x1e4c: "O" -0x1e4d: "o" -0x1e4e: "O" -0x1e4f: "o" -0x1e50: "O" -0x1e51: "o" -0x1e52: "O" -0x1e53: "o" -0x1e54: "P" -0x1e55: "p" -0x1e56: "P" -0x1e57: "p" -0x1e58: "R" -0x1e59: "r" -0x1e5a: "R" -0x1e5b: "r" -0x1e5c: "R" -0x1e5d: "r" -0x1e5e: "R" -0x1e5f: "r" -0x1e60: "S" -0x1e61: "s" -0x1e62: "S" -0x1e63: "s" -0x1e64: "S" -0x1e65: "s" -0x1e66: "S" -0x1e67: "s" -0x1e68: "S" -0x1e69: "s" -0x1e6a: "T" -0x1e6b: "t" -0x1e6c: "T" -0x1e6d: "t" -0x1e6e: "T" -0x1e6f: "t" -0x1e70: "T" -0x1e71: "t" -0x1e72: "U" -0x1e73: "u" -0x1e74: "U" -0x1e75: "u" -0x1e76: "U" -0x1e77: "u" -0x1e78: "U" -0x1e79: "u" -0x1e7a: "U" -0x1e7b: "u" -0x1e7c: "V" -0x1e7d: "v" -0x1e7e: "V" -0x1e7f: "v" -0x1e80: "W" -0x1e81: "w" -0x1e82: "W" -0x1e83: "w" -0x1e84: "W" -0x1e85: "w" -0x1e86: "W" -0x1e87: "w" -0x1e88: "W" -0x1e89: "w" -0x1e8a: "X" -0x1e8b: "x" -0x1e8c: "X" -0x1e8d: "x" -0x1e8e: "Y" -0x1e8f: "y" -0x1e90: "Z" -0x1e91: "z" -0x1e92: "Z" -0x1e93: "z" -0x1e94: "Z" -0x1e95: "z" -0x1e96: "h" -0x1e97: "t" -0x1e98: "w" -0x1e99: "y" -0x1e9a: "a" -0x1e9b: "S" -0x1e9c: "[?]" -0x1e9d: "[?]" -0x1e9e: "Ss" -0x1e9f: "[?]" -0x1ea0: "A" -0x1ea1: "a" -0x1ea2: "A" -0x1ea3: "a" -0x1ea4: "A" -0x1ea5: "a" -0x1ea6: "A" -0x1ea7: "a" -0x1ea8: "A" -0x1ea9: "a" -0x1eaa: "A" -0x1eab: "a" -0x1eac: "A" -0x1ead: "a" -0x1eae: "A" -0x1eaf: "a" -0x1eb0: "A" -0x1eb1: "a" -0x1eb2: "A" -0x1eb3: "a" -0x1eb4: "A" -0x1eb5: "a" -0x1eb6: "A" -0x1eb7: "a" -0x1eb8: "E" -0x1eb9: "e" -0x1eba: "E" -0x1ebb: "e" -0x1ebc: "E" -0x1ebd: "e" -0x1ebe: "E" -0x1ebf: "e" -0x1ec0: "E" -0x1ec1: "e" -0x1ec2: "E" -0x1ec3: "e" -0x1ec4: "E" -0x1ec5: "e" -0x1ec6: "E" -0x1ec7: "e" -0x1ec8: "I" -0x1ec9: "i" -0x1eca: "I" -0x1ecb: "i" -0x1ecc: "O" -0x1ecd: "o" -0x1ece: "O" -0x1ecf: "o" -0x1ed0: "O" -0x1ed1: "o" -0x1ed2: "O" -0x1ed3: "o" -0x1ed4: "O" -0x1ed5: "o" -0x1ed6: "O" -0x1ed7: "o" -0x1ed8: "O" -0x1ed9: "o" -0x1eda: "O" -0x1edb: "o" -0x1edc: "O" -0x1edd: "o" -0x1ede: "O" -0x1edf: "o" -0x1ee0: "O" -0x1ee1: "o" -0x1ee2: "O" -0x1ee3: "o" -0x1ee4: "U" -0x1ee5: "u" -0x1ee6: "U" -0x1ee7: "u" -0x1ee8: "U" -0x1ee9: "u" -0x1eea: "U" -0x1eeb: "u" -0x1eec: "U" -0x1eed: "u" -0x1eee: "U" -0x1eef: "u" -0x1ef0: "U" -0x1ef1: "u" -0x1ef2: "Y" -0x1ef3: "y" -0x1ef4: "Y" -0x1ef5: "y" -0x1ef6: "Y" -0x1ef7: "y" -0x1ef8: "Y" -0x1ef9: "y" -0x1efa: "[?]" -0x1efb: "[?]" -0x1efc: "[?]" -0x1efd: "[?]" -0x1efe: "[?]" -/* x01f */ -0x1f00: "a" -0x1f01: "a" -0x1f02: "a" -0x1f03: "a" -0x1f04: "a" -0x1f05: "a" -0x1f06: "a" -0x1f07: "a" -0x1f08: "A" -0x1f09: "A" -0x1f0a: "A" -0x1f0b: "A" -0x1f0c: "A" -0x1f0d: "A" -0x1f0e: "A" -0x1f0f: "A" -0x1f10: "e" -0x1f11: "e" -0x1f12: "e" -0x1f13: "e" -0x1f14: "e" -0x1f15: "e" -0x1f16: "[?]" -0x1f17: "[?]" -0x1f18: "E" -0x1f19: "E" -0x1f1a: "E" -0x1f1b: "E" -0x1f1c: "E" -0x1f1d: "E" -0x1f1e: "[?]" -0x1f1f: "[?]" -0x1f20: "e" -0x1f21: "e" -0x1f22: "e" -0x1f23: "e" -0x1f24: "e" -0x1f25: "e" -0x1f26: "e" -0x1f27: "e" -0x1f28: "E" -0x1f29: "E" -0x1f2a: "E" -0x1f2b: "E" -0x1f2c: "E" -0x1f2d: "E" -0x1f2e: "E" -0x1f2f: "E" -0x1f30: "i" -0x1f31: "i" -0x1f32: "i" -0x1f33: "i" -0x1f34: "i" -0x1f35: "i" -0x1f36: "i" -0x1f37: "i" -0x1f38: "I" -0x1f39: "I" -0x1f3a: "I" -0x1f3b: "I" -0x1f3c: "I" -0x1f3d: "I" -0x1f3e: "I" -0x1f3f: "I" -0x1f40: "o" -0x1f41: "o" -0x1f42: "o" -0x1f43: "o" -0x1f44: "o" -0x1f45: "o" -0x1f46: "[?]" -0x1f47: "[?]" -0x1f48: "O" -0x1f49: "O" -0x1f4a: "O" -0x1f4b: "O" -0x1f4c: "O" -0x1f4d: "O" -0x1f4e: "[?]" -0x1f4f: "[?]" -0x1f50: "u" -0x1f51: "u" -0x1f52: "u" -0x1f53: "u" -0x1f54: "u" -0x1f55: "u" -0x1f56: "u" -0x1f57: "u" -0x1f58: "[?]" -0x1f59: "U" -0x1f5a: "[?]" -0x1f5b: "U" -0x1f5c: "[?]" -0x1f5d: "U" -0x1f5e: "[?]" -0x1f5f: "U" -0x1f60: "o" -0x1f61: "o" -0x1f62: "o" -0x1f63: "o" -0x1f64: "o" -0x1f65: "o" -0x1f66: "o" -0x1f67: "o" -0x1f68: "O" -0x1f69: "O" -0x1f6a: "O" -0x1f6b: "O" -0x1f6c: "O" -0x1f6d: "O" -0x1f6e: "O" -0x1f6f: "O" -0x1f70: "a" -0x1f71: "a" -0x1f72: "e" -0x1f73: "e" -0x1f74: "e" -0x1f75: "e" -0x1f76: "i" -0x1f77: "i" -0x1f78: "o" -0x1f79: "o" -0x1f7a: "u" -0x1f7b: "u" -0x1f7c: "o" -0x1f7d: "o" -0x1f7e: "[?]" -0x1f7f: "[?]" -0x1f80: "a" -0x1f81: "a" -0x1f82: "a" -0x1f83: "a" -0x1f84: "a" -0x1f85: "a" -0x1f86: "a" -0x1f87: "a" -0x1f88: "A" -0x1f89: "A" -0x1f8a: "A" -0x1f8b: "A" -0x1f8c: "A" -0x1f8d: "A" -0x1f8e: "A" -0x1f8f: "A" -0x1f90: "e" -0x1f91: "e" -0x1f92: "e" -0x1f93: "e" -0x1f94: "e" -0x1f95: "e" -0x1f96: "e" -0x1f97: "e" -0x1f98: "E" -0x1f99: "E" -0x1f9a: "E" -0x1f9b: "E" -0x1f9c: "E" -0x1f9d: "E" -0x1f9e: "E" -0x1f9f: "E" -0x1fa0: "o" -0x1fa1: "o" -0x1fa2: "o" -0x1fa3: "o" -0x1fa4: "o" -0x1fa5: "o" -0x1fa6: "o" -0x1fa7: "o" -0x1fa8: "O" -0x1fa9: "O" -0x1faa: "O" -0x1fab: "O" -0x1fac: "O" -0x1fad: "O" -0x1fae: "O" -0x1faf: "O" -0x1fb0: "a" -0x1fb1: "a" -0x1fb2: "a" -0x1fb3: "a" -0x1fb4: "a" -0x1fb5: "[?]" -0x1fb6: "a" -0x1fb7: "a" -0x1fb8: "A" -0x1fb9: "A" -0x1fba: "A" -0x1fbb: "A" -0x1fbc: "A" -0x1fbd: "'" -0x1fbe: "i" -0x1fbf: "'" -0x1fc0: "~" -0x1fc1: "\"~" -0x1fc2: "e" -0x1fc3: "e" -0x1fc4: "e" -0x1fc5: "[?]" -0x1fc6: "e" -0x1fc7: "e" -0x1fc8: "E" -0x1fc9: "E" -0x1fca: "E" -0x1fcb: "E" -0x1fcc: "E" -0x1fcd: "'`" -0x1fce: "''" -0x1fcf: "'~" -0x1fd0: "i" -0x1fd1: "i" -0x1fd2: "i" -0x1fd3: "i" -0x1fd4: "[?]" -0x1fd5: "[?]" -0x1fd6: "i" -0x1fd7: "i" -0x1fd8: "I" -0x1fd9: "I" -0x1fda: "I" -0x1fdb: "I" -0x1fdc: "[?]" -0x1fdd: "`'" -0x1fde: "`'" -0x1fdf: "`~" -0x1fe0: "u" -0x1fe1: "u" -0x1fe2: "u" -0x1fe3: "u" -0x1fe4: "R" -0x1fe5: "R" -0x1fe6: "u" -0x1fe7: "u" -0x1fe8: "U" -0x1fe9: "U" -0x1fea: "U" -0x1feb: "U" -0x1fec: "R" -0x1fed: "\"`" -0x1fee: "\"'" -0x1fef: "`" -0x1ff0: "[?]" -0x1ff1: "[?]" -0x1ff2: "o" -0x1ff3: "o" -0x1ff4: "o" -0x1ff5: "[?]" -0x1ff6: "o" -0x1ff7: "o" -0x1ff8: "O" -0x1ff9: "O" -0x1ffa: "O" -0x1ffb: "O" -0x1ffc: "O" -0x1ffd: "'" -0x1ffe: "`" -/* x020 */ -0x2000: " " -0x2001: " " -0x2002: " " -0x2003: " " -0x2004: " " -0x2005: " " -0x2006: " " -0x2007: " " -0x2008: " " -0x2009: " " -0x200a: " " -0x200b: " " -0x200c: "" -0x200d: "" -0x200e: "" -0x200f: "" -0x2010: "-" -0x2011: "-" -0x2012: "-" -0x2013: "-" -0x2014: "--" -0x2015: "--" -0x2016: "||" -0x2017: "_" -0x2018: "'" -0x2019: "'" -0x201a: "," -0x201b: "'" -0x201c: "\"" -0x201d: "\"" -0x201e: ",," -0x201f: "\"" -0x2020: "+" -0x2021: "++" -0x2022: "*" -0x2023: "*>" -0x2024: "." -0x2025: ".." -0x2026: "..." -0x2027: "." -0x2028: "\n" -0x2029: "\n\n" -0x202a: "" -0x202b: "" -0x202c: "" -0x202d: "" -0x202e: "" -0x202f: " " -0x2030: "%0" -0x2031: "%00" -0x2032: "'" -0x2033: "''" -0x2034: "'''" -0x2035: "`" -0x2036: "``" -0x2037: "```" -0x2038: "^" -0x2039: "<" -0x203a: ">" -0x203b: "*" -0x203c: "!!" -0x203d: "!?" -0x203e: "-" -0x203f: "_" -0x2040: "-" -0x2041: "^" -0x2042: "***" -0x2043: "--" -0x2044: "/" -0x2045: "-[" -0x2046: "]-" -0x2047: "[?]" -0x2048: "?!" -0x2049: "!?" -0x204a: "7" -0x204b: "PP" -0x204c: "(]" -0x204d: "[)" -0x204e: "[?]" -0x204f: "[?]" -0x2050: "[?]" -0x2051: "[?]" -0x2052: "[?]" -0x2053: "[?]" -0x2054: "[?]" -0x2055: "[?]" -0x2056: "[?]" -0x2057: "[?]" -0x2058: "[?]" -0x2059: "[?]" -0x205a: "[?]" -0x205b: "[?]" -0x205c: "[?]" -0x205d: "[?]" -0x205e: "[?]" -0x205f: "[?]" -0x2060: "[?]" -0x2061: "[?]" -0x2062: "[?]" -0x2063: "[?]" -0x2064: "[?]" -0x2065: "[?]" -0x2066: "[?]" -0x2067: "[?]" -0x2068: "[?]" -0x2069: "[?]" -0x206a: "" -0x206b: "" -0x206c: "" -0x206d: "" -0x206e: "" -0x206f: "" -0x2070: "0" -0x2071: "" -0x2072: "" -0x2073: "" -0x2074: "4" -0x2075: "5" -0x2076: "6" -0x2077: "7" -0x2078: "8" -0x2079: "9" -0x207a: "+" -0x207b: "-" -0x207c: "=" -0x207d: "(" -0x207e: ")" -0x207f: "n" -0x2080: "0" -0x2081: "1" -0x2082: "2" -0x2083: "3" -0x2084: "4" -0x2085: "5" -0x2086: "6" -0x2087: "7" -0x2088: "8" -0x2089: "9" -0x208a: "+" -0x208b: "-" -0x208c: "=" -0x208d: "(" -0x208e: ")" -0x208f: "[?]" -0x2090: "[?]" -0x2091: "[?]" -0x2092: "[?]" -0x2093: "[?]" -0x2094: "[?]" -0x2095: "[?]" -0x2096: "[?]" -0x2097: "[?]" -0x2098: "[?]" -0x2099: "[?]" -0x209a: "[?]" -0x209b: "[?]" -0x209c: "[?]" -0x209d: "[?]" -0x209e: "[?]" -0x209f: "[?]" -0x20a0: "ECU" -0x20a1: "CL" -0x20a2: "Cr" -0x20a3: "FF" -0x20a4: "L" -0x20a5: "mil" -0x20a6: "N" -0x20a7: "Pts" -0x20a8: "Rs" -0x20a9: "W" -0x20aa: "NS" -0x20ab: "D" -0x20ac: "EU" -0x20ad: "K" -0x20ae: "T" -0x20af: "Dr" -0x20b0: "[?]" -0x20b1: "[?]" -0x20b2: "[?]" -0x20b3: "[?]" -0x20b4: "[?]" -0x20b5: "[?]" -0x20b6: "[?]" -0x20b7: "[?]" -0x20b8: "[?]" -0x20b9: "[?]" -0x20ba: "[?]" -0x20bb: "[?]" -0x20bc: "[?]" -0x20bd: "[?]" -0x20be: "[?]" -0x20bf: "[?]" -0x20c0: "[?]" -0x20c1: "[?]" -0x20c2: "[?]" -0x20c3: "[?]" -0x20c4: "[?]" -0x20c5: "[?]" -0x20c6: "[?]" -0x20c7: "[?]" -0x20c8: "[?]" -0x20c9: "[?]" -0x20ca: "[?]" -0x20cb: "[?]" -0x20cc: "[?]" -0x20cd: "[?]" -0x20ce: "[?]" -0x20cf: "[?]" -0x20d0: "" -0x20d1: "" -0x20d2: "" -0x20d3: "" -0x20d4: "" -0x20d5: "" -0x20d6: "" -0x20d7: "" -0x20d8: "" -0x20d9: "" -0x20da: "" -0x20db: "" -0x20dc: "" -0x20dd: "" -0x20de: "" -0x20df: "" -0x20e0: "" -0x20e1: "" -0x20e2: "" -0x20e3: "" -0x20e4: "[?]" -0x20e5: "[?]" -0x20e6: "[?]" -0x20e7: "[?]" -0x20e8: "[?]" -0x20e9: "[?]" -0x20ea: "[?]" -0x20eb: "[?]" -0x20ec: "[?]" -0x20ed: "[?]" -0x20ee: "[?]" -0x20ef: "[?]" -0x20f0: "[?]" -0x20f1: "[?]" -0x20f2: "[?]" -0x20f3: "[?]" -0x20f4: "[?]" -0x20f5: "[?]" -0x20f6: "[?]" -0x20f7: "[?]" -0x20f8: "[?]" -0x20f9: "[?]" -0x20fa: "[?]" -0x20fb: "[?]" -0x20fc: "[?]" -0x20fd: "[?]" -0x20fe: "[?]" -/* x021 */ -0x2100: "" -0x2101: "" -0x2102: "" -0x2103: "" -0x2104: "" -0x2105: "" -0x2106: "" -0x2107: "" -0x2108: "" -0x2109: "" -0x210a: "" -0x210b: "" -0x210c: "" -0x210d: "" -0x210e: "" -0x210f: "" -0x2110: "" -0x2111: "" -0x2112: "" -0x2113: "" -0x2114: "" -0x2115: "" -0x2116: "" -0x2117: "" -0x2118: "" -0x2119: "" -0x211a: "" -0x211b: "" -0x211c: "" -0x211d: "" -0x211e: "" -0x211f: "" -0x2120: "" -0x2121: "" -0x2122: "" -0x2123: "" -0x2124: "" -0x2125: "" -0x2126: "" -0x2127: "" -0x2128: "" -0x2129: "" -0x212a: "K" -0x212b: "A" -0x212c: "" -0x212d: "" -0x212e: "" -0x212f: "" -0x2130: "" -0x2131: "" -0x2132: "F" -0x2133: "" -0x2134: "" -0x2135: "" -0x2136: "" -0x2137: "" -0x2138: "" -0x2139: "" -0x213a: "" -0x213b: "[?]" -0x213c: "[?]" -0x213d: "[?]" -0x213e: "[?]" -0x213f: "[?]" -0x2140: "[?]" -0x2141: "[?]" -0x2142: "[?]" -0x2143: "[?]" -0x2144: "[?]" -0x2145: "[?]" -0x2146: "[?]" -0x2147: "[?]" -0x2148: "[?]" -0x2149: "[?]" -0x214a: "[?]" -0x214b: "[?]" -0x214c: "[?]" -0x214d: "[?]" -0x214e: "F" -0x214f: "[?]" -0x2150: "[?]" -0x2151: "[?]" -0x2152: "[?]" -0x2153: " 1/3 " -0x2154: " 2/3 " -0x2155: " 1/5 " -0x2156: " 2/5 " -0x2157: " 3/5 " -0x2158: " 4/5 " -0x2159: " 1/6 " -0x215a: " 5/6 " -0x215b: " 1/8 " -0x215c: " 3/8 " -0x215d: " 5/8 " -0x215e: " 7/8 " -0x215f: " 1/" -0x2160: "I" -0x2161: "II" -0x2162: "III" -0x2163: "IV" -0x2164: "V" -0x2165: "VI" -0x2166: "VII" -0x2167: "VIII" -0x2168: "IX" -0x2169: "X" -0x216a: "XI" -0x216b: "XII" -0x216c: "L" -0x216d: "C" -0x216e: "D" -0x216f: "M" -0x2170: "i" -0x2171: "ii" -0x2172: "iii" -0x2173: "iv" -0x2174: "v" -0x2175: "vi" -0x2176: "vii" -0x2177: "viii" -0x2178: "ix" -0x2179: "x" -0x217a: "xi" -0x217b: "xii" -0x217c: "l" -0x217d: "c" -0x217e: "d" -0x217f: "m" -0x2180: "(D" -0x2181: "D)" -0x2182: "((|))" -0x2183: ")" -0x2184: "[?]" -0x2185: "[?]" -0x2186: "[?]" -0x2187: "[?]" -0x2188: "[?]" -0x2189: "[?]" -0x218a: "[?]" -0x218b: "[?]" -0x218c: "[?]" -0x218d: "[?]" -0x218e: "[?]" -0x218f: "[?]" -0x2190: "-" -0x2191: "|" -0x2192: "-" -0x2193: "|" -0x2194: "-" -0x2195: "|" -0x2196: "\\" -0x2197: "/" -0x2198: "\\" -0x2199: "/" -0x219a: "-" -0x219b: "-" -0x219c: "~" -0x219d: "~" -0x219e: "-" -0x219f: "|" -0x21a0: "-" -0x21a1: "|" -0x21a2: "-" -0x21a3: "-" -0x21a4: "-" -0x21a5: "|" -0x21a6: "-" -0x21a7: "|" -0x21a8: "|" -0x21a9: "-" -0x21aa: "-" -0x21ab: "-" -0x21ac: "-" -0x21ad: "-" -0x21ae: "-" -0x21af: "|" -0x21b0: "|" -0x21b1: "|" -0x21b2: "|" -0x21b3: "|" -0x21b4: "|" -0x21b5: "|" -0x21b6: "^" -0x21b7: "V" -0x21b8: "\\" -0x21b9: "=" -0x21ba: "V" -0x21bb: "^" -0x21bc: "-" -0x21bd: "-" -0x21be: "|" -0x21bf: "|" -0x21c0: "-" -0x21c1: "-" -0x21c2: "|" -0x21c3: "|" -0x21c4: "=" -0x21c5: "|" -0x21c6: "=" -0x21c7: "=" -0x21c8: "|" -0x21c9: "=" -0x21ca: "|" -0x21cb: "=" -0x21cc: "=" -0x21cd: "=" -0x21ce: "=" -0x21cf: "=" -0x21d0: "=" -0x21d1: "|" -0x21d2: "=" -0x21d3: "|" -0x21d4: "=" -0x21d5: "|" -0x21d6: "\\" -0x21d7: "/" -0x21d8: "\\" -0x21d9: "/" -0x21da: "=" -0x21db: "=" -0x21dc: "~" -0x21dd: "~" -0x21de: "|" -0x21df: "|" -0x21e0: "-" -0x21e1: "|" -0x21e2: "-" -0x21e3: "|" -0x21e4: "-" -0x21e5: "-" -0x21e6: "-" -0x21e7: "|" -0x21e8: "-" -0x21e9: "|" -0x21ea: "|" -0x21eb: "|" -0x21ec: "|" -0x21ed: "|" -0x21ee: "|" -0x21ef: "|" -0x21f0: "-" -0x21f1: "\\" -0x21f2: "\\" -0x21f3: "|" -0x21f4: "[?]" -0x21f5: "[?]" -0x21f6: "[?]" -0x21f7: "[?]" -0x21f8: "[?]" -0x21f9: "[?]" -0x21fa: "[?]" -0x21fb: "[?]" -0x21fc: "[?]" -0x21fd: "[?]" -0x21fe: "[?]" -/* x022 */ -0x2200: "[?]" -0x2201: "[?]" -0x2202: "[?]" -0x2203: "[?]" -0x2204: "[?]" -0x2205: "[?]" -0x2206: "[?]" -0x2207: "[?]" -0x2208: "[?]" -0x2209: "[?]" -0x220a: "[?]" -0x220b: "[?]" -0x220c: "[?]" -0x220d: "[?]" -0x220e: "[?]" -0x220f: "[?]" -0x2210: "[?]" -0x2211: "[?]" -0x2212: "[?]" -0x2213: "[?]" -0x2214: "[?]" -0x2215: "[?]" -0x2216: "[?]" -0x2217: "[?]" -0x2218: "[?]" -0x2219: "[?]" -0x221a: "[?]" -0x221b: "[?]" -0x221c: "[?]" -0x221d: "[?]" -0x221e: "[?]" -0x221f: "[?]" -0x2220: "[?]" -0x2221: "[?]" -0x2222: "[?]" -0x2223: "[?]" -0x2224: "[?]" -0x2225: "[?]" -0x2226: "[?]" -0x2227: "[?]" -0x2228: "[?]" -0x2229: "[?]" -0x222a: "[?]" -0x222b: "[?]" -0x222c: "[?]" -0x222d: "[?]" -0x222e: "[?]" -0x222f: "[?]" -0x2230: "[?]" -0x2231: "[?]" -0x2232: "[?]" -0x2233: "[?]" -0x2234: "[?]" -0x2235: "[?]" -0x2236: "[?]" -0x2237: "[?]" -0x2238: "[?]" -0x2239: "[?]" -0x223a: "[?]" -0x223b: "[?]" -0x223c: "[?]" -0x223d: "[?]" -0x223e: "[?]" -0x223f: "[?]" -0x2240: "[?]" -0x2241: "[?]" -0x2242: "[?]" -0x2243: "[?]" -0x2244: "[?]" -0x2245: "[?]" -0x2246: "[?]" -0x2247: "[?]" -0x2248: "[?]" -0x2249: "[?]" -0x224a: "[?]" -0x224b: "[?]" -0x224c: "[?]" -0x224d: "[?]" -0x224e: "[?]" -0x224f: "[?]" -0x2250: "[?]" -0x2251: "[?]" -0x2252: "[?]" -0x2253: "[?]" -0x2254: "[?]" -0x2255: "[?]" -0x2256: "[?]" -0x2257: "[?]" -0x2258: "[?]" -0x2259: "[?]" -0x225a: "[?]" -0x225b: "[?]" -0x225c: "[?]" -0x225d: "[?]" -0x225e: "[?]" -0x225f: "[?]" -0x2260: "[?]" -0x2261: "[?]" -0x2262: "[?]" -0x2263: "[?]" -0x2264: "[?]" -0x2265: "[?]" -0x2266: "[?]" -0x2267: "[?]" -0x2268: "[?]" -0x2269: "[?]" -0x226a: "[?]" -0x226b: "[?]" -0x226c: "[?]" -0x226d: "[?]" -0x226e: "[?]" -0x226f: "[?]" -0x2270: "[?]" -0x2271: "[?]" -0x2272: "[?]" -0x2273: "[?]" -0x2274: "[?]" -0x2275: "[?]" -0x2276: "[?]" -0x2277: "[?]" -0x2278: "[?]" -0x2279: "[?]" -0x227a: "[?]" -0x227b: "[?]" -0x227c: "[?]" -0x227d: "[?]" -0x227e: "[?]" -0x227f: "[?]" -0x2280: "[?]" -0x2281: "[?]" -0x2282: "[?]" -0x2283: "[?]" -0x2284: "[?]" -0x2285: "[?]" -0x2286: "[?]" -0x2287: "[?]" -0x2288: "[?]" -0x2289: "[?]" -0x228a: "[?]" -0x228b: "[?]" -0x228c: "[?]" -0x228d: "[?]" -0x228e: "[?]" -0x228f: "[?]" -0x2290: "[?]" -0x2291: "[?]" -0x2292: "[?]" -0x2293: "[?]" -0x2294: "[?]" -0x2295: "[?]" -0x2296: "[?]" -0x2297: "[?]" -0x2298: "[?]" -0x2299: "[?]" -0x229a: "[?]" -0x229b: "[?]" -0x229c: "[?]" -0x229d: "[?]" -0x229e: "[?]" -0x229f: "[?]" -0x22a0: "[?]" -0x22a1: "[?]" -0x22a2: "[?]" -0x22a3: "[?]" -0x22a4: "[?]" -0x22a5: "[?]" -0x22a6: "[?]" -0x22a7: "[?]" -0x22a8: "[?]" -0x22a9: "[?]" -0x22aa: "[?]" -0x22ab: "[?]" -0x22ac: "[?]" -0x22ad: "[?]" -0x22ae: "[?]" -0x22af: "[?]" -0x22b0: "[?]" -0x22b1: "[?]" -0x22b2: "[?]" -0x22b3: "[?]" -0x22b4: "[?]" -0x22b5: "[?]" -0x22b6: "[?]" -0x22b7: "[?]" -0x22b8: "[?]" -0x22b9: "[?]" -0x22ba: "[?]" -0x22bb: "[?]" -0x22bc: "[?]" -0x22bd: "[?]" -0x22be: "[?]" -0x22bf: "[?]" -0x22c0: "[?]" -0x22c1: "[?]" -0x22c2: "[?]" -0x22c3: "[?]" -0x22c4: "[?]" -0x22c5: "[?]" -0x22c6: "[?]" -0x22c7: "[?]" -0x22c8: "[?]" -0x22c9: "[?]" -0x22ca: "[?]" -0x22cb: "[?]" -0x22cc: "[?]" -0x22cd: "[?]" -0x22ce: "[?]" -0x22cf: "[?]" -0x22d0: "[?]" -0x22d1: "[?]" -0x22d2: "[?]" -0x22d3: "[?]" -0x22d4: "[?]" -0x22d5: "[?]" -0x22d6: "[?]" -0x22d7: "[?]" -0x22d8: "[?]" -0x22d9: "[?]" -0x22da: "[?]" -0x22db: "[?]" -0x22dc: "[?]" -0x22dd: "[?]" -0x22de: "[?]" -0x22df: "[?]" -0x22e0: "[?]" -0x22e1: "[?]" -0x22e2: "[?]" -0x22e3: "[?]" -0x22e4: "[?]" -0x22e5: "[?]" -0x22e6: "[?]" -0x22e7: "[?]" -0x22e8: "[?]" -0x22e9: "[?]" -0x22ea: "[?]" -0x22eb: "[?]" -0x22ec: "[?]" -0x22ed: "[?]" -0x22ee: "[?]" -0x22ef: "[?]" -0x22f0: "[?]" -0x22f1: "[?]" -0x22f2: "[?]" -0x22f3: "[?]" -0x22f4: "[?]" -0x22f5: "[?]" -0x22f6: "[?]" -0x22f7: "[?]" -0x22f8: "[?]" -0x22f9: "[?]" -0x22fa: "[?]" -0x22fb: "[?]" -0x22fc: "[?]" -0x22fd: "[?]" -0x22fe: "[?]" -/* x023 */ -0x2300: "[?]" -0x2301: "[?]" -0x2302: "[?]" -0x2303: "[?]" -0x2304: "[?]" -0x2305: "[?]" -0x2306: "[?]" -0x2307: "[?]" -0x2308: "[?]" -0x2309: "[?]" -0x230a: "[?]" -0x230b: "[?]" -0x230c: "[?]" -0x230d: "[?]" -0x230e: "[?]" -0x230f: "[?]" -0x2310: "[?]" -0x2311: "[?]" -0x2312: "[?]" -0x2313: "[?]" -0x2314: "[?]" -0x2315: "[?]" -0x2316: "[?]" -0x2317: "[?]" -0x2318: "[?]" -0x2319: "[?]" -0x231a: "[?]" -0x231b: "[?]" -0x231c: "[?]" -0x231d: "[?]" -0x231e: "[?]" -0x231f: "[?]" -0x2320: "[?]" -0x2321: "[?]" -0x2322: "[?]" -0x2323: "[?]" -0x2324: "[?]" -0x2325: "[?]" -0x2326: "[?]" -0x2327: "[?]" -0x2328: "[?]" -0x2329: "[?]" -0x232a: "[?]" -0x232b: "[?]" -0x232c: "[?]" -0x232d: "[?]" -0x232e: "[?]" -0x232f: "[?]" -0x2330: "[?]" -0x2331: "[?]" -0x2332: "[?]" -0x2333: "[?]" -0x2334: "[?]" -0x2335: "[?]" -0x2336: "[?]" -0x2337: "[?]" -0x2338: "[?]" -0x2339: "[?]" -0x233a: "[?]" -0x233b: "[?]" -0x233c: "[?]" -0x233d: "[?]" -0x233e: "[?]" -0x233f: "[?]" -0x2340: "[?]" -0x2341: "[?]" -0x2342: "[?]" -0x2343: "[?]" -0x2344: "[?]" -0x2345: "[?]" -0x2346: "[?]" -0x2347: "[?]" -0x2348: "[?]" -0x2349: "[?]" -0x234a: "[?]" -0x234b: "[?]" -0x234c: "[?]" -0x234d: "[?]" -0x234e: "[?]" -0x234f: "[?]" -0x2350: "[?]" -0x2351: "[?]" -0x2352: "[?]" -0x2353: "[?]" -0x2354: "[?]" -0x2355: "[?]" -0x2356: "[?]" -0x2357: "[?]" -0x2358: "[?]" -0x2359: "[?]" -0x235a: "[?]" -0x235b: "[?]" -0x235c: "[?]" -0x235d: "[?]" -0x235e: "[?]" -0x235f: "[?]" -0x2360: "[?]" -0x2361: "[?]" -0x2362: "[?]" -0x2363: "[?]" -0x2364: "[?]" -0x2365: "[?]" -0x2366: "[?]" -0x2367: "[?]" -0x2368: "[?]" -0x2369: "[?]" -0x236a: "[?]" -0x236b: "[?]" -0x236c: "[?]" -0x236d: "[?]" -0x236e: "[?]" -0x236f: "[?]" -0x2370: "[?]" -0x2371: "[?]" -0x2372: "[?]" -0x2373: "[?]" -0x2374: "[?]" -0x2375: "[?]" -0x2376: "[?]" -0x2377: "[?]" -0x2378: "[?]" -0x2379: "[?]" -0x237a: "[?]" -0x237b: "[?]" -0x237c: "[?]" -0x237d: "[?]" -0x237e: "[?]" -0x237f: "[?]" -0x2380: "[?]" -0x2381: "[?]" -0x2382: "[?]" -0x2383: "[?]" -0x2384: "[?]" -0x2385: "[?]" -0x2386: "[?]" -0x2387: "[?]" -0x2388: "[?]" -0x2389: "[?]" -0x238a: "[?]" -0x238b: "[?]" -0x238c: "[?]" -0x238d: "[?]" -0x238e: "[?]" -0x238f: "[?]" -0x2390: "[?]" -0x2391: "[?]" -0x2392: "[?]" -0x2393: "[?]" -0x2394: "[?]" -0x2395: "[?]" -0x2396: "[?]" -0x2397: "[?]" -0x2398: "[?]" -0x2399: "[?]" -0x239a: "[?]" -0x239b: "[?]" -0x239c: "[?]" -0x239d: "[?]" -0x239e: "[?]" -0x239f: "[?]" -0x23a0: "[?]" -0x23a1: "[?]" -0x23a2: "[?]" -0x23a3: "[?]" -0x23a4: "[?]" -0x23a5: "[?]" -0x23a6: "[?]" -0x23a7: "[?]" -0x23a8: "[?]" -0x23a9: "[?]" -0x23aa: "[?]" -0x23ab: "[?]" -0x23ac: "[?]" -0x23ad: "[?]" -0x23ae: "[?]" -0x23af: "[?]" -0x23b0: "[?]" -0x23b1: "[?]" -0x23b2: "[?]" -0x23b3: "[?]" -0x23b4: "[?]" -0x23b5: "[?]" -0x23b6: "[?]" -0x23b7: "[?]" -0x23b8: "[?]" -0x23b9: "[?]" -0x23ba: "[?]" -0x23bb: "[?]" -0x23bc: "[?]" -0x23bd: "[?]" -0x23be: "[?]" -0x23bf: "[?]" -0x23c0: "[?]" -0x23c1: "[?]" -0x23c2: "[?]" -0x23c3: "[?]" -0x23c4: "[?]" -0x23c5: "[?]" -0x23c6: "[?]" -0x23c7: "[?]" -0x23c8: "[?]" -0x23c9: "[?]" -0x23ca: "[?]" -0x23cb: "[?]" -0x23cc: "[?]" -0x23cd: "[?]" -0x23ce: "[?]" -0x23cf: "[?]" -0x23d0: "[?]" -0x23d1: "[?]" -0x23d2: "[?]" -0x23d3: "[?]" -0x23d4: "[?]" -0x23d5: "[?]" -0x23d6: "[?]" -0x23d7: "[?]" -0x23d8: "[?]" -0x23d9: "[?]" -0x23da: "[?]" -0x23db: "[?]" -0x23dc: "[?]" -0x23dd: "[?]" -0x23de: "[?]" -0x23df: "[?]" -0x23e0: "[?]" -0x23e1: "[?]" -0x23e2: "[?]" -0x23e3: "[?]" -0x23e4: "[?]" -0x23e5: "[?]" -0x23e6: "[?]" -0x23e7: "[?]" -0x23e8: "[?]" -0x23e9: "[?]" -0x23ea: "[?]" -0x23eb: "[?]" -0x23ec: "[?]" -0x23ed: "[?]" -0x23ee: "[?]" -0x23ef: "[?]" -0x23f0: "[?]" -0x23f1: "[?]" -0x23f2: "[?]" -0x23f3: "[?]" -0x23f4: "[?]" -0x23f5: "[?]" -0x23f6: "[?]" -0x23f7: "[?]" -0x23f8: "[?]" -0x23f9: "[?]" -0x23fa: "[?]" -0x23fb: "[?]" -0x23fc: "[?]" -0x23fd: "[?]" -0x23fe: "[?]" -/* x024 */ -0x2400: "" -0x2401: "" -0x2402: "" -0x2403: "" -0x2404: "" -0x2405: "" -0x2406: "" -0x2407: "" -0x2408: "" -0x2409: "" -0x240a: "" -0x240b: "" -0x240c: "" -0x240d: "" -0x240e: "" -0x240f: "" -0x2410: "" -0x2411: "" -0x2412: "" -0x2413: "" -0x2414: "" -0x2415: "" -0x2416: "" -0x2417: "" -0x2418: "" -0x2419: "" -0x241a: "" -0x241b: "" -0x241c: "" -0x241d: "" -0x241e: "" -0x241f: "" -0x2420: "" -0x2421: "" -0x2422: "" -0x2423: "" -0x2424: "" -0x2425: "" -0x2426: "" -0x2427: "[?]" -0x2428: "[?]" -0x2429: "[?]" -0x242a: "[?]" -0x242b: "[?]" -0x242c: "[?]" -0x242d: "[?]" -0x242e: "[?]" -0x242f: "[?]" -0x2430: "[?]" -0x2431: "[?]" -0x2432: "[?]" -0x2433: "[?]" -0x2434: "[?]" -0x2435: "[?]" -0x2436: "[?]" -0x2437: "[?]" -0x2438: "[?]" -0x2439: "[?]" -0x243a: "[?]" -0x243b: "[?]" -0x243c: "[?]" -0x243d: "[?]" -0x243e: "[?]" -0x243f: "[?]" -0x2440: "" -0x2441: "" -0x2442: "" -0x2443: "" -0x2444: "" -0x2445: "" -0x2446: "" -0x2447: "" -0x2448: "" -0x2449: "" -0x244a: "" -0x244b: "[?]" -0x244c: "[?]" -0x244d: "[?]" -0x244e: "[?]" -0x244f: "[?]" -0x2450: "[?]" -0x2451: "[?]" -0x2452: "[?]" -0x2453: "[?]" -0x2454: "[?]" -0x2455: "[?]" -0x2456: "[?]" -0x2457: "[?]" -0x2458: "[?]" -0x2459: "[?]" -0x245a: "[?]" -0x245b: "[?]" -0x245c: "[?]" -0x245d: "[?]" -0x245e: "[?]" -0x245f: "[?]" -0x2460: "" -0x2461: "" -0x2462: "" -0x2463: "" -0x2464: "" -0x2465: "" -0x2466: "" -0x2467: "" -0x2468: "" -0x2469: "" -0x246a: "" -0x246b: "" -0x246c: "" -0x246d: "" -0x246e: "" -0x246f: "" -0x2470: "" -0x2471: "" -0x2472: "" -0x2473: "" -0x2474: "" -0x2475: "" -0x2476: "" -0x2477: "" -0x2478: "" -0x2479: "" -0x247a: "" -0x247b: "" -0x247c: "" -0x247d: "" -0x247e: "" -0x247f: "" -0x2480: "" -0x2481: "" -0x2482: "" -0x2483: "" -0x2484: "" -0x2485: "" -0x2486: "" -0x2487: "" -0x2488: "" -0x2489: "" -0x248a: "" -0x248b: "" -0x248c: "" -0x248d: "" -0x248e: "" -0x248f: "" -0x2490: "" -0x2491: "" -0x2492: "" -0x2493: "" -0x2494: "" -0x2495: "" -0x2496: "" -0x2497: "" -0x2498: "" -0x2499: "" -0x249a: "" -0x249b: "" -0x249c: "" -0x249d: "" -0x249e: "" -0x249f: "" -0x24a0: "" -0x24a1: "" -0x24a2: "" -0x24a3: "" -0x24a4: "" -0x24a5: "" -0x24a6: "" -0x24a7: "" -0x24a8: "" -0x24a9: "" -0x24aa: "" -0x24ab: "" -0x24ac: "" -0x24ad: "" -0x24ae: "" -0x24af: "" -0x24b0: "" -0x24b1: "" -0x24b2: "" -0x24b3: "" -0x24b4: "" -0x24b5: "" -0x24b6: "" -0x24b7: "" -0x24b8: "" -0x24b9: "" -0x24ba: "" -0x24bb: "" -0x24bc: "" -0x24bd: "" -0x24be: "" -0x24bf: "" -0x24c0: "" -0x24c1: "" -0x24c2: "" -0x24c3: "" -0x24c4: "" -0x24c5: "" -0x24c6: "" -0x24c7: "" -0x24c8: "" -0x24c9: "" -0x24ca: "" -0x24cb: "" -0x24cc: "" -0x24cd: "" -0x24ce: "" -0x24cf: "" -0x24d0: "a" -0x24d1: "b" -0x24d2: "c" -0x24d3: "d" -0x24d4: "e" -0x24d5: "f" -0x24d6: "g" -0x24d7: "h" -0x24d8: "i" -0x24d9: "j" -0x24da: "k" -0x24db: "l" -0x24dc: "m" -0x24dd: "n" -0x24de: "o" -0x24df: "p" -0x24e0: "q" -0x24e1: "r" -0x24e2: "s" -0x24e3: "t" -0x24e4: "u" -0x24e5: "v" -0x24e6: "w" -0x24e7: "x" -0x24e8: "y" -0x24e9: "z" -0x24ea: "0" -0x24eb: "[?]" -0x24ec: "[?]" -0x24ed: "[?]" -0x24ee: "[?]" -0x24ef: "[?]" -0x24f0: "[?]" -0x24f1: "[?]" -0x24f2: "[?]" -0x24f3: "[?]" -0x24f4: "[?]" -0x24f5: "[?]" -0x24f6: "[?]" -0x24f7: "[?]" -0x24f8: "[?]" -0x24f9: "[?]" -0x24fa: "[?]" -0x24fb: "[?]" -0x24fc: "[?]" -0x24fd: "[?]" -0x24fe: "[?]" -/* x025 */ -0x2500: "-" -0x2501: "-" -0x2502: "|" -0x2503: "|" -0x2504: "-" -0x2505: "-" -0x2506: "|" -0x2507: "|" -0x2508: "-" -0x2509: "-" -0x250a: "|" -0x250b: "|" -0x250c: "+" -0x250d: "+" -0x250e: "+" -0x250f: "+" -0x2510: "+" -0x2511: "+" -0x2512: "+" -0x2513: "+" -0x2514: "+" -0x2515: "+" -0x2516: "+" -0x2517: "+" -0x2518: "+" -0x2519: "+" -0x251a: "+" -0x251b: "+" -0x251c: "+" -0x251d: "+" -0x251e: "+" -0x251f: "+" -0x2520: "+" -0x2521: "+" -0x2522: "+" -0x2523: "+" -0x2524: "+" -0x2525: "+" -0x2526: "+" -0x2527: "+" -0x2528: "+" -0x2529: "+" -0x252a: "+" -0x252b: "+" -0x252c: "+" -0x252d: "+" -0x252e: "+" -0x252f: "+" -0x2530: "+" -0x2531: "+" -0x2532: "+" -0x2533: "+" -0x2534: "+" -0x2535: "+" -0x2536: "+" -0x2537: "+" -0x2538: "+" -0x2539: "+" -0x253a: "+" -0x253b: "+" -0x253c: "+" -0x253d: "+" -0x253e: "+" -0x253f: "+" -0x2540: "+" -0x2541: "+" -0x2542: "+" -0x2543: "+" -0x2544: "+" -0x2545: "+" -0x2546: "+" -0x2547: "+" -0x2548: "+" -0x2549: "+" -0x254a: "+" -0x254b: "+" -0x254c: "-" -0x254d: "-" -0x254e: "|" -0x254f: "|" -0x2550: "-" -0x2551: "|" -0x2552: "+" -0x2553: "+" -0x2554: "+" -0x2555: "+" -0x2556: "+" -0x2557: "+" -0x2558: "+" -0x2559: "+" -0x255a: "+" -0x255b: "+" -0x255c: "+" -0x255d: "+" -0x255e: "+" -0x255f: "+" -0x2560: "+" -0x2561: "+" -0x2562: "+" -0x2563: "+" -0x2564: "+" -0x2565: "+" -0x2566: "+" -0x2567: "+" -0x2568: "+" -0x2569: "+" -0x256a: "+" -0x256b: "+" -0x256c: "+" -0x256d: "+" -0x256e: "+" -0x256f: "+" -0x2570: "+" -0x2571: "/" -0x2572: "\\" -0x2573: "X" -0x2574: "-" -0x2575: "|" -0x2576: "-" -0x2577: "|" -0x2578: "-" -0x2579: "|" -0x257a: "-" -0x257b: "|" -0x257c: "-" -0x257d: "|" -0x257e: "-" -0x257f: "|" -0x2580: "#" -0x2581: "#" -0x2582: "#" -0x2583: "#" -0x2584: "#" -0x2585: "#" -0x2586: "#" -0x2587: "#" -0x2588: "#" -0x2589: "#" -0x258a: "#" -0x258b: "#" -0x258c: "#" -0x258d: "#" -0x258e: "#" -0x258f: "#" -0x2590: "#" -0x2591: "#" -0x2592: "#" -0x2593: "#" -0x2594: "-" -0x2595: "|" -0x2596: "[?]" -0x2597: "[?]" -0x2598: "[?]" -0x2599: "[?]" -0x259a: "[?]" -0x259b: "[?]" -0x259c: "[?]" -0x259d: "[?]" -0x259e: "[?]" -0x259f: "[?]" -0x25a0: "#" -0x25a1: "#" -0x25a2: "#" -0x25a3: "#" -0x25a4: "#" -0x25a5: "#" -0x25a6: "#" -0x25a7: "#" -0x25a8: "#" -0x25a9: "#" -0x25aa: "#" -0x25ab: "#" -0x25ac: "#" -0x25ad: "#" -0x25ae: "#" -0x25af: "#" -0x25b0: "#" -0x25b1: "#" -0x25b2: "^" -0x25b3: "^" -0x25b4: "^" -0x25b5: "^" -0x25b6: ">" -0x25b7: ">" -0x25b8: ">" -0x25b9: ">" -0x25ba: ">" -0x25bb: ">" -0x25bc: "V" -0x25bd: "V" -0x25be: "V" -0x25bf: "V" -0x25c0: "<" -0x25c1: "<" -0x25c2: "<" -0x25c3: "<" -0x25c4: "<" -0x25c5: "<" -0x25c6: "*" -0x25c7: "*" -0x25c8: "*" -0x25c9: "*" -0x25ca: "*" -0x25cb: "*" -0x25cc: "*" -0x25cd: "*" -0x25ce: "*" -0x25cf: "*" -0x25d0: "*" -0x25d1: "*" -0x25d2: "*" -0x25d3: "*" -0x25d4: "*" -0x25d5: "*" -0x25d6: "*" -0x25d7: "*" -0x25d8: "*" -0x25d9: "*" -0x25da: "*" -0x25db: "*" -0x25dc: "*" -0x25dd: "*" -0x25de: "*" -0x25df: "*" -0x25e0: "*" -0x25e1: "*" -0x25e2: "*" -0x25e3: "*" -0x25e4: "*" -0x25e5: "*" -0x25e6: "*" -0x25e7: "#" -0x25e8: "#" -0x25e9: "#" -0x25ea: "#" -0x25eb: "#" -0x25ec: "^" -0x25ed: "^" -0x25ee: "^" -0x25ef: "O" -0x25f0: "#" -0x25f1: "#" -0x25f2: "#" -0x25f3: "#" -0x25f4: "#" -0x25f5: "#" -0x25f6: "#" -0x25f7: "#" -0x25f8: "[?]" -0x25f9: "[?]" -0x25fa: "[?]" -0x25fb: "[?]" -0x25fc: "[?]" -0x25fd: "[?]" -0x25fe: "[?]" -/* x026 */ -0x2600: "" -0x2601: "" -0x2602: "" -0x2603: "" -0x2604: "" -0x2605: "" -0x2606: "" -0x2607: "" -0x2608: "" -0x2609: "" -0x260a: "" -0x260b: "" -0x260c: "" -0x260d: "" -0x260e: "" -0x260f: "" -0x2610: "" -0x2611: "" -0x2612: "" -0x2613: "" -0x2614: "[?]" -0x2615: "[?]" -0x2616: "[?]" -0x2617: "[?]" -0x2618: "[?]" -0x2619: "" -0x261a: "" -0x261b: "" -0x261c: "" -0x261d: "" -0x261e: "" -0x261f: "" -0x2620: "" -0x2621: "" -0x2622: "" -0x2623: "" -0x2624: "" -0x2625: "" -0x2626: "" -0x2627: "" -0x2628: "" -0x2629: "" -0x262a: "" -0x262b: "" -0x262c: "" -0x262d: "" -0x262e: "" -0x262f: "" -0x2630: "" -0x2631: "" -0x2632: "" -0x2633: "" -0x2634: "" -0x2635: "" -0x2636: "" -0x2637: "" -0x2638: "" -0x2639: "" -0x263a: "" -0x263b: "" -0x263c: "" -0x263d: "" -0x263e: "" -0x263f: "" -0x2640: "" -0x2641: "" -0x2642: "" -0x2643: "" -0x2644: "" -0x2645: "" -0x2646: "" -0x2647: "" -0x2648: "" -0x2649: "" -0x264a: "" -0x264b: "" -0x264c: "" -0x264d: "" -0x264e: "" -0x264f: "" -0x2650: "" -0x2651: "" -0x2652: "" -0x2653: "" -0x2654: "" -0x2655: "" -0x2656: "" -0x2657: "" -0x2658: "" -0x2659: "" -0x265a: "" -0x265b: "" -0x265c: "" -0x265d: "" -0x265e: "" -0x265f: "" -0x2660: "" -0x2661: "" -0x2662: "" -0x2663: "" -0x2664: "" -0x2665: "" -0x2666: "" -0x2667: "" -0x2668: "" -0x2669: "" -0x266a: "" -0x266b: "" -0x266c: "" -0x266d: "" -0x266e: "" -0x266f: "" -0x2670: "" -0x2671: "" -0x2672: "[?]" -0x2673: "[?]" -0x2674: "[?]" -0x2675: "[?]" -0x2676: "[?]" -0x2677: "[?]" -0x2678: "[?]" -0x2679: "[?]" -0x267a: "[?]" -0x267b: "[?]" -0x267c: "[?]" -0x267d: "[?]" -0x267e: "[?]" -0x267f: "[?]" -0x2680: "[?]" -0x2681: "[?]" -0x2682: "[?]" -0x2683: "[?]" -0x2684: "[?]" -0x2685: "[?]" -0x2686: "[?]" -0x2687: "[?]" -0x2688: "[?]" -0x2689: "[?]" -0x268a: "[?]" -0x268b: "[?]" -0x268c: "[?]" -0x268d: "[?]" -0x268e: "[?]" -0x268f: "[?]" -0x2690: "[?]" -0x2691: "[?]" -0x2692: "[?]" -0x2693: "[?]" -0x2694: "[?]" -0x2695: "[?]" -0x2696: "[?]" -0x2697: "[?]" -0x2698: "[?]" -0x2699: "[?]" -0x269a: "[?]" -0x269b: "[?]" -0x269c: "[?]" -0x269d: "[?]" -0x269e: "[?]" -0x269f: "[?]" -0x26a0: "[?]" -0x26a1: "[?]" -0x26a2: "[?]" -0x26a3: "[?]" -0x26a4: "[?]" -0x26a5: "[?]" -0x26a6: "[?]" -0x26a7: "[?]" -0x26a8: "[?]" -0x26a9: "[?]" -0x26aa: "[?]" -0x26ab: "[?]" -0x26ac: "[?]" -0x26ad: "[?]" -0x26ae: "[?]" -0x26af: "[?]" -0x26b0: "[?]" -0x26b1: "[?]" -0x26b2: "[?]" -0x26b3: "[?]" -0x26b4: "[?]" -0x26b5: "[?]" -0x26b6: "[?]" -0x26b7: "[?]" -0x26b8: "[?]" -0x26b9: "[?]" -0x26ba: "[?]" -0x26bb: "[?]" -0x26bc: "[?]" -0x26bd: "[?]" -0x26be: "[?]" -0x26bf: "[?]" -0x26c0: "[?]" -0x26c1: "[?]" -0x26c2: "[?]" -0x26c3: "[?]" -0x26c4: "[?]" -0x26c5: "[?]" -0x26c6: "[?]" -0x26c7: "[?]" -0x26c8: "[?]" -0x26c9: "[?]" -0x26ca: "[?]" -0x26cb: "[?]" -0x26cc: "[?]" -0x26cd: "[?]" -0x26ce: "[?]" -0x26cf: "[?]" -0x26d0: "[?]" -0x26d1: "[?]" -0x26d2: "[?]" -0x26d3: "[?]" -0x26d4: "[?]" -0x26d5: "[?]" -0x26d6: "[?]" -0x26d7: "[?]" -0x26d8: "[?]" -0x26d9: "[?]" -0x26da: "[?]" -0x26db: "[?]" -0x26dc: "[?]" -0x26dd: "[?]" -0x26de: "[?]" -0x26df: "[?]" -0x26e0: "[?]" -0x26e1: "[?]" -0x26e2: "[?]" -0x26e3: "[?]" -0x26e4: "[?]" -0x26e5: "[?]" -0x26e6: "[?]" -0x26e7: "[?]" -0x26e8: "[?]" -0x26e9: "[?]" -0x26ea: "[?]" -0x26eb: "[?]" -0x26ec: "[?]" -0x26ed: "[?]" -0x26ee: "[?]" -0x26ef: "[?]" -0x26f0: "[?]" -0x26f1: "[?]" -0x26f2: "[?]" -0x26f3: "[?]" -0x26f4: "[?]" -0x26f5: "[?]" -0x26f6: "[?]" -0x26f7: "[?]" -0x26f8: "[?]" -0x26f9: "[?]" -0x26fa: "[?]" -0x26fb: "[?]" -0x26fc: "[?]" -0x26fd: "[?]" -0x26fe: "[?]" -/* x027 */ -0x2700: "[?]" -0x2701: "" -0x2702: "" -0x2703: "" -0x2704: "" -0x2705: "" -0x2706: "" -0x2707: "" -0x2708: "" -0x2709: "" -0x270a: "" -0x270b: "" -0x270c: "" -0x270d: "" -0x270e: "" -0x270f: "" -0x2710: "" -0x2711: "" -0x2712: "" -0x2713: "" -0x2714: "" -0x2715: "" -0x2716: "" -0x2717: "" -0x2718: "" -0x2719: "" -0x271a: "" -0x271b: "" -0x271c: "" -0x271d: "" -0x271e: "" -0x271f: "" -0x2720: "" -0x2721: "" -0x2722: "" -0x2723: "" -0x2724: "" -0x2725: "" -0x2726: "" -0x2727: "" -0x2728: "" -0x2729: "" -0x272a: "" -0x272b: "" -0x272c: "" -0x272d: "" -0x272e: "" -0x272f: "" -0x2730: "" -0x2731: "" -0x2732: "" -0x2733: "" -0x2734: "" -0x2735: "" -0x2736: "" -0x2737: "" -0x2738: "" -0x2739: "" -0x273a: "" -0x273b: "" -0x273c: "" -0x273d: "" -0x273e: "" -0x273f: "" -0x2740: "" -0x2741: "" -0x2742: "" -0x2743: "" -0x2744: "" -0x2745: "" -0x2746: "" -0x2747: "" -0x2748: "" -0x2749: "" -0x274a: "" -0x274b: "" -0x274c: "" -0x274d: "" -0x274e: "" -0x274f: "" -0x2750: "" -0x2751: "" -0x2752: "" -0x2753: "" -0x2754: "" -0x2755: "" -0x2756: "" -0x2757: "" -0x2758: "" -0x2759: "" -0x275a: "" -0x275b: "" -0x275c: "" -0x275d: "" -0x275e: "" -0x275f: "[?]" -0x2760: "[?]" -0x2761: "" -0x2762: "" -0x2763: "" -0x2764: "" -0x2765: "" -0x2766: "" -0x2767: "" -0x2768: "" -0x2769: "" -0x276a: "" -0x276b: "" -0x276c: "" -0x276d: "" -0x276e: "" -0x276f: "" -0x2770: "" -0x2771: "" -0x2772: "" -0x2773: "" -0x2774: "" -0x2775: "" -0x2776: "" -0x2777: "" -0x2778: "" -0x2779: "" -0x277a: "" -0x277b: "" -0x277c: "" -0x277d: "" -0x277e: "" -0x277f: "" -0x2780: "" -0x2781: "" -0x2782: "" -0x2783: "" -0x2784: "" -0x2785: "" -0x2786: "" -0x2787: "" -0x2788: "" -0x2789: "" -0x278a: "" -0x278b: "" -0x278c: "" -0x278d: "" -0x278e: "" -0x278f: "" -0x2790: "" -0x2791: "" -0x2792: "" -0x2793: "" -0x2794: "" -0x2795: "" -0x2796: "" -0x2797: "" -0x2798: "" -0x2799: "" -0x279a: "" -0x279b: "" -0x279c: "" -0x279d: "" -0x279e: "" -0x279f: "" -0x27a0: "" -0x27a1: "" -0x27a2: "" -0x27a3: "" -0x27a4: "" -0x27a5: "" -0x27a6: "" -0x27a7: "" -0x27a8: "" -0x27a9: "" -0x27aa: "" -0x27ab: "" -0x27ac: "" -0x27ad: "" -0x27ae: "" -0x27af: "" -0x27b0: "[?]" -0x27b1: "" -0x27b2: "" -0x27b3: "" -0x27b4: "" -0x27b5: "" -0x27b6: "" -0x27b7: "" -0x27b8: "" -0x27b9: "" -0x27ba: "" -0x27bb: "" -0x27bc: "" -0x27bd: "" -0x27be: "" -0x27bf: "[?]" -0x27c0: "[?]" -0x27c1: "[?]" -0x27c2: "[?]" -0x27c3: "[?]" -0x27c4: "[?]" -0x27c5: "[?]" -0x27c6: "[?]" -0x27c7: "[?]" -0x27c8: "[?]" -0x27c9: "[?]" -0x27ca: "[?]" -0x27cb: "[?]" -0x27cc: "[?]" -0x27cd: "[?]" -0x27ce: "[?]" -0x27cf: "[?]" -0x27d0: "[?]" -0x27d1: "[?]" -0x27d2: "[?]" -0x27d3: "[?]" -0x27d4: "[?]" -0x27d5: "[?]" -0x27d6: "[?]" -0x27d7: "[?]" -0x27d8: "[?]" -0x27d9: "[?]" -0x27da: "[?]" -0x27db: "[?]" -0x27dc: "[?]" -0x27dd: "[?]" -0x27de: "[?]" -0x27df: "[?]" -0x27e0: "[?]" -0x27e1: "[?]" -0x27e2: "[?]" -0x27e3: "[?]" -0x27e4: "[?]" -0x27e5: "[?]" -0x27e6: "[?]" -0x27e7: "[?]" -0x27e8: "[?]" -0x27e9: "[?]" -0x27ea: "[?]" -0x27eb: "[?]" -0x27ec: "[?]" -0x27ed: "[?]" -0x27ee: "[?]" -0x27ef: "[?]" -0x27f0: "[?]" -0x27f1: "[?]" -0x27f2: "[?]" -0x27f3: "[?]" -0x27f4: "[?]" -0x27f5: "[?]" -0x27f6: "[?]" -0x27f7: "[?]" -0x27f8: "[?]" -0x27f9: "[?]" -0x27fa: "[?]" -0x27fb: "[?]" -0x27fc: "[?]" -0x27fd: "[?]" -0x27fe: "[?]" -/* x028 */ -0x2800: " " -0x2801: "a" -0x2802: "1" -0x2803: "b" -0x2804: "'" -0x2805: "k" -0x2806: "2" -0x2807: "l" -0x2808: "@" -0x2809: "c" -0x280a: "i" -0x280b: "f" -0x280c: "/" -0x280d: "m" -0x280e: "s" -0x280f: "p" -0x2810: "\"" -0x2811: "e" -0x2812: "3" -0x2813: "h" -0x2814: "9" -0x2815: "o" -0x2816: "6" -0x2817: "r" -0x2818: "^" -0x2819: "d" -0x281a: "j" -0x281b: "g" -0x281c: ">" -0x281d: "n" -0x281e: "t" -0x281f: "q" -0x2820: "," -0x2821: "*" -0x2822: "5" -0x2823: "<" -0x2824: "-" -0x2825: "u" -0x2826: "8" -0x2827: "v" -0x2828: "." -0x2829: "%" -0x282a: "[" -0x282b: "$" -0x282c: "+" -0x282d: "x" -0x282e: "!" -0x282f: "&" -0x2830: ";" -0x2831: ":" -0x2832: "4" -0x2833: "\\" -0x2834: "0" -0x2835: "z" -0x2836: "7" -0x2837: "(" -0x2838: "_" -0x2839: "?" -0x283a: "w" -0x283b: "]" -0x283c: "#" -0x283d: "y" -0x283e: ")" -0x283f: "=" -0x2840: "[d7]" -0x2841: "[d17]" -0x2842: "[d27]" -0x2843: "[d127]" -0x2844: "[d37]" -0x2845: "[d137]" -0x2846: "[d237]" -0x2847: "[d1237]" -0x2848: "[d47]" -0x2849: "[d147]" -0x284a: "[d247]" -0x284b: "[d1247]" -0x284c: "[d347]" -0x284d: "[d1347]" -0x284e: "[d2347]" -0x284f: "[d12347]" -0x2850: "[d57]" -0x2851: "[d157]" -0x2852: "[d257]" -0x2853: "[d1257]" -0x2854: "[d357]" -0x2855: "[d1357]" -0x2856: "[d2357]" -0x2857: "[d12357]" -0x2858: "[d457]" -0x2859: "[d1457]" -0x285a: "[d2457]" -0x285b: "[d12457]" -0x285c: "[d3457]" -0x285d: "[d13457]" -0x285e: "[d23457]" -0x285f: "[d123457]" -0x2860: "[d67]" -0x2861: "[d167]" -0x2862: "[d267]" -0x2863: "[d1267]" -0x2864: "[d367]" -0x2865: "[d1367]" -0x2866: "[d2367]" -0x2867: "[d12367]" -0x2868: "[d467]" -0x2869: "[d1467]" -0x286a: "[d2467]" -0x286b: "[d12467]" -0x286c: "[d3467]" -0x286d: "[d13467]" -0x286e: "[d23467]" -0x286f: "[d123467]" -0x2870: "[d567]" -0x2871: "[d1567]" -0x2872: "[d2567]" -0x2873: "[d12567]" -0x2874: "[d3567]" -0x2875: "[d13567]" -0x2876: "[d23567]" -0x2877: "[d123567]" -0x2878: "[d4567]" -0x2879: "[d14567]" -0x287a: "[d24567]" -0x287b: "[d124567]" -0x287c: "[d34567]" -0x287d: "[d134567]" -0x287e: "[d234567]" -0x287f: "[d1234567]" -0x2880: "[d8]" -0x2881: "[d18]" -0x2882: "[d28]" -0x2883: "[d128]" -0x2884: "[d38]" -0x2885: "[d138]" -0x2886: "[d238]" -0x2887: "[d1238]" -0x2888: "[d48]" -0x2889: "[d148]" -0x288a: "[d248]" -0x288b: "[d1248]" -0x288c: "[d348]" -0x288d: "[d1348]" -0x288e: "[d2348]" -0x288f: "[d12348]" -0x2890: "[d58]" -0x2891: "[d158]" -0x2892: "[d258]" -0x2893: "[d1258]" -0x2894: "[d358]" -0x2895: "[d1358]" -0x2896: "[d2358]" -0x2897: "[d12358]" -0x2898: "[d458]" -0x2899: "[d1458]" -0x289a: "[d2458]" -0x289b: "[d12458]" -0x289c: "[d3458]" -0x289d: "[d13458]" -0x289e: "[d23458]" -0x289f: "[d123458]" -0x28a0: "[d68]" -0x28a1: "[d168]" -0x28a2: "[d268]" -0x28a3: "[d1268]" -0x28a4: "[d368]" -0x28a5: "[d1368]" -0x28a6: "[d2368]" -0x28a7: "[d12368]" -0x28a8: "[d468]" -0x28a9: "[d1468]" -0x28aa: "[d2468]" -0x28ab: "[d12468]" -0x28ac: "[d3468]" -0x28ad: "[d13468]" -0x28ae: "[d23468]" -0x28af: "[d123468]" -0x28b0: "[d568]" -0x28b1: "[d1568]" -0x28b2: "[d2568]" -0x28b3: "[d12568]" -0x28b4: "[d3568]" -0x28b5: "[d13568]" -0x28b6: "[d23568]" -0x28b7: "[d123568]" -0x28b8: "[d4568]" -0x28b9: "[d14568]" -0x28ba: "[d24568]" -0x28bb: "[d124568]" -0x28bc: "[d34568]" -0x28bd: "[d134568]" -0x28be: "[d234568]" -0x28bf: "[d1234568]" -0x28c0: "[d78]" -0x28c1: "[d178]" -0x28c2: "[d278]" -0x28c3: "[d1278]" -0x28c4: "[d378]" -0x28c5: "[d1378]" -0x28c6: "[d2378]" -0x28c7: "[d12378]" -0x28c8: "[d478]" -0x28c9: "[d1478]" -0x28ca: "[d2478]" -0x28cb: "[d12478]" -0x28cc: "[d3478]" -0x28cd: "[d13478]" -0x28ce: "[d23478]" -0x28cf: "[d123478]" -0x28d0: "[d578]" -0x28d1: "[d1578]" -0x28d2: "[d2578]" -0x28d3: "[d12578]" -0x28d4: "[d3578]" -0x28d5: "[d13578]" -0x28d6: "[d23578]" -0x28d7: "[d123578]" -0x28d8: "[d4578]" -0x28d9: "[d14578]" -0x28da: "[d24578]" -0x28db: "[d124578]" -0x28dc: "[d34578]" -0x28dd: "[d134578]" -0x28de: "[d234578]" -0x28df: "[d1234578]" -0x28e0: "[d678]" -0x28e1: "[d1678]" -0x28e2: "[d2678]" -0x28e3: "[d12678]" -0x28e4: "[d3678]" -0x28e5: "[d13678]" -0x28e6: "[d23678]" -0x28e7: "[d123678]" -0x28e8: "[d4678]" -0x28e9: "[d14678]" -0x28ea: "[d24678]" -0x28eb: "[d124678]" -0x28ec: "[d34678]" -0x28ed: "[d134678]" -0x28ee: "[d234678]" -0x28ef: "[d1234678]" -0x28f0: "[d5678]" -0x28f1: "[d15678]" -0x28f2: "[d25678]" -0x28f3: "[d125678]" -0x28f4: "[d35678]" -0x28f5: "[d135678]" -0x28f6: "[d235678]" -0x28f7: "[d1235678]" -0x28f8: "[d45678]" -0x28f9: "[d145678]" -0x28fa: "[d245678]" -0x28fb: "[d1245678]" -0x28fc: "[d345678]" -0x28fd: "[d1345678]" -0x28fe: "[d2345678]" -0x28ff: "[d12345678]" -/* x02c */ -0x2c00: "" -0x2c01: "" -0x2c02: "" -0x2c03: "" -0x2c04: "" -0x2c05: "" -0x2c06: "" -0x2c07: "" -0x2c08: "" -0x2c09: "" -0x2c0a: "" -0x2c0b: "" -0x2c0c: "" -0x2c0d: "" -0x2c0e: "" -0x2c0f: "" -0x2c10: "" -0x2c11: "" -0x2c12: "" -0x2c13: "" -0x2c14: "" -0x2c15: "" -0x2c16: "" -0x2c17: "" -0x2c18: "" -0x2c19: "" -0x2c1a: "" -0x2c1b: "" -0x2c1c: "" -0x2c1d: "" -0x2c1e: "" -0x2c1f: "" -0x2c20: "" -0x2c21: "" -0x2c22: "" -0x2c23: "" -0x2c24: "" -0x2c25: "" -0x2c26: "" -0x2c27: "" -0x2c28: "" -0x2c29: "" -0x2c2a: "" -0x2c2b: "" -0x2c2c: "" -0x2c2d: "" -0x2c2e: "" -0x2c2f: "" -0x2c30: "" -0x2c31: "" -0x2c32: "" -0x2c33: "" -0x2c34: "" -0x2c35: "" -0x2c36: "" -0x2c37: "" -0x2c38: "" -0x2c39: "" -0x2c3a: "" -0x2c3b: "" -0x2c3c: "" -0x2c3d: "" -0x2c3e: "" -0x2c3f: "" -0x2c40: "" -0x2c41: "" -0x2c42: "" -0x2c43: "" -0x2c44: "" -0x2c45: "" -0x2c46: "" -0x2c47: "" -0x2c48: "" -0x2c49: "" -0x2c4a: "" -0x2c4b: "" -0x2c4c: "" -0x2c4d: "" -0x2c4e: "" -0x2c4f: "" -0x2c50: "" -0x2c51: "" -0x2c52: "" -0x2c53: "" -0x2c54: "" -0x2c55: "" -0x2c56: "" -0x2c57: "" -0x2c58: "" -0x2c59: "" -0x2c5a: "" -0x2c5b: "" -0x2c5c: "" -0x2c5d: "" -0x2c5e: "" -0x2c5f: "" -0x2c60: "L" -0x2c61: "l" -0x2c62: "L" -0x2c63: "P" -0x2c64: "R" -0x2c65: "a" -0x2c66: "t" -0x2c67: "H" -0x2c68: "h" -0x2c69: "K" -0x2c6a: "k" -0x2c6b: "Z" -0x2c6c: "z" -0x2c6d: "" -0x2c6e: "M" -0x2c6f: "A" -0x2c70: "" -0x2c71: "" -0x2c72: "" -0x2c73: "" -0x2c74: "" -0x2c75: "" -0x2c76: "" -0x2c77: "" -0x2c78: "" -0x2c79: "" -0x2c7a: "" -0x2c7b: "" -0x2c7c: "" -0x2c7d: "" -0x2c7e: "" -0x2c7f: "" -0x2c80: "" -0x2c81: "" -0x2c82: "" -0x2c83: "" -0x2c84: "" -0x2c85: "" -0x2c86: "" -0x2c87: "" -0x2c88: "" -0x2c89: "" -0x2c8a: "" -0x2c8b: "" -0x2c8c: "" -0x2c8d: "" -0x2c8e: "" -0x2c8f: "" -0x2c90: "" -0x2c91: "" -0x2c92: "" -0x2c93: "" -0x2c94: "" -0x2c95: "" -0x2c96: "" -0x2c97: "" -0x2c98: "" -0x2c99: "" -0x2c9a: "" -0x2c9b: "" -0x2c9c: "" -0x2c9d: "" -0x2c9e: "" -0x2c9f: "" -0x2ca0: "" -0x2ca1: "" -0x2ca2: "" -0x2ca3: "" -0x2ca4: "" -0x2ca5: "" -0x2ca6: "" -0x2ca7: "" -0x2ca8: "" -0x2ca9: "" -0x2caa: "" -0x2cab: "" -0x2cac: "" -0x2cad: "" -0x2cae: "" -0x2caf: "" -0x2cb0: "" -0x2cb1: "" -0x2cb2: "" -0x2cb3: "" -0x2cb4: "" -0x2cb5: "" -0x2cb6: "" -0x2cb7: "" -0x2cb8: "" -0x2cb9: "" -0x2cba: "" -0x2cbb: "" -0x2cbc: "" -0x2cbd: "" -0x2cbe: "" -0x2cbf: "" -0x2cc0: "" -0x2cc1: "" -0x2cc2: "" -0x2cc3: "" -0x2cc4: "" -0x2cc5: "" -0x2cc6: "" -0x2cc7: "" -0x2cc8: "" -0x2cc9: "" -0x2cca: "" -0x2ccb: "" -0x2ccc: "" -0x2ccd: "" -0x2cce: "" -0x2ccf: "" -0x2cd0: "" -0x2cd1: "" -0x2cd2: "" -0x2cd3: "" -0x2cd4: "" -0x2cd5: "" -0x2cd6: "" -0x2cd7: "" -0x2cd8: "" -0x2cd9: "" -0x2cda: "" -0x2cdb: "" -0x2cdc: "" -0x2cdd: "" -0x2cde: "" -0x2cdf: "" -0x2ce0: "" -0x2ce1: "" -0x2ce2: "" -0x2ce3: "" -0x2ce4: "" -0x2ce5: "" -0x2ce6: "" -0x2ce7: "" -0x2ce8: "" -0x2ce9: "" -0x2cea: "" -0x2ceb: "" -0x2cec: "" -0x2ced: "" -0x2cee: "" -0x2cef: "" -0x2cf0: "" -0x2cf1: "" -0x2cf2: "" -0x2cf3: "" -0x2cf4: "" -0x2cf5: "" -0x2cf6: "" -0x2cf7: "" -0x2cf8: "" -0x2cf9: "" -0x2cfa: "" -0x2cfb: "" -0x2cfc: "" -0x2cfd: "" -0x2cfe: "" -/* x02e */ -0x2e00: "[?]" -0x2e01: "[?]" -0x2e02: "[?]" -0x2e03: "[?]" -0x2e04: "[?]" -0x2e05: "[?]" -0x2e06: "[?]" -0x2e07: "[?]" -0x2e08: "[?]" -0x2e09: "[?]" -0x2e0a: "[?]" -0x2e0b: "[?]" -0x2e0c: "[?]" -0x2e0d: "[?]" -0x2e0e: "[?]" -0x2e0f: "[?]" -0x2e10: "[?]" -0x2e11: "[?]" -0x2e12: "[?]" -0x2e13: "[?]" -0x2e14: "[?]" -0x2e15: "[?]" -0x2e16: "[?]" -0x2e17: "[?]" -0x2e18: "[?]" -0x2e19: "[?]" -0x2e1a: "[?]" -0x2e1b: "[?]" -0x2e1c: "[?]" -0x2e1d: "[?]" -0x2e1e: "[?]" -0x2e1f: "[?]" -0x2e20: "[?]" -0x2e21: "[?]" -0x2e22: "[?]" -0x2e23: "[?]" -0x2e24: "[?]" -0x2e25: "[?]" -0x2e26: "[?]" -0x2e27: "[?]" -0x2e28: "[?]" -0x2e29: "[?]" -0x2e2a: "[?]" -0x2e2b: "[?]" -0x2e2c: "[?]" -0x2e2d: "[?]" -0x2e2e: "[?]" -0x2e2f: "[?]" -0x2e30: "[?]" -0x2e31: "[?]" -0x2e32: "[?]" -0x2e33: "[?]" -0x2e34: "[?]" -0x2e35: "[?]" -0x2e36: "[?]" -0x2e37: "[?]" -0x2e38: "[?]" -0x2e39: "[?]" -0x2e3a: "[?]" -0x2e3b: "[?]" -0x2e3c: "[?]" -0x2e3d: "[?]" -0x2e3e: "[?]" -0x2e3f: "[?]" -0x2e40: "[?]" -0x2e41: "[?]" -0x2e42: "[?]" -0x2e43: "[?]" -0x2e44: "[?]" -0x2e45: "[?]" -0x2e46: "[?]" -0x2e47: "[?]" -0x2e48: "[?]" -0x2e49: "[?]" -0x2e4a: "[?]" -0x2e4b: "[?]" -0x2e4c: "[?]" -0x2e4d: "[?]" -0x2e4e: "[?]" -0x2e4f: "[?]" -0x2e50: "[?]" -0x2e51: "[?]" -0x2e52: "[?]" -0x2e53: "[?]" -0x2e54: "[?]" -0x2e55: "[?]" -0x2e56: "[?]" -0x2e57: "[?]" -0x2e58: "[?]" -0x2e59: "[?]" -0x2e5a: "[?]" -0x2e5b: "[?]" -0x2e5c: "[?]" -0x2e5d: "[?]" -0x2e5e: "[?]" -0x2e5f: "[?]" -0x2e60: "[?]" -0x2e61: "[?]" -0x2e62: "[?]" -0x2e63: "[?]" -0x2e64: "[?]" -0x2e65: "[?]" -0x2e66: "[?]" -0x2e67: "[?]" -0x2e68: "[?]" -0x2e69: "[?]" -0x2e6a: "[?]" -0x2e6b: "[?]" -0x2e6c: "[?]" -0x2e6d: "[?]" -0x2e6e: "[?]" -0x2e6f: "[?]" -0x2e70: "[?]" -0x2e71: "[?]" -0x2e72: "[?]" -0x2e73: "[?]" -0x2e74: "[?]" -0x2e75: "[?]" -0x2e76: "[?]" -0x2e77: "[?]" -0x2e78: "[?]" -0x2e79: "[?]" -0x2e7a: "[?]" -0x2e7b: "[?]" -0x2e7c: "[?]" -0x2e7d: "[?]" -0x2e7e: "[?]" -0x2e7f: "[?]" -0x2e80: "[?] " -0x2e81: "[?] " -0x2e82: "[?] " -0x2e83: "[?] " -0x2e84: "[?] " -0x2e85: "[?] " -0x2e86: "[?] " -0x2e87: "[?] " -0x2e88: "[?] " -0x2e89: "[?] " -0x2e8a: "[?] " -0x2e8b: "[?] " -0x2e8c: "[?] " -0x2e8d: "[?] " -0x2e8e: "[?] " -0x2e8f: "[?] " -0x2e90: "[?] " -0x2e91: "[?] " -0x2e92: "[?] " -0x2e93: "[?] " -0x2e94: "[?] " -0x2e95: "[?] " -0x2e96: "[?] " -0x2e97: "[?] " -0x2e98: "[?] " -0x2e99: "[?] " -0x2e9a: "[?]" -0x2e9b: "[?] " -0x2e9c: "[?] " -0x2e9d: "[?] " -0x2e9e: "[?] " -0x2e9f: "[?] " -0x2ea0: "[?] " -0x2ea1: "[?] " -0x2ea2: "[?] " -0x2ea3: "[?] " -0x2ea4: "[?] " -0x2ea5: "[?] " -0x2ea6: "[?] " -0x2ea7: "[?] " -0x2ea8: "[?] " -0x2ea9: "[?] " -0x2eaa: "[?] " -0x2eab: "[?] " -0x2eac: "[?] " -0x2ead: "[?] " -0x2eae: "[?] " -0x2eaf: "[?] " -0x2eb0: "[?] " -0x2eb1: "[?] " -0x2eb2: "[?] " -0x2eb3: "[?] " -0x2eb4: "[?] " -0x2eb5: "[?] " -0x2eb6: "[?] " -0x2eb7: "[?] " -0x2eb8: "[?] " -0x2eb9: "[?] " -0x2eba: "[?] " -0x2ebb: "[?] " -0x2ebc: "[?] " -0x2ebd: "[?] " -0x2ebe: "[?] " -0x2ebf: "[?] " -0x2ec0: "[?] " -0x2ec1: "[?] " -0x2ec2: "[?] " -0x2ec3: "[?] " -0x2ec4: "[?] " -0x2ec5: "[?] " -0x2ec6: "[?] " -0x2ec7: "[?] " -0x2ec8: "[?] " -0x2ec9: "[?] " -0x2eca: "[?] " -0x2ecb: "[?] " -0x2ecc: "[?] " -0x2ecd: "[?] " -0x2ece: "[?] " -0x2ecf: "[?] " -0x2ed0: "[?] " -0x2ed1: "[?] " -0x2ed2: "[?] " -0x2ed3: "[?] " -0x2ed4: "[?] " -0x2ed5: "[?] " -0x2ed6: "[?] " -0x2ed7: "[?] " -0x2ed8: "[?] " -0x2ed9: "[?] " -0x2eda: "[?] " -0x2edb: "[?] " -0x2edc: "[?] " -0x2edd: "[?] " -0x2ede: "[?] " -0x2edf: "[?] " -0x2ee0: "[?] " -0x2ee1: "[?] " -0x2ee2: "[?] " -0x2ee3: "[?] " -0x2ee4: "[?] " -0x2ee5: "[?] " -0x2ee6: "[?] " -0x2ee7: "[?] " -0x2ee8: "[?] " -0x2ee9: "[?] " -0x2eea: "[?] " -0x2eeb: "[?] " -0x2eec: "[?] " -0x2eed: "[?] " -0x2eee: "[?] " -0x2eef: "[?] " -0x2ef0: "[?] " -0x2ef1: "[?] " -0x2ef2: "[?] " -0x2ef3: "[?] " -0x2ef4: "[?]" -0x2ef5: "[?]" -0x2ef6: "[?]" -0x2ef7: "[?]" -0x2ef8: "[?]" -0x2ef9: "[?]" -0x2efa: "[?]" -0x2efb: "[?]" -0x2efc: "[?]" -0x2efd: "[?]" -0x2efe: "[?]" -/* x02f */ -0x2f00: "[?] " -0x2f01: "[?] " -0x2f02: "[?] " -0x2f03: "[?] " -0x2f04: "[?] " -0x2f05: "[?] " -0x2f06: "[?] " -0x2f07: "[?] " -0x2f08: "[?] " -0x2f09: "[?] " -0x2f0a: "[?] " -0x2f0b: "[?] " -0x2f0c: "[?] " -0x2f0d: "[?] " -0x2f0e: "[?] " -0x2f0f: "[?] " -0x2f10: "[?] " -0x2f11: "[?] " -0x2f12: "[?] " -0x2f13: "[?] " -0x2f14: "[?] " -0x2f15: "[?] " -0x2f16: "[?] " -0x2f17: "[?] " -0x2f18: "[?] " -0x2f19: "[?] " -0x2f1a: "[?] " -0x2f1b: "[?] " -0x2f1c: "[?] " -0x2f1d: "[?] " -0x2f1e: "[?] " -0x2f1f: "[?] " -0x2f20: "[?] " -0x2f21: "[?] " -0x2f22: "[?] " -0x2f23: "[?] " -0x2f24: "[?] " -0x2f25: "[?] " -0x2f26: "[?] " -0x2f27: "[?] " -0x2f28: "[?] " -0x2f29: "[?] " -0x2f2a: "[?] " -0x2f2b: "[?] " -0x2f2c: "[?] " -0x2f2d: "[?] " -0x2f2e: "[?] " -0x2f2f: "[?] " -0x2f30: "[?] " -0x2f31: "[?] " -0x2f32: "[?] " -0x2f33: "[?] " -0x2f34: "[?] " -0x2f35: "[?] " -0x2f36: "[?] " -0x2f37: "[?] " -0x2f38: "[?] " -0x2f39: "[?] " -0x2f3a: "[?] " -0x2f3b: "[?] " -0x2f3c: "[?] " -0x2f3d: "[?] " -0x2f3e: "[?] " -0x2f3f: "[?] " -0x2f40: "[?] " -0x2f41: "[?] " -0x2f42: "[?] " -0x2f43: "[?] " -0x2f44: "[?] " -0x2f45: "[?] " -0x2f46: "[?] " -0x2f47: "[?] " -0x2f48: "[?] " -0x2f49: "[?] " -0x2f4a: "[?] " -0x2f4b: "[?] " -0x2f4c: "[?] " -0x2f4d: "[?] " -0x2f4e: "[?] " -0x2f4f: "[?] " -0x2f50: "[?] " -0x2f51: "[?] " -0x2f52: "[?] " -0x2f53: "[?] " -0x2f54: "[?] " -0x2f55: "[?] " -0x2f56: "[?] " -0x2f57: "[?] " -0x2f58: "[?] " -0x2f59: "[?] " -0x2f5a: "[?] " -0x2f5b: "[?] " -0x2f5c: "[?] " -0x2f5d: "[?] " -0x2f5e: "[?] " -0x2f5f: "[?] " -0x2f60: "[?] " -0x2f61: "[?] " -0x2f62: "[?] " -0x2f63: "[?] " -0x2f64: "[?] " -0x2f65: "[?] " -0x2f66: "[?] " -0x2f67: "[?] " -0x2f68: "[?] " -0x2f69: "[?] " -0x2f6a: "[?] " -0x2f6b: "[?] " -0x2f6c: "[?] " -0x2f6d: "[?] " -0x2f6e: "[?] " -0x2f6f: "[?] " -0x2f70: "[?] " -0x2f71: "[?] " -0x2f72: "[?] " -0x2f73: "[?] " -0x2f74: "[?] " -0x2f75: "[?] " -0x2f76: "[?] " -0x2f77: "[?] " -0x2f78: "[?] " -0x2f79: "[?] " -0x2f7a: "[?] " -0x2f7b: "[?] " -0x2f7c: "[?] " -0x2f7d: "[?] " -0x2f7e: "[?] " -0x2f7f: "[?] " -0x2f80: "[?] " -0x2f81: "[?] " -0x2f82: "[?] " -0x2f83: "[?] " -0x2f84: "[?] " -0x2f85: "[?] " -0x2f86: "[?] " -0x2f87: "[?] " -0x2f88: "[?] " -0x2f89: "[?] " -0x2f8a: "[?] " -0x2f8b: "[?] " -0x2f8c: "[?] " -0x2f8d: "[?] " -0x2f8e: "[?] " -0x2f8f: "[?] " -0x2f90: "[?] " -0x2f91: "[?] " -0x2f92: "[?] " -0x2f93: "[?] " -0x2f94: "[?] " -0x2f95: "[?] " -0x2f96: "[?] " -0x2f97: "[?] " -0x2f98: "[?] " -0x2f99: "[?] " -0x2f9a: "[?] " -0x2f9b: "[?] " -0x2f9c: "[?] " -0x2f9d: "[?] " -0x2f9e: "[?] " -0x2f9f: "[?] " -0x2fa0: "[?] " -0x2fa1: "[?] " -0x2fa2: "[?] " -0x2fa3: "[?] " -0x2fa4: "[?] " -0x2fa5: "[?] " -0x2fa6: "[?] " -0x2fa7: "[?] " -0x2fa8: "[?] " -0x2fa9: "[?] " -0x2faa: "[?] " -0x2fab: "[?] " -0x2fac: "[?] " -0x2fad: "[?] " -0x2fae: "[?] " -0x2faf: "[?] " -0x2fb0: "[?] " -0x2fb1: "[?] " -0x2fb2: "[?] " -0x2fb3: "[?] " -0x2fb4: "[?] " -0x2fb5: "[?] " -0x2fb6: "[?] " -0x2fb7: "[?] " -0x2fb8: "[?] " -0x2fb9: "[?] " -0x2fba: "[?] " -0x2fbb: "[?] " -0x2fbc: "[?] " -0x2fbd: "[?] " -0x2fbe: "[?] " -0x2fbf: "[?] " -0x2fc0: "[?] " -0x2fc1: "[?] " -0x2fc2: "[?] " -0x2fc3: "[?] " -0x2fc4: "[?] " -0x2fc5: "[?] " -0x2fc6: "[?] " -0x2fc7: "[?] " -0x2fc8: "[?] " -0x2fc9: "[?] " -0x2fca: "[?] " -0x2fcb: "[?] " -0x2fcc: "[?] " -0x2fcd: "[?] " -0x2fce: "[?] " -0x2fcf: "[?] " -0x2fd0: "[?] " -0x2fd1: "[?] " -0x2fd2: "[?] " -0x2fd3: "[?] " -0x2fd4: "[?] " -0x2fd5: "[?] " -0x2fd6: "[?]" -0x2fd7: "[?]" -0x2fd8: "[?]" -0x2fd9: "[?]" -0x2fda: "[?]" -0x2fdb: "[?]" -0x2fdc: "[?]" -0x2fdd: "[?]" -0x2fde: "[?]" -0x2fdf: "[?]" -0x2fe0: "[?]" -0x2fe1: "[?]" -0x2fe2: "[?]" -0x2fe3: "[?]" -0x2fe4: "[?]" -0x2fe5: "[?]" -0x2fe6: "[?]" -0x2fe7: "[?]" -0x2fe8: "[?]" -0x2fe9: "[?]" -0x2fea: "[?]" -0x2feb: "[?]" -0x2fec: "[?]" -0x2fed: "[?]" -0x2fee: "[?]" -0x2fef: "[?]" -0x2ff0: "[?] " -0x2ff1: "[?] " -0x2ff2: "[?] " -0x2ff3: "[?] " -0x2ff4: "[?] " -0x2ff5: "[?] " -0x2ff6: "[?] " -0x2ff7: "[?] " -0x2ff8: "[?] " -0x2ff9: "[?] " -0x2ffa: "[?] " -0x2ffb: "[?] " -0x2ffc: "[?]" -0x2ffd: "[?]" -0x2ffe: "[?]" -/* x030 */ -0x3000: " " -0x3001: ", " -0x3002: ". " -0x3003: "\"" -0x3004: "[JIS]" -0x3005: "\"" -0x3006: "/" -0x3007: "0" -0x3008: "<" -0x3009: "> " -0x300a: "<<" -0x300b: ">> " -0x300c: "[" -0x300d: "] " -0x300e: "{" -0x300f: "} " -0x3010: "[(" -0x3011: ")] " -0x3012: "@" -0x3013: "X " -0x3014: "[" -0x3015: "] " -0x3016: "[[" -0x3017: "]] " -0x3018: "((" -0x3019: ")) " -0x301a: "[[" -0x301b: "]] " -0x301c: "~ " -0x301d: "``" -0x301e: "''" -0x301f: ",," -0x3020: "@" -0x3021: "1" -0x3022: "2" -0x3023: "3" -0x3024: "4" -0x3025: "5" -0x3026: "6" -0x3027: "7" -0x3028: "8" -0x3029: "9" -0x302a: "" -0x302b: "" -0x302c: "" -0x302d: "" -0x302e: "" -0x302f: "" -0x3030: "~" -0x3031: "+" -0x3032: "+" -0x3033: "+" -0x3034: "+" -0x3035: "" -0x3036: "@" -0x3037: " // " -0x3038: "+10+" -0x3039: "+20+" -0x303a: "+30+" -0x303b: "[?]" -0x303c: "[?]" -0x303d: "[?]" -0x303e: "" -0x303f: "" -0x3040: "[?]" -0x3041: "a" -0x3042: "a" -0x3043: "i" -0x3044: "i" -0x3045: "u" -0x3046: "u" -0x3047: "e" -0x3048: "e" -0x3049: "o" -0x304a: "o" -0x304b: "ka" -0x304c: "ga" -0x304d: "ki" -0x304e: "gi" -0x304f: "ku" -0x3050: "gu" -0x3051: "ke" -0x3052: "ge" -0x3053: "ko" -0x3054: "go" -0x3055: "sa" -0x3056: "za" -0x3057: "shi" -0x3058: "zi" -0x3059: "su" -0x305a: "zu" -0x305b: "se" -0x305c: "ze" -0x305d: "so" -0x305e: "zo" -0x305f: "ta" -0x3060: "da" -0x3061: "chi" -0x3062: "di" -0x3063: "tsu" -0x3064: "tsu" -0x3065: "du" -0x3066: "te" -0x3067: "de" -0x3068: "to" -0x3069: "do" -0x306a: "na" -0x306b: "ni" -0x306c: "nu" -0x306d: "ne" -0x306e: "no" -0x306f: "ha" -0x3070: "ba" -0x3071: "pa" -0x3072: "hi" -0x3073: "bi" -0x3074: "pi" -0x3075: "hu" -0x3076: "bu" -0x3077: "pu" -0x3078: "he" -0x3079: "be" -0x307a: "pe" -0x307b: "ho" -0x307c: "bo" -0x307d: "po" -0x307e: "ma" -0x307f: "mi" -0x3080: "mu" -0x3081: "me" -0x3082: "mo" -0x3083: "ya" -0x3084: "ya" -0x3085: "yu" -0x3086: "yu" -0x3087: "yo" -0x3088: "yo" -0x3089: "ra" -0x308a: "ri" -0x308b: "ru" -0x308c: "re" -0x308d: "ro" -0x308e: "wa" -0x308f: "wa" -0x3090: "wi" -0x3091: "we" -0x3092: "wo" -0x3093: "n" -0x3094: "vu" -0x3095: "[?]" -0x3096: "[?]" -0x3097: "[?]" -0x3098: "[?]" -0x3099: "" -0x309a: "" -0x309b: "" -0x309c: "" -0x309d: "\"" -0x309e: "\"" -0x309f: "[?]" -0x30a0: "[?]" -0x30a1: "a" -0x30a2: "a" -0x30a3: "i" -0x30a4: "i" -0x30a5: "u" -0x30a6: "u" -0x30a7: "e" -0x30a8: "e" -0x30a9: "o" -0x30aa: "o" -0x30ab: "ka" -0x30ac: "ga" -0x30ad: "ki" -0x30ae: "gi" -0x30af: "ku" -0x30b0: "gu" -0x30b1: "ke" -0x30b2: "ge" -0x30b3: "ko" -0x30b4: "go" -0x30b5: "sa" -0x30b6: "za" -0x30b7: "shi" -0x30b8: "zi" -0x30b9: "su" -0x30ba: "zu" -0x30bb: "se" -0x30bc: "ze" -0x30bd: "so" -0x30be: "zo" -0x30bf: "ta" -0x30c0: "da" -0x30c1: "chi" -0x30c2: "di" -0x30c3: "tsu" -0x30c4: "tsu" -0x30c5: "du" -0x30c6: "te" -0x30c7: "de" -0x30c8: "to" -0x30c9: "do" -0x30ca: "na" -0x30cb: "ni" -0x30cc: "nu" -0x30cd: "ne" -0x30ce: "no" -0x30cf: "ha" -0x30d0: "ba" -0x30d1: "pa" -0x30d2: "hi" -0x30d3: "bi" -0x30d4: "pi" -0x30d5: "hu" -0x30d6: "bu" -0x30d7: "pu" -0x30d8: "he" -0x30d9: "be" -0x30da: "pe" -0x30db: "ho" -0x30dc: "bo" -0x30dd: "po" -0x30de: "ma" -0x30df: "mi" -0x30e0: "mu" -0x30e1: "me" -0x30e2: "mo" -0x30e3: "ya" -0x30e4: "ya" -0x30e5: "yu" -0x30e6: "yu" -0x30e7: "yo" -0x30e8: "yo" -0x30e9: "ra" -0x30ea: "ri" -0x30eb: "ru" -0x30ec: "re" -0x30ed: "ro" -0x30ee: "wa" -0x30ef: "wa" -0x30f0: "wi" -0x30f1: "we" -0x30f2: "wo" -0x30f3: "n" -0x30f4: "vu" -0x30f5: "ka" -0x30f6: "ke" -0x30f7: "va" -0x30f8: "vi" -0x30f9: "ve" -0x30fa: "vo" -0x30fb: "" -0x30fc: "" -0x30fd: "\"" -0x30fe: "\"" -/* x031 */ -0x3100: "[?]" -0x3101: "[?]" -0x3102: "[?]" -0x3103: "[?]" -0x3104: "[?]" -0x3105: "B" -0x3106: "P" -0x3107: "M" -0x3108: "F" -0x3109: "D" -0x310a: "T" -0x310b: "N" -0x310c: "L" -0x310d: "G" -0x310e: "K" -0x310f: "H" -0x3110: "J" -0x3111: "Q" -0x3112: "X" -0x3113: "ZH" -0x3114: "CH" -0x3115: "SH" -0x3116: "R" -0x3117: "Z" -0x3118: "C" -0x3119: "S" -0x311a: "A" -0x311b: "O" -0x311c: "E" -0x311d: "EH" -0x311e: "AI" -0x311f: "EI" -0x3120: "AU" -0x3121: "OU" -0x3122: "AN" -0x3123: "EN" -0x3124: "ANG" -0x3125: "ENG" -0x3126: "ER" -0x3127: "I" -0x3128: "U" -0x3129: "IU" -0x312a: "V" -0x312b: "NG" -0x312c: "GN" -0x312d: "[?]" -0x312e: "[?]" -0x312f: "[?]" -0x3130: "[?]" -0x3131: "g" -0x3132: "gg" -0x3133: "gs" -0x3134: "n" -0x3135: "nj" -0x3136: "nh" -0x3137: "d" -0x3138: "dd" -0x3139: "r" -0x313a: "lg" -0x313b: "lm" -0x313c: "lb" -0x313d: "ls" -0x313e: "lt" -0x313f: "lp" -0x3140: "rh" -0x3141: "m" -0x3142: "b" -0x3143: "bb" -0x3144: "bs" -0x3145: "s" -0x3146: "ss" -0x3147: "" -0x3148: "j" -0x3149: "jj" -0x314a: "c" -0x314b: "k" -0x314c: "t" -0x314d: "p" -0x314e: "h" -0x314f: "a" -0x3150: "ae" -0x3151: "ya" -0x3152: "yae" -0x3153: "eo" -0x3154: "e" -0x3155: "yeo" -0x3156: "ye" -0x3157: "o" -0x3158: "wa" -0x3159: "wae" -0x315a: "oe" -0x315b: "yo" -0x315c: "u" -0x315d: "weo" -0x315e: "we" -0x315f: "wi" -0x3160: "yu" -0x3161: "eu" -0x3162: "yi" -0x3163: "i" -0x3164: "" -0x3165: "nn" -0x3166: "nd" -0x3167: "ns" -0x3168: "nZ" -0x3169: "lgs" -0x316a: "ld" -0x316b: "lbs" -0x316c: "lZ" -0x316d: "lQ" -0x316e: "mb" -0x316f: "ms" -0x3170: "mZ" -0x3171: "mN" -0x3172: "bg" -0x3173: "" -0x3174: "bsg" -0x3175: "bst" -0x3176: "bj" -0x3177: "bt" -0x3178: "bN" -0x3179: "bbN" -0x317a: "sg" -0x317b: "sn" -0x317c: "sd" -0x317d: "sb" -0x317e: "sj" -0x317f: "Z" -0x3180: "" -0x3181: "N" -0x3182: "Ns" -0x3183: "NZ" -0x3184: "pN" -0x3185: "hh" -0x3186: "Q" -0x3187: "yo-ya" -0x3188: "yo-yae" -0x3189: "yo-i" -0x318a: "yu-yeo" -0x318b: "yu-ye" -0x318c: "yu-i" -0x318d: "U" -0x318e: "U-i" -0x318f: "[?]" -0x3190: "" -0x3191: "" -0x3192: "" -0x3193: "" -0x3194: "" -0x3195: "" -0x3196: "" -0x3197: "" -0x3198: "" -0x3199: "" -0x319a: "" -0x319b: "" -0x319c: "" -0x319d: "" -0x319e: "" -0x319f: "" -0x31a0: "BU" -0x31a1: "ZI" -0x31a2: "JI" -0x31a3: "GU" -0x31a4: "EE" -0x31a5: "ENN" -0x31a6: "OO" -0x31a7: "ONN" -0x31a8: "IR" -0x31a9: "ANN" -0x31aa: "INN" -0x31ab: "UNN" -0x31ac: "IM" -0x31ad: "NGG" -0x31ae: "AINN" -0x31af: "AUNN" -0x31b0: "AM" -0x31b1: "OM" -0x31b2: "ONG" -0x31b3: "INNN" -0x31b4: "P" -0x31b5: "T" -0x31b6: "K" -0x31b7: "H" -0x31b8: "[?]" -0x31b9: "[?]" -0x31ba: "[?]" -0x31bb: "[?]" -0x31bc: "[?]" -0x31bd: "[?]" -0x31be: "[?]" -0x31bf: "[?]" -0x31c0: "[?]" -0x31c1: "[?]" -0x31c2: "[?]" -0x31c3: "[?]" -0x31c4: "[?]" -0x31c5: "[?]" -0x31c6: "[?]" -0x31c7: "[?]" -0x31c8: "[?]" -0x31c9: "[?]" -0x31ca: "[?]" -0x31cb: "[?]" -0x31cc: "[?]" -0x31cd: "[?]" -0x31ce: "[?]" -0x31cf: "[?]" -0x31d0: "[?]" -0x31d1: "[?]" -0x31d2: "[?]" -0x31d3: "[?]" -0x31d4: "[?]" -0x31d5: "[?]" -0x31d6: "[?]" -0x31d7: "[?]" -0x31d8: "[?]" -0x31d9: "[?]" -0x31da: "[?]" -0x31db: "[?]" -0x31dc: "[?]" -0x31dd: "[?]" -0x31de: "[?]" -0x31df: "[?]" -0x31e0: "[?]" -0x31e1: "[?]" -0x31e2: "[?]" -0x31e3: "[?]" -0x31e4: "[?]" -0x31e5: "[?]" -0x31e6: "[?]" -0x31e7: "[?]" -0x31e8: "[?]" -0x31e9: "[?]" -0x31ea: "[?]" -0x31eb: "[?]" -0x31ec: "[?]" -0x31ed: "[?]" -0x31ee: "[?]" -0x31ef: "[?]" -0x31f0: "[?]" -0x31f1: "[?]" -0x31f2: "[?]" -0x31f3: "[?]" -0x31f4: "[?]" -0x31f5: "[?]" -0x31f6: "[?]" -0x31f7: "[?]" -0x31f8: "[?]" -0x31f9: "[?]" -0x31fa: "[?]" -0x31fb: "[?]" -0x31fc: "[?]" -0x31fd: "[?]" -0x31fe: "[?]" -/* x032 */ -0x3200: "(g)" -0x3201: "(n)" -0x3202: "(d)" -0x3203: "(r)" -0x3204: "(m)" -0x3205: "(b)" -0x3206: "(s)" -0x3207: "()" -0x3208: "(j)" -0x3209: "(c)" -0x320a: "(k)" -0x320b: "(t)" -0x320c: "(p)" -0x320d: "(h)" -0x320e: "(ga)" -0x320f: "(na)" -0x3210: "(da)" -0x3211: "(ra)" -0x3212: "(ma)" -0x3213: "(ba)" -0x3214: "(sa)" -0x3215: "(a)" -0x3216: "(ja)" -0x3217: "(ca)" -0x3218: "(ka)" -0x3219: "(ta)" -0x321a: "(pa)" -0x321b: "(ha)" -0x321c: "(ju)" -0x321d: "[?]" -0x321e: "[?]" -0x321f: "[?]" -0x3220: "(1) " -0x3221: "(2) " -0x3222: "(3) " -0x3223: "(4) " -0x3224: "(5) " -0x3225: "(6) " -0x3226: "(7) " -0x3227: "(8) " -0x3228: "(9) " -0x3229: "(10) " -0x322a: "(Yue) " -0x322b: "(Huo) " -0x322c: "(Shui) " -0x322d: "(Mu) " -0x322e: "(Jin) " -0x322f: "(Tu) " -0x3230: "(Ri) " -0x3231: "(Zhu) " -0x3232: "(You) " -0x3233: "(She) " -0x3234: "(Ming) " -0x3235: "(Te) " -0x3236: "(Cai) " -0x3237: "(Zhu) " -0x3238: "(Lao) " -0x3239: "(Dai) " -0x323a: "(Hu) " -0x323b: "(Xue) " -0x323c: "(Jian) " -0x323d: "(Qi) " -0x323e: "(Zi) " -0x323f: "(Xie) " -0x3240: "(Ji) " -0x3241: "(Xiu) " -0x3242: "<<" -0x3243: ">>" -0x3244: "[?]" -0x3245: "[?]" -0x3246: "[?]" -0x3247: "[?]" -0x3248: "[?]" -0x3249: "[?]" -0x324a: "[?]" -0x324b: "[?]" -0x324c: "[?]" -0x324d: "[?]" -0x324e: "[?]" -0x324f: "[?]" -0x3250: "[?]" -0x3251: "[?]" -0x3252: "[?]" -0x3253: "[?]" -0x3254: "[?]" -0x3255: "[?]" -0x3256: "[?]" -0x3257: "[?]" -0x3258: "[?]" -0x3259: "[?]" -0x325a: "[?]" -0x325b: "[?]" -0x325c: "[?]" -0x325d: "[?]" -0x325e: "[?]" -0x325f: "[?]" -0x3260: "(g)" -0x3261: "(n)" -0x3262: "(d)" -0x3263: "(r)" -0x3264: "(m)" -0x3265: "(b)" -0x3266: "(s)" -0x3267: "()" -0x3268: "(j)" -0x3269: "(c)" -0x326a: "(k)" -0x326b: "(t)" -0x326c: "(p)" -0x326d: "(h)" -0x326e: "(ga)" -0x326f: "(na)" -0x3270: "(da)" -0x3271: "(ra)" -0x3272: "(ma)" -0x3273: "(ba)" -0x3274: "(sa)" -0x3275: "(a)" -0x3276: "(ja)" -0x3277: "(ca)" -0x3278: "(ka)" -0x3279: "(ta)" -0x327a: "(pa)" -0x327b: "(ha)" -0x327c: "[?]" -0x327d: "[?]" -0x327e: "[?]" -0x327f: "KIS " -0x3280: "(1) " -0x3281: "(2) " -0x3282: "(3) " -0x3283: "(4) " -0x3284: "(5) " -0x3285: "(6) " -0x3286: "(7) " -0x3287: "(8) " -0x3288: "(9) " -0x3289: "(10) " -0x328a: "(Yue) " -0x328b: "(Huo) " -0x328c: "(Shui) " -0x328d: "(Mu) " -0x328e: "(Jin) " -0x328f: "(Tu) " -0x3290: "(Ri) " -0x3291: "(Zhu) " -0x3292: "(You) " -0x3293: "(She) " -0x3294: "(Ming) " -0x3295: "(Te) " -0x3296: "(Cai) " -0x3297: "(Zhu) " -0x3298: "(Lao) " -0x3299: "(Mi) " -0x329a: "(Nan) " -0x329b: "(Nu) " -0x329c: "(Shi) " -0x329d: "(You) " -0x329e: "(Yin) " -0x329f: "(Zhu) " -0x32a0: "(Xiang) " -0x32a1: "(Xiu) " -0x32a2: "(Xie) " -0x32a3: "(Zheng) " -0x32a4: "(Shang) " -0x32a5: "(Zhong) " -0x32a6: "(Xia) " -0x32a7: "(Zuo) " -0x32a8: "(You) " -0x32a9: "(Yi) " -0x32aa: "(Zong) " -0x32ab: "(Xue) " -0x32ac: "(Jian) " -0x32ad: "(Qi) " -0x32ae: "(Zi) " -0x32af: "(Xie) " -0x32b0: "(Ye) " -0x32b1: "[?]" -0x32b2: "[?]" -0x32b3: "[?]" -0x32b4: "[?]" -0x32b5: "[?]" -0x32b6: "[?]" -0x32b7: "[?]" -0x32b8: "[?]" -0x32b9: "[?]" -0x32ba: "[?]" -0x32bb: "[?]" -0x32bc: "[?]" -0x32bd: "[?]" -0x32be: "[?]" -0x32bf: "[?]" -0x32c0: "1M" -0x32c1: "2M" -0x32c2: "3M" -0x32c3: "4M" -0x32c4: "5M" -0x32c5: "6M" -0x32c6: "7M" -0x32c7: "8M" -0x32c8: "9M" -0x32c9: "10M" -0x32ca: "11M" -0x32cb: "12M" -0x32cc: "[?]" -0x32cd: "[?]" -0x32ce: "[?]" -0x32cf: "[?]" -0x32d0: "a" -0x32d1: "i" -0x32d2: "u" -0x32d3: "u" -0x32d4: "o" -0x32d5: "ka" -0x32d6: "ki" -0x32d7: "ku" -0x32d8: "ke" -0x32d9: "ko" -0x32da: "sa" -0x32db: "si" -0x32dc: "su" -0x32dd: "se" -0x32de: "so" -0x32df: "ta" -0x32e0: "ti" -0x32e1: "tu" -0x32e2: "te" -0x32e3: "to" -0x32e4: "na" -0x32e5: "ni" -0x32e6: "nu" -0x32e7: "ne" -0x32e8: "no" -0x32e9: "ha" -0x32ea: "hi" -0x32eb: "hu" -0x32ec: "he" -0x32ed: "ho" -0x32ee: "ma" -0x32ef: "mi" -0x32f0: "mu" -0x32f1: "me" -0x32f2: "mo" -0x32f3: "ya" -0x32f4: "yu" -0x32f5: "yo" -0x32f6: "ra" -0x32f7: "ri" -0x32f8: "ru" -0x32f9: "re" -0x32fa: "ro" -0x32fb: "wa" -0x32fc: "wi" -0x32fd: "we" -0x32fe: "wo" -/* x033 */ -0x3300: "apartment" -0x3301: "alpha" -0x3302: "ampere" -0x3303: "are" -0x3304: "inning" -0x3305: "inch" -0x3306: "won" -0x3307: "escudo" -0x3308: "acre" -0x3309: "ounce" -0x330a: "ohm" -0x330b: "kai-ri" -0x330c: "carat" -0x330d: "calorie" -0x330e: "gallon" -0x330f: "gamma" -0x3310: "giga" -0x3311: "guinea" -0x3312: "curie" -0x3313: "guilder" -0x3314: "kilo" -0x3315: "kilogram" -0x3316: "kilometer" -0x3317: "kilowatt" -0x3318: "gram" -0x3319: "gram ton" -0x331a: "cruzeiro" -0x331b: "krone" -0x331c: "case" -0x331d: "koruna" -0x331e: "co-op" -0x331f: "cycle" -0x3320: "centime" -0x3321: "shilling" -0x3322: "centi" -0x3323: "cent" -0x3324: "dozen" -0x3325: "desi" -0x3326: "dollar" -0x3327: "ton" -0x3328: "nano" -0x3329: "knot" -0x332a: "heights" -0x332b: "percent" -0x332c: "parts" -0x332d: "barrel" -0x332e: "piaster" -0x332f: "picul" -0x3330: "pico" -0x3331: "building" -0x3332: "farad" -0x3333: "feet" -0x3334: "bushel" -0x3335: "franc" -0x3336: "hectare" -0x3337: "peso" -0x3338: "pfennig" -0x3339: "hertz" -0x333a: "pence" -0x333b: "page" -0x333c: "beta" -0x333d: "point" -0x333e: "volt" -0x333f: "hon" -0x3340: "pound" -0x3341: "hall" -0x3342: "horn" -0x3343: "micro" -0x3344: "mile" -0x3345: "mach" -0x3346: "mark" -0x3347: "mansion" -0x3348: "micron" -0x3349: "milli" -0x334a: "millibar" -0x334b: "mega" -0x334c: "megaton" -0x334d: "meter" -0x334e: "yard" -0x334f: "yard" -0x3350: "yuan" -0x3351: "liter" -0x3352: "lira" -0x3353: "rupee" -0x3354: "ruble" -0x3355: "rem" -0x3356: "roentgen" -0x3357: "watt" -0x3358: "0h" -0x3359: "1h" -0x335a: "2h" -0x335b: "3h" -0x335c: "4h" -0x335d: "5h" -0x335e: "6h" -0x335f: "7h" -0x3360: "8h" -0x3361: "9h" -0x3362: "10h" -0x3363: "11h" -0x3364: "12h" -0x3365: "13h" -0x3366: "14h" -0x3367: "15h" -0x3368: "16h" -0x3369: "17h" -0x336a: "18h" -0x336b: "19h" -0x336c: "20h" -0x336d: "21h" -0x336e: "22h" -0x336f: "23h" -0x3370: "24h" -0x3371: "HPA" -0x3372: "da" -0x3373: "AU" -0x3374: "bar" -0x3375: "oV" -0x3376: "pc" -0x3377: "[?]" -0x3378: "[?]" -0x3379: "[?]" -0x337a: "[?]" -0x337b: "Heisei" -0x337c: "Syouwa" -0x337d: "Taisyou" -0x337e: "Meiji" -0x337f: "Inc." -0x3380: "pA" -0x3381: "nA" -0x3382: "microamp" -0x3383: "mA" -0x3384: "kA" -0x3385: "kB" -0x3386: "MB" -0x3387: "GB" -0x3388: "cal" -0x3389: "kcal" -0x338a: "pF" -0x338b: "nF" -0x338c: "microFarad" -0x338d: "microgram" -0x338e: "mg" -0x338f: "kg" -0x3390: "Hz" -0x3391: "kHz" -0x3392: "MHz" -0x3393: "GHz" -0x3394: "THz" -0x3395: "microliter" -0x3396: "ml" -0x3397: "dl" -0x3398: "kl" -0x3399: "fm" -0x339a: "nm" -0x339b: "micrometer" -0x339c: "mm" -0x339d: "cm" -0x339e: "km" -0x339f: "mm^2" -0x33a0: "cm^2" -0x33a1: "m^2" -0x33a2: "km^2" -0x33a3: "mm^4" -0x33a4: "cm^3" -0x33a5: "m^3" -0x33a6: "km^3" -0x33a7: "m/s" -0x33a8: "m/s^2" -0x33a9: "Pa" -0x33aa: "kPa" -0x33ab: "MPa" -0x33ac: "GPa" -0x33ad: "rad" -0x33ae: "rad/s" -0x33af: "rad/s^2" -0x33b0: "ps" -0x33b1: "ns" -0x33b2: "microsecond" -0x33b3: "ms" -0x33b4: "pV" -0x33b5: "nV" -0x33b6: "microvolt" -0x33b7: "mV" -0x33b8: "kV" -0x33b9: "MV" -0x33ba: "pW" -0x33bb: "nW" -0x33bc: "microwatt" -0x33bd: "mW" -0x33be: "kW" -0x33bf: "MW" -0x33c0: "kOhm" -0x33c1: "MOhm" -0x33c2: "a.m." -0x33c3: "Bq" -0x33c4: "cc" -0x33c5: "cd" -0x33c6: "C/kg" -0x33c7: "Co." -0x33c8: "dB" -0x33c9: "Gy" -0x33ca: "ha" -0x33cb: "HP" -0x33cc: "in" -0x33cd: "K.K." -0x33ce: "KM" -0x33cf: "kt" -0x33d0: "lm" -0x33d1: "ln" -0x33d2: "log" -0x33d3: "lx" -0x33d4: "mb" -0x33d5: "mil" -0x33d6: "mol" -0x33d7: "pH" -0x33d8: "p.m." -0x33d9: "PPM" -0x33da: "PR" -0x33db: "sr" -0x33dc: "Sv" -0x33dd: "Wb" -0x33de: "[?]" -0x33df: "[?]" -0x33e0: "1d" -0x33e1: "2d" -0x33e2: "3d" -0x33e3: "4d" -0x33e4: "5d" -0x33e5: "6d" -0x33e6: "7d" -0x33e7: "8d" -0x33e8: "9d" -0x33e9: "10d" -0x33ea: "11d" -0x33eb: "12d" -0x33ec: "13d" -0x33ed: "14d" -0x33ee: "15d" -0x33ef: "16d" -0x33f0: "17d" -0x33f1: "18d" -0x33f2: "19d" -0x33f3: "20d" -0x33f4: "21d" -0x33f5: "22d" -0x33f6: "23d" -0x33f7: "24d" -0x33f8: "25d" -0x33f9: "26d" -0x33fa: "27d" -0x33fb: "28d" -0x33fc: "29d" -0x33fd: "30d" -0x33fe: "31d" -/* x04d */ -0x4d00: "[?] " -0x4d01: "[?] " -0x4d02: "[?] " -0x4d03: "[?] " -0x4d04: "[?] " -0x4d05: "[?] " -0x4d06: "[?] " -0x4d07: "[?] " -0x4d08: "[?] " -0x4d09: "[?] " -0x4d0a: "[?] " -0x4d0b: "[?] " -0x4d0c: "[?] " -0x4d0d: "[?] " -0x4d0e: "[?] " -0x4d0f: "[?] " -0x4d10: "[?] " -0x4d11: "[?] " -0x4d12: "[?] " -0x4d13: "[?] " -0x4d14: "[?] " -0x4d15: "[?] " -0x4d16: "[?] " -0x4d17: "[?] " -0x4d18: "[?] " -0x4d19: "[?] " -0x4d1a: "[?] " -0x4d1b: "[?] " -0x4d1c: "[?] " -0x4d1d: "[?] " -0x4d1e: "[?] " -0x4d1f: "[?] " -0x4d20: "[?] " -0x4d21: "[?] " -0x4d22: "[?] " -0x4d23: "[?] " -0x4d24: "[?] " -0x4d25: "[?] " -0x4d26: "[?] " -0x4d27: "[?] " -0x4d28: "[?] " -0x4d29: "[?] " -0x4d2a: "[?] " -0x4d2b: "[?] " -0x4d2c: "[?] " -0x4d2d: "[?] " -0x4d2e: "[?] " -0x4d2f: "[?] " -0x4d30: "[?] " -0x4d31: "[?] " -0x4d32: "[?] " -0x4d33: "[?] " -0x4d34: "[?] " -0x4d35: "[?] " -0x4d36: "[?] " -0x4d37: "[?] " -0x4d38: "[?] " -0x4d39: "[?] " -0x4d3a: "[?] " -0x4d3b: "[?] " -0x4d3c: "[?] " -0x4d3d: "[?] " -0x4d3e: "[?] " -0x4d3f: "[?] " -0x4d40: "[?] " -0x4d41: "[?] " -0x4d42: "[?] " -0x4d43: "[?] " -0x4d44: "[?] " -0x4d45: "[?] " -0x4d46: "[?] " -0x4d47: "[?] " -0x4d48: "[?] " -0x4d49: "[?] " -0x4d4a: "[?] " -0x4d4b: "[?] " -0x4d4c: "[?] " -0x4d4d: "[?] " -0x4d4e: "[?] " -0x4d4f: "[?] " -0x4d50: "[?] " -0x4d51: "[?] " -0x4d52: "[?] " -0x4d53: "[?] " -0x4d54: "[?] " -0x4d55: "[?] " -0x4d56: "[?] " -0x4d57: "[?] " -0x4d58: "[?] " -0x4d59: "[?] " -0x4d5a: "[?] " -0x4d5b: "[?] " -0x4d5c: "[?] " -0x4d5d: "[?] " -0x4d5e: "[?] " -0x4d5f: "[?] " -0x4d60: "[?] " -0x4d61: "[?] " -0x4d62: "[?] " -0x4d63: "[?] " -0x4d64: "[?] " -0x4d65: "[?] " -0x4d66: "[?] " -0x4d67: "[?] " -0x4d68: "[?] " -0x4d69: "[?] " -0x4d6a: "[?] " -0x4d6b: "[?] " -0x4d6c: "[?] " -0x4d6d: "[?] " -0x4d6e: "[?] " -0x4d6f: "[?] " -0x4d70: "[?] " -0x4d71: "[?] " -0x4d72: "[?] " -0x4d73: "[?] " -0x4d74: "[?] " -0x4d75: "[?] " -0x4d76: "[?] " -0x4d77: "[?] " -0x4d78: "[?] " -0x4d79: "[?] " -0x4d7a: "[?] " -0x4d7b: "[?] " -0x4d7c: "[?] " -0x4d7d: "[?] " -0x4d7e: "[?] " -0x4d7f: "[?] " -0x4d80: "[?] " -0x4d81: "[?] " -0x4d82: "[?] " -0x4d83: "[?] " -0x4d84: "[?] " -0x4d85: "[?] " -0x4d86: "[?] " -0x4d87: "[?] " -0x4d88: "[?] " -0x4d89: "[?] " -0x4d8a: "[?] " -0x4d8b: "[?] " -0x4d8c: "[?] " -0x4d8d: "[?] " -0x4d8e: "[?] " -0x4d8f: "[?] " -0x4d90: "[?] " -0x4d91: "[?] " -0x4d92: "[?] " -0x4d93: "[?] " -0x4d94: "[?] " -0x4d95: "[?] " -0x4d96: "[?] " -0x4d97: "[?] " -0x4d98: "[?] " -0x4d99: "[?] " -0x4d9a: "[?] " -0x4d9b: "[?] " -0x4d9c: "[?] " -0x4d9d: "[?] " -0x4d9e: "[?] " -0x4d9f: "[?] " -0x4da0: "[?] " -0x4da1: "[?] " -0x4da2: "[?] " -0x4da3: "[?] " -0x4da4: "[?] " -0x4da5: "[?] " -0x4da6: "[?] " -0x4da7: "[?] " -0x4da8: "[?] " -0x4da9: "[?] " -0x4daa: "[?] " -0x4dab: "[?] " -0x4dac: "[?] " -0x4dad: "[?] " -0x4dae: "[?] " -0x4daf: "[?] " -0x4db0: "[?] " -0x4db1: "[?] " -0x4db2: "[?] " -0x4db3: "[?] " -0x4db4: "[?] " -0x4db5: "[?] " -0x4db6: "[?]" -0x4db7: "[?]" -0x4db8: "[?]" -0x4db9: "[?]" -0x4dba: "[?]" -0x4dbb: "[?]" -0x4dbc: "[?]" -0x4dbd: "[?]" -0x4dbe: "[?]" -0x4dbf: "[?]" -0x4dc0: "[?]" -0x4dc1: "[?]" -0x4dc2: "[?]" -0x4dc3: "[?]" -0x4dc4: "[?]" -0x4dc5: "[?]" -0x4dc6: "[?]" -0x4dc7: "[?]" -0x4dc8: "[?]" -0x4dc9: "[?]" -0x4dca: "[?]" -0x4dcb: "[?]" -0x4dcc: "[?]" -0x4dcd: "[?]" -0x4dce: "[?]" -0x4dcf: "[?]" -0x4dd0: "[?]" -0x4dd1: "[?]" -0x4dd2: "[?]" -0x4dd3: "[?]" -0x4dd4: "[?]" -0x4dd5: "[?]" -0x4dd6: "[?]" -0x4dd7: "[?]" -0x4dd8: "[?]" -0x4dd9: "[?]" -0x4dda: "[?]" -0x4ddb: "[?]" -0x4ddc: "[?]" -0x4ddd: "[?]" -0x4dde: "[?]" -0x4ddf: "[?]" -0x4de0: "[?]" -0x4de1: "[?]" -0x4de2: "[?]" -0x4de3: "[?]" -0x4de4: "[?]" -0x4de5: "[?]" -0x4de6: "[?]" -0x4de7: "[?]" -0x4de8: "[?]" -0x4de9: "[?]" -0x4dea: "[?]" -0x4deb: "[?]" -0x4dec: "[?]" -0x4ded: "[?]" -0x4dee: "[?]" -0x4def: "[?]" -0x4df0: "[?]" -0x4df1: "[?]" -0x4df2: "[?]" -0x4df3: "[?]" -0x4df4: "[?]" -0x4df5: "[?]" -0x4df6: "[?]" -0x4df7: "[?]" -0x4df8: "[?]" -0x4df9: "[?]" -0x4dfa: "[?]" -0x4dfb: "[?]" -0x4dfc: "[?]" -0x4dfd: "[?]" -0x4dfe: "[?]" -/* x04e */ -0x4e00: "[?] " -0x4e01: "Ding " -0x4e02: "Kao " -0x4e03: "Qi " -0x4e04: "Shang " -0x4e05: "Xia " -0x4e06: "[?] " -0x4e07: "Mo " -0x4e08: "Zhang " -0x4e09: "San " -0x4e0a: "Shang " -0x4e0b: "Xia " -0x4e0c: "Ji " -0x4e0d: "Bu " -0x4e0e: "Yu " -0x4e0f: "Mian " -0x4e10: "Gai " -0x4e11: "Chou " -0x4e12: "Chou " -0x4e13: "Zhuan " -0x4e14: "Qie " -0x4e15: "Pi " -0x4e16: "Shi " -0x4e17: "Shi " -0x4e18: "Qiu " -0x4e19: "Bing " -0x4e1a: "Ye " -0x4e1b: "Cong " -0x4e1c: "Dong " -0x4e1d: "Si " -0x4e1e: "Cheng " -0x4e1f: "Diu " -0x4e20: "Qiu " -0x4e21: "Liang " -0x4e22: "Diu " -0x4e23: "You " -0x4e24: "Liang " -0x4e25: "Yan " -0x4e26: "Bing " -0x4e27: "Sang " -0x4e28: "Gun " -0x4e29: "Jiu " -0x4e2a: "Ge " -0x4e2b: "Ya " -0x4e2c: "Qiang " -0x4e2d: "Zhong " -0x4e2e: "Ji " -0x4e2f: "Jie " -0x4e30: "Feng " -0x4e31: "Guan " -0x4e32: "Chuan " -0x4e33: "Chan " -0x4e34: "Lin " -0x4e35: "Zhuo " -0x4e36: "Zhu " -0x4e37: "Ha " -0x4e38: "Wan " -0x4e39: "Dan " -0x4e3a: "Wei " -0x4e3b: "Zhu " -0x4e3c: "Jing " -0x4e3d: "Li " -0x4e3e: "Ju " -0x4e3f: "Pie " -0x4e40: "Fu " -0x4e41: "Yi " -0x4e42: "Yi " -0x4e43: "Nai " -0x4e44: "Shime " -0x4e45: "Jiu " -0x4e46: "Jiu " -0x4e47: "Zhe " -0x4e48: "Yao " -0x4e49: "Yi " -0x4e4a: "[?] " -0x4e4b: "Zhi " -0x4e4c: "Wu " -0x4e4d: "Zha " -0x4e4e: "Hu " -0x4e4f: "Fa " -0x4e50: "Le " -0x4e51: "Zhong " -0x4e52: "Ping " -0x4e53: "Pang " -0x4e54: "Qiao " -0x4e55: "Hu " -0x4e56: "Guai " -0x4e57: "Cheng " -0x4e58: "Cheng " -0x4e59: "Yi " -0x4e5a: "Yin " -0x4e5b: "[?] " -0x4e5c: "Mie " -0x4e5d: "Jiu " -0x4e5e: "Qi " -0x4e5f: "Ye " -0x4e60: "Xi " -0x4e61: "Xiang " -0x4e62: "Gai " -0x4e63: "Diu " -0x4e64: "Hal " -0x4e65: "[?] " -0x4e66: "Shu " -0x4e67: "Twul " -0x4e68: "Shi " -0x4e69: "Ji " -0x4e6a: "Nang " -0x4e6b: "Jia " -0x4e6c: "Kel " -0x4e6d: "Shi " -0x4e6e: "[?] " -0x4e6f: "Ol " -0x4e70: "Mai " -0x4e71: "Luan " -0x4e72: "Cal " -0x4e73: "Ru " -0x4e74: "Xue " -0x4e75: "Yan " -0x4e76: "Fu " -0x4e77: "Sha " -0x4e78: "Na " -0x4e79: "Gan " -0x4e7a: "Sol " -0x4e7b: "El " -0x4e7c: "Cwul " -0x4e7d: "[?] " -0x4e7e: "Gan " -0x4e7f: "Chi " -0x4e80: "Gui " -0x4e81: "Gan " -0x4e82: "Luan " -0x4e83: "Lin " -0x4e84: "Yi " -0x4e85: "Jue " -0x4e86: "Liao " -0x4e87: "Ma " -0x4e88: "Yu " -0x4e89: "Zheng " -0x4e8a: "Shi " -0x4e8b: "Shi " -0x4e8c: "Er " -0x4e8d: "Chu " -0x4e8e: "Yu " -0x4e8f: "Yu " -0x4e90: "Yu " -0x4e91: "Yun " -0x4e92: "Hu " -0x4e93: "Qi " -0x4e94: "Wu " -0x4e95: "Jing " -0x4e96: "Si " -0x4e97: "Sui " -0x4e98: "Gen " -0x4e99: "Gen " -0x4e9a: "Ya " -0x4e9b: "Xie " -0x4e9c: "Ya " -0x4e9d: "Qi " -0x4e9e: "Ya " -0x4e9f: "Ji " -0x4ea0: "Tou " -0x4ea1: "Wang " -0x4ea2: "Kang " -0x4ea3: "Ta " -0x4ea4: "Jiao " -0x4ea5: "Hai " -0x4ea6: "Yi " -0x4ea7: "Chan " -0x4ea8: "Heng " -0x4ea9: "Mu " -0x4eaa: "[?] " -0x4eab: "Xiang " -0x4eac: "Jing " -0x4ead: "Ting " -0x4eae: "Liang " -0x4eaf: "Xiang " -0x4eb0: "Jing " -0x4eb1: "Ye " -0x4eb2: "Qin " -0x4eb3: "Bo " -0x4eb4: "You " -0x4eb5: "Xie " -0x4eb6: "Dan " -0x4eb7: "Lian " -0x4eb8: "Duo " -0x4eb9: "Wei " -0x4eba: "Ren " -0x4ebb: "Ren " -0x4ebc: "Ji " -0x4ebd: "La " -0x4ebe: "Wang " -0x4ebf: "Yi " -0x4ec0: "Shi " -0x4ec1: "Ren " -0x4ec2: "Le " -0x4ec3: "Ding " -0x4ec4: "Ze " -0x4ec5: "Jin " -0x4ec6: "Pu " -0x4ec7: "Chou " -0x4ec8: "Ba " -0x4ec9: "Zhang " -0x4eca: "Jin " -0x4ecb: "Jie " -0x4ecc: "Bing " -0x4ecd: "Reng " -0x4ece: "Cong " -0x4ecf: "Fo " -0x4ed0: "San " -0x4ed1: "Lun " -0x4ed2: "Sya " -0x4ed3: "Cang " -0x4ed4: "Zi " -0x4ed5: "Shi " -0x4ed6: "Ta " -0x4ed7: "Zhang " -0x4ed8: "Fu " -0x4ed9: "Xian " -0x4eda: "Xian " -0x4edb: "Tuo " -0x4edc: "Hong " -0x4edd: "Tong " -0x4ede: "Ren " -0x4edf: "Qian " -0x4ee0: "Gan " -0x4ee1: "Yi " -0x4ee2: "Di " -0x4ee3: "Dai " -0x4ee4: "Ling " -0x4ee5: "Yi " -0x4ee6: "Chao " -0x4ee7: "Chang " -0x4ee8: "Sa " -0x4ee9: "[?] " -0x4eea: "Yi " -0x4eeb: "Mu " -0x4eec: "Men " -0x4eed: "Ren " -0x4eee: "Jia " -0x4eef: "Chao " -0x4ef0: "Yang " -0x4ef1: "Qian " -0x4ef2: "Zhong " -0x4ef3: "Pi " -0x4ef4: "Wan " -0x4ef5: "Wu " -0x4ef6: "Jian " -0x4ef7: "Jie " -0x4ef8: "Yao " -0x4ef9: "Feng " -0x4efa: "Cang " -0x4efb: "Ren " -0x4efc: "Wang " -0x4efd: "Fen " -0x4efe: "Di " -0x4eff: "Fang " -/* x04f */ -0x4f00: "Zhong " -0x4f01: "Qi " -0x4f02: "Pei " -0x4f03: "Yu " -0x4f04: "Diao " -0x4f05: "Dun " -0x4f06: "Wen " -0x4f07: "Yi " -0x4f08: "Xin " -0x4f09: "Kang " -0x4f0a: "Yi " -0x4f0b: "Ji " -0x4f0c: "Ai " -0x4f0d: "Wu " -0x4f0e: "Ji " -0x4f0f: "Fu " -0x4f10: "Fa " -0x4f11: "Xiu " -0x4f12: "Jin " -0x4f13: "Bei " -0x4f14: "Dan " -0x4f15: "Fu " -0x4f16: "Tang " -0x4f17: "Zhong " -0x4f18: "You " -0x4f19: "Huo " -0x4f1a: "Hui " -0x4f1b: "Yu " -0x4f1c: "Cui " -0x4f1d: "Chuan " -0x4f1e: "San " -0x4f1f: "Wei " -0x4f20: "Chuan " -0x4f21: "Che " -0x4f22: "Ya " -0x4f23: "Xian " -0x4f24: "Shang " -0x4f25: "Chang " -0x4f26: "Lun " -0x4f27: "Cang " -0x4f28: "Xun " -0x4f29: "Xin " -0x4f2a: "Wei " -0x4f2b: "Zhu " -0x4f2c: "[?] " -0x4f2d: "Xuan " -0x4f2e: "Nu " -0x4f2f: "Bo " -0x4f30: "Gu " -0x4f31: "Ni " -0x4f32: "Ni " -0x4f33: "Xie " -0x4f34: "Ban " -0x4f35: "Xu " -0x4f36: "Ling " -0x4f37: "Zhou " -0x4f38: "Shen " -0x4f39: "Qu " -0x4f3a: "Si " -0x4f3b: "Beng " -0x4f3c: "Si " -0x4f3d: "Jia " -0x4f3e: "Pi " -0x4f3f: "Yi " -0x4f40: "Si " -0x4f41: "Ai " -0x4f42: "Zheng " -0x4f43: "Dian " -0x4f44: "Han " -0x4f45: "Mai " -0x4f46: "Dan " -0x4f47: "Zhu " -0x4f48: "Bu " -0x4f49: "Qu " -0x4f4a: "Bi " -0x4f4b: "Shao " -0x4f4c: "Ci " -0x4f4d: "Wei " -0x4f4e: "Di " -0x4f4f: "Zhu " -0x4f50: "Zuo " -0x4f51: "You " -0x4f52: "Yang " -0x4f53: "Ti " -0x4f54: "Zhan " -0x4f55: "He " -0x4f56: "Bi " -0x4f57: "Tuo " -0x4f58: "She " -0x4f59: "Yu " -0x4f5a: "Yi " -0x4f5b: "Fo " -0x4f5c: "Zuo " -0x4f5d: "Kou " -0x4f5e: "Ning " -0x4f5f: "Tong " -0x4f60: "Ni " -0x4f61: "Xuan " -0x4f62: "Qu " -0x4f63: "Yong " -0x4f64: "Wa " -0x4f65: "Qian " -0x4f66: "[?] " -0x4f67: "Ka " -0x4f68: "[?] " -0x4f69: "Pei " -0x4f6a: "Huai " -0x4f6b: "He " -0x4f6c: "Lao " -0x4f6d: "Xiang " -0x4f6e: "Ge " -0x4f6f: "Yang " -0x4f70: "Bai " -0x4f71: "Fa " -0x4f72: "Ming " -0x4f73: "Jia " -0x4f74: "Er " -0x4f75: "Bing " -0x4f76: "Ji " -0x4f77: "Hen " -0x4f78: "Huo " -0x4f79: "Gui " -0x4f7a: "Quan " -0x4f7b: "Tiao " -0x4f7c: "Jiao " -0x4f7d: "Ci " -0x4f7e: "Yi " -0x4f7f: "Shi " -0x4f80: "Xing " -0x4f81: "Shen " -0x4f82: "Tuo " -0x4f83: "Kan " -0x4f84: "Zhi " -0x4f85: "Gai " -0x4f86: "Lai " -0x4f87: "Yi " -0x4f88: "Chi " -0x4f89: "Kua " -0x4f8a: "Guang " -0x4f8b: "Li " -0x4f8c: "Yin " -0x4f8d: "Shi " -0x4f8e: "Mi " -0x4f8f: "Zhu " -0x4f90: "Xu " -0x4f91: "You " -0x4f92: "An " -0x4f93: "Lu " -0x4f94: "Mou " -0x4f95: "Er " -0x4f96: "Lun " -0x4f97: "Tong " -0x4f98: "Cha " -0x4f99: "Chi " -0x4f9a: "Xun " -0x4f9b: "Gong " -0x4f9c: "Zhou " -0x4f9d: "Yi " -0x4f9e: "Ru " -0x4f9f: "Jian " -0x4fa0: "Xia " -0x4fa1: "Jia " -0x4fa2: "Zai " -0x4fa3: "Lu " -0x4fa4: "Ko " -0x4fa5: "Jiao " -0x4fa6: "Zhen " -0x4fa7: "Ce " -0x4fa8: "Qiao " -0x4fa9: "Kuai " -0x4faa: "Chai " -0x4fab: "Ning " -0x4fac: "Nong " -0x4fad: "Jin " -0x4fae: "Wu " -0x4faf: "Hou " -0x4fb0: "Jiong " -0x4fb1: "Cheng " -0x4fb2: "Zhen " -0x4fb3: "Zuo " -0x4fb4: "Chou " -0x4fb5: "Qin " -0x4fb6: "Lu " -0x4fb7: "Ju " -0x4fb8: "Shu " -0x4fb9: "Ting " -0x4fba: "Shen " -0x4fbb: "Tuo " -0x4fbc: "Bo " -0x4fbd: "Nan " -0x4fbe: "Hao " -0x4fbf: "Bian " -0x4fc0: "Tui " -0x4fc1: "Yu " -0x4fc2: "Xi " -0x4fc3: "Cu " -0x4fc4: "E " -0x4fc5: "Qiu " -0x4fc6: "Xu " -0x4fc7: "Kuang " -0x4fc8: "Ku " -0x4fc9: "Wu " -0x4fca: "Jun " -0x4fcb: "Yi " -0x4fcc: "Fu " -0x4fcd: "Lang " -0x4fce: "Zu " -0x4fcf: "Qiao " -0x4fd0: "Li " -0x4fd1: "Yong " -0x4fd2: "Hun " -0x4fd3: "Jing " -0x4fd4: "Xian " -0x4fd5: "San " -0x4fd6: "Pai " -0x4fd7: "Su " -0x4fd8: "Fu " -0x4fd9: "Xi " -0x4fda: "Li " -0x4fdb: "Fu " -0x4fdc: "Ping " -0x4fdd: "Bao " -0x4fde: "Yu " -0x4fdf: "Si " -0x4fe0: "Xia " -0x4fe1: "Xin " -0x4fe2: "Xiu " -0x4fe3: "Yu " -0x4fe4: "Ti " -0x4fe5: "Che " -0x4fe6: "Chou " -0x4fe7: "[?] " -0x4fe8: "Yan " -0x4fe9: "Lia " -0x4fea: "Li " -0x4feb: "Lai " -0x4fec: "[?] " -0x4fed: "Jian " -0x4fee: "Xiu " -0x4fef: "Fu " -0x4ff0: "He " -0x4ff1: "Ju " -0x4ff2: "Xiao " -0x4ff3: "Pai " -0x4ff4: "Jian " -0x4ff5: "Biao " -0x4ff6: "Chu " -0x4ff7: "Fei " -0x4ff8: "Feng " -0x4ff9: "Ya " -0x4ffa: "An " -0x4ffb: "Bei " -0x4ffc: "Yu " -0x4ffd: "Xin " -0x4ffe: "Bi " -0x4fff: "Jian " -/* x050 */ -0x5000: "Chang " -0x5001: "Chi " -0x5002: "Bing " -0x5003: "Zan " -0x5004: "Yao " -0x5005: "Cui " -0x5006: "Lia " -0x5007: "Wan " -0x5008: "Lai " -0x5009: "Cang " -0x500a: "Zong " -0x500b: "Ge " -0x500c: "Guan " -0x500d: "Bei " -0x500e: "Tian " -0x500f: "Shu " -0x5010: "Shu " -0x5011: "Men " -0x5012: "Dao " -0x5013: "Tan " -0x5014: "Jue " -0x5015: "Chui " -0x5016: "Xing " -0x5017: "Peng " -0x5018: "Tang " -0x5019: "Hou " -0x501a: "Yi " -0x501b: "Qi " -0x501c: "Ti " -0x501d: "Gan " -0x501e: "Jing " -0x501f: "Jie " -0x5020: "Sui " -0x5021: "Chang " -0x5022: "Jie " -0x5023: "Fang " -0x5024: "Zhi " -0x5025: "Kong " -0x5026: "Juan " -0x5027: "Zong " -0x5028: "Ju " -0x5029: "Qian " -0x502a: "Ni " -0x502b: "Lun " -0x502c: "Zhuo " -0x502d: "Wei " -0x502e: "Luo " -0x502f: "Song " -0x5030: "Leng " -0x5031: "Hun " -0x5032: "Dong " -0x5033: "Zi " -0x5034: "Ben " -0x5035: "Wu " -0x5036: "Ju " -0x5037: "Nai " -0x5038: "Cai " -0x5039: "Jian " -0x503a: "Zhai " -0x503b: "Ye " -0x503c: "Zhi " -0x503d: "Sha " -0x503e: "Qing " -0x503f: "[?] " -0x5040: "Ying " -0x5041: "Cheng " -0x5042: "Jian " -0x5043: "Yan " -0x5044: "Nuan " -0x5045: "Zhong " -0x5046: "Chun " -0x5047: "Jia " -0x5048: "Jie " -0x5049: "Wei " -0x504a: "Yu " -0x504b: "Bing " -0x504c: "Ruo " -0x504d: "Ti " -0x504e: "Wei " -0x504f: "Pian " -0x5050: "Yan " -0x5051: "Feng " -0x5052: "Tang " -0x5053: "Wo " -0x5054: "E " -0x5055: "Xie " -0x5056: "Che " -0x5057: "Sheng " -0x5058: "Kan " -0x5059: "Di " -0x505a: "Zuo " -0x505b: "Cha " -0x505c: "Ting " -0x505d: "Bei " -0x505e: "Ye " -0x505f: "Huang " -0x5060: "Yao " -0x5061: "Zhan " -0x5062: "Chou " -0x5063: "Yan " -0x5064: "You " -0x5065: "Jian " -0x5066: "Xu " -0x5067: "Zha " -0x5068: "Ci " -0x5069: "Fu " -0x506a: "Bi " -0x506b: "Zhi " -0x506c: "Zong " -0x506d: "Mian " -0x506e: "Ji " -0x506f: "Yi " -0x5070: "Xie " -0x5071: "Xun " -0x5072: "Si " -0x5073: "Duan " -0x5074: "Ce " -0x5075: "Zhen " -0x5076: "Ou " -0x5077: "Tou " -0x5078: "Tou " -0x5079: "Bei " -0x507a: "Za " -0x507b: "Lu " -0x507c: "Jie " -0x507d: "Wei " -0x507e: "Fen " -0x507f: "Chang " -0x5080: "Gui " -0x5081: "Sou " -0x5082: "Zhi " -0x5083: "Su " -0x5084: "Xia " -0x5085: "Fu " -0x5086: "Yuan " -0x5087: "Rong " -0x5088: "Li " -0x5089: "Ru " -0x508a: "Yun " -0x508b: "Gou " -0x508c: "Ma " -0x508d: "Bang " -0x508e: "Dian " -0x508f: "Tang " -0x5090: "Hao " -0x5091: "Jie " -0x5092: "Xi " -0x5093: "Shan " -0x5094: "Qian " -0x5095: "Jue " -0x5096: "Cang " -0x5097: "Chu " -0x5098: "San " -0x5099: "Bei " -0x509a: "Xiao " -0x509b: "Yong " -0x509c: "Yao " -0x509d: "Tan " -0x509e: "Suo " -0x509f: "Yang " -0x50a0: "Fa " -0x50a1: "Bing " -0x50a2: "Jia " -0x50a3: "Dai " -0x50a4: "Zai " -0x50a5: "Tang " -0x50a6: "[?] " -0x50a7: "Bin " -0x50a8: "Chu " -0x50a9: "Nuo " -0x50aa: "Can " -0x50ab: "Lei " -0x50ac: "Cui " -0x50ad: "Yong " -0x50ae: "Zao " -0x50af: "Zong " -0x50b0: "Peng " -0x50b1: "Song " -0x50b2: "Ao " -0x50b3: "Chuan " -0x50b4: "Yu " -0x50b5: "Zhai " -0x50b6: "Cou " -0x50b7: "Shang " -0x50b8: "Qiang " -0x50b9: "Jing " -0x50ba: "Chi " -0x50bb: "Sha " -0x50bc: "Han " -0x50bd: "Zhang " -0x50be: "Qing " -0x50bf: "Yan " -0x50c0: "Di " -0x50c1: "Xi " -0x50c2: "Lu " -0x50c3: "Bei " -0x50c4: "Piao " -0x50c5: "Jin " -0x50c6: "Lian " -0x50c7: "Lu " -0x50c8: "Man " -0x50c9: "Qian " -0x50ca: "Xian " -0x50cb: "Tan " -0x50cc: "Ying " -0x50cd: "Dong " -0x50ce: "Zhuan " -0x50cf: "Xiang " -0x50d0: "Shan " -0x50d1: "Qiao " -0x50d2: "Jiong " -0x50d3: "Tui " -0x50d4: "Zun " -0x50d5: "Pu " -0x50d6: "Xi " -0x50d7: "Lao " -0x50d8: "Chang " -0x50d9: "Guang " -0x50da: "Liao " -0x50db: "Qi " -0x50dc: "Deng " -0x50dd: "Chan " -0x50de: "Wei " -0x50df: "Ji " -0x50e0: "Fan " -0x50e1: "Hui " -0x50e2: "Chuan " -0x50e3: "Jian " -0x50e4: "Dan " -0x50e5: "Jiao " -0x50e6: "Jiu " -0x50e7: "Seng " -0x50e8: "Fen " -0x50e9: "Xian " -0x50ea: "Jue " -0x50eb: "E " -0x50ec: "Jiao " -0x50ed: "Jian " -0x50ee: "Tong " -0x50ef: "Lin " -0x50f0: "Bo " -0x50f1: "Gu " -0x50f2: "[?] " -0x50f3: "Su " -0x50f4: "Xian " -0x50f5: "Jiang " -0x50f6: "Min " -0x50f7: "Ye " -0x50f8: "Jin " -0x50f9: "Jia " -0x50fa: "Qiao " -0x50fb: "Pi " -0x50fc: "Feng " -0x50fd: "Zhou " -0x50fe: "Ai " -0x50ff: "Sai " -/* x051 */ -0x5100: "Yi " -0x5101: "Jun " -0x5102: "Nong " -0x5103: "Chan " -0x5104: "Yi " -0x5105: "Dang " -0x5106: "Jing " -0x5107: "Xuan " -0x5108: "Kuai " -0x5109: "Jian " -0x510a: "Chu " -0x510b: "Dan " -0x510c: "Jiao " -0x510d: "Sha " -0x510e: "Zai " -0x510f: "[?] " -0x5110: "Bin " -0x5111: "An " -0x5112: "Ru " -0x5113: "Tai " -0x5114: "Chou " -0x5115: "Chai " -0x5116: "Lan " -0x5117: "Ni " -0x5118: "Jin " -0x5119: "Qian " -0x511a: "Meng " -0x511b: "Wu " -0x511c: "Ning " -0x511d: "Qiong " -0x511e: "Ni " -0x511f: "Chang " -0x5120: "Lie " -0x5121: "Lei " -0x5122: "Lu " -0x5123: "Kuang " -0x5124: "Bao " -0x5125: "Du " -0x5126: "Biao " -0x5127: "Zan " -0x5128: "Zhi " -0x5129: "Si " -0x512a: "You " -0x512b: "Hao " -0x512c: "Chen " -0x512d: "Chen " -0x512e: "Li " -0x512f: "Teng " -0x5130: "Wei " -0x5131: "Long " -0x5132: "Chu " -0x5133: "Chan " -0x5134: "Rang " -0x5135: "Shu " -0x5136: "Hui " -0x5137: "Li " -0x5138: "Luo " -0x5139: "Zan " -0x513a: "Nuo " -0x513b: "Tang " -0x513c: "Yan " -0x513d: "Lei " -0x513e: "Nang " -0x513f: "Er " -0x5140: "Wu " -0x5141: "Yun " -0x5142: "Zan " -0x5143: "Yuan " -0x5144: "Xiong " -0x5145: "Chong " -0x5146: "Zhao " -0x5147: "Xiong " -0x5148: "Xian " -0x5149: "Guang " -0x514a: "Dui " -0x514b: "Ke " -0x514c: "Dui " -0x514d: "Mian " -0x514e: "Tu " -0x514f: "Chang " -0x5150: "Er " -0x5151: "Dui " -0x5152: "Er " -0x5153: "Xin " -0x5154: "Tu " -0x5155: "Si " -0x5156: "Yan " -0x5157: "Yan " -0x5158: "Shi " -0x5159: "Shi " -0x515a: "Dang " -0x515b: "Qian " -0x515c: "Dou " -0x515d: "Fen " -0x515e: "Mao " -0x515f: "Shen " -0x5160: "Dou " -0x5161: "Bai " -0x5162: "Jing " -0x5163: "Li " -0x5164: "Huang " -0x5165: "Ru " -0x5166: "Wang " -0x5167: "Nei " -0x5168: "Quan " -0x5169: "Liang " -0x516a: "Yu " -0x516b: "Ba " -0x516c: "Gong " -0x516d: "Liu " -0x516e: "Xi " -0x516f: "[?] " -0x5170: "Lan " -0x5171: "Gong " -0x5172: "Tian " -0x5173: "Guan " -0x5174: "Xing " -0x5175: "Bing " -0x5176: "Qi " -0x5177: "Ju " -0x5178: "Dian " -0x5179: "Zi " -0x517a: "Ppwun " -0x517b: "Yang " -0x517c: "Jian " -0x517d: "Shou " -0x517e: "Ji " -0x517f: "Yi " -0x5180: "Ji " -0x5181: "Chan " -0x5182: "Jiong " -0x5183: "Mao " -0x5184: "Ran " -0x5185: "Nei " -0x5186: "Yuan " -0x5187: "Mao " -0x5188: "Gang " -0x5189: "Ran " -0x518a: "Ce " -0x518b: "Jiong " -0x518c: "Ce " -0x518d: "Zai " -0x518e: "Gua " -0x518f: "Jiong " -0x5190: "Mao " -0x5191: "Zhou " -0x5192: "Mou " -0x5193: "Gou " -0x5194: "Xu " -0x5195: "Mian " -0x5196: "Mi " -0x5197: "Rong " -0x5198: "Yin " -0x5199: "Xie " -0x519a: "Kan " -0x519b: "Jun " -0x519c: "Nong " -0x519d: "Yi " -0x519e: "Mi " -0x519f: "Shi " -0x51a0: "Guan " -0x51a1: "Meng " -0x51a2: "Zhong " -0x51a3: "Ju " -0x51a4: "Yuan " -0x51a5: "Ming " -0x51a6: "Kou " -0x51a7: "Lam " -0x51a8: "Fu " -0x51a9: "Xie " -0x51aa: "Mi " -0x51ab: "Bing " -0x51ac: "Dong " -0x51ad: "Tai " -0x51ae: "Gang " -0x51af: "Feng " -0x51b0: "Bing " -0x51b1: "Hu " -0x51b2: "Chong " -0x51b3: "Jue " -0x51b4: "Hu " -0x51b5: "Kuang " -0x51b6: "Ye " -0x51b7: "Leng " -0x51b8: "Pan " -0x51b9: "Fu " -0x51ba: "Min " -0x51bb: "Dong " -0x51bc: "Xian " -0x51bd: "Lie " -0x51be: "Xia " -0x51bf: "Jian " -0x51c0: "Jing " -0x51c1: "Shu " -0x51c2: "Mei " -0x51c3: "Tu " -0x51c4: "Qi " -0x51c5: "Gu " -0x51c6: "Zhun " -0x51c7: "Song " -0x51c8: "Jing " -0x51c9: "Liang " -0x51ca: "Qing " -0x51cb: "Diao " -0x51cc: "Ling " -0x51cd: "Dong " -0x51ce: "Gan " -0x51cf: "Jian " -0x51d0: "Yin " -0x51d1: "Cou " -0x51d2: "Yi " -0x51d3: "Li " -0x51d4: "Cang " -0x51d5: "Ming " -0x51d6: "Zhuen " -0x51d7: "Cui " -0x51d8: "Si " -0x51d9: "Duo " -0x51da: "Jin " -0x51db: "Lin " -0x51dc: "Lin " -0x51dd: "Ning " -0x51de: "Xi " -0x51df: "Du " -0x51e0: "Ji " -0x51e1: "Fan " -0x51e2: "Fan " -0x51e3: "Fan " -0x51e4: "Feng " -0x51e5: "Ju " -0x51e6: "Chu " -0x51e7: "Tako " -0x51e8: "Feng " -0x51e9: "Mok " -0x51ea: "Ci " -0x51eb: "Fu " -0x51ec: "Feng " -0x51ed: "Ping " -0x51ee: "Feng " -0x51ef: "Kai " -0x51f0: "Huang " -0x51f1: "Kai " -0x51f2: "Gan " -0x51f3: "Deng " -0x51f4: "Ping " -0x51f5: "Qu " -0x51f6: "Xiong " -0x51f7: "Kuai " -0x51f8: "Tu " -0x51f9: "Ao " -0x51fa: "Chu " -0x51fb: "Ji " -0x51fc: "Dang " -0x51fd: "Han " -0x51fe: "Han " -0x51ff: "Zao " -/* x052 */ -0x5200: "Dao " -0x5201: "Diao " -0x5202: "Dao " -0x5203: "Ren " -0x5204: "Ren " -0x5205: "Chuang " -0x5206: "Fen " -0x5207: "Qie " -0x5208: "Yi " -0x5209: "Ji " -0x520a: "Kan " -0x520b: "Qian " -0x520c: "Cun " -0x520d: "Chu " -0x520e: "Wen " -0x520f: "Ji " -0x5210: "Dan " -0x5211: "Xing " -0x5212: "Hua " -0x5213: "Wan " -0x5214: "Jue " -0x5215: "Li " -0x5216: "Yue " -0x5217: "Lie " -0x5218: "Liu " -0x5219: "Ze " -0x521a: "Gang " -0x521b: "Chuang " -0x521c: "Fu " -0x521d: "Chu " -0x521e: "Qu " -0x521f: "Ju " -0x5220: "Shan " -0x5221: "Min " -0x5222: "Ling " -0x5223: "Zhong " -0x5224: "Pan " -0x5225: "Bie " -0x5226: "Jie " -0x5227: "Jie " -0x5228: "Bao " -0x5229: "Li " -0x522a: "Shan " -0x522b: "Bie " -0x522c: "Chan " -0x522d: "Jing " -0x522e: "Gua " -0x522f: "Gen " -0x5230: "Dao " -0x5231: "Chuang " -0x5232: "Kui " -0x5233: "Ku " -0x5234: "Duo " -0x5235: "Er " -0x5236: "Zhi " -0x5237: "Shua " -0x5238: "Quan " -0x5239: "Cha " -0x523a: "Ci " -0x523b: "Ke " -0x523c: "Jie " -0x523d: "Gui " -0x523e: "Ci " -0x523f: "Gui " -0x5240: "Kai " -0x5241: "Duo " -0x5242: "Ji " -0x5243: "Ti " -0x5244: "Jing " -0x5245: "Lou " -0x5246: "Gen " -0x5247: "Ze " -0x5248: "Yuan " -0x5249: "Cuo " -0x524a: "Xue " -0x524b: "Ke " -0x524c: "La " -0x524d: "Qian " -0x524e: "Cha " -0x524f: "Chuang " -0x5250: "Gua " -0x5251: "Jian " -0x5252: "Cuo " -0x5253: "Li " -0x5254: "Ti " -0x5255: "Fei " -0x5256: "Pou " -0x5257: "Chan " -0x5258: "Qi " -0x5259: "Chuang " -0x525a: "Zi " -0x525b: "Gang " -0x525c: "Wan " -0x525d: "Bo " -0x525e: "Ji " -0x525f: "Duo " -0x5260: "Qing " -0x5261: "Yan " -0x5262: "Zhuo " -0x5263: "Jian " -0x5264: "Ji " -0x5265: "Bo " -0x5266: "Yan " -0x5267: "Ju " -0x5268: "Huo " -0x5269: "Sheng " -0x526a: "Jian " -0x526b: "Duo " -0x526c: "Duan " -0x526d: "Wu " -0x526e: "Gua " -0x526f: "Fu " -0x5270: "Sheng " -0x5271: "Jian " -0x5272: "Ge " -0x5273: "Zha " -0x5274: "Kai " -0x5275: "Chuang " -0x5276: "Juan " -0x5277: "Chan " -0x5278: "Tuan " -0x5279: "Lu " -0x527a: "Li " -0x527b: "Fou " -0x527c: "Shan " -0x527d: "Piao " -0x527e: "Kou " -0x527f: "Jiao " -0x5280: "Gua " -0x5281: "Qiao " -0x5282: "Jue " -0x5283: "Hua " -0x5284: "Zha " -0x5285: "Zhuo " -0x5286: "Lian " -0x5287: "Ju " -0x5288: "Pi " -0x5289: "Liu " -0x528a: "Gui " -0x528b: "Jiao " -0x528c: "Gui " -0x528d: "Jian " -0x528e: "Jian " -0x528f: "Tang " -0x5290: "Huo " -0x5291: "Ji " -0x5292: "Jian " -0x5293: "Yi " -0x5294: "Jian " -0x5295: "Zhi " -0x5296: "Chan " -0x5297: "Cuan " -0x5298: "Mo " -0x5299: "Li " -0x529a: "Zhu " -0x529b: "Li " -0x529c: "Ya " -0x529d: "Quan " -0x529e: "Ban " -0x529f: "Gong " -0x52a0: "Jia " -0x52a1: "Wu " -0x52a2: "Mai " -0x52a3: "Lie " -0x52a4: "Jin " -0x52a5: "Keng " -0x52a6: "Xie " -0x52a7: "Zhi " -0x52a8: "Dong " -0x52a9: "Zhu " -0x52aa: "Nu " -0x52ab: "Jie " -0x52ac: "Qu " -0x52ad: "Shao " -0x52ae: "Yi " -0x52af: "Zhu " -0x52b0: "Miao " -0x52b1: "Li " -0x52b2: "Jing " -0x52b3: "Lao " -0x52b4: "Lao " -0x52b5: "Juan " -0x52b6: "Kou " -0x52b7: "Yang " -0x52b8: "Wa " -0x52b9: "Xiao " -0x52ba: "Mou " -0x52bb: "Kuang " -0x52bc: "Jie " -0x52bd: "Lie " -0x52be: "He " -0x52bf: "Shi " -0x52c0: "Ke " -0x52c1: "Jing " -0x52c2: "Hao " -0x52c3: "Bo " -0x52c4: "Min " -0x52c5: "Chi " -0x52c6: "Lang " -0x52c7: "Yong " -0x52c8: "Yong " -0x52c9: "Mian " -0x52ca: "Ke " -0x52cb: "Xun " -0x52cc: "Juan " -0x52cd: "Qing " -0x52ce: "Lu " -0x52cf: "Pou " -0x52d0: "Meng " -0x52d1: "Lai " -0x52d2: "Le " -0x52d3: "Kai " -0x52d4: "Mian " -0x52d5: "Dong " -0x52d6: "Xu " -0x52d7: "Xu " -0x52d8: "Kan " -0x52d9: "Wu " -0x52da: "Yi " -0x52db: "Xun " -0x52dc: "Weng " -0x52dd: "Sheng " -0x52de: "Lao " -0x52df: "Mu " -0x52e0: "Lu " -0x52e1: "Piao " -0x52e2: "Shi " -0x52e3: "Ji " -0x52e4: "Qin " -0x52e5: "Qiang " -0x52e6: "Jiao " -0x52e7: "Quan " -0x52e8: "Yang " -0x52e9: "Yi " -0x52ea: "Jue " -0x52eb: "Fan " -0x52ec: "Juan " -0x52ed: "Tong " -0x52ee: "Ju " -0x52ef: "Dan " -0x52f0: "Xie " -0x52f1: "Mai " -0x52f2: "Xun " -0x52f3: "Xun " -0x52f4: "Lu " -0x52f5: "Li " -0x52f6: "Che " -0x52f7: "Rang " -0x52f8: "Quan " -0x52f9: "Bao " -0x52fa: "Shao " -0x52fb: "Yun " -0x52fc: "Jiu " -0x52fd: "Bao " -0x52fe: "Gou " -0x52ff: "Wu " -/* x053 */ -0x5300: "Yun " -0x5301: "Mwun " -0x5302: "Nay " -0x5303: "Gai " -0x5304: "Gai " -0x5305: "Bao " -0x5306: "Cong " -0x5307: "[?] " -0x5308: "Xiong " -0x5309: "Peng " -0x530a: "Ju " -0x530b: "Tao " -0x530c: "Ge " -0x530d: "Pu " -0x530e: "An " -0x530f: "Pao " -0x5310: "Fu " -0x5311: "Gong " -0x5312: "Da " -0x5313: "Jiu " -0x5314: "Qiong " -0x5315: "Bi " -0x5316: "Hua " -0x5317: "Bei " -0x5318: "Nao " -0x5319: "Chi " -0x531a: "Fang " -0x531b: "Jiu " -0x531c: "Yi " -0x531d: "Za " -0x531e: "Jiang " -0x531f: "Kang " -0x5320: "Jiang " -0x5321: "Kuang " -0x5322: "Hu " -0x5323: "Xia " -0x5324: "Qu " -0x5325: "Bian " -0x5326: "Gui " -0x5327: "Qie " -0x5328: "Zang " -0x5329: "Kuang " -0x532a: "Fei " -0x532b: "Hu " -0x532c: "Tou " -0x532d: "Gui " -0x532e: "Gui " -0x532f: "Hui " -0x5330: "Dan " -0x5331: "Gui " -0x5332: "Lian " -0x5333: "Lian " -0x5334: "Suan " -0x5335: "Du " -0x5336: "Jiu " -0x5337: "Qu " -0x5338: "Xi " -0x5339: "Pi " -0x533a: "Qu " -0x533b: "Yi " -0x533c: "Qia " -0x533d: "Yan " -0x533e: "Bian " -0x533f: "Ni " -0x5340: "Qu " -0x5341: "Shi " -0x5342: "Xin " -0x5343: "Qian " -0x5344: "Nian " -0x5345: "Sa " -0x5346: "Zu " -0x5347: "Sheng " -0x5348: "Wu " -0x5349: "Hui " -0x534a: "Ban " -0x534b: "Shi " -0x534c: "Xi " -0x534d: "Wan " -0x534e: "Hua " -0x534f: "Xie " -0x5350: "Wan " -0x5351: "Bei " -0x5352: "Zu " -0x5353: "Zhuo " -0x5354: "Xie " -0x5355: "Dan " -0x5356: "Mai " -0x5357: "Nan " -0x5358: "Dan " -0x5359: "Ji " -0x535a: "Bo " -0x535b: "Shuai " -0x535c: "Bu " -0x535d: "Kuang " -0x535e: "Bian " -0x535f: "Bu " -0x5360: "Zhan " -0x5361: "Qia " -0x5362: "Lu " -0x5363: "You " -0x5364: "Lu " -0x5365: "Xi " -0x5366: "Gua " -0x5367: "Wo " -0x5368: "Xie " -0x5369: "Jie " -0x536a: "Jie " -0x536b: "Wei " -0x536c: "Ang " -0x536d: "Qiong " -0x536e: "Zhi " -0x536f: "Mao " -0x5370: "Yin " -0x5371: "Wei " -0x5372: "Shao " -0x5373: "Ji " -0x5374: "Que " -0x5375: "Luan " -0x5376: "Shi " -0x5377: "Juan " -0x5378: "Xie " -0x5379: "Xu " -0x537a: "Jin " -0x537b: "Que " -0x537c: "Wu " -0x537d: "Ji " -0x537e: "E " -0x537f: "Qing " -0x5380: "Xi " -0x5381: "[?] " -0x5382: "Han " -0x5383: "Zhan " -0x5384: "E " -0x5385: "Ting " -0x5386: "Li " -0x5387: "Zhe " -0x5388: "Han " -0x5389: "Li " -0x538a: "Ya " -0x538b: "Ya " -0x538c: "Yan " -0x538d: "She " -0x538e: "Zhi " -0x538f: "Zha " -0x5390: "Pang " -0x5391: "[?] " -0x5392: "He " -0x5393: "Ya " -0x5394: "Zhi " -0x5395: "Ce " -0x5396: "Pang " -0x5397: "Ti " -0x5398: "Li " -0x5399: "She " -0x539a: "Hou " -0x539b: "Ting " -0x539c: "Zui " -0x539d: "Cuo " -0x539e: "Fei " -0x539f: "Yuan " -0x53a0: "Ce " -0x53a1: "Yuan " -0x53a2: "Xiang " -0x53a3: "Yan " -0x53a4: "Li " -0x53a5: "Jue " -0x53a6: "Sha " -0x53a7: "Dian " -0x53a8: "Chu " -0x53a9: "Jiu " -0x53aa: "Qin " -0x53ab: "Ao " -0x53ac: "Gui " -0x53ad: "Yan " -0x53ae: "Si " -0x53af: "Li " -0x53b0: "Chang " -0x53b1: "Lan " -0x53b2: "Li " -0x53b3: "Yan " -0x53b4: "Yan " -0x53b5: "Yuan " -0x53b6: "Si " -0x53b7: "Gong " -0x53b8: "Lin " -0x53b9: "Qiu " -0x53ba: "Qu " -0x53bb: "Qu " -0x53bc: "Uk " -0x53bd: "Lei " -0x53be: "Du " -0x53bf: "Xian " -0x53c0: "Zhuan " -0x53c1: "San " -0x53c2: "Can " -0x53c3: "Can " -0x53c4: "Can " -0x53c5: "Can " -0x53c6: "Ai " -0x53c7: "Dai " -0x53c8: "You " -0x53c9: "Cha " -0x53ca: "Ji " -0x53cb: "You " -0x53cc: "Shuang " -0x53cd: "Fan " -0x53ce: "Shou " -0x53cf: "Guai " -0x53d0: "Ba " -0x53d1: "Fa " -0x53d2: "Ruo " -0x53d3: "Shi " -0x53d4: "Shu " -0x53d5: "Zhuo " -0x53d6: "Qu " -0x53d7: "Shou " -0x53d8: "Bian " -0x53d9: "Xu " -0x53da: "Jia " -0x53db: "Pan " -0x53dc: "Sou " -0x53dd: "Gao " -0x53de: "Wei " -0x53df: "Sou " -0x53e0: "Die " -0x53e1: "Rui " -0x53e2: "Cong " -0x53e3: "Kou " -0x53e4: "Gu " -0x53e5: "Ju " -0x53e6: "Ling " -0x53e7: "Gua " -0x53e8: "Tao " -0x53e9: "Kou " -0x53ea: "Zhi " -0x53eb: "Jiao " -0x53ec: "Zhao " -0x53ed: "Ba " -0x53ee: "Ding " -0x53ef: "Ke " -0x53f0: "Tai " -0x53f1: "Chi " -0x53f2: "Shi " -0x53f3: "You " -0x53f4: "Qiu " -0x53f5: "Po " -0x53f6: "Xie " -0x53f7: "Hao " -0x53f8: "Si " -0x53f9: "Tan " -0x53fa: "Chi " -0x53fb: "Le " -0x53fc: "Diao " -0x53fd: "Ji " -0x53fe: "[?] " -0x53ff: "Hong " -/* x054 */ -0x5400: "Mie " -0x5401: "Xu " -0x5402: "Mang " -0x5403: "Chi " -0x5404: "Ge " -0x5405: "Xuan " -0x5406: "Yao " -0x5407: "Zi " -0x5408: "He " -0x5409: "Ji " -0x540a: "Diao " -0x540b: "Cun " -0x540c: "Tong " -0x540d: "Ming " -0x540e: "Hou " -0x540f: "Li " -0x5410: "Tu " -0x5411: "Xiang " -0x5412: "Zha " -0x5413: "Xia " -0x5414: "Ye " -0x5415: "Lu " -0x5416: "A " -0x5417: "Ma " -0x5418: "Ou " -0x5419: "Xue " -0x541a: "Yi " -0x541b: "Jun " -0x541c: "Chou " -0x541d: "Lin " -0x541e: "Tun " -0x541f: "Yin " -0x5420: "Fei " -0x5421: "Bi " -0x5422: "Qin " -0x5423: "Qin " -0x5424: "Jie " -0x5425: "Bu " -0x5426: "Fou " -0x5427: "Ba " -0x5428: "Dun " -0x5429: "Fen " -0x542a: "E " -0x542b: "Han " -0x542c: "Ting " -0x542d: "Hang " -0x542e: "Shun " -0x542f: "Qi " -0x5430: "Hong " -0x5431: "Zhi " -0x5432: "Shen " -0x5433: "Wu " -0x5434: "Wu " -0x5435: "Chao " -0x5436: "Ne " -0x5437: "Xue " -0x5438: "Xi " -0x5439: "Chui " -0x543a: "Dou " -0x543b: "Wen " -0x543c: "Hou " -0x543d: "Ou " -0x543e: "Wu " -0x543f: "Gao " -0x5440: "Ya " -0x5441: "Jun " -0x5442: "Lu " -0x5443: "E " -0x5444: "Ge " -0x5445: "Mei " -0x5446: "Ai " -0x5447: "Qi " -0x5448: "Cheng " -0x5449: "Wu " -0x544a: "Gao " -0x544b: "Fu " -0x544c: "Jiao " -0x544d: "Hong " -0x544e: "Chi " -0x544f: "Sheng " -0x5450: "Ne " -0x5451: "Tun " -0x5452: "Fu " -0x5453: "Yi " -0x5454: "Dai " -0x5455: "Ou " -0x5456: "Li " -0x5457: "Bai " -0x5458: "Yuan " -0x5459: "Kuai " -0x545a: "[?] " -0x545b: "Qiang " -0x545c: "Wu " -0x545d: "E " -0x545e: "Shi " -0x545f: "Quan " -0x5460: "Pen " -0x5461: "Wen " -0x5462: "Ni " -0x5463: "M " -0x5464: "Ling " -0x5465: "Ran " -0x5466: "You " -0x5467: "Di " -0x5468: "Zhou " -0x5469: "Shi " -0x546a: "Zhou " -0x546b: "Tie " -0x546c: "Xi " -0x546d: "Yi " -0x546e: "Qi " -0x546f: "Ping " -0x5470: "Zi " -0x5471: "Gu " -0x5472: "Zi " -0x5473: "Wei " -0x5474: "Xu " -0x5475: "He " -0x5476: "Nao " -0x5477: "Xia " -0x5478: "Pei " -0x5479: "Yi " -0x547a: "Xiao " -0x547b: "Shen " -0x547c: "Hu " -0x547d: "Ming " -0x547e: "Da " -0x547f: "Qu " -0x5480: "Ju " -0x5481: "Gem " -0x5482: "Za " -0x5483: "Tuo " -0x5484: "Duo " -0x5485: "Pou " -0x5486: "Pao " -0x5487: "Bi " -0x5488: "Fu " -0x5489: "Yang " -0x548a: "He " -0x548b: "Zha " -0x548c: "He " -0x548d: "Hai " -0x548e: "Jiu " -0x548f: "Yong " -0x5490: "Fu " -0x5491: "Que " -0x5492: "Zhou " -0x5493: "Wa " -0x5494: "Ka " -0x5495: "Gu " -0x5496: "Ka " -0x5497: "Zuo " -0x5498: "Bu " -0x5499: "Long " -0x549a: "Dong " -0x549b: "Ning " -0x549c: "Tha " -0x549d: "Si " -0x549e: "Xian " -0x549f: "Huo " -0x54a0: "Qi " -0x54a1: "Er " -0x54a2: "E " -0x54a3: "Guang " -0x54a4: "Zha " -0x54a5: "Xi " -0x54a6: "Yi " -0x54a7: "Lie " -0x54a8: "Zi " -0x54a9: "Mie " -0x54aa: "Mi " -0x54ab: "Zhi " -0x54ac: "Yao " -0x54ad: "Ji " -0x54ae: "Zhou " -0x54af: "Ge " -0x54b0: "Shuai " -0x54b1: "Zan " -0x54b2: "Xiao " -0x54b3: "Ke " -0x54b4: "Hui " -0x54b5: "Kua " -0x54b6: "Huai " -0x54b7: "Tao " -0x54b8: "Xian " -0x54b9: "E " -0x54ba: "Xuan " -0x54bb: "Xiu " -0x54bc: "Wai " -0x54bd: "Yan " -0x54be: "Lao " -0x54bf: "Yi " -0x54c0: "Ai " -0x54c1: "Pin " -0x54c2: "Shen " -0x54c3: "Tong " -0x54c4: "Hong " -0x54c5: "Xiong " -0x54c6: "Chi " -0x54c7: "Wa " -0x54c8: "Ha " -0x54c9: "Zai " -0x54ca: "Yu " -0x54cb: "Di " -0x54cc: "Pai " -0x54cd: "Xiang " -0x54ce: "Ai " -0x54cf: "Hen " -0x54d0: "Kuang " -0x54d1: "Ya " -0x54d2: "Da " -0x54d3: "Xiao " -0x54d4: "Bi " -0x54d5: "Yue " -0x54d6: "[?] " -0x54d7: "Hua " -0x54d8: "Sasou " -0x54d9: "Kuai " -0x54da: "Duo " -0x54db: "[?] " -0x54dc: "Ji " -0x54dd: "Nong " -0x54de: "Mou " -0x54df: "Yo " -0x54e0: "Hao " -0x54e1: "Yuan " -0x54e2: "Long " -0x54e3: "Pou " -0x54e4: "Mang " -0x54e5: "Ge " -0x54e6: "E " -0x54e7: "Chi " -0x54e8: "Shao " -0x54e9: "Li " -0x54ea: "Na " -0x54eb: "Zu " -0x54ec: "He " -0x54ed: "Ku " -0x54ee: "Xiao " -0x54ef: "Xian " -0x54f0: "Lao " -0x54f1: "Bo " -0x54f2: "Zhe " -0x54f3: "Zha " -0x54f4: "Liang " -0x54f5: "Ba " -0x54f6: "Mie " -0x54f7: "Le " -0x54f8: "Sui " -0x54f9: "Fou " -0x54fa: "Bu " -0x54fb: "Han " -0x54fc: "Heng " -0x54fd: "Geng " -0x54fe: "Shuo " -0x54ff: "Ge " -/* x055 */ -0x5500: "You " -0x5501: "Yan " -0x5502: "Gu " -0x5503: "Gu " -0x5504: "Bai " -0x5505: "Han " -0x5506: "Suo " -0x5507: "Chun " -0x5508: "Yi " -0x5509: "Ai " -0x550a: "Jia " -0x550b: "Tu " -0x550c: "Xian " -0x550d: "Huan " -0x550e: "Li " -0x550f: "Xi " -0x5510: "Tang " -0x5511: "Zuo " -0x5512: "Qiu " -0x5513: "Che " -0x5514: "Wu " -0x5515: "Zao " -0x5516: "Ya " -0x5517: "Dou " -0x5518: "Qi " -0x5519: "Di " -0x551a: "Qin " -0x551b: "Ma " -0x551c: "Mal " -0x551d: "Hong " -0x551e: "Dou " -0x551f: "Kes " -0x5520: "Lao " -0x5521: "Liang " -0x5522: "Suo " -0x5523: "Zao " -0x5524: "Huan " -0x5525: "Lang " -0x5526: "Sha " -0x5527: "Ji " -0x5528: "Zuo " -0x5529: "Wo " -0x552a: "Feng " -0x552b: "Yin " -0x552c: "Hu " -0x552d: "Qi " -0x552e: "Shou " -0x552f: "Wei " -0x5530: "Shua " -0x5531: "Chang " -0x5532: "Er " -0x5533: "Li " -0x5534: "Qiang " -0x5535: "An " -0x5536: "Jie " -0x5537: "Yo " -0x5538: "Nian " -0x5539: "Yu " -0x553a: "Tian " -0x553b: "Lai " -0x553c: "Sha " -0x553d: "Xi " -0x553e: "Tuo " -0x553f: "Hu " -0x5540: "Ai " -0x5541: "Zhou " -0x5542: "Nou " -0x5543: "Ken " -0x5544: "Zhuo " -0x5545: "Zhuo " -0x5546: "Shang " -0x5547: "Di " -0x5548: "Heng " -0x5549: "Lan " -0x554a: "A " -0x554b: "Xiao " -0x554c: "Xiang " -0x554d: "Tun " -0x554e: "Wu " -0x554f: "Wen " -0x5550: "Cui " -0x5551: "Sha " -0x5552: "Hu " -0x5553: "Qi " -0x5554: "Qi " -0x5555: "Tao " -0x5556: "Dan " -0x5557: "Dan " -0x5558: "Ye " -0x5559: "Zi " -0x555a: "Bi " -0x555b: "Cui " -0x555c: "Chuo " -0x555d: "He " -0x555e: "Ya " -0x555f: "Qi " -0x5560: "Zhe " -0x5561: "Pei " -0x5562: "Liang " -0x5563: "Xian " -0x5564: "Pi " -0x5565: "Sha " -0x5566: "La " -0x5567: "Ze " -0x5568: "Qing " -0x5569: "Gua " -0x556a: "Pa " -0x556b: "Zhe " -0x556c: "Se " -0x556d: "Zhuan " -0x556e: "Nie " -0x556f: "Guo " -0x5570: "Luo " -0x5571: "Yan " -0x5572: "Di " -0x5573: "Quan " -0x5574: "Tan " -0x5575: "Bo " -0x5576: "Ding " -0x5577: "Lang " -0x5578: "Xiao " -0x5579: "[?] " -0x557a: "Tang " -0x557b: "Chi " -0x557c: "Ti " -0x557d: "An " -0x557e: "Jiu " -0x557f: "Dan " -0x5580: "Ke " -0x5581: "Yong " -0x5582: "Wei " -0x5583: "Nan " -0x5584: "Shan " -0x5585: "Yu " -0x5586: "Zhe " -0x5587: "La " -0x5588: "Jie " -0x5589: "Hou " -0x558a: "Han " -0x558b: "Die " -0x558c: "Zhou " -0x558d: "Chai " -0x558e: "Wai " -0x558f: "Re " -0x5590: "Yu " -0x5591: "Yin " -0x5592: "Zan " -0x5593: "Yao " -0x5594: "Wo " -0x5595: "Mian " -0x5596: "Hu " -0x5597: "Yun " -0x5598: "Chuan " -0x5599: "Hui " -0x559a: "Huan " -0x559b: "Huan " -0x559c: "Xi " -0x559d: "He " -0x559e: "Ji " -0x559f: "Kui " -0x55a0: "Zhong " -0x55a1: "Wei " -0x55a2: "Sha " -0x55a3: "Xu " -0x55a4: "Huang " -0x55a5: "Du " -0x55a6: "Nie " -0x55a7: "Xuan " -0x55a8: "Liang " -0x55a9: "Yu " -0x55aa: "Sang " -0x55ab: "Chi " -0x55ac: "Qiao " -0x55ad: "Yan " -0x55ae: "Dan " -0x55af: "Pen " -0x55b0: "Can " -0x55b1: "Li " -0x55b2: "Yo " -0x55b3: "Zha " -0x55b4: "Wei " -0x55b5: "Miao " -0x55b6: "Ying " -0x55b7: "Pen " -0x55b8: "Phos " -0x55b9: "Kui " -0x55ba: "Xi " -0x55bb: "Yu " -0x55bc: "Jie " -0x55bd: "Lou " -0x55be: "Ku " -0x55bf: "Sao " -0x55c0: "Huo " -0x55c1: "Ti " -0x55c2: "Yao " -0x55c3: "He " -0x55c4: "A " -0x55c5: "Xiu " -0x55c6: "Qiang " -0x55c7: "Se " -0x55c8: "Yong " -0x55c9: "Su " -0x55ca: "Hong " -0x55cb: "Xie " -0x55cc: "Yi " -0x55cd: "Suo " -0x55ce: "Ma " -0x55cf: "Cha " -0x55d0: "Hai " -0x55d1: "Ke " -0x55d2: "Ta " -0x55d3: "Sang " -0x55d4: "Tian " -0x55d5: "Ru " -0x55d6: "Sou " -0x55d7: "Wa " -0x55d8: "Ji " -0x55d9: "Pang " -0x55da: "Wu " -0x55db: "Xian " -0x55dc: "Shi " -0x55dd: "Ge " -0x55de: "Zi " -0x55df: "Jie " -0x55e0: "Luo " -0x55e1: "Weng " -0x55e2: "Wa " -0x55e3: "Si " -0x55e4: "Chi " -0x55e5: "Hao " -0x55e6: "Suo " -0x55e7: "Jia " -0x55e8: "Hai " -0x55e9: "Suo " -0x55ea: "Qin " -0x55eb: "Nie " -0x55ec: "He " -0x55ed: "Cis " -0x55ee: "Sai " -0x55ef: "Ng " -0x55f0: "Ge " -0x55f1: "Na " -0x55f2: "Dia " -0x55f3: "Ai " -0x55f4: "[?] " -0x55f5: "Tong " -0x55f6: "Bi " -0x55f7: "Ao " -0x55f8: "Ao " -0x55f9: "Lian " -0x55fa: "Cui " -0x55fb: "Zhe " -0x55fc: "Mo " -0x55fd: "Sou " -0x55fe: "Sou " -0x55ff: "Tan " -/* x056 */ -0x5600: "Di " -0x5601: "Qi " -0x5602: "Jiao " -0x5603: "Chong " -0x5604: "Jiao " -0x5605: "Kai " -0x5606: "Tan " -0x5607: "San " -0x5608: "Cao " -0x5609: "Jia " -0x560a: "Ai " -0x560b: "Xiao " -0x560c: "Piao " -0x560d: "Lou " -0x560e: "Ga " -0x560f: "Gu " -0x5610: "Xiao " -0x5611: "Hu " -0x5612: "Hui " -0x5613: "Guo " -0x5614: "Ou " -0x5615: "Xian " -0x5616: "Ze " -0x5617: "Chang " -0x5618: "Xu " -0x5619: "Po " -0x561a: "De " -0x561b: "Ma " -0x561c: "Ma " -0x561d: "Hu " -0x561e: "Lei " -0x561f: "Du " -0x5620: "Ga " -0x5621: "Tang " -0x5622: "Ye " -0x5623: "Beng " -0x5624: "Ying " -0x5625: "Saai " -0x5626: "Jiao " -0x5627: "Mi " -0x5628: "Xiao " -0x5629: "Hua " -0x562a: "Mai " -0x562b: "Ran " -0x562c: "Zuo " -0x562d: "Peng " -0x562e: "Lao " -0x562f: "Xiao " -0x5630: "Ji " -0x5631: "Zhu " -0x5632: "Chao " -0x5633: "Kui " -0x5634: "Zui " -0x5635: "Xiao " -0x5636: "Si " -0x5637: "Hao " -0x5638: "Fu " -0x5639: "Liao " -0x563a: "Qiao " -0x563b: "Xi " -0x563c: "Xiu " -0x563d: "Tan " -0x563e: "Tan " -0x563f: "Mo " -0x5640: "Xun " -0x5641: "E " -0x5642: "Zun " -0x5643: "Fan " -0x5644: "Chi " -0x5645: "Hui " -0x5646: "Zan " -0x5647: "Chuang " -0x5648: "Cu " -0x5649: "Dan " -0x564a: "Yu " -0x564b: "Tun " -0x564c: "Cheng " -0x564d: "Jiao " -0x564e: "Ye " -0x564f: "Xi " -0x5650: "Qi " -0x5651: "Hao " -0x5652: "Lian " -0x5653: "Xu " -0x5654: "Deng " -0x5655: "Hui " -0x5656: "Yin " -0x5657: "Pu " -0x5658: "Jue " -0x5659: "Qin " -0x565a: "Xun " -0x565b: "Nie " -0x565c: "Lu " -0x565d: "Si " -0x565e: "Yan " -0x565f: "Ying " -0x5660: "Da " -0x5661: "Dan " -0x5662: "Yu " -0x5663: "Zhou " -0x5664: "Jin " -0x5665: "Nong " -0x5666: "Yue " -0x5667: "Hui " -0x5668: "Qi " -0x5669: "E " -0x566a: "Zao " -0x566b: "Yi " -0x566c: "Shi " -0x566d: "Jiao " -0x566e: "Yuan " -0x566f: "Ai " -0x5670: "Yong " -0x5671: "Jue " -0x5672: "Kuai " -0x5673: "Yu " -0x5674: "Pen " -0x5675: "Dao " -0x5676: "Ge " -0x5677: "Xin " -0x5678: "Dun " -0x5679: "Dang " -0x567a: "Sin " -0x567b: "Sai " -0x567c: "Pi " -0x567d: "Pi " -0x567e: "Yin " -0x567f: "Zui " -0x5680: "Ning " -0x5681: "Di " -0x5682: "Lan " -0x5683: "Ta " -0x5684: "Huo " -0x5685: "Ru " -0x5686: "Hao " -0x5687: "Xia " -0x5688: "Ya " -0x5689: "Duo " -0x568a: "Xi " -0x568b: "Chou " -0x568c: "Ji " -0x568d: "Jin " -0x568e: "Hao " -0x568f: "Ti " -0x5690: "Chang " -0x5691: "[?] " -0x5692: "[?] " -0x5693: "Ca " -0x5694: "Ti " -0x5695: "Lu " -0x5696: "Hui " -0x5697: "Bo " -0x5698: "You " -0x5699: "Nie " -0x569a: "Yin " -0x569b: "Hu " -0x569c: "Mo " -0x569d: "Huang " -0x569e: "Zhe " -0x569f: "Li " -0x56a0: "Liu " -0x56a1: "Haai " -0x56a2: "Nang " -0x56a3: "Xiao " -0x56a4: "Mo " -0x56a5: "Yan " -0x56a6: "Li " -0x56a7: "Lu " -0x56a8: "Long " -0x56a9: "Fu " -0x56aa: "Dan " -0x56ab: "Chen " -0x56ac: "Pin " -0x56ad: "Pi " -0x56ae: "Xiang " -0x56af: "Huo " -0x56b0: "Mo " -0x56b1: "Xi " -0x56b2: "Duo " -0x56b3: "Ku " -0x56b4: "Yan " -0x56b5: "Chan " -0x56b6: "Ying " -0x56b7: "Rang " -0x56b8: "Dian " -0x56b9: "La " -0x56ba: "Ta " -0x56bb: "Xiao " -0x56bc: "Jiao " -0x56bd: "Chuo " -0x56be: "Huan " -0x56bf: "Huo " -0x56c0: "Zhuan " -0x56c1: "Nie " -0x56c2: "Xiao " -0x56c3: "Ca " -0x56c4: "Li " -0x56c5: "Chan " -0x56c6: "Chai " -0x56c7: "Li " -0x56c8: "Yi " -0x56c9: "Luo " -0x56ca: "Nang " -0x56cb: "Zan " -0x56cc: "Su " -0x56cd: "Xi " -0x56ce: "So " -0x56cf: "Jian " -0x56d0: "Za " -0x56d1: "Zhu " -0x56d2: "Lan " -0x56d3: "Nie " -0x56d4: "Nang " -0x56d5: "[?] " -0x56d6: "[?] " -0x56d7: "Wei " -0x56d8: "Hui " -0x56d9: "Yin " -0x56da: "Qiu " -0x56db: "Si " -0x56dc: "Nin " -0x56dd: "Jian " -0x56de: "Hui " -0x56df: "Xin " -0x56e0: "Yin " -0x56e1: "Nan " -0x56e2: "Tuan " -0x56e3: "Tuan " -0x56e4: "Dun " -0x56e5: "Kang " -0x56e6: "Yuan " -0x56e7: "Jiong " -0x56e8: "Pian " -0x56e9: "Yun " -0x56ea: "Cong " -0x56eb: "Hu " -0x56ec: "Hui " -0x56ed: "Yuan " -0x56ee: "You " -0x56ef: "Guo " -0x56f0: "Kun " -0x56f1: "Cong " -0x56f2: "Wei " -0x56f3: "Tu " -0x56f4: "Wei " -0x56f5: "Lun " -0x56f6: "Guo " -0x56f7: "Qun " -0x56f8: "Ri " -0x56f9: "Ling " -0x56fa: "Gu " -0x56fb: "Guo " -0x56fc: "Tai " -0x56fd: "Guo " -0x56fe: "Tu " -0x56ff: "You " -/* x057 */ -0x5700: "Guo " -0x5701: "Yin " -0x5702: "Hun " -0x5703: "Pu " -0x5704: "Yu " -0x5705: "Han " -0x5706: "Yuan " -0x5707: "Lun " -0x5708: "Quan " -0x5709: "Yu " -0x570a: "Qing " -0x570b: "Guo " -0x570c: "Chuan " -0x570d: "Wei " -0x570e: "Yuan " -0x570f: "Quan " -0x5710: "Ku " -0x5711: "Fu " -0x5712: "Yuan " -0x5713: "Yuan " -0x5714: "E " -0x5715: "Tu " -0x5716: "Tu " -0x5717: "Tu " -0x5718: "Tuan " -0x5719: "Lue " -0x571a: "Hui " -0x571b: "Yi " -0x571c: "Yuan " -0x571d: "Luan " -0x571e: "Luan " -0x571f: "Tu " -0x5720: "Ya " -0x5721: "Tu " -0x5722: "Ting " -0x5723: "Sheng " -0x5724: "Pu " -0x5725: "Lu " -0x5726: "Iri " -0x5727: "Ya " -0x5728: "Zai " -0x5729: "Wei " -0x572a: "Ge " -0x572b: "Yu " -0x572c: "Wu " -0x572d: "Gui " -0x572e: "Pi " -0x572f: "Yi " -0x5730: "Di " -0x5731: "Qian " -0x5732: "Qian " -0x5733: "Zhen " -0x5734: "Zhuo " -0x5735: "Dang " -0x5736: "Qia " -0x5737: "Akutsu " -0x5738: "Yama " -0x5739: "Kuang " -0x573a: "Chang " -0x573b: "Qi " -0x573c: "Nie " -0x573d: "Mo " -0x573e: "Ji " -0x573f: "Jia " -0x5740: "Zhi " -0x5741: "Zhi " -0x5742: "Ban " -0x5743: "Xun " -0x5744: "Tou " -0x5745: "Qin " -0x5746: "Fen " -0x5747: "Jun " -0x5748: "Keng " -0x5749: "Tun " -0x574a: "Fang " -0x574b: "Fen " -0x574c: "Ben " -0x574d: "Tan " -0x574e: "Kan " -0x574f: "Pi " -0x5750: "Zuo " -0x5751: "Keng " -0x5752: "Bi " -0x5753: "Xing " -0x5754: "Di " -0x5755: "Jing " -0x5756: "Ji " -0x5757: "Kuai " -0x5758: "Di " -0x5759: "Jing " -0x575a: "Jian " -0x575b: "Tan " -0x575c: "Li " -0x575d: "Ba " -0x575e: "Wu " -0x575f: "Fen " -0x5760: "Zhui " -0x5761: "Po " -0x5762: "Pan " -0x5763: "Tang " -0x5764: "Kun " -0x5765: "Qu " -0x5766: "Tan " -0x5767: "Zhi " -0x5768: "Tuo " -0x5769: "Gan " -0x576a: "Ping " -0x576b: "Dian " -0x576c: "Gua " -0x576d: "Ni " -0x576e: "Tai " -0x576f: "Pi " -0x5770: "Jiong " -0x5771: "Yang " -0x5772: "Fo " -0x5773: "Ao " -0x5774: "Liu " -0x5775: "Qiu " -0x5776: "Mu " -0x5777: "Ke " -0x5778: "Gou " -0x5779: "Xue " -0x577a: "Ba " -0x577b: "Chi " -0x577c: "Che " -0x577d: "Ling " -0x577e: "Zhu " -0x577f: "Fu " -0x5780: "Hu " -0x5781: "Zhi " -0x5782: "Chui " -0x5783: "La " -0x5784: "Long " -0x5785: "Long " -0x5786: "Lu " -0x5787: "Ao " -0x5788: "Tay " -0x5789: "Pao " -0x578a: "[?] " -0x578b: "Xing " -0x578c: "Dong " -0x578d: "Ji " -0x578e: "Ke " -0x578f: "Lu " -0x5790: "Ci " -0x5791: "Chi " -0x5792: "Lei " -0x5793: "Gai " -0x5794: "Yin " -0x5795: "Hou " -0x5796: "Dui " -0x5797: "Zhao " -0x5798: "Fu " -0x5799: "Guang " -0x579a: "Yao " -0x579b: "Duo " -0x579c: "Duo " -0x579d: "Gui " -0x579e: "Cha " -0x579f: "Yang " -0x57a0: "Yin " -0x57a1: "Fa " -0x57a2: "Gou " -0x57a3: "Yuan " -0x57a4: "Die " -0x57a5: "Xie " -0x57a6: "Ken " -0x57a7: "Jiong " -0x57a8: "Shou " -0x57a9: "E " -0x57aa: "Ha " -0x57ab: "Dian " -0x57ac: "Hong " -0x57ad: "Wu " -0x57ae: "Kua " -0x57af: "[?] " -0x57b0: "Tao " -0x57b1: "Dang " -0x57b2: "Kai " -0x57b3: "Gake " -0x57b4: "Nao " -0x57b5: "An " -0x57b6: "Xing " -0x57b7: "Xian " -0x57b8: "Huan " -0x57b9: "Bang " -0x57ba: "Pei " -0x57bb: "Ba " -0x57bc: "Yi " -0x57bd: "Yin " -0x57be: "Han " -0x57bf: "Xu " -0x57c0: "Chui " -0x57c1: "Cen " -0x57c2: "Geng " -0x57c3: "Ai " -0x57c4: "Peng " -0x57c5: "Fang " -0x57c6: "Que " -0x57c7: "Yong " -0x57c8: "Xun " -0x57c9: "Jia " -0x57ca: "Di " -0x57cb: "Mai " -0x57cc: "Lang " -0x57cd: "Xuan " -0x57ce: "Cheng " -0x57cf: "Yan " -0x57d0: "Jin " -0x57d1: "Zhe " -0x57d2: "Lei " -0x57d3: "Lie " -0x57d4: "Bu " -0x57d5: "Cheng " -0x57d6: "Gomi " -0x57d7: "Bu " -0x57d8: "Shi " -0x57d9: "Xun " -0x57da: "Guo " -0x57db: "Jiong " -0x57dc: "Ye " -0x57dd: "Nian " -0x57de: "Di " -0x57df: "Yu " -0x57e0: "Bu " -0x57e1: "Ya " -0x57e2: "Juan " -0x57e3: "Sui " -0x57e4: "Pi " -0x57e5: "Cheng " -0x57e6: "Wan " -0x57e7: "Ju " -0x57e8: "Lun " -0x57e9: "Zheng " -0x57ea: "Kong " -0x57eb: "Chong " -0x57ec: "Dong " -0x57ed: "Dai " -0x57ee: "Tan " -0x57ef: "An " -0x57f0: "Cai " -0x57f1: "Shu " -0x57f2: "Beng " -0x57f3: "Kan " -0x57f4: "Zhi " -0x57f5: "Duo " -0x57f6: "Yi " -0x57f7: "Zhi " -0x57f8: "Yi " -0x57f9: "Pei " -0x57fa: "Ji " -0x57fb: "Zhun " -0x57fc: "Qi " -0x57fd: "Sao " -0x57fe: "Ju " -0x57ff: "Ni " -/* x058 */ -0x5800: "Ku " -0x5801: "Ke " -0x5802: "Tang " -0x5803: "Kun " -0x5804: "Ni " -0x5805: "Jian " -0x5806: "Dui " -0x5807: "Jin " -0x5808: "Gang " -0x5809: "Yu " -0x580a: "E " -0x580b: "Peng " -0x580c: "Gu " -0x580d: "Tu " -0x580e: "Leng " -0x580f: "[?] " -0x5810: "Ya " -0x5811: "Qian " -0x5812: "[?] " -0x5813: "An " -0x5814: "[?] " -0x5815: "Duo " -0x5816: "Nao " -0x5817: "Tu " -0x5818: "Cheng " -0x5819: "Yin " -0x581a: "Hun " -0x581b: "Bi " -0x581c: "Lian " -0x581d: "Guo " -0x581e: "Die " -0x581f: "Zhuan " -0x5820: "Hou " -0x5821: "Bao " -0x5822: "Bao " -0x5823: "Yu " -0x5824: "Di " -0x5825: "Mao " -0x5826: "Jie " -0x5827: "Ruan " -0x5828: "E " -0x5829: "Geng " -0x582a: "Kan " -0x582b: "Zong " -0x582c: "Yu " -0x582d: "Huang " -0x582e: "E " -0x582f: "Yao " -0x5830: "Yan " -0x5831: "Bao " -0x5832: "Ji " -0x5833: "Mei " -0x5834: "Chang " -0x5835: "Du " -0x5836: "Tuo " -0x5837: "Yin " -0x5838: "Feng " -0x5839: "Zhong " -0x583a: "Jie " -0x583b: "Zhen " -0x583c: "Feng " -0x583d: "Gang " -0x583e: "Chuan " -0x583f: "Jian " -0x5840: "Pyeng " -0x5841: "Toride " -0x5842: "Xiang " -0x5843: "Huang " -0x5844: "Leng " -0x5845: "Duan " -0x5846: "[?] " -0x5847: "Xuan " -0x5848: "Ji " -0x5849: "Ji " -0x584a: "Kuai " -0x584b: "Ying " -0x584c: "Ta " -0x584d: "Cheng " -0x584e: "Yong " -0x584f: "Kai " -0x5850: "Su " -0x5851: "Su " -0x5852: "Shi " -0x5853: "Mi " -0x5854: "Ta " -0x5855: "Weng " -0x5856: "Cheng " -0x5857: "Tu " -0x5858: "Tang " -0x5859: "Que " -0x585a: "Zhong " -0x585b: "Li " -0x585c: "Peng " -0x585d: "Bang " -0x585e: "Sai " -0x585f: "Zang " -0x5860: "Dui " -0x5861: "Tian " -0x5862: "Wu " -0x5863: "Cheng " -0x5864: "Xun " -0x5865: "Ge " -0x5866: "Zhen " -0x5867: "Ai " -0x5868: "Gong " -0x5869: "Yan " -0x586a: "Kan " -0x586b: "Tian " -0x586c: "Yuan " -0x586d: "Wen " -0x586e: "Xie " -0x586f: "Liu " -0x5870: "Ama " -0x5871: "Lang " -0x5872: "Chang " -0x5873: "Peng " -0x5874: "Beng " -0x5875: "Chen " -0x5876: "Cu " -0x5877: "Lu " -0x5878: "Ou " -0x5879: "Qian " -0x587a: "Mei " -0x587b: "Mo " -0x587c: "Zhuan " -0x587d: "Shuang " -0x587e: "Shu " -0x587f: "Lou " -0x5880: "Chi " -0x5881: "Man " -0x5882: "Biao " -0x5883: "Jing " -0x5884: "Qi " -0x5885: "Shu " -0x5886: "Di " -0x5887: "Zhang " -0x5888: "Kan " -0x5889: "Yong " -0x588a: "Dian " -0x588b: "Chen " -0x588c: "Zhi " -0x588d: "Xi " -0x588e: "Guo " -0x588f: "Qiang " -0x5890: "Jin " -0x5891: "Di " -0x5892: "Shang " -0x5893: "Mu " -0x5894: "Cui " -0x5895: "Yan " -0x5896: "Ta " -0x5897: "Zeng " -0x5898: "Qi " -0x5899: "Qiang " -0x589a: "Liang " -0x589b: "[?] " -0x589c: "Zhui " -0x589d: "Qiao " -0x589e: "Zeng " -0x589f: "Xu " -0x58a0: "Shan " -0x58a1: "Shan " -0x58a2: "Ba " -0x58a3: "Pu " -0x58a4: "Kuai " -0x58a5: "Dong " -0x58a6: "Fan " -0x58a7: "Que " -0x58a8: "Mo " -0x58a9: "Dun " -0x58aa: "Dun " -0x58ab: "Dun " -0x58ac: "Di " -0x58ad: "Sheng " -0x58ae: "Duo " -0x58af: "Duo " -0x58b0: "Tan " -0x58b1: "Deng " -0x58b2: "Wu " -0x58b3: "Fen " -0x58b4: "Huang " -0x58b5: "Tan " -0x58b6: "Da " -0x58b7: "Ye " -0x58b8: "Sho " -0x58b9: "Mama " -0x58ba: "Yu " -0x58bb: "Qiang " -0x58bc: "Ji " -0x58bd: "Qiao " -0x58be: "Ken " -0x58bf: "Yi " -0x58c0: "Pi " -0x58c1: "Bi " -0x58c2: "Dian " -0x58c3: "Jiang " -0x58c4: "Ye " -0x58c5: "Yong " -0x58c6: "Bo " -0x58c7: "Tan " -0x58c8: "Lan " -0x58c9: "Ju " -0x58ca: "Huai " -0x58cb: "Dang " -0x58cc: "Rang " -0x58cd: "Qian " -0x58ce: "Xun " -0x58cf: "Lan " -0x58d0: "Xi " -0x58d1: "He " -0x58d2: "Ai " -0x58d3: "Ya " -0x58d4: "Dao " -0x58d5: "Hao " -0x58d6: "Ruan " -0x58d7: "Mama " -0x58d8: "Lei " -0x58d9: "Kuang " -0x58da: "Lu " -0x58db: "Yan " -0x58dc: "Tan " -0x58dd: "Wei " -0x58de: "Huai " -0x58df: "Long " -0x58e0: "Long " -0x58e1: "Rui " -0x58e2: "Li " -0x58e3: "Lin " -0x58e4: "Rang " -0x58e5: "Ten " -0x58e6: "Xun " -0x58e7: "Yan " -0x58e8: "Lei " -0x58e9: "Ba " -0x58ea: "[?] " -0x58eb: "Shi " -0x58ec: "Ren " -0x58ed: "[?] " -0x58ee: "Zhuang " -0x58ef: "Zhuang " -0x58f0: "Sheng " -0x58f1: "Yi " -0x58f2: "Mai " -0x58f3: "Ke " -0x58f4: "Zhu " -0x58f5: "Zhuang " -0x58f6: "Hu " -0x58f7: "Hu " -0x58f8: "Kun " -0x58f9: "Yi " -0x58fa: "Hu " -0x58fb: "Xu " -0x58fc: "Kun " -0x58fd: "Shou " -0x58fe: "Mang " -0x58ff: "Zun " -/* x059 */ -0x5900: "Shou " -0x5901: "Yi " -0x5902: "Zhi " -0x5903: "Gu " -0x5904: "Chu " -0x5905: "Jiang " -0x5906: "Feng " -0x5907: "Bei " -0x5908: "Cay " -0x5909: "Bian " -0x590a: "Sui " -0x590b: "Qun " -0x590c: "Ling " -0x590d: "Fu " -0x590e: "Zuo " -0x590f: "Xia " -0x5910: "Xiong " -0x5911: "[?] " -0x5912: "Nao " -0x5913: "Xia " -0x5914: "Kui " -0x5915: "Xi " -0x5916: "Wai " -0x5917: "Yuan " -0x5918: "Mao " -0x5919: "Su " -0x591a: "Duo " -0x591b: "Duo " -0x591c: "Ye " -0x591d: "Qing " -0x591e: "Uys " -0x591f: "Gou " -0x5920: "Gou " -0x5921: "Qi " -0x5922: "Meng " -0x5923: "Meng " -0x5924: "Yin " -0x5925: "Huo " -0x5926: "Chen " -0x5927: "Da " -0x5928: "Ze " -0x5929: "Tian " -0x592a: "Tai " -0x592b: "Fu " -0x592c: "Guai " -0x592d: "Yao " -0x592e: "Yang " -0x592f: "Hang " -0x5930: "Gao " -0x5931: "Shi " -0x5932: "Ben " -0x5933: "Tai " -0x5934: "Tou " -0x5935: "Yan " -0x5936: "Bi " -0x5937: "Yi " -0x5938: "Kua " -0x5939: "Jia " -0x593a: "Duo " -0x593b: "Kwu " -0x593c: "Kuang " -0x593d: "Yun " -0x593e: "Jia " -0x593f: "Pa " -0x5940: "En " -0x5941: "Lian " -0x5942: "Huan " -0x5943: "Di " -0x5944: "Yan " -0x5945: "Pao " -0x5946: "Quan " -0x5947: "Qi " -0x5948: "Nai " -0x5949: "Feng " -0x594a: "Xie " -0x594b: "Fen " -0x594c: "Dian " -0x594d: "[?] " -0x594e: "Kui " -0x594f: "Zou " -0x5950: "Huan " -0x5951: "Qi " -0x5952: "Kai " -0x5953: "Zha " -0x5954: "Ben " -0x5955: "Yi " -0x5956: "Jiang " -0x5957: "Tao " -0x5958: "Zang " -0x5959: "Ben " -0x595a: "Xi " -0x595b: "Xiang " -0x595c: "Fei " -0x595d: "Diao " -0x595e: "Xun " -0x595f: "Keng " -0x5960: "Dian " -0x5961: "Ao " -0x5962: "She " -0x5963: "Weng " -0x5964: "Pan " -0x5965: "Ao " -0x5966: "Wu " -0x5967: "Ao " -0x5968: "Jiang " -0x5969: "Lian " -0x596a: "Duo " -0x596b: "Yun " -0x596c: "Jiang " -0x596d: "Shi " -0x596e: "Fen " -0x596f: "Huo " -0x5970: "Bi " -0x5971: "Lian " -0x5972: "Duo " -0x5973: "Nu " -0x5974: "Nu " -0x5975: "Ding " -0x5976: "Nai " -0x5977: "Qian " -0x5978: "Jian " -0x5979: "Ta " -0x597a: "Jiu " -0x597b: "Nan " -0x597c: "Cha " -0x597d: "Hao " -0x597e: "Xian " -0x597f: "Fan " -0x5980: "Ji " -0x5981: "Shuo " -0x5982: "Ru " -0x5983: "Fei " -0x5984: "Wang " -0x5985: "Hong " -0x5986: "Zhuang " -0x5987: "Fu " -0x5988: "Ma " -0x5989: "Dan " -0x598a: "Ren " -0x598b: "Fu " -0x598c: "Jing " -0x598d: "Yan " -0x598e: "Xie " -0x598f: "Wen " -0x5990: "Zhong " -0x5991: "Pa " -0x5992: "Du " -0x5993: "Ji " -0x5994: "Keng " -0x5995: "Zhong " -0x5996: "Yao " -0x5997: "Jin " -0x5998: "Yun " -0x5999: "Miao " -0x599a: "Pei " -0x599b: "Shi " -0x599c: "Yue " -0x599d: "Zhuang " -0x599e: "Niu " -0x599f: "Yan " -0x59a0: "Na " -0x59a1: "Xin " -0x59a2: "Fen " -0x59a3: "Bi " -0x59a4: "Yu " -0x59a5: "Tuo " -0x59a6: "Feng " -0x59a7: "Yuan " -0x59a8: "Fang " -0x59a9: "Wu " -0x59aa: "Yu " -0x59ab: "Gui " -0x59ac: "Du " -0x59ad: "Ba " -0x59ae: "Ni " -0x59af: "Zhou " -0x59b0: "Zhuo " -0x59b1: "Zhao " -0x59b2: "Da " -0x59b3: "Nai " -0x59b4: "Yuan " -0x59b5: "Tou " -0x59b6: "Xuan " -0x59b7: "Zhi " -0x59b8: "E " -0x59b9: "Mei " -0x59ba: "Mo " -0x59bb: "Qi " -0x59bc: "Bi " -0x59bd: "Shen " -0x59be: "Qie " -0x59bf: "E " -0x59c0: "He " -0x59c1: "Xu " -0x59c2: "Fa " -0x59c3: "Zheng " -0x59c4: "Min " -0x59c5: "Ban " -0x59c6: "Mu " -0x59c7: "Fu " -0x59c8: "Ling " -0x59c9: "Zi " -0x59ca: "Zi " -0x59cb: "Shi " -0x59cc: "Ran " -0x59cd: "Shan " -0x59ce: "Yang " -0x59cf: "Man " -0x59d0: "Jie " -0x59d1: "Gu " -0x59d2: "Si " -0x59d3: "Xing " -0x59d4: "Wei " -0x59d5: "Zi " -0x59d6: "Ju " -0x59d7: "Shan " -0x59d8: "Pin " -0x59d9: "Ren " -0x59da: "Yao " -0x59db: "Tong " -0x59dc: "Jiang " -0x59dd: "Shu " -0x59de: "Ji " -0x59df: "Gai " -0x59e0: "Shang " -0x59e1: "Kuo " -0x59e2: "Juan " -0x59e3: "Jiao " -0x59e4: "Gou " -0x59e5: "Mu " -0x59e6: "Jian " -0x59e7: "Jian " -0x59e8: "Yi " -0x59e9: "Nian " -0x59ea: "Zhi " -0x59eb: "Ji " -0x59ec: "Ji " -0x59ed: "Xian " -0x59ee: "Heng " -0x59ef: "Guang " -0x59f0: "Jun " -0x59f1: "Kua " -0x59f2: "Yan " -0x59f3: "Ming " -0x59f4: "Lie " -0x59f5: "Pei " -0x59f6: "Yan " -0x59f7: "You " -0x59f8: "Yan " -0x59f9: "Cha " -0x59fa: "Shen " -0x59fb: "Yin " -0x59fc: "Chi " -0x59fd: "Gui " -0x59fe: "Quan " -0x59ff: "Zi " -/* x05a */ -0x5a00: "Song " -0x5a01: "Wei " -0x5a02: "Hong " -0x5a03: "Wa " -0x5a04: "Lou " -0x5a05: "Ya " -0x5a06: "Rao " -0x5a07: "Jiao " -0x5a08: "Luan " -0x5a09: "Ping " -0x5a0a: "Xian " -0x5a0b: "Shao " -0x5a0c: "Li " -0x5a0d: "Cheng " -0x5a0e: "Xiao " -0x5a0f: "Mang " -0x5a10: "Fu " -0x5a11: "Suo " -0x5a12: "Wu " -0x5a13: "Wei " -0x5a14: "Ke " -0x5a15: "Lai " -0x5a16: "Chuo " -0x5a17: "Ding " -0x5a18: "Niang " -0x5a19: "Xing " -0x5a1a: "Nan " -0x5a1b: "Yu " -0x5a1c: "Nuo " -0x5a1d: "Pei " -0x5a1e: "Nei " -0x5a1f: "Juan " -0x5a20: "Shen " -0x5a21: "Zhi " -0x5a22: "Han " -0x5a23: "Di " -0x5a24: "Zhuang " -0x5a25: "E " -0x5a26: "Pin " -0x5a27: "Tui " -0x5a28: "Han " -0x5a29: "Mian " -0x5a2a: "Wu " -0x5a2b: "Yan " -0x5a2c: "Wu " -0x5a2d: "Xi " -0x5a2e: "Yan " -0x5a2f: "Yu " -0x5a30: "Si " -0x5a31: "Yu " -0x5a32: "Wa " -0x5a33: "[?] " -0x5a34: "Xian " -0x5a35: "Ju " -0x5a36: "Qu " -0x5a37: "Shui " -0x5a38: "Qi " -0x5a39: "Xian " -0x5a3a: "Zhui " -0x5a3b: "Dong " -0x5a3c: "Chang " -0x5a3d: "Lu " -0x5a3e: "Ai " -0x5a3f: "E " -0x5a40: "E " -0x5a41: "Lou " -0x5a42: "Mian " -0x5a43: "Cong " -0x5a44: "Pou " -0x5a45: "Ju " -0x5a46: "Po " -0x5a47: "Cai " -0x5a48: "Ding " -0x5a49: "Wan " -0x5a4a: "Biao " -0x5a4b: "Xiao " -0x5a4c: "Shu " -0x5a4d: "Qi " -0x5a4e: "Hui " -0x5a4f: "Fu " -0x5a50: "E " -0x5a51: "Wo " -0x5a52: "Tan " -0x5a53: "Fei " -0x5a54: "Wei " -0x5a55: "Jie " -0x5a56: "Tian " -0x5a57: "Ni " -0x5a58: "Quan " -0x5a59: "Jing " -0x5a5a: "Hun " -0x5a5b: "Jing " -0x5a5c: "Qian " -0x5a5d: "Dian " -0x5a5e: "Xing " -0x5a5f: "Hu " -0x5a60: "Wa " -0x5a61: "Lai " -0x5a62: "Bi " -0x5a63: "Yin " -0x5a64: "Chou " -0x5a65: "Chuo " -0x5a66: "Fu " -0x5a67: "Jing " -0x5a68: "Lun " -0x5a69: "Yan " -0x5a6a: "Lan " -0x5a6b: "Kun " -0x5a6c: "Yin " -0x5a6d: "Ya " -0x5a6e: "Ju " -0x5a6f: "Li " -0x5a70: "Dian " -0x5a71: "Xian " -0x5a72: "Hwa " -0x5a73: "Hua " -0x5a74: "Ying " -0x5a75: "Chan " -0x5a76: "Shen " -0x5a77: "Ting " -0x5a78: "Dang " -0x5a79: "Yao " -0x5a7a: "Wu " -0x5a7b: "Nan " -0x5a7c: "Ruo " -0x5a7d: "Jia " -0x5a7e: "Tou " -0x5a7f: "Xu " -0x5a80: "Yu " -0x5a81: "Wei " -0x5a82: "Ti " -0x5a83: "Rou " -0x5a84: "Mei " -0x5a85: "Dan " -0x5a86: "Ruan " -0x5a87: "Qin " -0x5a88: "Hui " -0x5a89: "Wu " -0x5a8a: "Qian " -0x5a8b: "Chun " -0x5a8c: "Mao " -0x5a8d: "Fu " -0x5a8e: "Jie " -0x5a8f: "Duan " -0x5a90: "Xi " -0x5a91: "Zhong " -0x5a92: "Mei " -0x5a93: "Huang " -0x5a94: "Mian " -0x5a95: "An " -0x5a96: "Ying " -0x5a97: "Xuan " -0x5a98: "Jie " -0x5a99: "Wei " -0x5a9a: "Mei " -0x5a9b: "Yuan " -0x5a9c: "Zhen " -0x5a9d: "Qiu " -0x5a9e: "Ti " -0x5a9f: "Xie " -0x5aa0: "Tuo " -0x5aa1: "Lian " -0x5aa2: "Mao " -0x5aa3: "Ran " -0x5aa4: "Si " -0x5aa5: "Pian " -0x5aa6: "Wei " -0x5aa7: "Wa " -0x5aa8: "Jiu " -0x5aa9: "Hu " -0x5aaa: "Ao " -0x5aab: "[?] " -0x5aac: "Bou " -0x5aad: "Xu " -0x5aae: "Tou " -0x5aaf: "Gui " -0x5ab0: "Zou " -0x5ab1: "Yao " -0x5ab2: "Pi " -0x5ab3: "Xi " -0x5ab4: "Yuan " -0x5ab5: "Ying " -0x5ab6: "Rong " -0x5ab7: "Ru " -0x5ab8: "Chi " -0x5ab9: "Liu " -0x5aba: "Mei " -0x5abb: "Pan " -0x5abc: "Ao " -0x5abd: "Ma " -0x5abe: "Gou " -0x5abf: "Kui " -0x5ac0: "Qin " -0x5ac1: "Jia " -0x5ac2: "Sao " -0x5ac3: "Zhen " -0x5ac4: "Yuan " -0x5ac5: "Cha " -0x5ac6: "Yong " -0x5ac7: "Ming " -0x5ac8: "Ying " -0x5ac9: "Ji " -0x5aca: "Su " -0x5acb: "Niao " -0x5acc: "Xian " -0x5acd: "Tao " -0x5ace: "Pang " -0x5acf: "Lang " -0x5ad0: "Nao " -0x5ad1: "Bao " -0x5ad2: "Ai " -0x5ad3: "Pi " -0x5ad4: "Pin " -0x5ad5: "Yi " -0x5ad6: "Piao " -0x5ad7: "Yu " -0x5ad8: "Lei " -0x5ad9: "Xuan " -0x5ada: "Man " -0x5adb: "Yi " -0x5adc: "Zhang " -0x5add: "Kang " -0x5ade: "Yong " -0x5adf: "Ni " -0x5ae0: "Li " -0x5ae1: "Di " -0x5ae2: "Gui " -0x5ae3: "Yan " -0x5ae4: "Jin " -0x5ae5: "Zhuan " -0x5ae6: "Chang " -0x5ae7: "Ce " -0x5ae8: "Han " -0x5ae9: "Nen " -0x5aea: "Lao " -0x5aeb: "Mo " -0x5aec: "Zhe " -0x5aed: "Hu " -0x5aee: "Hu " -0x5aef: "Ao " -0x5af0: "Nen " -0x5af1: "Qiang " -0x5af2: "Ma " -0x5af3: "Pie " -0x5af4: "Gu " -0x5af5: "Wu " -0x5af6: "Jiao " -0x5af7: "Tuo " -0x5af8: "Zhan " -0x5af9: "Mao " -0x5afa: "Xian " -0x5afb: "Xian " -0x5afc: "Mo " -0x5afd: "Liao " -0x5afe: "Lian " -0x5aff: "Hua " -/* x05b */ -0x5b00: "Gui " -0x5b01: "Deng " -0x5b02: "Zhi " -0x5b03: "Xu " -0x5b04: "Yi " -0x5b05: "Hua " -0x5b06: "Xi " -0x5b07: "Hui " -0x5b08: "Rao " -0x5b09: "Xi " -0x5b0a: "Yan " -0x5b0b: "Chan " -0x5b0c: "Jiao " -0x5b0d: "Mei " -0x5b0e: "Fan " -0x5b0f: "Fan " -0x5b10: "Xian " -0x5b11: "Yi " -0x5b12: "Wei " -0x5b13: "Jiao " -0x5b14: "Fu " -0x5b15: "Shi " -0x5b16: "Bi " -0x5b17: "Shan " -0x5b18: "Sui " -0x5b19: "Qiang " -0x5b1a: "Lian " -0x5b1b: "Huan " -0x5b1c: "Xin " -0x5b1d: "Niao " -0x5b1e: "Dong " -0x5b1f: "Yi " -0x5b20: "Can " -0x5b21: "Ai " -0x5b22: "Niang " -0x5b23: "Neng " -0x5b24: "Ma " -0x5b25: "Tiao " -0x5b26: "Chou " -0x5b27: "Jin " -0x5b28: "Ci " -0x5b29: "Yu " -0x5b2a: "Pin " -0x5b2b: "Yong " -0x5b2c: "Xu " -0x5b2d: "Nai " -0x5b2e: "Yan " -0x5b2f: "Tai " -0x5b30: "Ying " -0x5b31: "Can " -0x5b32: "Niao " -0x5b33: "Wo " -0x5b34: "Ying " -0x5b35: "Mian " -0x5b36: "Kaka " -0x5b37: "Ma " -0x5b38: "Shen " -0x5b39: "Xing " -0x5b3a: "Ni " -0x5b3b: "Du " -0x5b3c: "Liu " -0x5b3d: "Yuan " -0x5b3e: "Lan " -0x5b3f: "Yan " -0x5b40: "Shuang " -0x5b41: "Ling " -0x5b42: "Jiao " -0x5b43: "Niang " -0x5b44: "Lan " -0x5b45: "Xian " -0x5b46: "Ying " -0x5b47: "Shuang " -0x5b48: "Shuai " -0x5b49: "Quan " -0x5b4a: "Mi " -0x5b4b: "Li " -0x5b4c: "Luan " -0x5b4d: "Yan " -0x5b4e: "Zhu " -0x5b4f: "Lan " -0x5b50: "Zi " -0x5b51: "Jie " -0x5b52: "Jue " -0x5b53: "Jue " -0x5b54: "Kong " -0x5b55: "Yun " -0x5b56: "Zi " -0x5b57: "Zi " -0x5b58: "Cun " -0x5b59: "Sun " -0x5b5a: "Fu " -0x5b5b: "Bei " -0x5b5c: "Zi " -0x5b5d: "Xiao " -0x5b5e: "Xin " -0x5b5f: "Meng " -0x5b60: "Si " -0x5b61: "Tai " -0x5b62: "Bao " -0x5b63: "Ji " -0x5b64: "Gu " -0x5b65: "Nu " -0x5b66: "Xue " -0x5b67: "[?] " -0x5b68: "Zhuan " -0x5b69: "Hai " -0x5b6a: "Luan " -0x5b6b: "Sun " -0x5b6c: "Huai " -0x5b6d: "Mie " -0x5b6e: "Cong " -0x5b6f: "Qian " -0x5b70: "Shu " -0x5b71: "Chan " -0x5b72: "Ya " -0x5b73: "Zi " -0x5b74: "Ni " -0x5b75: "Fu " -0x5b76: "Zi " -0x5b77: "Li " -0x5b78: "Xue " -0x5b79: "Bo " -0x5b7a: "Ru " -0x5b7b: "Lai " -0x5b7c: "Nie " -0x5b7d: "Nie " -0x5b7e: "Ying " -0x5b7f: "Luan " -0x5b80: "Mian " -0x5b81: "Zhu " -0x5b82: "Rong " -0x5b83: "Ta " -0x5b84: "Gui " -0x5b85: "Zhai " -0x5b86: "Qiong " -0x5b87: "Yu " -0x5b88: "Shou " -0x5b89: "An " -0x5b8a: "Tu " -0x5b8b: "Song " -0x5b8c: "Wan " -0x5b8d: "Rou " -0x5b8e: "Yao " -0x5b8f: "Hong " -0x5b90: "Yi " -0x5b91: "Jing " -0x5b92: "Zhun " -0x5b93: "Mi " -0x5b94: "Zhu " -0x5b95: "Dang " -0x5b96: "Hong " -0x5b97: "Zong " -0x5b98: "Guan " -0x5b99: "Zhou " -0x5b9a: "Ding " -0x5b9b: "Wan " -0x5b9c: "Yi " -0x5b9d: "Bao " -0x5b9e: "Shi " -0x5b9f: "Shi " -0x5ba0: "Chong " -0x5ba1: "Shen " -0x5ba2: "Ke " -0x5ba3: "Xuan " -0x5ba4: "Shi " -0x5ba5: "You " -0x5ba6: "Huan " -0x5ba7: "Yi " -0x5ba8: "Tiao " -0x5ba9: "Shi " -0x5baa: "Xian " -0x5bab: "Gong " -0x5bac: "Cheng " -0x5bad: "Qun " -0x5bae: "Gong " -0x5baf: "Xiao " -0x5bb0: "Zai " -0x5bb1: "Zha " -0x5bb2: "Bao " -0x5bb3: "Hai " -0x5bb4: "Yan " -0x5bb5: "Xiao " -0x5bb6: "Jia " -0x5bb7: "Shen " -0x5bb8: "Chen " -0x5bb9: "Rong " -0x5bba: "Huang " -0x5bbb: "Mi " -0x5bbc: "Kou " -0x5bbd: "Kuan " -0x5bbe: "Bin " -0x5bbf: "Su " -0x5bc0: "Cai " -0x5bc1: "Zan " -0x5bc2: "Ji " -0x5bc3: "Yuan " -0x5bc4: "Ji " -0x5bc5: "Yin " -0x5bc6: "Mi " -0x5bc7: "Kou " -0x5bc8: "Qing " -0x5bc9: "Que " -0x5bca: "Zhen " -0x5bcb: "Jian " -0x5bcc: "Fu " -0x5bcd: "Ning " -0x5bce: "Bing " -0x5bcf: "Huan " -0x5bd0: "Mei " -0x5bd1: "Qin " -0x5bd2: "Han " -0x5bd3: "Yu " -0x5bd4: "Shi " -0x5bd5: "Ning " -0x5bd6: "Qin " -0x5bd7: "Ning " -0x5bd8: "Zhi " -0x5bd9: "Yu " -0x5bda: "Bao " -0x5bdb: "Kuan " -0x5bdc: "Ning " -0x5bdd: "Qin " -0x5bde: "Mo " -0x5bdf: "Cha " -0x5be0: "Ju " -0x5be1: "Gua " -0x5be2: "Qin " -0x5be3: "Hu " -0x5be4: "Wu " -0x5be5: "Liao " -0x5be6: "Shi " -0x5be7: "Zhu " -0x5be8: "Zhai " -0x5be9: "Shen " -0x5bea: "Wei " -0x5beb: "Xie " -0x5bec: "Kuan " -0x5bed: "Hui " -0x5bee: "Liao " -0x5bef: "Jun " -0x5bf0: "Huan " -0x5bf1: "Yi " -0x5bf2: "Yi " -0x5bf3: "Bao " -0x5bf4: "Qin " -0x5bf5: "Chong " -0x5bf6: "Bao " -0x5bf7: "Feng " -0x5bf8: "Cun " -0x5bf9: "Dui " -0x5bfa: "Si " -0x5bfb: "Xun " -0x5bfc: "Dao " -0x5bfd: "Lu " -0x5bfe: "Dui " -0x5bff: "Shou " -/* x05c */ -0x5c00: "Po " -0x5c01: "Feng " -0x5c02: "Zhuan " -0x5c03: "Fu " -0x5c04: "She " -0x5c05: "Ke " -0x5c06: "Jiang " -0x5c07: "Jiang " -0x5c08: "Zhuan " -0x5c09: "Wei " -0x5c0a: "Zun " -0x5c0b: "Xun " -0x5c0c: "Shu " -0x5c0d: "Dui " -0x5c0e: "Dao " -0x5c0f: "Xiao " -0x5c10: "Ji " -0x5c11: "Shao " -0x5c12: "Er " -0x5c13: "Er " -0x5c14: "Er " -0x5c15: "Ga " -0x5c16: "Jian " -0x5c17: "Shu " -0x5c18: "Chen " -0x5c19: "Shang " -0x5c1a: "Shang " -0x5c1b: "Mo " -0x5c1c: "Ga " -0x5c1d: "Chang " -0x5c1e: "Liao " -0x5c1f: "Xian " -0x5c20: "Xian " -0x5c21: "[?] " -0x5c22: "Wang " -0x5c23: "Wang " -0x5c24: "You " -0x5c25: "Liao " -0x5c26: "Liao " -0x5c27: "Yao " -0x5c28: "Mang " -0x5c29: "Wang " -0x5c2a: "Wang " -0x5c2b: "Wang " -0x5c2c: "Ga " -0x5c2d: "Yao " -0x5c2e: "Duo " -0x5c2f: "Kui " -0x5c30: "Zhong " -0x5c31: "Jiu " -0x5c32: "Gan " -0x5c33: "Gu " -0x5c34: "Gan " -0x5c35: "Tui " -0x5c36: "Gan " -0x5c37: "Gan " -0x5c38: "Shi " -0x5c39: "Yin " -0x5c3a: "Chi " -0x5c3b: "Kao " -0x5c3c: "Ni " -0x5c3d: "Jin " -0x5c3e: "Wei " -0x5c3f: "Niao " -0x5c40: "Ju " -0x5c41: "Pi " -0x5c42: "Ceng " -0x5c43: "Xi " -0x5c44: "Bi " -0x5c45: "Ju " -0x5c46: "Jie " -0x5c47: "Tian " -0x5c48: "Qu " -0x5c49: "Ti " -0x5c4a: "Jie " -0x5c4b: "Wu " -0x5c4c: "Diao " -0x5c4d: "Shi " -0x5c4e: "Shi " -0x5c4f: "Ping " -0x5c50: "Ji " -0x5c51: "Xie " -0x5c52: "Chen " -0x5c53: "Xi " -0x5c54: "Ni " -0x5c55: "Zhan " -0x5c56: "Xi " -0x5c57: "[?] " -0x5c58: "Man " -0x5c59: "E " -0x5c5a: "Lou " -0x5c5b: "Ping " -0x5c5c: "Ti " -0x5c5d: "Fei " -0x5c5e: "Shu " -0x5c5f: "Xie " -0x5c60: "Tu " -0x5c61: "Lu " -0x5c62: "Lu " -0x5c63: "Xi " -0x5c64: "Ceng " -0x5c65: "Lu " -0x5c66: "Ju " -0x5c67: "Xie " -0x5c68: "Ju " -0x5c69: "Jue " -0x5c6a: "Liao " -0x5c6b: "Jue " -0x5c6c: "Shu " -0x5c6d: "Xi " -0x5c6e: "Che " -0x5c6f: "Tun " -0x5c70: "Ni " -0x5c71: "Shan " -0x5c72: "[?] " -0x5c73: "Xian " -0x5c74: "Li " -0x5c75: "Xue " -0x5c76: "Nata " -0x5c77: "[?] " -0x5c78: "Long " -0x5c79: "Yi " -0x5c7a: "Qi " -0x5c7b: "Ren " -0x5c7c: "Wu " -0x5c7d: "Han " -0x5c7e: "Shen " -0x5c7f: "Yu " -0x5c80: "Chu " -0x5c81: "Sui " -0x5c82: "Qi " -0x5c83: "[?] " -0x5c84: "Yue " -0x5c85: "Ban " -0x5c86: "Yao " -0x5c87: "Ang " -0x5c88: "Ya " -0x5c89: "Wu " -0x5c8a: "Jie " -0x5c8b: "E " -0x5c8c: "Ji " -0x5c8d: "Qian " -0x5c8e: "Fen " -0x5c8f: "Yuan " -0x5c90: "Qi " -0x5c91: "Cen " -0x5c92: "Qian " -0x5c93: "Qi " -0x5c94: "Cha " -0x5c95: "Jie " -0x5c96: "Qu " -0x5c97: "Gang " -0x5c98: "Xian " -0x5c99: "Ao " -0x5c9a: "Lan " -0x5c9b: "Dao " -0x5c9c: "Ba " -0x5c9d: "Zuo " -0x5c9e: "Zuo " -0x5c9f: "Yang " -0x5ca0: "Ju " -0x5ca1: "Gang " -0x5ca2: "Ke " -0x5ca3: "Gou " -0x5ca4: "Xue " -0x5ca5: "Bei " -0x5ca6: "Li " -0x5ca7: "Tiao " -0x5ca8: "Ju " -0x5ca9: "Yan " -0x5caa: "Fu " -0x5cab: "Xiu " -0x5cac: "Jia " -0x5cad: "Ling " -0x5cae: "Tuo " -0x5caf: "Pei " -0x5cb0: "You " -0x5cb1: "Dai " -0x5cb2: "Kuang " -0x5cb3: "Yue " -0x5cb4: "Qu " -0x5cb5: "Hu " -0x5cb6: "Po " -0x5cb7: "Min " -0x5cb8: "An " -0x5cb9: "Tiao " -0x5cba: "Ling " -0x5cbb: "Chi " -0x5cbc: "Yuri " -0x5cbd: "Dong " -0x5cbe: "Cem " -0x5cbf: "Kui " -0x5cc0: "Xiu " -0x5cc1: "Mao " -0x5cc2: "Tong " -0x5cc3: "Xue " -0x5cc4: "Yi " -0x5cc5: "Kura " -0x5cc6: "He " -0x5cc7: "Ke " -0x5cc8: "Luo " -0x5cc9: "E " -0x5cca: "Fu " -0x5ccb: "Xun " -0x5ccc: "Die " -0x5ccd: "Lu " -0x5cce: "An " -0x5ccf: "Er " -0x5cd0: "Gai " -0x5cd1: "Quan " -0x5cd2: "Tong " -0x5cd3: "Yi " -0x5cd4: "Mu " -0x5cd5: "Shi " -0x5cd6: "An " -0x5cd7: "Wei " -0x5cd8: "Hu " -0x5cd9: "Zhi " -0x5cda: "Mi " -0x5cdb: "Li " -0x5cdc: "Ji " -0x5cdd: "Tong " -0x5cde: "Wei " -0x5cdf: "You " -0x5ce0: "Sang " -0x5ce1: "Xia " -0x5ce2: "Li " -0x5ce3: "Yao " -0x5ce4: "Jiao " -0x5ce5: "Zheng " -0x5ce6: "Luan " -0x5ce7: "Jiao " -0x5ce8: "E " -0x5ce9: "E " -0x5cea: "Yu " -0x5ceb: "Ye " -0x5cec: "Bu " -0x5ced: "Qiao " -0x5cee: "Qun " -0x5cef: "Feng " -0x5cf0: "Feng " -0x5cf1: "Nao " -0x5cf2: "Li " -0x5cf3: "You " -0x5cf4: "Xian " -0x5cf5: "Hong " -0x5cf6: "Dao " -0x5cf7: "Shen " -0x5cf8: "Cheng " -0x5cf9: "Tu " -0x5cfa: "Geng " -0x5cfb: "Jun " -0x5cfc: "Hao " -0x5cfd: "Xia " -0x5cfe: "Yin " -0x5cff: "Yu " -/* x05d */ -0x5d00: "Lang " -0x5d01: "Kan " -0x5d02: "Lao " -0x5d03: "Lai " -0x5d04: "Xian " -0x5d05: "Que " -0x5d06: "Kong " -0x5d07: "Chong " -0x5d08: "Chong " -0x5d09: "Ta " -0x5d0a: "Lin " -0x5d0b: "Hua " -0x5d0c: "Ju " -0x5d0d: "Lai " -0x5d0e: "Qi " -0x5d0f: "Min " -0x5d10: "Kun " -0x5d11: "Kun " -0x5d12: "Zu " -0x5d13: "Gu " -0x5d14: "Cui " -0x5d15: "Ya " -0x5d16: "Ya " -0x5d17: "Gang " -0x5d18: "Lun " -0x5d19: "Lun " -0x5d1a: "Leng " -0x5d1b: "Jue " -0x5d1c: "Duo " -0x5d1d: "Zheng " -0x5d1e: "Guo " -0x5d1f: "Yin " -0x5d20: "Dong " -0x5d21: "Han " -0x5d22: "Zheng " -0x5d23: "Wei " -0x5d24: "Yao " -0x5d25: "Pi " -0x5d26: "Yan " -0x5d27: "Song " -0x5d28: "Jie " -0x5d29: "Beng " -0x5d2a: "Zu " -0x5d2b: "Jue " -0x5d2c: "Dong " -0x5d2d: "Zhan " -0x5d2e: "Gu " -0x5d2f: "Yin " -0x5d30: "[?] " -0x5d31: "Ze " -0x5d32: "Huang " -0x5d33: "Yu " -0x5d34: "Wei " -0x5d35: "Yang " -0x5d36: "Feng " -0x5d37: "Qiu " -0x5d38: "Dun " -0x5d39: "Ti " -0x5d3a: "Yi " -0x5d3b: "Zhi " -0x5d3c: "Shi " -0x5d3d: "Zai " -0x5d3e: "Yao " -0x5d3f: "E " -0x5d40: "Zhu " -0x5d41: "Kan " -0x5d42: "Lu " -0x5d43: "Yan " -0x5d44: "Mei " -0x5d45: "Gan " -0x5d46: "Ji " -0x5d47: "Ji " -0x5d48: "Huan " -0x5d49: "Ting " -0x5d4a: "Sheng " -0x5d4b: "Mei " -0x5d4c: "Qian " -0x5d4d: "Wu " -0x5d4e: "Yu " -0x5d4f: "Zong " -0x5d50: "Lan " -0x5d51: "Jue " -0x5d52: "Yan " -0x5d53: "Yan " -0x5d54: "Wei " -0x5d55: "Zong " -0x5d56: "Cha " -0x5d57: "Sui " -0x5d58: "Rong " -0x5d59: "Yamashina " -0x5d5a: "Qin " -0x5d5b: "Yu " -0x5d5c: "Kewashii " -0x5d5d: "Lou " -0x5d5e: "Tu " -0x5d5f: "Dui " -0x5d60: "Xi " -0x5d61: "Weng " -0x5d62: "Cang " -0x5d63: "Dang " -0x5d64: "Hong " -0x5d65: "Jie " -0x5d66: "Ai " -0x5d67: "Liu " -0x5d68: "Wu " -0x5d69: "Song " -0x5d6a: "Qiao " -0x5d6b: "Zi " -0x5d6c: "Wei " -0x5d6d: "Beng " -0x5d6e: "Dian " -0x5d6f: "Cuo " -0x5d70: "Qian " -0x5d71: "Yong " -0x5d72: "Nie " -0x5d73: "Cuo " -0x5d74: "Ji " -0x5d75: "[?] " -0x5d76: "Tao " -0x5d77: "Song " -0x5d78: "Zong " -0x5d79: "Jiang " -0x5d7a: "Liao " -0x5d7b: "Kang " -0x5d7c: "Chan " -0x5d7d: "Die " -0x5d7e: "Cen " -0x5d7f: "Ding " -0x5d80: "Tu " -0x5d81: "Lou " -0x5d82: "Zhang " -0x5d83: "Zhan " -0x5d84: "Zhan " -0x5d85: "Ao " -0x5d86: "Cao " -0x5d87: "Qu " -0x5d88: "Qiang " -0x5d89: "Zui " -0x5d8a: "Zui " -0x5d8b: "Dao " -0x5d8c: "Dao " -0x5d8d: "Xi " -0x5d8e: "Yu " -0x5d8f: "Bo " -0x5d90: "Long " -0x5d91: "Xiang " -0x5d92: "Ceng " -0x5d93: "Bo " -0x5d94: "Qin " -0x5d95: "Jiao " -0x5d96: "Yan " -0x5d97: "Lao " -0x5d98: "Zhan " -0x5d99: "Lin " -0x5d9a: "Liao " -0x5d9b: "Liao " -0x5d9c: "Jin " -0x5d9d: "Deng " -0x5d9e: "Duo " -0x5d9f: "Zun " -0x5da0: "Jiao " -0x5da1: "Gui " -0x5da2: "Yao " -0x5da3: "Qiao " -0x5da4: "Yao " -0x5da5: "Jue " -0x5da6: "Zhan " -0x5da7: "Yi " -0x5da8: "Xue " -0x5da9: "Nao " -0x5daa: "Ye " -0x5dab: "Ye " -0x5dac: "Yi " -0x5dad: "E " -0x5dae: "Xian " -0x5daf: "Ji " -0x5db0: "Xie " -0x5db1: "Ke " -0x5db2: "Xi " -0x5db3: "Di " -0x5db4: "Ao " -0x5db5: "Zui " -0x5db6: "[?] " -0x5db7: "Ni " -0x5db8: "Rong " -0x5db9: "Dao " -0x5dba: "Ling " -0x5dbb: "Za " -0x5dbc: "Yu " -0x5dbd: "Yue " -0x5dbe: "Yin " -0x5dbf: "[?] " -0x5dc0: "Jie " -0x5dc1: "Li " -0x5dc2: "Sui " -0x5dc3: "Long " -0x5dc4: "Long " -0x5dc5: "Dian " -0x5dc6: "Ying " -0x5dc7: "Xi " -0x5dc8: "Ju " -0x5dc9: "Chan " -0x5dca: "Ying " -0x5dcb: "Kui " -0x5dcc: "Yan " -0x5dcd: "Wei " -0x5dce: "Nao " -0x5dcf: "Quan " -0x5dd0: "Chao " -0x5dd1: "Cuan " -0x5dd2: "Luan " -0x5dd3: "Dian " -0x5dd4: "Dian " -0x5dd5: "[?] " -0x5dd6: "Yan " -0x5dd7: "Yan " -0x5dd8: "Yan " -0x5dd9: "Nao " -0x5dda: "Yan " -0x5ddb: "Chuan " -0x5ddc: "Gui " -0x5ddd: "Chuan " -0x5dde: "Zhou " -0x5ddf: "Huang " -0x5de0: "Jing " -0x5de1: "Xun " -0x5de2: "Chao " -0x5de3: "Chao " -0x5de4: "Lie " -0x5de5: "Gong " -0x5de6: "Zuo " -0x5de7: "Qiao " -0x5de8: "Ju " -0x5de9: "Gong " -0x5dea: "Kek " -0x5deb: "Wu " -0x5dec: "Pwu " -0x5ded: "Pwu " -0x5dee: "Chai " -0x5def: "Qiu " -0x5df0: "Qiu " -0x5df1: "Ji " -0x5df2: "Yi " -0x5df3: "Si " -0x5df4: "Ba " -0x5df5: "Zhi " -0x5df6: "Zhao " -0x5df7: "Xiang " -0x5df8: "Yi " -0x5df9: "Jin " -0x5dfa: "Xun " -0x5dfb: "Juan " -0x5dfc: "Phas " -0x5dfd: "Xun " -0x5dfe: "Jin " -0x5dff: "Fu " -/* x05e */ -0x5e00: "Za " -0x5e01: "Bi " -0x5e02: "Shi " -0x5e03: "Bu " -0x5e04: "Ding " -0x5e05: "Shuai " -0x5e06: "Fan " -0x5e07: "Nie " -0x5e08: "Shi " -0x5e09: "Fen " -0x5e0a: "Pa " -0x5e0b: "Zhi " -0x5e0c: "Xi " -0x5e0d: "Hu " -0x5e0e: "Dan " -0x5e0f: "Wei " -0x5e10: "Zhang " -0x5e11: "Tang " -0x5e12: "Dai " -0x5e13: "Ma " -0x5e14: "Pei " -0x5e15: "Pa " -0x5e16: "Tie " -0x5e17: "Fu " -0x5e18: "Lian " -0x5e19: "Zhi " -0x5e1a: "Zhou " -0x5e1b: "Bo " -0x5e1c: "Zhi " -0x5e1d: "Di " -0x5e1e: "Mo " -0x5e1f: "Yi " -0x5e20: "Yi " -0x5e21: "Ping " -0x5e22: "Qia " -0x5e23: "Juan " -0x5e24: "Ru " -0x5e25: "Shuai " -0x5e26: "Dai " -0x5e27: "Zheng " -0x5e28: "Shui " -0x5e29: "Qiao " -0x5e2a: "Zhen " -0x5e2b: "Shi " -0x5e2c: "Qun " -0x5e2d: "Xi " -0x5e2e: "Bang " -0x5e2f: "Dai " -0x5e30: "Gui " -0x5e31: "Chou " -0x5e32: "Ping " -0x5e33: "Zhang " -0x5e34: "Sha " -0x5e35: "Wan " -0x5e36: "Dai " -0x5e37: "Wei " -0x5e38: "Chang " -0x5e39: "Sha " -0x5e3a: "Qi " -0x5e3b: "Ze " -0x5e3c: "Guo " -0x5e3d: "Mao " -0x5e3e: "Du " -0x5e3f: "Hou " -0x5e40: "Zheng " -0x5e41: "Xu " -0x5e42: "Mi " -0x5e43: "Wei " -0x5e44: "Wo " -0x5e45: "Fu " -0x5e46: "Yi " -0x5e47: "Bang " -0x5e48: "Ping " -0x5e49: "Tazuna " -0x5e4a: "Gong " -0x5e4b: "Pan " -0x5e4c: "Huang " -0x5e4d: "Dao " -0x5e4e: "Mi " -0x5e4f: "Jia " -0x5e50: "Teng " -0x5e51: "Hui " -0x5e52: "Zhong " -0x5e53: "Shan " -0x5e54: "Man " -0x5e55: "Mu " -0x5e56: "Biao " -0x5e57: "Guo " -0x5e58: "Ze " -0x5e59: "Mu " -0x5e5a: "Bang " -0x5e5b: "Zhang " -0x5e5c: "Jiong " -0x5e5d: "Chan " -0x5e5e: "Fu " -0x5e5f: "Zhi " -0x5e60: "Hu " -0x5e61: "Fan " -0x5e62: "Chuang " -0x5e63: "Bi " -0x5e64: "Hei " -0x5e65: "[?] " -0x5e66: "Mi " -0x5e67: "Qiao " -0x5e68: "Chan " -0x5e69: "Fen " -0x5e6a: "Meng " -0x5e6b: "Bang " -0x5e6c: "Chou " -0x5e6d: "Mie " -0x5e6e: "Chu " -0x5e6f: "Jie " -0x5e70: "Xian " -0x5e71: "Lan " -0x5e72: "Gan " -0x5e73: "Ping " -0x5e74: "Nian " -0x5e75: "Qian " -0x5e76: "Bing " -0x5e77: "Bing " -0x5e78: "Xing " -0x5e79: "Gan " -0x5e7a: "Yao " -0x5e7b: "Huan " -0x5e7c: "You " -0x5e7d: "You " -0x5e7e: "Ji " -0x5e7f: "Yan " -0x5e80: "Pi " -0x5e81: "Ting " -0x5e82: "Ze " -0x5e83: "Guang " -0x5e84: "Zhuang " -0x5e85: "Mo " -0x5e86: "Qing " -0x5e87: "Bi " -0x5e88: "Qin " -0x5e89: "Dun " -0x5e8a: "Chuang " -0x5e8b: "Gui " -0x5e8c: "Ya " -0x5e8d: "Bai " -0x5e8e: "Jie " -0x5e8f: "Xu " -0x5e90: "Lu " -0x5e91: "Wu " -0x5e92: "[?] " -0x5e93: "Ku " -0x5e94: "Ying " -0x5e95: "Di " -0x5e96: "Pao " -0x5e97: "Dian " -0x5e98: "Ya " -0x5e99: "Miao " -0x5e9a: "Geng " -0x5e9b: "Ci " -0x5e9c: "Fu " -0x5e9d: "Tong " -0x5e9e: "Pang " -0x5e9f: "Fei " -0x5ea0: "Xiang " -0x5ea1: "Yi " -0x5ea2: "Zhi " -0x5ea3: "Tiao " -0x5ea4: "Zhi " -0x5ea5: "Xiu " -0x5ea6: "Du " -0x5ea7: "Zuo " -0x5ea8: "Xiao " -0x5ea9: "Tu " -0x5eaa: "Gui " -0x5eab: "Ku " -0x5eac: "Pang " -0x5ead: "Ting " -0x5eae: "You " -0x5eaf: "Bu " -0x5eb0: "Ding " -0x5eb1: "Cheng " -0x5eb2: "Lai " -0x5eb3: "Bei " -0x5eb4: "Ji " -0x5eb5: "An " -0x5eb6: "Shu " -0x5eb7: "Kang " -0x5eb8: "Yong " -0x5eb9: "Tuo " -0x5eba: "Song " -0x5ebb: "Shu " -0x5ebc: "Qing " -0x5ebd: "Yu " -0x5ebe: "Yu " -0x5ebf: "Miao " -0x5ec0: "Sou " -0x5ec1: "Ce " -0x5ec2: "Xiang " -0x5ec3: "Fei " -0x5ec4: "Jiu " -0x5ec5: "He " -0x5ec6: "Hui " -0x5ec7: "Liu " -0x5ec8: "Sha " -0x5ec9: "Lian " -0x5eca: "Lang " -0x5ecb: "Sou " -0x5ecc: "Jian " -0x5ecd: "Pou " -0x5ece: "Qing " -0x5ecf: "Jiu " -0x5ed0: "Jiu " -0x5ed1: "Qin " -0x5ed2: "Ao " -0x5ed3: "Kuo " -0x5ed4: "Lou " -0x5ed5: "Yin " -0x5ed6: "Liao " -0x5ed7: "Dai " -0x5ed8: "Lu " -0x5ed9: "Yi " -0x5eda: "Chu " -0x5edb: "Chan " -0x5edc: "Tu " -0x5edd: "Si " -0x5ede: "Xin " -0x5edf: "Miao " -0x5ee0: "Chang " -0x5ee1: "Wu " -0x5ee2: "Fei " -0x5ee3: "Guang " -0x5ee4: "Koc " -0x5ee5: "Kuai " -0x5ee6: "Bi " -0x5ee7: "Qiang " -0x5ee8: "Xie " -0x5ee9: "Lin " -0x5eea: "Lin " -0x5eeb: "Liao " -0x5eec: "Lu " -0x5eed: "[?] " -0x5eee: "Ying " -0x5eef: "Xian " -0x5ef0: "Ting " -0x5ef1: "Yong " -0x5ef2: "Li " -0x5ef3: "Ting " -0x5ef4: "Yin " -0x5ef5: "Xun " -0x5ef6: "Yan " -0x5ef7: "Ting " -0x5ef8: "Di " -0x5ef9: "Po " -0x5efa: "Jian " -0x5efb: "Hui " -0x5efc: "Nai " -0x5efd: "Hui " -0x5efe: "Gong " -0x5eff: "Nian " -/* x05f */ -0x5f00: "Kai " -0x5f01: "Bian " -0x5f02: "Yi " -0x5f03: "Qi " -0x5f04: "Nong " -0x5f05: "Fen " -0x5f06: "Ju " -0x5f07: "Yan " -0x5f08: "Yi " -0x5f09: "Zang " -0x5f0a: "Bi " -0x5f0b: "Yi " -0x5f0c: "Yi " -0x5f0d: "Er " -0x5f0e: "San " -0x5f0f: "Shi " -0x5f10: "Er " -0x5f11: "Shi " -0x5f12: "Shi " -0x5f13: "Gong " -0x5f14: "Diao " -0x5f15: "Yin " -0x5f16: "Hu " -0x5f17: "Fu " -0x5f18: "Hong " -0x5f19: "Wu " -0x5f1a: "Tui " -0x5f1b: "Chi " -0x5f1c: "Jiang " -0x5f1d: "Ba " -0x5f1e: "Shen " -0x5f1f: "Di " -0x5f20: "Zhang " -0x5f21: "Jue " -0x5f22: "Tao " -0x5f23: "Fu " -0x5f24: "Di " -0x5f25: "Mi " -0x5f26: "Xian " -0x5f27: "Hu " -0x5f28: "Chao " -0x5f29: "Nu " -0x5f2a: "Jing " -0x5f2b: "Zhen " -0x5f2c: "Yi " -0x5f2d: "Mi " -0x5f2e: "Quan " -0x5f2f: "Wan " -0x5f30: "Shao " -0x5f31: "Ruo " -0x5f32: "Xuan " -0x5f33: "Jing " -0x5f34: "Dun " -0x5f35: "Zhang " -0x5f36: "Jiang " -0x5f37: "Qiang " -0x5f38: "Peng " -0x5f39: "Dan " -0x5f3a: "Qiang " -0x5f3b: "Bi " -0x5f3c: "Bi " -0x5f3d: "She " -0x5f3e: "Dan " -0x5f3f: "Jian " -0x5f40: "Gou " -0x5f41: "Sei " -0x5f42: "Fa " -0x5f43: "Bi " -0x5f44: "Kou " -0x5f45: "Nagi " -0x5f46: "Bie " -0x5f47: "Xiao " -0x5f48: "Dan " -0x5f49: "Kuo " -0x5f4a: "Qiang " -0x5f4b: "Hong " -0x5f4c: "Mi " -0x5f4d: "Kuo " -0x5f4e: "Wan " -0x5f4f: "Jue " -0x5f50: "Ji " -0x5f51: "Ji " -0x5f52: "Gui " -0x5f53: "Dang " -0x5f54: "Lu " -0x5f55: "Lu " -0x5f56: "Tuan " -0x5f57: "Hui " -0x5f58: "Zhi " -0x5f59: "Hui " -0x5f5a: "Hui " -0x5f5b: "Yi " -0x5f5c: "Yi " -0x5f5d: "Yi " -0x5f5e: "Yi " -0x5f5f: "Huo " -0x5f60: "Huo " -0x5f61: "Shan " -0x5f62: "Xing " -0x5f63: "Wen " -0x5f64: "Tong " -0x5f65: "Yan " -0x5f66: "Yan " -0x5f67: "Yu " -0x5f68: "Chi " -0x5f69: "Cai " -0x5f6a: "Biao " -0x5f6b: "Diao " -0x5f6c: "Bin " -0x5f6d: "Peng " -0x5f6e: "Yong " -0x5f6f: "Piao " -0x5f70: "Zhang " -0x5f71: "Ying " -0x5f72: "Chi " -0x5f73: "Chi " -0x5f74: "Zhuo " -0x5f75: "Tuo " -0x5f76: "Ji " -0x5f77: "Pang " -0x5f78: "Zhong " -0x5f79: "Yi " -0x5f7a: "Wang " -0x5f7b: "Che " -0x5f7c: "Bi " -0x5f7d: "Chi " -0x5f7e: "Ling " -0x5f7f: "Fu " -0x5f80: "Wang " -0x5f81: "Zheng " -0x5f82: "Cu " -0x5f83: "Wang " -0x5f84: "Jing " -0x5f85: "Dai " -0x5f86: "Xi " -0x5f87: "Xun " -0x5f88: "Hen " -0x5f89: "Yang " -0x5f8a: "Huai " -0x5f8b: "Lu " -0x5f8c: "Hou " -0x5f8d: "Wa " -0x5f8e: "Cheng " -0x5f8f: "Zhi " -0x5f90: "Xu " -0x5f91: "Jing " -0x5f92: "Tu " -0x5f93: "Cong " -0x5f94: "[?] " -0x5f95: "Lai " -0x5f96: "Cong " -0x5f97: "De " -0x5f98: "Pai " -0x5f99: "Xi " -0x5f9a: "[?] " -0x5f9b: "Qi " -0x5f9c: "Chang " -0x5f9d: "Zhi " -0x5f9e: "Cong " -0x5f9f: "Zhou " -0x5fa0: "Lai " -0x5fa1: "Yu " -0x5fa2: "Xie " -0x5fa3: "Jie " -0x5fa4: "Jian " -0x5fa5: "Chi " -0x5fa6: "Jia " -0x5fa7: "Bian " -0x5fa8: "Huang " -0x5fa9: "Fu " -0x5faa: "Xun " -0x5fab: "Wei " -0x5fac: "Pang " -0x5fad: "Yao " -0x5fae: "Wei " -0x5faf: "Xi " -0x5fb0: "Zheng " -0x5fb1: "Piao " -0x5fb2: "Chi " -0x5fb3: "De " -0x5fb4: "Zheng " -0x5fb5: "Zheng " -0x5fb6: "Bie " -0x5fb7: "De " -0x5fb8: "Chong " -0x5fb9: "Che " -0x5fba: "Jiao " -0x5fbb: "Wei " -0x5fbc: "Jiao " -0x5fbd: "Hui " -0x5fbe: "Mei " -0x5fbf: "Long " -0x5fc0: "Xiang " -0x5fc1: "Bao " -0x5fc2: "Qu " -0x5fc3: "Xin " -0x5fc4: "Shu " -0x5fc5: "Bi " -0x5fc6: "Yi " -0x5fc7: "Le " -0x5fc8: "Ren " -0x5fc9: "Dao " -0x5fca: "Ding " -0x5fcb: "Gai " -0x5fcc: "Ji " -0x5fcd: "Ren " -0x5fce: "Ren " -0x5fcf: "Chan " -0x5fd0: "Tan " -0x5fd1: "Te " -0x5fd2: "Te " -0x5fd3: "Gan " -0x5fd4: "Qi " -0x5fd5: "Shi " -0x5fd6: "Cun " -0x5fd7: "Zhi " -0x5fd8: "Wang " -0x5fd9: "Mang " -0x5fda: "Xi " -0x5fdb: "Fan " -0x5fdc: "Ying " -0x5fdd: "Tian " -0x5fde: "Min " -0x5fdf: "Min " -0x5fe0: "Zhong " -0x5fe1: "Chong " -0x5fe2: "Wu " -0x5fe3: "Ji " -0x5fe4: "Wu " -0x5fe5: "Xi " -0x5fe6: "Ye " -0x5fe7: "You " -0x5fe8: "Wan " -0x5fe9: "Cong " -0x5fea: "Zhong " -0x5feb: "Kuai " -0x5fec: "Yu " -0x5fed: "Bian " -0x5fee: "Zhi " -0x5fef: "Qi " -0x5ff0: "Cui " -0x5ff1: "Chen " -0x5ff2: "Tai " -0x5ff3: "Tun " -0x5ff4: "Qian " -0x5ff5: "Nian " -0x5ff6: "Hun " -0x5ff7: "Xiong " -0x5ff8: "Niu " -0x5ff9: "Wang " -0x5ffa: "Xian " -0x5ffb: "Xin " -0x5ffc: "Kang " -0x5ffd: "Hu " -0x5ffe: "Kai " -0x5fff: "Fen " -/* x060 */ -0x6000: "Huai " -0x6001: "Tai " -0x6002: "Song " -0x6003: "Wu " -0x6004: "Ou " -0x6005: "Chang " -0x6006: "Chuang " -0x6007: "Ju " -0x6008: "Yi " -0x6009: "Bao " -0x600a: "Chao " -0x600b: "Min " -0x600c: "Pei " -0x600d: "Zuo " -0x600e: "Zen " -0x600f: "Yang " -0x6010: "Kou " -0x6011: "Ban " -0x6012: "Nu " -0x6013: "Nao " -0x6014: "Zheng " -0x6015: "Pa " -0x6016: "Bu " -0x6017: "Tie " -0x6018: "Gu " -0x6019: "Hu " -0x601a: "Ju " -0x601b: "Da " -0x601c: "Lian " -0x601d: "Si " -0x601e: "Chou " -0x601f: "Di " -0x6020: "Dai " -0x6021: "Yi " -0x6022: "Tu " -0x6023: "You " -0x6024: "Fu " -0x6025: "Ji " -0x6026: "Peng " -0x6027: "Xing " -0x6028: "Yuan " -0x6029: "Ni " -0x602a: "Guai " -0x602b: "Fu " -0x602c: "Xi " -0x602d: "Bi " -0x602e: "You " -0x602f: "Qie " -0x6030: "Xuan " -0x6031: "Cong " -0x6032: "Bing " -0x6033: "Huang " -0x6034: "Xu " -0x6035: "Chu " -0x6036: "Pi " -0x6037: "Xi " -0x6038: "Xi " -0x6039: "Tan " -0x603a: "Koraeru " -0x603b: "Zong " -0x603c: "Dui " -0x603d: "[?] " -0x603e: "Ki " -0x603f: "Yi " -0x6040: "Chi " -0x6041: "Ren " -0x6042: "Xun " -0x6043: "Shi " -0x6044: "Xi " -0x6045: "Lao " -0x6046: "Heng " -0x6047: "Kuang " -0x6048: "Mu " -0x6049: "Zhi " -0x604a: "Xie " -0x604b: "Lian " -0x604c: "Tiao " -0x604d: "Huang " -0x604e: "Die " -0x604f: "Hao " -0x6050: "Kong " -0x6051: "Gui " -0x6052: "Heng " -0x6053: "Xi " -0x6054: "Xiao " -0x6055: "Shu " -0x6056: "S " -0x6057: "Kua " -0x6058: "Qiu " -0x6059: "Yang " -0x605a: "Hui " -0x605b: "Hui " -0x605c: "Chi " -0x605d: "Jia " -0x605e: "Yi " -0x605f: "Xiong " -0x6060: "Guai " -0x6061: "Lin " -0x6062: "Hui " -0x6063: "Zi " -0x6064: "Xu " -0x6065: "Chi " -0x6066: "Xiang " -0x6067: "Nu " -0x6068: "Hen " -0x6069: "En " -0x606a: "Ke " -0x606b: "Tong " -0x606c: "Tian " -0x606d: "Gong " -0x606e: "Quan " -0x606f: "Xi " -0x6070: "Qia " -0x6071: "Yue " -0x6072: "Peng " -0x6073: "Ken " -0x6074: "De " -0x6075: "Hui " -0x6076: "E " -0x6077: "Kyuu " -0x6078: "Tong " -0x6079: "Yan " -0x607a: "Kai " -0x607b: "Ce " -0x607c: "Nao " -0x607d: "Yun " -0x607e: "Mang " -0x607f: "Yong " -0x6080: "Yong " -0x6081: "Yuan " -0x6082: "Pi " -0x6083: "Kun " -0x6084: "Qiao " -0x6085: "Yue " -0x6086: "Yu " -0x6087: "Yu " -0x6088: "Jie " -0x6089: "Xi " -0x608a: "Zhe " -0x608b: "Lin " -0x608c: "Ti " -0x608d: "Han " -0x608e: "Hao " -0x608f: "Qie " -0x6090: "Ti " -0x6091: "Bu " -0x6092: "Yi " -0x6093: "Qian " -0x6094: "Hui " -0x6095: "Xi " -0x6096: "Bei " -0x6097: "Man " -0x6098: "Yi " -0x6099: "Heng " -0x609a: "Song " -0x609b: "Quan " -0x609c: "Cheng " -0x609d: "Hui " -0x609e: "Wu " -0x609f: "Wu " -0x60a0: "You " -0x60a1: "Li " -0x60a2: "Liang " -0x60a3: "Huan " -0x60a4: "Cong " -0x60a5: "Yi " -0x60a6: "Yue " -0x60a7: "Li " -0x60a8: "Nin " -0x60a9: "Nao " -0x60aa: "E " -0x60ab: "Que " -0x60ac: "Xuan " -0x60ad: "Qian " -0x60ae: "Wu " -0x60af: "Min " -0x60b0: "Cong " -0x60b1: "Fei " -0x60b2: "Bei " -0x60b3: "Duo " -0x60b4: "Cui " -0x60b5: "Chang " -0x60b6: "Men " -0x60b7: "Li " -0x60b8: "Ji " -0x60b9: "Guan " -0x60ba: "Guan " -0x60bb: "Xing " -0x60bc: "Dao " -0x60bd: "Qi " -0x60be: "Kong " -0x60bf: "Tian " -0x60c0: "Lun " -0x60c1: "Xi " -0x60c2: "Kan " -0x60c3: "Kun " -0x60c4: "Ni " -0x60c5: "Qing " -0x60c6: "Chou " -0x60c7: "Dun " -0x60c8: "Guo " -0x60c9: "Chan " -0x60ca: "Liang " -0x60cb: "Wan " -0x60cc: "Yuan " -0x60cd: "Jin " -0x60ce: "Ji " -0x60cf: "Lin " -0x60d0: "Yu " -0x60d1: "Huo " -0x60d2: "He " -0x60d3: "Quan " -0x60d4: "Tan " -0x60d5: "Ti " -0x60d6: "Ti " -0x60d7: "Nie " -0x60d8: "Wang " -0x60d9: "Chuo " -0x60da: "Bu " -0x60db: "Hun " -0x60dc: "Xi " -0x60dd: "Tang " -0x60de: "Xin " -0x60df: "Wei " -0x60e0: "Hui " -0x60e1: "E " -0x60e2: "Rui " -0x60e3: "Zong " -0x60e4: "Jian " -0x60e5: "Yong " -0x60e6: "Dian " -0x60e7: "Ju " -0x60e8: "Can " -0x60e9: "Cheng " -0x60ea: "De " -0x60eb: "Bei " -0x60ec: "Qie " -0x60ed: "Can " -0x60ee: "Dan " -0x60ef: "Guan " -0x60f0: "Duo " -0x60f1: "Nao " -0x60f2: "Yun " -0x60f3: "Xiang " -0x60f4: "Zhui " -0x60f5: "Die " -0x60f6: "Huang " -0x60f7: "Chun " -0x60f8: "Qiong " -0x60f9: "Re " -0x60fa: "Xing " -0x60fb: "Ce " -0x60fc: "Bian " -0x60fd: "Hun " -0x60fe: "Zong " -0x60ff: "Ti " -/* x061 */ -0x6100: "Qiao " -0x6101: "Chou " -0x6102: "Bei " -0x6103: "Xuan " -0x6104: "Wei " -0x6105: "Ge " -0x6106: "Qian " -0x6107: "Wei " -0x6108: "Yu " -0x6109: "Yu " -0x610a: "Bi " -0x610b: "Xuan " -0x610c: "Huan " -0x610d: "Min " -0x610e: "Bi " -0x610f: "Yi " -0x6110: "Mian " -0x6111: "Yong " -0x6112: "Kai " -0x6113: "Dang " -0x6114: "Yin " -0x6115: "E " -0x6116: "Chen " -0x6117: "Mou " -0x6118: "Ke " -0x6119: "Ke " -0x611a: "Yu " -0x611b: "Ai " -0x611c: "Qie " -0x611d: "Yan " -0x611e: "Nuo " -0x611f: "Gan " -0x6120: "Yun " -0x6121: "Zong " -0x6122: "Sai " -0x6123: "Leng " -0x6124: "Fen " -0x6125: "[?] " -0x6126: "Kui " -0x6127: "Kui " -0x6128: "Que " -0x6129: "Gong " -0x612a: "Yun " -0x612b: "Su " -0x612c: "Su " -0x612d: "Qi " -0x612e: "Yao " -0x612f: "Song " -0x6130: "Huang " -0x6131: "Ji " -0x6132: "Gu " -0x6133: "Ju " -0x6134: "Chuang " -0x6135: "Ni " -0x6136: "Xie " -0x6137: "Kai " -0x6138: "Zheng " -0x6139: "Yong " -0x613a: "Cao " -0x613b: "Sun " -0x613c: "Shen " -0x613d: "Bo " -0x613e: "Kai " -0x613f: "Yuan " -0x6140: "Xie " -0x6141: "Hun " -0x6142: "Yong " -0x6143: "Yang " -0x6144: "Li " -0x6145: "Sao " -0x6146: "Tao " -0x6147: "Yin " -0x6148: "Ci " -0x6149: "Xu " -0x614a: "Qian " -0x614b: "Tai " -0x614c: "Huang " -0x614d: "Yun " -0x614e: "Shen " -0x614f: "Ming " -0x6150: "[?] " -0x6151: "She " -0x6152: "Cong " -0x6153: "Piao " -0x6154: "Mo " -0x6155: "Mu " -0x6156: "Guo " -0x6157: "Chi " -0x6158: "Can " -0x6159: "Can " -0x615a: "Can " -0x615b: "Cui " -0x615c: "Min " -0x615d: "Te " -0x615e: "Zhang " -0x615f: "Tong " -0x6160: "Ao " -0x6161: "Shuang " -0x6162: "Man " -0x6163: "Guan " -0x6164: "Que " -0x6165: "Zao " -0x6166: "Jiu " -0x6167: "Hui " -0x6168: "Kai " -0x6169: "Lian " -0x616a: "Ou " -0x616b: "Song " -0x616c: "Jin " -0x616d: "Yin " -0x616e: "Lu " -0x616f: "Shang " -0x6170: "Wei " -0x6171: "Tuan " -0x6172: "Man " -0x6173: "Qian " -0x6174: "She " -0x6175: "Yong " -0x6176: "Qing " -0x6177: "Kang " -0x6178: "Di " -0x6179: "Zhi " -0x617a: "Lou " -0x617b: "Juan " -0x617c: "Qi " -0x617d: "Qi " -0x617e: "Yu " -0x617f: "Ping " -0x6180: "Liao " -0x6181: "Cong " -0x6182: "You " -0x6183: "Chong " -0x6184: "Zhi " -0x6185: "Tong " -0x6186: "Cheng " -0x6187: "Qi " -0x6188: "Qu " -0x6189: "Peng " -0x618a: "Bei " -0x618b: "Bie " -0x618c: "Chun " -0x618d: "Jiao " -0x618e: "Zeng " -0x618f: "Chi " -0x6190: "Lian " -0x6191: "Ping " -0x6192: "Kui " -0x6193: "Hui " -0x6194: "Qiao " -0x6195: "Cheng " -0x6196: "Yin " -0x6197: "Yin " -0x6198: "Xi " -0x6199: "Xi " -0x619a: "Dan " -0x619b: "Tan " -0x619c: "Duo " -0x619d: "Dui " -0x619e: "Dui " -0x619f: "Su " -0x61a0: "Jue " -0x61a1: "Ce " -0x61a2: "Xiao " -0x61a3: "Fan " -0x61a4: "Fen " -0x61a5: "Lao " -0x61a6: "Lao " -0x61a7: "Chong " -0x61a8: "Han " -0x61a9: "Qi " -0x61aa: "Xian " -0x61ab: "Min " -0x61ac: "Jing " -0x61ad: "Liao " -0x61ae: "Wu " -0x61af: "Can " -0x61b0: "Jue " -0x61b1: "Cu " -0x61b2: "Xian " -0x61b3: "Tan " -0x61b4: "Sheng " -0x61b5: "Pi " -0x61b6: "Yi " -0x61b7: "Chu " -0x61b8: "Xian " -0x61b9: "Nao " -0x61ba: "Dan " -0x61bb: "Tan " -0x61bc: "Jing " -0x61bd: "Song " -0x61be: "Han " -0x61bf: "Jiao " -0x61c0: "Wai " -0x61c1: "Huan " -0x61c2: "Dong " -0x61c3: "Qin " -0x61c4: "Qin " -0x61c5: "Qu " -0x61c6: "Cao " -0x61c7: "Ken " -0x61c8: "Xie " -0x61c9: "Ying " -0x61ca: "Ao " -0x61cb: "Mao " -0x61cc: "Yi " -0x61cd: "Lin " -0x61ce: "Se " -0x61cf: "Jun " -0x61d0: "Huai " -0x61d1: "Men " -0x61d2: "Lan " -0x61d3: "Ai " -0x61d4: "Lin " -0x61d5: "Yan " -0x61d6: "Gua " -0x61d7: "Xia " -0x61d8: "Chi " -0x61d9: "Yu " -0x61da: "Yin " -0x61db: "Dai " -0x61dc: "Meng " -0x61dd: "Ai " -0x61de: "Meng " -0x61df: "Dui " -0x61e0: "Qi " -0x61e1: "Mo " -0x61e2: "Lan " -0x61e3: "Men " -0x61e4: "Chou " -0x61e5: "Zhi " -0x61e6: "Nuo " -0x61e7: "Nuo " -0x61e8: "Yan " -0x61e9: "Yang " -0x61ea: "Bo " -0x61eb: "Zhi " -0x61ec: "Kuang " -0x61ed: "Kuang " -0x61ee: "You " -0x61ef: "Fu " -0x61f0: "Liu " -0x61f1: "Mie " -0x61f2: "Cheng " -0x61f3: "[?] " -0x61f4: "Chan " -0x61f5: "Meng " -0x61f6: "Lan " -0x61f7: "Huai " -0x61f8: "Xuan " -0x61f9: "Rang " -0x61fa: "Chan " -0x61fb: "Ji " -0x61fc: "Ju " -0x61fd: "Huan " -0x61fe: "She " -0x61ff: "Yi " -/* x062 */ -0x6200: "Lian " -0x6201: "Nan " -0x6202: "Mi " -0x6203: "Tang " -0x6204: "Jue " -0x6205: "Gang " -0x6206: "Gang " -0x6207: "Gang " -0x6208: "Ge " -0x6209: "Yue " -0x620a: "Wu " -0x620b: "Jian " -0x620c: "Xu " -0x620d: "Shu " -0x620e: "Rong " -0x620f: "Xi " -0x6210: "Cheng " -0x6211: "Wo " -0x6212: "Jie " -0x6213: "Ge " -0x6214: "Jian " -0x6215: "Qiang " -0x6216: "Huo " -0x6217: "Qiang " -0x6218: "Zhan " -0x6219: "Dong " -0x621a: "Qi " -0x621b: "Jia " -0x621c: "Die " -0x621d: "Zei " -0x621e: "Jia " -0x621f: "Ji " -0x6220: "Shi " -0x6221: "Kan " -0x6222: "Ji " -0x6223: "Kui " -0x6224: "Gai " -0x6225: "Deng " -0x6226: "Zhan " -0x6227: "Chuang " -0x6228: "Ge " -0x6229: "Jian " -0x622a: "Jie " -0x622b: "Yu " -0x622c: "Jian " -0x622d: "Yan " -0x622e: "Lu " -0x622f: "Xi " -0x6230: "Zhan " -0x6231: "Xi " -0x6232: "Xi " -0x6233: "Chuo " -0x6234: "Dai " -0x6235: "Qu " -0x6236: "Hu " -0x6237: "Hu " -0x6238: "Hu " -0x6239: "E " -0x623a: "Shi " -0x623b: "Li " -0x623c: "Mao " -0x623d: "Hu " -0x623e: "Li " -0x623f: "Fang " -0x6240: "Suo " -0x6241: "Bian " -0x6242: "Dian " -0x6243: "Jiong " -0x6244: "Shang " -0x6245: "Yi " -0x6246: "Yi " -0x6247: "Shan " -0x6248: "Hu " -0x6249: "Fei " -0x624a: "Yan " -0x624b: "Shou " -0x624c: "T " -0x624d: "Cai " -0x624e: "Zha " -0x624f: "Qiu " -0x6250: "Le " -0x6251: "Bu " -0x6252: "Ba " -0x6253: "Da " -0x6254: "Reng " -0x6255: "Fu " -0x6256: "Hameru " -0x6257: "Zai " -0x6258: "Tuo " -0x6259: "Zhang " -0x625a: "Diao " -0x625b: "Kang " -0x625c: "Yu " -0x625d: "Ku " -0x625e: "Han " -0x625f: "Shen " -0x6260: "Cha " -0x6261: "Yi " -0x6262: "Gu " -0x6263: "Kou " -0x6264: "Wu " -0x6265: "Tuo " -0x6266: "Qian " -0x6267: "Zhi " -0x6268: "Ren " -0x6269: "Kuo " -0x626a: "Men " -0x626b: "Sao " -0x626c: "Yang " -0x626d: "Niu " -0x626e: "Ban " -0x626f: "Che " -0x6270: "Rao " -0x6271: "Xi " -0x6272: "Qian " -0x6273: "Ban " -0x6274: "Jia " -0x6275: "Yu " -0x6276: "Fu " -0x6277: "Ao " -0x6278: "Xi " -0x6279: "Pi " -0x627a: "Zhi " -0x627b: "Zi " -0x627c: "E " -0x627d: "Dun " -0x627e: "Zhao " -0x627f: "Cheng " -0x6280: "Ji " -0x6281: "Yan " -0x6282: "Kuang " -0x6283: "Bian " -0x6284: "Chao " -0x6285: "Ju " -0x6286: "Wen " -0x6287: "Hu " -0x6288: "Yue " -0x6289: "Jue " -0x628a: "Ba " -0x628b: "Qin " -0x628c: "Zhen " -0x628d: "Zheng " -0x628e: "Yun " -0x628f: "Wan " -0x6290: "Nu " -0x6291: "Yi " -0x6292: "Shu " -0x6293: "Zhua " -0x6294: "Pou " -0x6295: "Tou " -0x6296: "Dou " -0x6297: "Kang " -0x6298: "Zhe " -0x6299: "Pou " -0x629a: "Fu " -0x629b: "Pao " -0x629c: "Ba " -0x629d: "Ao " -0x629e: "Ze " -0x629f: "Tuan " -0x62a0: "Kou " -0x62a1: "Lun " -0x62a2: "Qiang " -0x62a3: "[?] " -0x62a4: "Hu " -0x62a5: "Bao " -0x62a6: "Bing " -0x62a7: "Zhi " -0x62a8: "Peng " -0x62a9: "Tan " -0x62aa: "Pu " -0x62ab: "Pi " -0x62ac: "Tai " -0x62ad: "Yao " -0x62ae: "Zhen " -0x62af: "Zha " -0x62b0: "Yang " -0x62b1: "Bao " -0x62b2: "He " -0x62b3: "Ni " -0x62b4: "Yi " -0x62b5: "Di " -0x62b6: "Chi " -0x62b7: "Pi " -0x62b8: "Za " -0x62b9: "Mo " -0x62ba: "Mo " -0x62bb: "Shen " -0x62bc: "Ya " -0x62bd: "Chou " -0x62be: "Qu " -0x62bf: "Min " -0x62c0: "Chu " -0x62c1: "Jia " -0x62c2: "Fu " -0x62c3: "Zhan " -0x62c4: "Zhu " -0x62c5: "Dan " -0x62c6: "Chai " -0x62c7: "Mu " -0x62c8: "Nian " -0x62c9: "La " -0x62ca: "Fu " -0x62cb: "Pao " -0x62cc: "Ban " -0x62cd: "Pai " -0x62ce: "Ling " -0x62cf: "Na " -0x62d0: "Guai " -0x62d1: "Qian " -0x62d2: "Ju " -0x62d3: "Tuo " -0x62d4: "Ba " -0x62d5: "Tuo " -0x62d6: "Tuo " -0x62d7: "Ao " -0x62d8: "Ju " -0x62d9: "Zhuo " -0x62da: "Pan " -0x62db: "Zhao " -0x62dc: "Bai " -0x62dd: "Bai " -0x62de: "Di " -0x62df: "Ni " -0x62e0: "Ju " -0x62e1: "Kuo " -0x62e2: "Long " -0x62e3: "Jian " -0x62e4: "[?] " -0x62e5: "Yong " -0x62e6: "Lan " -0x62e7: "Ning " -0x62e8: "Bo " -0x62e9: "Ze " -0x62ea: "Qian " -0x62eb: "Hen " -0x62ec: "Gua " -0x62ed: "Shi " -0x62ee: "Jie " -0x62ef: "Zheng " -0x62f0: "Nin " -0x62f1: "Gong " -0x62f2: "Gong " -0x62f3: "Quan " -0x62f4: "Shuan " -0x62f5: "Cun " -0x62f6: "Zan " -0x62f7: "Kao " -0x62f8: "Chi " -0x62f9: "Xie " -0x62fa: "Ce " -0x62fb: "Hui " -0x62fc: "Pin " -0x62fd: "Zhuai " -0x62fe: "Shi " -0x62ff: "Na " -/* x063 */ -0x6300: "Bo " -0x6301: "Chi " -0x6302: "Gua " -0x6303: "Zhi " -0x6304: "Kuo " -0x6305: "Duo " -0x6306: "Duo " -0x6307: "Zhi " -0x6308: "Qie " -0x6309: "An " -0x630a: "Nong " -0x630b: "Zhen " -0x630c: "Ge " -0x630d: "Jiao " -0x630e: "Ku " -0x630f: "Dong " -0x6310: "Ru " -0x6311: "Tiao " -0x6312: "Lie " -0x6313: "Zha " -0x6314: "Lu " -0x6315: "Die " -0x6316: "Wa " -0x6317: "Jue " -0x6318: "Mushiru " -0x6319: "Ju " -0x631a: "Zhi " -0x631b: "Luan " -0x631c: "Ya " -0x631d: "Zhua " -0x631e: "Ta " -0x631f: "Xie " -0x6320: "Nao " -0x6321: "Dang " -0x6322: "Jiao " -0x6323: "Zheng " -0x6324: "Ji " -0x6325: "Hui " -0x6326: "Xun " -0x6327: "Ku " -0x6328: "Ai " -0x6329: "Tuo " -0x632a: "Nuo " -0x632b: "Cuo " -0x632c: "Bo " -0x632d: "Geng " -0x632e: "Ti " -0x632f: "Zhen " -0x6330: "Cheng " -0x6331: "Suo " -0x6332: "Suo " -0x6333: "Keng " -0x6334: "Mei " -0x6335: "Long " -0x6336: "Ju " -0x6337: "Peng " -0x6338: "Jian " -0x6339: "Yi " -0x633a: "Ting " -0x633b: "Shan " -0x633c: "Nuo " -0x633d: "Wan " -0x633e: "Xie " -0x633f: "Cha " -0x6340: "Feng " -0x6341: "Jiao " -0x6342: "Wu " -0x6343: "Jun " -0x6344: "Jiu " -0x6345: "Tong " -0x6346: "Kun " -0x6347: "Huo " -0x6348: "Tu " -0x6349: "Zhuo " -0x634a: "Pou " -0x634b: "Le " -0x634c: "Ba " -0x634d: "Han " -0x634e: "Shao " -0x634f: "Nie " -0x6350: "Juan " -0x6351: "Ze " -0x6352: "Song " -0x6353: "Ye " -0x6354: "Jue " -0x6355: "Bu " -0x6356: "Huan " -0x6357: "Bu " -0x6358: "Zun " -0x6359: "Yi " -0x635a: "Zhai " -0x635b: "Lu " -0x635c: "Sou " -0x635d: "Tuo " -0x635e: "Lao " -0x635f: "Sun " -0x6360: "Bang " -0x6361: "Jian " -0x6362: "Huan " -0x6363: "Dao " -0x6364: "[?] " -0x6365: "Wan " -0x6366: "Qin " -0x6367: "Peng " -0x6368: "She " -0x6369: "Lie " -0x636a: "Min " -0x636b: "Men " -0x636c: "Fu " -0x636d: "Bai " -0x636e: "Ju " -0x636f: "Dao " -0x6370: "Wo " -0x6371: "Ai " -0x6372: "Juan " -0x6373: "Yue " -0x6374: "Zong " -0x6375: "Chen " -0x6376: "Chui " -0x6377: "Jie " -0x6378: "Tu " -0x6379: "Ben " -0x637a: "Na " -0x637b: "Nian " -0x637c: "Nuo " -0x637d: "Zu " -0x637e: "Wo " -0x637f: "Xi " -0x6380: "Xian " -0x6381: "Cheng " -0x6382: "Dian " -0x6383: "Sao " -0x6384: "Lun " -0x6385: "Qing " -0x6386: "Gang " -0x6387: "Duo " -0x6388: "Shou " -0x6389: "Diao " -0x638a: "Pou " -0x638b: "Di " -0x638c: "Zhang " -0x638d: "Gun " -0x638e: "Ji " -0x638f: "Tao " -0x6390: "Qia " -0x6391: "Qi " -0x6392: "Pai " -0x6393: "Shu " -0x6394: "Qian " -0x6395: "Ling " -0x6396: "Yi " -0x6397: "Ya " -0x6398: "Jue " -0x6399: "Zheng " -0x639a: "Liang " -0x639b: "Gua " -0x639c: "Yi " -0x639d: "Huo " -0x639e: "Shan " -0x639f: "Zheng " -0x63a0: "Lue " -0x63a1: "Cai " -0x63a2: "Tan " -0x63a3: "Che " -0x63a4: "Bing " -0x63a5: "Jie " -0x63a6: "Ti " -0x63a7: "Kong " -0x63a8: "Tui " -0x63a9: "Yan " -0x63aa: "Cuo " -0x63ab: "Zou " -0x63ac: "Ju " -0x63ad: "Tian " -0x63ae: "Qian " -0x63af: "Ken " -0x63b0: "Bai " -0x63b1: "Shou " -0x63b2: "Jie " -0x63b3: "Lu " -0x63b4: "Guo " -0x63b5: "Haba " -0x63b6: "[?] " -0x63b7: "Zhi " -0x63b8: "Dan " -0x63b9: "Mang " -0x63ba: "Xian " -0x63bb: "Sao " -0x63bc: "Guan " -0x63bd: "Peng " -0x63be: "Yuan " -0x63bf: "Nuo " -0x63c0: "Jian " -0x63c1: "Zhen " -0x63c2: "Jiu " -0x63c3: "Jian " -0x63c4: "Yu " -0x63c5: "Yan " -0x63c6: "Kui " -0x63c7: "Nan " -0x63c8: "Hong " -0x63c9: "Rou " -0x63ca: "Pi " -0x63cb: "Wei " -0x63cc: "Sai " -0x63cd: "Zou " -0x63ce: "Xuan " -0x63cf: "Miao " -0x63d0: "Ti " -0x63d1: "Nie " -0x63d2: "Cha " -0x63d3: "Shi " -0x63d4: "Zong " -0x63d5: "Zhen " -0x63d6: "Yi " -0x63d7: "Shun " -0x63d8: "Heng " -0x63d9: "Bian " -0x63da: "Yang " -0x63db: "Huan " -0x63dc: "Yan " -0x63dd: "Zuan " -0x63de: "An " -0x63df: "Xu " -0x63e0: "Ya " -0x63e1: "Wo " -0x63e2: "Ke " -0x63e3: "Chuai " -0x63e4: "Ji " -0x63e5: "Ti " -0x63e6: "La " -0x63e7: "La " -0x63e8: "Cheng " -0x63e9: "Kai " -0x63ea: "Jiu " -0x63eb: "Jiu " -0x63ec: "Tu " -0x63ed: "Jie " -0x63ee: "Hui " -0x63ef: "Geng " -0x63f0: "Chong " -0x63f1: "Shuo " -0x63f2: "She " -0x63f3: "Xie " -0x63f4: "Yuan " -0x63f5: "Qian " -0x63f6: "Ye " -0x63f7: "Cha " -0x63f8: "Zha " -0x63f9: "Bei " -0x63fa: "Yao " -0x63fb: "[?] " -0x63fc: "[?] " -0x63fd: "Lan " -0x63fe: "Wen " -0x63ff: "Qin " -/* x064 */ -0x6400: "Chan " -0x6401: "Ge " -0x6402: "Lou " -0x6403: "Zong " -0x6404: "Geng " -0x6405: "Jiao " -0x6406: "Gou " -0x6407: "Qin " -0x6408: "Yong " -0x6409: "Que " -0x640a: "Chou " -0x640b: "Chi " -0x640c: "Zhan " -0x640d: "Sun " -0x640e: "Sun " -0x640f: "Bo " -0x6410: "Chu " -0x6411: "Rong " -0x6412: "Beng " -0x6413: "Cuo " -0x6414: "Sao " -0x6415: "Ke " -0x6416: "Yao " -0x6417: "Dao " -0x6418: "Zhi " -0x6419: "Nu " -0x641a: "Xie " -0x641b: "Jian " -0x641c: "Sou " -0x641d: "Qiu " -0x641e: "Gao " -0x641f: "Xian " -0x6420: "Shuo " -0x6421: "Sang " -0x6422: "Jin " -0x6423: "Mie " -0x6424: "E " -0x6425: "Chui " -0x6426: "Nuo " -0x6427: "Shan " -0x6428: "Ta " -0x6429: "Jie " -0x642a: "Tang " -0x642b: "Pan " -0x642c: "Ban " -0x642d: "Da " -0x642e: "Li " -0x642f: "Tao " -0x6430: "Hu " -0x6431: "Zhi " -0x6432: "Wa " -0x6433: "Xia " -0x6434: "Qian " -0x6435: "Wen " -0x6436: "Qiang " -0x6437: "Tian " -0x6438: "Zhen " -0x6439: "E " -0x643a: "Xi " -0x643b: "Nuo " -0x643c: "Quan " -0x643d: "Cha " -0x643e: "Zha " -0x643f: "Ge " -0x6440: "Wu " -0x6441: "En " -0x6442: "She " -0x6443: "Kang " -0x6444: "She " -0x6445: "Shu " -0x6446: "Bai " -0x6447: "Yao " -0x6448: "Bin " -0x6449: "Sou " -0x644a: "Tan " -0x644b: "Sa " -0x644c: "Chan " -0x644d: "Suo " -0x644e: "Liao " -0x644f: "Chong " -0x6450: "Chuang " -0x6451: "Guo " -0x6452: "Bing " -0x6453: "Feng " -0x6454: "Shuai " -0x6455: "Di " -0x6456: "Qi " -0x6457: "Sou " -0x6458: "Zhai " -0x6459: "Lian " -0x645a: "Tang " -0x645b: "Chi " -0x645c: "Guan " -0x645d: "Lu " -0x645e: "Luo " -0x645f: "Lou " -0x6460: "Zong " -0x6461: "Gai " -0x6462: "Hu " -0x6463: "Zha " -0x6464: "Chuang " -0x6465: "Tang " -0x6466: "Hua " -0x6467: "Cui " -0x6468: "Nai " -0x6469: "Mo " -0x646a: "Jiang " -0x646b: "Gui " -0x646c: "Ying " -0x646d: "Zhi " -0x646e: "Ao " -0x646f: "Zhi " -0x6470: "Nie " -0x6471: "Man " -0x6472: "Shan " -0x6473: "Kou " -0x6474: "Shu " -0x6475: "Suo " -0x6476: "Tuan " -0x6477: "Jiao " -0x6478: "Mo " -0x6479: "Mo " -0x647a: "Zhe " -0x647b: "Xian " -0x647c: "Keng " -0x647d: "Piao " -0x647e: "Jiang " -0x647f: "Yin " -0x6480: "Gou " -0x6481: "Qian " -0x6482: "Lue " -0x6483: "Ji " -0x6484: "Ying " -0x6485: "Jue " -0x6486: "Pie " -0x6487: "Pie " -0x6488: "Lao " -0x6489: "Dun " -0x648a: "Xian " -0x648b: "Ruan " -0x648c: "Kui " -0x648d: "Zan " -0x648e: "Yi " -0x648f: "Xun " -0x6490: "Cheng " -0x6491: "Cheng " -0x6492: "Sa " -0x6493: "Nao " -0x6494: "Heng " -0x6495: "Si " -0x6496: "Qian " -0x6497: "Huang " -0x6498: "Da " -0x6499: "Zun " -0x649a: "Nian " -0x649b: "Lin " -0x649c: "Zheng " -0x649d: "Hui " -0x649e: "Zhuang " -0x649f: "Jiao " -0x64a0: "Ji " -0x64a1: "Cao " -0x64a2: "Dan " -0x64a3: "Dan " -0x64a4: "Che " -0x64a5: "Bo " -0x64a6: "Che " -0x64a7: "Jue " -0x64a8: "Xiao " -0x64a9: "Liao " -0x64aa: "Ben " -0x64ab: "Fu " -0x64ac: "Qiao " -0x64ad: "Bo " -0x64ae: "Cuo " -0x64af: "Zhuo " -0x64b0: "Zhuan " -0x64b1: "Tuo " -0x64b2: "Pu " -0x64b3: "Qin " -0x64b4: "Dun " -0x64b5: "Nian " -0x64b6: "[?] " -0x64b7: "Xie " -0x64b8: "Lu " -0x64b9: "Jiao " -0x64ba: "Cuan " -0x64bb: "Ta " -0x64bc: "Han " -0x64bd: "Qiao " -0x64be: "Zhua " -0x64bf: "Jian " -0x64c0: "Gan " -0x64c1: "Yong " -0x64c2: "Lei " -0x64c3: "Kuo " -0x64c4: "Lu " -0x64c5: "Shan " -0x64c6: "Zhuo " -0x64c7: "Ze " -0x64c8: "Pu " -0x64c9: "Chuo " -0x64ca: "Ji " -0x64cb: "Dang " -0x64cc: "Suo " -0x64cd: "Cao " -0x64ce: "Qing " -0x64cf: "Jing " -0x64d0: "Huan " -0x64d1: "Jie " -0x64d2: "Qin " -0x64d3: "Kuai " -0x64d4: "Dan " -0x64d5: "Xi " -0x64d6: "Ge " -0x64d7: "Pi " -0x64d8: "Bo " -0x64d9: "Ao " -0x64da: "Ju " -0x64db: "Ye " -0x64dc: "[?] " -0x64dd: "Mang " -0x64de: "Sou " -0x64df: "Mi " -0x64e0: "Ji " -0x64e1: "Tai " -0x64e2: "Zhuo " -0x64e3: "Dao " -0x64e4: "Xing " -0x64e5: "Lan " -0x64e6: "Ca " -0x64e7: "Ju " -0x64e8: "Ye " -0x64e9: "Ru " -0x64ea: "Ye " -0x64eb: "Ye " -0x64ec: "Ni " -0x64ed: "Hu " -0x64ee: "Ji " -0x64ef: "Bin " -0x64f0: "Ning " -0x64f1: "Ge " -0x64f2: "Zhi " -0x64f3: "Jie " -0x64f4: "Kuo " -0x64f5: "Mo " -0x64f6: "Jian " -0x64f7: "Xie " -0x64f8: "Lie " -0x64f9: "Tan " -0x64fa: "Bai " -0x64fb: "Sou " -0x64fc: "Lu " -0x64fd: "Lue " -0x64fe: "Rao " -0x64ff: "Zhi " -/* x065 */ -0x6500: "Pan " -0x6501: "Yang " -0x6502: "Lei " -0x6503: "Sa " -0x6504: "Shu " -0x6505: "Zan " -0x6506: "Nian " -0x6507: "Xian " -0x6508: "Jun " -0x6509: "Huo " -0x650a: "Li " -0x650b: "La " -0x650c: "Han " -0x650d: "Ying " -0x650e: "Lu " -0x650f: "Long " -0x6510: "Qian " -0x6511: "Qian " -0x6512: "Zan " -0x6513: "Qian " -0x6514: "Lan " -0x6515: "San " -0x6516: "Ying " -0x6517: "Mei " -0x6518: "Rang " -0x6519: "Chan " -0x651a: "[?] " -0x651b: "Cuan " -0x651c: "Xi " -0x651d: "She " -0x651e: "Luo " -0x651f: "Jun " -0x6520: "Mi " -0x6521: "Li " -0x6522: "Zan " -0x6523: "Luan " -0x6524: "Tan " -0x6525: "Zuan " -0x6526: "Li " -0x6527: "Dian " -0x6528: "Wa " -0x6529: "Dang " -0x652a: "Jiao " -0x652b: "Jue " -0x652c: "Lan " -0x652d: "Li " -0x652e: "Nang " -0x652f: "Zhi " -0x6530: "Gui " -0x6531: "Gui " -0x6532: "Qi " -0x6533: "Xin " -0x6534: "Pu " -0x6535: "Sui " -0x6536: "Shou " -0x6537: "Kao " -0x6538: "You " -0x6539: "Gai " -0x653a: "Yi " -0x653b: "Gong " -0x653c: "Gan " -0x653d: "Ban " -0x653e: "Fang " -0x653f: "Zheng " -0x6540: "Bo " -0x6541: "Dian " -0x6542: "Kou " -0x6543: "Min " -0x6544: "Wu " -0x6545: "Gu " -0x6546: "He " -0x6547: "Ce " -0x6548: "Xiao " -0x6549: "Mi " -0x654a: "Chu " -0x654b: "Ge " -0x654c: "Di " -0x654d: "Xu " -0x654e: "Jiao " -0x654f: "Min " -0x6550: "Chen " -0x6551: "Jiu " -0x6552: "Zhen " -0x6553: "Duo " -0x6554: "Yu " -0x6555: "Chi " -0x6556: "Ao " -0x6557: "Bai " -0x6558: "Xu " -0x6559: "Jiao " -0x655a: "Duo " -0x655b: "Lian " -0x655c: "Nie " -0x655d: "Bi " -0x655e: "Chang " -0x655f: "Dian " -0x6560: "Duo " -0x6561: "Yi " -0x6562: "Gan " -0x6563: "San " -0x6564: "Ke " -0x6565: "Yan " -0x6566: "Dun " -0x6567: "Qi " -0x6568: "Dou " -0x6569: "Xiao " -0x656a: "Duo " -0x656b: "Jiao " -0x656c: "Jing " -0x656d: "Yang " -0x656e: "Xia " -0x656f: "Min " -0x6570: "Shu " -0x6571: "Ai " -0x6572: "Qiao " -0x6573: "Ai " -0x6574: "Zheng " -0x6575: "Di " -0x6576: "Zhen " -0x6577: "Fu " -0x6578: "Shu " -0x6579: "Liao " -0x657a: "Qu " -0x657b: "Xiong " -0x657c: "Xi " -0x657d: "Jiao " -0x657e: "Sen " -0x657f: "Jiao " -0x6580: "Zhuo " -0x6581: "Yi " -0x6582: "Lian " -0x6583: "Bi " -0x6584: "Li " -0x6585: "Xiao " -0x6586: "Xiao " -0x6587: "Wen " -0x6588: "Xue " -0x6589: "Qi " -0x658a: "Qi " -0x658b: "Zhai " -0x658c: "Bin " -0x658d: "Jue " -0x658e: "Zhai " -0x658f: "[?] " -0x6590: "Fei " -0x6591: "Ban " -0x6592: "Ban " -0x6593: "Lan " -0x6594: "Yu " -0x6595: "Lan " -0x6596: "Wei " -0x6597: "Dou " -0x6598: "Sheng " -0x6599: "Liao " -0x659a: "Jia " -0x659b: "Hu " -0x659c: "Xie " -0x659d: "Jia " -0x659e: "Yu " -0x659f: "Zhen " -0x65a0: "Jiao " -0x65a1: "Wo " -0x65a2: "Tou " -0x65a3: "Chu " -0x65a4: "Jin " -0x65a5: "Chi " -0x65a6: "Yin " -0x65a7: "Fu " -0x65a8: "Qiang " -0x65a9: "Zhan " -0x65aa: "Qu " -0x65ab: "Zhuo " -0x65ac: "Zhan " -0x65ad: "Duan " -0x65ae: "Zhuo " -0x65af: "Si " -0x65b0: "Xin " -0x65b1: "Zhuo " -0x65b2: "Zhuo " -0x65b3: "Qin " -0x65b4: "Lin " -0x65b5: "Zhuo " -0x65b6: "Chu " -0x65b7: "Duan " -0x65b8: "Zhu " -0x65b9: "Fang " -0x65ba: "Xie " -0x65bb: "Hang " -0x65bc: "Yu " -0x65bd: "Shi " -0x65be: "Pei " -0x65bf: "You " -0x65c0: "Mye " -0x65c1: "Pang " -0x65c2: "Qi " -0x65c3: "Zhan " -0x65c4: "Mao " -0x65c5: "Lu " -0x65c6: "Pei " -0x65c7: "Pi " -0x65c8: "Liu " -0x65c9: "Fu " -0x65ca: "Fang " -0x65cb: "Xuan " -0x65cc: "Jing " -0x65cd: "Jing " -0x65ce: "Ni " -0x65cf: "Zu " -0x65d0: "Zhao " -0x65d1: "Yi " -0x65d2: "Liu " -0x65d3: "Shao " -0x65d4: "Jian " -0x65d5: "Es " -0x65d6: "Yi " -0x65d7: "Qi " -0x65d8: "Zhi " -0x65d9: "Fan " -0x65da: "Piao " -0x65db: "Fan " -0x65dc: "Zhan " -0x65dd: "Guai " -0x65de: "Sui " -0x65df: "Yu " -0x65e0: "Wu " -0x65e1: "Ji " -0x65e2: "Ji " -0x65e3: "Ji " -0x65e4: "Huo " -0x65e5: "Ri " -0x65e6: "Dan " -0x65e7: "Jiu " -0x65e8: "Zhi " -0x65e9: "Zao " -0x65ea: "Xie " -0x65eb: "Tiao " -0x65ec: "Xun " -0x65ed: "Xu " -0x65ee: "Xu " -0x65ef: "Xu " -0x65f0: "Gan " -0x65f1: "Han " -0x65f2: "Tai " -0x65f3: "Di " -0x65f4: "Xu " -0x65f5: "Chan " -0x65f6: "Shi " -0x65f7: "Kuang " -0x65f8: "Yang " -0x65f9: "Shi " -0x65fa: "Wang " -0x65fb: "Min " -0x65fc: "Min " -0x65fd: "Tun " -0x65fe: "Chun " -0x65ff: "Wu " -/* x066 */ -0x6600: "Yun " -0x6601: "Bei " -0x6602: "Ang " -0x6603: "Ze " -0x6604: "Ban " -0x6605: "Jie " -0x6606: "Kun " -0x6607: "Sheng " -0x6608: "Hu " -0x6609: "Fang " -0x660a: "Hao " -0x660b: "Gui " -0x660c: "Chang " -0x660d: "Xuan " -0x660e: "Ming " -0x660f: "Hun " -0x6610: "Fen " -0x6611: "Qin " -0x6612: "Hu " -0x6613: "Yi " -0x6614: "Xi " -0x6615: "Xin " -0x6616: "Yan " -0x6617: "Ze " -0x6618: "Fang " -0x6619: "Tan " -0x661a: "Shen " -0x661b: "Ju " -0x661c: "Yang " -0x661d: "Zan " -0x661e: "Bing " -0x661f: "Xing " -0x6620: "Ying " -0x6621: "Xuan " -0x6622: "Pei " -0x6623: "Zhen " -0x6624: "Ling " -0x6625: "Chun " -0x6626: "Hao " -0x6627: "Mei " -0x6628: "Zuo " -0x6629: "Mo " -0x662a: "Bian " -0x662b: "Xu " -0x662c: "Hun " -0x662d: "Zhao " -0x662e: "Zong " -0x662f: "Shi " -0x6630: "Shi " -0x6631: "Yu " -0x6632: "Fei " -0x6633: "Die " -0x6634: "Mao " -0x6635: "Ni " -0x6636: "Chang " -0x6637: "Wen " -0x6638: "Dong " -0x6639: "Ai " -0x663a: "Bing " -0x663b: "Ang " -0x663c: "Zhou " -0x663d: "Long " -0x663e: "Xian " -0x663f: "Kuang " -0x6640: "Tiao " -0x6641: "Chao " -0x6642: "Shi " -0x6643: "Huang " -0x6644: "Huang " -0x6645: "Xuan " -0x6646: "Kui " -0x6647: "Xu " -0x6648: "Jiao " -0x6649: "Jin " -0x664a: "Zhi " -0x664b: "Jin " -0x664c: "Shang " -0x664d: "Tong " -0x664e: "Hong " -0x664f: "Yan " -0x6650: "Gai " -0x6651: "Xiang " -0x6652: "Shai " -0x6653: "Xiao " -0x6654: "Ye " -0x6655: "Yun " -0x6656: "Hui " -0x6657: "Han " -0x6658: "Han " -0x6659: "Jun " -0x665a: "Wan " -0x665b: "Xian " -0x665c: "Kun " -0x665d: "Zhou " -0x665e: "Xi " -0x665f: "Cheng " -0x6660: "Sheng " -0x6661: "Bu " -0x6662: "Zhe " -0x6663: "Zhe " -0x6664: "Wu " -0x6665: "Han " -0x6666: "Hui " -0x6667: "Hao " -0x6668: "Chen " -0x6669: "Wan " -0x666a: "Tian " -0x666b: "Zhuo " -0x666c: "Zui " -0x666d: "Zhou " -0x666e: "Pu " -0x666f: "Jing " -0x6670: "Xi " -0x6671: "Shan " -0x6672: "Yi " -0x6673: "Xi " -0x6674: "Qing " -0x6675: "Qi " -0x6676: "Jing " -0x6677: "Gui " -0x6678: "Zhen " -0x6679: "Yi " -0x667a: "Zhi " -0x667b: "An " -0x667c: "Wan " -0x667d: "Lin " -0x667e: "Liang " -0x667f: "Chang " -0x6680: "Wang " -0x6681: "Xiao " -0x6682: "Zan " -0x6683: "Hi " -0x6684: "Xuan " -0x6685: "Xuan " -0x6686: "Yi " -0x6687: "Xia " -0x6688: "Yun " -0x6689: "Hui " -0x668a: "Fu " -0x668b: "Min " -0x668c: "Kui " -0x668d: "He " -0x668e: "Ying " -0x668f: "Du " -0x6690: "Wei " -0x6691: "Shu " -0x6692: "Qing " -0x6693: "Mao " -0x6694: "Nan " -0x6695: "Jian " -0x6696: "Nuan " -0x6697: "An " -0x6698: "Yang " -0x6699: "Chun " -0x669a: "Yao " -0x669b: "Suo " -0x669c: "Jin " -0x669d: "Ming " -0x669e: "Jiao " -0x669f: "Kai " -0x66a0: "Gao " -0x66a1: "Weng " -0x66a2: "Chang " -0x66a3: "Qi " -0x66a4: "Hao " -0x66a5: "Yan " -0x66a6: "Li " -0x66a7: "Ai " -0x66a8: "Ji " -0x66a9: "Gui " -0x66aa: "Men " -0x66ab: "Zan " -0x66ac: "Xie " -0x66ad: "Hao " -0x66ae: "Mu " -0x66af: "Mo " -0x66b0: "Cong " -0x66b1: "Ni " -0x66b2: "Zhang " -0x66b3: "Hui " -0x66b4: "Bao " -0x66b5: "Han " -0x66b6: "Xuan " -0x66b7: "Chuan " -0x66b8: "Liao " -0x66b9: "Xian " -0x66ba: "Dan " -0x66bb: "Jing " -0x66bc: "Pie " -0x66bd: "Lin " -0x66be: "Tun " -0x66bf: "Xi " -0x66c0: "Yi " -0x66c1: "Ji " -0x66c2: "Huang " -0x66c3: "Tai " -0x66c4: "Ye " -0x66c5: "Ye " -0x66c6: "Li " -0x66c7: "Tan " -0x66c8: "Tong " -0x66c9: "Xiao " -0x66ca: "Fei " -0x66cb: "Qin " -0x66cc: "Zhao " -0x66cd: "Hao " -0x66ce: "Yi " -0x66cf: "Xiang " -0x66d0: "Xing " -0x66d1: "Sen " -0x66d2: "Jiao " -0x66d3: "Bao " -0x66d4: "Jing " -0x66d5: "Yian " -0x66d6: "Ai " -0x66d7: "Ye " -0x66d8: "Ru " -0x66d9: "Shu " -0x66da: "Meng " -0x66db: "Xun " -0x66dc: "Yao " -0x66dd: "Pu " -0x66de: "Li " -0x66df: "Chen " -0x66e0: "Kuang " -0x66e1: "Die " -0x66e2: "[?] " -0x66e3: "Yan " -0x66e4: "Huo " -0x66e5: "Lu " -0x66e6: "Xi " -0x66e7: "Rong " -0x66e8: "Long " -0x66e9: "Nang " -0x66ea: "Luo " -0x66eb: "Luan " -0x66ec: "Shai " -0x66ed: "Tang " -0x66ee: "Yan " -0x66ef: "Chu " -0x66f0: "Yue " -0x66f1: "Yue " -0x66f2: "Qu " -0x66f3: "Yi " -0x66f4: "Geng " -0x66f5: "Ye " -0x66f6: "Hu " -0x66f7: "He " -0x66f8: "Shu " -0x66f9: "Cao " -0x66fa: "Cao " -0x66fb: "Noboru " -0x66fc: "Man " -0x66fd: "Ceng " -0x66fe: "Ceng " -0x66ff: "Ti " -/* x067 */ -0x6700: "Zui " -0x6701: "Can " -0x6702: "Xu " -0x6703: "Hui " -0x6704: "Yin " -0x6705: "Qie " -0x6706: "Fen " -0x6707: "Pi " -0x6708: "Yue " -0x6709: "You " -0x670a: "Ruan " -0x670b: "Peng " -0x670c: "Ban " -0x670d: "Fu " -0x670e: "Ling " -0x670f: "Fei " -0x6710: "Qu " -0x6711: "[?] " -0x6712: "Nu " -0x6713: "Tiao " -0x6714: "Shuo " -0x6715: "Zhen " -0x6716: "Lang " -0x6717: "Lang " -0x6718: "Juan " -0x6719: "Ming " -0x671a: "Huang " -0x671b: "Wang " -0x671c: "Tun " -0x671d: "Zhao " -0x671e: "Ji " -0x671f: "Qi " -0x6720: "Ying " -0x6721: "Zong " -0x6722: "Wang " -0x6723: "Tong " -0x6724: "Lang " -0x6725: "[?] " -0x6726: "Meng " -0x6727: "Long " -0x6728: "Mu " -0x6729: "Deng " -0x672a: "Wei " -0x672b: "Mo " -0x672c: "Ben " -0x672d: "Zha " -0x672e: "Zhu " -0x672f: "Zhu " -0x6730: "[?] " -0x6731: "Zhu " -0x6732: "Ren " -0x6733: "Ba " -0x6734: "Po " -0x6735: "Duo " -0x6736: "Duo " -0x6737: "Dao " -0x6738: "Li " -0x6739: "Qiu " -0x673a: "Ji " -0x673b: "Jiu " -0x673c: "Bi " -0x673d: "Xiu " -0x673e: "Ting " -0x673f: "Ci " -0x6740: "Sha " -0x6741: "Eburi " -0x6742: "Za " -0x6743: "Quan " -0x6744: "Qian " -0x6745: "Yu " -0x6746: "Gan " -0x6747: "Wu " -0x6748: "Cha " -0x6749: "Shan " -0x674a: "Xun " -0x674b: "Fan " -0x674c: "Wu " -0x674d: "Zi " -0x674e: "Li " -0x674f: "Xing " -0x6750: "Cai " -0x6751: "Cun " -0x6752: "Ren " -0x6753: "Shao " -0x6754: "Tuo " -0x6755: "Di " -0x6756: "Zhang " -0x6757: "Mang " -0x6758: "Chi " -0x6759: "Yi " -0x675a: "Gu " -0x675b: "Gong " -0x675c: "Du " -0x675d: "Yi " -0x675e: "Qi " -0x675f: "Shu " -0x6760: "Gang " -0x6761: "Tiao " -0x6762: "Moku " -0x6763: "Soma " -0x6764: "Tochi " -0x6765: "Lai " -0x6766: "Sugi " -0x6767: "Mang " -0x6768: "Yang " -0x6769: "Ma " -0x676a: "Miao " -0x676b: "Si " -0x676c: "Yuan " -0x676d: "Hang " -0x676e: "Fei " -0x676f: "Bei " -0x6770: "Jie " -0x6771: "Dong " -0x6772: "Gao " -0x6773: "Yao " -0x6774: "Xian " -0x6775: "Chu " -0x6776: "Qun " -0x6777: "Pa " -0x6778: "Shu " -0x6779: "Hua " -0x677a: "Xin " -0x677b: "Chou " -0x677c: "Zhu " -0x677d: "Chou " -0x677e: "Song " -0x677f: "Ban " -0x6780: "Song " -0x6781: "Ji " -0x6782: "Yue " -0x6783: "Jin " -0x6784: "Gou " -0x6785: "Ji " -0x6786: "Mao " -0x6787: "Pi " -0x6788: "Bi " -0x6789: "Wang " -0x678a: "Ang " -0x678b: "Fang " -0x678c: "Fen " -0x678d: "Yi " -0x678e: "Fu " -0x678f: "Nan " -0x6790: "Xi " -0x6791: "Hu " -0x6792: "Ya " -0x6793: "Dou " -0x6794: "Xun " -0x6795: "Zhen " -0x6796: "Yao " -0x6797: "Lin " -0x6798: "Rui " -0x6799: "E " -0x679a: "Mei " -0x679b: "Zhao " -0x679c: "Guo " -0x679d: "Zhi " -0x679e: "Cong " -0x679f: "Yun " -0x67a0: "Waku " -0x67a1: "Dou " -0x67a2: "Shu " -0x67a3: "Zao " -0x67a4: "[?] " -0x67a5: "Li " -0x67a6: "Haze " -0x67a7: "Jian " -0x67a8: "Cheng " -0x67a9: "Matsu " -0x67aa: "Qiang " -0x67ab: "Feng " -0x67ac: "Nan " -0x67ad: "Xiao " -0x67ae: "Xian " -0x67af: "Ku " -0x67b0: "Ping " -0x67b1: "Yi " -0x67b2: "Xi " -0x67b3: "Zhi " -0x67b4: "Guai " -0x67b5: "Xiao " -0x67b6: "Jia " -0x67b7: "Jia " -0x67b8: "Gou " -0x67b9: "Fu " -0x67ba: "Mo " -0x67bb: "Yi " -0x67bc: "Ye " -0x67bd: "Ye " -0x67be: "Shi " -0x67bf: "Nie " -0x67c0: "Bi " -0x67c1: "Duo " -0x67c2: "Yi " -0x67c3: "Ling " -0x67c4: "Bing " -0x67c5: "Ni " -0x67c6: "La " -0x67c7: "He " -0x67c8: "Pan " -0x67c9: "Fan " -0x67ca: "Zhong " -0x67cb: "Dai " -0x67cc: "Ci " -0x67cd: "Yang " -0x67ce: "Fu " -0x67cf: "Bo " -0x67d0: "Mou " -0x67d1: "Gan " -0x67d2: "Qi " -0x67d3: "Ran " -0x67d4: "Rou " -0x67d5: "Mao " -0x67d6: "Zhao " -0x67d7: "Song " -0x67d8: "Zhe " -0x67d9: "Xia " -0x67da: "You " -0x67db: "Shen " -0x67dc: "Ju " -0x67dd: "Tuo " -0x67de: "Zuo " -0x67df: "Nan " -0x67e0: "Ning " -0x67e1: "Yong " -0x67e2: "Di " -0x67e3: "Zhi " -0x67e4: "Zha " -0x67e5: "Cha " -0x67e6: "Dan " -0x67e7: "Gu " -0x67e8: "Pu " -0x67e9: "Jiu " -0x67ea: "Ao " -0x67eb: "Fu " -0x67ec: "Jian " -0x67ed: "Bo " -0x67ee: "Duo " -0x67ef: "Ke " -0x67f0: "Nai " -0x67f1: "Zhu " -0x67f2: "Bi " -0x67f3: "Liu " -0x67f4: "Chai " -0x67f5: "Zha " -0x67f6: "Si " -0x67f7: "Zhu " -0x67f8: "Pei " -0x67f9: "Shi " -0x67fa: "Guai " -0x67fb: "Cha " -0x67fc: "Yao " -0x67fd: "Jue " -0x67fe: "Jiu " -0x67ff: "Shi " -/* x068 */ -0x6800: "Zhi " -0x6801: "Liu " -0x6802: "Mei " -0x6803: "Hoy " -0x6804: "Rong " -0x6805: "Zha " -0x6806: "[?] " -0x6807: "Biao " -0x6808: "Zhan " -0x6809: "Jie " -0x680a: "Long " -0x680b: "Dong " -0x680c: "Lu " -0x680d: "Sayng " -0x680e: "Li " -0x680f: "Lan " -0x6810: "Yong " -0x6811: "Shu " -0x6812: "Xun " -0x6813: "Shuan " -0x6814: "Qi " -0x6815: "Zhen " -0x6816: "Qi " -0x6817: "Li " -0x6818: "Yi " -0x6819: "Xiang " -0x681a: "Zhen " -0x681b: "Li " -0x681c: "Su " -0x681d: "Gua " -0x681e: "Kan " -0x681f: "Bing " -0x6820: "Ren " -0x6821: "Xiao " -0x6822: "Bo " -0x6823: "Ren " -0x6824: "Bing " -0x6825: "Zi " -0x6826: "Chou " -0x6827: "Yi " -0x6828: "Jie " -0x6829: "Xu " -0x682a: "Zhu " -0x682b: "Jian " -0x682c: "Zui " -0x682d: "Er " -0x682e: "Er " -0x682f: "You " -0x6830: "Fa " -0x6831: "Gong " -0x6832: "Kao " -0x6833: "Lao " -0x6834: "Zhan " -0x6835: "Li " -0x6836: "Yin " -0x6837: "Yang " -0x6838: "He " -0x6839: "Gen " -0x683a: "Zhi " -0x683b: "Chi " -0x683c: "Ge " -0x683d: "Zai " -0x683e: "Luan " -0x683f: "Fu " -0x6840: "Jie " -0x6841: "Hang " -0x6842: "Gui " -0x6843: "Tao " -0x6844: "Guang " -0x6845: "Wei " -0x6846: "Kuang " -0x6847: "Ru " -0x6848: "An " -0x6849: "An " -0x684a: "Juan " -0x684b: "Yi " -0x684c: "Zhuo " -0x684d: "Ku " -0x684e: "Zhi " -0x684f: "Qiong " -0x6850: "Tong " -0x6851: "Sang " -0x6852: "Sang " -0x6853: "Huan " -0x6854: "Jie " -0x6855: "Jiu " -0x6856: "Xue " -0x6857: "Duo " -0x6858: "Zhui " -0x6859: "Yu " -0x685a: "Zan " -0x685b: "Kasei " -0x685c: "Ying " -0x685d: "Masu " -0x685e: "[?] " -0x685f: "Zhan " -0x6860: "Ya " -0x6861: "Nao " -0x6862: "Zhen " -0x6863: "Dang " -0x6864: "Qi " -0x6865: "Qiao " -0x6866: "Hua " -0x6867: "Kuai " -0x6868: "Jiang " -0x6869: "Zhuang " -0x686a: "Xun " -0x686b: "Suo " -0x686c: "Sha " -0x686d: "Zhen " -0x686e: "Bei " -0x686f: "Ting " -0x6870: "Gua " -0x6871: "Jing " -0x6872: "Bo " -0x6873: "Ben " -0x6874: "Fu " -0x6875: "Rui " -0x6876: "Tong " -0x6877: "Jue " -0x6878: "Xi " -0x6879: "Lang " -0x687a: "Liu " -0x687b: "Feng " -0x687c: "Qi " -0x687d: "Wen " -0x687e: "Jun " -0x687f: "Gan " -0x6880: "Cu " -0x6881: "Liang " -0x6882: "Qiu " -0x6883: "Ting " -0x6884: "You " -0x6885: "Mei " -0x6886: "Bang " -0x6887: "Long " -0x6888: "Peng " -0x6889: "Zhuang " -0x688a: "Di " -0x688b: "Xuan " -0x688c: "Tu " -0x688d: "Zao " -0x688e: "Ao " -0x688f: "Gu " -0x6890: "Bi " -0x6891: "Di " -0x6892: "Han " -0x6893: "Zi " -0x6894: "Zhi " -0x6895: "Ren " -0x6896: "Bei " -0x6897: "Geng " -0x6898: "Jian " -0x6899: "Huan " -0x689a: "Wan " -0x689b: "Nuo " -0x689c: "Jia " -0x689d: "Tiao " -0x689e: "Ji " -0x689f: "Xiao " -0x68a0: "Lu " -0x68a1: "Huan " -0x68a2: "Shao " -0x68a3: "Cen " -0x68a4: "Fen " -0x68a5: "Song " -0x68a6: "Meng " -0x68a7: "Wu " -0x68a8: "Li " -0x68a9: "Li " -0x68aa: "Dou " -0x68ab: "Cen " -0x68ac: "Ying " -0x68ad: "Suo " -0x68ae: "Ju " -0x68af: "Ti " -0x68b0: "Jie " -0x68b1: "Kun " -0x68b2: "Zhuo " -0x68b3: "Shu " -0x68b4: "Chan " -0x68b5: "Fan " -0x68b6: "Wei " -0x68b7: "Jing " -0x68b8: "Li " -0x68b9: "Bing " -0x68ba: "Fumoto " -0x68bb: "Shikimi " -0x68bc: "Tao " -0x68bd: "Zhi " -0x68be: "Lai " -0x68bf: "Lian " -0x68c0: "Jian " -0x68c1: "Zhuo " -0x68c2: "Ling " -0x68c3: "Li " -0x68c4: "Qi " -0x68c5: "Bing " -0x68c6: "Zhun " -0x68c7: "Cong " -0x68c8: "Qian " -0x68c9: "Mian " -0x68ca: "Qi " -0x68cb: "Qi " -0x68cc: "Cai " -0x68cd: "Gun " -0x68ce: "Chan " -0x68cf: "Te " -0x68d0: "Fei " -0x68d1: "Pai " -0x68d2: "Bang " -0x68d3: "Pou " -0x68d4: "Hun " -0x68d5: "Zong " -0x68d6: "Cheng " -0x68d7: "Zao " -0x68d8: "Ji " -0x68d9: "Li " -0x68da: "Peng " -0x68db: "Yu " -0x68dc: "Yu " -0x68dd: "Gu " -0x68de: "Hun " -0x68df: "Dong " -0x68e0: "Tang " -0x68e1: "Gang " -0x68e2: "Wang " -0x68e3: "Di " -0x68e4: "Xi " -0x68e5: "Fan " -0x68e6: "Cheng " -0x68e7: "Zhan " -0x68e8: "Qi " -0x68e9: "Yuan " -0x68ea: "Yan " -0x68eb: "Yu " -0x68ec: "Quan " -0x68ed: "Yi " -0x68ee: "Sen " -0x68ef: "Ren " -0x68f0: "Chui " -0x68f1: "Leng " -0x68f2: "Qi " -0x68f3: "Zhuo " -0x68f4: "Fu " -0x68f5: "Ke " -0x68f6: "Lai " -0x68f7: "Zou " -0x68f8: "Zou " -0x68f9: "Zhuo " -0x68fa: "Guan " -0x68fb: "Fen " -0x68fc: "Fen " -0x68fd: "Chen " -0x68fe: "Qiong " -0x68ff: "Nie " -/* x069 */ -0x6900: "Wan " -0x6901: "Guo " -0x6902: "Lu " -0x6903: "Hao " -0x6904: "Jie " -0x6905: "Yi " -0x6906: "Chou " -0x6907: "Ju " -0x6908: "Ju " -0x6909: "Cheng " -0x690a: "Zuo " -0x690b: "Liang " -0x690c: "Qiang " -0x690d: "Zhi " -0x690e: "Zhui " -0x690f: "Ya " -0x6910: "Ju " -0x6911: "Bei " -0x6912: "Jiao " -0x6913: "Zhuo " -0x6914: "Zi " -0x6915: "Bin " -0x6916: "Peng " -0x6917: "Ding " -0x6918: "Chu " -0x6919: "Chang " -0x691a: "Kunugi " -0x691b: "Momiji " -0x691c: "Jian " -0x691d: "Gui " -0x691e: "Xi " -0x691f: "Du " -0x6920: "Qian " -0x6921: "Kunugi " -0x6922: "Soko " -0x6923: "Shide " -0x6924: "Luo " -0x6925: "Zhi " -0x6926: "Ken " -0x6927: "Myeng " -0x6928: "Tafu " -0x6929: "[?] " -0x692a: "Peng " -0x692b: "Zhan " -0x692c: "[?] " -0x692d: "Tuo " -0x692e: "Sen " -0x692f: "Duo " -0x6930: "Ye " -0x6931: "Fou " -0x6932: "Wei " -0x6933: "Wei " -0x6934: "Duan " -0x6935: "Jia " -0x6936: "Zong " -0x6937: "Jian " -0x6938: "Yi " -0x6939: "Shen " -0x693a: "Xi " -0x693b: "Yan " -0x693c: "Yan " -0x693d: "Chuan " -0x693e: "Zhan " -0x693f: "Chun " -0x6940: "Yu " -0x6941: "He " -0x6942: "Zha " -0x6943: "Wo " -0x6944: "Pian " -0x6945: "Bi " -0x6946: "Yao " -0x6947: "Huo " -0x6948: "Xu " -0x6949: "Ruo " -0x694a: "Yang " -0x694b: "La " -0x694c: "Yan " -0x694d: "Ben " -0x694e: "Hun " -0x694f: "Kui " -0x6950: "Jie " -0x6951: "Kui " -0x6952: "Si " -0x6953: "Feng " -0x6954: "Xie " -0x6955: "Tuo " -0x6956: "Zhi " -0x6957: "Jian " -0x6958: "Mu " -0x6959: "Mao " -0x695a: "Chu " -0x695b: "Hu " -0x695c: "Hu " -0x695d: "Lian " -0x695e: "Leng " -0x695f: "Ting " -0x6960: "Nan " -0x6961: "Yu " -0x6962: "You " -0x6963: "Mei " -0x6964: "Song " -0x6965: "Xuan " -0x6966: "Xuan " -0x6967: "Ying " -0x6968: "Zhen " -0x6969: "Pian " -0x696a: "Ye " -0x696b: "Ji " -0x696c: "Jie " -0x696d: "Ye " -0x696e: "Chu " -0x696f: "Shun " -0x6970: "Yu " -0x6971: "Cou " -0x6972: "Wei " -0x6973: "Mei " -0x6974: "Di " -0x6975: "Ji " -0x6976: "Jie " -0x6977: "Kai " -0x6978: "Qiu " -0x6979: "Ying " -0x697a: "Rou " -0x697b: "Heng " -0x697c: "Lou " -0x697d: "Le " -0x697e: "Hazou " -0x697f: "Katsura " -0x6980: "Pin " -0x6981: "Muro " -0x6982: "Gai " -0x6983: "Tan " -0x6984: "Lan " -0x6985: "Yun " -0x6986: "Yu " -0x6987: "Chen " -0x6988: "Lu " -0x6989: "Ju " -0x698a: "Sakaki " -0x698b: "[?] " -0x698c: "Pi " -0x698d: "Xie " -0x698e: "Jia " -0x698f: "Yi " -0x6990: "Zhan " -0x6991: "Fu " -0x6992: "Nai " -0x6993: "Mi " -0x6994: "Lang " -0x6995: "Rong " -0x6996: "Gu " -0x6997: "Jian " -0x6998: "Ju " -0x6999: "Ta " -0x699a: "Yao " -0x699b: "Zhen " -0x699c: "Bang " -0x699d: "Sha " -0x699e: "Yuan " -0x699f: "Zi " -0x69a0: "Ming " -0x69a1: "Su " -0x69a2: "Jia " -0x69a3: "Yao " -0x69a4: "Jie " -0x69a5: "Huang " -0x69a6: "Gan " -0x69a7: "Fei " -0x69a8: "Zha " -0x69a9: "Qian " -0x69aa: "Ma " -0x69ab: "Sun " -0x69ac: "Yuan " -0x69ad: "Xie " -0x69ae: "Rong " -0x69af: "Shi " -0x69b0: "Zhi " -0x69b1: "Cui " -0x69b2: "Yun " -0x69b3: "Ting " -0x69b4: "Liu " -0x69b5: "Rong " -0x69b6: "Tang " -0x69b7: "Que " -0x69b8: "Zhai " -0x69b9: "Si " -0x69ba: "Sheng " -0x69bb: "Ta " -0x69bc: "Ke " -0x69bd: "Xi " -0x69be: "Gu " -0x69bf: "Qi " -0x69c0: "Kao " -0x69c1: "Gao " -0x69c2: "Sun " -0x69c3: "Pan " -0x69c4: "Tao " -0x69c5: "Ge " -0x69c6: "Xun " -0x69c7: "Dian " -0x69c8: "Nou " -0x69c9: "Ji " -0x69ca: "Shuo " -0x69cb: "Gou " -0x69cc: "Chui " -0x69cd: "Qiang " -0x69ce: "Cha " -0x69cf: "Qian " -0x69d0: "Huai " -0x69d1: "Mei " -0x69d2: "Xu " -0x69d3: "Gang " -0x69d4: "Gao " -0x69d5: "Zhuo " -0x69d6: "Tuo " -0x69d7: "Hashi " -0x69d8: "Yang " -0x69d9: "Dian " -0x69da: "Jia " -0x69db: "Jian " -0x69dc: "Zui " -0x69dd: "Kashi " -0x69de: "Ori " -0x69df: "Bin " -0x69e0: "Zhu " -0x69e1: "[?] " -0x69e2: "Xi " -0x69e3: "Qi " -0x69e4: "Lian " -0x69e5: "Hui " -0x69e6: "Yong " -0x69e7: "Qian " -0x69e8: "Guo " -0x69e9: "Gai " -0x69ea: "Gai " -0x69eb: "Tuan " -0x69ec: "Hua " -0x69ed: "Cu " -0x69ee: "Sen " -0x69ef: "Cui " -0x69f0: "Beng " -0x69f1: "You " -0x69f2: "Hu " -0x69f3: "Jiang " -0x69f4: "Hu " -0x69f5: "Huan " -0x69f6: "Kui " -0x69f7: "Yi " -0x69f8: "Nie " -0x69f9: "Gao " -0x69fa: "Kang " -0x69fb: "Gui " -0x69fc: "Gui " -0x69fd: "Cao " -0x69fe: "Man " -0x69ff: "Jin " -/* x06a */ -0x6a00: "Di " -0x6a01: "Zhuang " -0x6a02: "Le " -0x6a03: "Lang " -0x6a04: "Chen " -0x6a05: "Cong " -0x6a06: "Li " -0x6a07: "Xiu " -0x6a08: "Qing " -0x6a09: "Shuang " -0x6a0a: "Fan " -0x6a0b: "Tong " -0x6a0c: "Guan " -0x6a0d: "Ji " -0x6a0e: "Suo " -0x6a0f: "Lei " -0x6a10: "Lu " -0x6a11: "Liang " -0x6a12: "Mi " -0x6a13: "Lou " -0x6a14: "Chao " -0x6a15: "Su " -0x6a16: "Ke " -0x6a17: "Shu " -0x6a18: "Tang " -0x6a19: "Biao " -0x6a1a: "Lu " -0x6a1b: "Jiu " -0x6a1c: "Shu " -0x6a1d: "Zha " -0x6a1e: "Shu " -0x6a1f: "Zhang " -0x6a20: "Men " -0x6a21: "Mo " -0x6a22: "Niao " -0x6a23: "Yang " -0x6a24: "Tiao " -0x6a25: "Peng " -0x6a26: "Zhu " -0x6a27: "Sha " -0x6a28: "Xi " -0x6a29: "Quan " -0x6a2a: "Heng " -0x6a2b: "Jian " -0x6a2c: "Cong " -0x6a2d: "[?] " -0x6a2e: "Hokuso " -0x6a2f: "Qiang " -0x6a30: "Tara " -0x6a31: "Ying " -0x6a32: "Er " -0x6a33: "Xin " -0x6a34: "Zhi " -0x6a35: "Qiao " -0x6a36: "Zui " -0x6a37: "Cong " -0x6a38: "Pu " -0x6a39: "Shu " -0x6a3a: "Hua " -0x6a3b: "Kui " -0x6a3c: "Zhen " -0x6a3d: "Zun " -0x6a3e: "Yue " -0x6a3f: "Zhan " -0x6a40: "Xi " -0x6a41: "Xun " -0x6a42: "Dian " -0x6a43: "Fa " -0x6a44: "Gan " -0x6a45: "Mo " -0x6a46: "Wu " -0x6a47: "Qiao " -0x6a48: "Nao " -0x6a49: "Lin " -0x6a4a: "Liu " -0x6a4b: "Qiao " -0x6a4c: "Xian " -0x6a4d: "Run " -0x6a4e: "Fan " -0x6a4f: "Zhan " -0x6a50: "Tuo " -0x6a51: "Lao " -0x6a52: "Yun " -0x6a53: "Shun " -0x6a54: "Tui " -0x6a55: "Cheng " -0x6a56: "Tang " -0x6a57: "Meng " -0x6a58: "Ju " -0x6a59: "Cheng " -0x6a5a: "Su " -0x6a5b: "Jue " -0x6a5c: "Jue " -0x6a5d: "Tan " -0x6a5e: "Hui " -0x6a5f: "Ji " -0x6a60: "Nuo " -0x6a61: "Xiang " -0x6a62: "Tuo " -0x6a63: "Ning " -0x6a64: "Rui " -0x6a65: "Zhu " -0x6a66: "Chuang " -0x6a67: "Zeng " -0x6a68: "Fen " -0x6a69: "Qiong " -0x6a6a: "Ran " -0x6a6b: "Heng " -0x6a6c: "Cen " -0x6a6d: "Gu " -0x6a6e: "Liu " -0x6a6f: "Lao " -0x6a70: "Gao " -0x6a71: "Chu " -0x6a72: "Zusa " -0x6a73: "Nude " -0x6a74: "Ca " -0x6a75: "San " -0x6a76: "Ji " -0x6a77: "Dou " -0x6a78: "Shou " -0x6a79: "Lu " -0x6a7a: "[?] " -0x6a7b: "[?] " -0x6a7c: "Yuan " -0x6a7d: "Ta " -0x6a7e: "Shu " -0x6a7f: "Jiang " -0x6a80: "Tan " -0x6a81: "Lin " -0x6a82: "Nong " -0x6a83: "Yin " -0x6a84: "Xi " -0x6a85: "Sui " -0x6a86: "Shan " -0x6a87: "Zui " -0x6a88: "Xuan " -0x6a89: "Cheng " -0x6a8a: "Gan " -0x6a8b: "Ju " -0x6a8c: "Zui " -0x6a8d: "Yi " -0x6a8e: "Qin " -0x6a8f: "Pu " -0x6a90: "Yan " -0x6a91: "Lei " -0x6a92: "Feng " -0x6a93: "Hui " -0x6a94: "Dang " -0x6a95: "Ji " -0x6a96: "Sui " -0x6a97: "Bo " -0x6a98: "Bi " -0x6a99: "Ding " -0x6a9a: "Chu " -0x6a9b: "Zhua " -0x6a9c: "Kuai " -0x6a9d: "Ji " -0x6a9e: "Jie " -0x6a9f: "Jia " -0x6aa0: "Qing " -0x6aa1: "Zhe " -0x6aa2: "Jian " -0x6aa3: "Qiang " -0x6aa4: "Dao " -0x6aa5: "Yi " -0x6aa6: "Biao " -0x6aa7: "Song " -0x6aa8: "She " -0x6aa9: "Lin " -0x6aaa: "Kunugi " -0x6aab: "Cha " -0x6aac: "Meng " -0x6aad: "Yin " -0x6aae: "Tao " -0x6aaf: "Tai " -0x6ab0: "Mian " -0x6ab1: "Qi " -0x6ab2: "Toan " -0x6ab3: "Bin " -0x6ab4: "Huo " -0x6ab5: "Ji " -0x6ab6: "Qian " -0x6ab7: "Mi " -0x6ab8: "Ning " -0x6ab9: "Yi " -0x6aba: "Gao " -0x6abb: "Jian " -0x6abc: "Yin " -0x6abd: "Er " -0x6abe: "Qing " -0x6abf: "Yan " -0x6ac0: "Qi " -0x6ac1: "Mi " -0x6ac2: "Zhao " -0x6ac3: "Gui " -0x6ac4: "Chun " -0x6ac5: "Ji " -0x6ac6: "Kui " -0x6ac7: "Po " -0x6ac8: "Deng " -0x6ac9: "Chu " -0x6aca: "[?] " -0x6acb: "Mian " -0x6acc: "You " -0x6acd: "Zhi " -0x6ace: "Guang " -0x6acf: "Qian " -0x6ad0: "Lei " -0x6ad1: "Lei " -0x6ad2: "Sa " -0x6ad3: "Lu " -0x6ad4: "Li " -0x6ad5: "Cuan " -0x6ad6: "Lu " -0x6ad7: "Mie " -0x6ad8: "Hui " -0x6ad9: "Ou " -0x6ada: "Lu " -0x6adb: "Jie " -0x6adc: "Gao " -0x6add: "Du " -0x6ade: "Yuan " -0x6adf: "Li " -0x6ae0: "Fei " -0x6ae1: "Zhuo " -0x6ae2: "Sou " -0x6ae3: "Lian " -0x6ae4: "Tamo " -0x6ae5: "Chu " -0x6ae6: "[?] " -0x6ae7: "Zhu " -0x6ae8: "Lu " -0x6ae9: "Yan " -0x6aea: "Li " -0x6aeb: "Zhu " -0x6aec: "Chen " -0x6aed: "Jie " -0x6aee: "E " -0x6aef: "Su " -0x6af0: "Huai " -0x6af1: "Nie " -0x6af2: "Yu " -0x6af3: "Long " -0x6af4: "Lai " -0x6af5: "[?] " -0x6af6: "Xian " -0x6af7: "Kwi " -0x6af8: "Ju " -0x6af9: "Xiao " -0x6afa: "Ling " -0x6afb: "Ying " -0x6afc: "Jian " -0x6afd: "Yin " -0x6afe: "You " -0x6aff: "Ying " -/* x06b */ -0x6b00: "Xiang " -0x6b01: "Nong " -0x6b02: "Bo " -0x6b03: "Chan " -0x6b04: "Lan " -0x6b05: "Ju " -0x6b06: "Shuang " -0x6b07: "She " -0x6b08: "Wei " -0x6b09: "Cong " -0x6b0a: "Quan " -0x6b0b: "Qu " -0x6b0c: "Cang " -0x6b0d: "[?] " -0x6b0e: "Yu " -0x6b0f: "Luo " -0x6b10: "Li " -0x6b11: "Zan " -0x6b12: "Luan " -0x6b13: "Dang " -0x6b14: "Jue " -0x6b15: "Em " -0x6b16: "Lan " -0x6b17: "Lan " -0x6b18: "Zhu " -0x6b19: "Lei " -0x6b1a: "Li " -0x6b1b: "Ba " -0x6b1c: "Nang " -0x6b1d: "Yu " -0x6b1e: "Ling " -0x6b1f: "Tsuki " -0x6b20: "Qian " -0x6b21: "Ci " -0x6b22: "Huan " -0x6b23: "Xin " -0x6b24: "Yu " -0x6b25: "Yu " -0x6b26: "Qian " -0x6b27: "Ou " -0x6b28: "Xu " -0x6b29: "Chao " -0x6b2a: "Chu " -0x6b2b: "Chi " -0x6b2c: "Kai " -0x6b2d: "Yi " -0x6b2e: "Jue " -0x6b2f: "Xi " -0x6b30: "Xu " -0x6b31: "Xia " -0x6b32: "Yu " -0x6b33: "Kuai " -0x6b34: "Lang " -0x6b35: "Kuan " -0x6b36: "Shuo " -0x6b37: "Xi " -0x6b38: "Ai " -0x6b39: "Yi " -0x6b3a: "Qi " -0x6b3b: "Hu " -0x6b3c: "Chi " -0x6b3d: "Qin " -0x6b3e: "Kuan " -0x6b3f: "Kan " -0x6b40: "Kuan " -0x6b41: "Kan " -0x6b42: "Chuan " -0x6b43: "Sha " -0x6b44: "Gua " -0x6b45: "Yin " -0x6b46: "Xin " -0x6b47: "Xie " -0x6b48: "Yu " -0x6b49: "Qian " -0x6b4a: "Xiao " -0x6b4b: "Yi " -0x6b4c: "Ge " -0x6b4d: "Wu " -0x6b4e: "Tan " -0x6b4f: "Jin " -0x6b50: "Ou " -0x6b51: "Hu " -0x6b52: "Ti " -0x6b53: "Huan " -0x6b54: "Xu " -0x6b55: "Pen " -0x6b56: "Xi " -0x6b57: "Xiao " -0x6b58: "Xu " -0x6b59: "Xi " -0x6b5a: "Sen " -0x6b5b: "Lian " -0x6b5c: "Chu " -0x6b5d: "Yi " -0x6b5e: "Kan " -0x6b5f: "Yu " -0x6b60: "Chuo " -0x6b61: "Huan " -0x6b62: "Zhi " -0x6b63: "Zheng " -0x6b64: "Ci " -0x6b65: "Bu " -0x6b66: "Wu " -0x6b67: "Qi " -0x6b68: "Bu " -0x6b69: "Bu " -0x6b6a: "Wai " -0x6b6b: "Ju " -0x6b6c: "Qian " -0x6b6d: "Chi " -0x6b6e: "Se " -0x6b6f: "Chi " -0x6b70: "Se " -0x6b71: "Zhong " -0x6b72: "Sui " -0x6b73: "Sui " -0x6b74: "Li " -0x6b75: "Cuo " -0x6b76: "Yu " -0x6b77: "Li " -0x6b78: "Gui " -0x6b79: "Dai " -0x6b7a: "Dai " -0x6b7b: "Si " -0x6b7c: "Jian " -0x6b7d: "Zhe " -0x6b7e: "Mo " -0x6b7f: "Mo " -0x6b80: "Yao " -0x6b81: "Mo " -0x6b82: "Cu " -0x6b83: "Yang " -0x6b84: "Tian " -0x6b85: "Sheng " -0x6b86: "Dai " -0x6b87: "Shang " -0x6b88: "Xu " -0x6b89: "Xun " -0x6b8a: "Shu " -0x6b8b: "Can " -0x6b8c: "Jue " -0x6b8d: "Piao " -0x6b8e: "Qia " -0x6b8f: "Qiu " -0x6b90: "Su " -0x6b91: "Qing " -0x6b92: "Yun " -0x6b93: "Lian " -0x6b94: "Yi " -0x6b95: "Fou " -0x6b96: "Zhi " -0x6b97: "Ye " -0x6b98: "Can " -0x6b99: "Hun " -0x6b9a: "Dan " -0x6b9b: "Ji " -0x6b9c: "Ye " -0x6b9d: "Zhen " -0x6b9e: "Yun " -0x6b9f: "Wen " -0x6ba0: "Chou " -0x6ba1: "Bin " -0x6ba2: "Ti " -0x6ba3: "Jin " -0x6ba4: "Shang " -0x6ba5: "Yin " -0x6ba6: "Diao " -0x6ba7: "Cu " -0x6ba8: "Hui " -0x6ba9: "Cuan " -0x6baa: "Yi " -0x6bab: "Dan " -0x6bac: "Du " -0x6bad: "Jiang " -0x6bae: "Lian " -0x6baf: "Bin " -0x6bb0: "Du " -0x6bb1: "Tsukusu " -0x6bb2: "Jian " -0x6bb3: "Shu " -0x6bb4: "Ou " -0x6bb5: "Duan " -0x6bb6: "Zhu " -0x6bb7: "Yin " -0x6bb8: "Qing " -0x6bb9: "Yi " -0x6bba: "Sha " -0x6bbb: "Que " -0x6bbc: "Ke " -0x6bbd: "Yao " -0x6bbe: "Jun " -0x6bbf: "Dian " -0x6bc0: "Hui " -0x6bc1: "Hui " -0x6bc2: "Gu " -0x6bc3: "Que " -0x6bc4: "Ji " -0x6bc5: "Yi " -0x6bc6: "Ou " -0x6bc7: "Hui " -0x6bc8: "Duan " -0x6bc9: "Yi " -0x6bca: "Xiao " -0x6bcb: "Wu " -0x6bcc: "Guan " -0x6bcd: "Mu " -0x6bce: "Mei " -0x6bcf: "Mei " -0x6bd0: "Ai " -0x6bd1: "Zuo " -0x6bd2: "Du " -0x6bd3: "Yu " -0x6bd4: "Bi " -0x6bd5: "Bi " -0x6bd6: "Bi " -0x6bd7: "Pi " -0x6bd8: "Pi " -0x6bd9: "Bi " -0x6bda: "Chan " -0x6bdb: "Mao " -0x6bdc: "[?] " -0x6bdd: "[?] " -0x6bde: "Pu " -0x6bdf: "Mushiru " -0x6be0: "Jia " -0x6be1: "Zhan " -0x6be2: "Sai " -0x6be3: "Mu " -0x6be4: "Tuo " -0x6be5: "Xun " -0x6be6: "Er " -0x6be7: "Rong " -0x6be8: "Xian " -0x6be9: "Ju " -0x6bea: "Mu " -0x6beb: "Hao " -0x6bec: "Qiu " -0x6bed: "Dou " -0x6bee: "Mushiru " -0x6bef: "Tan " -0x6bf0: "Pei " -0x6bf1: "Ju " -0x6bf2: "Duo " -0x6bf3: "Cui " -0x6bf4: "Bi " -0x6bf5: "San " -0x6bf6: "[?] " -0x6bf7: "Mao " -0x6bf8: "Sui " -0x6bf9: "Yu " -0x6bfa: "Yu " -0x6bfb: "Tuo " -0x6bfc: "He " -0x6bfd: "Jian " -0x6bfe: "Ta " -0x6bff: "San " -/* x06c */ -0x6c00: "Lu " -0x6c01: "Mu " -0x6c02: "Li " -0x6c03: "Tong " -0x6c04: "Rong " -0x6c05: "Chang " -0x6c06: "Pu " -0x6c07: "Luo " -0x6c08: "Zhan " -0x6c09: "Sao " -0x6c0a: "Zhan " -0x6c0b: "Meng " -0x6c0c: "Luo " -0x6c0d: "Qu " -0x6c0e: "Die " -0x6c0f: "Shi " -0x6c10: "Di " -0x6c11: "Min " -0x6c12: "Jue " -0x6c13: "Mang " -0x6c14: "Qi " -0x6c15: "Pie " -0x6c16: "Nai " -0x6c17: "Qi " -0x6c18: "Dao " -0x6c19: "Xian " -0x6c1a: "Chuan " -0x6c1b: "Fen " -0x6c1c: "Ri " -0x6c1d: "Nei " -0x6c1e: "[?] " -0x6c1f: "Fu " -0x6c20: "Shen " -0x6c21: "Dong " -0x6c22: "Qing " -0x6c23: "Qi " -0x6c24: "Yin " -0x6c25: "Xi " -0x6c26: "Hai " -0x6c27: "Yang " -0x6c28: "An " -0x6c29: "Ya " -0x6c2a: "Ke " -0x6c2b: "Qing " -0x6c2c: "Ya " -0x6c2d: "Dong " -0x6c2e: "Dan " -0x6c2f: "Lu " -0x6c30: "Qing " -0x6c31: "Yang " -0x6c32: "Yun " -0x6c33: "Yun " -0x6c34: "Shui " -0x6c35: "San " -0x6c36: "Zheng " -0x6c37: "Bing " -0x6c38: "Yong " -0x6c39: "Dang " -0x6c3a: "Shitamizu " -0x6c3b: "Le " -0x6c3c: "Ni " -0x6c3d: "Tun " -0x6c3e: "Fan " -0x6c3f: "Gui " -0x6c40: "Ting " -0x6c41: "Zhi " -0x6c42: "Qiu " -0x6c43: "Bin " -0x6c44: "Ze " -0x6c45: "Mian " -0x6c46: "Cuan " -0x6c47: "Hui " -0x6c48: "Diao " -0x6c49: "Yi " -0x6c4a: "Cha " -0x6c4b: "Zhuo " -0x6c4c: "Chuan " -0x6c4d: "Wan " -0x6c4e: "Fan " -0x6c4f: "Dai " -0x6c50: "Xi " -0x6c51: "Tuo " -0x6c52: "Mang " -0x6c53: "Qiu " -0x6c54: "Qi " -0x6c55: "Shan " -0x6c56: "Pai " -0x6c57: "Han " -0x6c58: "Qian " -0x6c59: "Wu " -0x6c5a: "Wu " -0x6c5b: "Xun " -0x6c5c: "Si " -0x6c5d: "Ru " -0x6c5e: "Gong " -0x6c5f: "Jiang " -0x6c60: "Chi " -0x6c61: "Wu " -0x6c62: "Tsuchi " -0x6c63: "[?] " -0x6c64: "Tang " -0x6c65: "Zhi " -0x6c66: "Chi " -0x6c67: "Qian " -0x6c68: "Mi " -0x6c69: "Yu " -0x6c6a: "Wang " -0x6c6b: "Qing " -0x6c6c: "Jing " -0x6c6d: "Rui " -0x6c6e: "Jun " -0x6c6f: "Hong " -0x6c70: "Tai " -0x6c71: "Quan " -0x6c72: "Ji " -0x6c73: "Bian " -0x6c74: "Bian " -0x6c75: "Gan " -0x6c76: "Wen " -0x6c77: "Zhong " -0x6c78: "Fang " -0x6c79: "Xiong " -0x6c7a: "Jue " -0x6c7b: "Hang " -0x6c7c: "Niou " -0x6c7d: "Qi " -0x6c7e: "Fen " -0x6c7f: "Xu " -0x6c80: "Xu " -0x6c81: "Qin " -0x6c82: "Yi " -0x6c83: "Wo " -0x6c84: "Yun " -0x6c85: "Yuan " -0x6c86: "Hang " -0x6c87: "Yan " -0x6c88: "Chen " -0x6c89: "Chen " -0x6c8a: "Dan " -0x6c8b: "You " -0x6c8c: "Dun " -0x6c8d: "Hu " -0x6c8e: "Huo " -0x6c8f: "Qie " -0x6c90: "Mu " -0x6c91: "Rou " -0x6c92: "Mei " -0x6c93: "Ta " -0x6c94: "Mian " -0x6c95: "Wu " -0x6c96: "Chong " -0x6c97: "Tian " -0x6c98: "Bi " -0x6c99: "Sha " -0x6c9a: "Zhi " -0x6c9b: "Pei " -0x6c9c: "Pan " -0x6c9d: "Zhui " -0x6c9e: "Za " -0x6c9f: "Gou " -0x6ca0: "Liu " -0x6ca1: "Mei " -0x6ca2: "Ze " -0x6ca3: "Feng " -0x6ca4: "Ou " -0x6ca5: "Li " -0x6ca6: "Lun " -0x6ca7: "Cang " -0x6ca8: "Feng " -0x6ca9: "Wei " -0x6caa: "Hu " -0x6cab: "Mo " -0x6cac: "Mei " -0x6cad: "Shu " -0x6cae: "Ju " -0x6caf: "Zan " -0x6cb0: "Tuo " -0x6cb1: "Tuo " -0x6cb2: "Tuo " -0x6cb3: "He " -0x6cb4: "Li " -0x6cb5: "Mi " -0x6cb6: "Yi " -0x6cb7: "Fa " -0x6cb8: "Fei " -0x6cb9: "You " -0x6cba: "Tian " -0x6cbb: "Zhi " -0x6cbc: "Zhao " -0x6cbd: "Gu " -0x6cbe: "Zhan " -0x6cbf: "Yan " -0x6cc0: "Si " -0x6cc1: "Kuang " -0x6cc2: "Jiong " -0x6cc3: "Ju " -0x6cc4: "Xie " -0x6cc5: "Qiu " -0x6cc6: "Yi " -0x6cc7: "Jia " -0x6cc8: "Zhong " -0x6cc9: "Quan " -0x6cca: "Bo " -0x6ccb: "Hui " -0x6ccc: "Mi " -0x6ccd: "Ben " -0x6cce: "Zhuo " -0x6ccf: "Chu " -0x6cd0: "Le " -0x6cd1: "You " -0x6cd2: "Gu " -0x6cd3: "Hong " -0x6cd4: "Gan " -0x6cd5: "Fa " -0x6cd6: "Mao " -0x6cd7: "Si " -0x6cd8: "Hu " -0x6cd9: "Ping " -0x6cda: "Ci " -0x6cdb: "Fan " -0x6cdc: "Chi " -0x6cdd: "Su " -0x6cde: "Ning " -0x6cdf: "Cheng " -0x6ce0: "Ling " -0x6ce1: "Pao " -0x6ce2: "Bo " -0x6ce3: "Qi " -0x6ce4: "Si " -0x6ce5: "Ni " -0x6ce6: "Ju " -0x6ce7: "Yue " -0x6ce8: "Zhu " -0x6ce9: "Sheng " -0x6cea: "Lei " -0x6ceb: "Xuan " -0x6cec: "Xue " -0x6ced: "Fu " -0x6cee: "Pan " -0x6cef: "Min " -0x6cf0: "Tai " -0x6cf1: "Yang " -0x6cf2: "Ji " -0x6cf3: "Yong " -0x6cf4: "Guan " -0x6cf5: "Beng " -0x6cf6: "Xue " -0x6cf7: "Long " -0x6cf8: "Lu " -0x6cf9: "[?] " -0x6cfa: "Bo " -0x6cfb: "Xie " -0x6cfc: "Po " -0x6cfd: "Ze " -0x6cfe: "Jing " -0x6cff: "Yin " -/* x06d */ -0x6d00: "Zhou " -0x6d01: "Ji " -0x6d02: "Yi " -0x6d03: "Hui " -0x6d04: "Hui " -0x6d05: "Zui " -0x6d06: "Cheng " -0x6d07: "Yin " -0x6d08: "Wei " -0x6d09: "Hou " -0x6d0a: "Jian " -0x6d0b: "Yang " -0x6d0c: "Lie " -0x6d0d: "Si " -0x6d0e: "Ji " -0x6d0f: "Er " -0x6d10: "Xing " -0x6d11: "Fu " -0x6d12: "Sa " -0x6d13: "Suo " -0x6d14: "Zhi " -0x6d15: "Yin " -0x6d16: "Wu " -0x6d17: "Xi " -0x6d18: "Kao " -0x6d19: "Zhu " -0x6d1a: "Jiang " -0x6d1b: "Luo " -0x6d1c: "[?] " -0x6d1d: "An " -0x6d1e: "Dong " -0x6d1f: "Yi " -0x6d20: "Mou " -0x6d21: "Lei " -0x6d22: "Yi " -0x6d23: "Mi " -0x6d24: "Quan " -0x6d25: "Jin " -0x6d26: "Mo " -0x6d27: "Wei " -0x6d28: "Xiao " -0x6d29: "Xie " -0x6d2a: "Hong " -0x6d2b: "Xu " -0x6d2c: "Shuo " -0x6d2d: "Kuang " -0x6d2e: "Tao " -0x6d2f: "Qie " -0x6d30: "Ju " -0x6d31: "Er " -0x6d32: "Zhou " -0x6d33: "Ru " -0x6d34: "Ping " -0x6d35: "Xun " -0x6d36: "Xiong " -0x6d37: "Zhi " -0x6d38: "Guang " -0x6d39: "Huan " -0x6d3a: "Ming " -0x6d3b: "Huo " -0x6d3c: "Wa " -0x6d3d: "Qia " -0x6d3e: "Pai " -0x6d3f: "Wu " -0x6d40: "Qu " -0x6d41: "Liu " -0x6d42: "Yi " -0x6d43: "Jia " -0x6d44: "Jing " -0x6d45: "Qian " -0x6d46: "Jiang " -0x6d47: "Jiao " -0x6d48: "Cheng " -0x6d49: "Shi " -0x6d4a: "Zhuo " -0x6d4b: "Ce " -0x6d4c: "Pal " -0x6d4d: "Kuai " -0x6d4e: "Ji " -0x6d4f: "Liu " -0x6d50: "Chan " -0x6d51: "Hun " -0x6d52: "Hu " -0x6d53: "Nong " -0x6d54: "Xun " -0x6d55: "Jin " -0x6d56: "Lie " -0x6d57: "Qiu " -0x6d58: "Wei " -0x6d59: "Zhe " -0x6d5a: "Jun " -0x6d5b: "Han " -0x6d5c: "Bang " -0x6d5d: "Mang " -0x6d5e: "Zhuo " -0x6d5f: "You " -0x6d60: "Xi " -0x6d61: "Bo " -0x6d62: "Dou " -0x6d63: "Wan " -0x6d64: "Hong " -0x6d65: "Yi " -0x6d66: "Pu " -0x6d67: "Ying " -0x6d68: "Lan " -0x6d69: "Hao " -0x6d6a: "Lang " -0x6d6b: "Han " -0x6d6c: "Li " -0x6d6d: "Geng " -0x6d6e: "Fu " -0x6d6f: "Wu " -0x6d70: "Lian " -0x6d71: "Chun " -0x6d72: "Feng " -0x6d73: "Yi " -0x6d74: "Yu " -0x6d75: "Tong " -0x6d76: "Lao " -0x6d77: "Hai " -0x6d78: "Jin " -0x6d79: "Jia " -0x6d7a: "Chong " -0x6d7b: "Weng " -0x6d7c: "Mei " -0x6d7d: "Sui " -0x6d7e: "Cheng " -0x6d7f: "Pei " -0x6d80: "Xian " -0x6d81: "Shen " -0x6d82: "Tu " -0x6d83: "Kun " -0x6d84: "Pin " -0x6d85: "Nie " -0x6d86: "Han " -0x6d87: "Jing " -0x6d88: "Xiao " -0x6d89: "She " -0x6d8a: "Nian " -0x6d8b: "Tu " -0x6d8c: "Yong " -0x6d8d: "Xiao " -0x6d8e: "Xian " -0x6d8f: "Ting " -0x6d90: "E " -0x6d91: "Su " -0x6d92: "Tun " -0x6d93: "Juan " -0x6d94: "Cen " -0x6d95: "Ti " -0x6d96: "Li " -0x6d97: "Shui " -0x6d98: "Si " -0x6d99: "Lei " -0x6d9a: "Shui " -0x6d9b: "Tao " -0x6d9c: "Du " -0x6d9d: "Lao " -0x6d9e: "Lai " -0x6d9f: "Lian " -0x6da0: "Wei " -0x6da1: "Wo " -0x6da2: "Yun " -0x6da3: "Huan " -0x6da4: "Di " -0x6da5: "[?] " -0x6da6: "Run " -0x6da7: "Jian " -0x6da8: "Zhang " -0x6da9: "Se " -0x6daa: "Fu " -0x6dab: "Guan " -0x6dac: "Xing " -0x6dad: "Shou " -0x6dae: "Shuan " -0x6daf: "Ya " -0x6db0: "Chuo " -0x6db1: "Zhang " -0x6db2: "Ye " -0x6db3: "Kong " -0x6db4: "Wo " -0x6db5: "Han " -0x6db6: "Tuo " -0x6db7: "Dong " -0x6db8: "He " -0x6db9: "Wo " -0x6dba: "Ju " -0x6dbb: "Gan " -0x6dbc: "Liang " -0x6dbd: "Hun " -0x6dbe: "Ta " -0x6dbf: "Zhuo " -0x6dc0: "Dian " -0x6dc1: "Qie " -0x6dc2: "De " -0x6dc3: "Juan " -0x6dc4: "Zi " -0x6dc5: "Xi " -0x6dc6: "Yao " -0x6dc7: "Qi " -0x6dc8: "Gu " -0x6dc9: "Guo " -0x6dca: "Han " -0x6dcb: "Lin " -0x6dcc: "Tang " -0x6dcd: "Zhou " -0x6dce: "Peng " -0x6dcf: "Hao " -0x6dd0: "Chang " -0x6dd1: "Shu " -0x6dd2: "Qi " -0x6dd3: "Fang " -0x6dd4: "Chi " -0x6dd5: "Lu " -0x6dd6: "Nao " -0x6dd7: "Ju " -0x6dd8: "Tao " -0x6dd9: "Cong " -0x6dda: "Lei " -0x6ddb: "Zhi " -0x6ddc: "Peng " -0x6ddd: "Fei " -0x6dde: "Song " -0x6ddf: "Tian " -0x6de0: "Pi " -0x6de1: "Dan " -0x6de2: "Yu " -0x6de3: "Ni " -0x6de4: "Yu " -0x6de5: "Lu " -0x6de6: "Gan " -0x6de7: "Mi " -0x6de8: "Jing " -0x6de9: "Ling " -0x6dea: "Lun " -0x6deb: "Yin " -0x6dec: "Cui " -0x6ded: "Qu " -0x6dee: "Huai " -0x6def: "Yu " -0x6df0: "Nian " -0x6df1: "Shen " -0x6df2: "Piao " -0x6df3: "Chun " -0x6df4: "Wa " -0x6df5: "Yuan " -0x6df6: "Lai " -0x6df7: "Hun " -0x6df8: "Qing " -0x6df9: "Yan " -0x6dfa: "Qian " -0x6dfb: "Tian " -0x6dfc: "Miao " -0x6dfd: "Zhi " -0x6dfe: "Yin " -0x6dff: "Mi " -/* x06e */ -0x6e00: "Ben " -0x6e01: "Yuan " -0x6e02: "Wen " -0x6e03: "Re " -0x6e04: "Fei " -0x6e05: "Qing " -0x6e06: "Yuan " -0x6e07: "Ke " -0x6e08: "Ji " -0x6e09: "She " -0x6e0a: "Yuan " -0x6e0b: "Shibui " -0x6e0c: "Lu " -0x6e0d: "Zi " -0x6e0e: "Du " -0x6e0f: "[?] " -0x6e10: "Jian " -0x6e11: "Min " -0x6e12: "Pi " -0x6e13: "Tani " -0x6e14: "Yu " -0x6e15: "Yuan " -0x6e16: "Shen " -0x6e17: "Shen " -0x6e18: "Rou " -0x6e19: "Huan " -0x6e1a: "Zhu " -0x6e1b: "Jian " -0x6e1c: "Nuan " -0x6e1d: "Yu " -0x6e1e: "Qiu " -0x6e1f: "Ting " -0x6e20: "Qu " -0x6e21: "Du " -0x6e22: "Feng " -0x6e23: "Zha " -0x6e24: "Bo " -0x6e25: "Wo " -0x6e26: "Wo " -0x6e27: "Di " -0x6e28: "Wei " -0x6e29: "Wen " -0x6e2a: "Ru " -0x6e2b: "Xie " -0x6e2c: "Ce " -0x6e2d: "Wei " -0x6e2e: "Ge " -0x6e2f: "Gang " -0x6e30: "Yan " -0x6e31: "Hong " -0x6e32: "Xuan " -0x6e33: "Mi " -0x6e34: "Ke " -0x6e35: "Mao " -0x6e36: "Ying " -0x6e37: "Yan " -0x6e38: "You " -0x6e39: "Hong " -0x6e3a: "Miao " -0x6e3b: "Xing " -0x6e3c: "Mei " -0x6e3d: "Zai " -0x6e3e: "Hun " -0x6e3f: "Nai " -0x6e40: "Kui " -0x6e41: "Shi " -0x6e42: "E " -0x6e43: "Pai " -0x6e44: "Mei " -0x6e45: "Lian " -0x6e46: "Qi " -0x6e47: "Qi " -0x6e48: "Mei " -0x6e49: "Tian " -0x6e4a: "Cou " -0x6e4b: "Wei " -0x6e4c: "Can " -0x6e4d: "Tuan " -0x6e4e: "Mian " -0x6e4f: "Hui " -0x6e50: "Mo " -0x6e51: "Xu " -0x6e52: "Ji " -0x6e53: "Pen " -0x6e54: "Jian " -0x6e55: "Jian " -0x6e56: "Hu " -0x6e57: "Feng " -0x6e58: "Xiang " -0x6e59: "Yi " -0x6e5a: "Yin " -0x6e5b: "Zhan " -0x6e5c: "Shi " -0x6e5d: "Jie " -0x6e5e: "Cheng " -0x6e5f: "Huang " -0x6e60: "Tan " -0x6e61: "Yu " -0x6e62: "Bi " -0x6e63: "Min " -0x6e64: "Shi " -0x6e65: "Tu " -0x6e66: "Sheng " -0x6e67: "Yong " -0x6e68: "Qu " -0x6e69: "Zhong " -0x6e6a: "Suei " -0x6e6b: "Jiu " -0x6e6c: "Jiao " -0x6e6d: "Qiou " -0x6e6e: "Yin " -0x6e6f: "Tang " -0x6e70: "Long " -0x6e71: "Huo " -0x6e72: "Yuan " -0x6e73: "Nan " -0x6e74: "Ban " -0x6e75: "You " -0x6e76: "Quan " -0x6e77: "Chui " -0x6e78: "Liang " -0x6e79: "Chan " -0x6e7a: "Yan " -0x6e7b: "Chun " -0x6e7c: "Nie " -0x6e7d: "Zi " -0x6e7e: "Wan " -0x6e7f: "Shi " -0x6e80: "Man " -0x6e81: "Ying " -0x6e82: "Ratsu " -0x6e83: "Kui " -0x6e84: "[?] " -0x6e85: "Jian " -0x6e86: "Xu " -0x6e87: "Lu " -0x6e88: "Gui " -0x6e89: "Gai " -0x6e8a: "[?] " -0x6e8b: "[?] " -0x6e8c: "Po " -0x6e8d: "Jin " -0x6e8e: "Gui " -0x6e8f: "Tang " -0x6e90: "Yuan " -0x6e91: "Suo " -0x6e92: "Yuan " -0x6e93: "Lian " -0x6e94: "Yao " -0x6e95: "Meng " -0x6e96: "Zhun " -0x6e97: "Sheng " -0x6e98: "Ke " -0x6e99: "Tai " -0x6e9a: "Da " -0x6e9b: "Wa " -0x6e9c: "Liu " -0x6e9d: "Gou " -0x6e9e: "Sao " -0x6e9f: "Ming " -0x6ea0: "Zha " -0x6ea1: "Shi " -0x6ea2: "Yi " -0x6ea3: "Lun " -0x6ea4: "Ma " -0x6ea5: "Pu " -0x6ea6: "Wei " -0x6ea7: "Li " -0x6ea8: "Cai " -0x6ea9: "Wu " -0x6eaa: "Xi " -0x6eab: "Wen " -0x6eac: "Qiang " -0x6ead: "Ze " -0x6eae: "Shi " -0x6eaf: "Su " -0x6eb0: "Yi " -0x6eb1: "Zhen " -0x6eb2: "Sou " -0x6eb3: "Yun " -0x6eb4: "Xiu " -0x6eb5: "Yin " -0x6eb6: "Rong " -0x6eb7: "Hun " -0x6eb8: "Su " -0x6eb9: "Su " -0x6eba: "Ni " -0x6ebb: "Ta " -0x6ebc: "Shi " -0x6ebd: "Ru " -0x6ebe: "Wei " -0x6ebf: "Pan " -0x6ec0: "Chu " -0x6ec1: "Chu " -0x6ec2: "Pang " -0x6ec3: "Weng " -0x6ec4: "Cang " -0x6ec5: "Mie " -0x6ec6: "He " -0x6ec7: "Dian " -0x6ec8: "Hao " -0x6ec9: "Huang " -0x6eca: "Xi " -0x6ecb: "Zi " -0x6ecc: "Di " -0x6ecd: "Zhi " -0x6ece: "Ying " -0x6ecf: "Fu " -0x6ed0: "Jie " -0x6ed1: "Hua " -0x6ed2: "Ge " -0x6ed3: "Zi " -0x6ed4: "Tao " -0x6ed5: "Teng " -0x6ed6: "Sui " -0x6ed7: "Bi " -0x6ed8: "Jiao " -0x6ed9: "Hui " -0x6eda: "Gun " -0x6edb: "Yin " -0x6edc: "Gao " -0x6edd: "Long " -0x6ede: "Zhi " -0x6edf: "Yan " -0x6ee0: "She " -0x6ee1: "Man " -0x6ee2: "Ying " -0x6ee3: "Chun " -0x6ee4: "Lu " -0x6ee5: "Lan " -0x6ee6: "Luan " -0x6ee7: "[?] " -0x6ee8: "Bin " -0x6ee9: "Tan " -0x6eea: "Yu " -0x6eeb: "Sou " -0x6eec: "Hu " -0x6eed: "Bi " -0x6eee: "Biao " -0x6eef: "Zhi " -0x6ef0: "Jiang " -0x6ef1: "Kou " -0x6ef2: "Shen " -0x6ef3: "Shang " -0x6ef4: "Di " -0x6ef5: "Mi " -0x6ef6: "Ao " -0x6ef7: "Lu " -0x6ef8: "Hu " -0x6ef9: "Hu " -0x6efa: "You " -0x6efb: "Chan " -0x6efc: "Fan " -0x6efd: "Yong " -0x6efe: "Gun " -0x6eff: "Man " -/* x06f */ -0x6f00: "Qing " -0x6f01: "Yu " -0x6f02: "Piao " -0x6f03: "Ji " -0x6f04: "Ya " -0x6f05: "Jiao " -0x6f06: "Qi " -0x6f07: "Xi " -0x6f08: "Ji " -0x6f09: "Lu " -0x6f0a: "Lu " -0x6f0b: "Long " -0x6f0c: "Jin " -0x6f0d: "Guo " -0x6f0e: "Cong " -0x6f0f: "Lou " -0x6f10: "Zhi " -0x6f11: "Gai " -0x6f12: "Qiang " -0x6f13: "Li " -0x6f14: "Yan " -0x6f15: "Cao " -0x6f16: "Jiao " -0x6f17: "Cong " -0x6f18: "Qun " -0x6f19: "Tuan " -0x6f1a: "Ou " -0x6f1b: "Teng " -0x6f1c: "Ye " -0x6f1d: "Xi " -0x6f1e: "Mi " -0x6f1f: "Tang " -0x6f20: "Mo " -0x6f21: "Shang " -0x6f22: "Han " -0x6f23: "Lian " -0x6f24: "Lan " -0x6f25: "Wa " -0x6f26: "Li " -0x6f27: "Qian " -0x6f28: "Feng " -0x6f29: "Xuan " -0x6f2a: "Yi " -0x6f2b: "Man " -0x6f2c: "Zi " -0x6f2d: "Mang " -0x6f2e: "Kang " -0x6f2f: "Lei " -0x6f30: "Peng " -0x6f31: "Shu " -0x6f32: "Zhang " -0x6f33: "Zhang " -0x6f34: "Chong " -0x6f35: "Xu " -0x6f36: "Huan " -0x6f37: "Kuo " -0x6f38: "Jian " -0x6f39: "Yan " -0x6f3a: "Chuang " -0x6f3b: "Liao " -0x6f3c: "Cui " -0x6f3d: "Ti " -0x6f3e: "Yang " -0x6f3f: "Jiang " -0x6f40: "Cong " -0x6f41: "Ying " -0x6f42: "Hong " -0x6f43: "Xun " -0x6f44: "Shu " -0x6f45: "Guan " -0x6f46: "Ying " -0x6f47: "Xiao " -0x6f48: "[?] " -0x6f49: "[?] " -0x6f4a: "Xu " -0x6f4b: "Lian " -0x6f4c: "Zhi " -0x6f4d: "Wei " -0x6f4e: "Pi " -0x6f4f: "Jue " -0x6f50: "Jiao " -0x6f51: "Po " -0x6f52: "Dang " -0x6f53: "Hui " -0x6f54: "Jie " -0x6f55: "Wu " -0x6f56: "Pa " -0x6f57: "Ji " -0x6f58: "Pan " -0x6f59: "Gui " -0x6f5a: "Xiao " -0x6f5b: "Qian " -0x6f5c: "Qian " -0x6f5d: "Xi " -0x6f5e: "Lu " -0x6f5f: "Xi " -0x6f60: "Xuan " -0x6f61: "Dun " -0x6f62: "Huang " -0x6f63: "Min " -0x6f64: "Run " -0x6f65: "Su " -0x6f66: "Liao " -0x6f67: "Zhen " -0x6f68: "Zhong " -0x6f69: "Yi " -0x6f6a: "Di " -0x6f6b: "Wan " -0x6f6c: "Dan " -0x6f6d: "Tan " -0x6f6e: "Chao " -0x6f6f: "Xun " -0x6f70: "Kui " -0x6f71: "Yie " -0x6f72: "Shao " -0x6f73: "Tu " -0x6f74: "Zhu " -0x6f75: "San " -0x6f76: "Hei " -0x6f77: "Bi " -0x6f78: "Shan " -0x6f79: "Chan " -0x6f7a: "Chan " -0x6f7b: "Shu " -0x6f7c: "Tong " -0x6f7d: "Pu " -0x6f7e: "Lin " -0x6f7f: "Wei " -0x6f80: "Se " -0x6f81: "Se " -0x6f82: "Cheng " -0x6f83: "Jiong " -0x6f84: "Cheng " -0x6f85: "Hua " -0x6f86: "Jiao " -0x6f87: "Lao " -0x6f88: "Che " -0x6f89: "Gan " -0x6f8a: "Cun " -0x6f8b: "Heng " -0x6f8c: "Si " -0x6f8d: "Shu " -0x6f8e: "Peng " -0x6f8f: "Han " -0x6f90: "Yun " -0x6f91: "Liu " -0x6f92: "Hong " -0x6f93: "Fu " -0x6f94: "Hao " -0x6f95: "He " -0x6f96: "Xian " -0x6f97: "Jian " -0x6f98: "Shan " -0x6f99: "Xi " -0x6f9a: "Oki " -0x6f9b: "[?] " -0x6f9c: "Lan " -0x6f9d: "[?] " -0x6f9e: "Yu " -0x6f9f: "Lin " -0x6fa0: "Min " -0x6fa1: "Zao " -0x6fa2: "Dang " -0x6fa3: "Wan " -0x6fa4: "Ze " -0x6fa5: "Xie " -0x6fa6: "Yu " -0x6fa7: "Li " -0x6fa8: "Shi " -0x6fa9: "Xue " -0x6faa: "Ling " -0x6fab: "Man " -0x6fac: "Zi " -0x6fad: "Yong " -0x6fae: "Kuai " -0x6faf: "Can " -0x6fb0: "Lian " -0x6fb1: "Dian " -0x6fb2: "Ye " -0x6fb3: "Ao " -0x6fb4: "Huan " -0x6fb5: "Zhen " -0x6fb6: "Chan " -0x6fb7: "Man " -0x6fb8: "Dan " -0x6fb9: "Dan " -0x6fba: "Yi " -0x6fbb: "Sui " -0x6fbc: "Pi " -0x6fbd: "Ju " -0x6fbe: "Ta " -0x6fbf: "Qin " -0x6fc0: "Ji " -0x6fc1: "Zhuo " -0x6fc2: "Lian " -0x6fc3: "Nong " -0x6fc4: "Guo " -0x6fc5: "Jin " -0x6fc6: "Fen " -0x6fc7: "Se " -0x6fc8: "Ji " -0x6fc9: "Sui " -0x6fca: "Hui " -0x6fcb: "Chu " -0x6fcc: "Ta " -0x6fcd: "Song " -0x6fce: "Ding " -0x6fcf: "[?] " -0x6fd0: "Zhu " -0x6fd1: "Lai " -0x6fd2: "Bin " -0x6fd3: "Lian " -0x6fd4: "Mi " -0x6fd5: "Shi " -0x6fd6: "Shu " -0x6fd7: "Mi " -0x6fd8: "Ning " -0x6fd9: "Ying " -0x6fda: "Ying " -0x6fdb: "Meng " -0x6fdc: "Jin " -0x6fdd: "Qi " -0x6fde: "Pi " -0x6fdf: "Ji " -0x6fe0: "Hao " -0x6fe1: "Ru " -0x6fe2: "Zui " -0x6fe3: "Wo " -0x6fe4: "Tao " -0x6fe5: "Yin " -0x6fe6: "Yin " -0x6fe7: "Dui " -0x6fe8: "Ci " -0x6fe9: "Huo " -0x6fea: "Jing " -0x6feb: "Lan " -0x6fec: "Jun " -0x6fed: "Ai " -0x6fee: "Pu " -0x6fef: "Zhuo " -0x6ff0: "Wei " -0x6ff1: "Bin " -0x6ff2: "Gu " -0x6ff3: "Qian " -0x6ff4: "Xing " -0x6ff5: "Hama " -0x6ff6: "Kuo " -0x6ff7: "Fei " -0x6ff8: "[?] " -0x6ff9: "Boku " -0x6ffa: "Jian " -0x6ffb: "Wei " -0x6ffc: "Luo " -0x6ffd: "Zan " -0x6ffe: "Lu " -0x6fff: "Li " -/* x070 */ -0x7000: "You " -0x7001: "Yang " -0x7002: "Lu " -0x7003: "Si " -0x7004: "Jie " -0x7005: "Ying " -0x7006: "Du " -0x7007: "Wang " -0x7008: "Hui " -0x7009: "Xie " -0x700a: "Pan " -0x700b: "Shen " -0x700c: "Biao " -0x700d: "Chan " -0x700e: "Mo " -0x700f: "Liu " -0x7010: "Jian " -0x7011: "Pu " -0x7012: "Se " -0x7013: "Cheng " -0x7014: "Gu " -0x7015: "Bin " -0x7016: "Huo " -0x7017: "Xian " -0x7018: "Lu " -0x7019: "Qin " -0x701a: "Han " -0x701b: "Ying " -0x701c: "Yong " -0x701d: "Li " -0x701e: "Jing " -0x701f: "Xiao " -0x7020: "Ying " -0x7021: "Sui " -0x7022: "Wei " -0x7023: "Xie " -0x7024: "Huai " -0x7025: "Hao " -0x7026: "Zhu " -0x7027: "Long " -0x7028: "Lai " -0x7029: "Dui " -0x702a: "Fan " -0x702b: "Hu " -0x702c: "Lai " -0x702d: "[?] " -0x702e: "[?] " -0x702f: "Ying " -0x7030: "Mi " -0x7031: "Ji " -0x7032: "Lian " -0x7033: "Jian " -0x7034: "Ying " -0x7035: "Fen " -0x7036: "Lin " -0x7037: "Yi " -0x7038: "Jian " -0x7039: "Yue " -0x703a: "Chan " -0x703b: "Dai " -0x703c: "Rang " -0x703d: "Jian " -0x703e: "Lan " -0x703f: "Fan " -0x7040: "Shuang " -0x7041: "Yuan " -0x7042: "Zhuo " -0x7043: "Feng " -0x7044: "She " -0x7045: "Lei " -0x7046: "Lan " -0x7047: "Cong " -0x7048: "Qu " -0x7049: "Yong " -0x704a: "Qian " -0x704b: "Fa " -0x704c: "Guan " -0x704d: "Que " -0x704e: "Yan " -0x704f: "Hao " -0x7050: "Hyeng " -0x7051: "Sa " -0x7052: "Zan " -0x7053: "Luan " -0x7054: "Yan " -0x7055: "Li " -0x7056: "Mi " -0x7057: "Shan " -0x7058: "Tan " -0x7059: "Dang " -0x705a: "Jiao " -0x705b: "Chan " -0x705c: "[?] " -0x705d: "Hao " -0x705e: "Ba " -0x705f: "Zhu " -0x7060: "Lan " -0x7061: "Lan " -0x7062: "Nang " -0x7063: "Wan " -0x7064: "Luan " -0x7065: "Xun " -0x7066: "Xian " -0x7067: "Yan " -0x7068: "Gan " -0x7069: "Yan " -0x706a: "Yu " -0x706b: "Huo " -0x706c: "Si " -0x706d: "Mie " -0x706e: "Guang " -0x706f: "Deng " -0x7070: "Hui " -0x7071: "Xiao " -0x7072: "Xiao " -0x7073: "Hu " -0x7074: "Hong " -0x7075: "Ling " -0x7076: "Zao " -0x7077: "Zhuan " -0x7078: "Jiu " -0x7079: "Zha " -0x707a: "Xie " -0x707b: "Chi " -0x707c: "Zhuo " -0x707d: "Zai " -0x707e: "Zai " -0x707f: "Can " -0x7080: "Yang " -0x7081: "Qi " -0x7082: "Zhong " -0x7083: "Fen " -0x7084: "Niu " -0x7085: "Jiong " -0x7086: "Wen " -0x7087: "Po " -0x7088: "Yi " -0x7089: "Lu " -0x708a: "Chui " -0x708b: "Pi " -0x708c: "Kai " -0x708d: "Pan " -0x708e: "Yan " -0x708f: "Kai " -0x7090: "Pang " -0x7091: "Mu " -0x7092: "Chao " -0x7093: "Liao " -0x7094: "Gui " -0x7095: "Kang " -0x7096: "Tun " -0x7097: "Guang " -0x7098: "Xin " -0x7099: "Zhi " -0x709a: "Guang " -0x709b: "Guang " -0x709c: "Wei " -0x709d: "Qiang " -0x709e: "[?] " -0x709f: "Da " -0x70a0: "Xia " -0x70a1: "Zheng " -0x70a2: "Zhu " -0x70a3: "Ke " -0x70a4: "Zhao " -0x70a5: "Fu " -0x70a6: "Ba " -0x70a7: "Duo " -0x70a8: "Duo " -0x70a9: "Ling " -0x70aa: "Zhuo " -0x70ab: "Xuan " -0x70ac: "Ju " -0x70ad: "Tan " -0x70ae: "Pao " -0x70af: "Jiong " -0x70b0: "Pao " -0x70b1: "Tai " -0x70b2: "Tai " -0x70b3: "Bing " -0x70b4: "Yang " -0x70b5: "Tong " -0x70b6: "Han " -0x70b7: "Zhu " -0x70b8: "Zha " -0x70b9: "Dian " -0x70ba: "Wei " -0x70bb: "Shi " -0x70bc: "Lian " -0x70bd: "Chi " -0x70be: "Huang " -0x70bf: "[?] " -0x70c0: "Hu " -0x70c1: "Shuo " -0x70c2: "Lan " -0x70c3: "Jing " -0x70c4: "Jiao " -0x70c5: "Xu " -0x70c6: "Xing " -0x70c7: "Quan " -0x70c8: "Lie " -0x70c9: "Huan " -0x70ca: "Yang " -0x70cb: "Xiao " -0x70cc: "Xiu " -0x70cd: "Xian " -0x70ce: "Yin " -0x70cf: "Wu " -0x70d0: "Zhou " -0x70d1: "Yao " -0x70d2: "Shi " -0x70d3: "Wei " -0x70d4: "Tong " -0x70d5: "Xue " -0x70d6: "Zai " -0x70d7: "Kai " -0x70d8: "Hong " -0x70d9: "Luo " -0x70da: "Xia " -0x70db: "Zhu " -0x70dc: "Xuan " -0x70dd: "Zheng " -0x70de: "Po " -0x70df: "Yan " -0x70e0: "Hui " -0x70e1: "Guang " -0x70e2: "Zhe " -0x70e3: "Hui " -0x70e4: "Kao " -0x70e5: "[?] " -0x70e6: "Fan " -0x70e7: "Shao " -0x70e8: "Ye " -0x70e9: "Hui " -0x70ea: "[?] " -0x70eb: "Tang " -0x70ec: "Jin " -0x70ed: "Re " -0x70ee: "[?] " -0x70ef: "Xi " -0x70f0: "Fu " -0x70f1: "Jiong " -0x70f2: "Che " -0x70f3: "Pu " -0x70f4: "Jing " -0x70f5: "Zhuo " -0x70f6: "Ting " -0x70f7: "Wan " -0x70f8: "Hai " -0x70f9: "Peng " -0x70fa: "Lang " -0x70fb: "Shan " -0x70fc: "Hu " -0x70fd: "Feng " -0x70fe: "Chi " -0x70ff: "Rong " -/* x071 */ -0x7100: "Hu " -0x7101: "Xi " -0x7102: "Shu " -0x7103: "He " -0x7104: "Xun " -0x7105: "Ku " -0x7106: "Jue " -0x7107: "Xiao " -0x7108: "Xi " -0x7109: "Yan " -0x710a: "Han " -0x710b: "Zhuang " -0x710c: "Jun " -0x710d: "Di " -0x710e: "Xie " -0x710f: "Ji " -0x7110: "Wu " -0x7111: "[?] " -0x7112: "[?] " -0x7113: "Han " -0x7114: "Yan " -0x7115: "Huan " -0x7116: "Men " -0x7117: "Ju " -0x7118: "Chou " -0x7119: "Bei " -0x711a: "Fen " -0x711b: "Lin " -0x711c: "Kun " -0x711d: "Hun " -0x711e: "Tun " -0x711f: "Xi " -0x7120: "Cui " -0x7121: "Wu " -0x7122: "Hong " -0x7123: "Ju " -0x7124: "Fu " -0x7125: "Wo " -0x7126: "Jiao " -0x7127: "Cong " -0x7128: "Feng " -0x7129: "Ping " -0x712a: "Qiong " -0x712b: "Ruo " -0x712c: "Xi " -0x712d: "Qiong " -0x712e: "Xin " -0x712f: "Zhuo " -0x7130: "Yan " -0x7131: "Yan " -0x7132: "Yi " -0x7133: "Jue " -0x7134: "Yu " -0x7135: "Gang " -0x7136: "Ran " -0x7137: "Pi " -0x7138: "Gu " -0x7139: "[?] " -0x713a: "Sheng " -0x713b: "Chang " -0x713c: "Shao " -0x713d: "[?] " -0x713e: "[?] " -0x713f: "[?] " -0x7140: "[?] " -0x7141: "Chen " -0x7142: "He " -0x7143: "Kui " -0x7144: "Zhong " -0x7145: "Duan " -0x7146: "Xia " -0x7147: "Hui " -0x7148: "Feng " -0x7149: "Lian " -0x714a: "Xuan " -0x714b: "Xing " -0x714c: "Huang " -0x714d: "Jiao " -0x714e: "Jian " -0x714f: "Bi " -0x7150: "Ying " -0x7151: "Zhu " -0x7152: "Wei " -0x7153: "Tuan " -0x7154: "Tian " -0x7155: "Xi " -0x7156: "Nuan " -0x7157: "Nuan " -0x7158: "Chan " -0x7159: "Yan " -0x715a: "Jiong " -0x715b: "Jiong " -0x715c: "Yu " -0x715d: "Mei " -0x715e: "Sha " -0x715f: "Wei " -0x7160: "Ye " -0x7161: "Xin " -0x7162: "Qiong " -0x7163: "Rou " -0x7164: "Mei " -0x7165: "Huan " -0x7166: "Xu " -0x7167: "Zhao " -0x7168: "Wei " -0x7169: "Fan " -0x716a: "Qiu " -0x716b: "Sui " -0x716c: "Yang " -0x716d: "Lie " -0x716e: "Zhu " -0x716f: "Jie " -0x7170: "Gao " -0x7171: "Gua " -0x7172: "Bao " -0x7173: "Hu " -0x7174: "Yun " -0x7175: "Xia " -0x7176: "[?] " -0x7177: "[?] " -0x7178: "Bian " -0x7179: "Gou " -0x717a: "Tui " -0x717b: "Tang " -0x717c: "Chao " -0x717d: "Shan " -0x717e: "N " -0x717f: "Bo " -0x7180: "Huang " -0x7181: "Xie " -0x7182: "Xi " -0x7183: "Wu " -0x7184: "Xi " -0x7185: "Yun " -0x7186: "He " -0x7187: "He " -0x7188: "Xi " -0x7189: "Yun " -0x718a: "Xiong " -0x718b: "Nai " -0x718c: "Shan " -0x718d: "Qiong " -0x718e: "Yao " -0x718f: "Xun " -0x7190: "Mi " -0x7191: "Lian " -0x7192: "Ying " -0x7193: "Wen " -0x7194: "Rong " -0x7195: "Oozutsu " -0x7196: "[?] " -0x7197: "Qiang " -0x7198: "Liu " -0x7199: "Xi " -0x719a: "Bi " -0x719b: "Biao " -0x719c: "Zong " -0x719d: "Lu " -0x719e: "Jian " -0x719f: "Shou " -0x71a0: "Yi " -0x71a1: "Lou " -0x71a2: "Feng " -0x71a3: "Sui " -0x71a4: "Yi " -0x71a5: "Tong " -0x71a6: "Jue " -0x71a7: "Zong " -0x71a8: "Yun " -0x71a9: "Hu " -0x71aa: "Yi " -0x71ab: "Zhi " -0x71ac: "Ao " -0x71ad: "Wei " -0x71ae: "Liao " -0x71af: "Han " -0x71b0: "Ou " -0x71b1: "Re " -0x71b2: "Jiong " -0x71b3: "Man " -0x71b4: "[?] " -0x71b5: "Shang " -0x71b6: "Cuan " -0x71b7: "Zeng " -0x71b8: "Jian " -0x71b9: "Xi " -0x71ba: "Xi " -0x71bb: "Xi " -0x71bc: "Yi " -0x71bd: "Xiao " -0x71be: "Chi " -0x71bf: "Huang " -0x71c0: "Chan " -0x71c1: "Ye " -0x71c2: "Qian " -0x71c3: "Ran " -0x71c4: "Yan " -0x71c5: "Xian " -0x71c6: "Qiao " -0x71c7: "Zun " -0x71c8: "Deng " -0x71c9: "Dun " -0x71ca: "Shen " -0x71cb: "Jiao " -0x71cc: "Fen " -0x71cd: "Si " -0x71ce: "Liao " -0x71cf: "Yu " -0x71d0: "Lin " -0x71d1: "Tong " -0x71d2: "Shao " -0x71d3: "Fen " -0x71d4: "Fan " -0x71d5: "Yan " -0x71d6: "Xun " -0x71d7: "Lan " -0x71d8: "Mei " -0x71d9: "Tang " -0x71da: "Yi " -0x71db: "Jing " -0x71dc: "Men " -0x71dd: "[?] " -0x71de: "[?] " -0x71df: "Ying " -0x71e0: "Yu " -0x71e1: "Yi " -0x71e2: "Xue " -0x71e3: "Lan " -0x71e4: "Tai " -0x71e5: "Zao " -0x71e6: "Can " -0x71e7: "Sui " -0x71e8: "Xi " -0x71e9: "Que " -0x71ea: "Cong " -0x71eb: "Lian " -0x71ec: "Hui " -0x71ed: "Zhu " -0x71ee: "Xie " -0x71ef: "Ling " -0x71f0: "Wei " -0x71f1: "Yi " -0x71f2: "Xie " -0x71f3: "Zhao " -0x71f4: "Hui " -0x71f5: "Tatsu " -0x71f6: "Nung " -0x71f7: "Lan " -0x71f8: "Ru " -0x71f9: "Xian " -0x71fa: "Kao " -0x71fb: "Xun " -0x71fc: "Jin " -0x71fd: "Chou " -0x71fe: "Chou " -0x71ff: "Yao " -/* x072 */ -0x7200: "He " -0x7201: "Lan " -0x7202: "Biao " -0x7203: "Rong " -0x7204: "Li " -0x7205: "Mo " -0x7206: "Bao " -0x7207: "Ruo " -0x7208: "Lu " -0x7209: "La " -0x720a: "Ao " -0x720b: "Xun " -0x720c: "Kuang " -0x720d: "Shuo " -0x720e: "[?] " -0x720f: "Li " -0x7210: "Lu " -0x7211: "Jue " -0x7212: "Liao " -0x7213: "Yan " -0x7214: "Xi " -0x7215: "Xie " -0x7216: "Long " -0x7217: "Ye " -0x7218: "[?] " -0x7219: "Rang " -0x721a: "Yue " -0x721b: "Lan " -0x721c: "Cong " -0x721d: "Jue " -0x721e: "Tong " -0x721f: "Guan " -0x7220: "[?] " -0x7221: "Che " -0x7222: "Mi " -0x7223: "Tang " -0x7224: "Lan " -0x7225: "Zhu " -0x7226: "[?] " -0x7227: "Ling " -0x7228: "Cuan " -0x7229: "Yu " -0x722a: "Zhua " -0x722b: "Tsumekanmuri " -0x722c: "Pa " -0x722d: "Zheng " -0x722e: "Pao " -0x722f: "Cheng " -0x7230: "Yuan " -0x7231: "Ai " -0x7232: "Wei " -0x7233: "[?] " -0x7234: "Jue " -0x7235: "Jue " -0x7236: "Fu " -0x7237: "Ye " -0x7238: "Ba " -0x7239: "Die " -0x723a: "Ye " -0x723b: "Yao " -0x723c: "Zu " -0x723d: "Shuang " -0x723e: "Er " -0x723f: "Qiang " -0x7240: "Chuang " -0x7241: "Ge " -0x7242: "Zang " -0x7243: "Die " -0x7244: "Qiang " -0x7245: "Yong " -0x7246: "Qiang " -0x7247: "Pian " -0x7248: "Ban " -0x7249: "Pan " -0x724a: "Shao " -0x724b: "Jian " -0x724c: "Pai " -0x724d: "Du " -0x724e: "Chuang " -0x724f: "Tou " -0x7250: "Zha " -0x7251: "Bian " -0x7252: "Die " -0x7253: "Bang " -0x7254: "Bo " -0x7255: "Chuang " -0x7256: "You " -0x7257: "[?] " -0x7258: "Du " -0x7259: "Ya " -0x725a: "Cheng " -0x725b: "Niu " -0x725c: "Ushihen " -0x725d: "Pin " -0x725e: "Jiu " -0x725f: "Mou " -0x7260: "Tuo " -0x7261: "Mu " -0x7262: "Lao " -0x7263: "Ren " -0x7264: "Mang " -0x7265: "Fang " -0x7266: "Mao " -0x7267: "Mu " -0x7268: "Gang " -0x7269: "Wu " -0x726a: "Yan " -0x726b: "Ge " -0x726c: "Bei " -0x726d: "Si " -0x726e: "Jian " -0x726f: "Gu " -0x7270: "You " -0x7271: "Ge " -0x7272: "Sheng " -0x7273: "Mu " -0x7274: "Di " -0x7275: "Qian " -0x7276: "Quan " -0x7277: "Quan " -0x7278: "Zi " -0x7279: "Te " -0x727a: "Xi " -0x727b: "Mang " -0x727c: "Keng " -0x727d: "Qian " -0x727e: "Wu " -0x727f: "Gu " -0x7280: "Xi " -0x7281: "Li " -0x7282: "Li " -0x7283: "Pou " -0x7284: "Ji " -0x7285: "Gang " -0x7286: "Zhi " -0x7287: "Ben " -0x7288: "Quan " -0x7289: "Run " -0x728a: "Du " -0x728b: "Ju " -0x728c: "Jia " -0x728d: "Jian " -0x728e: "Feng " -0x728f: "Pian " -0x7290: "Ke " -0x7291: "Ju " -0x7292: "Kao " -0x7293: "Chu " -0x7294: "Xi " -0x7295: "Bei " -0x7296: "Luo " -0x7297: "Jie " -0x7298: "Ma " -0x7299: "San " -0x729a: "Wei " -0x729b: "Li " -0x729c: "Dun " -0x729d: "Tong " -0x729e: "[?] " -0x729f: "Jiang " -0x72a0: "Ikenie " -0x72a1: "Li " -0x72a2: "Du " -0x72a3: "Lie " -0x72a4: "Pi " -0x72a5: "Piao " -0x72a6: "Bao " -0x72a7: "Xi " -0x72a8: "Chou " -0x72a9: "Wei " -0x72aa: "Kui " -0x72ab: "Chou " -0x72ac: "Quan " -0x72ad: "Fan " -0x72ae: "Ba " -0x72af: "Fan " -0x72b0: "Qiu " -0x72b1: "Ji " -0x72b2: "Cai " -0x72b3: "Chuo " -0x72b4: "An " -0x72b5: "Jie " -0x72b6: "Zhuang " -0x72b7: "Guang " -0x72b8: "Ma " -0x72b9: "You " -0x72ba: "Kang " -0x72bb: "Bo " -0x72bc: "Hou " -0x72bd: "Ya " -0x72be: "Yin " -0x72bf: "Huan " -0x72c0: "Zhuang " -0x72c1: "Yun " -0x72c2: "Kuang " -0x72c3: "Niu " -0x72c4: "Di " -0x72c5: "Qing " -0x72c6: "Zhong " -0x72c7: "Mu " -0x72c8: "Bei " -0x72c9: "Pi " -0x72ca: "Ju " -0x72cb: "Ni " -0x72cc: "Sheng " -0x72cd: "Pao " -0x72ce: "Xia " -0x72cf: "Tuo " -0x72d0: "Hu " -0x72d1: "Ling " -0x72d2: "Fei " -0x72d3: "Pi " -0x72d4: "Ni " -0x72d5: "Ao " -0x72d6: "You " -0x72d7: "Gou " -0x72d8: "Yue " -0x72d9: "Ju " -0x72da: "Dan " -0x72db: "Po " -0x72dc: "Gu " -0x72dd: "Xian " -0x72de: "Ning " -0x72df: "Huan " -0x72e0: "Hen " -0x72e1: "Jiao " -0x72e2: "He " -0x72e3: "Zhao " -0x72e4: "Ji " -0x72e5: "Xun " -0x72e6: "Shan " -0x72e7: "Ta " -0x72e8: "Rong " -0x72e9: "Shou " -0x72ea: "Tong " -0x72eb: "Lao " -0x72ec: "Du " -0x72ed: "Xia " -0x72ee: "Shi " -0x72ef: "Hua " -0x72f0: "Zheng " -0x72f1: "Yu " -0x72f2: "Sun " -0x72f3: "Yu " -0x72f4: "Bi " -0x72f5: "Mang " -0x72f6: "Xi " -0x72f7: "Juan " -0x72f8: "Li " -0x72f9: "Xia " -0x72fa: "Yin " -0x72fb: "Suan " -0x72fc: "Lang " -0x72fd: "Bei " -0x72fe: "Zhi " -0x72ff: "Yan " -/* x073 */ -0x7300: "Sha " -0x7301: "Li " -0x7302: "Han " -0x7303: "Xian " -0x7304: "Jing " -0x7305: "Pai " -0x7306: "Fei " -0x7307: "Yao " -0x7308: "Ba " -0x7309: "Qi " -0x730a: "Ni " -0x730b: "Biao " -0x730c: "Yin " -0x730d: "Lai " -0x730e: "Xi " -0x730f: "Jian " -0x7310: "Qiang " -0x7311: "Kun " -0x7312: "Yan " -0x7313: "Guo " -0x7314: "Zong " -0x7315: "Mi " -0x7316: "Chang " -0x7317: "Yi " -0x7318: "Zhi " -0x7319: "Zheng " -0x731a: "Ya " -0x731b: "Meng " -0x731c: "Cai " -0x731d: "Cu " -0x731e: "She " -0x731f: "Kari " -0x7320: "Cen " -0x7321: "Luo " -0x7322: "Hu " -0x7323: "Zong " -0x7324: "Ji " -0x7325: "Wei " -0x7326: "Feng " -0x7327: "Wo " -0x7328: "Yuan " -0x7329: "Xing " -0x732a: "Zhu " -0x732b: "Mao " -0x732c: "Wei " -0x732d: "Yuan " -0x732e: "Xian " -0x732f: "Tuan " -0x7330: "Ya " -0x7331: "Nao " -0x7332: "Xie " -0x7333: "Jia " -0x7334: "Hou " -0x7335: "Bian " -0x7336: "You " -0x7337: "You " -0x7338: "Mei " -0x7339: "Zha " -0x733a: "Yao " -0x733b: "Sun " -0x733c: "Bo " -0x733d: "Ming " -0x733e: "Hua " -0x733f: "Yuan " -0x7340: "Sou " -0x7341: "Ma " -0x7342: "Yuan " -0x7343: "Dai " -0x7344: "Yu " -0x7345: "Shi " -0x7346: "Hao " -0x7347: "[?] " -0x7348: "Yi " -0x7349: "Zhen " -0x734a: "Chuang " -0x734b: "Hao " -0x734c: "Man " -0x734d: "Jing " -0x734e: "Jiang " -0x734f: "Mu " -0x7350: "Zhang " -0x7351: "Chan " -0x7352: "Ao " -0x7353: "Ao " -0x7354: "Hao " -0x7355: "Cui " -0x7356: "Fen " -0x7357: "Jue " -0x7358: "Bi " -0x7359: "Bi " -0x735a: "Huang " -0x735b: "Pu " -0x735c: "Lin " -0x735d: "Yu " -0x735e: "Tong " -0x735f: "Yao " -0x7360: "Liao " -0x7361: "Shuo " -0x7362: "Xiao " -0x7363: "Swu " -0x7364: "Ton " -0x7365: "Xi " -0x7366: "Ge " -0x7367: "Juan " -0x7368: "Du " -0x7369: "Hui " -0x736a: "Kuai " -0x736b: "Xian " -0x736c: "Xie " -0x736d: "Ta " -0x736e: "Xian " -0x736f: "Xun " -0x7370: "Ning " -0x7371: "Pin " -0x7372: "Huo " -0x7373: "Nou " -0x7374: "Meng " -0x7375: "Lie " -0x7376: "Nao " -0x7377: "Guang " -0x7378: "Shou " -0x7379: "Lu " -0x737a: "Ta " -0x737b: "Xian " -0x737c: "Mi " -0x737d: "Rang " -0x737e: "Huan " -0x737f: "Nao " -0x7380: "Luo " -0x7381: "Xian " -0x7382: "Qi " -0x7383: "Jue " -0x7384: "Xuan " -0x7385: "Miao " -0x7386: "Zi " -0x7387: "Lu " -0x7388: "Lu " -0x7389: "Yu " -0x738a: "Su " -0x738b: "Wang " -0x738c: "Qiu " -0x738d: "Ga " -0x738e: "Ding " -0x738f: "Le " -0x7390: "Ba " -0x7391: "Ji " -0x7392: "Hong " -0x7393: "Di " -0x7394: "Quan " -0x7395: "Gan " -0x7396: "Jiu " -0x7397: "Yu " -0x7398: "Ji " -0x7399: "Yu " -0x739a: "Yang " -0x739b: "Ma " -0x739c: "Gong " -0x739d: "Wu " -0x739e: "Fu " -0x739f: "Wen " -0x73a0: "Jie " -0x73a1: "Ya " -0x73a2: "Fen " -0x73a3: "Bian " -0x73a4: "Beng " -0x73a5: "Yue " -0x73a6: "Jue " -0x73a7: "Yun " -0x73a8: "Jue " -0x73a9: "Wan " -0x73aa: "Jian " -0x73ab: "Mei " -0x73ac: "Dan " -0x73ad: "Pi " -0x73ae: "Wei " -0x73af: "Huan " -0x73b0: "Xian " -0x73b1: "Qiang " -0x73b2: "Ling " -0x73b3: "Dai " -0x73b4: "Yi " -0x73b5: "An " -0x73b6: "Ping " -0x73b7: "Dian " -0x73b8: "Fu " -0x73b9: "Xuan " -0x73ba: "Xi " -0x73bb: "Bo " -0x73bc: "Ci " -0x73bd: "Gou " -0x73be: "Jia " -0x73bf: "Shao " -0x73c0: "Po " -0x73c1: "Ci " -0x73c2: "Ke " -0x73c3: "Ran " -0x73c4: "Sheng " -0x73c5: "Shen " -0x73c6: "Yi " -0x73c7: "Zu " -0x73c8: "Jia " -0x73c9: "Min " -0x73ca: "Shan " -0x73cb: "Liu " -0x73cc: "Bi " -0x73cd: "Zhen " -0x73ce: "Zhen " -0x73cf: "Jue " -0x73d0: "Fa " -0x73d1: "Long " -0x73d2: "Jin " -0x73d3: "Jiao " -0x73d4: "Jian " -0x73d5: "Li " -0x73d6: "Guang " -0x73d7: "Xian " -0x73d8: "Zhou " -0x73d9: "Gong " -0x73da: "Yan " -0x73db: "Xiu " -0x73dc: "Yang " -0x73dd: "Xu " -0x73de: "Luo " -0x73df: "Su " -0x73e0: "Zhu " -0x73e1: "Qin " -0x73e2: "Ken " -0x73e3: "Xun " -0x73e4: "Bao " -0x73e5: "Er " -0x73e6: "Xiang " -0x73e7: "Yao " -0x73e8: "Xia " -0x73e9: "Heng " -0x73ea: "Gui " -0x73eb: "Chong " -0x73ec: "Xu " -0x73ed: "Ban " -0x73ee: "Pei " -0x73ef: "[?] " -0x73f0: "Dang " -0x73f1: "Ei " -0x73f2: "Hun " -0x73f3: "Wen " -0x73f4: "E " -0x73f5: "Cheng " -0x73f6: "Ti " -0x73f7: "Wu " -0x73f8: "Wu " -0x73f9: "Cheng " -0x73fa: "Jun " -0x73fb: "Mei " -0x73fc: "Bei " -0x73fd: "Ting " -0x73fe: "Xian " -0x73ff: "Chuo " -/* x074 */ -0x7400: "Han " -0x7401: "Xuan " -0x7402: "Yan " -0x7403: "Qiu " -0x7404: "Quan " -0x7405: "Lang " -0x7406: "Li " -0x7407: "Xiu " -0x7408: "Fu " -0x7409: "Liu " -0x740a: "Ye " -0x740b: "Xi " -0x740c: "Ling " -0x740d: "Li " -0x740e: "Jin " -0x740f: "Lian " -0x7410: "Suo " -0x7411: "Chiisai " -0x7412: "[?] " -0x7413: "Wan " -0x7414: "Dian " -0x7415: "Pin " -0x7416: "Zhan " -0x7417: "Cui " -0x7418: "Min " -0x7419: "Yu " -0x741a: "Ju " -0x741b: "Chen " -0x741c: "Lai " -0x741d: "Wen " -0x741e: "Sheng " -0x741f: "Wei " -0x7420: "Dian " -0x7421: "Chu " -0x7422: "Zhuo " -0x7423: "Pei " -0x7424: "Cheng " -0x7425: "Hu " -0x7426: "Qi " -0x7427: "E " -0x7428: "Kun " -0x7429: "Chang " -0x742a: "Qi " -0x742b: "Beng " -0x742c: "Wan " -0x742d: "Lu " -0x742e: "Cong " -0x742f: "Guan " -0x7430: "Yan " -0x7431: "Diao " -0x7432: "Bei " -0x7433: "Lin " -0x7434: "Qin " -0x7435: "Pi " -0x7436: "Pa " -0x7437: "Que " -0x7438: "Zhuo " -0x7439: "Qin " -0x743a: "Fa " -0x743b: "[?] " -0x743c: "Qiong " -0x743d: "Du " -0x743e: "Jie " -0x743f: "Hun " -0x7440: "Yu " -0x7441: "Mao " -0x7442: "Mei " -0x7443: "Chun " -0x7444: "Xuan " -0x7445: "Ti " -0x7446: "Xing " -0x7447: "Dai " -0x7448: "Rou " -0x7449: "Min " -0x744a: "Zhen " -0x744b: "Wei " -0x744c: "Ruan " -0x744d: "Huan " -0x744e: "Jie " -0x744f: "Chuan " -0x7450: "Jian " -0x7451: "Zhuan " -0x7452: "Yang " -0x7453: "Lian " -0x7454: "Quan " -0x7455: "Xia " -0x7456: "Duan " -0x7457: "Yuan " -0x7458: "Ye " -0x7459: "Nao " -0x745a: "Hu " -0x745b: "Ying " -0x745c: "Yu " -0x745d: "Huang " -0x745e: "Rui " -0x745f: "Se " -0x7460: "Liu " -0x7461: "Shi " -0x7462: "Rong " -0x7463: "Suo " -0x7464: "Yao " -0x7465: "Wen " -0x7466: "Wu " -0x7467: "Jin " -0x7468: "Jin " -0x7469: "Ying " -0x746a: "Ma " -0x746b: "Tao " -0x746c: "Liu " -0x746d: "Tang " -0x746e: "Li " -0x746f: "Lang " -0x7470: "Gui " -0x7471: "Zhen " -0x7472: "Qiang " -0x7473: "Cuo " -0x7474: "Jue " -0x7475: "Zhao " -0x7476: "Yao " -0x7477: "Ai " -0x7478: "Bin " -0x7479: "Tu " -0x747a: "Chang " -0x747b: "Kun " -0x747c: "Zhuan " -0x747d: "Cong " -0x747e: "Jin " -0x747f: "Yi " -0x7480: "Cui " -0x7481: "Cong " -0x7482: "Qi " -0x7483: "Li " -0x7484: "Ying " -0x7485: "Suo " -0x7486: "Qiu " -0x7487: "Xuan " -0x7488: "Ao " -0x7489: "Lian " -0x748a: "Man " -0x748b: "Zhang " -0x748c: "Yin " -0x748d: "[?] " -0x748e: "Ying " -0x748f: "Zhi " -0x7490: "Lu " -0x7491: "Wu " -0x7492: "Deng " -0x7493: "Xiou " -0x7494: "Zeng " -0x7495: "Xun " -0x7496: "Qu " -0x7497: "Dang " -0x7498: "Lin " -0x7499: "Liao " -0x749a: "Qiong " -0x749b: "Su " -0x749c: "Huang " -0x749d: "Gui " -0x749e: "Pu " -0x749f: "Jing " -0x74a0: "Fan " -0x74a1: "Jin " -0x74a2: "Liu " -0x74a3: "Ji " -0x74a4: "[?] " -0x74a5: "Jing " -0x74a6: "Ai " -0x74a7: "Bi " -0x74a8: "Can " -0x74a9: "Qu " -0x74aa: "Zao " -0x74ab: "Dang " -0x74ac: "Jiao " -0x74ad: "Gun " -0x74ae: "Tan " -0x74af: "Hui " -0x74b0: "Huan " -0x74b1: "Se " -0x74b2: "Sui " -0x74b3: "Tian " -0x74b4: "[?] " -0x74b5: "Yu " -0x74b6: "Jin " -0x74b7: "Lu " -0x74b8: "Bin " -0x74b9: "Shou " -0x74ba: "Wen " -0x74bb: "Zui " -0x74bc: "Lan " -0x74bd: "Xi " -0x74be: "Ji " -0x74bf: "Xuan " -0x74c0: "Ruan " -0x74c1: "Huo " -0x74c2: "Gai " -0x74c3: "Lei " -0x74c4: "Du " -0x74c5: "Li " -0x74c6: "Zhi " -0x74c7: "Rou " -0x74c8: "Li " -0x74c9: "Zan " -0x74ca: "Qiong " -0x74cb: "Zhe " -0x74cc: "Gui " -0x74cd: "Sui " -0x74ce: "La " -0x74cf: "Long " -0x74d0: "Lu " -0x74d1: "Li " -0x74d2: "Zan " -0x74d3: "Lan " -0x74d4: "Ying " -0x74d5: "Mi " -0x74d6: "Xiang " -0x74d7: "Xi " -0x74d8: "Guan " -0x74d9: "Dao " -0x74da: "Zan " -0x74db: "Huan " -0x74dc: "Gua " -0x74dd: "Bo " -0x74de: "Die " -0x74df: "Bao " -0x74e0: "Hu " -0x74e1: "Zhi " -0x74e2: "Piao " -0x74e3: "Ban " -0x74e4: "Rang " -0x74e5: "Li " -0x74e6: "Wa " -0x74e7: "Dekaguramu " -0x74e8: "Jiang " -0x74e9: "Qian " -0x74ea: "Fan " -0x74eb: "Pen " -0x74ec: "Fang " -0x74ed: "Dan " -0x74ee: "Weng " -0x74ef: "Ou " -0x74f0: "Deshiguramu " -0x74f1: "Miriguramu " -0x74f2: "Thon " -0x74f3: "Hu " -0x74f4: "Ling " -0x74f5: "Yi " -0x74f6: "Ping " -0x74f7: "Ci " -0x74f8: "Hekutogura " -0x74f9: "Juan " -0x74fa: "Chang " -0x74fb: "Chi " -0x74fc: "Sarake " -0x74fd: "Dang " -0x74fe: "Meng " -0x74ff: "Pou " -/* x075 */ -0x7500: "Zhui " -0x7501: "Ping " -0x7502: "Bian " -0x7503: "Zhou " -0x7504: "Zhen " -0x7505: "Senchigura " -0x7506: "Ci " -0x7507: "Ying " -0x7508: "Qi " -0x7509: "Xian " -0x750a: "Lou " -0x750b: "Di " -0x750c: "Ou " -0x750d: "Meng " -0x750e: "Zhuan " -0x750f: "Peng " -0x7510: "Lin " -0x7511: "Zeng " -0x7512: "Wu " -0x7513: "Pi " -0x7514: "Dan " -0x7515: "Weng " -0x7516: "Ying " -0x7517: "Yan " -0x7518: "Gan " -0x7519: "Dai " -0x751a: "Shen " -0x751b: "Tian " -0x751c: "Tian " -0x751d: "Han " -0x751e: "Chang " -0x751f: "Sheng " -0x7520: "Qing " -0x7521: "Sheng " -0x7522: "Chan " -0x7523: "Chan " -0x7524: "Rui " -0x7525: "Sheng " -0x7526: "Su " -0x7527: "Sen " -0x7528: "Yong " -0x7529: "Shuai " -0x752a: "Lu " -0x752b: "Fu " -0x752c: "Yong " -0x752d: "Beng " -0x752e: "Feng " -0x752f: "Ning " -0x7530: "Tian " -0x7531: "You " -0x7532: "Jia " -0x7533: "Shen " -0x7534: "Zha " -0x7535: "Dian " -0x7536: "Fu " -0x7537: "Nan " -0x7538: "Dian " -0x7539: "Ping " -0x753a: "Ting " -0x753b: "Hua " -0x753c: "Ting " -0x753d: "Quan " -0x753e: "Zi " -0x753f: "Meng " -0x7540: "Bi " -0x7541: "Qi " -0x7542: "Liu " -0x7543: "Xun " -0x7544: "Liu " -0x7545: "Chang " -0x7546: "Mu " -0x7547: "Yun " -0x7548: "Fan " -0x7549: "Fu " -0x754a: "Geng " -0x754b: "Tian " -0x754c: "Jie " -0x754d: "Jie " -0x754e: "Quan " -0x754f: "Wei " -0x7550: "Fu " -0x7551: "Tian " -0x7552: "Mu " -0x7553: "Tap " -0x7554: "Pan " -0x7555: "Jiang " -0x7556: "Wa " -0x7557: "Da " -0x7558: "Nan " -0x7559: "Liu " -0x755a: "Ben " -0x755b: "Zhen " -0x755c: "Chu " -0x755d: "Mu " -0x755e: "Mu " -0x755f: "Ce " -0x7560: "Cen " -0x7561: "Gai " -0x7562: "Bi " -0x7563: "Da " -0x7564: "Zhi " -0x7565: "Lue " -0x7566: "Qi " -0x7567: "Lue " -0x7568: "Pan " -0x7569: "Kesa " -0x756a: "Fan " -0x756b: "Hua " -0x756c: "Yu " -0x756d: "Yu " -0x756e: "Mu " -0x756f: "Jun " -0x7570: "Yi " -0x7571: "Liu " -0x7572: "Yu " -0x7573: "Die " -0x7574: "Chou " -0x7575: "Hua " -0x7576: "Dang " -0x7577: "Chuo " -0x7578: "Ji " -0x7579: "Wan " -0x757a: "Jiang " -0x757b: "Sheng " -0x757c: "Chang " -0x757d: "Tuan " -0x757e: "Lei " -0x757f: "Ji " -0x7580: "Cha " -0x7581: "Liu " -0x7582: "Tatamu " -0x7583: "Tuan " -0x7584: "Lin " -0x7585: "Jiang " -0x7586: "Jiang " -0x7587: "Chou " -0x7588: "Bo " -0x7589: "Die " -0x758a: "Die " -0x758b: "Pi " -0x758c: "Nie " -0x758d: "Dan " -0x758e: "Shu " -0x758f: "Shu " -0x7590: "Zhi " -0x7591: "Yi " -0x7592: "Chuang " -0x7593: "Nai " -0x7594: "Ding " -0x7595: "Bi " -0x7596: "Jie " -0x7597: "Liao " -0x7598: "Gong " -0x7599: "Ge " -0x759a: "Jiu " -0x759b: "Zhou " -0x759c: "Xia " -0x759d: "Shan " -0x759e: "Xu " -0x759f: "Nue " -0x75a0: "Li " -0x75a1: "Yang " -0x75a2: "Chen " -0x75a3: "You " -0x75a4: "Ba " -0x75a5: "Jie " -0x75a6: "Jue " -0x75a7: "Zhi " -0x75a8: "Xia " -0x75a9: "Cui " -0x75aa: "Bi " -0x75ab: "Yi " -0x75ac: "Li " -0x75ad: "Zong " -0x75ae: "Chuang " -0x75af: "Feng " -0x75b0: "Zhu " -0x75b1: "Pao " -0x75b2: "Pi " -0x75b3: "Gan " -0x75b4: "Ke " -0x75b5: "Ci " -0x75b6: "Xie " -0x75b7: "Qi " -0x75b8: "Dan " -0x75b9: "Zhen " -0x75ba: "Fa " -0x75bb: "Zhi " -0x75bc: "Teng " -0x75bd: "Ju " -0x75be: "Ji " -0x75bf: "Fei " -0x75c0: "Qu " -0x75c1: "Dian " -0x75c2: "Jia " -0x75c3: "Xian " -0x75c4: "Cha " -0x75c5: "Bing " -0x75c6: "Ni " -0x75c7: "Zheng " -0x75c8: "Yong " -0x75c9: "Jing " -0x75ca: "Quan " -0x75cb: "Chong " -0x75cc: "Tong " -0x75cd: "Yi " -0x75ce: "Kai " -0x75cf: "Wei " -0x75d0: "Hui " -0x75d1: "Duo " -0x75d2: "Yang " -0x75d3: "Chi " -0x75d4: "Zhi " -0x75d5: "Hen " -0x75d6: "Ya " -0x75d7: "Mei " -0x75d8: "Dou " -0x75d9: "Jing " -0x75da: "Xiao " -0x75db: "Tong " -0x75dc: "Tu " -0x75dd: "Mang " -0x75de: "Pi " -0x75df: "Xiao " -0x75e0: "Suan " -0x75e1: "Pu " -0x75e2: "Li " -0x75e3: "Zhi " -0x75e4: "Cuo " -0x75e5: "Duo " -0x75e6: "Wu " -0x75e7: "Sha " -0x75e8: "Lao " -0x75e9: "Shou " -0x75ea: "Huan " -0x75eb: "Xian " -0x75ec: "Yi " -0x75ed: "Peng " -0x75ee: "Zhang " -0x75ef: "Guan " -0x75f0: "Tan " -0x75f1: "Fei " -0x75f2: "Ma " -0x75f3: "Lin " -0x75f4: "Chi " -0x75f5: "Ji " -0x75f6: "Dian " -0x75f7: "An " -0x75f8: "Chi " -0x75f9: "Bi " -0x75fa: "Bei " -0x75fb: "Min " -0x75fc: "Gu " -0x75fd: "Dui " -0x75fe: "E " -0x75ff: "Wei " -/* x076 */ -0x7600: "Yu " -0x7601: "Cui " -0x7602: "Ya " -0x7603: "Zhu " -0x7604: "Cu " -0x7605: "Dan " -0x7606: "Shen " -0x7607: "Zhung " -0x7608: "Ji " -0x7609: "Yu " -0x760a: "Hou " -0x760b: "Feng " -0x760c: "La " -0x760d: "Yang " -0x760e: "Shen " -0x760f: "Tu " -0x7610: "Yu " -0x7611: "Gua " -0x7612: "Wen " -0x7613: "Huan " -0x7614: "Ku " -0x7615: "Jia " -0x7616: "Yin " -0x7617: "Yi " -0x7618: "Lu " -0x7619: "Sao " -0x761a: "Jue " -0x761b: "Chi " -0x761c: "Xi " -0x761d: "Guan " -0x761e: "Yi " -0x761f: "Wen " -0x7620: "Ji " -0x7621: "Chuang " -0x7622: "Ban " -0x7623: "Lei " -0x7624: "Liu " -0x7625: "Chai " -0x7626: "Shou " -0x7627: "Nue " -0x7628: "Dian " -0x7629: "Da " -0x762a: "Pie " -0x762b: "Tan " -0x762c: "Zhang " -0x762d: "Biao " -0x762e: "Shen " -0x762f: "Cu " -0x7630: "Luo " -0x7631: "Yi " -0x7632: "Zong " -0x7633: "Chou " -0x7634: "Zhang " -0x7635: "Zhai " -0x7636: "Sou " -0x7637: "Suo " -0x7638: "Que " -0x7639: "Diao " -0x763a: "Lou " -0x763b: "Lu " -0x763c: "Mo " -0x763d: "Jin " -0x763e: "Yin " -0x763f: "Ying " -0x7640: "Huang " -0x7641: "Fu " -0x7642: "Liao " -0x7643: "Long " -0x7644: "Qiao " -0x7645: "Liu " -0x7646: "Lao " -0x7647: "Xian " -0x7648: "Fei " -0x7649: "Dan " -0x764a: "Yin " -0x764b: "He " -0x764c: "Yan " -0x764d: "Ban " -0x764e: "Xian " -0x764f: "Guan " -0x7650: "Guai " -0x7651: "Nong " -0x7652: "Yu " -0x7653: "Wei " -0x7654: "Yi " -0x7655: "Yong " -0x7656: "Pi " -0x7657: "Lei " -0x7658: "Li " -0x7659: "Shu " -0x765a: "Dan " -0x765b: "Lin " -0x765c: "Dian " -0x765d: "Lin " -0x765e: "Lai " -0x765f: "Pie " -0x7660: "Ji " -0x7661: "Chi " -0x7662: "Yang " -0x7663: "Xian " -0x7664: "Jie " -0x7665: "Zheng " -0x7666: "[?] " -0x7667: "Li " -0x7668: "Huo " -0x7669: "Lai " -0x766a: "Shaku " -0x766b: "Dian " -0x766c: "Xian " -0x766d: "Ying " -0x766e: "Yin " -0x766f: "Qu " -0x7670: "Yong " -0x7671: "Tan " -0x7672: "Dian " -0x7673: "Luo " -0x7674: "Luan " -0x7675: "Luan " -0x7676: "Bo " -0x7677: "[?] " -0x7678: "Gui " -0x7679: "Po " -0x767a: "Fa " -0x767b: "Deng " -0x767c: "Fa " -0x767d: "Bai " -0x767e: "Bai " -0x767f: "Qie " -0x7680: "Bi " -0x7681: "Zao " -0x7682: "Zao " -0x7683: "Mao " -0x7684: "De " -0x7685: "Pa " -0x7686: "Jie " -0x7687: "Huang " -0x7688: "Gui " -0x7689: "Ci " -0x768a: "Ling " -0x768b: "Gao " -0x768c: "Mo " -0x768d: "Ji " -0x768e: "Jiao " -0x768f: "Peng " -0x7690: "Gao " -0x7691: "Ai " -0x7692: "E " -0x7693: "Hao " -0x7694: "Han " -0x7695: "Bi " -0x7696: "Wan " -0x7697: "Chou " -0x7698: "Qian " -0x7699: "Xi " -0x769a: "Ai " -0x769b: "Jiong " -0x769c: "Hao " -0x769d: "Huang " -0x769e: "Hao " -0x769f: "Ze " -0x76a0: "Cui " -0x76a1: "Hao " -0x76a2: "Xiao " -0x76a3: "Ye " -0x76a4: "Po " -0x76a5: "Hao " -0x76a6: "Jiao " -0x76a7: "Ai " -0x76a8: "Xing " -0x76a9: "Huang " -0x76aa: "Li " -0x76ab: "Piao " -0x76ac: "He " -0x76ad: "Jiao " -0x76ae: "Pi " -0x76af: "Gan " -0x76b0: "Pao " -0x76b1: "Zhou " -0x76b2: "Jun " -0x76b3: "Qiu " -0x76b4: "Cun " -0x76b5: "Que " -0x76b6: "Zha " -0x76b7: "Gu " -0x76b8: "Jun " -0x76b9: "Jun " -0x76ba: "Zhou " -0x76bb: "Zha " -0x76bc: "Gu " -0x76bd: "Zhan " -0x76be: "Du " -0x76bf: "Min " -0x76c0: "Qi " -0x76c1: "Ying " -0x76c2: "Yu " -0x76c3: "Bei " -0x76c4: "Zhao " -0x76c5: "Zhong " -0x76c6: "Pen " -0x76c7: "He " -0x76c8: "Ying " -0x76c9: "He " -0x76ca: "Yi " -0x76cb: "Bo " -0x76cc: "Wan " -0x76cd: "He " -0x76ce: "Ang " -0x76cf: "Zhan " -0x76d0: "Yan " -0x76d1: "Jian " -0x76d2: "He " -0x76d3: "Yu " -0x76d4: "Kui " -0x76d5: "Fan " -0x76d6: "Gai " -0x76d7: "Dao " -0x76d8: "Pan " -0x76d9: "Fu " -0x76da: "Qiu " -0x76db: "Sheng " -0x76dc: "Dao " -0x76dd: "Lu " -0x76de: "Zhan " -0x76df: "Meng " -0x76e0: "Li " -0x76e1: "Jin " -0x76e2: "Xu " -0x76e3: "Jian " -0x76e4: "Pan " -0x76e5: "Guan " -0x76e6: "An " -0x76e7: "Lu " -0x76e8: "Shu " -0x76e9: "Zhou " -0x76ea: "Dang " -0x76eb: "An " -0x76ec: "Gu " -0x76ed: "Li " -0x76ee: "Mu " -0x76ef: "Cheng " -0x76f0: "Gan " -0x76f1: "Xu " -0x76f2: "Mang " -0x76f3: "Mang " -0x76f4: "Zhi " -0x76f5: "Qi " -0x76f6: "Ruan " -0x76f7: "Tian " -0x76f8: "Xiang " -0x76f9: "Dun " -0x76fa: "Xin " -0x76fb: "Xi " -0x76fc: "Pan " -0x76fd: "Feng " -0x76fe: "Dun " -0x76ff: "Min " -/* x077 */ -0x7700: "Ming " -0x7701: "Sheng " -0x7702: "Shi " -0x7703: "Yun " -0x7704: "Mian " -0x7705: "Pan " -0x7706: "Fang " -0x7707: "Miao " -0x7708: "Dan " -0x7709: "Mei " -0x770a: "Mao " -0x770b: "Kan " -0x770c: "Xian " -0x770d: "Ou " -0x770e: "Shi " -0x770f: "Yang " -0x7710: "Zheng " -0x7711: "Yao " -0x7712: "Shen " -0x7713: "Huo " -0x7714: "Da " -0x7715: "Zhen " -0x7716: "Kuang " -0x7717: "Ju " -0x7718: "Shen " -0x7719: "Chi " -0x771a: "Sheng " -0x771b: "Mei " -0x771c: "Mo " -0x771d: "Zhu " -0x771e: "Zhen " -0x771f: "Zhen " -0x7720: "Mian " -0x7721: "Di " -0x7722: "Yuan " -0x7723: "Die " -0x7724: "Yi " -0x7725: "Zi " -0x7726: "Zi " -0x7727: "Chao " -0x7728: "Zha " -0x7729: "Xuan " -0x772a: "Bing " -0x772b: "Mi " -0x772c: "Long " -0x772d: "Sui " -0x772e: "Dong " -0x772f: "Mi " -0x7730: "Die " -0x7731: "Yi " -0x7732: "Er " -0x7733: "Ming " -0x7734: "Xuan " -0x7735: "Chi " -0x7736: "Kuang " -0x7737: "Juan " -0x7738: "Mou " -0x7739: "Zhen " -0x773a: "Tiao " -0x773b: "Yang " -0x773c: "Yan " -0x773d: "Mo " -0x773e: "Zhong " -0x773f: "Mai " -0x7740: "Zhao " -0x7741: "Zheng " -0x7742: "Mei " -0x7743: "Jun " -0x7744: "Shao " -0x7745: "Han " -0x7746: "Huan " -0x7747: "Di " -0x7748: "Cheng " -0x7749: "Cuo " -0x774a: "Juan " -0x774b: "E " -0x774c: "Wan " -0x774d: "Xian " -0x774e: "Xi " -0x774f: "Kun " -0x7750: "Lai " -0x7751: "Jian " -0x7752: "Shan " -0x7753: "Tian " -0x7754: "Hun " -0x7755: "Wan " -0x7756: "Ling " -0x7757: "Shi " -0x7758: "Qiong " -0x7759: "Lie " -0x775a: "Yai " -0x775b: "Jing " -0x775c: "Zheng " -0x775d: "Li " -0x775e: "Lai " -0x775f: "Sui " -0x7760: "Juan " -0x7761: "Shui " -0x7762: "Sui " -0x7763: "Du " -0x7764: "Bi " -0x7765: "Bi " -0x7766: "Mu " -0x7767: "Hun " -0x7768: "Ni " -0x7769: "Lu " -0x776a: "Yi " -0x776b: "Jie " -0x776c: "Cai " -0x776d: "Zhou " -0x776e: "Yu " -0x776f: "Hun " -0x7770: "Ma " -0x7771: "Xia " -0x7772: "Xing " -0x7773: "Xi " -0x7774: "Gun " -0x7775: "Cai " -0x7776: "Chun " -0x7777: "Jian " -0x7778: "Mei " -0x7779: "Du " -0x777a: "Hou " -0x777b: "Xuan " -0x777c: "Ti " -0x777d: "Kui " -0x777e: "Gao " -0x777f: "Rui " -0x7780: "Mou " -0x7781: "Xu " -0x7782: "Fa " -0x7783: "Wen " -0x7784: "Miao " -0x7785: "Chou " -0x7786: "Kui " -0x7787: "Mi " -0x7788: "Weng " -0x7789: "Kou " -0x778a: "Dang " -0x778b: "Chen " -0x778c: "Ke " -0x778d: "Sou " -0x778e: "Xia " -0x778f: "Qiong " -0x7790: "Mao " -0x7791: "Ming " -0x7792: "Man " -0x7793: "Shui " -0x7794: "Ze " -0x7795: "Zhang " -0x7796: "Yi " -0x7797: "Diao " -0x7798: "Ou " -0x7799: "Mo " -0x779a: "Shun " -0x779b: "Cong " -0x779c: "Lou " -0x779d: "Chi " -0x779e: "Man " -0x779f: "Piao " -0x77a0: "Cheng " -0x77a1: "Ji " -0x77a2: "Meng " -0x77a3: "[?] " -0x77a4: "Run " -0x77a5: "Pie " -0x77a6: "Xi " -0x77a7: "Qiao " -0x77a8: "Pu " -0x77a9: "Zhu " -0x77aa: "Deng " -0x77ab: "Shen " -0x77ac: "Shun " -0x77ad: "Liao " -0x77ae: "Che " -0x77af: "Xian " -0x77b0: "Kan " -0x77b1: "Ye " -0x77b2: "Xu " -0x77b3: "Tong " -0x77b4: "Mou " -0x77b5: "Lin " -0x77b6: "Kui " -0x77b7: "Xian " -0x77b8: "Ye " -0x77b9: "Ai " -0x77ba: "Hui " -0x77bb: "Zhan " -0x77bc: "Jian " -0x77bd: "Gu " -0x77be: "Zhao " -0x77bf: "Qu " -0x77c0: "Wei " -0x77c1: "Chou " -0x77c2: "Sao " -0x77c3: "Ning " -0x77c4: "Xun " -0x77c5: "Yao " -0x77c6: "Huo " -0x77c7: "Meng " -0x77c8: "Mian " -0x77c9: "Bin " -0x77ca: "Mian " -0x77cb: "Li " -0x77cc: "Kuang " -0x77cd: "Jue " -0x77ce: "Xuan " -0x77cf: "Mian " -0x77d0: "Huo " -0x77d1: "Lu " -0x77d2: "Meng " -0x77d3: "Long " -0x77d4: "Guan " -0x77d5: "Man " -0x77d6: "Xi " -0x77d7: "Chu " -0x77d8: "Tang " -0x77d9: "Kan " -0x77da: "Zhu " -0x77db: "Mao " -0x77dc: "Jin " -0x77dd: "Lin " -0x77de: "Yu " -0x77df: "Shuo " -0x77e0: "Ce " -0x77e1: "Jue " -0x77e2: "Shi " -0x77e3: "Yi " -0x77e4: "Shen " -0x77e5: "Zhi " -0x77e6: "Hou " -0x77e7: "Shen " -0x77e8: "Ying " -0x77e9: "Ju " -0x77ea: "Zhou " -0x77eb: "Jiao " -0x77ec: "Cuo " -0x77ed: "Duan " -0x77ee: "Ai " -0x77ef: "Jiao " -0x77f0: "Zeng " -0x77f1: "Huo " -0x77f2: "Bai " -0x77f3: "Shi " -0x77f4: "Ding " -0x77f5: "Qi " -0x77f6: "Ji " -0x77f7: "Zi " -0x77f8: "Gan " -0x77f9: "Wu " -0x77fa: "Tuo " -0x77fb: "Ku " -0x77fc: "Qiang " -0x77fd: "Xi " -0x77fe: "Fan " -0x77ff: "Kuang " -/* x078 */ -0x7800: "Dang " -0x7801: "Ma " -0x7802: "Sha " -0x7803: "Dan " -0x7804: "Jue " -0x7805: "Li " -0x7806: "Fu " -0x7807: "Min " -0x7808: "Nuo " -0x7809: "Huo " -0x780a: "Kang " -0x780b: "Zhi " -0x780c: "Qi " -0x780d: "Kan " -0x780e: "Jie " -0x780f: "Fen " -0x7810: "E " -0x7811: "Ya " -0x7812: "Pi " -0x7813: "Zhe " -0x7814: "Yan " -0x7815: "Sui " -0x7816: "Zhuan " -0x7817: "Che " -0x7818: "Dun " -0x7819: "Pan " -0x781a: "Yan " -0x781b: "[?] " -0x781c: "Feng " -0x781d: "Fa " -0x781e: "Mo " -0x781f: "Zha " -0x7820: "Qu " -0x7821: "Yu " -0x7822: "Luo " -0x7823: "Tuo " -0x7824: "Tuo " -0x7825: "Di " -0x7826: "Zhai " -0x7827: "Zhen " -0x7828: "Ai " -0x7829: "Fei " -0x782a: "Mu " -0x782b: "Zhu " -0x782c: "Li " -0x782d: "Bian " -0x782e: "Nu " -0x782f: "Ping " -0x7830: "Peng " -0x7831: "Ling " -0x7832: "Pao " -0x7833: "Le " -0x7834: "Po " -0x7835: "Bo " -0x7836: "Po " -0x7837: "Shen " -0x7838: "Za " -0x7839: "Nuo " -0x783a: "Li " -0x783b: "Long " -0x783c: "Tong " -0x783d: "[?] " -0x783e: "Li " -0x783f: "Aragane " -0x7840: "Chu " -0x7841: "Keng " -0x7842: "Quan " -0x7843: "Zhu " -0x7844: "Kuang " -0x7845: "Huo " -0x7846: "E " -0x7847: "Nao " -0x7848: "Jia " -0x7849: "Lu " -0x784a: "Wei " -0x784b: "Ai " -0x784c: "Luo " -0x784d: "Ken " -0x784e: "Xing " -0x784f: "Yan " -0x7850: "Tong " -0x7851: "Peng " -0x7852: "Xi " -0x7853: "[?] " -0x7854: "Hong " -0x7855: "Shuo " -0x7856: "Xia " -0x7857: "Qiao " -0x7858: "[?] " -0x7859: "Wei " -0x785a: "Qiao " -0x785b: "[?] " -0x785c: "Keng " -0x785d: "Xiao " -0x785e: "Que " -0x785f: "Chan " -0x7860: "Lang " -0x7861: "Hong " -0x7862: "Yu " -0x7863: "Xiao " -0x7864: "Xia " -0x7865: "Mang " -0x7866: "Long " -0x7867: "Iong " -0x7868: "Che " -0x7869: "Che " -0x786a: "E " -0x786b: "Liu " -0x786c: "Ying " -0x786d: "Mang " -0x786e: "Que " -0x786f: "Yan " -0x7870: "Sha " -0x7871: "Kun " -0x7872: "Yu " -0x7873: "[?] " -0x7874: "Kaki " -0x7875: "Lu " -0x7876: "Chen " -0x7877: "Jian " -0x7878: "Nue " -0x7879: "Song " -0x787a: "Zhuo " -0x787b: "Keng " -0x787c: "Peng " -0x787d: "Yan " -0x787e: "Zhui " -0x787f: "Kong " -0x7880: "Ceng " -0x7881: "Qi " -0x7882: "Zong " -0x7883: "Qing " -0x7884: "Lin " -0x7885: "Jun " -0x7886: "Bo " -0x7887: "Ding " -0x7888: "Min " -0x7889: "Diao " -0x788a: "Jian " -0x788b: "He " -0x788c: "Lu " -0x788d: "Ai " -0x788e: "Sui " -0x788f: "Que " -0x7890: "Ling " -0x7891: "Bei " -0x7892: "Yin " -0x7893: "Dui " -0x7894: "Wu " -0x7895: "Qi " -0x7896: "Lun " -0x7897: "Wan " -0x7898: "Dian " -0x7899: "Gang " -0x789a: "Pei " -0x789b: "Qi " -0x789c: "Chen " -0x789d: "Ruan " -0x789e: "Yan " -0x789f: "Die " -0x78a0: "Ding " -0x78a1: "Du " -0x78a2: "Tuo " -0x78a3: "Jie " -0x78a4: "Ying " -0x78a5: "Bian " -0x78a6: "Ke " -0x78a7: "Bi " -0x78a8: "Wei " -0x78a9: "Shuo " -0x78aa: "Zhen " -0x78ab: "Duan " -0x78ac: "Xia " -0x78ad: "Dang " -0x78ae: "Ti " -0x78af: "Nao " -0x78b0: "Peng " -0x78b1: "Jian " -0x78b2: "Di " -0x78b3: "Tan " -0x78b4: "Cha " -0x78b5: "Seki " -0x78b6: "Qi " -0x78b7: "[?] " -0x78b8: "Feng " -0x78b9: "Xuan " -0x78ba: "Que " -0x78bb: "Que " -0x78bc: "Ma " -0x78bd: "Gong " -0x78be: "Nian " -0x78bf: "Su " -0x78c0: "E " -0x78c1: "Ci " -0x78c2: "Liu " -0x78c3: "Si " -0x78c4: "Tang " -0x78c5: "Bang " -0x78c6: "Hua " -0x78c7: "Pi " -0x78c8: "Wei " -0x78c9: "Sang " -0x78ca: "Lei " -0x78cb: "Cuo " -0x78cc: "Zhen " -0x78cd: "Xia " -0x78ce: "Qi " -0x78cf: "Lian " -0x78d0: "Pan " -0x78d1: "Wei " -0x78d2: "Yun " -0x78d3: "Dui " -0x78d4: "Zhe " -0x78d5: "Ke " -0x78d6: "La " -0x78d7: "[?] " -0x78d8: "Qing " -0x78d9: "Gun " -0x78da: "Zhuan " -0x78db: "Chan " -0x78dc: "Qi " -0x78dd: "Ao " -0x78de: "Peng " -0x78df: "Lu " -0x78e0: "Lu " -0x78e1: "Kan " -0x78e2: "Qiang " -0x78e3: "Chen " -0x78e4: "Yin " -0x78e5: "Lei " -0x78e6: "Biao " -0x78e7: "Qi " -0x78e8: "Mo " -0x78e9: "Qi " -0x78ea: "Cui " -0x78eb: "Zong " -0x78ec: "Qing " -0x78ed: "Chuo " -0x78ee: "[?] " -0x78ef: "Ji " -0x78f0: "Shan " -0x78f1: "Lao " -0x78f2: "Qu " -0x78f3: "Zeng " -0x78f4: "Deng " -0x78f5: "Jian " -0x78f6: "Xi " -0x78f7: "Lin " -0x78f8: "Ding " -0x78f9: "Dian " -0x78fa: "Huang " -0x78fb: "Pan " -0x78fc: "Za " -0x78fd: "Qiao " -0x78fe: "Di " -0x78ff: "Li " -/* x079 */ -0x7900: "Tani " -0x7901: "Jiao " -0x7902: "[?] " -0x7903: "Zhang " -0x7904: "Qiao " -0x7905: "Dun " -0x7906: "Xian " -0x7907: "Yu " -0x7908: "Zhui " -0x7909: "He " -0x790a: "Huo " -0x790b: "Zhai " -0x790c: "Lei " -0x790d: "Ke " -0x790e: "Chu " -0x790f: "Ji " -0x7910: "Que " -0x7911: "Dang " -0x7912: "Yi " -0x7913: "Jiang " -0x7914: "Pi " -0x7915: "Pi " -0x7916: "Yu " -0x7917: "Pin " -0x7918: "Qi " -0x7919: "Ai " -0x791a: "Kai " -0x791b: "Jian " -0x791c: "Yu " -0x791d: "Ruan " -0x791e: "Meng " -0x791f: "Pao " -0x7920: "Ci " -0x7921: "[?] " -0x7922: "[?] " -0x7923: "Mie " -0x7924: "Ca " -0x7925: "Xian " -0x7926: "Kuang " -0x7927: "Lei " -0x7928: "Lei " -0x7929: "Zhi " -0x792a: "Li " -0x792b: "Li " -0x792c: "Fan " -0x792d: "Que " -0x792e: "Pao " -0x792f: "Ying " -0x7930: "Li " -0x7931: "Long " -0x7932: "Long " -0x7933: "Mo " -0x7934: "Bo " -0x7935: "Shuang " -0x7936: "Guan " -0x7937: "Lan " -0x7938: "Zan " -0x7939: "Yan " -0x793a: "Shi " -0x793b: "Shi " -0x793c: "Li " -0x793d: "Reng " -0x793e: "She " -0x793f: "Yue " -0x7940: "Si " -0x7941: "Qi " -0x7942: "Ta " -0x7943: "Ma " -0x7944: "Xie " -0x7945: "Xian " -0x7946: "Xian " -0x7947: "Zhi " -0x7948: "Qi " -0x7949: "Zhi " -0x794a: "Beng " -0x794b: "Dui " -0x794c: "Zhong " -0x794d: "[?] " -0x794e: "Yi " -0x794f: "Shi " -0x7950: "You " -0x7951: "Zhi " -0x7952: "Tiao " -0x7953: "Fu " -0x7954: "Fu " -0x7955: "Mi " -0x7956: "Zu " -0x7957: "Zhi " -0x7958: "Suan " -0x7959: "Mei " -0x795a: "Zuo " -0x795b: "Qu " -0x795c: "Hu " -0x795d: "Zhu " -0x795e: "Shen " -0x795f: "Sui " -0x7960: "Ci " -0x7961: "Chai " -0x7962: "Mi " -0x7963: "Lu " -0x7964: "Yu " -0x7965: "Xiang " -0x7966: "Wu " -0x7967: "Tiao " -0x7968: "Piao " -0x7969: "Zhu " -0x796a: "Gui " -0x796b: "Xia " -0x796c: "Zhi " -0x796d: "Ji " -0x796e: "Gao " -0x796f: "Zhen " -0x7970: "Gao " -0x7971: "Shui " -0x7972: "Jin " -0x7973: "Chen " -0x7974: "Gai " -0x7975: "Kun " -0x7976: "Di " -0x7977: "Dao " -0x7978: "Huo " -0x7979: "Tao " -0x797a: "Qi " -0x797b: "Gu " -0x797c: "Guan " -0x797d: "Zui " -0x797e: "Ling " -0x797f: "Lu " -0x7980: "Bing " -0x7981: "Jin " -0x7982: "Dao " -0x7983: "Zhi " -0x7984: "Lu " -0x7985: "Shan " -0x7986: "Bei " -0x7987: "Zhe " -0x7988: "Hui " -0x7989: "You " -0x798a: "Xi " -0x798b: "Yin " -0x798c: "Zi " -0x798d: "Huo " -0x798e: "Zhen " -0x798f: "Fu " -0x7990: "Yuan " -0x7991: "Wu " -0x7992: "Xian " -0x7993: "Yang " -0x7994: "Ti " -0x7995: "Yi " -0x7996: "Mei " -0x7997: "Si " -0x7998: "Di " -0x7999: "[?] " -0x799a: "Zhuo " -0x799b: "Zhen " -0x799c: "Yong " -0x799d: "Ji " -0x799e: "Gao " -0x799f: "Tang " -0x79a0: "Si " -0x79a1: "Ma " -0x79a2: "Ta " -0x79a3: "[?] " -0x79a4: "Xuan " -0x79a5: "Qi " -0x79a6: "Yu " -0x79a7: "Xi " -0x79a8: "Ji " -0x79a9: "Si " -0x79aa: "Chan " -0x79ab: "Tan " -0x79ac: "Kuai " -0x79ad: "Sui " -0x79ae: "Li " -0x79af: "Nong " -0x79b0: "Ni " -0x79b1: "Dao " -0x79b2: "Li " -0x79b3: "Rang " -0x79b4: "Yue " -0x79b5: "Ti " -0x79b6: "Zan " -0x79b7: "Lei " -0x79b8: "Rou " -0x79b9: "Yu " -0x79ba: "Yu " -0x79bb: "Chi " -0x79bc: "Xie " -0x79bd: "Qin " -0x79be: "He " -0x79bf: "Tu " -0x79c0: "Xiu " -0x79c1: "Si " -0x79c2: "Ren " -0x79c3: "Tu " -0x79c4: "Zi " -0x79c5: "Cha " -0x79c6: "Gan " -0x79c7: "Yi " -0x79c8: "Xian " -0x79c9: "Bing " -0x79ca: "Nian " -0x79cb: "Qiu " -0x79cc: "Qiu " -0x79cd: "Chong " -0x79ce: "Fen " -0x79cf: "Hao " -0x79d0: "Yun " -0x79d1: "Ke " -0x79d2: "Miao " -0x79d3: "Zhi " -0x79d4: "Geng " -0x79d5: "Bi " -0x79d6: "Zhi " -0x79d7: "Yu " -0x79d8: "Mi " -0x79d9: "Ku " -0x79da: "Ban " -0x79db: "Pi " -0x79dc: "Ni " -0x79dd: "Li " -0x79de: "You " -0x79df: "Zu " -0x79e0: "Pi " -0x79e1: "Ba " -0x79e2: "Ling " -0x79e3: "Mo " -0x79e4: "Cheng " -0x79e5: "Nian " -0x79e6: "Qin " -0x79e7: "Yang " -0x79e8: "Zuo " -0x79e9: "Zhi " -0x79ea: "Zhi " -0x79eb: "Shu " -0x79ec: "Ju " -0x79ed: "Zi " -0x79ee: "Huo " -0x79ef: "Ji " -0x79f0: "Cheng " -0x79f1: "Tong " -0x79f2: "Zhi " -0x79f3: "Huo " -0x79f4: "He " -0x79f5: "Yin " -0x79f6: "Zi " -0x79f7: "Zhi " -0x79f8: "Jie " -0x79f9: "Ren " -0x79fa: "Du " -0x79fb: "Yi " -0x79fc: "Zhu " -0x79fd: "Hui " -0x79fe: "Nong " -0x79ff: "Fu " -/* x07a */ -0x7a00: "Xi " -0x7a01: "Kao " -0x7a02: "Lang " -0x7a03: "Fu " -0x7a04: "Ze " -0x7a05: "Shui " -0x7a06: "Lu " -0x7a07: "Kun " -0x7a08: "Gan " -0x7a09: "Geng " -0x7a0a: "Ti " -0x7a0b: "Cheng " -0x7a0c: "Tu " -0x7a0d: "Shao " -0x7a0e: "Shui " -0x7a0f: "Ya " -0x7a10: "Lun " -0x7a11: "Lu " -0x7a12: "Gu " -0x7a13: "Zuo " -0x7a14: "Ren " -0x7a15: "Zhun " -0x7a16: "Bang " -0x7a17: "Bai " -0x7a18: "Ji " -0x7a19: "Zhi " -0x7a1a: "Zhi " -0x7a1b: "Kun " -0x7a1c: "Leng " -0x7a1d: "Peng " -0x7a1e: "Ke " -0x7a1f: "Bing " -0x7a20: "Chou " -0x7a21: "Zu " -0x7a22: "Yu " -0x7a23: "Su " -0x7a24: "Lue " -0x7a25: "[?] " -0x7a26: "Yi " -0x7a27: "Xi " -0x7a28: "Bian " -0x7a29: "Ji " -0x7a2a: "Fu " -0x7a2b: "Bi " -0x7a2c: "Nuo " -0x7a2d: "Jie " -0x7a2e: "Zhong " -0x7a2f: "Zong " -0x7a30: "Xu " -0x7a31: "Cheng " -0x7a32: "Dao " -0x7a33: "Wen " -0x7a34: "Lian " -0x7a35: "Zi " -0x7a36: "Yu " -0x7a37: "Ji " -0x7a38: "Xu " -0x7a39: "Zhen " -0x7a3a: "Zhi " -0x7a3b: "Dao " -0x7a3c: "Jia " -0x7a3d: "Ji " -0x7a3e: "Gao " -0x7a3f: "Gao " -0x7a40: "Gu " -0x7a41: "Rong " -0x7a42: "Sui " -0x7a43: "You " -0x7a44: "Ji " -0x7a45: "Kang " -0x7a46: "Mu " -0x7a47: "Shan " -0x7a48: "Men " -0x7a49: "Zhi " -0x7a4a: "Ji " -0x7a4b: "Lu " -0x7a4c: "Su " -0x7a4d: "Ji " -0x7a4e: "Ying " -0x7a4f: "Wen " -0x7a50: "Qiu " -0x7a51: "Se " -0x7a52: "[?] " -0x7a53: "Yi " -0x7a54: "Huang " -0x7a55: "Qie " -0x7a56: "Ji " -0x7a57: "Sui " -0x7a58: "Xiao " -0x7a59: "Pu " -0x7a5a: "Jiao " -0x7a5b: "Zhuo " -0x7a5c: "Tong " -0x7a5d: "Sai " -0x7a5e: "Lu " -0x7a5f: "Sui " -0x7a60: "Nong " -0x7a61: "Se " -0x7a62: "Hui " -0x7a63: "Rang " -0x7a64: "Nuo " -0x7a65: "Yu " -0x7a66: "Bin " -0x7a67: "Ji " -0x7a68: "Tui " -0x7a69: "Wen " -0x7a6a: "Cheng " -0x7a6b: "Huo " -0x7a6c: "Gong " -0x7a6d: "Lu " -0x7a6e: "Biao " -0x7a6f: "[?] " -0x7a70: "Rang " -0x7a71: "Zhuo " -0x7a72: "Li " -0x7a73: "Zan " -0x7a74: "Xue " -0x7a75: "Wa " -0x7a76: "Jiu " -0x7a77: "Qiong " -0x7a78: "Xi " -0x7a79: "Qiong " -0x7a7a: "Kong " -0x7a7b: "Yu " -0x7a7c: "Sen " -0x7a7d: "Jing " -0x7a7e: "Yao " -0x7a7f: "Chuan " -0x7a80: "Zhun " -0x7a81: "Tu " -0x7a82: "Lao " -0x7a83: "Qie " -0x7a84: "Zhai " -0x7a85: "Yao " -0x7a86: "Bian " -0x7a87: "Bao " -0x7a88: "Yao " -0x7a89: "Bing " -0x7a8a: "Wa " -0x7a8b: "Zhu " -0x7a8c: "Jiao " -0x7a8d: "Qiao " -0x7a8e: "Diao " -0x7a8f: "Wu " -0x7a90: "Gui " -0x7a91: "Yao " -0x7a92: "Zhi " -0x7a93: "Chuang " -0x7a94: "Yao " -0x7a95: "Tiao " -0x7a96: "Jiao " -0x7a97: "Chuang " -0x7a98: "Jiong " -0x7a99: "Xiao " -0x7a9a: "Cheng " -0x7a9b: "Kou " -0x7a9c: "Cuan " -0x7a9d: "Wo " -0x7a9e: "Dan " -0x7a9f: "Ku " -0x7aa0: "Ke " -0x7aa1: "Zhui " -0x7aa2: "Xu " -0x7aa3: "Su " -0x7aa4: "Guan " -0x7aa5: "Kui " -0x7aa6: "Dou " -0x7aa7: "[?] " -0x7aa8: "Yin " -0x7aa9: "Wo " -0x7aaa: "Wa " -0x7aab: "Ya " -0x7aac: "Yu " -0x7aad: "Ju " -0x7aae: "Qiong " -0x7aaf: "Yao " -0x7ab0: "Yao " -0x7ab1: "Tiao " -0x7ab2: "Chao " -0x7ab3: "Yu " -0x7ab4: "Tian " -0x7ab5: "Diao " -0x7ab6: "Ju " -0x7ab7: "Liao " -0x7ab8: "Xi " -0x7ab9: "Wu " -0x7aba: "Kui " -0x7abb: "Chuang " -0x7abc: "Zhao " -0x7abd: "[?] " -0x7abe: "Kuan " -0x7abf: "Long " -0x7ac0: "Cheng " -0x7ac1: "Cui " -0x7ac2: "Piao " -0x7ac3: "Zao " -0x7ac4: "Cuan " -0x7ac5: "Qiao " -0x7ac6: "Qiong " -0x7ac7: "Dou " -0x7ac8: "Zao " -0x7ac9: "Long " -0x7aca: "Qie " -0x7acb: "Li " -0x7acc: "Chu " -0x7acd: "Shi " -0x7ace: "Fou " -0x7acf: "Qian " -0x7ad0: "Chu " -0x7ad1: "Hong " -0x7ad2: "Qi " -0x7ad3: "Qian " -0x7ad4: "Gong " -0x7ad5: "Shi " -0x7ad6: "Shu " -0x7ad7: "Miao " -0x7ad8: "Ju " -0x7ad9: "Zhan " -0x7ada: "Zhu " -0x7adb: "Ling " -0x7adc: "Long " -0x7add: "Bing " -0x7ade: "Jing " -0x7adf: "Jing " -0x7ae0: "Zhang " -0x7ae1: "Yi " -0x7ae2: "Si " -0x7ae3: "Jun " -0x7ae4: "Hong " -0x7ae5: "Tong " -0x7ae6: "Song " -0x7ae7: "Jing " -0x7ae8: "Diao " -0x7ae9: "Yi " -0x7aea: "Shu " -0x7aeb: "Jing " -0x7aec: "Qu " -0x7aed: "Jie " -0x7aee: "Ping " -0x7aef: "Duan " -0x7af0: "Shao " -0x7af1: "Zhuan " -0x7af2: "Ceng " -0x7af3: "Deng " -0x7af4: "Cui " -0x7af5: "Huai " -0x7af6: "Jing " -0x7af7: "Kan " -0x7af8: "Jing " -0x7af9: "Zhu " -0x7afa: "Zhu " -0x7afb: "Le " -0x7afc: "Peng " -0x7afd: "Yu " -0x7afe: "Chi " -0x7aff: "Gan " -/* x07b */ -0x7b00: "Mang " -0x7b01: "Zhu " -0x7b02: "Utsubo " -0x7b03: "Du " -0x7b04: "Ji " -0x7b05: "Xiao " -0x7b06: "Ba " -0x7b07: "Suan " -0x7b08: "Ji " -0x7b09: "Zhen " -0x7b0a: "Zhao " -0x7b0b: "Sun " -0x7b0c: "Ya " -0x7b0d: "Zhui " -0x7b0e: "Yuan " -0x7b0f: "Hu " -0x7b10: "Gang " -0x7b11: "Xiao " -0x7b12: "Cen " -0x7b13: "Pi " -0x7b14: "Bi " -0x7b15: "Jian " -0x7b16: "Yi " -0x7b17: "Dong " -0x7b18: "Shan " -0x7b19: "Sheng " -0x7b1a: "Xia " -0x7b1b: "Di " -0x7b1c: "Zhu " -0x7b1d: "Na " -0x7b1e: "Chi " -0x7b1f: "Gu " -0x7b20: "Li " -0x7b21: "Qie " -0x7b22: "Min " -0x7b23: "Bao " -0x7b24: "Tiao " -0x7b25: "Si " -0x7b26: "Fu " -0x7b27: "Ce " -0x7b28: "Ben " -0x7b29: "Pei " -0x7b2a: "Da " -0x7b2b: "Zi " -0x7b2c: "Di " -0x7b2d: "Ling " -0x7b2e: "Ze " -0x7b2f: "Nu " -0x7b30: "Fu " -0x7b31: "Gou " -0x7b32: "Fan " -0x7b33: "Jia " -0x7b34: "Ge " -0x7b35: "Fan " -0x7b36: "Shi " -0x7b37: "Mao " -0x7b38: "Po " -0x7b39: "Sey " -0x7b3a: "Jian " -0x7b3b: "Qiong " -0x7b3c: "Long " -0x7b3d: "Souke " -0x7b3e: "Bian " -0x7b3f: "Luo " -0x7b40: "Gui " -0x7b41: "Qu " -0x7b42: "Chi " -0x7b43: "Yin " -0x7b44: "Yao " -0x7b45: "Xian " -0x7b46: "Bi " -0x7b47: "Qiong " -0x7b48: "Gua " -0x7b49: "Deng " -0x7b4a: "Jiao " -0x7b4b: "Jin " -0x7b4c: "Quan " -0x7b4d: "Sun " -0x7b4e: "Ru " -0x7b4f: "Fa " -0x7b50: "Kuang " -0x7b51: "Zhu " -0x7b52: "Tong " -0x7b53: "Ji " -0x7b54: "Da " -0x7b55: "Xing " -0x7b56: "Ce " -0x7b57: "Zhong " -0x7b58: "Kou " -0x7b59: "Lai " -0x7b5a: "Bi " -0x7b5b: "Shai " -0x7b5c: "Dang " -0x7b5d: "Zheng " -0x7b5e: "Ce " -0x7b5f: "Fu " -0x7b60: "Yun " -0x7b61: "Tu " -0x7b62: "Pa " -0x7b63: "Li " -0x7b64: "Lang " -0x7b65: "Ju " -0x7b66: "Guan " -0x7b67: "Jian " -0x7b68: "Han " -0x7b69: "Tong " -0x7b6a: "Xia " -0x7b6b: "Zhi " -0x7b6c: "Cheng " -0x7b6d: "Suan " -0x7b6e: "Shi " -0x7b6f: "Zhu " -0x7b70: "Zuo " -0x7b71: "Xiao " -0x7b72: "Shao " -0x7b73: "Ting " -0x7b74: "Ce " -0x7b75: "Yan " -0x7b76: "Gao " -0x7b77: "Kuai " -0x7b78: "Gan " -0x7b79: "Chou " -0x7b7a: "Kago " -0x7b7b: "Gang " -0x7b7c: "Yun " -0x7b7d: "O " -0x7b7e: "Qian " -0x7b7f: "Xiao " -0x7b80: "Jian " -0x7b81: "Pu " -0x7b82: "Lai " -0x7b83: "Zou " -0x7b84: "Bi " -0x7b85: "Bi " -0x7b86: "Bi " -0x7b87: "Ge " -0x7b88: "Chi " -0x7b89: "Guai " -0x7b8a: "Yu " -0x7b8b: "Jian " -0x7b8c: "Zhao " -0x7b8d: "Gu " -0x7b8e: "Chi " -0x7b8f: "Zheng " -0x7b90: "Jing " -0x7b91: "Sha " -0x7b92: "Zhou " -0x7b93: "Lu " -0x7b94: "Bo " -0x7b95: "Ji " -0x7b96: "Lin " -0x7b97: "Suan " -0x7b98: "Jun " -0x7b99: "Fu " -0x7b9a: "Zha " -0x7b9b: "Gu " -0x7b9c: "Kong " -0x7b9d: "Qian " -0x7b9e: "Quan " -0x7b9f: "Jun " -0x7ba0: "Chui " -0x7ba1: "Guan " -0x7ba2: "Yuan " -0x7ba3: "Ce " -0x7ba4: "Ju " -0x7ba5: "Bo " -0x7ba6: "Ze " -0x7ba7: "Qie " -0x7ba8: "Tuo " -0x7ba9: "Luo " -0x7baa: "Dan " -0x7bab: "Xiao " -0x7bac: "Ruo " -0x7bad: "Jian " -0x7bae: "Xuan " -0x7baf: "Bian " -0x7bb0: "Sun " -0x7bb1: "Xiang " -0x7bb2: "Xian " -0x7bb3: "Ping " -0x7bb4: "Zhen " -0x7bb5: "Sheng " -0x7bb6: "Hu " -0x7bb7: "Shi " -0x7bb8: "Zhu " -0x7bb9: "Yue " -0x7bba: "Chun " -0x7bbb: "Lu " -0x7bbc: "Wu " -0x7bbd: "Dong " -0x7bbe: "Xiao " -0x7bbf: "Ji " -0x7bc0: "Jie " -0x7bc1: "Huang " -0x7bc2: "Xing " -0x7bc3: "Mei " -0x7bc4: "Fan " -0x7bc5: "Chui " -0x7bc6: "Zhuan " -0x7bc7: "Pian " -0x7bc8: "Feng " -0x7bc9: "Zhu " -0x7bca: "Hong " -0x7bcb: "Qie " -0x7bcc: "Hou " -0x7bcd: "Qiu " -0x7bce: "Miao " -0x7bcf: "Qian " -0x7bd0: "[?] " -0x7bd1: "Kui " -0x7bd2: "Sik " -0x7bd3: "Lou " -0x7bd4: "Yun " -0x7bd5: "He " -0x7bd6: "Tang " -0x7bd7: "Yue " -0x7bd8: "Chou " -0x7bd9: "Gao " -0x7bda: "Fei " -0x7bdb: "Ruo " -0x7bdc: "Zheng " -0x7bdd: "Gou " -0x7bde: "Nie " -0x7bdf: "Qian " -0x7be0: "Xiao " -0x7be1: "Cuan " -0x7be2: "Gong " -0x7be3: "Pang " -0x7be4: "Du " -0x7be5: "Li " -0x7be6: "Bi " -0x7be7: "Zhuo " -0x7be8: "Chu " -0x7be9: "Shai " -0x7bea: "Chi " -0x7beb: "Zhu " -0x7bec: "Qiang " -0x7bed: "Long " -0x7bee: "Lan " -0x7bef: "Jian " -0x7bf0: "Bu " -0x7bf1: "Li " -0x7bf2: "Hui " -0x7bf3: "Bi " -0x7bf4: "Di " -0x7bf5: "Cong " -0x7bf6: "Yan " -0x7bf7: "Peng " -0x7bf8: "Sen " -0x7bf9: "Zhuan " -0x7bfa: "Pai " -0x7bfb: "Piao " -0x7bfc: "Dou " -0x7bfd: "Yu " -0x7bfe: "Mie " -0x7bff: "Zhuan " -/* x07c */ -0x7c00: "Ze " -0x7c01: "Xi " -0x7c02: "Guo " -0x7c03: "Yi " -0x7c04: "Hu " -0x7c05: "Chan " -0x7c06: "Kou " -0x7c07: "Cu " -0x7c08: "Ping " -0x7c09: "Chou " -0x7c0a: "Ji " -0x7c0b: "Gui " -0x7c0c: "Su " -0x7c0d: "Lou " -0x7c0e: "Zha " -0x7c0f: "Lu " -0x7c10: "Nian " -0x7c11: "Suo " -0x7c12: "Cuan " -0x7c13: "Sasara " -0x7c14: "Suo " -0x7c15: "Le " -0x7c16: "Duan " -0x7c17: "Yana " -0x7c18: "Xiao " -0x7c19: "Bo " -0x7c1a: "Mi " -0x7c1b: "Si " -0x7c1c: "Dang " -0x7c1d: "Liao " -0x7c1e: "Dan " -0x7c1f: "Dian " -0x7c20: "Fu " -0x7c21: "Jian " -0x7c22: "Min " -0x7c23: "Kui " -0x7c24: "Dai " -0x7c25: "Qiao " -0x7c26: "Deng " -0x7c27: "Huang " -0x7c28: "Sun " -0x7c29: "Lao " -0x7c2a: "Zan " -0x7c2b: "Xiao " -0x7c2c: "Du " -0x7c2d: "Shi " -0x7c2e: "Zan " -0x7c2f: "[?] " -0x7c30: "Pai " -0x7c31: "Hata " -0x7c32: "Pai " -0x7c33: "Gan " -0x7c34: "Ju " -0x7c35: "Du " -0x7c36: "Lu " -0x7c37: "Yan " -0x7c38: "Bo " -0x7c39: "Dang " -0x7c3a: "Sai " -0x7c3b: "Ke " -0x7c3c: "Long " -0x7c3d: "Qian " -0x7c3e: "Lian " -0x7c3f: "Bo " -0x7c40: "Zhou " -0x7c41: "Lai " -0x7c42: "[?] " -0x7c43: "Lan " -0x7c44: "Kui " -0x7c45: "Yu " -0x7c46: "Yue " -0x7c47: "Hao " -0x7c48: "Zhen " -0x7c49: "Tai " -0x7c4a: "Ti " -0x7c4b: "Mi " -0x7c4c: "Chou " -0x7c4d: "Ji " -0x7c4e: "[?] " -0x7c4f: "Hata " -0x7c50: "Teng " -0x7c51: "Zhuan " -0x7c52: "Zhou " -0x7c53: "Fan " -0x7c54: "Sou " -0x7c55: "Zhou " -0x7c56: "Kuji " -0x7c57: "Zhuo " -0x7c58: "Teng " -0x7c59: "Lu " -0x7c5a: "Lu " -0x7c5b: "Jian " -0x7c5c: "Tuo " -0x7c5d: "Ying " -0x7c5e: "Yu " -0x7c5f: "Lai " -0x7c60: "Long " -0x7c61: "Shinshi " -0x7c62: "Lian " -0x7c63: "Lan " -0x7c64: "Qian " -0x7c65: "Yue " -0x7c66: "Zhong " -0x7c67: "Qu " -0x7c68: "Lian " -0x7c69: "Bian " -0x7c6a: "Duan " -0x7c6b: "Zuan " -0x7c6c: "Li " -0x7c6d: "Si " -0x7c6e: "Luo " -0x7c6f: "Ying " -0x7c70: "Yue " -0x7c71: "Zhuo " -0x7c72: "Xu " -0x7c73: "Mi " -0x7c74: "Di " -0x7c75: "Fan " -0x7c76: "Shen " -0x7c77: "Zhe " -0x7c78: "Shen " -0x7c79: "Nu " -0x7c7a: "Xie " -0x7c7b: "Lei " -0x7c7c: "Xian " -0x7c7d: "Zi " -0x7c7e: "Ni " -0x7c7f: "Cun " -0x7c80: "[?] " -0x7c81: "Qian " -0x7c82: "Kume " -0x7c83: "Bi " -0x7c84: "Ban " -0x7c85: "Wu " -0x7c86: "Sha " -0x7c87: "Kang " -0x7c88: "Rou " -0x7c89: "Fen " -0x7c8a: "Bi " -0x7c8b: "Cui " -0x7c8c: "[?] " -0x7c8d: "Li " -0x7c8e: "Chi " -0x7c8f: "Nukamiso " -0x7c90: "Ro " -0x7c91: "Ba " -0x7c92: "Li " -0x7c93: "Gan " -0x7c94: "Ju " -0x7c95: "Po " -0x7c96: "Mo " -0x7c97: "Cu " -0x7c98: "Nian " -0x7c99: "Zhou " -0x7c9a: "Li " -0x7c9b: "Su " -0x7c9c: "Tiao " -0x7c9d: "Li " -0x7c9e: "Qi " -0x7c9f: "Su " -0x7ca0: "Hong " -0x7ca1: "Tong " -0x7ca2: "Zi " -0x7ca3: "Ce " -0x7ca4: "Yue " -0x7ca5: "Zhou " -0x7ca6: "Lin " -0x7ca7: "Zhuang " -0x7ca8: "Bai " -0x7ca9: "[?] " -0x7caa: "Fen " -0x7cab: "Ji " -0x7cac: "[?] " -0x7cad: "Sukumo " -0x7cae: "Liang " -0x7caf: "Xian " -0x7cb0: "Fu " -0x7cb1: "Liang " -0x7cb2: "Can " -0x7cb3: "Geng " -0x7cb4: "Li " -0x7cb5: "Yue " -0x7cb6: "Lu " -0x7cb7: "Ju " -0x7cb8: "Qi " -0x7cb9: "Cui " -0x7cba: "Bai " -0x7cbb: "Zhang " -0x7cbc: "Lin " -0x7cbd: "Zong " -0x7cbe: "Jing " -0x7cbf: "Guo " -0x7cc0: "Kouji " -0x7cc1: "San " -0x7cc2: "San " -0x7cc3: "Tang " -0x7cc4: "Bian " -0x7cc5: "Rou " -0x7cc6: "Mian " -0x7cc7: "Hou " -0x7cc8: "Xu " -0x7cc9: "Zong " -0x7cca: "Hu " -0x7ccb: "Jian " -0x7ccc: "Zan " -0x7ccd: "Ci " -0x7cce: "Li " -0x7ccf: "Xie " -0x7cd0: "Fu " -0x7cd1: "Ni " -0x7cd2: "Bei " -0x7cd3: "Gu " -0x7cd4: "Xiu " -0x7cd5: "Gao " -0x7cd6: "Tang " -0x7cd7: "Qiu " -0x7cd8: "Sukumo " -0x7cd9: "Cao " -0x7cda: "Zhuang " -0x7cdb: "Tang " -0x7cdc: "Mi " -0x7cdd: "San " -0x7cde: "Fen " -0x7cdf: "Zao " -0x7ce0: "Kang " -0x7ce1: "Jiang " -0x7ce2: "Mo " -0x7ce3: "San " -0x7ce4: "San " -0x7ce5: "Nuo " -0x7ce6: "Xi " -0x7ce7: "Liang " -0x7ce8: "Jiang " -0x7ce9: "Kuai " -0x7cea: "Bo " -0x7ceb: "Huan " -0x7cec: "[?] " -0x7ced: "Zong " -0x7cee: "Xian " -0x7cef: "Nuo " -0x7cf0: "Tuan " -0x7cf1: "Nie " -0x7cf2: "Li " -0x7cf3: "Zuo " -0x7cf4: "Di " -0x7cf5: "Nie " -0x7cf6: "Tiao " -0x7cf7: "Lan " -0x7cf8: "Mi " -0x7cf9: "Jiao " -0x7cfa: "Jiu " -0x7cfb: "Xi " -0x7cfc: "Gong " -0x7cfd: "Zheng " -0x7cfe: "Jiu " -0x7cff: "You " -/* x07d */ -0x7d00: "Ji " -0x7d01: "Cha " -0x7d02: "Zhou " -0x7d03: "Xun " -0x7d04: "Yue " -0x7d05: "Hong " -0x7d06: "Yu " -0x7d07: "He " -0x7d08: "Wan " -0x7d09: "Ren " -0x7d0a: "Wen " -0x7d0b: "Wen " -0x7d0c: "Qiu " -0x7d0d: "Na " -0x7d0e: "Zi " -0x7d0f: "Tou " -0x7d10: "Niu " -0x7d11: "Fou " -0x7d12: "Jie " -0x7d13: "Shu " -0x7d14: "Chun " -0x7d15: "Pi " -0x7d16: "Yin " -0x7d17: "Sha " -0x7d18: "Hong " -0x7d19: "Zhi " -0x7d1a: "Ji " -0x7d1b: "Fen " -0x7d1c: "Yun " -0x7d1d: "Ren " -0x7d1e: "Dan " -0x7d1f: "Jin " -0x7d20: "Su " -0x7d21: "Fang " -0x7d22: "Suo " -0x7d23: "Cui " -0x7d24: "Jiu " -0x7d25: "Zha " -0x7d26: "Kinu " -0x7d27: "Jin " -0x7d28: "Fu " -0x7d29: "Zhi " -0x7d2a: "Ci " -0x7d2b: "Zi " -0x7d2c: "Chou " -0x7d2d: "Hong " -0x7d2e: "Zha " -0x7d2f: "Lei " -0x7d30: "Xi " -0x7d31: "Fu " -0x7d32: "Xie " -0x7d33: "Shen " -0x7d34: "Bei " -0x7d35: "Zhu " -0x7d36: "Qu " -0x7d37: "Ling " -0x7d38: "Zhu " -0x7d39: "Shao " -0x7d3a: "Gan " -0x7d3b: "Yang " -0x7d3c: "Fu " -0x7d3d: "Tuo " -0x7d3e: "Zhen " -0x7d3f: "Dai " -0x7d40: "Zhuo " -0x7d41: "Shi " -0x7d42: "Zhong " -0x7d43: "Xian " -0x7d44: "Zu " -0x7d45: "Jiong " -0x7d46: "Ban " -0x7d47: "Ju " -0x7d48: "Mo " -0x7d49: "Shu " -0x7d4a: "Zui " -0x7d4b: "Wata " -0x7d4c: "Jing " -0x7d4d: "Ren " -0x7d4e: "Heng " -0x7d4f: "Xie " -0x7d50: "Jie " -0x7d51: "Zhu " -0x7d52: "Chou " -0x7d53: "Gua " -0x7d54: "Bai " -0x7d55: "Jue " -0x7d56: "Kuang " -0x7d57: "Hu " -0x7d58: "Ci " -0x7d59: "Geng " -0x7d5a: "Geng " -0x7d5b: "Tao " -0x7d5c: "Xie " -0x7d5d: "Ku " -0x7d5e: "Jiao " -0x7d5f: "Quan " -0x7d60: "Gai " -0x7d61: "Luo " -0x7d62: "Xuan " -0x7d63: "Bing " -0x7d64: "Xian " -0x7d65: "Fu " -0x7d66: "Gei " -0x7d67: "Tong " -0x7d68: "Rong " -0x7d69: "Tiao " -0x7d6a: "Yin " -0x7d6b: "Lei " -0x7d6c: "Xie " -0x7d6d: "Quan " -0x7d6e: "Xu " -0x7d6f: "Lun " -0x7d70: "Die " -0x7d71: "Tong " -0x7d72: "Si " -0x7d73: "Jiang " -0x7d74: "Xiang " -0x7d75: "Hui " -0x7d76: "Jue " -0x7d77: "Zhi " -0x7d78: "Jian " -0x7d79: "Juan " -0x7d7a: "Chi " -0x7d7b: "Mian " -0x7d7c: "Zhen " -0x7d7d: "Lu " -0x7d7e: "Cheng " -0x7d7f: "Qiu " -0x7d80: "Shu " -0x7d81: "Bang " -0x7d82: "Tong " -0x7d83: "Xiao " -0x7d84: "Wan " -0x7d85: "Qin " -0x7d86: "Geng " -0x7d87: "Xiu " -0x7d88: "Ti " -0x7d89: "Xiu " -0x7d8a: "Xie " -0x7d8b: "Hong " -0x7d8c: "Xi " -0x7d8d: "Fu " -0x7d8e: "Ting " -0x7d8f: "Sui " -0x7d90: "Dui " -0x7d91: "Kun " -0x7d92: "Fu " -0x7d93: "Jing " -0x7d94: "Hu " -0x7d95: "Zhi " -0x7d96: "Yan " -0x7d97: "Jiong " -0x7d98: "Feng " -0x7d99: "Ji " -0x7d9a: "Sok " -0x7d9b: "Kase " -0x7d9c: "Zong " -0x7d9d: "Lin " -0x7d9e: "Duo " -0x7d9f: "Li " -0x7da0: "Lu " -0x7da1: "Liang " -0x7da2: "Chou " -0x7da3: "Quan " -0x7da4: "Shao " -0x7da5: "Qi " -0x7da6: "Qi " -0x7da7: "Zhun " -0x7da8: "Qi " -0x7da9: "Wan " -0x7daa: "Qian " -0x7dab: "Xian " -0x7dac: "Shou " -0x7dad: "Wei " -0x7dae: "Qi " -0x7daf: "Tao " -0x7db0: "Wan " -0x7db1: "Gang " -0x7db2: "Wang " -0x7db3: "Beng " -0x7db4: "Zhui " -0x7db5: "Cai " -0x7db6: "Guo " -0x7db7: "Cui " -0x7db8: "Lun " -0x7db9: "Liu " -0x7dba: "Qi " -0x7dbb: "Zhan " -0x7dbc: "Bei " -0x7dbd: "Chuo " -0x7dbe: "Ling " -0x7dbf: "Mian " -0x7dc0: "Qi " -0x7dc1: "Qie " -0x7dc2: "Tan " -0x7dc3: "Zong " -0x7dc4: "Gun " -0x7dc5: "Zou " -0x7dc6: "Yi " -0x7dc7: "Zi " -0x7dc8: "Xing " -0x7dc9: "Liang " -0x7dca: "Jin " -0x7dcb: "Fei " -0x7dcc: "Rui " -0x7dcd: "Min " -0x7dce: "Yu " -0x7dcf: "Zong " -0x7dd0: "Fan " -0x7dd1: "Lu " -0x7dd2: "Xu " -0x7dd3: "Yingl " -0x7dd4: "Zhang " -0x7dd5: "Kasuri " -0x7dd6: "Xu " -0x7dd7: "Xiang " -0x7dd8: "Jian " -0x7dd9: "Ke " -0x7dda: "Xian " -0x7ddb: "Ruan " -0x7ddc: "Mian " -0x7ddd: "Qi " -0x7dde: "Duan " -0x7ddf: "Zhong " -0x7de0: "Di " -0x7de1: "Min " -0x7de2: "Miao " -0x7de3: "Yuan " -0x7de4: "Xie " -0x7de5: "Bao " -0x7de6: "Si " -0x7de7: "Qiu " -0x7de8: "Bian " -0x7de9: "Huan " -0x7dea: "Geng " -0x7deb: "Cong " -0x7dec: "Mian " -0x7ded: "Wei " -0x7dee: "Fu " -0x7def: "Wei " -0x7df0: "Yu " -0x7df1: "Gou " -0x7df2: "Miao " -0x7df3: "Xie " -0x7df4: "Lian " -0x7df5: "Zong " -0x7df6: "Bian " -0x7df7: "Yun " -0x7df8: "Yin " -0x7df9: "Ti " -0x7dfa: "Gua " -0x7dfb: "Zhi " -0x7dfc: "Yun " -0x7dfd: "Cheng " -0x7dfe: "Chan " -0x7dff: "Dai " -/* x07e */ -0x7e00: "Xia " -0x7e01: "Yuan " -0x7e02: "Zong " -0x7e03: "Xu " -0x7e04: "Nawa " -0x7e05: "Odoshi " -0x7e06: "Geng " -0x7e07: "Sen " -0x7e08: "Ying " -0x7e09: "Jin " -0x7e0a: "Yi " -0x7e0b: "Zhui " -0x7e0c: "Ni " -0x7e0d: "Bang " -0x7e0e: "Gu " -0x7e0f: "Pan " -0x7e10: "Zhou " -0x7e11: "Jian " -0x7e12: "Cuo " -0x7e13: "Quan " -0x7e14: "Shuang " -0x7e15: "Yun " -0x7e16: "Xia " -0x7e17: "Shuai " -0x7e18: "Xi " -0x7e19: "Rong " -0x7e1a: "Tao " -0x7e1b: "Fu " -0x7e1c: "Yun " -0x7e1d: "Zhen " -0x7e1e: "Gao " -0x7e1f: "Ru " -0x7e20: "Hu " -0x7e21: "Zai " -0x7e22: "Teng " -0x7e23: "Xian " -0x7e24: "Su " -0x7e25: "Zhen " -0x7e26: "Zong " -0x7e27: "Tao " -0x7e28: "Horo " -0x7e29: "Cai " -0x7e2a: "Bi " -0x7e2b: "Feng " -0x7e2c: "Cu " -0x7e2d: "Li " -0x7e2e: "Suo " -0x7e2f: "Yin " -0x7e30: "Xi " -0x7e31: "Zong " -0x7e32: "Lei " -0x7e33: "Zhuan " -0x7e34: "Qian " -0x7e35: "Man " -0x7e36: "Zhi " -0x7e37: "Lu " -0x7e38: "Mo " -0x7e39: "Piao " -0x7e3a: "Lian " -0x7e3b: "Mi " -0x7e3c: "Xuan " -0x7e3d: "Zong " -0x7e3e: "Ji " -0x7e3f: "Shan " -0x7e40: "Sui " -0x7e41: "Fan " -0x7e42: "Shuai " -0x7e43: "Beng " -0x7e44: "Yi " -0x7e45: "Sao " -0x7e46: "Mou " -0x7e47: "Zhou " -0x7e48: "Qiang " -0x7e49: "Hun " -0x7e4a: "Sem " -0x7e4b: "Xi " -0x7e4c: "Jung " -0x7e4d: "Xiu " -0x7e4e: "Ran " -0x7e4f: "Xuan " -0x7e50: "Hui " -0x7e51: "Qiao " -0x7e52: "Zeng " -0x7e53: "Zuo " -0x7e54: "Zhi " -0x7e55: "Shan " -0x7e56: "San " -0x7e57: "Lin " -0x7e58: "Yu " -0x7e59: "Fan " -0x7e5a: "Liao " -0x7e5b: "Chuo " -0x7e5c: "Zun " -0x7e5d: "Jian " -0x7e5e: "Rao " -0x7e5f: "Chan " -0x7e60: "Rui " -0x7e61: "Xiu " -0x7e62: "Hui " -0x7e63: "Hua " -0x7e64: "Zuan " -0x7e65: "Xi " -0x7e66: "Qiang " -0x7e67: "Un " -0x7e68: "Da " -0x7e69: "Sheng " -0x7e6a: "Hui " -0x7e6b: "Xi " -0x7e6c: "Se " -0x7e6d: "Jian " -0x7e6e: "Jiang " -0x7e6f: "Huan " -0x7e70: "Zao " -0x7e71: "Cong " -0x7e72: "Jie " -0x7e73: "Jiao " -0x7e74: "Bo " -0x7e75: "Chan " -0x7e76: "Yi " -0x7e77: "Nao " -0x7e78: "Sui " -0x7e79: "Yi " -0x7e7a: "Shai " -0x7e7b: "Xu " -0x7e7c: "Ji " -0x7e7d: "Bin " -0x7e7e: "Qian " -0x7e7f: "Lan " -0x7e80: "Pu " -0x7e81: "Xun " -0x7e82: "Zuan " -0x7e83: "Qi " -0x7e84: "Peng " -0x7e85: "Li " -0x7e86: "Mo " -0x7e87: "Lei " -0x7e88: "Xie " -0x7e89: "Zuan " -0x7e8a: "Kuang " -0x7e8b: "You " -0x7e8c: "Xu " -0x7e8d: "Lei " -0x7e8e: "Xian " -0x7e8f: "Chan " -0x7e90: "Kou " -0x7e91: "Lu " -0x7e92: "Chan " -0x7e93: "Ying " -0x7e94: "Cai " -0x7e95: "Xiang " -0x7e96: "Xian " -0x7e97: "Zui " -0x7e98: "Zuan " -0x7e99: "Luo " -0x7e9a: "Xi " -0x7e9b: "Dao " -0x7e9c: "Lan " -0x7e9d: "Lei " -0x7e9e: "Lian " -0x7e9f: "Si " -0x7ea0: "Jiu " -0x7ea1: "Yu " -0x7ea2: "Hong " -0x7ea3: "Zhou " -0x7ea4: "Xian " -0x7ea5: "He " -0x7ea6: "Yue " -0x7ea7: "Ji " -0x7ea8: "Wan " -0x7ea9: "Kuang " -0x7eaa: "Ji " -0x7eab: "Ren " -0x7eac: "Wei " -0x7ead: "Yun " -0x7eae: "Hong " -0x7eaf: "Chun " -0x7eb0: "Pi " -0x7eb1: "Sha " -0x7eb2: "Gang " -0x7eb3: "Na " -0x7eb4: "Ren " -0x7eb5: "Zong " -0x7eb6: "Lun " -0x7eb7: "Fen " -0x7eb8: "Zhi " -0x7eb9: "Wen " -0x7eba: "Fang " -0x7ebb: "Zhu " -0x7ebc: "Yin " -0x7ebd: "Niu " -0x7ebe: "Shu " -0x7ebf: "Xian " -0x7ec0: "Gan " -0x7ec1: "Xie " -0x7ec2: "Fu " -0x7ec3: "Lian " -0x7ec4: "Zu " -0x7ec5: "Shen " -0x7ec6: "Xi " -0x7ec7: "Zhi " -0x7ec8: "Zhong " -0x7ec9: "Zhou " -0x7eca: "Ban " -0x7ecb: "Fu " -0x7ecc: "Zhuo " -0x7ecd: "Shao " -0x7ece: "Yi " -0x7ecf: "Jing " -0x7ed0: "Dai " -0x7ed1: "Bang " -0x7ed2: "Rong " -0x7ed3: "Jie " -0x7ed4: "Ku " -0x7ed5: "Rao " -0x7ed6: "Die " -0x7ed7: "Heng " -0x7ed8: "Hui " -0x7ed9: "Gei " -0x7eda: "Xuan " -0x7edb: "Jiang " -0x7edc: "Luo " -0x7edd: "Jue " -0x7ede: "Jiao " -0x7edf: "Tong " -0x7ee0: "Geng " -0x7ee1: "Xiao " -0x7ee2: "Juan " -0x7ee3: "Xiu " -0x7ee4: "Xi " -0x7ee5: "Sui " -0x7ee6: "Tao " -0x7ee7: "Ji " -0x7ee8: "Ti " -0x7ee9: "Ji " -0x7eea: "Xu " -0x7eeb: "Ling " -0x7eec: "[?] " -0x7eed: "Xu " -0x7eee: "Qi " -0x7eef: "Fei " -0x7ef0: "Chuo " -0x7ef1: "Zhang " -0x7ef2: "Gun " -0x7ef3: "Sheng " -0x7ef4: "Wei " -0x7ef5: "Mian " -0x7ef6: "Shou " -0x7ef7: "Beng " -0x7ef8: "Chou " -0x7ef9: "Tao " -0x7efa: "Liu " -0x7efb: "Quan " -0x7efc: "Zong " -0x7efd: "Zhan " -0x7efe: "Wan " -0x7eff: "Lu " -/* x07f */ -0x7f00: "Zhui " -0x7f01: "Zi " -0x7f02: "Ke " -0x7f03: "Xiang " -0x7f04: "Jian " -0x7f05: "Mian " -0x7f06: "Lan " -0x7f07: "Ti " -0x7f08: "Miao " -0x7f09: "Qi " -0x7f0a: "Yun " -0x7f0b: "Hui " -0x7f0c: "Si " -0x7f0d: "Duo " -0x7f0e: "Duan " -0x7f0f: "Bian " -0x7f10: "Xian " -0x7f11: "Gou " -0x7f12: "Zhui " -0x7f13: "Huan " -0x7f14: "Di " -0x7f15: "Lu " -0x7f16: "Bian " -0x7f17: "Min " -0x7f18: "Yuan " -0x7f19: "Jin " -0x7f1a: "Fu " -0x7f1b: "Ru " -0x7f1c: "Zhen " -0x7f1d: "Feng " -0x7f1e: "Shuai " -0x7f1f: "Gao " -0x7f20: "Chan " -0x7f21: "Li " -0x7f22: "Yi " -0x7f23: "Jian " -0x7f24: "Bin " -0x7f25: "Piao " -0x7f26: "Man " -0x7f27: "Lei " -0x7f28: "Ying " -0x7f29: "Suo " -0x7f2a: "Mou " -0x7f2b: "Sao " -0x7f2c: "Xie " -0x7f2d: "Liao " -0x7f2e: "Shan " -0x7f2f: "Zeng " -0x7f30: "Jiang " -0x7f31: "Qian " -0x7f32: "Zao " -0x7f33: "Huan " -0x7f34: "Jiao " -0x7f35: "Zuan " -0x7f36: "Fou " -0x7f37: "Xie " -0x7f38: "Gang " -0x7f39: "Fou " -0x7f3a: "Que " -0x7f3b: "Fou " -0x7f3c: "Kaakeru " -0x7f3d: "Bo " -0x7f3e: "Ping " -0x7f3f: "Hou " -0x7f40: "[?] " -0x7f41: "Gang " -0x7f42: "Ying " -0x7f43: "Ying " -0x7f44: "Qing " -0x7f45: "Xia " -0x7f46: "Guan " -0x7f47: "Zun " -0x7f48: "Tan " -0x7f49: "Chang " -0x7f4a: "Qi " -0x7f4b: "Weng " -0x7f4c: "Ying " -0x7f4d: "Lei " -0x7f4e: "Tan " -0x7f4f: "Lu " -0x7f50: "Guan " -0x7f51: "Wang " -0x7f52: "Wang " -0x7f53: "Gang " -0x7f54: "Wang " -0x7f55: "Han " -0x7f56: "[?] " -0x7f57: "Luo " -0x7f58: "Fu " -0x7f59: "Mi " -0x7f5a: "Fa " -0x7f5b: "Gu " -0x7f5c: "Zhu " -0x7f5d: "Ju " -0x7f5e: "Mao " -0x7f5f: "Gu " -0x7f60: "Min " -0x7f61: "Gang " -0x7f62: "Ba " -0x7f63: "Gua " -0x7f64: "Ti " -0x7f65: "Juan " -0x7f66: "Fu " -0x7f67: "Lin " -0x7f68: "Yan " -0x7f69: "Zhao " -0x7f6a: "Zui " -0x7f6b: "Gua " -0x7f6c: "Zhuo " -0x7f6d: "Yu " -0x7f6e: "Zhi " -0x7f6f: "An " -0x7f70: "Fa " -0x7f71: "Nan " -0x7f72: "Shu " -0x7f73: "Si " -0x7f74: "Pi " -0x7f75: "Ma " -0x7f76: "Liu " -0x7f77: "Ba " -0x7f78: "Fa " -0x7f79: "Li " -0x7f7a: "Chao " -0x7f7b: "Wei " -0x7f7c: "Bi " -0x7f7d: "Ji " -0x7f7e: "Zeng " -0x7f7f: "Tong " -0x7f80: "Liu " -0x7f81: "Ji " -0x7f82: "Juan " -0x7f83: "Mi " -0x7f84: "Zhao " -0x7f85: "Luo " -0x7f86: "Pi " -0x7f87: "Ji " -0x7f88: "Ji " -0x7f89: "Luan " -0x7f8a: "Yang " -0x7f8b: "Mie " -0x7f8c: "Qiang " -0x7f8d: "Ta " -0x7f8e: "Mei " -0x7f8f: "Yang " -0x7f90: "You " -0x7f91: "You " -0x7f92: "Fen " -0x7f93: "Ba " -0x7f94: "Gao " -0x7f95: "Yang " -0x7f96: "Gu " -0x7f97: "Qiang " -0x7f98: "Zang " -0x7f99: "Gao " -0x7f9a: "Ling " -0x7f9b: "Yi " -0x7f9c: "Zhu " -0x7f9d: "Di " -0x7f9e: "Xiu " -0x7f9f: "Qian " -0x7fa0: "Yi " -0x7fa1: "Xian " -0x7fa2: "Rong " -0x7fa3: "Qun " -0x7fa4: "Qun " -0x7fa5: "Qian " -0x7fa6: "Huan " -0x7fa7: "Zui " -0x7fa8: "Xian " -0x7fa9: "Yi " -0x7faa: "Yashinau " -0x7fab: "Qiang " -0x7fac: "Xian " -0x7fad: "Yu " -0x7fae: "Geng " -0x7faf: "Jie " -0x7fb0: "Tang " -0x7fb1: "Yuan " -0x7fb2: "Xi " -0x7fb3: "Fan " -0x7fb4: "Shan " -0x7fb5: "Fen " -0x7fb6: "Shan " -0x7fb7: "Lian " -0x7fb8: "Lei " -0x7fb9: "Geng " -0x7fba: "Nou " -0x7fbb: "Qiang " -0x7fbc: "Chan " -0x7fbd: "Yu " -0x7fbe: "Gong " -0x7fbf: "Yi " -0x7fc0: "Chong " -0x7fc1: "Weng " -0x7fc2: "Fen " -0x7fc3: "Hong " -0x7fc4: "Chi " -0x7fc5: "Chi " -0x7fc6: "Cui " -0x7fc7: "Fu " -0x7fc8: "Xia " -0x7fc9: "Pen " -0x7fca: "Yi " -0x7fcb: "La " -0x7fcc: "Yi " -0x7fcd: "Pi " -0x7fce: "Ling " -0x7fcf: "Liu " -0x7fd0: "Zhi " -0x7fd1: "Qu " -0x7fd2: "Xi " -0x7fd3: "Xie " -0x7fd4: "Xiang " -0x7fd5: "Xi " -0x7fd6: "Xi " -0x7fd7: "Qi " -0x7fd8: "Qiao " -0x7fd9: "Hui " -0x7fda: "Hui " -0x7fdb: "Xiao " -0x7fdc: "Se " -0x7fdd: "Hong " -0x7fde: "Jiang " -0x7fdf: "Di " -0x7fe0: "Cui " -0x7fe1: "Fei " -0x7fe2: "Tao " -0x7fe3: "Sha " -0x7fe4: "Chi " -0x7fe5: "Zhu " -0x7fe6: "Jian " -0x7fe7: "Xuan " -0x7fe8: "Shi " -0x7fe9: "Pian " -0x7fea: "Zong " -0x7feb: "Wan " -0x7fec: "Hui " -0x7fed: "Hou " -0x7fee: "He " -0x7fef: "He " -0x7ff0: "Han " -0x7ff1: "Ao " -0x7ff2: "Piao " -0x7ff3: "Yi " -0x7ff4: "Lian " -0x7ff5: "Qu " -0x7ff6: "[?] " -0x7ff7: "Lin " -0x7ff8: "Pen " -0x7ff9: "Qiao " -0x7ffa: "Ao " -0x7ffb: "Fan " -0x7ffc: "Yi " -0x7ffd: "Hui " -0x7ffe: "Xuan " -0x7fff: "Dao " -/* x080 */ -0x8000: "Yao " -0x8001: "Lao " -0x8002: "[?] " -0x8003: "Kao " -0x8004: "Mao " -0x8005: "Zhe " -0x8006: "Qi " -0x8007: "Gou " -0x8008: "Gou " -0x8009: "Gou " -0x800a: "Die " -0x800b: "Die " -0x800c: "Er " -0x800d: "Shua " -0x800e: "Ruan " -0x800f: "Er " -0x8010: "Nai " -0x8011: "Zhuan " -0x8012: "Lei " -0x8013: "Ting " -0x8014: "Zi " -0x8015: "Geng " -0x8016: "Chao " -0x8017: "Hao " -0x8018: "Yun " -0x8019: "Pa " -0x801a: "Pi " -0x801b: "Chi " -0x801c: "Si " -0x801d: "Chu " -0x801e: "Jia " -0x801f: "Ju " -0x8020: "He " -0x8021: "Chu " -0x8022: "Lao " -0x8023: "Lun " -0x8024: "Ji " -0x8025: "Tang " -0x8026: "Ou " -0x8027: "Lou " -0x8028: "Nou " -0x8029: "Gou " -0x802a: "Pang " -0x802b: "Ze " -0x802c: "Lou " -0x802d: "Ji " -0x802e: "Lao " -0x802f: "Huo " -0x8030: "You " -0x8031: "Mo " -0x8032: "Huai " -0x8033: "Er " -0x8034: "Zhe " -0x8035: "Ting " -0x8036: "Ye " -0x8037: "Da " -0x8038: "Song " -0x8039: "Qin " -0x803a: "Yun " -0x803b: "Chi " -0x803c: "Dan " -0x803d: "Dan " -0x803e: "Hong " -0x803f: "Geng " -0x8040: "Zhi " -0x8041: "[?] " -0x8042: "Nie " -0x8043: "Dan " -0x8044: "Zhen " -0x8045: "Che " -0x8046: "Ling " -0x8047: "Zheng " -0x8048: "You " -0x8049: "Wa " -0x804a: "Liao " -0x804b: "Long " -0x804c: "Zhi " -0x804d: "Ning " -0x804e: "Tiao " -0x804f: "Er " -0x8050: "Ya " -0x8051: "Die " -0x8052: "Gua " -0x8053: "[?] " -0x8054: "Lian " -0x8055: "Hao " -0x8056: "Sheng " -0x8057: "Lie " -0x8058: "Pin " -0x8059: "Jing " -0x805a: "Ju " -0x805b: "Bi " -0x805c: "Di " -0x805d: "Guo " -0x805e: "Wen " -0x805f: "Xu " -0x8060: "Ping " -0x8061: "Cong " -0x8062: "Shikato " -0x8063: "[?] " -0x8064: "Ting " -0x8065: "Yu " -0x8066: "Cong " -0x8067: "Kui " -0x8068: "Tsuraneru " -0x8069: "Kui " -0x806a: "Cong " -0x806b: "Lian " -0x806c: "Weng " -0x806d: "Kui " -0x806e: "Lian " -0x806f: "Lian " -0x8070: "Cong " -0x8071: "Ao " -0x8072: "Sheng " -0x8073: "Song " -0x8074: "Ting " -0x8075: "Kui " -0x8076: "Nie " -0x8077: "Zhi " -0x8078: "Dan " -0x8079: "Ning " -0x807a: "Qie " -0x807b: "Ji " -0x807c: "Ting " -0x807d: "Ting " -0x807e: "Long " -0x807f: "Yu " -0x8080: "Yu " -0x8081: "Zhao " -0x8082: "Si " -0x8083: "Su " -0x8084: "Yi " -0x8085: "Su " -0x8086: "Si " -0x8087: "Zhao " -0x8088: "Zhao " -0x8089: "Rou " -0x808a: "Yi " -0x808b: "Le " -0x808c: "Ji " -0x808d: "Qiu " -0x808e: "Ken " -0x808f: "Cao " -0x8090: "Ge " -0x8091: "Di " -0x8092: "Huan " -0x8093: "Huang " -0x8094: "Yi " -0x8095: "Ren " -0x8096: "Xiao " -0x8097: "Ru " -0x8098: "Zhou " -0x8099: "Yuan " -0x809a: "Du " -0x809b: "Gang " -0x809c: "Rong " -0x809d: "Gan " -0x809e: "Cha " -0x809f: "Wo " -0x80a0: "Chang " -0x80a1: "Gu " -0x80a2: "Zhi " -0x80a3: "Han " -0x80a4: "Fu " -0x80a5: "Fei " -0x80a6: "Fen " -0x80a7: "Pei " -0x80a8: "Pang " -0x80a9: "Jian " -0x80aa: "Fang " -0x80ab: "Zhun " -0x80ac: "You " -0x80ad: "Na " -0x80ae: "Hang " -0x80af: "Ken " -0x80b0: "Ran " -0x80b1: "Gong " -0x80b2: "Yu " -0x80b3: "Wen " -0x80b4: "Yao " -0x80b5: "Jin " -0x80b6: "Pi " -0x80b7: "Qian " -0x80b8: "Xi " -0x80b9: "Xi " -0x80ba: "Fei " -0x80bb: "Ken " -0x80bc: "Jing " -0x80bd: "Tai " -0x80be: "Shen " -0x80bf: "Zhong " -0x80c0: "Zhang " -0x80c1: "Xie " -0x80c2: "Shen " -0x80c3: "Wei " -0x80c4: "Zhou " -0x80c5: "Die " -0x80c6: "Dan " -0x80c7: "Fei " -0x80c8: "Ba " -0x80c9: "Bo " -0x80ca: "Qu " -0x80cb: "Tian " -0x80cc: "Bei " -0x80cd: "Gua " -0x80ce: "Tai " -0x80cf: "Zi " -0x80d0: "Ku " -0x80d1: "Zhi " -0x80d2: "Ni " -0x80d3: "Ping " -0x80d4: "Zi " -0x80d5: "Fu " -0x80d6: "Pang " -0x80d7: "Zhen " -0x80d8: "Xian " -0x80d9: "Zuo " -0x80da: "Pei " -0x80db: "Jia " -0x80dc: "Sheng " -0x80dd: "Zhi " -0x80de: "Bao " -0x80df: "Mu " -0x80e0: "Qu " -0x80e1: "Hu " -0x80e2: "Ke " -0x80e3: "Yi " -0x80e4: "Yin " -0x80e5: "Xu " -0x80e6: "Yang " -0x80e7: "Long " -0x80e8: "Dong " -0x80e9: "Ka " -0x80ea: "Lu " -0x80eb: "Jing " -0x80ec: "Nu " -0x80ed: "Yan " -0x80ee: "Pang " -0x80ef: "Kua " -0x80f0: "Yi " -0x80f1: "Guang " -0x80f2: "Gai " -0x80f3: "Ge " -0x80f4: "Dong " -0x80f5: "Zhi " -0x80f6: "Xiao " -0x80f7: "Xiong " -0x80f8: "Xiong " -0x80f9: "Er " -0x80fa: "E " -0x80fb: "Xing " -0x80fc: "Pian " -0x80fd: "Neng " -0x80fe: "Zi " -0x80ff: "Gui " -/* x081 */ -0x8100: "Cheng " -0x8101: "Tiao " -0x8102: "Zhi " -0x8103: "Cui " -0x8104: "Mei " -0x8105: "Xie " -0x8106: "Cui " -0x8107: "Xie " -0x8108: "Mo " -0x8109: "Mai " -0x810a: "Ji " -0x810b: "Obiyaakasu " -0x810c: "[?] " -0x810d: "Kuai " -0x810e: "Sa " -0x810f: "Zang " -0x8110: "Qi " -0x8111: "Nao " -0x8112: "Mi " -0x8113: "Nong " -0x8114: "Luan " -0x8115: "Wan " -0x8116: "Bo " -0x8117: "Wen " -0x8118: "Guan " -0x8119: "Qiu " -0x811a: "Jiao " -0x811b: "Jing " -0x811c: "Rou " -0x811d: "Heng " -0x811e: "Cuo " -0x811f: "Lie " -0x8120: "Shan " -0x8121: "Ting " -0x8122: "Mei " -0x8123: "Chun " -0x8124: "Shen " -0x8125: "Xie " -0x8126: "De " -0x8127: "Zui " -0x8128: "Cu " -0x8129: "Xiu " -0x812a: "Xin " -0x812b: "Tuo " -0x812c: "Pao " -0x812d: "Cheng " -0x812e: "Nei " -0x812f: "Fu " -0x8130: "Dou " -0x8131: "Tuo " -0x8132: "Niao " -0x8133: "Noy " -0x8134: "Pi " -0x8135: "Gu " -0x8136: "Gua " -0x8137: "Li " -0x8138: "Lian " -0x8139: "Zhang " -0x813a: "Cui " -0x813b: "Jie " -0x813c: "Liang " -0x813d: "Zhou " -0x813e: "Pi " -0x813f: "Biao " -0x8140: "Lun " -0x8141: "Pian " -0x8142: "Guo " -0x8143: "Kui " -0x8144: "Chui " -0x8145: "Dan " -0x8146: "Tian " -0x8147: "Nei " -0x8148: "Jing " -0x8149: "Jie " -0x814a: "La " -0x814b: "Yi " -0x814c: "An " -0x814d: "Ren " -0x814e: "Shen " -0x814f: "Chuo " -0x8150: "Fu " -0x8151: "Fu " -0x8152: "Ju " -0x8153: "Fei " -0x8154: "Qiang " -0x8155: "Wan " -0x8156: "Dong " -0x8157: "Pi " -0x8158: "Guo " -0x8159: "Zong " -0x815a: "Ding " -0x815b: "Wu " -0x815c: "Mei " -0x815d: "Ruan " -0x815e: "Zhuan " -0x815f: "Zhi " -0x8160: "Cou " -0x8161: "Gua " -0x8162: "Ou " -0x8163: "Di " -0x8164: "An " -0x8165: "Xing " -0x8166: "Nao " -0x8167: "Yu " -0x8168: "Chuan " -0x8169: "Nan " -0x816a: "Yun " -0x816b: "Zhong " -0x816c: "Rou " -0x816d: "E " -0x816e: "Sai " -0x816f: "Tu " -0x8170: "Yao " -0x8171: "Jian " -0x8172: "Wei " -0x8173: "Jiao " -0x8174: "Yu " -0x8175: "Jia " -0x8176: "Duan " -0x8177: "Bi " -0x8178: "Chang " -0x8179: "Fu " -0x817a: "Xian " -0x817b: "Ni " -0x817c: "Mian " -0x817d: "Wa " -0x817e: "Teng " -0x817f: "Tui " -0x8180: "Bang " -0x8181: "Qian " -0x8182: "Lu " -0x8183: "Wa " -0x8184: "Sou " -0x8185: "Tang " -0x8186: "Su " -0x8187: "Zhui " -0x8188: "Ge " -0x8189: "Yi " -0x818a: "Bo " -0x818b: "Liao " -0x818c: "Ji " -0x818d: "Pi " -0x818e: "Xie " -0x818f: "Gao " -0x8190: "Lu " -0x8191: "Bin " -0x8192: "Ou " -0x8193: "Chang " -0x8194: "Lu " -0x8195: "Guo " -0x8196: "Pang " -0x8197: "Chuai " -0x8198: "Piao " -0x8199: "Jiang " -0x819a: "Fu " -0x819b: "Tang " -0x819c: "Mo " -0x819d: "Xi " -0x819e: "Zhuan " -0x819f: "Lu " -0x81a0: "Jiao " -0x81a1: "Ying " -0x81a2: "Lu " -0x81a3: "Zhi " -0x81a4: "Tara " -0x81a5: "Chun " -0x81a6: "Lian " -0x81a7: "Tong " -0x81a8: "Peng " -0x81a9: "Ni " -0x81aa: "Zha " -0x81ab: "Liao " -0x81ac: "Cui " -0x81ad: "Gui " -0x81ae: "Xiao " -0x81af: "Teng " -0x81b0: "Fan " -0x81b1: "Zhi " -0x81b2: "Jiao " -0x81b3: "Shan " -0x81b4: "Wu " -0x81b5: "Cui " -0x81b6: "Run " -0x81b7: "Xiang " -0x81b8: "Sui " -0x81b9: "Fen " -0x81ba: "Ying " -0x81bb: "Tan " -0x81bc: "Zhua " -0x81bd: "Dan " -0x81be: "Kuai " -0x81bf: "Nong " -0x81c0: "Tun " -0x81c1: "Lian " -0x81c2: "Bi " -0x81c3: "Yong " -0x81c4: "Jue " -0x81c5: "Chu " -0x81c6: "Yi " -0x81c7: "Juan " -0x81c8: "La " -0x81c9: "Lian " -0x81ca: "Sao " -0x81cb: "Tun " -0x81cc: "Gu " -0x81cd: "Qi " -0x81ce: "Cui " -0x81cf: "Bin " -0x81d0: "Xun " -0x81d1: "Ru " -0x81d2: "Huo " -0x81d3: "Zang " -0x81d4: "Xian " -0x81d5: "Biao " -0x81d6: "Xing " -0x81d7: "Kuan " -0x81d8: "La " -0x81d9: "Yan " -0x81da: "Lu " -0x81db: "Huo " -0x81dc: "Zang " -0x81dd: "Luo " -0x81de: "Qu " -0x81df: "Zang " -0x81e0: "Luan " -0x81e1: "Ni " -0x81e2: "Zang " -0x81e3: "Chen " -0x81e4: "Qian " -0x81e5: "Wo " -0x81e6: "Guang " -0x81e7: "Zang " -0x81e8: "Lin " -0x81e9: "Guang " -0x81ea: "Zi " -0x81eb: "Jiao " -0x81ec: "Nie " -0x81ed: "Chou " -0x81ee: "Ji " -0x81ef: "Gao " -0x81f0: "Chou " -0x81f1: "Mian " -0x81f2: "Nie " -0x81f3: "Zhi " -0x81f4: "Zhi " -0x81f5: "Ge " -0x81f6: "Jian " -0x81f7: "Die " -0x81f8: "Zhi " -0x81f9: "Xiu " -0x81fa: "Tai " -0x81fb: "Zhen " -0x81fc: "Jiu " -0x81fd: "Xian " -0x81fe: "Yu " -0x81ff: "Cha " -/* x082 */ -0x8200: "Yao " -0x8201: "Yu " -0x8202: "Chong " -0x8203: "Xi " -0x8204: "Xi " -0x8205: "Jiu " -0x8206: "Yu " -0x8207: "Yu " -0x8208: "Xing " -0x8209: "Ju " -0x820a: "Jiu " -0x820b: "Xin " -0x820c: "She " -0x820d: "She " -0x820e: "Yadoru " -0x820f: "Jiu " -0x8210: "Shi " -0x8211: "Tan " -0x8212: "Shu " -0x8213: "Shi " -0x8214: "Tian " -0x8215: "Dan " -0x8216: "Pu " -0x8217: "Pu " -0x8218: "Guan " -0x8219: "Hua " -0x821a: "Tan " -0x821b: "Chuan " -0x821c: "Shun " -0x821d: "Xia " -0x821e: "Wu " -0x821f: "Zhou " -0x8220: "Dao " -0x8221: "Gang " -0x8222: "Shan " -0x8223: "Yi " -0x8224: "[?] " -0x8225: "Pa " -0x8226: "Tai " -0x8227: "Fan " -0x8228: "Ban " -0x8229: "Chuan " -0x822a: "Hang " -0x822b: "Fang " -0x822c: "Ban " -0x822d: "Que " -0x822e: "Hesaki " -0x822f: "Zhong " -0x8230: "Jian " -0x8231: "Cang " -0x8232: "Ling " -0x8233: "Zhu " -0x8234: "Ze " -0x8235: "Duo " -0x8236: "Bo " -0x8237: "Xian " -0x8238: "Ge " -0x8239: "Chuan " -0x823a: "Jia " -0x823b: "Lu " -0x823c: "Hong " -0x823d: "Pang " -0x823e: "Xi " -0x823f: "[?] " -0x8240: "Fu " -0x8241: "Zao " -0x8242: "Feng " -0x8243: "Li " -0x8244: "Shao " -0x8245: "Yu " -0x8246: "Lang " -0x8247: "Ting " -0x8248: "[?] " -0x8249: "Wei " -0x824a: "Bo " -0x824b: "Meng " -0x824c: "Nian " -0x824d: "Ju " -0x824e: "Huang " -0x824f: "Shou " -0x8250: "Zong " -0x8251: "Bian " -0x8252: "Mao " -0x8253: "Die " -0x8254: "[?] " -0x8255: "Bang " -0x8256: "Cha " -0x8257: "Yi " -0x8258: "Sao " -0x8259: "Cang " -0x825a: "Cao " -0x825b: "Lou " -0x825c: "Dai " -0x825d: "Sori " -0x825e: "Yao " -0x825f: "Tong " -0x8260: "Yofune " -0x8261: "Dang " -0x8262: "Tan " -0x8263: "Lu " -0x8264: "Yi " -0x8265: "Jie " -0x8266: "Jian " -0x8267: "Huo " -0x8268: "Meng " -0x8269: "Qi " -0x826a: "Lu " -0x826b: "Lu " -0x826c: "Chan " -0x826d: "Shuang " -0x826e: "Gen " -0x826f: "Liang " -0x8270: "Jian " -0x8271: "Jian " -0x8272: "Se " -0x8273: "Yan " -0x8274: "Fu " -0x8275: "Ping " -0x8276: "Yan " -0x8277: "Yan " -0x8278: "Cao " -0x8279: "Cao " -0x827a: "Yi " -0x827b: "Le " -0x827c: "Ting " -0x827d: "Qiu " -0x827e: "Ai " -0x827f: "Nai " -0x8280: "Tiao " -0x8281: "Jiao " -0x8282: "Jie " -0x8283: "Peng " -0x8284: "Wan " -0x8285: "Yi " -0x8286: "Chai " -0x8287: "Mian " -0x8288: "Mie " -0x8289: "Gan " -0x828a: "Qian " -0x828b: "Yu " -0x828c: "Yu " -0x828d: "Shuo " -0x828e: "Qiong " -0x828f: "Tu " -0x8290: "Xia " -0x8291: "Qi " -0x8292: "Mang " -0x8293: "Zi " -0x8294: "Hui " -0x8295: "Sui " -0x8296: "Zhi " -0x8297: "Xiang " -0x8298: "Bi " -0x8299: "Fu " -0x829a: "Tun " -0x829b: "Wei " -0x829c: "Wu " -0x829d: "Zhi " -0x829e: "Qi " -0x829f: "Shan " -0x82a0: "Wen " -0x82a1: "Qian " -0x82a2: "Ren " -0x82a3: "Fou " -0x82a4: "Kou " -0x82a5: "Jie " -0x82a6: "Lu " -0x82a7: "Xu " -0x82a8: "Ji " -0x82a9: "Qin " -0x82aa: "Qi " -0x82ab: "Yuan " -0x82ac: "Fen " -0x82ad: "Ba " -0x82ae: "Rui " -0x82af: "Xin " -0x82b0: "Ji " -0x82b1: "Hua " -0x82b2: "Hua " -0x82b3: "Fang " -0x82b4: "Wu " -0x82b5: "Jue " -0x82b6: "Gou " -0x82b7: "Zhi " -0x82b8: "Yun " -0x82b9: "Qin " -0x82ba: "Ao " -0x82bb: "Chu " -0x82bc: "Mao " -0x82bd: "Ya " -0x82be: "Fei " -0x82bf: "Reng " -0x82c0: "Hang " -0x82c1: "Cong " -0x82c2: "Yin " -0x82c3: "You " -0x82c4: "Bian " -0x82c5: "Yi " -0x82c6: "Susa " -0x82c7: "Wei " -0x82c8: "Li " -0x82c9: "Pi " -0x82ca: "E " -0x82cb: "Xian " -0x82cc: "Chang " -0x82cd: "Cang " -0x82ce: "Meng " -0x82cf: "Su " -0x82d0: "Yi " -0x82d1: "Yuan " -0x82d2: "Ran " -0x82d3: "Ling " -0x82d4: "Tai " -0x82d5: "Tiao " -0x82d6: "Di " -0x82d7: "Miao " -0x82d8: "Qiong " -0x82d9: "Li " -0x82da: "Yong " -0x82db: "Ke " -0x82dc: "Mu " -0x82dd: "Pei " -0x82de: "Bao " -0x82df: "Gou " -0x82e0: "Min " -0x82e1: "Yi " -0x82e2: "Yi " -0x82e3: "Ju " -0x82e4: "Pi " -0x82e5: "Ruo " -0x82e6: "Ku " -0x82e7: "Zhu " -0x82e8: "Ni " -0x82e9: "Bo " -0x82ea: "Bing " -0x82eb: "Shan " -0x82ec: "Qiu " -0x82ed: "Yao " -0x82ee: "Xian " -0x82ef: "Ben " -0x82f0: "Hong " -0x82f1: "Ying " -0x82f2: "Zha " -0x82f3: "Dong " -0x82f4: "Ju " -0x82f5: "Die " -0x82f6: "Nie " -0x82f7: "Gan " -0x82f8: "Hu " -0x82f9: "Ping " -0x82fa: "Mei " -0x82fb: "Fu " -0x82fc: "Sheng " -0x82fd: "Gu " -0x82fe: "Bi " -0x82ff: "Wei " -/* x083 */ -0x8300: "Fu " -0x8301: "Zhuo " -0x8302: "Mao " -0x8303: "Fan " -0x8304: "Qie " -0x8305: "Mao " -0x8306: "Mao " -0x8307: "Ba " -0x8308: "Zi " -0x8309: "Mo " -0x830a: "Zi " -0x830b: "Di " -0x830c: "Chi " -0x830d: "Ji " -0x830e: "Jing " -0x830f: "Long " -0x8310: "[?] " -0x8311: "Niao " -0x8312: "[?] " -0x8313: "Xue " -0x8314: "Ying " -0x8315: "Qiong " -0x8316: "Ge " -0x8317: "Ming " -0x8318: "Li " -0x8319: "Rong " -0x831a: "Yin " -0x831b: "Gen " -0x831c: "Qian " -0x831d: "Chai " -0x831e: "Chen " -0x831f: "Yu " -0x8320: "Xiu " -0x8321: "Zi " -0x8322: "Lie " -0x8323: "Wu " -0x8324: "Ji " -0x8325: "Kui " -0x8326: "Ce " -0x8327: "Chong " -0x8328: "Ci " -0x8329: "Gou " -0x832a: "Guang " -0x832b: "Mang " -0x832c: "Chi " -0x832d: "Jiao " -0x832e: "Jiao " -0x832f: "Fu " -0x8330: "Yu " -0x8331: "Zhu " -0x8332: "Zi " -0x8333: "Jiang " -0x8334: "Hui " -0x8335: "Yin " -0x8336: "Cha " -0x8337: "Fa " -0x8338: "Rong " -0x8339: "Ru " -0x833a: "Chong " -0x833b: "Mang " -0x833c: "Tong " -0x833d: "Zhong " -0x833e: "[?] " -0x833f: "Zhu " -0x8340: "Xun " -0x8341: "Huan " -0x8342: "Kua " -0x8343: "Quan " -0x8344: "Gai " -0x8345: "Da " -0x8346: "Jing " -0x8347: "Xing " -0x8348: "Quan " -0x8349: "Cao " -0x834a: "Jing " -0x834b: "Er " -0x834c: "An " -0x834d: "Shou " -0x834e: "Chi " -0x834f: "Ren " -0x8350: "Jian " -0x8351: "Ti " -0x8352: "Huang " -0x8353: "Ping " -0x8354: "Li " -0x8355: "Jin " -0x8356: "Lao " -0x8357: "Shu " -0x8358: "Zhuang " -0x8359: "Da " -0x835a: "Jia " -0x835b: "Rao " -0x835c: "Bi " -0x835d: "Ze " -0x835e: "Qiao " -0x835f: "Hui " -0x8360: "Qi " -0x8361: "Dang " -0x8362: "[?] " -0x8363: "Rong " -0x8364: "Hun " -0x8365: "Ying " -0x8366: "Luo " -0x8367: "Ying " -0x8368: "Xun " -0x8369: "Jin " -0x836a: "Sun " -0x836b: "Yin " -0x836c: "Mai " -0x836d: "Hong " -0x836e: "Zhou " -0x836f: "Yao " -0x8370: "Du " -0x8371: "Wei " -0x8372: "Chu " -0x8373: "Dou " -0x8374: "Fu " -0x8375: "Ren " -0x8376: "Yin " -0x8377: "He " -0x8378: "Bi " -0x8379: "Bu " -0x837a: "Yun " -0x837b: "Di " -0x837c: "Tu " -0x837d: "Sui " -0x837e: "Sui " -0x837f: "Cheng " -0x8380: "Chen " -0x8381: "Wu " -0x8382: "Bie " -0x8383: "Xi " -0x8384: "Geng " -0x8385: "Li " -0x8386: "Fu " -0x8387: "Zhu " -0x8388: "Mo " -0x8389: "Li " -0x838a: "Zhuang " -0x838b: "Ji " -0x838c: "Duo " -0x838d: "Qiu " -0x838e: "Sha " -0x838f: "Suo " -0x8390: "Chen " -0x8391: "Feng " -0x8392: "Ju " -0x8393: "Mei " -0x8394: "Meng " -0x8395: "Xing " -0x8396: "Jing " -0x8397: "Che " -0x8398: "Xin " -0x8399: "Jun " -0x839a: "Yan " -0x839b: "Ting " -0x839c: "Diao " -0x839d: "Cuo " -0x839e: "Wan " -0x839f: "Han " -0x83a0: "You " -0x83a1: "Cuo " -0x83a2: "Jia " -0x83a3: "Wang " -0x83a4: "You " -0x83a5: "Niu " -0x83a6: "Shao " -0x83a7: "Xian " -0x83a8: "Lang " -0x83a9: "Fu " -0x83aa: "E " -0x83ab: "Mo " -0x83ac: "Wen " -0x83ad: "Jie " -0x83ae: "Nan " -0x83af: "Mu " -0x83b0: "Kan " -0x83b1: "Lai " -0x83b2: "Lian " -0x83b3: "Shi " -0x83b4: "Wo " -0x83b5: "Usagi " -0x83b6: "Lian " -0x83b7: "Huo " -0x83b8: "You " -0x83b9: "Ying " -0x83ba: "Ying " -0x83bb: "Nuc " -0x83bc: "Chun " -0x83bd: "Mang " -0x83be: "Mang " -0x83bf: "Ci " -0x83c0: "Wan " -0x83c1: "Jing " -0x83c2: "Di " -0x83c3: "Qu " -0x83c4: "Dong " -0x83c5: "Jian " -0x83c6: "Zou " -0x83c7: "Gu " -0x83c8: "La " -0x83c9: "Lu " -0x83ca: "Ju " -0x83cb: "Wei " -0x83cc: "Jun " -0x83cd: "Nie " -0x83ce: "Kun " -0x83cf: "He " -0x83d0: "Pu " -0x83d1: "Zi " -0x83d2: "Gao " -0x83d3: "Guo " -0x83d4: "Fu " -0x83d5: "Lun " -0x83d6: "Chang " -0x83d7: "Chou " -0x83d8: "Song " -0x83d9: "Chui " -0x83da: "Zhan " -0x83db: "Men " -0x83dc: "Cai " -0x83dd: "Ba " -0x83de: "Li " -0x83df: "Tu " -0x83e0: "Bo " -0x83e1: "Han " -0x83e2: "Bao " -0x83e3: "Qin " -0x83e4: "Juan " -0x83e5: "Xi " -0x83e6: "Qin " -0x83e7: "Di " -0x83e8: "Jie " -0x83e9: "Pu " -0x83ea: "Dang " -0x83eb: "Jin " -0x83ec: "Zhao " -0x83ed: "Tai " -0x83ee: "Geng " -0x83ef: "Hua " -0x83f0: "Gu " -0x83f1: "Ling " -0x83f2: "Fei " -0x83f3: "Jin " -0x83f4: "An " -0x83f5: "Wang " -0x83f6: "Beng " -0x83f7: "Zhou " -0x83f8: "Yan " -0x83f9: "Ju " -0x83fa: "Jian " -0x83fb: "Lin " -0x83fc: "Tan " -0x83fd: "Shu " -0x83fe: "Tian " -0x83ff: "Dao " -/* x084 */ -0x8400: "Hu " -0x8401: "Qi " -0x8402: "He " -0x8403: "Cui " -0x8404: "Tao " -0x8405: "Chun " -0x8406: "Bei " -0x8407: "Chang " -0x8408: "Huan " -0x8409: "Fei " -0x840a: "Lai " -0x840b: "Qi " -0x840c: "Meng " -0x840d: "Ping " -0x840e: "Wei " -0x840f: "Dan " -0x8410: "Sha " -0x8411: "Huan " -0x8412: "Yan " -0x8413: "Yi " -0x8414: "Tiao " -0x8415: "Qi " -0x8416: "Wan " -0x8417: "Ce " -0x8418: "Nai " -0x8419: "Kutabireru " -0x841a: "Tuo " -0x841b: "Jiu " -0x841c: "Tie " -0x841d: "Luo " -0x841e: "[?] " -0x841f: "[?] " -0x8420: "Meng " -0x8421: "[?] " -0x8422: "Yaji " -0x8423: "[?] " -0x8424: "Ying " -0x8425: "Ying " -0x8426: "Ying " -0x8427: "Xiao " -0x8428: "Sa " -0x8429: "Qiu " -0x842a: "Ke " -0x842b: "Xiang " -0x842c: "Wan " -0x842d: "Yu " -0x842e: "Yu " -0x842f: "Fu " -0x8430: "Lian " -0x8431: "Xuan " -0x8432: "Yuan " -0x8433: "Nan " -0x8434: "Ze " -0x8435: "Wo " -0x8436: "Chun " -0x8437: "Xiao " -0x8438: "Yu " -0x8439: "Pian " -0x843a: "Mao " -0x843b: "An " -0x843c: "E " -0x843d: "Luo " -0x843e: "Ying " -0x843f: "Huo " -0x8440: "Gua " -0x8441: "Jiang " -0x8442: "Mian " -0x8443: "Zuo " -0x8444: "Zuo " -0x8445: "Ju " -0x8446: "Bao " -0x8447: "Rou " -0x8448: "Xi " -0x8449: "Xie " -0x844a: "An " -0x844b: "Qu " -0x844c: "Jian " -0x844d: "Fu " -0x844e: "Lu " -0x844f: "Jing " -0x8450: "Pen " -0x8451: "Feng " -0x8452: "Hong " -0x8453: "Hong " -0x8454: "Hou " -0x8455: "Yan " -0x8456: "Tu " -0x8457: "Zhu " -0x8458: "Zi " -0x8459: "Xiang " -0x845a: "Shen " -0x845b: "Ge " -0x845c: "Jie " -0x845d: "Jing " -0x845e: "Mi " -0x845f: "Huang " -0x8460: "Shen " -0x8461: "Pu " -0x8462: "Gai " -0x8463: "Dong " -0x8464: "Zhou " -0x8465: "Qian " -0x8466: "Wei " -0x8467: "Bo " -0x8468: "Wei " -0x8469: "Pa " -0x846a: "Ji " -0x846b: "Hu " -0x846c: "Zang " -0x846d: "Jia " -0x846e: "Duan " -0x846f: "Yao " -0x8470: "Jun " -0x8471: "Cong " -0x8472: "Quan " -0x8473: "Wei " -0x8474: "Xian " -0x8475: "Kui " -0x8476: "Ting " -0x8477: "Hun " -0x8478: "Xi " -0x8479: "Shi " -0x847a: "Qi " -0x847b: "Lan " -0x847c: "Zong " -0x847d: "Yao " -0x847e: "Yuan " -0x847f: "Mei " -0x8480: "Yun " -0x8481: "Shu " -0x8482: "Di " -0x8483: "Zhuan " -0x8484: "Guan " -0x8485: "Sukumo " -0x8486: "Xue " -0x8487: "Chan " -0x8488: "Kai " -0x8489: "Kui " -0x848a: "[?] " -0x848b: "Jiang " -0x848c: "Lou " -0x848d: "Wei " -0x848e: "Pai " -0x848f: "[?] " -0x8490: "Sou " -0x8491: "Yin " -0x8492: "Shi " -0x8493: "Chun " -0x8494: "Shi " -0x8495: "Yun " -0x8496: "Zhen " -0x8497: "Lang " -0x8498: "Nu " -0x8499: "Meng " -0x849a: "He " -0x849b: "Que " -0x849c: "Suan " -0x849d: "Yuan " -0x849e: "Li " -0x849f: "Ju " -0x84a0: "Xi " -0x84a1: "Pang " -0x84a2: "Chu " -0x84a3: "Xu " -0x84a4: "Tu " -0x84a5: "Liu " -0x84a6: "Wo " -0x84a7: "Zhen " -0x84a8: "Qian " -0x84a9: "Zu " -0x84aa: "Po " -0x84ab: "Cuo " -0x84ac: "Yuan " -0x84ad: "Chu " -0x84ae: "Yu " -0x84af: "Kuai " -0x84b0: "Pan " -0x84b1: "Pu " -0x84b2: "Pu " -0x84b3: "Na " -0x84b4: "Shuo " -0x84b5: "Xi " -0x84b6: "Fen " -0x84b7: "Yun " -0x84b8: "Zheng " -0x84b9: "Jian " -0x84ba: "Ji " -0x84bb: "Ruo " -0x84bc: "Cang " -0x84bd: "En " -0x84be: "Mi " -0x84bf: "Hao " -0x84c0: "Sun " -0x84c1: "Zhen " -0x84c2: "Ming " -0x84c3: "Sou " -0x84c4: "Xu " -0x84c5: "Liu " -0x84c6: "Xi " -0x84c7: "Gu " -0x84c8: "Lang " -0x84c9: "Rong " -0x84ca: "Weng " -0x84cb: "Gai " -0x84cc: "Cuo " -0x84cd: "Shi " -0x84ce: "Tang " -0x84cf: "Luo " -0x84d0: "Ru " -0x84d1: "Suo " -0x84d2: "Xian " -0x84d3: "Bei " -0x84d4: "Yao " -0x84d5: "Gui " -0x84d6: "Bi " -0x84d7: "Zong " -0x84d8: "Gun " -0x84d9: "Za " -0x84da: "Xiu " -0x84db: "Ce " -0x84dc: "Hai " -0x84dd: "Lan " -0x84de: "[?] " -0x84df: "Ji " -0x84e0: "Li " -0x84e1: "Can " -0x84e2: "Lang " -0x84e3: "Yu " -0x84e4: "[?] " -0x84e5: "Ying " -0x84e6: "Mo " -0x84e7: "Diao " -0x84e8: "Tiao " -0x84e9: "Mao " -0x84ea: "Tong " -0x84eb: "Zhu " -0x84ec: "Peng " -0x84ed: "An " -0x84ee: "Lian " -0x84ef: "Cong " -0x84f0: "Xi " -0x84f1: "Ping " -0x84f2: "Qiu " -0x84f3: "Jin " -0x84f4: "Chun " -0x84f5: "Jie " -0x84f6: "Wei " -0x84f7: "Tui " -0x84f8: "Cao " -0x84f9: "Yu " -0x84fa: "Yi " -0x84fb: "Ji " -0x84fc: "Liao " -0x84fd: "Bi " -0x84fe: "Lu " -0x84ff: "Su " -/* x085 */ -0x8500: "Bu " -0x8501: "Zhang " -0x8502: "Luo " -0x8503: "Jiang " -0x8504: "Man " -0x8505: "Yan " -0x8506: "Ling " -0x8507: "Ji " -0x8508: "Piao " -0x8509: "Gun " -0x850a: "Han " -0x850b: "Di " -0x850c: "Su " -0x850d: "Lu " -0x850e: "She " -0x850f: "Shang " -0x8510: "Di " -0x8511: "Mie " -0x8512: "Xun " -0x8513: "Man " -0x8514: "Bo " -0x8515: "Di " -0x8516: "Cuo " -0x8517: "Zhe " -0x8518: "Sen " -0x8519: "Xuan " -0x851a: "Wei " -0x851b: "Hu " -0x851c: "Ao " -0x851d: "Mi " -0x851e: "Lou " -0x851f: "Cu " -0x8520: "Zhong " -0x8521: "Cai " -0x8522: "Po " -0x8523: "Jiang " -0x8524: "Mi " -0x8525: "Cong " -0x8526: "Niao " -0x8527: "Hui " -0x8528: "Jun " -0x8529: "Yin " -0x852a: "Jian " -0x852b: "Yan " -0x852c: "Shu " -0x852d: "Yin " -0x852e: "Kui " -0x852f: "Chen " -0x8530: "Hu " -0x8531: "Sha " -0x8532: "Kou " -0x8533: "Qian " -0x8534: "Ma " -0x8535: "Zang " -0x8536: "Sonoko " -0x8537: "Qiang " -0x8538: "Dou " -0x8539: "Lian " -0x853a: "Lin " -0x853b: "Kou " -0x853c: "Ai " -0x853d: "Bi " -0x853e: "Li " -0x853f: "Wei " -0x8540: "Ji " -0x8541: "Xun " -0x8542: "Sheng " -0x8543: "Fan " -0x8544: "Meng " -0x8545: "Ou " -0x8546: "Chan " -0x8547: "Dian " -0x8548: "Xun " -0x8549: "Jiao " -0x854a: "Rui " -0x854b: "Rui " -0x854c: "Lei " -0x854d: "Yu " -0x854e: "Qiao " -0x854f: "Chu " -0x8550: "Hua " -0x8551: "Jian " -0x8552: "Mai " -0x8553: "Yun " -0x8554: "Bao " -0x8555: "You " -0x8556: "Qu " -0x8557: "Lu " -0x8558: "Rao " -0x8559: "Hui " -0x855a: "E " -0x855b: "Teng " -0x855c: "Fei " -0x855d: "Jue " -0x855e: "Zui " -0x855f: "Fa " -0x8560: "Ru " -0x8561: "Fen " -0x8562: "Kui " -0x8563: "Shun " -0x8564: "Rui " -0x8565: "Ya " -0x8566: "Xu " -0x8567: "Fu " -0x8568: "Jue " -0x8569: "Dang " -0x856a: "Wu " -0x856b: "Tong " -0x856c: "Si " -0x856d: "Xiao " -0x856e: "Xi " -0x856f: "Long " -0x8570: "Yun " -0x8571: "[?] " -0x8572: "Qi " -0x8573: "Jian " -0x8574: "Yun " -0x8575: "Sun " -0x8576: "Ling " -0x8577: "Yu " -0x8578: "Xia " -0x8579: "Yong " -0x857a: "Ji " -0x857b: "Hong " -0x857c: "Si " -0x857d: "Nong " -0x857e: "Lei " -0x857f: "Xuan " -0x8580: "Yun " -0x8581: "Yu " -0x8582: "Xi " -0x8583: "Hao " -0x8584: "Bo " -0x8585: "Hao " -0x8586: "Ai " -0x8587: "Wei " -0x8588: "Hui " -0x8589: "Wei " -0x858a: "Ji " -0x858b: "Ci " -0x858c: "Xiang " -0x858d: "Luan " -0x858e: "Mie " -0x858f: "Yi " -0x8590: "Leng " -0x8591: "Jiang " -0x8592: "Can " -0x8593: "Shen " -0x8594: "Qiang " -0x8595: "Lian " -0x8596: "Ke " -0x8597: "Yuan " -0x8598: "Da " -0x8599: "Ti " -0x859a: "Tang " -0x859b: "Xie " -0x859c: "Bi " -0x859d: "Zhan " -0x859e: "Sun " -0x859f: "Lian " -0x85a0: "Fan " -0x85a1: "Ding " -0x85a2: "Jie " -0x85a3: "Gu " -0x85a4: "Xie " -0x85a5: "Shu " -0x85a6: "Jian " -0x85a7: "Kao " -0x85a8: "Hong " -0x85a9: "Sa " -0x85aa: "Xin " -0x85ab: "Xun " -0x85ac: "Yao " -0x85ad: "Hie " -0x85ae: "Sou " -0x85af: "Shu " -0x85b0: "Xun " -0x85b1: "Dui " -0x85b2: "Pin " -0x85b3: "Wei " -0x85b4: "Neng " -0x85b5: "Chou " -0x85b6: "Mai " -0x85b7: "Ru " -0x85b8: "Piao " -0x85b9: "Tai " -0x85ba: "Qi " -0x85bb: "Zao " -0x85bc: "Chen " -0x85bd: "Zhen " -0x85be: "Er " -0x85bf: "Ni " -0x85c0: "Ying " -0x85c1: "Gao " -0x85c2: "Cong " -0x85c3: "Xiao " -0x85c4: "Qi " -0x85c5: "Fa " -0x85c6: "Jian " -0x85c7: "Xu " -0x85c8: "Kui " -0x85c9: "Jie " -0x85ca: "Bian " -0x85cb: "Diao " -0x85cc: "Mi " -0x85cd: "Lan " -0x85ce: "Jin " -0x85cf: "Cang " -0x85d0: "Miao " -0x85d1: "Qiong " -0x85d2: "Qie " -0x85d3: "Xian " -0x85d4: "[?] " -0x85d5: "Ou " -0x85d6: "Xian " -0x85d7: "Su " -0x85d8: "Lu " -0x85d9: "Yi " -0x85da: "Xu " -0x85db: "Xie " -0x85dc: "Li " -0x85dd: "Yi " -0x85de: "La " -0x85df: "Lei " -0x85e0: "Xiao " -0x85e1: "Di " -0x85e2: "Zhi " -0x85e3: "Bei " -0x85e4: "Teng " -0x85e5: "Yao " -0x85e6: "Mo " -0x85e7: "Huan " -0x85e8: "Piao " -0x85e9: "Fan " -0x85ea: "Sou " -0x85eb: "Tan " -0x85ec: "Tui " -0x85ed: "Qiong " -0x85ee: "Qiao " -0x85ef: "Wei " -0x85f0: "Liu " -0x85f1: "Hui " -0x85f2: "[?] " -0x85f3: "Gao " -0x85f4: "Yun " -0x85f5: "[?] " -0x85f6: "Li " -0x85f7: "Shu " -0x85f8: "Chu " -0x85f9: "Ai " -0x85fa: "Lin " -0x85fb: "Zao " -0x85fc: "Xuan " -0x85fd: "Chen " -0x85fe: "Lai " -0x85ff: "Huo " -/* x086 */ -0x8600: "Tuo " -0x8601: "Wu " -0x8602: "Rui " -0x8603: "Rui " -0x8604: "Qi " -0x8605: "Heng " -0x8606: "Lu " -0x8607: "Su " -0x8608: "Tui " -0x8609: "Mang " -0x860a: "Yun " -0x860b: "Pin " -0x860c: "Yu " -0x860d: "Xun " -0x860e: "Ji " -0x860f: "Jiong " -0x8610: "Xian " -0x8611: "Mo " -0x8612: "Hagi " -0x8613: "Su " -0x8614: "Jiong " -0x8615: "[?] " -0x8616: "Nie " -0x8617: "Bo " -0x8618: "Rang " -0x8619: "Yi " -0x861a: "Xian " -0x861b: "Yu " -0x861c: "Ju " -0x861d: "Lian " -0x861e: "Lian " -0x861f: "Yin " -0x8620: "Qiang " -0x8621: "Ying " -0x8622: "Long " -0x8623: "Tong " -0x8624: "Wei " -0x8625: "Yue " -0x8626: "Ling " -0x8627: "Qu " -0x8628: "Yao " -0x8629: "Fan " -0x862a: "Mi " -0x862b: "Lan " -0x862c: "Kui " -0x862d: "Lan " -0x862e: "Ji " -0x862f: "Dang " -0x8630: "Katsura " -0x8631: "Lei " -0x8632: "Lei " -0x8633: "Hua " -0x8634: "Feng " -0x8635: "Zhi " -0x8636: "Wei " -0x8637: "Kui " -0x8638: "Zhan " -0x8639: "Huai " -0x863a: "Li " -0x863b: "Ji " -0x863c: "Mi " -0x863d: "Lei " -0x863e: "Huai " -0x863f: "Luo " -0x8640: "Ji " -0x8641: "Kui " -0x8642: "Lu " -0x8643: "Jian " -0x8644: "San " -0x8645: "[?] " -0x8646: "Lei " -0x8647: "Quan " -0x8648: "Xiao " -0x8649: "Yi " -0x864a: "Luan " -0x864b: "Men " -0x864c: "Bie " -0x864d: "Hu " -0x864e: "Hu " -0x864f: "Lu " -0x8650: "Nue " -0x8651: "Lu " -0x8652: "Si " -0x8653: "Xiao " -0x8654: "Qian " -0x8655: "Chu " -0x8656: "Hu " -0x8657: "Xu " -0x8658: "Cuo " -0x8659: "Fu " -0x865a: "Xu " -0x865b: "Xu " -0x865c: "Lu " -0x865d: "Hu " -0x865e: "Yu " -0x865f: "Hao " -0x8660: "Jiao " -0x8661: "Ju " -0x8662: "Guo " -0x8663: "Bao " -0x8664: "Yan " -0x8665: "Zhan " -0x8666: "Zhan " -0x8667: "Kui " -0x8668: "Ban " -0x8669: "Xi " -0x866a: "Shu " -0x866b: "Chong " -0x866c: "Qiu " -0x866d: "Diao " -0x866e: "Ji " -0x866f: "Qiu " -0x8670: "Cheng " -0x8671: "Shi " -0x8672: "[?] " -0x8673: "Di " -0x8674: "Zhe " -0x8675: "She " -0x8676: "Yu " -0x8677: "Gan " -0x8678: "Zi " -0x8679: "Hong " -0x867a: "Hui " -0x867b: "Meng " -0x867c: "Ge " -0x867d: "Sui " -0x867e: "Xia " -0x867f: "Chai " -0x8680: "Shi " -0x8681: "Yi " -0x8682: "Ma " -0x8683: "Xiang " -0x8684: "Fang " -0x8685: "E " -0x8686: "Pa " -0x8687: "Chi " -0x8688: "Qian " -0x8689: "Wen " -0x868a: "Wen " -0x868b: "Rui " -0x868c: "Bang " -0x868d: "Bi " -0x868e: "Yue " -0x868f: "Yue " -0x8690: "Jun " -0x8691: "Qi " -0x8692: "Ran " -0x8693: "Yin " -0x8694: "Qi " -0x8695: "Tian " -0x8696: "Yuan " -0x8697: "Jue " -0x8698: "Hui " -0x8699: "Qin " -0x869a: "Qi " -0x869b: "Zhong " -0x869c: "Ya " -0x869d: "Ci " -0x869e: "Mu " -0x869f: "Wang " -0x86a0: "Fen " -0x86a1: "Fen " -0x86a2: "Hang " -0x86a3: "Gong " -0x86a4: "Zao " -0x86a5: "Fu " -0x86a6: "Ran " -0x86a7: "Jie " -0x86a8: "Fu " -0x86a9: "Chi " -0x86aa: "Dou " -0x86ab: "Piao " -0x86ac: "Xian " -0x86ad: "Ni " -0x86ae: "Te " -0x86af: "Qiu " -0x86b0: "You " -0x86b1: "Zha " -0x86b2: "Ping " -0x86b3: "Chi " -0x86b4: "You " -0x86b5: "He " -0x86b6: "Han " -0x86b7: "Ju " -0x86b8: "Li " -0x86b9: "Fu " -0x86ba: "Ran " -0x86bb: "Zha " -0x86bc: "Gou " -0x86bd: "Pi " -0x86be: "Bo " -0x86bf: "Xian " -0x86c0: "Zhu " -0x86c1: "Diao " -0x86c2: "Bie " -0x86c3: "Bing " -0x86c4: "Gu " -0x86c5: "Ran " -0x86c6: "Qu " -0x86c7: "She " -0x86c8: "Tie " -0x86c9: "Ling " -0x86ca: "Gu " -0x86cb: "Dan " -0x86cc: "Gu " -0x86cd: "Ying " -0x86ce: "Li " -0x86cf: "Cheng " -0x86d0: "Qu " -0x86d1: "Mou " -0x86d2: "Ge " -0x86d3: "Ci " -0x86d4: "Hui " -0x86d5: "Hui " -0x86d6: "Mang " -0x86d7: "Fu " -0x86d8: "Yang " -0x86d9: "Wa " -0x86da: "Lie " -0x86db: "Zhu " -0x86dc: "Yi " -0x86dd: "Xian " -0x86de: "Kuo " -0x86df: "Jiao " -0x86e0: "Li " -0x86e1: "Yi " -0x86e2: "Ping " -0x86e3: "Ji " -0x86e4: "Ha " -0x86e5: "She " -0x86e6: "Yi " -0x86e7: "Wang " -0x86e8: "Mo " -0x86e9: "Qiong " -0x86ea: "Qie " -0x86eb: "Gui " -0x86ec: "Gong " -0x86ed: "Zhi " -0x86ee: "Man " -0x86ef: "Ebi " -0x86f0: "Zhi " -0x86f1: "Jia " -0x86f2: "Rao " -0x86f3: "Si " -0x86f4: "Qi " -0x86f5: "Xing " -0x86f6: "Lie " -0x86f7: "Qiu " -0x86f8: "Shao " -0x86f9: "Yong " -0x86fa: "Jia " -0x86fb: "Shui " -0x86fc: "Che " -0x86fd: "Bai " -0x86fe: "E " -0x86ff: "Han " -/* x087 */ -0x8700: "Shu " -0x8701: "Xuan " -0x8702: "Feng " -0x8703: "Shen " -0x8704: "Zhen " -0x8705: "Fu " -0x8706: "Xian " -0x8707: "Zhe " -0x8708: "Wu " -0x8709: "Fu " -0x870a: "Li " -0x870b: "Lang " -0x870c: "Bi " -0x870d: "Chu " -0x870e: "Yuan " -0x870f: "You " -0x8710: "Jie " -0x8711: "Dan " -0x8712: "Yan " -0x8713: "Ting " -0x8714: "Dian " -0x8715: "Shui " -0x8716: "Hui " -0x8717: "Gua " -0x8718: "Zhi " -0x8719: "Song " -0x871a: "Fei " -0x871b: "Ju " -0x871c: "Mi " -0x871d: "Qi " -0x871e: "Qi " -0x871f: "Yu " -0x8720: "Jun " -0x8721: "Zha " -0x8722: "Meng " -0x8723: "Qiang " -0x8724: "Si " -0x8725: "Xi " -0x8726: "Lun " -0x8727: "Li " -0x8728: "Die " -0x8729: "Tiao " -0x872a: "Tao " -0x872b: "Kun " -0x872c: "Gan " -0x872d: "Han " -0x872e: "Yu " -0x872f: "Bang " -0x8730: "Fei " -0x8731: "Pi " -0x8732: "Wei " -0x8733: "Dun " -0x8734: "Yi " -0x8735: "Yuan " -0x8736: "Su " -0x8737: "Quan " -0x8738: "Qian " -0x8739: "Rui " -0x873a: "Ni " -0x873b: "Qing " -0x873c: "Wei " -0x873d: "Liang " -0x873e: "Guo " -0x873f: "Wan " -0x8740: "Dong " -0x8741: "E " -0x8742: "Ban " -0x8743: "Di " -0x8744: "Wang " -0x8745: "Can " -0x8746: "Yang " -0x8747: "Ying " -0x8748: "Guo " -0x8749: "Chan " -0x874a: "[?] " -0x874b: "La " -0x874c: "Ke " -0x874d: "Ji " -0x874e: "He " -0x874f: "Ting " -0x8750: "Mai " -0x8751: "Xu " -0x8752: "Mian " -0x8753: "Yu " -0x8754: "Jie " -0x8755: "Shi " -0x8756: "Xuan " -0x8757: "Huang " -0x8758: "Yan " -0x8759: "Bian " -0x875a: "Rou " -0x875b: "Wei " -0x875c: "Fu " -0x875d: "Yuan " -0x875e: "Mei " -0x875f: "Wei " -0x8760: "Fu " -0x8761: "Ruan " -0x8762: "Xie " -0x8763: "You " -0x8764: "Qiu " -0x8765: "Mao " -0x8766: "Xia " -0x8767: "Ying " -0x8768: "Shi " -0x8769: "Chong " -0x876a: "Tang " -0x876b: "Zhu " -0x876c: "Zong " -0x876d: "Ti " -0x876e: "Fu " -0x876f: "Yuan " -0x8770: "Hui " -0x8771: "Meng " -0x8772: "La " -0x8773: "Du " -0x8774: "Hu " -0x8775: "Qiu " -0x8776: "Die " -0x8777: "Li " -0x8778: "Gua " -0x8779: "Yun " -0x877a: "Ju " -0x877b: "Nan " -0x877c: "Lou " -0x877d: "Qun " -0x877e: "Rong " -0x877f: "Ying " -0x8780: "Jiang " -0x8781: "[?] " -0x8782: "Lang " -0x8783: "Pang " -0x8784: "Si " -0x8785: "Xi " -0x8786: "Ci " -0x8787: "Xi " -0x8788: "Yuan " -0x8789: "Weng " -0x878a: "Lian " -0x878b: "Sou " -0x878c: "Ban " -0x878d: "Rong " -0x878e: "Rong " -0x878f: "Ji " -0x8790: "Wu " -0x8791: "Qiu " -0x8792: "Han " -0x8793: "Qin " -0x8794: "Yi " -0x8795: "Bi " -0x8796: "Hua " -0x8797: "Tang " -0x8798: "Yi " -0x8799: "Du " -0x879a: "Nai " -0x879b: "He " -0x879c: "Hu " -0x879d: "Hui " -0x879e: "Ma " -0x879f: "Ming " -0x87a0: "Yi " -0x87a1: "Wen " -0x87a2: "Ying " -0x87a3: "Teng " -0x87a4: "Yu " -0x87a5: "Cang " -0x87a6: "So " -0x87a7: "Ebi " -0x87a8: "Man " -0x87a9: "[?] " -0x87aa: "Shang " -0x87ab: "Zhe " -0x87ac: "Cao " -0x87ad: "Chi " -0x87ae: "Di " -0x87af: "Ao " -0x87b0: "Lu " -0x87b1: "Wei " -0x87b2: "Zhi " -0x87b3: "Tang " -0x87b4: "Chen " -0x87b5: "Piao " -0x87b6: "Qu " -0x87b7: "Pi " -0x87b8: "Yu " -0x87b9: "Jian " -0x87ba: "Luo " -0x87bb: "Lou " -0x87bc: "Qin " -0x87bd: "Zhong " -0x87be: "Yin " -0x87bf: "Jiang " -0x87c0: "Shuai " -0x87c1: "Wen " -0x87c2: "Jiao " -0x87c3: "Wan " -0x87c4: "Zhi " -0x87c5: "Zhe " -0x87c6: "Ma " -0x87c7: "Ma " -0x87c8: "Guo " -0x87c9: "Liu " -0x87ca: "Mao " -0x87cb: "Xi " -0x87cc: "Cong " -0x87cd: "Li " -0x87ce: "Man " -0x87cf: "Xiao " -0x87d0: "Kamakiri " -0x87d1: "Zhang " -0x87d2: "Mang " -0x87d3: "Xiang " -0x87d4: "Mo " -0x87d5: "Zui " -0x87d6: "Si " -0x87d7: "Qiu " -0x87d8: "Te " -0x87d9: "Zhi " -0x87da: "Peng " -0x87db: "Peng " -0x87dc: "Jiao " -0x87dd: "Qu " -0x87de: "Bie " -0x87df: "Liao " -0x87e0: "Pan " -0x87e1: "Gui " -0x87e2: "Xi " -0x87e3: "Ji " -0x87e4: "Zhuan " -0x87e5: "Huang " -0x87e6: "Fei " -0x87e7: "Lao " -0x87e8: "Jue " -0x87e9: "Jue " -0x87ea: "Hui " -0x87eb: "Yin " -0x87ec: "Chan " -0x87ed: "Jiao " -0x87ee: "Shan " -0x87ef: "Rao " -0x87f0: "Xiao " -0x87f1: "Mou " -0x87f2: "Chong " -0x87f3: "Xun " -0x87f4: "Si " -0x87f5: "[?] " -0x87f6: "Cheng " -0x87f7: "Dang " -0x87f8: "Li " -0x87f9: "Xie " -0x87fa: "Shan " -0x87fb: "Yi " -0x87fc: "Jing " -0x87fd: "Da " -0x87fe: "Chan " -0x87ff: "Qi " -/* x088 */ -0x8800: "Ci " -0x8801: "Xiang " -0x8802: "She " -0x8803: "Luo " -0x8804: "Qin " -0x8805: "Ying " -0x8806: "Chai " -0x8807: "Li " -0x8808: "Ze " -0x8809: "Xuan " -0x880a: "Lian " -0x880b: "Zhu " -0x880c: "Ze " -0x880d: "Xie " -0x880e: "Mang " -0x880f: "Xie " -0x8810: "Qi " -0x8811: "Rong " -0x8812: "Jian " -0x8813: "Meng " -0x8814: "Hao " -0x8815: "Ruan " -0x8816: "Huo " -0x8817: "Zhuo " -0x8818: "Jie " -0x8819: "Bin " -0x881a: "He " -0x881b: "Mie " -0x881c: "Fan " -0x881d: "Lei " -0x881e: "Jie " -0x881f: "La " -0x8820: "Mi " -0x8821: "Li " -0x8822: "Chun " -0x8823: "Li " -0x8824: "Qiu " -0x8825: "Nie " -0x8826: "Lu " -0x8827: "Du " -0x8828: "Xiao " -0x8829: "Zhu " -0x882a: "Long " -0x882b: "Li " -0x882c: "Long " -0x882d: "Feng " -0x882e: "Ye " -0x882f: "Beng " -0x8830: "Shang " -0x8831: "Gu " -0x8832: "Juan " -0x8833: "Ying " -0x8834: "[?] " -0x8835: "Xi " -0x8836: "Can " -0x8837: "Qu " -0x8838: "Quan " -0x8839: "Du " -0x883a: "Can " -0x883b: "Man " -0x883c: "Jue " -0x883d: "Jie " -0x883e: "Zhu " -0x883f: "Zha " -0x8840: "Xie " -0x8841: "Huang " -0x8842: "Niu " -0x8843: "Pei " -0x8844: "Nu " -0x8845: "Xin " -0x8846: "Zhong " -0x8847: "Mo " -0x8848: "Er " -0x8849: "Ke " -0x884a: "Mie " -0x884b: "Xi " -0x884c: "Xing " -0x884d: "Yan " -0x884e: "Kan " -0x884f: "Yuan " -0x8850: "[?] " -0x8851: "Ling " -0x8852: "Xuan " -0x8853: "Shu " -0x8854: "Xian " -0x8855: "Tong " -0x8856: "Long " -0x8857: "Jie " -0x8858: "Xian " -0x8859: "Ya " -0x885a: "Hu " -0x885b: "Wei " -0x885c: "Dao " -0x885d: "Chong " -0x885e: "Wei " -0x885f: "Dao " -0x8860: "Zhun " -0x8861: "Heng " -0x8862: "Qu " -0x8863: "Yi " -0x8864: "Yi " -0x8865: "Bu " -0x8866: "Gan " -0x8867: "Yu " -0x8868: "Biao " -0x8869: "Cha " -0x886a: "Yi " -0x886b: "Shan " -0x886c: "Chen " -0x886d: "Fu " -0x886e: "Gun " -0x886f: "Fen " -0x8870: "Shuai " -0x8871: "Jie " -0x8872: "Na " -0x8873: "Zhong " -0x8874: "Dan " -0x8875: "Ri " -0x8876: "Zhong " -0x8877: "Zhong " -0x8878: "Xie " -0x8879: "Qi " -0x887a: "Xie " -0x887b: "Ran " -0x887c: "Zhi " -0x887d: "Ren " -0x887e: "Qin " -0x887f: "Jin " -0x8880: "Jun " -0x8881: "Yuan " -0x8882: "Mei " -0x8883: "Chai " -0x8884: "Ao " -0x8885: "Niao " -0x8886: "Hui " -0x8887: "Ran " -0x8888: "Jia " -0x8889: "Tuo " -0x888a: "Ling " -0x888b: "Dai " -0x888c: "Bao " -0x888d: "Pao " -0x888e: "Yao " -0x888f: "Zuo " -0x8890: "Bi " -0x8891: "Shao " -0x8892: "Tan " -0x8893: "Ju " -0x8894: "He " -0x8895: "Shu " -0x8896: "Xiu " -0x8897: "Zhen " -0x8898: "Yi " -0x8899: "Pa " -0x889a: "Bo " -0x889b: "Di " -0x889c: "Wa " -0x889d: "Fu " -0x889e: "Gun " -0x889f: "Zhi " -0x88a0: "Zhi " -0x88a1: "Ran " -0x88a2: "Pan " -0x88a3: "Yi " -0x88a4: "Mao " -0x88a5: "Tuo " -0x88a6: "Na " -0x88a7: "Kou " -0x88a8: "Xian " -0x88a9: "Chan " -0x88aa: "Qu " -0x88ab: "Bei " -0x88ac: "Gun " -0x88ad: "Xi " -0x88ae: "Ne " -0x88af: "Bo " -0x88b0: "Horo " -0x88b1: "Fu " -0x88b2: "Yi " -0x88b3: "Chi " -0x88b4: "Ku " -0x88b5: "Ren " -0x88b6: "Jiang " -0x88b7: "Jia " -0x88b8: "Cun " -0x88b9: "Mo " -0x88ba: "Jie " -0x88bb: "Er " -0x88bc: "Luo " -0x88bd: "Ru " -0x88be: "Zhu " -0x88bf: "Gui " -0x88c0: "Yin " -0x88c1: "Cai " -0x88c2: "Lie " -0x88c3: "Kamishimo " -0x88c4: "Yuki " -0x88c5: "Zhuang " -0x88c6: "Dang " -0x88c7: "[?] " -0x88c8: "Kun " -0x88c9: "Ken " -0x88ca: "Niao " -0x88cb: "Shu " -0x88cc: "Jia " -0x88cd: "Kun " -0x88ce: "Cheng " -0x88cf: "Li " -0x88d0: "Juan " -0x88d1: "Shen " -0x88d2: "Pou " -0x88d3: "Ge " -0x88d4: "Yi " -0x88d5: "Yu " -0x88d6: "Zhen " -0x88d7: "Liu " -0x88d8: "Qiu " -0x88d9: "Qun " -0x88da: "Ji " -0x88db: "Yi " -0x88dc: "Bu " -0x88dd: "Zhuang " -0x88de: "Shui " -0x88df: "Sha " -0x88e0: "Qun " -0x88e1: "Li " -0x88e2: "Lian " -0x88e3: "Lian " -0x88e4: "Ku " -0x88e5: "Jian " -0x88e6: "Fou " -0x88e7: "Chan " -0x88e8: "Bi " -0x88e9: "Gun " -0x88ea: "Tao " -0x88eb: "Yuan " -0x88ec: "Ling " -0x88ed: "Chi " -0x88ee: "Chang " -0x88ef: "Chou " -0x88f0: "Duo " -0x88f1: "Biao " -0x88f2: "Liang " -0x88f3: "Chang " -0x88f4: "Pei " -0x88f5: "Pei " -0x88f6: "Fei " -0x88f7: "Yuan " -0x88f8: "Luo " -0x88f9: "Guo " -0x88fa: "Yan " -0x88fb: "Du " -0x88fc: "Xi " -0x88fd: "Zhi " -0x88fe: "Ju " -0x88ff: "Qi " -/* x089 */ -0x8900: "Ji " -0x8901: "Zhi " -0x8902: "Gua " -0x8903: "Ken " -0x8904: "Che " -0x8905: "Ti " -0x8906: "Ti " -0x8907: "Fu " -0x8908: "Chong " -0x8909: "Xie " -0x890a: "Bian " -0x890b: "Die " -0x890c: "Kun " -0x890d: "Duan " -0x890e: "Xiu " -0x890f: "Xiu " -0x8910: "He " -0x8911: "Yuan " -0x8912: "Bao " -0x8913: "Bao " -0x8914: "Fu " -0x8915: "Yu " -0x8916: "Tuan " -0x8917: "Yan " -0x8918: "Hui " -0x8919: "Bei " -0x891a: "Chu " -0x891b: "Lu " -0x891c: "Ena " -0x891d: "Hitoe " -0x891e: "Yun " -0x891f: "Da " -0x8920: "Gou " -0x8921: "Da " -0x8922: "Huai " -0x8923: "Rong " -0x8924: "Yuan " -0x8925: "Ru " -0x8926: "Nai " -0x8927: "Jiong " -0x8928: "Suo " -0x8929: "Ban " -0x892a: "Tun " -0x892b: "Chi " -0x892c: "Sang " -0x892d: "Niao " -0x892e: "Ying " -0x892f: "Jie " -0x8930: "Qian " -0x8931: "Huai " -0x8932: "Ku " -0x8933: "Lian " -0x8934: "Bao " -0x8935: "Li " -0x8936: "Zhe " -0x8937: "Shi " -0x8938: "Lu " -0x8939: "Yi " -0x893a: "Die " -0x893b: "Xie " -0x893c: "Xian " -0x893d: "Wei " -0x893e: "Biao " -0x893f: "Cao " -0x8940: "Ji " -0x8941: "Jiang " -0x8942: "Sen " -0x8943: "Bao " -0x8944: "Xiang " -0x8945: "Chihaya " -0x8946: "Pu " -0x8947: "Jian " -0x8948: "Zhuan " -0x8949: "Jian " -0x894a: "Zui " -0x894b: "Ji " -0x894c: "Dan " -0x894d: "Za " -0x894e: "Fan " -0x894f: "Bo " -0x8950: "Xiang " -0x8951: "Xin " -0x8952: "Bie " -0x8953: "Rao " -0x8954: "Man " -0x8955: "Lan " -0x8956: "Ao " -0x8957: "Duo " -0x8958: "Gui " -0x8959: "Cao " -0x895a: "Sui " -0x895b: "Nong " -0x895c: "Chan " -0x895d: "Lian " -0x895e: "Bi " -0x895f: "Jin " -0x8960: "Dang " -0x8961: "Shu " -0x8962: "Tan " -0x8963: "Bi " -0x8964: "Lan " -0x8965: "Pu " -0x8966: "Ru " -0x8967: "Zhi " -0x8968: "[?] " -0x8969: "Shu " -0x896a: "Wa " -0x896b: "Shi " -0x896c: "Bai " -0x896d: "Xie " -0x896e: "Bo " -0x896f: "Chen " -0x8970: "Lai " -0x8971: "Long " -0x8972: "Xi " -0x8973: "Xian " -0x8974: "Lan " -0x8975: "Zhe " -0x8976: "Dai " -0x8977: "Tasuki " -0x8978: "Zan " -0x8979: "Shi " -0x897a: "Jian " -0x897b: "Pan " -0x897c: "Yi " -0x897d: "Ran " -0x897e: "Ya " -0x897f: "Xi " -0x8980: "Xi " -0x8981: "Yao " -0x8982: "Feng " -0x8983: "Tan " -0x8984: "[?] " -0x8985: "Biao " -0x8986: "Fu " -0x8987: "Ba " -0x8988: "He " -0x8989: "Ji " -0x898a: "Ji " -0x898b: "Jian " -0x898c: "Guan " -0x898d: "Bian " -0x898e: "Yan " -0x898f: "Gui " -0x8990: "Jue " -0x8991: "Pian " -0x8992: "Mao " -0x8993: "Mi " -0x8994: "Mi " -0x8995: "Mie " -0x8996: "Shi " -0x8997: "Si " -0x8998: "Zhan " -0x8999: "Luo " -0x899a: "Jue " -0x899b: "Mi " -0x899c: "Tiao " -0x899d: "Lian " -0x899e: "Yao " -0x899f: "Zhi " -0x89a0: "Jun " -0x89a1: "Xi " -0x89a2: "Shan " -0x89a3: "Wei " -0x89a4: "Xi " -0x89a5: "Tian " -0x89a6: "Yu " -0x89a7: "Lan " -0x89a8: "E " -0x89a9: "Du " -0x89aa: "Qin " -0x89ab: "Pang " -0x89ac: "Ji " -0x89ad: "Ming " -0x89ae: "Ying " -0x89af: "Gou " -0x89b0: "Qu " -0x89b1: "Zhan " -0x89b2: "Jin " -0x89b3: "Guan " -0x89b4: "Deng " -0x89b5: "Jian " -0x89b6: "Luo " -0x89b7: "Qu " -0x89b8: "Jian " -0x89b9: "Wei " -0x89ba: "Jue " -0x89bb: "Qu " -0x89bc: "Luo " -0x89bd: "Lan " -0x89be: "Shen " -0x89bf: "Di " -0x89c0: "Guan " -0x89c1: "Jian " -0x89c2: "Guan " -0x89c3: "Yan " -0x89c4: "Gui " -0x89c5: "Mi " -0x89c6: "Shi " -0x89c7: "Zhan " -0x89c8: "Lan " -0x89c9: "Jue " -0x89ca: "Ji " -0x89cb: "Xi " -0x89cc: "Di " -0x89cd: "Tian " -0x89ce: "Yu " -0x89cf: "Gou " -0x89d0: "Jin " -0x89d1: "Qu " -0x89d2: "Jiao " -0x89d3: "Jiu " -0x89d4: "Jin " -0x89d5: "Cu " -0x89d6: "Jue " -0x89d7: "Zhi " -0x89d8: "Chao " -0x89d9: "Ji " -0x89da: "Gu " -0x89db: "Dan " -0x89dc: "Zui " -0x89dd: "Di " -0x89de: "Shang " -0x89df: "Hua " -0x89e0: "Quan " -0x89e1: "Ge " -0x89e2: "Chi " -0x89e3: "Jie " -0x89e4: "Gui " -0x89e5: "Gong " -0x89e6: "Hong " -0x89e7: "Jie " -0x89e8: "Hun " -0x89e9: "Qiu " -0x89ea: "Xing " -0x89eb: "Su " -0x89ec: "Ni " -0x89ed: "Ji " -0x89ee: "Lu " -0x89ef: "Zhi " -0x89f0: "Zha " -0x89f1: "Bi " -0x89f2: "Xing " -0x89f3: "Hu " -0x89f4: "Shang " -0x89f5: "Gong " -0x89f6: "Zhi " -0x89f7: "Xue " -0x89f8: "Chu " -0x89f9: "Xi " -0x89fa: "Yi " -0x89fb: "Lu " -0x89fc: "Jue " -0x89fd: "Xi " -0x89fe: "Yan " -0x89ff: "Xi " -/* x08a */ -0x8a00: "Yan " -0x8a01: "Yan " -0x8a02: "Ding " -0x8a03: "Fu " -0x8a04: "Qiu " -0x8a05: "Qiu " -0x8a06: "Jiao " -0x8a07: "Hong " -0x8a08: "Ji " -0x8a09: "Fan " -0x8a0a: "Xun " -0x8a0b: "Diao " -0x8a0c: "Hong " -0x8a0d: "Cha " -0x8a0e: "Tao " -0x8a0f: "Xu " -0x8a10: "Jie " -0x8a11: "Yi " -0x8a12: "Ren " -0x8a13: "Xun " -0x8a14: "Yin " -0x8a15: "Shan " -0x8a16: "Qi " -0x8a17: "Tuo " -0x8a18: "Ji " -0x8a19: "Xun " -0x8a1a: "Yin " -0x8a1b: "E " -0x8a1c: "Fen " -0x8a1d: "Ya " -0x8a1e: "Yao " -0x8a1f: "Song " -0x8a20: "Shen " -0x8a21: "Yin " -0x8a22: "Xin " -0x8a23: "Jue " -0x8a24: "Xiao " -0x8a25: "Ne " -0x8a26: "Chen " -0x8a27: "You " -0x8a28: "Zhi " -0x8a29: "Xiong " -0x8a2a: "Fang " -0x8a2b: "Xin " -0x8a2c: "Chao " -0x8a2d: "She " -0x8a2e: "Xian " -0x8a2f: "Sha " -0x8a30: "Tun " -0x8a31: "Xu " -0x8a32: "Yi " -0x8a33: "Yi " -0x8a34: "Su " -0x8a35: "Chi " -0x8a36: "He " -0x8a37: "Shen " -0x8a38: "He " -0x8a39: "Xu " -0x8a3a: "Zhen " -0x8a3b: "Zhu " -0x8a3c: "Zheng " -0x8a3d: "Gou " -0x8a3e: "Zi " -0x8a3f: "Zi " -0x8a40: "Zhan " -0x8a41: "Gu " -0x8a42: "Fu " -0x8a43: "Quan " -0x8a44: "Die " -0x8a45: "Ling " -0x8a46: "Di " -0x8a47: "Yang " -0x8a48: "Li " -0x8a49: "Nao " -0x8a4a: "Pan " -0x8a4b: "Zhou " -0x8a4c: "Gan " -0x8a4d: "Yi " -0x8a4e: "Ju " -0x8a4f: "Ao " -0x8a50: "Zha " -0x8a51: "Tuo " -0x8a52: "Yi " -0x8a53: "Qu " -0x8a54: "Zhao " -0x8a55: "Ping " -0x8a56: "Bi " -0x8a57: "Xiong " -0x8a58: "Qu " -0x8a59: "Ba " -0x8a5a: "Da " -0x8a5b: "Zu " -0x8a5c: "Tao " -0x8a5d: "Zhu " -0x8a5e: "Ci " -0x8a5f: "Zhe " -0x8a60: "Yong " -0x8a61: "Xu " -0x8a62: "Xun " -0x8a63: "Yi " -0x8a64: "Huang " -0x8a65: "He " -0x8a66: "Shi " -0x8a67: "Cha " -0x8a68: "Jiao " -0x8a69: "Shi " -0x8a6a: "Hen " -0x8a6b: "Cha " -0x8a6c: "Gou " -0x8a6d: "Gui " -0x8a6e: "Quan " -0x8a6f: "Hui " -0x8a70: "Jie " -0x8a71: "Hua " -0x8a72: "Gai " -0x8a73: "Xiang " -0x8a74: "Wei " -0x8a75: "Shen " -0x8a76: "Chou " -0x8a77: "Tong " -0x8a78: "Mi " -0x8a79: "Zhan " -0x8a7a: "Ming " -0x8a7b: "E " -0x8a7c: "Hui " -0x8a7d: "Yan " -0x8a7e: "Xiong " -0x8a7f: "Gua " -0x8a80: "Er " -0x8a81: "Beng " -0x8a82: "Tiao " -0x8a83: "Chi " -0x8a84: "Lei " -0x8a85: "Zhu " -0x8a86: "Kuang " -0x8a87: "Kua " -0x8a88: "Wu " -0x8a89: "Yu " -0x8a8a: "Teng " -0x8a8b: "Ji " -0x8a8c: "Zhi " -0x8a8d: "Ren " -0x8a8e: "Su " -0x8a8f: "Lang " -0x8a90: "E " -0x8a91: "Kuang " -0x8a92: "E " -0x8a93: "Shi " -0x8a94: "Ting " -0x8a95: "Dan " -0x8a96: "Bo " -0x8a97: "Chan " -0x8a98: "You " -0x8a99: "Heng " -0x8a9a: "Qiao " -0x8a9b: "Qin " -0x8a9c: "Shua " -0x8a9d: "An " -0x8a9e: "Yu " -0x8a9f: "Xiao " -0x8aa0: "Cheng " -0x8aa1: "Jie " -0x8aa2: "Xian " -0x8aa3: "Wu " -0x8aa4: "Wu " -0x8aa5: "Gao " -0x8aa6: "Song " -0x8aa7: "Pu " -0x8aa8: "Hui " -0x8aa9: "Jing " -0x8aaa: "Shuo " -0x8aab: "Zhen " -0x8aac: "Shuo " -0x8aad: "Du " -0x8aae: "Yasashi " -0x8aaf: "Chang " -0x8ab0: "Shui " -0x8ab1: "Jie " -0x8ab2: "Ke " -0x8ab3: "Qu " -0x8ab4: "Cong " -0x8ab5: "Xiao " -0x8ab6: "Sui " -0x8ab7: "Wang " -0x8ab8: "Xuan " -0x8ab9: "Fei " -0x8aba: "Chi " -0x8abb: "Ta " -0x8abc: "Yi " -0x8abd: "Na " -0x8abe: "Yin " -0x8abf: "Diao " -0x8ac0: "Pi " -0x8ac1: "Chuo " -0x8ac2: "Chan " -0x8ac3: "Chen " -0x8ac4: "Zhun " -0x8ac5: "Ji " -0x8ac6: "Qi " -0x8ac7: "Tan " -0x8ac8: "Zhui " -0x8ac9: "Wei " -0x8aca: "Ju " -0x8acb: "Qing " -0x8acc: "Jian " -0x8acd: "Zheng " -0x8ace: "Ze " -0x8acf: "Zou " -0x8ad0: "Qian " -0x8ad1: "Zhuo " -0x8ad2: "Liang " -0x8ad3: "Jian " -0x8ad4: "Zhu " -0x8ad5: "Hao " -0x8ad6: "Lun " -0x8ad7: "Shen " -0x8ad8: "Biao " -0x8ad9: "Huai " -0x8ada: "Pian " -0x8adb: "Yu " -0x8adc: "Die " -0x8add: "Xu " -0x8ade: "Pian " -0x8adf: "Shi " -0x8ae0: "Xuan " -0x8ae1: "Shi " -0x8ae2: "Hun " -0x8ae3: "Hua " -0x8ae4: "E " -0x8ae5: "Zhong " -0x8ae6: "Di " -0x8ae7: "Xie " -0x8ae8: "Fu " -0x8ae9: "Pu " -0x8aea: "Ting " -0x8aeb: "Jian " -0x8aec: "Qi " -0x8aed: "Yu " -0x8aee: "Zi " -0x8aef: "Chuan " -0x8af0: "Xi " -0x8af1: "Hui " -0x8af2: "Yin " -0x8af3: "An " -0x8af4: "Xian " -0x8af5: "Nan " -0x8af6: "Chen " -0x8af7: "Feng " -0x8af8: "Zhu " -0x8af9: "Yang " -0x8afa: "Yan " -0x8afb: "Heng " -0x8afc: "Xuan " -0x8afd: "Ge " -0x8afe: "Nuo " -0x8aff: "Qi " -/* x08b */ -0x8b00: "Mou " -0x8b01: "Ye " -0x8b02: "Wei " -0x8b03: "[?] " -0x8b04: "Teng " -0x8b05: "Zou " -0x8b06: "Shan " -0x8b07: "Jian " -0x8b08: "Bo " -0x8b09: "Ku " -0x8b0a: "Huang " -0x8b0b: "Huo " -0x8b0c: "Ge " -0x8b0d: "Ying " -0x8b0e: "Mi " -0x8b0f: "Xiao " -0x8b10: "Mi " -0x8b11: "Xi " -0x8b12: "Qiang " -0x8b13: "Chen " -0x8b14: "Nue " -0x8b15: "Ti " -0x8b16: "Su " -0x8b17: "Bang " -0x8b18: "Chi " -0x8b19: "Qian " -0x8b1a: "Shi " -0x8b1b: "Jiang " -0x8b1c: "Yuan " -0x8b1d: "Xie " -0x8b1e: "Xue " -0x8b1f: "Tao " -0x8b20: "Yao " -0x8b21: "Yao " -0x8b22: "[?] " -0x8b23: "Yu " -0x8b24: "Biao " -0x8b25: "Cong " -0x8b26: "Qing " -0x8b27: "Li " -0x8b28: "Mo " -0x8b29: "Mo " -0x8b2a: "Shang " -0x8b2b: "Zhe " -0x8b2c: "Miu " -0x8b2d: "Jian " -0x8b2e: "Ze " -0x8b2f: "Jie " -0x8b30: "Lian " -0x8b31: "Lou " -0x8b32: "Can " -0x8b33: "Ou " -0x8b34: "Guan " -0x8b35: "Xi " -0x8b36: "Zhuo " -0x8b37: "Ao " -0x8b38: "Ao " -0x8b39: "Jin " -0x8b3a: "Zhe " -0x8b3b: "Yi " -0x8b3c: "Hu " -0x8b3d: "Jiang " -0x8b3e: "Man " -0x8b3f: "Chao " -0x8b40: "Han " -0x8b41: "Hua " -0x8b42: "Chan " -0x8b43: "Xu " -0x8b44: "Zeng " -0x8b45: "Se " -0x8b46: "Xi " -0x8b47: "She " -0x8b48: "Dui " -0x8b49: "Zheng " -0x8b4a: "Nao " -0x8b4b: "Lan " -0x8b4c: "E " -0x8b4d: "Ying " -0x8b4e: "Jue " -0x8b4f: "Ji " -0x8b50: "Zun " -0x8b51: "Jiao " -0x8b52: "Bo " -0x8b53: "Hui " -0x8b54: "Zhuan " -0x8b55: "Mu " -0x8b56: "Zen " -0x8b57: "Zha " -0x8b58: "Shi " -0x8b59: "Qiao " -0x8b5a: "Tan " -0x8b5b: "Zen " -0x8b5c: "Pu " -0x8b5d: "Sheng " -0x8b5e: "Xuan " -0x8b5f: "Zao " -0x8b60: "Tan " -0x8b61: "Dang " -0x8b62: "Sui " -0x8b63: "Qian " -0x8b64: "Ji " -0x8b65: "Jiao " -0x8b66: "Jing " -0x8b67: "Lian " -0x8b68: "Nou " -0x8b69: "Yi " -0x8b6a: "Ai " -0x8b6b: "Zhan " -0x8b6c: "Pi " -0x8b6d: "Hui " -0x8b6e: "Hua " -0x8b6f: "Yi " -0x8b70: "Yi " -0x8b71: "Shan " -0x8b72: "Rang " -0x8b73: "Nou " -0x8b74: "Qian " -0x8b75: "Zhui " -0x8b76: "Ta " -0x8b77: "Hu " -0x8b78: "Zhou " -0x8b79: "Hao " -0x8b7a: "Ye " -0x8b7b: "Ying " -0x8b7c: "Jian " -0x8b7d: "Yu " -0x8b7e: "Jian " -0x8b7f: "Hui " -0x8b80: "Du " -0x8b81: "Zhe " -0x8b82: "Xuan " -0x8b83: "Zan " -0x8b84: "Lei " -0x8b85: "Shen " -0x8b86: "Wei " -0x8b87: "Chan " -0x8b88: "Li " -0x8b89: "Yi " -0x8b8a: "Bian " -0x8b8b: "Zhe " -0x8b8c: "Yan " -0x8b8d: "E " -0x8b8e: "Chou " -0x8b8f: "Wei " -0x8b90: "Chou " -0x8b91: "Yao " -0x8b92: "Chan " -0x8b93: "Rang " -0x8b94: "Yin " -0x8b95: "Lan " -0x8b96: "Chen " -0x8b97: "Huo " -0x8b98: "Zhe " -0x8b99: "Huan " -0x8b9a: "Zan " -0x8b9b: "Yi " -0x8b9c: "Dang " -0x8b9d: "Zhan " -0x8b9e: "Yan " -0x8b9f: "Du " -0x8ba0: "Yan " -0x8ba1: "Ji " -0x8ba2: "Ding " -0x8ba3: "Fu " -0x8ba4: "Ren " -0x8ba5: "Ji " -0x8ba6: "Jie " -0x8ba7: "Hong " -0x8ba8: "Tao " -0x8ba9: "Rang " -0x8baa: "Shan " -0x8bab: "Qi " -0x8bac: "Tuo " -0x8bad: "Xun " -0x8bae: "Yi " -0x8baf: "Xun " -0x8bb0: "Ji " -0x8bb1: "Ren " -0x8bb2: "Jiang " -0x8bb3: "Hui " -0x8bb4: "Ou " -0x8bb5: "Ju " -0x8bb6: "Ya " -0x8bb7: "Ne " -0x8bb8: "Xu " -0x8bb9: "E " -0x8bba: "Lun " -0x8bbb: "Xiong " -0x8bbc: "Song " -0x8bbd: "Feng " -0x8bbe: "She " -0x8bbf: "Fang " -0x8bc0: "Jue " -0x8bc1: "Zheng " -0x8bc2: "Gu " -0x8bc3: "He " -0x8bc4: "Ping " -0x8bc5: "Zu " -0x8bc6: "Shi " -0x8bc7: "Xiong " -0x8bc8: "Zha " -0x8bc9: "Su " -0x8bca: "Zhen " -0x8bcb: "Di " -0x8bcc: "Zou " -0x8bcd: "Ci " -0x8bce: "Qu " -0x8bcf: "Zhao " -0x8bd0: "Bi " -0x8bd1: "Yi " -0x8bd2: "Yi " -0x8bd3: "Kuang " -0x8bd4: "Lei " -0x8bd5: "Shi " -0x8bd6: "Gua " -0x8bd7: "Shi " -0x8bd8: "Jie " -0x8bd9: "Hui " -0x8bda: "Cheng " -0x8bdb: "Zhu " -0x8bdc: "Shen " -0x8bdd: "Hua " -0x8bde: "Dan " -0x8bdf: "Gou " -0x8be0: "Quan " -0x8be1: "Gui " -0x8be2: "Xun " -0x8be3: "Yi " -0x8be4: "Zheng " -0x8be5: "Gai " -0x8be6: "Xiang " -0x8be7: "Cha " -0x8be8: "Hun " -0x8be9: "Xu " -0x8bea: "Zhou " -0x8beb: "Jie " -0x8bec: "Wu " -0x8bed: "Yu " -0x8bee: "Qiao " -0x8bef: "Wu " -0x8bf0: "Gao " -0x8bf1: "You " -0x8bf2: "Hui " -0x8bf3: "Kuang " -0x8bf4: "Shuo " -0x8bf5: "Song " -0x8bf6: "Ai " -0x8bf7: "Qing " -0x8bf8: "Zhu " -0x8bf9: "Zou " -0x8bfa: "Nuo " -0x8bfb: "Du " -0x8bfc: "Zhuo " -0x8bfd: "Fei " -0x8bfe: "Ke " -0x8bff: "Wei " -/* x08c */ -0x8c00: "Yu " -0x8c01: "Shui " -0x8c02: "Shen " -0x8c03: "Diao " -0x8c04: "Chan " -0x8c05: "Liang " -0x8c06: "Zhun " -0x8c07: "Sui " -0x8c08: "Tan " -0x8c09: "Shen " -0x8c0a: "Yi " -0x8c0b: "Mou " -0x8c0c: "Chen " -0x8c0d: "Die " -0x8c0e: "Huang " -0x8c0f: "Jian " -0x8c10: "Xie " -0x8c11: "Nue " -0x8c12: "Ye " -0x8c13: "Wei " -0x8c14: "E " -0x8c15: "Yu " -0x8c16: "Xuan " -0x8c17: "Chan " -0x8c18: "Zi " -0x8c19: "An " -0x8c1a: "Yan " -0x8c1b: "Di " -0x8c1c: "Mi " -0x8c1d: "Pian " -0x8c1e: "Xu " -0x8c1f: "Mo " -0x8c20: "Dang " -0x8c21: "Su " -0x8c22: "Xie " -0x8c23: "Yao " -0x8c24: "Bang " -0x8c25: "Shi " -0x8c26: "Qian " -0x8c27: "Mi " -0x8c28: "Jin " -0x8c29: "Man " -0x8c2a: "Zhe " -0x8c2b: "Jian " -0x8c2c: "Miu " -0x8c2d: "Tan " -0x8c2e: "Zen " -0x8c2f: "Qiao " -0x8c30: "Lan " -0x8c31: "Pu " -0x8c32: "Jue " -0x8c33: "Yan " -0x8c34: "Qian " -0x8c35: "Zhan " -0x8c36: "Chen " -0x8c37: "Gu " -0x8c38: "Qian " -0x8c39: "Hong " -0x8c3a: "Xia " -0x8c3b: "Jue " -0x8c3c: "Hong " -0x8c3d: "Han " -0x8c3e: "Hong " -0x8c3f: "Xi " -0x8c40: "Xi " -0x8c41: "Huo " -0x8c42: "Liao " -0x8c43: "Han " -0x8c44: "Du " -0x8c45: "Long " -0x8c46: "Dou " -0x8c47: "Jiang " -0x8c48: "Qi " -0x8c49: "Shi " -0x8c4a: "Li " -0x8c4b: "Deng " -0x8c4c: "Wan " -0x8c4d: "Bi " -0x8c4e: "Shu " -0x8c4f: "Xian " -0x8c50: "Feng " -0x8c51: "Zhi " -0x8c52: "Zhi " -0x8c53: "Yan " -0x8c54: "Yan " -0x8c55: "Shi " -0x8c56: "Chu " -0x8c57: "Hui " -0x8c58: "Tun " -0x8c59: "Yi " -0x8c5a: "Tun " -0x8c5b: "Yi " -0x8c5c: "Jian " -0x8c5d: "Ba " -0x8c5e: "Hou " -0x8c5f: "E " -0x8c60: "Cu " -0x8c61: "Xiang " -0x8c62: "Huan " -0x8c63: "Jian " -0x8c64: "Ken " -0x8c65: "Gai " -0x8c66: "Qu " -0x8c67: "Fu " -0x8c68: "Xi " -0x8c69: "Bin " -0x8c6a: "Hao " -0x8c6b: "Yu " -0x8c6c: "Zhu " -0x8c6d: "Jia " -0x8c6e: "[?] " -0x8c6f: "Xi " -0x8c70: "Bo " -0x8c71: "Wen " -0x8c72: "Huan " -0x8c73: "Bin " -0x8c74: "Di " -0x8c75: "Zong " -0x8c76: "Fen " -0x8c77: "Yi " -0x8c78: "Zhi " -0x8c79: "Bao " -0x8c7a: "Chai " -0x8c7b: "Han " -0x8c7c: "Pi " -0x8c7d: "Na " -0x8c7e: "Pi " -0x8c7f: "Gou " -0x8c80: "Na " -0x8c81: "You " -0x8c82: "Diao " -0x8c83: "Mo " -0x8c84: "Si " -0x8c85: "Xiu " -0x8c86: "Huan " -0x8c87: "Kun " -0x8c88: "He " -0x8c89: "He " -0x8c8a: "Mo " -0x8c8b: "Han " -0x8c8c: "Mao " -0x8c8d: "Li " -0x8c8e: "Ni " -0x8c8f: "Bi " -0x8c90: "Yu " -0x8c91: "Jia " -0x8c92: "Tuan " -0x8c93: "Mao " -0x8c94: "Pi " -0x8c95: "Xi " -0x8c96: "E " -0x8c97: "Ju " -0x8c98: "Mo " -0x8c99: "Chu " -0x8c9a: "Tan " -0x8c9b: "Huan " -0x8c9c: "Jue " -0x8c9d: "Bei " -0x8c9e: "Zhen " -0x8c9f: "Yuan " -0x8ca0: "Fu " -0x8ca1: "Cai " -0x8ca2: "Gong " -0x8ca3: "Te " -0x8ca4: "Yi " -0x8ca5: "Hang " -0x8ca6: "Wan " -0x8ca7: "Pin " -0x8ca8: "Huo " -0x8ca9: "Fan " -0x8caa: "Tan " -0x8cab: "Guan " -0x8cac: "Ze " -0x8cad: "Zhi " -0x8cae: "Er " -0x8caf: "Zhu " -0x8cb0: "Shi " -0x8cb1: "Bi " -0x8cb2: "Zi " -0x8cb3: "Er " -0x8cb4: "Gui " -0x8cb5: "Pian " -0x8cb6: "Bian " -0x8cb7: "Mai " -0x8cb8: "Dai " -0x8cb9: "Sheng " -0x8cba: "Kuang " -0x8cbb: "Fei " -0x8cbc: "Tie " -0x8cbd: "Yi " -0x8cbe: "Chi " -0x8cbf: "Mao " -0x8cc0: "He " -0x8cc1: "Bi " -0x8cc2: "Lu " -0x8cc3: "Ren " -0x8cc4: "Hui " -0x8cc5: "Gai " -0x8cc6: "Pian " -0x8cc7: "Zi " -0x8cc8: "Jia " -0x8cc9: "Xu " -0x8cca: "Zei " -0x8ccb: "Jiao " -0x8ccc: "Gai " -0x8ccd: "Zang " -0x8cce: "Jian " -0x8ccf: "Ying " -0x8cd0: "Xun " -0x8cd1: "Zhen " -0x8cd2: "She " -0x8cd3: "Bin " -0x8cd4: "Bin " -0x8cd5: "Qiu " -0x8cd6: "She " -0x8cd7: "Chuan " -0x8cd8: "Zang " -0x8cd9: "Zhou " -0x8cda: "Lai " -0x8cdb: "Zan " -0x8cdc: "Si " -0x8cdd: "Chen " -0x8cde: "Shang " -0x8cdf: "Tian " -0x8ce0: "Pei " -0x8ce1: "Geng " -0x8ce2: "Xian " -0x8ce3: "Mai " -0x8ce4: "Jian " -0x8ce5: "Sui " -0x8ce6: "Fu " -0x8ce7: "Tan " -0x8ce8: "Cong " -0x8ce9: "Cong " -0x8cea: "Zhi " -0x8ceb: "Ji " -0x8cec: "Zhang " -0x8ced: "Du " -0x8cee: "Jin " -0x8cef: "Xiong " -0x8cf0: "Shun " -0x8cf1: "Yun " -0x8cf2: "Bao " -0x8cf3: "Zai " -0x8cf4: "Lai " -0x8cf5: "Feng " -0x8cf6: "Cang " -0x8cf7: "Ji " -0x8cf8: "Sheng " -0x8cf9: "Ai " -0x8cfa: "Zhuan " -0x8cfb: "Fu " -0x8cfc: "Gou " -0x8cfd: "Sai " -0x8cfe: "Ze " -0x8cff: "Liao " -/* x08d */ -0x8d00: "Wei " -0x8d01: "Bai " -0x8d02: "Chen " -0x8d03: "Zhuan " -0x8d04: "Zhi " -0x8d05: "Zhui " -0x8d06: "Biao " -0x8d07: "Yun " -0x8d08: "Zeng " -0x8d09: "Tan " -0x8d0a: "Zan " -0x8d0b: "Yan " -0x8d0c: "[?] " -0x8d0d: "Shan " -0x8d0e: "Wan " -0x8d0f: "Ying " -0x8d10: "Jin " -0x8d11: "Gan " -0x8d12: "Xian " -0x8d13: "Zang " -0x8d14: "Bi " -0x8d15: "Du " -0x8d16: "Shu " -0x8d17: "Yan " -0x8d18: "[?] " -0x8d19: "Xuan " -0x8d1a: "Long " -0x8d1b: "Gan " -0x8d1c: "Zang " -0x8d1d: "Bei " -0x8d1e: "Zhen " -0x8d1f: "Fu " -0x8d20: "Yuan " -0x8d21: "Gong " -0x8d22: "Cai " -0x8d23: "Ze " -0x8d24: "Xian " -0x8d25: "Bai " -0x8d26: "Zhang " -0x8d27: "Huo " -0x8d28: "Zhi " -0x8d29: "Fan " -0x8d2a: "Tan " -0x8d2b: "Pin " -0x8d2c: "Bian " -0x8d2d: "Gou " -0x8d2e: "Zhu " -0x8d2f: "Guan " -0x8d30: "Er " -0x8d31: "Jian " -0x8d32: "Bi " -0x8d33: "Shi " -0x8d34: "Tie " -0x8d35: "Gui " -0x8d36: "Kuang " -0x8d37: "Dai " -0x8d38: "Mao " -0x8d39: "Fei " -0x8d3a: "He " -0x8d3b: "Yi " -0x8d3c: "Zei " -0x8d3d: "Zhi " -0x8d3e: "Jia " -0x8d3f: "Hui " -0x8d40: "Zi " -0x8d41: "Ren " -0x8d42: "Lu " -0x8d43: "Zang " -0x8d44: "Zi " -0x8d45: "Gai " -0x8d46: "Jin " -0x8d47: "Qiu " -0x8d48: "Zhen " -0x8d49: "Lai " -0x8d4a: "She " -0x8d4b: "Fu " -0x8d4c: "Du " -0x8d4d: "Ji " -0x8d4e: "Shu " -0x8d4f: "Shang " -0x8d50: "Si " -0x8d51: "Bi " -0x8d52: "Zhou " -0x8d53: "Geng " -0x8d54: "Pei " -0x8d55: "Tan " -0x8d56: "Lai " -0x8d57: "Feng " -0x8d58: "Zhui " -0x8d59: "Fu " -0x8d5a: "Zhuan " -0x8d5b: "Sai " -0x8d5c: "Ze " -0x8d5d: "Yan " -0x8d5e: "Zan " -0x8d5f: "Yun " -0x8d60: "Zeng " -0x8d61: "Shan " -0x8d62: "Ying " -0x8d63: "Gan " -0x8d64: "Chi " -0x8d65: "Xi " -0x8d66: "She " -0x8d67: "Nan " -0x8d68: "Xiong " -0x8d69: "Xi " -0x8d6a: "Cheng " -0x8d6b: "He " -0x8d6c: "Cheng " -0x8d6d: "Zhe " -0x8d6e: "Xia " -0x8d6f: "Tang " -0x8d70: "Zou " -0x8d71: "Zou " -0x8d72: "Li " -0x8d73: "Jiu " -0x8d74: "Fu " -0x8d75: "Zhao " -0x8d76: "Gan " -0x8d77: "Qi " -0x8d78: "Shan " -0x8d79: "Qiong " -0x8d7a: "Qin " -0x8d7b: "Xian " -0x8d7c: "Ci " -0x8d7d: "Jue " -0x8d7e: "Qin " -0x8d7f: "Chi " -0x8d80: "Ci " -0x8d81: "Chen " -0x8d82: "Chen " -0x8d83: "Die " -0x8d84: "Ju " -0x8d85: "Chao " -0x8d86: "Di " -0x8d87: "Se " -0x8d88: "Zhan " -0x8d89: "Zhu " -0x8d8a: "Yue " -0x8d8b: "Qu " -0x8d8c: "Jie " -0x8d8d: "Chi " -0x8d8e: "Chu " -0x8d8f: "Gua " -0x8d90: "Xue " -0x8d91: "Ci " -0x8d92: "Tiao " -0x8d93: "Duo " -0x8d94: "Lie " -0x8d95: "Gan " -0x8d96: "Suo " -0x8d97: "Cu " -0x8d98: "Xi " -0x8d99: "Zhao " -0x8d9a: "Su " -0x8d9b: "Yin " -0x8d9c: "Ju " -0x8d9d: "Jian " -0x8d9e: "Que " -0x8d9f: "Tang " -0x8da0: "Chuo " -0x8da1: "Cui " -0x8da2: "Lu " -0x8da3: "Qu " -0x8da4: "Dang " -0x8da5: "Qiu " -0x8da6: "Zi " -0x8da7: "Ti " -0x8da8: "Qu " -0x8da9: "Chi " -0x8daa: "Huang " -0x8dab: "Qiao " -0x8dac: "Qiao " -0x8dad: "Yao " -0x8dae: "Zao " -0x8daf: "Ti " -0x8db0: "[?] " -0x8db1: "Zan " -0x8db2: "Zan " -0x8db3: "Zu " -0x8db4: "Pa " -0x8db5: "Bao " -0x8db6: "Ku " -0x8db7: "Ke " -0x8db8: "Dun " -0x8db9: "Jue " -0x8dba: "Fu " -0x8dbb: "Chen " -0x8dbc: "Jian " -0x8dbd: "Fang " -0x8dbe: "Zhi " -0x8dbf: "Sa " -0x8dc0: "Yue " -0x8dc1: "Pa " -0x8dc2: "Qi " -0x8dc3: "Yue " -0x8dc4: "Qiang " -0x8dc5: "Tuo " -0x8dc6: "Tai " -0x8dc7: "Yi " -0x8dc8: "Nian " -0x8dc9: "Ling " -0x8dca: "Mei " -0x8dcb: "Ba " -0x8dcc: "Die " -0x8dcd: "Ku " -0x8dce: "Tuo " -0x8dcf: "Jia " -0x8dd0: "Ci " -0x8dd1: "Pao " -0x8dd2: "Qia " -0x8dd3: "Zhu " -0x8dd4: "Ju " -0x8dd5: "Die " -0x8dd6: "Zhi " -0x8dd7: "Fu " -0x8dd8: "Pan " -0x8dd9: "Ju " -0x8dda: "Shan " -0x8ddb: "Bo " -0x8ddc: "Ni " -0x8ddd: "Ju " -0x8dde: "Li " -0x8ddf: "Gen " -0x8de0: "Yi " -0x8de1: "Ji " -0x8de2: "Dai " -0x8de3: "Xian " -0x8de4: "Jiao " -0x8de5: "Duo " -0x8de6: "Zhu " -0x8de7: "Zhuan " -0x8de8: "Kua " -0x8de9: "Zhuai " -0x8dea: "Gui " -0x8deb: "Qiong " -0x8dec: "Kui " -0x8ded: "Xiang " -0x8dee: "Chi " -0x8def: "Lu " -0x8df0: "Beng " -0x8df1: "Zhi " -0x8df2: "Jia " -0x8df3: "Tiao " -0x8df4: "Cai " -0x8df5: "Jian " -0x8df6: "Ta " -0x8df7: "Qiao " -0x8df8: "Bi " -0x8df9: "Xian " -0x8dfa: "Duo " -0x8dfb: "Ji " -0x8dfc: "Ju " -0x8dfd: "Ji " -0x8dfe: "Shu " -0x8dff: "Tu " -/* x08e */ -0x8e00: "Chu " -0x8e01: "Jing " -0x8e02: "Nie " -0x8e03: "Xiao " -0x8e04: "Bo " -0x8e05: "Chi " -0x8e06: "Qun " -0x8e07: "Mou " -0x8e08: "Shu " -0x8e09: "Lang " -0x8e0a: "Yong " -0x8e0b: "Jiao " -0x8e0c: "Chou " -0x8e0d: "Qiao " -0x8e0e: "[?] " -0x8e0f: "Ta " -0x8e10: "Jian " -0x8e11: "Qi " -0x8e12: "Wo " -0x8e13: "Wei " -0x8e14: "Zhuo " -0x8e15: "Jie " -0x8e16: "Ji " -0x8e17: "Nie " -0x8e18: "Ju " -0x8e19: "Ju " -0x8e1a: "Lun " -0x8e1b: "Lu " -0x8e1c: "Leng " -0x8e1d: "Huai " -0x8e1e: "Ju " -0x8e1f: "Chi " -0x8e20: "Wan " -0x8e21: "Quan " -0x8e22: "Ti " -0x8e23: "Bo " -0x8e24: "Zu " -0x8e25: "Qie " -0x8e26: "Ji " -0x8e27: "Cu " -0x8e28: "Zong " -0x8e29: "Cai " -0x8e2a: "Zong " -0x8e2b: "Peng " -0x8e2c: "Zhi " -0x8e2d: "Zheng " -0x8e2e: "Dian " -0x8e2f: "Zhi " -0x8e30: "Yu " -0x8e31: "Duo " -0x8e32: "Dun " -0x8e33: "Chun " -0x8e34: "Yong " -0x8e35: "Zhong " -0x8e36: "Di " -0x8e37: "Zhe " -0x8e38: "Chen " -0x8e39: "Chuai " -0x8e3a: "Jian " -0x8e3b: "Gua " -0x8e3c: "Tang " -0x8e3d: "Ju " -0x8e3e: "Fu " -0x8e3f: "Zu " -0x8e40: "Die " -0x8e41: "Pian " -0x8e42: "Rou " -0x8e43: "Nuo " -0x8e44: "Ti " -0x8e45: "Cha " -0x8e46: "Tui " -0x8e47: "Jian " -0x8e48: "Dao " -0x8e49: "Cuo " -0x8e4a: "Xi " -0x8e4b: "Ta " -0x8e4c: "Qiang " -0x8e4d: "Zhan " -0x8e4e: "Dian " -0x8e4f: "Ti " -0x8e50: "Ji " -0x8e51: "Nie " -0x8e52: "Man " -0x8e53: "Liu " -0x8e54: "Zhan " -0x8e55: "Bi " -0x8e56: "Chong " -0x8e57: "Lu " -0x8e58: "Liao " -0x8e59: "Cu " -0x8e5a: "Tang " -0x8e5b: "Dai " -0x8e5c: "Suo " -0x8e5d: "Xi " -0x8e5e: "Kui " -0x8e5f: "Ji " -0x8e60: "Zhi " -0x8e61: "Qiang " -0x8e62: "Di " -0x8e63: "Man " -0x8e64: "Zong " -0x8e65: "Lian " -0x8e66: "Beng " -0x8e67: "Zao " -0x8e68: "Nian " -0x8e69: "Bie " -0x8e6a: "Tui " -0x8e6b: "Ju " -0x8e6c: "Deng " -0x8e6d: "Ceng " -0x8e6e: "Xian " -0x8e6f: "Fan " -0x8e70: "Chu " -0x8e71: "Zhong " -0x8e72: "Dun " -0x8e73: "Bo " -0x8e74: "Cu " -0x8e75: "Zu " -0x8e76: "Jue " -0x8e77: "Jue " -0x8e78: "Lin " -0x8e79: "Ta " -0x8e7a: "Qiao " -0x8e7b: "Qiao " -0x8e7c: "Pu " -0x8e7d: "Liao " -0x8e7e: "Dun " -0x8e7f: "Cuan " -0x8e80: "Kuang " -0x8e81: "Zao " -0x8e82: "Ta " -0x8e83: "Bi " -0x8e84: "Bi " -0x8e85: "Zhu " -0x8e86: "Ju " -0x8e87: "Chu " -0x8e88: "Qiao " -0x8e89: "Dun " -0x8e8a: "Chou " -0x8e8b: "Ji " -0x8e8c: "Wu " -0x8e8d: "Yue " -0x8e8e: "Nian " -0x8e8f: "Lin " -0x8e90: "Lie " -0x8e91: "Zhi " -0x8e92: "Li " -0x8e93: "Zhi " -0x8e94: "Chan " -0x8e95: "Chu " -0x8e96: "Duan " -0x8e97: "Wei " -0x8e98: "Long " -0x8e99: "Lin " -0x8e9a: "Xian " -0x8e9b: "Wei " -0x8e9c: "Zuan " -0x8e9d: "Lan " -0x8e9e: "Xie " -0x8e9f: "Rang " -0x8ea0: "Xie " -0x8ea1: "Nie " -0x8ea2: "Ta " -0x8ea3: "Qu " -0x8ea4: "Jie " -0x8ea5: "Cuan " -0x8ea6: "Zuan " -0x8ea7: "Xi " -0x8ea8: "Kui " -0x8ea9: "Jue " -0x8eaa: "Lin " -0x8eab: "Shen " -0x8eac: "Gong " -0x8ead: "Dan " -0x8eae: "Segare " -0x8eaf: "Qu " -0x8eb0: "Ti " -0x8eb1: "Duo " -0x8eb2: "Duo " -0x8eb3: "Gong " -0x8eb4: "Lang " -0x8eb5: "Nerau " -0x8eb6: "Luo " -0x8eb7: "Ai " -0x8eb8: "Ji " -0x8eb9: "Ju " -0x8eba: "Tang " -0x8ebb: "Utsuke " -0x8ebc: "[?] " -0x8ebd: "Yan " -0x8ebe: "Shitsuke " -0x8ebf: "Kang " -0x8ec0: "Qu " -0x8ec1: "Lou " -0x8ec2: "Lao " -0x8ec3: "Tuo " -0x8ec4: "Zhi " -0x8ec5: "Yagate " -0x8ec6: "Ti " -0x8ec7: "Dao " -0x8ec8: "Yagate " -0x8ec9: "Yu " -0x8eca: "Che " -0x8ecb: "Ya " -0x8ecc: "Gui " -0x8ecd: "Jun " -0x8ece: "Wei " -0x8ecf: "Yue " -0x8ed0: "Xin " -0x8ed1: "Di " -0x8ed2: "Xuan " -0x8ed3: "Fan " -0x8ed4: "Ren " -0x8ed5: "Shan " -0x8ed6: "Qiang " -0x8ed7: "Shu " -0x8ed8: "Tun " -0x8ed9: "Chen " -0x8eda: "Dai " -0x8edb: "E " -0x8edc: "Na " -0x8edd: "Qi " -0x8ede: "Mao " -0x8edf: "Ruan " -0x8ee0: "Ren " -0x8ee1: "Fan " -0x8ee2: "Zhuan " -0x8ee3: "Hong " -0x8ee4: "Hu " -0x8ee5: "Qu " -0x8ee6: "Huang " -0x8ee7: "Di " -0x8ee8: "Ling " -0x8ee9: "Dai " -0x8eea: "Ao " -0x8eeb: "Zhen " -0x8eec: "Fan " -0x8eed: "Kuang " -0x8eee: "Ang " -0x8eef: "Peng " -0x8ef0: "Bei " -0x8ef1: "Gu " -0x8ef2: "Ku " -0x8ef3: "Pao " -0x8ef4: "Zhu " -0x8ef5: "Rong " -0x8ef6: "E " -0x8ef7: "Ba " -0x8ef8: "Zhou " -0x8ef9: "Zhi " -0x8efa: "Yao " -0x8efb: "Ke " -0x8efc: "Yi " -0x8efd: "Qing " -0x8efe: "Shi " -0x8eff: "Ping " -/* x08f */ -0x8f00: "Er " -0x8f01: "Qiong " -0x8f02: "Ju " -0x8f03: "Jiao " -0x8f04: "Guang " -0x8f05: "Lu " -0x8f06: "Kai " -0x8f07: "Quan " -0x8f08: "Zhou " -0x8f09: "Zai " -0x8f0a: "Zhi " -0x8f0b: "She " -0x8f0c: "Liang " -0x8f0d: "Yu " -0x8f0e: "Shao " -0x8f0f: "You " -0x8f10: "Huan " -0x8f11: "Yun " -0x8f12: "Zhe " -0x8f13: "Wan " -0x8f14: "Fu " -0x8f15: "Qing " -0x8f16: "Zhou " -0x8f17: "Ni " -0x8f18: "Ling " -0x8f19: "Zhe " -0x8f1a: "Zhan " -0x8f1b: "Liang " -0x8f1c: "Zi " -0x8f1d: "Hui " -0x8f1e: "Wang " -0x8f1f: "Chuo " -0x8f20: "Guo " -0x8f21: "Kan " -0x8f22: "Yi " -0x8f23: "Peng " -0x8f24: "Qian " -0x8f25: "Gun " -0x8f26: "Nian " -0x8f27: "Pian " -0x8f28: "Guan " -0x8f29: "Bei " -0x8f2a: "Lun " -0x8f2b: "Pai " -0x8f2c: "Liang " -0x8f2d: "Ruan " -0x8f2e: "Rou " -0x8f2f: "Ji " -0x8f30: "Yang " -0x8f31: "Xian " -0x8f32: "Chuan " -0x8f33: "Cou " -0x8f34: "Qun " -0x8f35: "Ge " -0x8f36: "You " -0x8f37: "Hong " -0x8f38: "Shu " -0x8f39: "Fu " -0x8f3a: "Zi " -0x8f3b: "Fu " -0x8f3c: "Wen " -0x8f3d: "Ben " -0x8f3e: "Zhan " -0x8f3f: "Yu " -0x8f40: "Wen " -0x8f41: "Tao " -0x8f42: "Gu " -0x8f43: "Zhen " -0x8f44: "Xia " -0x8f45: "Yuan " -0x8f46: "Lu " -0x8f47: "Jiu " -0x8f48: "Chao " -0x8f49: "Zhuan " -0x8f4a: "Wei " -0x8f4b: "Hun " -0x8f4c: "Sori " -0x8f4d: "Che " -0x8f4e: "Jiao " -0x8f4f: "Zhan " -0x8f50: "Pu " -0x8f51: "Lao " -0x8f52: "Fen " -0x8f53: "Fan " -0x8f54: "Lin " -0x8f55: "Ge " -0x8f56: "Se " -0x8f57: "Kan " -0x8f58: "Huan " -0x8f59: "Yi " -0x8f5a: "Ji " -0x8f5b: "Dui " -0x8f5c: "Er " -0x8f5d: "Yu " -0x8f5e: "Xian " -0x8f5f: "Hong " -0x8f60: "Lei " -0x8f61: "Pei " -0x8f62: "Li " -0x8f63: "Li " -0x8f64: "Lu " -0x8f65: "Lin " -0x8f66: "Che " -0x8f67: "Ya " -0x8f68: "Gui " -0x8f69: "Xuan " -0x8f6a: "Di " -0x8f6b: "Ren " -0x8f6c: "Zhuan " -0x8f6d: "E " -0x8f6e: "Lun " -0x8f6f: "Ruan " -0x8f70: "Hong " -0x8f71: "Ku " -0x8f72: "Ke " -0x8f73: "Lu " -0x8f74: "Zhou " -0x8f75: "Zhi " -0x8f76: "Yi " -0x8f77: "Hu " -0x8f78: "Zhen " -0x8f79: "Li " -0x8f7a: "Yao " -0x8f7b: "Qing " -0x8f7c: "Shi " -0x8f7d: "Zai " -0x8f7e: "Zhi " -0x8f7f: "Jiao " -0x8f80: "Zhou " -0x8f81: "Quan " -0x8f82: "Lu " -0x8f83: "Jiao " -0x8f84: "Zhe " -0x8f85: "Fu " -0x8f86: "Liang " -0x8f87: "Nian " -0x8f88: "Bei " -0x8f89: "Hui " -0x8f8a: "Gun " -0x8f8b: "Wang " -0x8f8c: "Liang " -0x8f8d: "Chuo " -0x8f8e: "Zi " -0x8f8f: "Cou " -0x8f90: "Fu " -0x8f91: "Ji " -0x8f92: "Wen " -0x8f93: "Shu " -0x8f94: "Pei " -0x8f95: "Yuan " -0x8f96: "Xia " -0x8f97: "Zhan " -0x8f98: "Lu " -0x8f99: "Che " -0x8f9a: "Lin " -0x8f9b: "Xin " -0x8f9c: "Gu " -0x8f9d: "Ci " -0x8f9e: "Ci " -0x8f9f: "Pi " -0x8fa0: "Zui " -0x8fa1: "Bian " -0x8fa2: "La " -0x8fa3: "La " -0x8fa4: "Ci " -0x8fa5: "Xue " -0x8fa6: "Ban " -0x8fa7: "Bian " -0x8fa8: "Bian " -0x8fa9: "Bian " -0x8faa: "[?] " -0x8fab: "Bian " -0x8fac: "Ban " -0x8fad: "Ci " -0x8fae: "Bian " -0x8faf: "Bian " -0x8fb0: "Chen " -0x8fb1: "Ru " -0x8fb2: "Nong " -0x8fb3: "Nong " -0x8fb4: "Zhen " -0x8fb5: "Chuo " -0x8fb6: "Chuo " -0x8fb7: "Suberu " -0x8fb8: "Reng " -0x8fb9: "Bian " -0x8fba: "Bian " -0x8fbb: "Sip " -0x8fbc: "Ip " -0x8fbd: "Liao " -0x8fbe: "Da " -0x8fbf: "Chan " -0x8fc0: "Gan " -0x8fc1: "Qian " -0x8fc2: "Yu " -0x8fc3: "Yu " -0x8fc4: "Qi " -0x8fc5: "Xun " -0x8fc6: "Yi " -0x8fc7: "Guo " -0x8fc8: "Mai " -0x8fc9: "Qi " -0x8fca: "Za " -0x8fcb: "Wang " -0x8fcc: "Jia " -0x8fcd: "Zhun " -0x8fce: "Ying " -0x8fcf: "Ti " -0x8fd0: "Yun " -0x8fd1: "Jin " -0x8fd2: "Hang " -0x8fd3: "Ya " -0x8fd4: "Fan " -0x8fd5: "Wu " -0x8fd6: "Da " -0x8fd7: "E " -0x8fd8: "Huan " -0x8fd9: "Zhe " -0x8fda: "Totemo " -0x8fdb: "Jin " -0x8fdc: "Yuan " -0x8fdd: "Wei " -0x8fde: "Lian " -0x8fdf: "Chi " -0x8fe0: "Che " -0x8fe1: "Ni " -0x8fe2: "Tiao " -0x8fe3: "Zhi " -0x8fe4: "Yi " -0x8fe5: "Jiong " -0x8fe6: "Jia " -0x8fe7: "Chen " -0x8fe8: "Dai " -0x8fe9: "Er " -0x8fea: "Di " -0x8feb: "Po " -0x8fec: "Wang " -0x8fed: "Die " -0x8fee: "Ze " -0x8fef: "Tao " -0x8ff0: "Shu " -0x8ff1: "Tuo " -0x8ff2: "Kep " -0x8ff3: "Jing " -0x8ff4: "Hui " -0x8ff5: "Tong " -0x8ff6: "You " -0x8ff7: "Mi " -0x8ff8: "Beng " -0x8ff9: "Ji " -0x8ffa: "Nai " -0x8ffb: "Yi " -0x8ffc: "Jie " -0x8ffd: "Zhui " -0x8ffe: "Lie " -0x8fff: "Xun " -/* x090 */ -0x9000: "Tui " -0x9001: "Song " -0x9002: "Gua " -0x9003: "Tao " -0x9004: "Pang " -0x9005: "Hou " -0x9006: "Ni " -0x9007: "Dun " -0x9008: "Jiong " -0x9009: "Xuan " -0x900a: "Xun " -0x900b: "Bu " -0x900c: "You " -0x900d: "Xiao " -0x900e: "Qiu " -0x900f: "Tou " -0x9010: "Zhu " -0x9011: "Qiu " -0x9012: "Di " -0x9013: "Di " -0x9014: "Tu " -0x9015: "Jing " -0x9016: "Ti " -0x9017: "Dou " -0x9018: "Yi " -0x9019: "Zhe " -0x901a: "Tong " -0x901b: "Guang " -0x901c: "Wu " -0x901d: "Shi " -0x901e: "Cheng " -0x901f: "Su " -0x9020: "Zao " -0x9021: "Qun " -0x9022: "Feng " -0x9023: "Lian " -0x9024: "Suo " -0x9025: "Hui " -0x9026: "Li " -0x9027: "Sako " -0x9028: "Lai " -0x9029: "Ben " -0x902a: "Cuo " -0x902b: "Jue " -0x902c: "Beng " -0x902d: "Huan " -0x902e: "Dai " -0x902f: "Lu " -0x9030: "You " -0x9031: "Zhou " -0x9032: "Jin " -0x9033: "Yu " -0x9034: "Chuo " -0x9035: "Kui " -0x9036: "Wei " -0x9037: "Ti " -0x9038: "Yi " -0x9039: "Da " -0x903a: "Yuan " -0x903b: "Luo " -0x903c: "Bi " -0x903d: "Nuo " -0x903e: "Yu " -0x903f: "Dang " -0x9040: "Sui " -0x9041: "Dun " -0x9042: "Sui " -0x9043: "Yan " -0x9044: "Chuan " -0x9045: "Chi " -0x9046: "Ti " -0x9047: "Yu " -0x9048: "Shi " -0x9049: "Zhen " -0x904a: "You " -0x904b: "Yun " -0x904c: "E " -0x904d: "Bian " -0x904e: "Guo " -0x904f: "E " -0x9050: "Xia " -0x9051: "Huang " -0x9052: "Qiu " -0x9053: "Dao " -0x9054: "Da " -0x9055: "Wei " -0x9056: "Appare " -0x9057: "Yi " -0x9058: "Gou " -0x9059: "Yao " -0x905a: "Chu " -0x905b: "Liu " -0x905c: "Xun " -0x905d: "Ta " -0x905e: "Di " -0x905f: "Chi " -0x9060: "Yuan " -0x9061: "Su " -0x9062: "Ta " -0x9063: "Qian " -0x9064: "[?] " -0x9065: "Yao " -0x9066: "Guan " -0x9067: "Zhang " -0x9068: "Ao " -0x9069: "Shi " -0x906a: "Ce " -0x906b: "Chi " -0x906c: "Su " -0x906d: "Zao " -0x906e: "Zhe " -0x906f: "Dun " -0x9070: "Di " -0x9071: "Lou " -0x9072: "Chi " -0x9073: "Cuo " -0x9074: "Lin " -0x9075: "Zun " -0x9076: "Rao " -0x9077: "Qian " -0x9078: "Xuan " -0x9079: "Yu " -0x907a: "Yi " -0x907b: "Wu " -0x907c: "Liao " -0x907d: "Ju " -0x907e: "Shi " -0x907f: "Bi " -0x9080: "Yao " -0x9081: "Mai " -0x9082: "Xie " -0x9083: "Sui " -0x9084: "Huan " -0x9085: "Zhan " -0x9086: "Teng " -0x9087: "Er " -0x9088: "Miao " -0x9089: "Bian " -0x908a: "Bian " -0x908b: "La " -0x908c: "Li " -0x908d: "Yuan " -0x908e: "Yao " -0x908f: "Luo " -0x9090: "Li " -0x9091: "Yi " -0x9092: "Ting " -0x9093: "Deng " -0x9094: "Qi " -0x9095: "Yong " -0x9096: "Shan " -0x9097: "Han " -0x9098: "Yu " -0x9099: "Mang " -0x909a: "Ru " -0x909b: "Qiong " -0x909c: "[?] " -0x909d: "Kuang " -0x909e: "Fu " -0x909f: "Kang " -0x90a0: "Bin " -0x90a1: "Fang " -0x90a2: "Xing " -0x90a3: "Na " -0x90a4: "Xin " -0x90a5: "Shen " -0x90a6: "Bang " -0x90a7: "Yuan " -0x90a8: "Cun " -0x90a9: "Huo " -0x90aa: "Xie " -0x90ab: "Bang " -0x90ac: "Wu " -0x90ad: "Ju " -0x90ae: "You " -0x90af: "Han " -0x90b0: "Tai " -0x90b1: "Qiu " -0x90b2: "Bi " -0x90b3: "Pei " -0x90b4: "Bing " -0x90b5: "Shao " -0x90b6: "Bei " -0x90b7: "Wa " -0x90b8: "Di " -0x90b9: "Zou " -0x90ba: "Ye " -0x90bb: "Lin " -0x90bc: "Kuang " -0x90bd: "Gui " -0x90be: "Zhu " -0x90bf: "Shi " -0x90c0: "Ku " -0x90c1: "Yu " -0x90c2: "Gai " -0x90c3: "Ge " -0x90c4: "Xi " -0x90c5: "Zhi " -0x90c6: "Ji " -0x90c7: "Xun " -0x90c8: "Hou " -0x90c9: "Xing " -0x90ca: "Jiao " -0x90cb: "Xi " -0x90cc: "Gui " -0x90cd: "Nuo " -0x90ce: "Lang " -0x90cf: "Jia " -0x90d0: "Kuai " -0x90d1: "Zheng " -0x90d2: "Otoko " -0x90d3: "Yun " -0x90d4: "Yan " -0x90d5: "Cheng " -0x90d6: "Dou " -0x90d7: "Chi " -0x90d8: "Lu " -0x90d9: "Fu " -0x90da: "Wu " -0x90db: "Fu " -0x90dc: "Gao " -0x90dd: "Hao " -0x90de: "Lang " -0x90df: "Jia " -0x90e0: "Geng " -0x90e1: "Jun " -0x90e2: "Ying " -0x90e3: "Bo " -0x90e4: "Xi " -0x90e5: "Bei " -0x90e6: "Li " -0x90e7: "Yun " -0x90e8: "Bu " -0x90e9: "Xiao " -0x90ea: "Qi " -0x90eb: "Pi " -0x90ec: "Qing " -0x90ed: "Guo " -0x90ee: "Zhou " -0x90ef: "Tan " -0x90f0: "Zou " -0x90f1: "Ping " -0x90f2: "Lai " -0x90f3: "Ni " -0x90f4: "Chen " -0x90f5: "You " -0x90f6: "Bu " -0x90f7: "Xiang " -0x90f8: "Dan " -0x90f9: "Ju " -0x90fa: "Yong " -0x90fb: "Qiao " -0x90fc: "Yi " -0x90fd: "Du " -0x90fe: "Yan " -0x90ff: "Mei " -/* x091 */ -0x9100: "Ruo " -0x9101: "Bei " -0x9102: "E " -0x9103: "Yu " -0x9104: "Juan " -0x9105: "Yu " -0x9106: "Yun " -0x9107: "Hou " -0x9108: "Kui " -0x9109: "Xiang " -0x910a: "Xiang " -0x910b: "Sou " -0x910c: "Tang " -0x910d: "Ming " -0x910e: "Xi " -0x910f: "Ru " -0x9110: "Chu " -0x9111: "Zi " -0x9112: "Zou " -0x9113: "Ju " -0x9114: "Wu " -0x9115: "Xiang " -0x9116: "Yun " -0x9117: "Hao " -0x9118: "Yong " -0x9119: "Bi " -0x911a: "Mo " -0x911b: "Chao " -0x911c: "Fu " -0x911d: "Liao " -0x911e: "Yin " -0x911f: "Zhuan " -0x9120: "Hu " -0x9121: "Qiao " -0x9122: "Yan " -0x9123: "Zhang " -0x9124: "Fan " -0x9125: "Qiao " -0x9126: "Xu " -0x9127: "Deng " -0x9128: "Bi " -0x9129: "Xin " -0x912a: "Bi " -0x912b: "Ceng " -0x912c: "Wei " -0x912d: "Zheng " -0x912e: "Mao " -0x912f: "Shan " -0x9130: "Lin " -0x9131: "Po " -0x9132: "Dan " -0x9133: "Meng " -0x9134: "Ye " -0x9135: "Cao " -0x9136: "Kuai " -0x9137: "Feng " -0x9138: "Meng " -0x9139: "Zou " -0x913a: "Kuang " -0x913b: "Lian " -0x913c: "Zan " -0x913d: "Chan " -0x913e: "You " -0x913f: "Qi " -0x9140: "Yan " -0x9141: "Chan " -0x9142: "Zan " -0x9143: "Ling " -0x9144: "Huan " -0x9145: "Xi " -0x9146: "Feng " -0x9147: "Zan " -0x9148: "Li " -0x9149: "You " -0x914a: "Ding " -0x914b: "Qiu " -0x914c: "Zhuo " -0x914d: "Pei " -0x914e: "Zhou " -0x914f: "Yi " -0x9150: "Hang " -0x9151: "Yu " -0x9152: "Jiu " -0x9153: "Yan " -0x9154: "Zui " -0x9155: "Mao " -0x9156: "Dan " -0x9157: "Xu " -0x9158: "Tou " -0x9159: "Zhen " -0x915a: "Fen " -0x915b: "Sakenomoto " -0x915c: "[?] " -0x915d: "Yun " -0x915e: "Tai " -0x915f: "Tian " -0x9160: "Qia " -0x9161: "Tuo " -0x9162: "Zuo " -0x9163: "Han " -0x9164: "Gu " -0x9165: "Su " -0x9166: "Po " -0x9167: "Chou " -0x9168: "Zai " -0x9169: "Ming " -0x916a: "Luo " -0x916b: "Chuo " -0x916c: "Chou " -0x916d: "You " -0x916e: "Tong " -0x916f: "Zhi " -0x9170: "Xian " -0x9171: "Jiang " -0x9172: "Cheng " -0x9173: "Yin " -0x9174: "Tu " -0x9175: "Xiao " -0x9176: "Mei " -0x9177: "Ku " -0x9178: "Suan " -0x9179: "Lei " -0x917a: "Pu " -0x917b: "Zui " -0x917c: "Hai " -0x917d: "Yan " -0x917e: "Xi " -0x917f: "Niang " -0x9180: "Wei " -0x9181: "Lu " -0x9182: "Lan " -0x9183: "Yan " -0x9184: "Tao " -0x9185: "Pei " -0x9186: "Zhan " -0x9187: "Chun " -0x9188: "Tan " -0x9189: "Zui " -0x918a: "Chuo " -0x918b: "Cu " -0x918c: "Kun " -0x918d: "Ti " -0x918e: "Mian " -0x918f: "Du " -0x9190: "Hu " -0x9191: "Xu " -0x9192: "Xing " -0x9193: "Tan " -0x9194: "Jiu " -0x9195: "Chun " -0x9196: "Yun " -0x9197: "Po " -0x9198: "Ke " -0x9199: "Sou " -0x919a: "Mi " -0x919b: "Quan " -0x919c: "Chou " -0x919d: "Cuo " -0x919e: "Yun " -0x919f: "Yong " -0x91a0: "Ang " -0x91a1: "Zha " -0x91a2: "Hai " -0x91a3: "Tang " -0x91a4: "Jiang " -0x91a5: "Piao " -0x91a6: "Shan " -0x91a7: "Yu " -0x91a8: "Li " -0x91a9: "Zao " -0x91aa: "Lao " -0x91ab: "Yi " -0x91ac: "Jiang " -0x91ad: "Pu " -0x91ae: "Jiao " -0x91af: "Xi " -0x91b0: "Tan " -0x91b1: "Po " -0x91b2: "Nong " -0x91b3: "Yi " -0x91b4: "Li " -0x91b5: "Ju " -0x91b6: "Jiao " -0x91b7: "Yi " -0x91b8: "Niang " -0x91b9: "Ru " -0x91ba: "Xun " -0x91bb: "Chou " -0x91bc: "Yan " -0x91bd: "Ling " -0x91be: "Mi " -0x91bf: "Mi " -0x91c0: "Niang " -0x91c1: "Xin " -0x91c2: "Jiao " -0x91c3: "Xi " -0x91c4: "Mi " -0x91c5: "Yan " -0x91c6: "Bian " -0x91c7: "Cai " -0x91c8: "Shi " -0x91c9: "You " -0x91ca: "Shi " -0x91cb: "Shi " -0x91cc: "Li " -0x91cd: "Zhong " -0x91ce: "Ye " -0x91cf: "Liang " -0x91d0: "Li " -0x91d1: "Jin " -0x91d2: "Jin " -0x91d3: "Qiu " -0x91d4: "Yi " -0x91d5: "Diao " -0x91d6: "Dao " -0x91d7: "Zhao " -0x91d8: "Ding " -0x91d9: "Po " -0x91da: "Qiu " -0x91db: "He " -0x91dc: "Fu " -0x91dd: "Zhen " -0x91de: "Zhi " -0x91df: "Ba " -0x91e0: "Luan " -0x91e1: "Fu " -0x91e2: "Nai " -0x91e3: "Diao " -0x91e4: "Shan " -0x91e5: "Qiao " -0x91e6: "Kou " -0x91e7: "Chuan " -0x91e8: "Zi " -0x91e9: "Fan " -0x91ea: "Yu " -0x91eb: "Hua " -0x91ec: "Han " -0x91ed: "Gong " -0x91ee: "Qi " -0x91ef: "Mang " -0x91f0: "Ri " -0x91f1: "Di " -0x91f2: "Si " -0x91f3: "Xi " -0x91f4: "Yi " -0x91f5: "Chai " -0x91f6: "Shi " -0x91f7: "Tu " -0x91f8: "Xi " -0x91f9: "Nu " -0x91fa: "Qian " -0x91fb: "Ishiyumi " -0x91fc: "Jian " -0x91fd: "Pi " -0x91fe: "Ye " -0x91ff: "Yin " -/* x092 */ -0x9200: "Ba " -0x9201: "Fang " -0x9202: "Chen " -0x9203: "Xing " -0x9204: "Tou " -0x9205: "Yue " -0x9206: "Yan " -0x9207: "Fu " -0x9208: "Pi " -0x9209: "Na " -0x920a: "Xin " -0x920b: "E " -0x920c: "Jue " -0x920d: "Dun " -0x920e: "Gou " -0x920f: "Yin " -0x9210: "Qian " -0x9211: "Ban " -0x9212: "Ji " -0x9213: "Ren " -0x9214: "Chao " -0x9215: "Niu " -0x9216: "Fen " -0x9217: "Yun " -0x9218: "Ji " -0x9219: "Qin " -0x921a: "Pi " -0x921b: "Guo " -0x921c: "Hong " -0x921d: "Yin " -0x921e: "Jun " -0x921f: "Shi " -0x9220: "Yi " -0x9221: "Zhong " -0x9222: "Nie " -0x9223: "Gai " -0x9224: "Ri " -0x9225: "Huo " -0x9226: "Tai " -0x9227: "Kang " -0x9228: "Habaki " -0x9229: "Irori " -0x922a: "Ngaak " -0x922b: "[?] " -0x922c: "Duo " -0x922d: "Zi " -0x922e: "Ni " -0x922f: "Tu " -0x9230: "Shi " -0x9231: "Min " -0x9232: "Gu " -0x9233: "E " -0x9234: "Ling " -0x9235: "Bing " -0x9236: "Yi " -0x9237: "Gu " -0x9238: "Ba " -0x9239: "Pi " -0x923a: "Yu " -0x923b: "Si " -0x923c: "Zuo " -0x923d: "Bu " -0x923e: "You " -0x923f: "Dian " -0x9240: "Jia " -0x9241: "Zhen " -0x9242: "Shi " -0x9243: "Shi " -0x9244: "Tie " -0x9245: "Ju " -0x9246: "Zhan " -0x9247: "Shi " -0x9248: "She " -0x9249: "Xuan " -0x924a: "Zhao " -0x924b: "Bao " -0x924c: "He " -0x924d: "Bi " -0x924e: "Sheng " -0x924f: "Chu " -0x9250: "Shi " -0x9251: "Bo " -0x9252: "Zhu " -0x9253: "Chi " -0x9254: "Za " -0x9255: "Po " -0x9256: "Tong " -0x9257: "Qian " -0x9258: "Fu " -0x9259: "Zhai " -0x925a: "Liu " -0x925b: "Qian " -0x925c: "Fu " -0x925d: "Li " -0x925e: "Yue " -0x925f: "Pi " -0x9260: "Yang " -0x9261: "Ban " -0x9262: "Bo " -0x9263: "Jie " -0x9264: "Gou " -0x9265: "Shu " -0x9266: "Zheng " -0x9267: "Mu " -0x9268: "Ni " -0x9269: "Nie " -0x926a: "Di " -0x926b: "Jia " -0x926c: "Mu " -0x926d: "Dan " -0x926e: "Shen " -0x926f: "Yi " -0x9270: "Si " -0x9271: "Kuang " -0x9272: "Ka " -0x9273: "Bei " -0x9274: "Jian " -0x9275: "Tong " -0x9276: "Xing " -0x9277: "Hong " -0x9278: "Jiao " -0x9279: "Chi " -0x927a: "Er " -0x927b: "Ge " -0x927c: "Bing " -0x927d: "Shi " -0x927e: "Mou " -0x927f: "Jia " -0x9280: "Yin " -0x9281: "Jun " -0x9282: "Zhou " -0x9283: "Chong " -0x9284: "Shang " -0x9285: "Tong " -0x9286: "Mo " -0x9287: "Lei " -0x9288: "Ji " -0x9289: "Yu " -0x928a: "Xu " -0x928b: "Ren " -0x928c: "Zun " -0x928d: "Zhi " -0x928e: "Qiong " -0x928f: "Shan " -0x9290: "Chi " -0x9291: "Xian " -0x9292: "Xing " -0x9293: "Quan " -0x9294: "Pi " -0x9295: "Tie " -0x9296: "Zhu " -0x9297: "Hou " -0x9298: "Ming " -0x9299: "Kua " -0x929a: "Yao " -0x929b: "Xian " -0x929c: "Xian " -0x929d: "Xiu " -0x929e: "Jun " -0x929f: "Cha " -0x92a0: "Lao " -0x92a1: "Ji " -0x92a2: "Pi " -0x92a3: "Ru " -0x92a4: "Mi " -0x92a5: "Yi " -0x92a6: "Yin " -0x92a7: "Guang " -0x92a8: "An " -0x92a9: "Diou " -0x92aa: "You " -0x92ab: "Se " -0x92ac: "Kao " -0x92ad: "Qian " -0x92ae: "Luan " -0x92af: "Kasugai " -0x92b0: "Ai " -0x92b1: "Diao " -0x92b2: "Han " -0x92b3: "Rui " -0x92b4: "Shi " -0x92b5: "Keng " -0x92b6: "Qiu " -0x92b7: "Xiao " -0x92b8: "Zhe " -0x92b9: "Xiu " -0x92ba: "Zang " -0x92bb: "Ti " -0x92bc: "Cuo " -0x92bd: "Gua " -0x92be: "Gong " -0x92bf: "Zhong " -0x92c0: "Dou " -0x92c1: "Lu " -0x92c2: "Mei " -0x92c3: "Lang " -0x92c4: "Wan " -0x92c5: "Xin " -0x92c6: "Yun " -0x92c7: "Bei " -0x92c8: "Wu " -0x92c9: "Su " -0x92ca: "Yu " -0x92cb: "Chan " -0x92cc: "Ting " -0x92cd: "Bo " -0x92ce: "Han " -0x92cf: "Jia " -0x92d0: "Hong " -0x92d1: "Cuan " -0x92d2: "Feng " -0x92d3: "Chan " -0x92d4: "Wan " -0x92d5: "Zhi " -0x92d6: "Si " -0x92d7: "Xuan " -0x92d8: "Wu " -0x92d9: "Wu " -0x92da: "Tiao " -0x92db: "Gong " -0x92dc: "Zhuo " -0x92dd: "Lue " -0x92de: "Xing " -0x92df: "Qian " -0x92e0: "Shen " -0x92e1: "Han " -0x92e2: "Lue " -0x92e3: "Xie " -0x92e4: "Chu " -0x92e5: "Zheng " -0x92e6: "Ju " -0x92e7: "Xian " -0x92e8: "Tie " -0x92e9: "Mang " -0x92ea: "Pu " -0x92eb: "Li " -0x92ec: "Pan " -0x92ed: "Rui " -0x92ee: "Cheng " -0x92ef: "Gao " -0x92f0: "Li " -0x92f1: "Te " -0x92f2: "Pyeng " -0x92f3: "Zhu " -0x92f4: "[?] " -0x92f5: "Tu " -0x92f6: "Liu " -0x92f7: "Zui " -0x92f8: "Ju " -0x92f9: "Chang " -0x92fa: "Yuan " -0x92fb: "Jian " -0x92fc: "Gang " -0x92fd: "Diao " -0x92fe: "Tao " -0x92ff: "Chang " -/* x093 */ -0x9300: "Lun " -0x9301: "Kua " -0x9302: "Ling " -0x9303: "Bei " -0x9304: "Lu " -0x9305: "Li " -0x9306: "Qiang " -0x9307: "Pou " -0x9308: "Juan " -0x9309: "Min " -0x930a: "Zui " -0x930b: "Peng " -0x930c: "An " -0x930d: "Pi " -0x930e: "Xian " -0x930f: "Ya " -0x9310: "Zhui " -0x9311: "Lei " -0x9312: "A " -0x9313: "Kong " -0x9314: "Ta " -0x9315: "Kun " -0x9316: "Du " -0x9317: "Wei " -0x9318: "Chui " -0x9319: "Zi " -0x931a: "Zheng " -0x931b: "Ben " -0x931c: "Nie " -0x931d: "Cong " -0x931e: "Qun " -0x931f: "Tan " -0x9320: "Ding " -0x9321: "Qi " -0x9322: "Qian " -0x9323: "Zhuo " -0x9324: "Qi " -0x9325: "Yu " -0x9326: "Jin " -0x9327: "Guan " -0x9328: "Mao " -0x9329: "Chang " -0x932a: "Tian " -0x932b: "Xi " -0x932c: "Lian " -0x932d: "Tao " -0x932e: "Gu " -0x932f: "Cuo " -0x9330: "Shu " -0x9331: "Zhen " -0x9332: "Lu " -0x9333: "Meng " -0x9334: "Lu " -0x9335: "Hua " -0x9336: "Biao " -0x9337: "Ga " -0x9338: "Lai " -0x9339: "Ken " -0x933a: "Kazari " -0x933b: "Bu " -0x933c: "Nai " -0x933d: "Wan " -0x933e: "Zan " -0x933f: "[?] " -0x9340: "De " -0x9341: "Xian " -0x9342: "[?] " -0x9343: "Huo " -0x9344: "Liang " -0x9345: "[?] " -0x9346: "Men " -0x9347: "Kai " -0x9348: "Ying " -0x9349: "Di " -0x934a: "Lian " -0x934b: "Guo " -0x934c: "Xian " -0x934d: "Du " -0x934e: "Tu " -0x934f: "Wei " -0x9350: "Cong " -0x9351: "Fu " -0x9352: "Rou " -0x9353: "Ji " -0x9354: "E " -0x9355: "Rou " -0x9356: "Chen " -0x9357: "Ti " -0x9358: "Zha " -0x9359: "Hong " -0x935a: "Yang " -0x935b: "Duan " -0x935c: "Xia " -0x935d: "Yu " -0x935e: "Keng " -0x935f: "Xing " -0x9360: "Huang " -0x9361: "Wei " -0x9362: "Fu " -0x9363: "Zhao " -0x9364: "Cha " -0x9365: "Qie " -0x9366: "She " -0x9367: "Hong " -0x9368: "Kui " -0x9369: "Tian " -0x936a: "Mou " -0x936b: "Qiao " -0x936c: "Qiao " -0x936d: "Hou " -0x936e: "Tou " -0x936f: "Cong " -0x9370: "Huan " -0x9371: "Ye " -0x9372: "Min " -0x9373: "Jian " -0x9374: "Duan " -0x9375: "Jian " -0x9376: "Song " -0x9377: "Kui " -0x9378: "Hu " -0x9379: "Xuan " -0x937a: "Duo " -0x937b: "Jie " -0x937c: "Zhen " -0x937d: "Bian " -0x937e: "Zhong " -0x937f: "Zi " -0x9380: "Xiu " -0x9381: "Ye " -0x9382: "Mei " -0x9383: "Pai " -0x9384: "Ai " -0x9385: "Jie " -0x9386: "[?] " -0x9387: "Mei " -0x9388: "Chuo " -0x9389: "Ta " -0x938a: "Bang " -0x938b: "Xia " -0x938c: "Lian " -0x938d: "Suo " -0x938e: "Xi " -0x938f: "Liu " -0x9390: "Zu " -0x9391: "Ye " -0x9392: "Nou " -0x9393: "Weng " -0x9394: "Rong " -0x9395: "Tang " -0x9396: "Suo " -0x9397: "Qiang " -0x9398: "Ge " -0x9399: "Shuo " -0x939a: "Chui " -0x939b: "Bo " -0x939c: "Pan " -0x939d: "Sa " -0x939e: "Bi " -0x939f: "Sang " -0x93a0: "Gang " -0x93a1: "Zi " -0x93a2: "Wu " -0x93a3: "Ying " -0x93a4: "Huang " -0x93a5: "Tiao " -0x93a6: "Liu " -0x93a7: "Kai " -0x93a8: "Sun " -0x93a9: "Sha " -0x93aa: "Sou " -0x93ab: "Wan " -0x93ac: "Hao " -0x93ad: "Zhen " -0x93ae: "Zhen " -0x93af: "Luo " -0x93b0: "Yi " -0x93b1: "Yuan " -0x93b2: "Tang " -0x93b3: "Nie " -0x93b4: "Xi " -0x93b5: "Jia " -0x93b6: "Ge " -0x93b7: "Ma " -0x93b8: "Juan " -0x93b9: "Kasugai " -0x93ba: "Habaki " -0x93bb: "Suo " -0x93bc: "[?] " -0x93bd: "[?] " -0x93be: "[?] " -0x93bf: "Na " -0x93c0: "Lu " -0x93c1: "Suo " -0x93c2: "Ou " -0x93c3: "Zu " -0x93c4: "Tuan " -0x93c5: "Xiu " -0x93c6: "Guan " -0x93c7: "Xuan " -0x93c8: "Lian " -0x93c9: "Shou " -0x93ca: "Ao " -0x93cb: "Man " -0x93cc: "Mo " -0x93cd: "Luo " -0x93ce: "Bi " -0x93cf: "Wei " -0x93d0: "Liu " -0x93d1: "Di " -0x93d2: "Qiao " -0x93d3: "Cong " -0x93d4: "Yi " -0x93d5: "Lu " -0x93d6: "Ao " -0x93d7: "Keng " -0x93d8: "Qiang " -0x93d9: "Cui " -0x93da: "Qi " -0x93db: "Chang " -0x93dc: "Tang " -0x93dd: "Man " -0x93de: "Yong " -0x93df: "Chan " -0x93e0: "Feng " -0x93e1: "Jing " -0x93e2: "Biao " -0x93e3: "Shu " -0x93e4: "Lou " -0x93e5: "Xiu " -0x93e6: "Cong " -0x93e7: "Long " -0x93e8: "Zan " -0x93e9: "Jian " -0x93ea: "Cao " -0x93eb: "Li " -0x93ec: "Xia " -0x93ed: "Xi " -0x93ee: "Kang " -0x93ef: "[?] " -0x93f0: "Beng " -0x93f1: "[?] " -0x93f2: "[?] " -0x93f3: "Zheng " -0x93f4: "Lu " -0x93f5: "Hua " -0x93f6: "Ji " -0x93f7: "Pu " -0x93f8: "Hui " -0x93f9: "Qiang " -0x93fa: "Po " -0x93fb: "Lin " -0x93fc: "Suo " -0x93fd: "Xiu " -0x93fe: "San " -0x93ff: "Cheng " -/* x094 */ -0x9400: "Kui " -0x9401: "Si " -0x9402: "Liu " -0x9403: "Nao " -0x9404: "Heng " -0x9405: "Pie " -0x9406: "Sui " -0x9407: "Fan " -0x9408: "Qiao " -0x9409: "Quan " -0x940a: "Yang " -0x940b: "Tang " -0x940c: "Xiang " -0x940d: "Jue " -0x940e: "Jiao " -0x940f: "Zun " -0x9410: "Liao " -0x9411: "Jie " -0x9412: "Lao " -0x9413: "Dui " -0x9414: "Tan " -0x9415: "Zan " -0x9416: "Ji " -0x9417: "Jian " -0x9418: "Zhong " -0x9419: "Deng " -0x941a: "Ya " -0x941b: "Ying " -0x941c: "Dui " -0x941d: "Jue " -0x941e: "Nou " -0x941f: "Ti " -0x9420: "Pu " -0x9421: "Tie " -0x9422: "[?] " -0x9423: "[?] " -0x9424: "Ding " -0x9425: "Shan " -0x9426: "Kai " -0x9427: "Jian " -0x9428: "Fei " -0x9429: "Sui " -0x942a: "Lu " -0x942b: "Juan " -0x942c: "Hui " -0x942d: "Yu " -0x942e: "Lian " -0x942f: "Zhuo " -0x9430: "Qiao " -0x9431: "Qian " -0x9432: "Zhuo " -0x9433: "Lei " -0x9434: "Bi " -0x9435: "Tie " -0x9436: "Huan " -0x9437: "Ye " -0x9438: "Duo " -0x9439: "Guo " -0x943a: "Dang " -0x943b: "Ju " -0x943c: "Fen " -0x943d: "Da " -0x943e: "Bei " -0x943f: "Yi " -0x9440: "Ai " -0x9441: "Zong " -0x9442: "Xun " -0x9443: "Diao " -0x9444: "Zhu " -0x9445: "Heng " -0x9446: "Zhui " -0x9447: "Ji " -0x9448: "Nie " -0x9449: "Ta " -0x944a: "Huo " -0x944b: "Qing " -0x944c: "Bin " -0x944d: "Ying " -0x944e: "Kui " -0x944f: "Ning " -0x9450: "Xu " -0x9451: "Jian " -0x9452: "Jian " -0x9453: "Yari " -0x9454: "Cha " -0x9455: "Zhi " -0x9456: "Mie " -0x9457: "Li " -0x9458: "Lei " -0x9459: "Ji " -0x945a: "Zuan " -0x945b: "Kuang " -0x945c: "Shang " -0x945d: "Peng " -0x945e: "La " -0x945f: "Du " -0x9460: "Shuo " -0x9461: "Chuo " -0x9462: "Lu " -0x9463: "Biao " -0x9464: "Bao " -0x9465: "Lu " -0x9466: "[?] " -0x9467: "[?] " -0x9468: "Long " -0x9469: "E " -0x946a: "Lu " -0x946b: "Xin " -0x946c: "Jian " -0x946d: "Lan " -0x946e: "Bo " -0x946f: "Jian " -0x9470: "Yao " -0x9471: "Chan " -0x9472: "Xiang " -0x9473: "Jian " -0x9474: "Xi " -0x9475: "Guan " -0x9476: "Cang " -0x9477: "Nie " -0x9478: "Lei " -0x9479: "Cuan " -0x947a: "Qu " -0x947b: "Pan " -0x947c: "Luo " -0x947d: "Zuan " -0x947e: "Luan " -0x947f: "Zao " -0x9480: "Nie " -0x9481: "Jue " -0x9482: "Tang " -0x9483: "Shu " -0x9484: "Lan " -0x9485: "Jin " -0x9486: "Qiu " -0x9487: "Yi " -0x9488: "Zhen " -0x9489: "Ding " -0x948a: "Zhao " -0x948b: "Po " -0x948c: "Diao " -0x948d: "Tu " -0x948e: "Qian " -0x948f: "Chuan " -0x9490: "Shan " -0x9491: "Ji " -0x9492: "Fan " -0x9493: "Diao " -0x9494: "Men " -0x9495: "Nu " -0x9496: "Xi " -0x9497: "Chai " -0x9498: "Xing " -0x9499: "Gai " -0x949a: "Bu " -0x949b: "Tai " -0x949c: "Ju " -0x949d: "Dun " -0x949e: "Chao " -0x949f: "Zhong " -0x94a0: "Na " -0x94a1: "Bei " -0x94a2: "Gang " -0x94a3: "Ban " -0x94a4: "Qian " -0x94a5: "Yao " -0x94a6: "Qin " -0x94a7: "Jun " -0x94a8: "Wu " -0x94a9: "Gou " -0x94aa: "Kang " -0x94ab: "Fang " -0x94ac: "Huo " -0x94ad: "Tou " -0x94ae: "Niu " -0x94af: "Ba " -0x94b0: "Yu " -0x94b1: "Qian " -0x94b2: "Zheng " -0x94b3: "Qian " -0x94b4: "Gu " -0x94b5: "Bo " -0x94b6: "E " -0x94b7: "Po " -0x94b8: "Bu " -0x94b9: "Ba " -0x94ba: "Yue " -0x94bb: "Zuan " -0x94bc: "Mu " -0x94bd: "Dan " -0x94be: "Jia " -0x94bf: "Dian " -0x94c0: "You " -0x94c1: "Tie " -0x94c2: "Bo " -0x94c3: "Ling " -0x94c4: "Shuo " -0x94c5: "Qian " -0x94c6: "Liu " -0x94c7: "Bao " -0x94c8: "Shi " -0x94c9: "Xuan " -0x94ca: "She " -0x94cb: "Bi " -0x94cc: "Ni " -0x94cd: "Pi " -0x94ce: "Duo " -0x94cf: "Xing " -0x94d0: "Kao " -0x94d1: "Lao " -0x94d2: "Er " -0x94d3: "Mang " -0x94d4: "Ya " -0x94d5: "You " -0x94d6: "Cheng " -0x94d7: "Jia " -0x94d8: "Ye " -0x94d9: "Nao " -0x94da: "Zhi " -0x94db: "Dang " -0x94dc: "Tong " -0x94dd: "Lu " -0x94de: "Diao " -0x94df: "Yin " -0x94e0: "Kai " -0x94e1: "Zha " -0x94e2: "Zhu " -0x94e3: "Xian " -0x94e4: "Ting " -0x94e5: "Diu " -0x94e6: "Xian " -0x94e7: "Hua " -0x94e8: "Quan " -0x94e9: "Sha " -0x94ea: "Jia " -0x94eb: "Yao " -0x94ec: "Ge " -0x94ed: "Ming " -0x94ee: "Zheng " -0x94ef: "Se " -0x94f0: "Jiao " -0x94f1: "Yi " -0x94f2: "Chan " -0x94f3: "Chong " -0x94f4: "Tang " -0x94f5: "An " -0x94f6: "Yin " -0x94f7: "Ru " -0x94f8: "Zhu " -0x94f9: "Lao " -0x94fa: "Pu " -0x94fb: "Wu " -0x94fc: "Lai " -0x94fd: "Te " -0x94fe: "Lian " -0x94ff: "Keng " -/* x095 */ -0x9500: "Xiao " -0x9501: "Suo " -0x9502: "Li " -0x9503: "Zheng " -0x9504: "Chu " -0x9505: "Guo " -0x9506: "Gao " -0x9507: "Tie " -0x9508: "Xiu " -0x9509: "Cuo " -0x950a: "Lue " -0x950b: "Feng " -0x950c: "Xin " -0x950d: "Liu " -0x950e: "Kai " -0x950f: "Jian " -0x9510: "Rui " -0x9511: "Ti " -0x9512: "Lang " -0x9513: "Qian " -0x9514: "Ju " -0x9515: "A " -0x9516: "Qiang " -0x9517: "Duo " -0x9518: "Tian " -0x9519: "Cuo " -0x951a: "Mao " -0x951b: "Ben " -0x951c: "Qi " -0x951d: "De " -0x951e: "Kua " -0x951f: "Kun " -0x9520: "Chang " -0x9521: "Xi " -0x9522: "Gu " -0x9523: "Luo " -0x9524: "Chui " -0x9525: "Zhui " -0x9526: "Jin " -0x9527: "Zhi " -0x9528: "Xian " -0x9529: "Juan " -0x952a: "Huo " -0x952b: "Pou " -0x952c: "Tan " -0x952d: "Ding " -0x952e: "Jian " -0x952f: "Ju " -0x9530: "Meng " -0x9531: "Zi " -0x9532: "Qie " -0x9533: "Ying " -0x9534: "Kai " -0x9535: "Qiang " -0x9536: "Song " -0x9537: "E " -0x9538: "Cha " -0x9539: "Qiao " -0x953a: "Zhong " -0x953b: "Duan " -0x953c: "Sou " -0x953d: "Huang " -0x953e: "Huan " -0x953f: "Ai " -0x9540: "Du " -0x9541: "Mei " -0x9542: "Lou " -0x9543: "Zi " -0x9544: "Fei " -0x9545: "Mei " -0x9546: "Mo " -0x9547: "Zhen " -0x9548: "Bo " -0x9549: "Ge " -0x954a: "Nie " -0x954b: "Tang " -0x954c: "Juan " -0x954d: "Nie " -0x954e: "Na " -0x954f: "Liu " -0x9550: "Hao " -0x9551: "Bang " -0x9552: "Yi " -0x9553: "Jia " -0x9554: "Bin " -0x9555: "Rong " -0x9556: "Biao " -0x9557: "Tang " -0x9558: "Man " -0x9559: "Luo " -0x955a: "Beng " -0x955b: "Yong " -0x955c: "Jing " -0x955d: "Di " -0x955e: "Zu " -0x955f: "Xuan " -0x9560: "Liu " -0x9561: "Tan " -0x9562: "Jue " -0x9563: "Liao " -0x9564: "Pu " -0x9565: "Lu " -0x9566: "Dui " -0x9567: "Lan " -0x9568: "Pu " -0x9569: "Cuan " -0x956a: "Qiang " -0x956b: "Deng " -0x956c: "Huo " -0x956d: "Lei " -0x956e: "Huan " -0x956f: "Zhuo " -0x9570: "Lian " -0x9571: "Yi " -0x9572: "Cha " -0x9573: "Biao " -0x9574: "La " -0x9575: "Chan " -0x9576: "Xiang " -0x9577: "Chang " -0x9578: "Chang " -0x9579: "Jiu " -0x957a: "Ao " -0x957b: "Die " -0x957c: "Qu " -0x957d: "Liao " -0x957e: "Mi " -0x957f: "Chang " -0x9580: "Men " -0x9581: "Ma " -0x9582: "Shuan " -0x9583: "Shan " -0x9584: "Huo " -0x9585: "Men " -0x9586: "Yan " -0x9587: "Bi " -0x9588: "Han " -0x9589: "Bi " -0x958a: "San " -0x958b: "Kai " -0x958c: "Kang " -0x958d: "Beng " -0x958e: "Hong " -0x958f: "Run " -0x9590: "San " -0x9591: "Xian " -0x9592: "Xian " -0x9593: "Jian " -0x9594: "Min " -0x9595: "Xia " -0x9596: "Yuru " -0x9597: "Dou " -0x9598: "Zha " -0x9599: "Nao " -0x959a: "Jian " -0x959b: "Peng " -0x959c: "Xia " -0x959d: "Ling " -0x959e: "Bian " -0x959f: "Bi " -0x95a0: "Run " -0x95a1: "He " -0x95a2: "Guan " -0x95a3: "Ge " -0x95a4: "Ge " -0x95a5: "Fa " -0x95a6: "Chu " -0x95a7: "Hong " -0x95a8: "Gui " -0x95a9: "Min " -0x95aa: "Se " -0x95ab: "Kun " -0x95ac: "Lang " -0x95ad: "Lu " -0x95ae: "Ting " -0x95af: "Sha " -0x95b0: "Ju " -0x95b1: "Yue " -0x95b2: "Yue " -0x95b3: "Chan " -0x95b4: "Qu " -0x95b5: "Lin " -0x95b6: "Chang " -0x95b7: "Shai " -0x95b8: "Kun " -0x95b9: "Yan " -0x95ba: "Min " -0x95bb: "Yan " -0x95bc: "E " -0x95bd: "Hun " -0x95be: "Yu " -0x95bf: "Wen " -0x95c0: "Xiang " -0x95c1: "Bao " -0x95c2: "Xiang " -0x95c3: "Qu " -0x95c4: "Yao " -0x95c5: "Wen " -0x95c6: "Ban " -0x95c7: "An " -0x95c8: "Wei " -0x95c9: "Yin " -0x95ca: "Kuo " -0x95cb: "Que " -0x95cc: "Lan " -0x95cd: "Du " -0x95ce: "[?] " -0x95cf: "Phwung " -0x95d0: "Tian " -0x95d1: "Nie " -0x95d2: "Ta " -0x95d3: "Kai " -0x95d4: "He " -0x95d5: "Que " -0x95d6: "Chuang " -0x95d7: "Guan " -0x95d8: "Dou " -0x95d9: "Qi " -0x95da: "Kui " -0x95db: "Tang " -0x95dc: "Guan " -0x95dd: "Piao " -0x95de: "Kan " -0x95df: "Xi " -0x95e0: "Hui " -0x95e1: "Chan " -0x95e2: "Pi " -0x95e3: "Dang " -0x95e4: "Huan " -0x95e5: "Ta " -0x95e6: "Wen " -0x95e7: "[?] " -0x95e8: "Men " -0x95e9: "Shuan " -0x95ea: "Shan " -0x95eb: "Yan " -0x95ec: "Han " -0x95ed: "Bi " -0x95ee: "Wen " -0x95ef: "Chuang " -0x95f0: "Run " -0x95f1: "Wei " -0x95f2: "Xian " -0x95f3: "Hong " -0x95f4: "Jian " -0x95f5: "Min " -0x95f6: "Kang " -0x95f7: "Men " -0x95f8: "Zha " -0x95f9: "Nao " -0x95fa: "Gui " -0x95fb: "Wen " -0x95fc: "Ta " -0x95fd: "Min " -0x95fe: "Lu " -0x95ff: "Kai " -/* x096 */ -0x9600: "Fa " -0x9601: "Ge " -0x9602: "He " -0x9603: "Kun " -0x9604: "Jiu " -0x9605: "Yue " -0x9606: "Lang " -0x9607: "Du " -0x9608: "Yu " -0x9609: "Yan " -0x960a: "Chang " -0x960b: "Xi " -0x960c: "Wen " -0x960d: "Hun " -0x960e: "Yan " -0x960f: "E " -0x9610: "Chan " -0x9611: "Lan " -0x9612: "Qu " -0x9613: "Hui " -0x9614: "Kuo " -0x9615: "Que " -0x9616: "Ge " -0x9617: "Tian " -0x9618: "Ta " -0x9619: "Que " -0x961a: "Kan " -0x961b: "Huan " -0x961c: "Fu " -0x961d: "Fu " -0x961e: "Le " -0x961f: "Dui " -0x9620: "Xin " -0x9621: "Qian " -0x9622: "Wu " -0x9623: "Yi " -0x9624: "Tuo " -0x9625: "Yin " -0x9626: "Yang " -0x9627: "Dou " -0x9628: "E " -0x9629: "Sheng " -0x962a: "Ban " -0x962b: "Pei " -0x962c: "Keng " -0x962d: "Yun " -0x962e: "Ruan " -0x962f: "Zhi " -0x9630: "Pi " -0x9631: "Jing " -0x9632: "Fang " -0x9633: "Yang " -0x9634: "Yin " -0x9635: "Zhen " -0x9636: "Jie " -0x9637: "Cheng " -0x9638: "E " -0x9639: "Qu " -0x963a: "Di " -0x963b: "Zu " -0x963c: "Zuo " -0x963d: "Dian " -0x963e: "Ling " -0x963f: "A " -0x9640: "Tuo " -0x9641: "Tuo " -0x9642: "Po " -0x9643: "Bing " -0x9644: "Fu " -0x9645: "Ji " -0x9646: "Lu " -0x9647: "Long " -0x9648: "Chen " -0x9649: "Xing " -0x964a: "Duo " -0x964b: "Lou " -0x964c: "Mo " -0x964d: "Jiang " -0x964e: "Shu " -0x964f: "Duo " -0x9650: "Xian " -0x9651: "Er " -0x9652: "Gui " -0x9653: "Yu " -0x9654: "Gai " -0x9655: "Shan " -0x9656: "Xun " -0x9657: "Qiao " -0x9658: "Xing " -0x9659: "Chun " -0x965a: "Fu " -0x965b: "Bi " -0x965c: "Xia " -0x965d: "Shan " -0x965e: "Sheng " -0x965f: "Zhi " -0x9660: "Pu " -0x9661: "Dou " -0x9662: "Yuan " -0x9663: "Zhen " -0x9664: "Chu " -0x9665: "Xian " -0x9666: "Tou " -0x9667: "Nie " -0x9668: "Yun " -0x9669: "Xian " -0x966a: "Pei " -0x966b: "Pei " -0x966c: "Zou " -0x966d: "Yi " -0x966e: "Dui " -0x966f: "Lun " -0x9670: "Yin " -0x9671: "Ju " -0x9672: "Chui " -0x9673: "Chen " -0x9674: "Pi " -0x9675: "Ling " -0x9676: "Tao " -0x9677: "Xian " -0x9678: "Lu " -0x9679: "Sheng " -0x967a: "Xian " -0x967b: "Yin " -0x967c: "Zhu " -0x967d: "Yang " -0x967e: "Reng " -0x967f: "Shan " -0x9680: "Chong " -0x9681: "Yan " -0x9682: "Yin " -0x9683: "Yu " -0x9684: "Ti " -0x9685: "Yu " -0x9686: "Long " -0x9687: "Wei " -0x9688: "Wei " -0x9689: "Nie " -0x968a: "Dui " -0x968b: "Sui " -0x968c: "An " -0x968d: "Huang " -0x968e: "Jie " -0x968f: "Sui " -0x9690: "Yin " -0x9691: "Gai " -0x9692: "Yan " -0x9693: "Hui " -0x9694: "Ge " -0x9695: "Yun " -0x9696: "Wu " -0x9697: "Wei " -0x9698: "Ai " -0x9699: "Xi " -0x969a: "Tang " -0x969b: "Ji " -0x969c: "Zhang " -0x969d: "Dao " -0x969e: "Ao " -0x969f: "Xi " -0x96a0: "Yin " -0x96a1: "[?] " -0x96a2: "Rao " -0x96a3: "Lin " -0x96a4: "Tui " -0x96a5: "Deng " -0x96a6: "Pi " -0x96a7: "Sui " -0x96a8: "Sui " -0x96a9: "Yu " -0x96aa: "Xian " -0x96ab: "Fen " -0x96ac: "Ni " -0x96ad: "Er " -0x96ae: "Ji " -0x96af: "Dao " -0x96b0: "Xi " -0x96b1: "Yin " -0x96b2: "E " -0x96b3: "Hui " -0x96b4: "Long " -0x96b5: "Xi " -0x96b6: "Li " -0x96b7: "Li " -0x96b8: "Li " -0x96b9: "Zhui " -0x96ba: "He " -0x96bb: "Zhi " -0x96bc: "Zhun " -0x96bd: "Jun " -0x96be: "Nan " -0x96bf: "Yi " -0x96c0: "Que " -0x96c1: "Yan " -0x96c2: "Qian " -0x96c3: "Ya " -0x96c4: "Xiong " -0x96c5: "Ya " -0x96c6: "Ji " -0x96c7: "Gu " -0x96c8: "Huan " -0x96c9: "Zhi " -0x96ca: "Gou " -0x96cb: "Jun " -0x96cc: "Ci " -0x96cd: "Yong " -0x96ce: "Ju " -0x96cf: "Chu " -0x96d0: "Hu " -0x96d1: "Za " -0x96d2: "Luo " -0x96d3: "Yu " -0x96d4: "Chou " -0x96d5: "Diao " -0x96d6: "Sui " -0x96d7: "Han " -0x96d8: "Huo " -0x96d9: "Shuang " -0x96da: "Guan " -0x96db: "Chu " -0x96dc: "Za " -0x96dd: "Yong " -0x96de: "Ji " -0x96df: "Xi " -0x96e0: "Chou " -0x96e1: "Liu " -0x96e2: "Li " -0x96e3: "Nan " -0x96e4: "Xue " -0x96e5: "Za " -0x96e6: "Ji " -0x96e7: "Ji " -0x96e8: "Yu " -0x96e9: "Yu " -0x96ea: "Xue " -0x96eb: "Na " -0x96ec: "Fou " -0x96ed: "Se " -0x96ee: "Mu " -0x96ef: "Wen " -0x96f0: "Fen " -0x96f1: "Pang " -0x96f2: "Yun " -0x96f3: "Li " -0x96f4: "Li " -0x96f5: "Ang " -0x96f6: "Ling " -0x96f7: "Lei " -0x96f8: "An " -0x96f9: "Bao " -0x96fa: "Meng " -0x96fb: "Dian " -0x96fc: "Dang " -0x96fd: "Xing " -0x96fe: "Wu " -0x96ff: "Zhao " -/* x097 */ -0x9700: "Xu " -0x9701: "Ji " -0x9702: "Mu " -0x9703: "Chen " -0x9704: "Xiao " -0x9705: "Zha " -0x9706: "Ting " -0x9707: "Zhen " -0x9708: "Pei " -0x9709: "Mei " -0x970a: "Ling " -0x970b: "Qi " -0x970c: "Chou " -0x970d: "Huo " -0x970e: "Sha " -0x970f: "Fei " -0x9710: "Weng " -0x9711: "Zhan " -0x9712: "Yin " -0x9713: "Ni " -0x9714: "Chou " -0x9715: "Tun " -0x9716: "Lin " -0x9717: "[?] " -0x9718: "Dong " -0x9719: "Ying " -0x971a: "Wu " -0x971b: "Ling " -0x971c: "Shuang " -0x971d: "Ling " -0x971e: "Xia " -0x971f: "Hong " -0x9720: "Yin " -0x9721: "Mo " -0x9722: "Mai " -0x9723: "Yun " -0x9724: "Liu " -0x9725: "Meng " -0x9726: "Bin " -0x9727: "Wu " -0x9728: "Wei " -0x9729: "Huo " -0x972a: "Yin " -0x972b: "Xi " -0x972c: "Yi " -0x972d: "Ai " -0x972e: "Dan " -0x972f: "Deng " -0x9730: "Xian " -0x9731: "Yu " -0x9732: "Lu " -0x9733: "Long " -0x9734: "Dai " -0x9735: "Ji " -0x9736: "Pang " -0x9737: "Yang " -0x9738: "Ba " -0x9739: "Pi " -0x973a: "Wei " -0x973b: "[?] " -0x973c: "Xi " -0x973d: "Ji " -0x973e: "Mai " -0x973f: "Meng " -0x9740: "Meng " -0x9741: "Lei " -0x9742: "Li " -0x9743: "Huo " -0x9744: "Ai " -0x9745: "Fei " -0x9746: "Dai " -0x9747: "Long " -0x9748: "Ling " -0x9749: "Ai " -0x974a: "Feng " -0x974b: "Li " -0x974c: "Bao " -0x974d: "[?] " -0x974e: "He " -0x974f: "He " -0x9750: "Bing " -0x9751: "Qing " -0x9752: "Qing " -0x9753: "Jing " -0x9754: "Tian " -0x9755: "Zhen " -0x9756: "Jing " -0x9757: "Cheng " -0x9758: "Qing " -0x9759: "Jing " -0x975a: "Jing " -0x975b: "Dian " -0x975c: "Jing " -0x975d: "Tian " -0x975e: "Fei " -0x975f: "Fei " -0x9760: "Kao " -0x9761: "Mi " -0x9762: "Mian " -0x9763: "Mian " -0x9764: "Pao " -0x9765: "Ye " -0x9766: "Tian " -0x9767: "Hui " -0x9768: "Ye " -0x9769: "Ge " -0x976a: "Ding " -0x976b: "Cha " -0x976c: "Jian " -0x976d: "Ren " -0x976e: "Di " -0x976f: "Du " -0x9770: "Wu " -0x9771: "Ren " -0x9772: "Qin " -0x9773: "Jin " -0x9774: "Xue " -0x9775: "Niu " -0x9776: "Ba " -0x9777: "Yin " -0x9778: "Sa " -0x9779: "Na " -0x977a: "Mo " -0x977b: "Zu " -0x977c: "Da " -0x977d: "Ban " -0x977e: "Yi " -0x977f: "Yao " -0x9780: "Tao " -0x9781: "Tuo " -0x9782: "Jia " -0x9783: "Hong " -0x9784: "Pao " -0x9785: "Yang " -0x9786: "Tomo " -0x9787: "Yin " -0x9788: "Jia " -0x9789: "Tao " -0x978a: "Ji " -0x978b: "Xie " -0x978c: "An " -0x978d: "An " -0x978e: "Hen " -0x978f: "Gong " -0x9790: "Kohaze " -0x9791: "Da " -0x9792: "Qiao " -0x9793: "Ting " -0x9794: "Wan " -0x9795: "Ying " -0x9796: "Sui " -0x9797: "Tiao " -0x9798: "Qiao " -0x9799: "Xuan " -0x979a: "Kong " -0x979b: "Beng " -0x979c: "Ta " -0x979d: "Zhang " -0x979e: "Bing " -0x979f: "Kuo " -0x97a0: "Ju " -0x97a1: "La " -0x97a2: "Xie " -0x97a3: "Rou " -0x97a4: "Bang " -0x97a5: "Yi " -0x97a6: "Qiu " -0x97a7: "Qiu " -0x97a8: "He " -0x97a9: "Xiao " -0x97aa: "Mu " -0x97ab: "Ju " -0x97ac: "Jian " -0x97ad: "Bian " -0x97ae: "Di " -0x97af: "Jian " -0x97b0: "On " -0x97b1: "Tao " -0x97b2: "Gou " -0x97b3: "Ta " -0x97b4: "Bei " -0x97b5: "Xie " -0x97b6: "Pan " -0x97b7: "Ge " -0x97b8: "Bi " -0x97b9: "Kuo " -0x97ba: "Tang " -0x97bb: "Lou " -0x97bc: "Gui " -0x97bd: "Qiao " -0x97be: "Xue " -0x97bf: "Ji " -0x97c0: "Jian " -0x97c1: "Jiang " -0x97c2: "Chan " -0x97c3: "Da " -0x97c4: "Huo " -0x97c5: "Xian " -0x97c6: "Qian " -0x97c7: "Du " -0x97c8: "Wa " -0x97c9: "Jian " -0x97ca: "Lan " -0x97cb: "Wei " -0x97cc: "Ren " -0x97cd: "Fu " -0x97ce: "Mei " -0x97cf: "Juan " -0x97d0: "Ge " -0x97d1: "Wei " -0x97d2: "Qiao " -0x97d3: "Han " -0x97d4: "Chang " -0x97d5: "[?] " -0x97d6: "Rou " -0x97d7: "Xun " -0x97d8: "She " -0x97d9: "Wei " -0x97da: "Ge " -0x97db: "Bei " -0x97dc: "Tao " -0x97dd: "Gou " -0x97de: "Yun " -0x97df: "[?] " -0x97e0: "Bi " -0x97e1: "Wei " -0x97e2: "Hui " -0x97e3: "Du " -0x97e4: "Wa " -0x97e5: "Du " -0x97e6: "Wei " -0x97e7: "Ren " -0x97e8: "Fu " -0x97e9: "Han " -0x97ea: "Wei " -0x97eb: "Yun " -0x97ec: "Tao " -0x97ed: "Jiu " -0x97ee: "Jiu " -0x97ef: "Xian " -0x97f0: "Xie " -0x97f1: "Xian " -0x97f2: "Ji " -0x97f3: "Yin " -0x97f4: "Za " -0x97f5: "Yun " -0x97f6: "Shao " -0x97f7: "Le " -0x97f8: "Peng " -0x97f9: "Heng " -0x97fa: "Ying " -0x97fb: "Yun " -0x97fc: "Peng " -0x97fd: "Yin " -0x97fe: "Yin " -0x97ff: "Xiang " -/* x098 */ -0x9800: "Hu " -0x9801: "Ye " -0x9802: "Ding " -0x9803: "Qing " -0x9804: "Pan " -0x9805: "Xiang " -0x9806: "Shun " -0x9807: "Han " -0x9808: "Xu " -0x9809: "Yi " -0x980a: "Xu " -0x980b: "Gu " -0x980c: "Song " -0x980d: "Kui " -0x980e: "Qi " -0x980f: "Hang " -0x9810: "Yu " -0x9811: "Wan " -0x9812: "Ban " -0x9813: "Dun " -0x9814: "Di " -0x9815: "Dan " -0x9816: "Pan " -0x9817: "Po " -0x9818: "Ling " -0x9819: "Ce " -0x981a: "Jing " -0x981b: "Lei " -0x981c: "He " -0x981d: "Qiao " -0x981e: "E " -0x981f: "E " -0x9820: "Wei " -0x9821: "Jie " -0x9822: "Gua " -0x9823: "Shen " -0x9824: "Yi " -0x9825: "Shen " -0x9826: "Hai " -0x9827: "Dui " -0x9828: "Pian " -0x9829: "Ping " -0x982a: "Lei " -0x982b: "Fu " -0x982c: "Jia " -0x982d: "Tou " -0x982e: "Hui " -0x982f: "Kui " -0x9830: "Jia " -0x9831: "Le " -0x9832: "Tian " -0x9833: "Cheng " -0x9834: "Ying " -0x9835: "Jun " -0x9836: "Hu " -0x9837: "Han " -0x9838: "Jing " -0x9839: "Tui " -0x983a: "Tui " -0x983b: "Pin " -0x983c: "Lai " -0x983d: "Tui " -0x983e: "Zi " -0x983f: "Zi " -0x9840: "Chui " -0x9841: "Ding " -0x9842: "Lai " -0x9843: "Yan " -0x9844: "Han " -0x9845: "Jian " -0x9846: "Ke " -0x9847: "Cui " -0x9848: "Jiong " -0x9849: "Qin " -0x984a: "Yi " -0x984b: "Sai " -0x984c: "Ti " -0x984d: "E " -0x984e: "E " -0x984f: "Yan " -0x9850: "Hun " -0x9851: "Kan " -0x9852: "Yong " -0x9853: "Zhuan " -0x9854: "Yan " -0x9855: "Xian " -0x9856: "Xin " -0x9857: "Yi " -0x9858: "Yuan " -0x9859: "Sang " -0x985a: "Dian " -0x985b: "Dian " -0x985c: "Jiang " -0x985d: "Ku " -0x985e: "Lei " -0x985f: "Liao " -0x9860: "Piao " -0x9861: "Yi " -0x9862: "Man " -0x9863: "Qi " -0x9864: "Rao " -0x9865: "Hao " -0x9866: "Qiao " -0x9867: "Gu " -0x9868: "Xun " -0x9869: "Qian " -0x986a: "Hui " -0x986b: "Zhan " -0x986c: "Ru " -0x986d: "Hong " -0x986e: "Bin " -0x986f: "Xian " -0x9870: "Pin " -0x9871: "Lu " -0x9872: "Lan " -0x9873: "Nie " -0x9874: "Quan " -0x9875: "Ye " -0x9876: "Ding " -0x9877: "Qing " -0x9878: "Han " -0x9879: "Xiang " -0x987a: "Shun " -0x987b: "Xu " -0x987c: "Xu " -0x987d: "Wan " -0x987e: "Gu " -0x987f: "Dun " -0x9880: "Qi " -0x9881: "Ban " -0x9882: "Song " -0x9883: "Hang " -0x9884: "Yu " -0x9885: "Lu " -0x9886: "Ling " -0x9887: "Po " -0x9888: "Jing " -0x9889: "Jie " -0x988a: "Jia " -0x988b: "Tian " -0x988c: "Han " -0x988d: "Ying " -0x988e: "Jiong " -0x988f: "Hai " -0x9890: "Yi " -0x9891: "Pin " -0x9892: "Hui " -0x9893: "Tui " -0x9894: "Han " -0x9895: "Ying " -0x9896: "Ying " -0x9897: "Ke " -0x9898: "Ti " -0x9899: "Yong " -0x989a: "E " -0x989b: "Zhuan " -0x989c: "Yan " -0x989d: "E " -0x989e: "Nie " -0x989f: "Man " -0x98a0: "Dian " -0x98a1: "Sang " -0x98a2: "Hao " -0x98a3: "Lei " -0x98a4: "Zhan " -0x98a5: "Ru " -0x98a6: "Pin " -0x98a7: "Quan " -0x98a8: "Feng " -0x98a9: "Biao " -0x98aa: "Oroshi " -0x98ab: "Fu " -0x98ac: "Xia " -0x98ad: "Zhan " -0x98ae: "Biao " -0x98af: "Sa " -0x98b0: "Ba " -0x98b1: "Tai " -0x98b2: "Lie " -0x98b3: "Gua " -0x98b4: "Xuan " -0x98b5: "Shao " -0x98b6: "Ju " -0x98b7: "Bi " -0x98b8: "Si " -0x98b9: "Wei " -0x98ba: "Yang " -0x98bb: "Yao " -0x98bc: "Sou " -0x98bd: "Kai " -0x98be: "Sao " -0x98bf: "Fan " -0x98c0: "Liu " -0x98c1: "Xi " -0x98c2: "Liao " -0x98c3: "Piao " -0x98c4: "Piao " -0x98c5: "Liu " -0x98c6: "Biao " -0x98c7: "Biao " -0x98c8: "Biao " -0x98c9: "Liao " -0x98ca: "[?] " -0x98cb: "Se " -0x98cc: "Feng " -0x98cd: "Biao " -0x98ce: "Feng " -0x98cf: "Yang " -0x98d0: "Zhan " -0x98d1: "Biao " -0x98d2: "Sa " -0x98d3: "Ju " -0x98d4: "Si " -0x98d5: "Sou " -0x98d6: "Yao " -0x98d7: "Liu " -0x98d8: "Piao " -0x98d9: "Biao " -0x98da: "Biao " -0x98db: "Fei " -0x98dc: "Fan " -0x98dd: "Fei " -0x98de: "Fei " -0x98df: "Shi " -0x98e0: "Shi " -0x98e1: "Can " -0x98e2: "Ji " -0x98e3: "Ding " -0x98e4: "Si " -0x98e5: "Tuo " -0x98e6: "Zhan " -0x98e7: "Sun " -0x98e8: "Xiang " -0x98e9: "Tun " -0x98ea: "Ren " -0x98eb: "Yu " -0x98ec: "Juan " -0x98ed: "Chi " -0x98ee: "Yin " -0x98ef: "Fan " -0x98f0: "Fan " -0x98f1: "Sun " -0x98f2: "Yin " -0x98f3: "Zhu " -0x98f4: "Yi " -0x98f5: "Zhai " -0x98f6: "Bi " -0x98f7: "Jie " -0x98f8: "Tao " -0x98f9: "Liu " -0x98fa: "Ci " -0x98fb: "Tie " -0x98fc: "Si " -0x98fd: "Bao " -0x98fe: "Shi " -0x98ff: "Duo " -/* x099 */ -0x9900: "Hai " -0x9901: "Ren " -0x9902: "Tian " -0x9903: "Jiao " -0x9904: "Jia " -0x9905: "Bing " -0x9906: "Yao " -0x9907: "Tong " -0x9908: "Ci " -0x9909: "Xiang " -0x990a: "Yang " -0x990b: "Yang " -0x990c: "Er " -0x990d: "Yan " -0x990e: "Le " -0x990f: "Yi " -0x9910: "Can " -0x9911: "Bo " -0x9912: "Nei " -0x9913: "E " -0x9914: "Bu " -0x9915: "Jun " -0x9916: "Dou " -0x9917: "Su " -0x9918: "Yu " -0x9919: "Shi " -0x991a: "Yao " -0x991b: "Hun " -0x991c: "Guo " -0x991d: "Shi " -0x991e: "Jian " -0x991f: "Zhui " -0x9920: "Bing " -0x9921: "Xian " -0x9922: "Bu " -0x9923: "Ye " -0x9924: "Tan " -0x9925: "Fei " -0x9926: "Zhang " -0x9927: "Wei " -0x9928: "Guan " -0x9929: "E " -0x992a: "Nuan " -0x992b: "Hun " -0x992c: "Hu " -0x992d: "Huang " -0x992e: "Tie " -0x992f: "Hui " -0x9930: "Jian " -0x9931: "Hou " -0x9932: "He " -0x9933: "Xing " -0x9934: "Fen " -0x9935: "Wei " -0x9936: "Gu " -0x9937: "Cha " -0x9938: "Song " -0x9939: "Tang " -0x993a: "Bo " -0x993b: "Gao " -0x993c: "Xi " -0x993d: "Kui " -0x993e: "Liu " -0x993f: "Sou " -0x9940: "Tao " -0x9941: "Ye " -0x9942: "Yun " -0x9943: "Mo " -0x9944: "Tang " -0x9945: "Man " -0x9946: "Bi " -0x9947: "Yu " -0x9948: "Xiu " -0x9949: "Jin " -0x994a: "San " -0x994b: "Kui " -0x994c: "Zhuan " -0x994d: "Shan " -0x994e: "Chi " -0x994f: "Dan " -0x9950: "Yi " -0x9951: "Ji " -0x9952: "Rao " -0x9953: "Cheng " -0x9954: "Yong " -0x9955: "Tao " -0x9956: "Hui " -0x9957: "Xiang " -0x9958: "Zhan " -0x9959: "Fen " -0x995a: "Hai " -0x995b: "Meng " -0x995c: "Yan " -0x995d: "Mo " -0x995e: "Chan " -0x995f: "Xiang " -0x9960: "Luo " -0x9961: "Zuan " -0x9962: "Nang " -0x9963: "Shi " -0x9964: "Ding " -0x9965: "Ji " -0x9966: "Tuo " -0x9967: "Xing " -0x9968: "Tun " -0x9969: "Xi " -0x996a: "Ren " -0x996b: "Yu " -0x996c: "Chi " -0x996d: "Fan " -0x996e: "Yin " -0x996f: "Jian " -0x9970: "Shi " -0x9971: "Bao " -0x9972: "Si " -0x9973: "Duo " -0x9974: "Yi " -0x9975: "Er " -0x9976: "Rao " -0x9977: "Xiang " -0x9978: "Jia " -0x9979: "Le " -0x997a: "Jiao " -0x997b: "Yi " -0x997c: "Bing " -0x997d: "Bo " -0x997e: "Dou " -0x997f: "E " -0x9980: "Yu " -0x9981: "Nei " -0x9982: "Jun " -0x9983: "Guo " -0x9984: "Hun " -0x9985: "Xian " -0x9986: "Guan " -0x9987: "Cha " -0x9988: "Kui " -0x9989: "Gu " -0x998a: "Sou " -0x998b: "Chan " -0x998c: "Ye " -0x998d: "Mo " -0x998e: "Bo " -0x998f: "Liu " -0x9990: "Xiu " -0x9991: "Jin " -0x9992: "Man " -0x9993: "San " -0x9994: "Zhuan " -0x9995: "Nang " -0x9996: "Shou " -0x9997: "Kui " -0x9998: "Guo " -0x9999: "Xiang " -0x999a: "Fen " -0x999b: "Ba " -0x999c: "Ni " -0x999d: "Bi " -0x999e: "Bo " -0x999f: "Tu " -0x99a0: "Han " -0x99a1: "Fei " -0x99a2: "Jian " -0x99a3: "An " -0x99a4: "Ai " -0x99a5: "Fu " -0x99a6: "Xian " -0x99a7: "Wen " -0x99a8: "Xin " -0x99a9: "Fen " -0x99aa: "Bin " -0x99ab: "Xing " -0x99ac: "Ma " -0x99ad: "Yu " -0x99ae: "Feng " -0x99af: "Han " -0x99b0: "Di " -0x99b1: "Tuo " -0x99b2: "Tuo " -0x99b3: "Chi " -0x99b4: "Xun " -0x99b5: "Zhu " -0x99b6: "Zhi " -0x99b7: "Pei " -0x99b8: "Xin " -0x99b9: "Ri " -0x99ba: "Sa " -0x99bb: "Yin " -0x99bc: "Wen " -0x99bd: "Zhi " -0x99be: "Dan " -0x99bf: "Lu " -0x99c0: "You " -0x99c1: "Bo " -0x99c2: "Bao " -0x99c3: "Kuai " -0x99c4: "Tuo " -0x99c5: "Yi " -0x99c6: "Qu " -0x99c7: "[?] " -0x99c8: "Qu " -0x99c9: "Jiong " -0x99ca: "Bo " -0x99cb: "Zhao " -0x99cc: "Yuan " -0x99cd: "Peng " -0x99ce: "Zhou " -0x99cf: "Ju " -0x99d0: "Zhu " -0x99d1: "Nu " -0x99d2: "Ju " -0x99d3: "Pi " -0x99d4: "Zang " -0x99d5: "Jia " -0x99d6: "Ling " -0x99d7: "Zhen " -0x99d8: "Tai " -0x99d9: "Fu " -0x99da: "Yang " -0x99db: "Shi " -0x99dc: "Bi " -0x99dd: "Tuo " -0x99de: "Tuo " -0x99df: "Si " -0x99e0: "Liu " -0x99e1: "Ma " -0x99e2: "Pian " -0x99e3: "Tao " -0x99e4: "Zhi " -0x99e5: "Rong " -0x99e6: "Teng " -0x99e7: "Dong " -0x99e8: "Xun " -0x99e9: "Quan " -0x99ea: "Shen " -0x99eb: "Jiong " -0x99ec: "Er " -0x99ed: "Hai " -0x99ee: "Bo " -0x99ef: "Zhu " -0x99f0: "Yin " -0x99f1: "Luo " -0x99f2: "Shuu " -0x99f3: "Dan " -0x99f4: "Xie " -0x99f5: "Liu " -0x99f6: "Ju " -0x99f7: "Song " -0x99f8: "Qin " -0x99f9: "Mang " -0x99fa: "Liang " -0x99fb: "Han " -0x99fc: "Tu " -0x99fd: "Xuan " -0x99fe: "Tui " -0x99ff: "Jun " -/* x09a */ -0x9a00: "E " -0x9a01: "Cheng " -0x9a02: "Xin " -0x9a03: "Ai " -0x9a04: "Lu " -0x9a05: "Zhui " -0x9a06: "Zhou " -0x9a07: "She " -0x9a08: "Pian " -0x9a09: "Kun " -0x9a0a: "Tao " -0x9a0b: "Lai " -0x9a0c: "Zong " -0x9a0d: "Ke " -0x9a0e: "Qi " -0x9a0f: "Qi " -0x9a10: "Yan " -0x9a11: "Fei " -0x9a12: "Sao " -0x9a13: "Yan " -0x9a14: "Jie " -0x9a15: "Yao " -0x9a16: "Wu " -0x9a17: "Pian " -0x9a18: "Cong " -0x9a19: "Pian " -0x9a1a: "Qian " -0x9a1b: "Fei " -0x9a1c: "Huang " -0x9a1d: "Jian " -0x9a1e: "Huo " -0x9a1f: "Yu " -0x9a20: "Ti " -0x9a21: "Quan " -0x9a22: "Xia " -0x9a23: "Zong " -0x9a24: "Kui " -0x9a25: "Rou " -0x9a26: "Si " -0x9a27: "Gua " -0x9a28: "Tuo " -0x9a29: "Kui " -0x9a2a: "Sou " -0x9a2b: "Qian " -0x9a2c: "Cheng " -0x9a2d: "Zhi " -0x9a2e: "Liu " -0x9a2f: "Pang " -0x9a30: "Teng " -0x9a31: "Xi " -0x9a32: "Cao " -0x9a33: "Du " -0x9a34: "Yan " -0x9a35: "Yuan " -0x9a36: "Zou " -0x9a37: "Sao " -0x9a38: "Shan " -0x9a39: "Li " -0x9a3a: "Zhi " -0x9a3b: "Shuang " -0x9a3c: "Lu " -0x9a3d: "Xi " -0x9a3e: "Luo " -0x9a3f: "Zhang " -0x9a40: "Mo " -0x9a41: "Ao " -0x9a42: "Can " -0x9a43: "Piao " -0x9a44: "Cong " -0x9a45: "Qu " -0x9a46: "Bi " -0x9a47: "Zhi " -0x9a48: "Yu " -0x9a49: "Xu " -0x9a4a: "Hua " -0x9a4b: "Bo " -0x9a4c: "Su " -0x9a4d: "Xiao " -0x9a4e: "Lin " -0x9a4f: "Chan " -0x9a50: "Dun " -0x9a51: "Liu " -0x9a52: "Tuo " -0x9a53: "Zeng " -0x9a54: "Tan " -0x9a55: "Jiao " -0x9a56: "Tie " -0x9a57: "Yan " -0x9a58: "Luo " -0x9a59: "Zhan " -0x9a5a: "Jing " -0x9a5b: "Yi " -0x9a5c: "Ye " -0x9a5d: "Tuo " -0x9a5e: "Bin " -0x9a5f: "Zou " -0x9a60: "Yan " -0x9a61: "Peng " -0x9a62: "Lu " -0x9a63: "Teng " -0x9a64: "Xiang " -0x9a65: "Ji " -0x9a66: "Shuang " -0x9a67: "Ju " -0x9a68: "Xi " -0x9a69: "Huan " -0x9a6a: "Li " -0x9a6b: "Biao " -0x9a6c: "Ma " -0x9a6d: "Yu " -0x9a6e: "Tuo " -0x9a6f: "Xun " -0x9a70: "Chi " -0x9a71: "Qu " -0x9a72: "Ri " -0x9a73: "Bo " -0x9a74: "Lu " -0x9a75: "Zang " -0x9a76: "Shi " -0x9a77: "Si " -0x9a78: "Fu " -0x9a79: "Ju " -0x9a7a: "Zou " -0x9a7b: "Zhu " -0x9a7c: "Tuo " -0x9a7d: "Nu " -0x9a7e: "Jia " -0x9a7f: "Yi " -0x9a80: "Tai " -0x9a81: "Xiao " -0x9a82: "Ma " -0x9a83: "Yin " -0x9a84: "Jiao " -0x9a85: "Hua " -0x9a86: "Luo " -0x9a87: "Hai " -0x9a88: "Pian " -0x9a89: "Biao " -0x9a8a: "Li " -0x9a8b: "Cheng " -0x9a8c: "Yan " -0x9a8d: "Xin " -0x9a8e: "Qin " -0x9a8f: "Jun " -0x9a90: "Qi " -0x9a91: "Qi " -0x9a92: "Ke " -0x9a93: "Zhui " -0x9a94: "Zong " -0x9a95: "Su " -0x9a96: "Can " -0x9a97: "Pian " -0x9a98: "Zhi " -0x9a99: "Kui " -0x9a9a: "Sao " -0x9a9b: "Wu " -0x9a9c: "Ao " -0x9a9d: "Liu " -0x9a9e: "Qian " -0x9a9f: "Shan " -0x9aa0: "Piao " -0x9aa1: "Luo " -0x9aa2: "Cong " -0x9aa3: "Chan " -0x9aa4: "Zou " -0x9aa5: "Ji " -0x9aa6: "Shuang " -0x9aa7: "Xiang " -0x9aa8: "Gu " -0x9aa9: "Wei " -0x9aaa: "Wei " -0x9aab: "Wei " -0x9aac: "Yu " -0x9aad: "Gan " -0x9aae: "Yi " -0x9aaf: "Ang " -0x9ab0: "Tou " -0x9ab1: "Xie " -0x9ab2: "Bao " -0x9ab3: "Bi " -0x9ab4: "Chi " -0x9ab5: "Ti " -0x9ab6: "Di " -0x9ab7: "Ku " -0x9ab8: "Hai " -0x9ab9: "Qiao " -0x9aba: "Gou " -0x9abb: "Kua " -0x9abc: "Ge " -0x9abd: "Tui " -0x9abe: "Geng " -0x9abf: "Pian " -0x9ac0: "Bi " -0x9ac1: "Ke " -0x9ac2: "Ka " -0x9ac3: "Yu " -0x9ac4: "Sui " -0x9ac5: "Lou " -0x9ac6: "Bo " -0x9ac7: "Xiao " -0x9ac8: "Pang " -0x9ac9: "Bo " -0x9aca: "Ci " -0x9acb: "Kuan " -0x9acc: "Bin " -0x9acd: "Mo " -0x9ace: "Liao " -0x9acf: "Lou " -0x9ad0: "Nao " -0x9ad1: "Du " -0x9ad2: "Zang " -0x9ad3: "Sui " -0x9ad4: "Ti " -0x9ad5: "Bin " -0x9ad6: "Kuan " -0x9ad7: "Lu " -0x9ad8: "Gao " -0x9ad9: "Gao " -0x9ada: "Qiao " -0x9adb: "Kao " -0x9adc: "Qiao " -0x9add: "Lao " -0x9ade: "Zao " -0x9adf: "Biao " -0x9ae0: "Kun " -0x9ae1: "Kun " -0x9ae2: "Ti " -0x9ae3: "Fang " -0x9ae4: "Xiu " -0x9ae5: "Ran " -0x9ae6: "Mao " -0x9ae7: "Dan " -0x9ae8: "Kun " -0x9ae9: "Bin " -0x9aea: "Fa " -0x9aeb: "Tiao " -0x9aec: "Peng " -0x9aed: "Zi " -0x9aee: "Fa " -0x9aef: "Ran " -0x9af0: "Ti " -0x9af1: "Pao " -0x9af2: "Pi " -0x9af3: "Mao " -0x9af4: "Fu " -0x9af5: "Er " -0x9af6: "Rong " -0x9af7: "Qu " -0x9af8: "Gong " -0x9af9: "Xiu " -0x9afa: "Gua " -0x9afb: "Ji " -0x9afc: "Peng " -0x9afd: "Zhua " -0x9afe: "Shao " -0x9aff: "Sha " -/* x09b */ -0x9b00: "Ti " -0x9b01: "Li " -0x9b02: "Bin " -0x9b03: "Zong " -0x9b04: "Ti " -0x9b05: "Peng " -0x9b06: "Song " -0x9b07: "Zheng " -0x9b08: "Quan " -0x9b09: "Zong " -0x9b0a: "Shun " -0x9b0b: "Jian " -0x9b0c: "Duo " -0x9b0d: "Hu " -0x9b0e: "La " -0x9b0f: "Jiu " -0x9b10: "Qi " -0x9b11: "Lian " -0x9b12: "Zhen " -0x9b13: "Bin " -0x9b14: "Peng " -0x9b15: "Mo " -0x9b16: "San " -0x9b17: "Man " -0x9b18: "Man " -0x9b19: "Seng " -0x9b1a: "Xu " -0x9b1b: "Lie " -0x9b1c: "Qian " -0x9b1d: "Qian " -0x9b1e: "Nong " -0x9b1f: "Huan " -0x9b20: "Kuai " -0x9b21: "Ning " -0x9b22: "Bin " -0x9b23: "Lie " -0x9b24: "Rang " -0x9b25: "Dou " -0x9b26: "Dou " -0x9b27: "Nao " -0x9b28: "Hong " -0x9b29: "Xi " -0x9b2a: "Dou " -0x9b2b: "Han " -0x9b2c: "Dou " -0x9b2d: "Dou " -0x9b2e: "Jiu " -0x9b2f: "Chang " -0x9b30: "Yu " -0x9b31: "Yu " -0x9b32: "Li " -0x9b33: "Juan " -0x9b34: "Fu " -0x9b35: "Qian " -0x9b36: "Gui " -0x9b37: "Zong " -0x9b38: "Liu " -0x9b39: "Gui " -0x9b3a: "Shang " -0x9b3b: "Yu " -0x9b3c: "Gui " -0x9b3d: "Mei " -0x9b3e: "Ji " -0x9b3f: "Qi " -0x9b40: "Jie " -0x9b41: "Kui " -0x9b42: "Hun " -0x9b43: "Ba " -0x9b44: "Po " -0x9b45: "Mei " -0x9b46: "Xu " -0x9b47: "Yan " -0x9b48: "Xiao " -0x9b49: "Liang " -0x9b4a: "Yu " -0x9b4b: "Tui " -0x9b4c: "Qi " -0x9b4d: "Wang " -0x9b4e: "Liang " -0x9b4f: "Wei " -0x9b50: "Jian " -0x9b51: "Chi " -0x9b52: "Piao " -0x9b53: "Bi " -0x9b54: "Mo " -0x9b55: "Ji " -0x9b56: "Xu " -0x9b57: "Chou " -0x9b58: "Yan " -0x9b59: "Zhan " -0x9b5a: "Yu " -0x9b5b: "Dao " -0x9b5c: "Ren " -0x9b5d: "Ji " -0x9b5e: "Eri " -0x9b5f: "Gong " -0x9b60: "Tuo " -0x9b61: "Diao " -0x9b62: "Ji " -0x9b63: "Xu " -0x9b64: "E " -0x9b65: "E " -0x9b66: "Sha " -0x9b67: "Hang " -0x9b68: "Tun " -0x9b69: "Mo " -0x9b6a: "Jie " -0x9b6b: "Shen " -0x9b6c: "Fan " -0x9b6d: "Yuan " -0x9b6e: "Bi " -0x9b6f: "Lu " -0x9b70: "Wen " -0x9b71: "Hu " -0x9b72: "Lu " -0x9b73: "Za " -0x9b74: "Fang " -0x9b75: "Fen " -0x9b76: "Na " -0x9b77: "You " -0x9b78: "Namazu " -0x9b79: "Todo " -0x9b7a: "He " -0x9b7b: "Xia " -0x9b7c: "Qu " -0x9b7d: "Han " -0x9b7e: "Pi " -0x9b7f: "Ling " -0x9b80: "Tuo " -0x9b81: "Bo " -0x9b82: "Qiu " -0x9b83: "Ping " -0x9b84: "Fu " -0x9b85: "Bi " -0x9b86: "Ji " -0x9b87: "Wei " -0x9b88: "Ju " -0x9b89: "Diao " -0x9b8a: "Bo " -0x9b8b: "You " -0x9b8c: "Gun " -0x9b8d: "Pi " -0x9b8e: "Nian " -0x9b8f: "Xing " -0x9b90: "Tai " -0x9b91: "Bao " -0x9b92: "Fu " -0x9b93: "Zha " -0x9b94: "Ju " -0x9b95: "Gu " -0x9b96: "Kajika " -0x9b97: "Tong " -0x9b98: "[?] " -0x9b99: "Ta " -0x9b9a: "Jie " -0x9b9b: "Shu " -0x9b9c: "Hou " -0x9b9d: "Xiang " -0x9b9e: "Er " -0x9b9f: "An " -0x9ba0: "Wei " -0x9ba1: "Tiao " -0x9ba2: "Zhu " -0x9ba3: "Yin " -0x9ba4: "Lie " -0x9ba5: "Luo " -0x9ba6: "Tong " -0x9ba7: "Yi " -0x9ba8: "Qi " -0x9ba9: "Bing " -0x9baa: "Wei " -0x9bab: "Jiao " -0x9bac: "Bu " -0x9bad: "Gui " -0x9bae: "Xian " -0x9baf: "Ge " -0x9bb0: "Hui " -0x9bb1: "Bora " -0x9bb2: "Mate " -0x9bb3: "Kao " -0x9bb4: "Gori " -0x9bb5: "Duo " -0x9bb6: "Jun " -0x9bb7: "Ti " -0x9bb8: "Man " -0x9bb9: "Xiao " -0x9bba: "Za " -0x9bbb: "Sha " -0x9bbc: "Qin " -0x9bbd: "Yu " -0x9bbe: "Nei " -0x9bbf: "Zhe " -0x9bc0: "Gun " -0x9bc1: "Geng " -0x9bc2: "Su " -0x9bc3: "Wu " -0x9bc4: "Qiu " -0x9bc5: "Ting " -0x9bc6: "Fu " -0x9bc7: "Wan " -0x9bc8: "You " -0x9bc9: "Li " -0x9bca: "Sha " -0x9bcb: "Sha " -0x9bcc: "Gao " -0x9bcd: "Meng " -0x9bce: "Ugui " -0x9bcf: "Asari " -0x9bd0: "Subashiri " -0x9bd1: "Kazunoko " -0x9bd2: "Yong " -0x9bd3: "Ni " -0x9bd4: "Zi " -0x9bd5: "Qi " -0x9bd6: "Qing " -0x9bd7: "Xiang " -0x9bd8: "Nei " -0x9bd9: "Chun " -0x9bda: "Ji " -0x9bdb: "Diao " -0x9bdc: "Qie " -0x9bdd: "Gu " -0x9bde: "Zhou " -0x9bdf: "Dong " -0x9be0: "Lai " -0x9be1: "Fei " -0x9be2: "Ni " -0x9be3: "Yi " -0x9be4: "Kun " -0x9be5: "Lu " -0x9be6: "Jiu " -0x9be7: "Chang " -0x9be8: "Jing " -0x9be9: "Lun " -0x9bea: "Ling " -0x9beb: "Zou " -0x9bec: "Li " -0x9bed: "Meng " -0x9bee: "Zong " -0x9bef: "Zhi " -0x9bf0: "Nian " -0x9bf1: "Shachi " -0x9bf2: "Dojou " -0x9bf3: "Sukesou " -0x9bf4: "Shi " -0x9bf5: "Shen " -0x9bf6: "Hun " -0x9bf7: "Shi " -0x9bf8: "Hou " -0x9bf9: "Xing " -0x9bfa: "Zhu " -0x9bfb: "La " -0x9bfc: "Zong " -0x9bfd: "Ji " -0x9bfe: "Bian " -0x9bff: "Bian " -/* x09c */ -0x9c00: "Huan " -0x9c01: "Quan " -0x9c02: "Ze " -0x9c03: "Wei " -0x9c04: "Wei " -0x9c05: "Yu " -0x9c06: "Qun " -0x9c07: "Rou " -0x9c08: "Die " -0x9c09: "Huang " -0x9c0a: "Lian " -0x9c0b: "Yan " -0x9c0c: "Qiu " -0x9c0d: "Qiu " -0x9c0e: "Jian " -0x9c0f: "Bi " -0x9c10: "E " -0x9c11: "Yang " -0x9c12: "Fu " -0x9c13: "Sai " -0x9c14: "Jian " -0x9c15: "Xia " -0x9c16: "Tuo " -0x9c17: "Hu " -0x9c18: "Muroaji " -0x9c19: "Ruo " -0x9c1a: "Haraka " -0x9c1b: "Wen " -0x9c1c: "Jian " -0x9c1d: "Hao " -0x9c1e: "Wu " -0x9c1f: "Fang " -0x9c20: "Sao " -0x9c21: "Liu " -0x9c22: "Ma " -0x9c23: "Shi " -0x9c24: "Shi " -0x9c25: "Yin " -0x9c26: "Z " -0x9c27: "Teng " -0x9c28: "Ta " -0x9c29: "Yao " -0x9c2a: "Ge " -0x9c2b: "Rong " -0x9c2c: "Qian " -0x9c2d: "Qi " -0x9c2e: "Wen " -0x9c2f: "Ruo " -0x9c30: "Hatahata " -0x9c31: "Lian " -0x9c32: "Ao " -0x9c33: "Le " -0x9c34: "Hui " -0x9c35: "Min " -0x9c36: "Ji " -0x9c37: "Tiao " -0x9c38: "Qu " -0x9c39: "Jian " -0x9c3a: "Sao " -0x9c3b: "Man " -0x9c3c: "Xi " -0x9c3d: "Qiu " -0x9c3e: "Biao " -0x9c3f: "Ji " -0x9c40: "Ji " -0x9c41: "Zhu " -0x9c42: "Jiang " -0x9c43: "Qiu " -0x9c44: "Zhuan " -0x9c45: "Yong " -0x9c46: "Zhang " -0x9c47: "Kang " -0x9c48: "Xue " -0x9c49: "Bie " -0x9c4a: "Jue " -0x9c4b: "Qu " -0x9c4c: "Xiang " -0x9c4d: "Bo " -0x9c4e: "Jiao " -0x9c4f: "Xun " -0x9c50: "Su " -0x9c51: "Huang " -0x9c52: "Zun " -0x9c53: "Shan " -0x9c54: "Shan " -0x9c55: "Fan " -0x9c56: "Jue " -0x9c57: "Lin " -0x9c58: "Xun " -0x9c59: "Miao " -0x9c5a: "Xi " -0x9c5b: "Eso " -0x9c5c: "Kyou " -0x9c5d: "Fen " -0x9c5e: "Guan " -0x9c5f: "Hou " -0x9c60: "Kuai " -0x9c61: "Zei " -0x9c62: "Sao " -0x9c63: "Zhan " -0x9c64: "Gan " -0x9c65: "Gui " -0x9c66: "Sheng " -0x9c67: "Li " -0x9c68: "Chang " -0x9c69: "Hatahata " -0x9c6a: "Shiira " -0x9c6b: "Mutsu " -0x9c6c: "Ru " -0x9c6d: "Ji " -0x9c6e: "Xu " -0x9c6f: "Huo " -0x9c70: "Shiira " -0x9c71: "Li " -0x9c72: "Lie " -0x9c73: "Li " -0x9c74: "Mie " -0x9c75: "Zhen " -0x9c76: "Xiang " -0x9c77: "E " -0x9c78: "Lu " -0x9c79: "Guan " -0x9c7a: "Li " -0x9c7b: "Xian " -0x9c7c: "Yu " -0x9c7d: "Dao " -0x9c7e: "Ji " -0x9c7f: "You " -0x9c80: "Tun " -0x9c81: "Lu " -0x9c82: "Fang " -0x9c83: "Ba " -0x9c84: "He " -0x9c85: "Bo " -0x9c86: "Ping " -0x9c87: "Nian " -0x9c88: "Lu " -0x9c89: "You " -0x9c8a: "Zha " -0x9c8b: "Fu " -0x9c8c: "Bo " -0x9c8d: "Bao " -0x9c8e: "Hou " -0x9c8f: "Pi " -0x9c90: "Tai " -0x9c91: "Gui " -0x9c92: "Jie " -0x9c93: "Kao " -0x9c94: "Wei " -0x9c95: "Er " -0x9c96: "Tong " -0x9c97: "Ze " -0x9c98: "Hou " -0x9c99: "Kuai " -0x9c9a: "Ji " -0x9c9b: "Jiao " -0x9c9c: "Xian " -0x9c9d: "Za " -0x9c9e: "Xiang " -0x9c9f: "Xun " -0x9ca0: "Geng " -0x9ca1: "Li " -0x9ca2: "Lian " -0x9ca3: "Jian " -0x9ca4: "Li " -0x9ca5: "Shi " -0x9ca6: "Tiao " -0x9ca7: "Gun " -0x9ca8: "Sha " -0x9ca9: "Wan " -0x9caa: "Jun " -0x9cab: "Ji " -0x9cac: "Yong " -0x9cad: "Qing " -0x9cae: "Ling " -0x9caf: "Qi " -0x9cb0: "Zou " -0x9cb1: "Fei " -0x9cb2: "Kun " -0x9cb3: "Chang " -0x9cb4: "Gu " -0x9cb5: "Ni " -0x9cb6: "Nian " -0x9cb7: "Diao " -0x9cb8: "Jing " -0x9cb9: "Shen " -0x9cba: "Shi " -0x9cbb: "Zi " -0x9cbc: "Fen " -0x9cbd: "Die " -0x9cbe: "Bi " -0x9cbf: "Chang " -0x9cc0: "Shi " -0x9cc1: "Wen " -0x9cc2: "Wei " -0x9cc3: "Sai " -0x9cc4: "E " -0x9cc5: "Qiu " -0x9cc6: "Fu " -0x9cc7: "Huang " -0x9cc8: "Quan " -0x9cc9: "Jiang " -0x9cca: "Bian " -0x9ccb: "Sao " -0x9ccc: "Ao " -0x9ccd: "Qi " -0x9cce: "Ta " -0x9ccf: "Yin " -0x9cd0: "Yao " -0x9cd1: "Fang " -0x9cd2: "Jian " -0x9cd3: "Le " -0x9cd4: "Biao " -0x9cd5: "Xue " -0x9cd6: "Bie " -0x9cd7: "Man " -0x9cd8: "Min " -0x9cd9: "Yong " -0x9cda: "Wei " -0x9cdb: "Xi " -0x9cdc: "Jue " -0x9cdd: "Shan " -0x9cde: "Lin " -0x9cdf: "Zun " -0x9ce0: "Huo " -0x9ce1: "Gan " -0x9ce2: "Li " -0x9ce3: "Zhan " -0x9ce4: "Guan " -0x9ce5: "Niao " -0x9ce6: "Yi " -0x9ce7: "Fu " -0x9ce8: "Li " -0x9ce9: "Jiu " -0x9cea: "Bu " -0x9ceb: "Yan " -0x9cec: "Fu " -0x9ced: "Diao " -0x9cee: "Ji " -0x9cef: "Feng " -0x9cf0: "Nio " -0x9cf1: "Gan " -0x9cf2: "Shi " -0x9cf3: "Feng " -0x9cf4: "Ming " -0x9cf5: "Bao " -0x9cf6: "Yuan " -0x9cf7: "Zhi " -0x9cf8: "Hu " -0x9cf9: "Qin " -0x9cfa: "Fu " -0x9cfb: "Fen " -0x9cfc: "Wen " -0x9cfd: "Jian " -0x9cfe: "Shi " -0x9cff: "Yu " -/* x09d */ -0x9d00: "Fou " -0x9d01: "Yiao " -0x9d02: "Jue " -0x9d03: "Jue " -0x9d04: "Pi " -0x9d05: "Huan " -0x9d06: "Zhen " -0x9d07: "Bao " -0x9d08: "Yan " -0x9d09: "Ya " -0x9d0a: "Zheng " -0x9d0b: "Fang " -0x9d0c: "Feng " -0x9d0d: "Wen " -0x9d0e: "Ou " -0x9d0f: "Te " -0x9d10: "Jia " -0x9d11: "Nu " -0x9d12: "Ling " -0x9d13: "Mie " -0x9d14: "Fu " -0x9d15: "Tuo " -0x9d16: "Wen " -0x9d17: "Li " -0x9d18: "Bian " -0x9d19: "Zhi " -0x9d1a: "Ge " -0x9d1b: "Yuan " -0x9d1c: "Zi " -0x9d1d: "Qu " -0x9d1e: "Xiao " -0x9d1f: "Zhi " -0x9d20: "Dan " -0x9d21: "Ju " -0x9d22: "You " -0x9d23: "Gu " -0x9d24: "Zhong " -0x9d25: "Yu " -0x9d26: "Yang " -0x9d27: "Rong " -0x9d28: "Ya " -0x9d29: "Tie " -0x9d2a: "Yu " -0x9d2b: "Shigi " -0x9d2c: "Ying " -0x9d2d: "Zhui " -0x9d2e: "Wu " -0x9d2f: "Er " -0x9d30: "Gua " -0x9d31: "Ai " -0x9d32: "Zhi " -0x9d33: "Yan " -0x9d34: "Heng " -0x9d35: "Jiao " -0x9d36: "Ji " -0x9d37: "Lie " -0x9d38: "Zhu " -0x9d39: "Ren " -0x9d3a: "Yi " -0x9d3b: "Hong " -0x9d3c: "Luo " -0x9d3d: "Ru " -0x9d3e: "Mou " -0x9d3f: "Ge " -0x9d40: "Ren " -0x9d41: "Jiao " -0x9d42: "Xiu " -0x9d43: "Zhou " -0x9d44: "Zhi " -0x9d45: "Luo " -0x9d46: "Chidori " -0x9d47: "Toki " -0x9d48: "Ten " -0x9d49: "Luan " -0x9d4a: "Jia " -0x9d4b: "Ji " -0x9d4c: "Yu " -0x9d4d: "Huan " -0x9d4e: "Tuo " -0x9d4f: "Bu " -0x9d50: "Wu " -0x9d51: "Juan " -0x9d52: "Yu " -0x9d53: "Bo " -0x9d54: "Xun " -0x9d55: "Xun " -0x9d56: "Bi " -0x9d57: "Xi " -0x9d58: "Jun " -0x9d59: "Ju " -0x9d5a: "Tu " -0x9d5b: "Jing " -0x9d5c: "Ti " -0x9d5d: "E " -0x9d5e: "E " -0x9d5f: "Kuang " -0x9d60: "Hu " -0x9d61: "Wu " -0x9d62: "Shen " -0x9d63: "Lai " -0x9d64: "Ikaruga " -0x9d65: "Kakesu " -0x9d66: "Lu " -0x9d67: "Ping " -0x9d68: "Shu " -0x9d69: "Fu " -0x9d6a: "An " -0x9d6b: "Zhao " -0x9d6c: "Peng " -0x9d6d: "Qin " -0x9d6e: "Qian " -0x9d6f: "Bei " -0x9d70: "Diao " -0x9d71: "Lu " -0x9d72: "Que " -0x9d73: "Jian " -0x9d74: "Ju " -0x9d75: "Tu " -0x9d76: "Ya " -0x9d77: "Yuan " -0x9d78: "Qi " -0x9d79: "Li " -0x9d7a: "Ye " -0x9d7b: "Zhui " -0x9d7c: "Kong " -0x9d7d: "Zhui " -0x9d7e: "Kun " -0x9d7f: "Sheng " -0x9d80: "Qi " -0x9d81: "Jing " -0x9d82: "Yi " -0x9d83: "Yi " -0x9d84: "Jing " -0x9d85: "Zi " -0x9d86: "Lai " -0x9d87: "Dong " -0x9d88: "Qi " -0x9d89: "Chun " -0x9d8a: "Geng " -0x9d8b: "Ju " -0x9d8c: "Qu " -0x9d8d: "Isuka " -0x9d8e: "Kikuitadaki " -0x9d8f: "Ji " -0x9d90: "Shu " -0x9d91: "[?] " -0x9d92: "Chi " -0x9d93: "Miao " -0x9d94: "Rou " -0x9d95: "An " -0x9d96: "Qiu " -0x9d97: "Ti " -0x9d98: "Hu " -0x9d99: "Ti " -0x9d9a: "E " -0x9d9b: "Jie " -0x9d9c: "Mao " -0x9d9d: "Fu " -0x9d9e: "Chun " -0x9d9f: "Tu " -0x9da0: "Yan " -0x9da1: "He " -0x9da2: "Yuan " -0x9da3: "Pian " -0x9da4: "Yun " -0x9da5: "Mei " -0x9da6: "Hu " -0x9da7: "Ying " -0x9da8: "Dun " -0x9da9: "Mu " -0x9daa: "Ju " -0x9dab: "Tsugumi " -0x9dac: "Cang " -0x9dad: "Fang " -0x9dae: "Gu " -0x9daf: "Ying " -0x9db0: "Yuan " -0x9db1: "Xuan " -0x9db2: "Weng " -0x9db3: "Shi " -0x9db4: "He " -0x9db5: "Chu " -0x9db6: "Tang " -0x9db7: "Xia " -0x9db8: "Ruo " -0x9db9: "Liu " -0x9dba: "Ji " -0x9dbb: "Gu " -0x9dbc: "Jian " -0x9dbd: "Zhun " -0x9dbe: "Han " -0x9dbf: "Zi " -0x9dc0: "Zi " -0x9dc1: "Ni " -0x9dc2: "Yao " -0x9dc3: "Yan " -0x9dc4: "Ji " -0x9dc5: "Li " -0x9dc6: "Tian " -0x9dc7: "Kou " -0x9dc8: "Ti " -0x9dc9: "Ti " -0x9dca: "Ni " -0x9dcb: "Tu " -0x9dcc: "Ma " -0x9dcd: "Jiao " -0x9dce: "Gao " -0x9dcf: "Tian " -0x9dd0: "Chen " -0x9dd1: "Li " -0x9dd2: "Zhuan " -0x9dd3: "Zhe " -0x9dd4: "Ao " -0x9dd5: "Yao " -0x9dd6: "Yi " -0x9dd7: "Ou " -0x9dd8: "Chi " -0x9dd9: "Zhi " -0x9dda: "Liao " -0x9ddb: "Rong " -0x9ddc: "Lou " -0x9ddd: "Bi " -0x9dde: "Shuang " -0x9ddf: "Zhuo " -0x9de0: "Yu " -0x9de1: "Wu " -0x9de2: "Jue " -0x9de3: "Yin " -0x9de4: "Quan " -0x9de5: "Si " -0x9de6: "Jiao " -0x9de7: "Yi " -0x9de8: "Hua " -0x9de9: "Bi " -0x9dea: "Ying " -0x9deb: "Su " -0x9dec: "Huang " -0x9ded: "Fan " -0x9dee: "Jiao " -0x9def: "Liao " -0x9df0: "Yan " -0x9df1: "Kao " -0x9df2: "Jiu " -0x9df3: "Xian " -0x9df4: "Xian " -0x9df5: "Tu " -0x9df6: "Mai " -0x9df7: "Zun " -0x9df8: "Yu " -0x9df9: "Ying " -0x9dfa: "Lu " -0x9dfb: "Tuan " -0x9dfc: "Xian " -0x9dfd: "Xue " -0x9dfe: "Yi " -0x9dff: "Pi " -/* x09e */ -0x9e00: "Shu " -0x9e01: "Luo " -0x9e02: "Qi " -0x9e03: "Yi " -0x9e04: "Ji " -0x9e05: "Zhe " -0x9e06: "Yu " -0x9e07: "Zhan " -0x9e08: "Ye " -0x9e09: "Yang " -0x9e0a: "Pi " -0x9e0b: "Ning " -0x9e0c: "Huo " -0x9e0d: "Mi " -0x9e0e: "Ying " -0x9e0f: "Meng " -0x9e10: "Di " -0x9e11: "Yue " -0x9e12: "Yu " -0x9e13: "Lei " -0x9e14: "Bao " -0x9e15: "Lu " -0x9e16: "He " -0x9e17: "Long " -0x9e18: "Shuang " -0x9e19: "Yue " -0x9e1a: "Ying " -0x9e1b: "Guan " -0x9e1c: "Qu " -0x9e1d: "Li " -0x9e1e: "Luan " -0x9e1f: "Niao " -0x9e20: "Jiu " -0x9e21: "Ji " -0x9e22: "Yuan " -0x9e23: "Ming " -0x9e24: "Shi " -0x9e25: "Ou " -0x9e26: "Ya " -0x9e27: "Cang " -0x9e28: "Bao " -0x9e29: "Zhen " -0x9e2a: "Gu " -0x9e2b: "Dong " -0x9e2c: "Lu " -0x9e2d: "Ya " -0x9e2e: "Xiao " -0x9e2f: "Yang " -0x9e30: "Ling " -0x9e31: "Zhi " -0x9e32: "Qu " -0x9e33: "Yuan " -0x9e34: "Xue " -0x9e35: "Tuo " -0x9e36: "Si " -0x9e37: "Zhi " -0x9e38: "Er " -0x9e39: "Gua " -0x9e3a: "Xiu " -0x9e3b: "Heng " -0x9e3c: "Zhou " -0x9e3d: "Ge " -0x9e3e: "Luan " -0x9e3f: "Hong " -0x9e40: "Wu " -0x9e41: "Bo " -0x9e42: "Li " -0x9e43: "Juan " -0x9e44: "Hu " -0x9e45: "E " -0x9e46: "Yu " -0x9e47: "Xian " -0x9e48: "Ti " -0x9e49: "Wu " -0x9e4a: "Que " -0x9e4b: "Miao " -0x9e4c: "An " -0x9e4d: "Kun " -0x9e4e: "Bei " -0x9e4f: "Peng " -0x9e50: "Qian " -0x9e51: "Chun " -0x9e52: "Geng " -0x9e53: "Yuan " -0x9e54: "Su " -0x9e55: "Hu " -0x9e56: "He " -0x9e57: "E " -0x9e58: "Gu " -0x9e59: "Qiu " -0x9e5a: "Zi " -0x9e5b: "Mei " -0x9e5c: "Mu " -0x9e5d: "Ni " -0x9e5e: "Yao " -0x9e5f: "Weng " -0x9e60: "Liu " -0x9e61: "Ji " -0x9e62: "Ni " -0x9e63: "Jian " -0x9e64: "He " -0x9e65: "Yi " -0x9e66: "Ying " -0x9e67: "Zhe " -0x9e68: "Liao " -0x9e69: "Liao " -0x9e6a: "Jiao " -0x9e6b: "Jiu " -0x9e6c: "Yu " -0x9e6d: "Lu " -0x9e6e: "Xuan " -0x9e6f: "Zhan " -0x9e70: "Ying " -0x9e71: "Huo " -0x9e72: "Meng " -0x9e73: "Guan " -0x9e74: "Shuang " -0x9e75: "Lu " -0x9e76: "Jin " -0x9e77: "Ling " -0x9e78: "Jian " -0x9e79: "Xian " -0x9e7a: "Cuo " -0x9e7b: "Jian " -0x9e7c: "Jian " -0x9e7d: "Yan " -0x9e7e: "Cuo " -0x9e7f: "Lu " -0x9e80: "You " -0x9e81: "Cu " -0x9e82: "Ji " -0x9e83: "Biao " -0x9e84: "Cu " -0x9e85: "Biao " -0x9e86: "Zhu " -0x9e87: "Jun " -0x9e88: "Zhu " -0x9e89: "Jian " -0x9e8a: "Mi " -0x9e8b: "Mi " -0x9e8c: "Wu " -0x9e8d: "Liu " -0x9e8e: "Chen " -0x9e8f: "Jun " -0x9e90: "Lin " -0x9e91: "Ni " -0x9e92: "Qi " -0x9e93: "Lu " -0x9e94: "Jiu " -0x9e95: "Jun " -0x9e96: "Jing " -0x9e97: "Li " -0x9e98: "Xiang " -0x9e99: "Yan " -0x9e9a: "Jia " -0x9e9b: "Mi " -0x9e9c: "Li " -0x9e9d: "She " -0x9e9e: "Zhang " -0x9e9f: "Lin " -0x9ea0: "Jing " -0x9ea1: "Ji " -0x9ea2: "Ling " -0x9ea3: "Yan " -0x9ea4: "Cu " -0x9ea5: "Mai " -0x9ea6: "Mai " -0x9ea7: "Ge " -0x9ea8: "Chao " -0x9ea9: "Fu " -0x9eaa: "Mian " -0x9eab: "Mian " -0x9eac: "Fu " -0x9ead: "Pao " -0x9eae: "Qu " -0x9eaf: "Qu " -0x9eb0: "Mou " -0x9eb1: "Fu " -0x9eb2: "Xian " -0x9eb3: "Lai " -0x9eb4: "Qu " -0x9eb5: "Mian " -0x9eb6: "[?] " -0x9eb7: "Feng " -0x9eb8: "Fu " -0x9eb9: "Qu " -0x9eba: "Mian " -0x9ebb: "Ma " -0x9ebc: "Mo " -0x9ebd: "Mo " -0x9ebe: "Hui " -0x9ebf: "Ma " -0x9ec0: "Zou " -0x9ec1: "Nen " -0x9ec2: "Fen " -0x9ec3: "Huang " -0x9ec4: "Huang " -0x9ec5: "Jin " -0x9ec6: "Guang " -0x9ec7: "Tian " -0x9ec8: "Tou " -0x9ec9: "Heng " -0x9eca: "Xi " -0x9ecb: "Kuang " -0x9ecc: "Heng " -0x9ecd: "Shu " -0x9ece: "Li " -0x9ecf: "Nian " -0x9ed0: "Chi " -0x9ed1: "Hei " -0x9ed2: "Hei " -0x9ed3: "Yi " -0x9ed4: "Qian " -0x9ed5: "Dan " -0x9ed6: "Xi " -0x9ed7: "Tuan " -0x9ed8: "Mo " -0x9ed9: "Mo " -0x9eda: "Qian " -0x9edb: "Dai " -0x9edc: "Chu " -0x9edd: "You " -0x9ede: "Dian " -0x9edf: "Yi " -0x9ee0: "Xia " -0x9ee1: "Yan " -0x9ee2: "Qu " -0x9ee3: "Mei " -0x9ee4: "Yan " -0x9ee5: "Jing " -0x9ee6: "Yu " -0x9ee7: "Li " -0x9ee8: "Dang " -0x9ee9: "Du " -0x9eea: "Can " -0x9eeb: "Yin " -0x9eec: "An " -0x9eed: "Yan " -0x9eee: "Tan " -0x9eef: "An " -0x9ef0: "Zhen " -0x9ef1: "Dai " -0x9ef2: "Can " -0x9ef3: "Yi " -0x9ef4: "Mei " -0x9ef5: "Dan " -0x9ef6: "Yan " -0x9ef7: "Du " -0x9ef8: "Lu " -0x9ef9: "Zhi " -0x9efa: "Fen " -0x9efb: "Fu " -0x9efc: "Fu " -0x9efd: "Min " -0x9efe: "Min " -0x9eff: "Yuan " -/* x09f */ -0x9f00: "Cu " -0x9f01: "Qu " -0x9f02: "Chao " -0x9f03: "Wa " -0x9f04: "Zhu " -0x9f05: "Zhi " -0x9f06: "Mang " -0x9f07: "Ao " -0x9f08: "Bie " -0x9f09: "Tuo " -0x9f0a: "Bi " -0x9f0b: "Yuan " -0x9f0c: "Chao " -0x9f0d: "Tuo " -0x9f0e: "Ding " -0x9f0f: "Mi " -0x9f10: "Nai " -0x9f11: "Ding " -0x9f12: "Zi " -0x9f13: "Gu " -0x9f14: "Gu " -0x9f15: "Dong " -0x9f16: "Fen " -0x9f17: "Tao " -0x9f18: "Yuan " -0x9f19: "Pi " -0x9f1a: "Chang " -0x9f1b: "Gao " -0x9f1c: "Qi " -0x9f1d: "Yuan " -0x9f1e: "Tang " -0x9f1f: "Teng " -0x9f20: "Shu " -0x9f21: "Shu " -0x9f22: "Fen " -0x9f23: "Fei " -0x9f24: "Wen " -0x9f25: "Ba " -0x9f26: "Diao " -0x9f27: "Tuo " -0x9f28: "Tong " -0x9f29: "Qu " -0x9f2a: "Sheng " -0x9f2b: "Shi " -0x9f2c: "You " -0x9f2d: "Shi " -0x9f2e: "Ting " -0x9f2f: "Wu " -0x9f30: "Nian " -0x9f31: "Jing " -0x9f32: "Hun " -0x9f33: "Ju " -0x9f34: "Yan " -0x9f35: "Tu " -0x9f36: "Ti " -0x9f37: "Xi " -0x9f38: "Xian " -0x9f39: "Yan " -0x9f3a: "Lei " -0x9f3b: "Bi " -0x9f3c: "Yao " -0x9f3d: "Qiu " -0x9f3e: "Han " -0x9f3f: "Wu " -0x9f40: "Wu " -0x9f41: "Hou " -0x9f42: "Xi " -0x9f43: "Ge " -0x9f44: "Zha " -0x9f45: "Xiu " -0x9f46: "Weng " -0x9f47: "Zha " -0x9f48: "Nong " -0x9f49: "Nang " -0x9f4a: "Qi " -0x9f4b: "Zhai " -0x9f4c: "Ji " -0x9f4d: "Zi " -0x9f4e: "Ji " -0x9f4f: "Ji " -0x9f50: "Qi " -0x9f51: "Ji " -0x9f52: "Chi " -0x9f53: "Chen " -0x9f54: "Chen " -0x9f55: "He " -0x9f56: "Ya " -0x9f57: "Ken " -0x9f58: "Xie " -0x9f59: "Pao " -0x9f5a: "Cuo " -0x9f5b: "Shi " -0x9f5c: "Zi " -0x9f5d: "Chi " -0x9f5e: "Nian " -0x9f5f: "Ju " -0x9f60: "Tiao " -0x9f61: "Ling " -0x9f62: "Ling " -0x9f63: "Chu " -0x9f64: "Quan " -0x9f65: "Xie " -0x9f66: "Ken " -0x9f67: "Nie " -0x9f68: "Jiu " -0x9f69: "Yao " -0x9f6a: "Chuo " -0x9f6b: "Kun " -0x9f6c: "Yu " -0x9f6d: "Chu " -0x9f6e: "Yi " -0x9f6f: "Ni " -0x9f70: "Cuo " -0x9f71: "Zou " -0x9f72: "Qu " -0x9f73: "Nen " -0x9f74: "Xian " -0x9f75: "Ou " -0x9f76: "E " -0x9f77: "Wo " -0x9f78: "Yi " -0x9f79: "Chuo " -0x9f7a: "Zou " -0x9f7b: "Dian " -0x9f7c: "Chu " -0x9f7d: "Jin " -0x9f7e: "Ya " -0x9f7f: "Chi " -0x9f80: "Chen " -0x9f81: "He " -0x9f82: "Ken " -0x9f83: "Ju " -0x9f84: "Ling " -0x9f85: "Pao " -0x9f86: "Tiao " -0x9f87: "Zi " -0x9f88: "Ken " -0x9f89: "Yu " -0x9f8a: "Chuo " -0x9f8b: "Qu " -0x9f8c: "Wo " -0x9f8d: "Long " -0x9f8e: "Pang " -0x9f8f: "Gong " -0x9f90: "Pang " -0x9f91: "Yan " -0x9f92: "Long " -0x9f93: "Long " -0x9f94: "Gong " -0x9f95: "Kan " -0x9f96: "Ta " -0x9f97: "Ling " -0x9f98: "Ta " -0x9f99: "Long " -0x9f9a: "Gong " -0x9f9b: "Kan " -0x9f9c: "Gui " -0x9f9d: "Qiu " -0x9f9e: "Bie " -0x9f9f: "Gui " -0x9fa0: "Yue " -0x9fa1: "Chui " -0x9fa2: "He " -0x9fa3: "Jue " -0x9fa4: "Xie " -0x9fa5: "Yu " -0x9fa6: "[?]" -0x9fa7: "[?]" -0x9fa8: "[?]" -0x9fa9: "[?]" -0x9faa: "[?]" -0x9fab: "[?]" -0x9fac: "[?]" -0x9fad: "[?]" -0x9fae: "[?]" -0x9faf: "[?]" -0x9fb0: "[?]" -0x9fb1: "[?]" -0x9fb2: "[?]" -0x9fb3: "[?]" -0x9fb4: "[?]" -0x9fb5: "[?]" -0x9fb6: "[?]" -0x9fb7: "[?]" -0x9fb8: "[?]" -0x9fb9: "[?]" -0x9fba: "[?]" -0x9fbb: "[?]" -0x9fbc: "[?]" -0x9fbd: "[?]" -0x9fbe: "[?]" -0x9fbf: "[?]" -0x9fc0: "[?]" -0x9fc1: "[?]" -0x9fc2: "[?]" -0x9fc3: "[?]" -0x9fc4: "[?]" -0x9fc5: "[?]" -0x9fc6: "[?]" -0x9fc7: "[?]" -0x9fc8: "[?]" -0x9fc9: "[?]" -0x9fca: "[?]" -0x9fcb: "[?]" -0x9fcc: "[?]" -0x9fcd: "[?]" -0x9fce: "[?]" -0x9fcf: "[?]" -0x9fd0: "[?]" -0x9fd1: "[?]" -0x9fd2: "[?]" -0x9fd3: "[?]" -0x9fd4: "[?]" -0x9fd5: "[?]" -0x9fd6: "[?]" -0x9fd7: "[?]" -0x9fd8: "[?]" -0x9fd9: "[?]" -0x9fda: "[?]" -0x9fdb: "[?]" -0x9fdc: "[?]" -0x9fdd: "[?]" -0x9fde: "[?]" -0x9fdf: "[?]" -0x9fe0: "[?]" -0x9fe1: "[?]" -0x9fe2: "[?]" -0x9fe3: "[?]" -0x9fe4: "[?]" -0x9fe5: "[?]" -0x9fe6: "[?]" -0x9fe7: "[?]" -0x9fe8: "[?]" -0x9fe9: "[?]" -0x9fea: "[?]" -0x9feb: "[?]" -0x9fec: "[?]" -0x9fed: "[?]" -0x9fee: "[?]" -0x9fef: "[?]" -0x9ff0: "[?]" -0x9ff1: "[?]" -0x9ff2: "[?]" -0x9ff3: "[?]" -0x9ff4: "[?]" -0x9ff5: "[?]" -0x9ff6: "[?]" -0x9ff7: "[?]" -0x9ff8: "[?]" -0x9ff9: "[?]" -0x9ffa: "[?]" -0x9ffb: "[?]" -0x9ffc: "[?]" -0x9ffd: "[?]" -0x9ffe: "[?]" -/* x0a0 */ -0xa000: "it" -0xa001: "ix" -0xa002: "i" -0xa003: "ip" -0xa004: "iet" -0xa005: "iex" -0xa006: "ie" -0xa007: "iep" -0xa008: "at" -0xa009: "ax" -0xa00a: "a" -0xa00b: "ap" -0xa00c: "uox" -0xa00d: "uo" -0xa00e: "uop" -0xa00f: "ot" -0xa010: "ox" -0xa011: "o" -0xa012: "op" -0xa013: "ex" -0xa014: "e" -0xa015: "wu" -0xa016: "bit" -0xa017: "bix" -0xa018: "bi" -0xa019: "bip" -0xa01a: "biet" -0xa01b: "biex" -0xa01c: "bie" -0xa01d: "biep" -0xa01e: "bat" -0xa01f: "bax" -0xa020: "ba" -0xa021: "bap" -0xa022: "buox" -0xa023: "buo" -0xa024: "buop" -0xa025: "bot" -0xa026: "box" -0xa027: "bo" -0xa028: "bop" -0xa029: "bex" -0xa02a: "be" -0xa02b: "bep" -0xa02c: "but" -0xa02d: "bux" -0xa02e: "bu" -0xa02f: "bup" -0xa030: "burx" -0xa031: "bur" -0xa032: "byt" -0xa033: "byx" -0xa034: "by" -0xa035: "byp" -0xa036: "byrx" -0xa037: "byr" -0xa038: "pit" -0xa039: "pix" -0xa03a: "pi" -0xa03b: "pip" -0xa03c: "piex" -0xa03d: "pie" -0xa03e: "piep" -0xa03f: "pat" -0xa040: "pax" -0xa041: "pa" -0xa042: "pap" -0xa043: "puox" -0xa044: "puo" -0xa045: "puop" -0xa046: "pot" -0xa047: "pox" -0xa048: "po" -0xa049: "pop" -0xa04a: "put" -0xa04b: "pux" -0xa04c: "pu" -0xa04d: "pup" -0xa04e: "purx" -0xa04f: "pur" -0xa050: "pyt" -0xa051: "pyx" -0xa052: "py" -0xa053: "pyp" -0xa054: "pyrx" -0xa055: "pyr" -0xa056: "bbit" -0xa057: "bbix" -0xa058: "bbi" -0xa059: "bbip" -0xa05a: "bbiet" -0xa05b: "bbiex" -0xa05c: "bbie" -0xa05d: "bbiep" -0xa05e: "bbat" -0xa05f: "bbax" -0xa060: "bba" -0xa061: "bbap" -0xa062: "bbuox" -0xa063: "bbuo" -0xa064: "bbuop" -0xa065: "bbot" -0xa066: "bbox" -0xa067: "bbo" -0xa068: "bbop" -0xa069: "bbex" -0xa06a: "bbe" -0xa06b: "bbep" -0xa06c: "bbut" -0xa06d: "bbux" -0xa06e: "bbu" -0xa06f: "bbup" -0xa070: "bburx" -0xa071: "bbur" -0xa072: "bbyt" -0xa073: "bbyx" -0xa074: "bby" -0xa075: "bbyp" -0xa076: "nbit" -0xa077: "nbix" -0xa078: "nbi" -0xa079: "nbip" -0xa07a: "nbiex" -0xa07b: "nbie" -0xa07c: "nbiep" -0xa07d: "nbat" -0xa07e: "nbax" -0xa07f: "nba" -0xa080: "nbap" -0xa081: "nbot" -0xa082: "nbox" -0xa083: "nbo" -0xa084: "nbop" -0xa085: "nbut" -0xa086: "nbux" -0xa087: "nbu" -0xa088: "nbup" -0xa089: "nburx" -0xa08a: "nbur" -0xa08b: "nbyt" -0xa08c: "nbyx" -0xa08d: "nby" -0xa08e: "nbyp" -0xa08f: "nbyrx" -0xa090: "nbyr" -0xa091: "hmit" -0xa092: "hmix" -0xa093: "hmi" -0xa094: "hmip" -0xa095: "hmiex" -0xa096: "hmie" -0xa097: "hmiep" -0xa098: "hmat" -0xa099: "hmax" -0xa09a: "hma" -0xa09b: "hmap" -0xa09c: "hmuox" -0xa09d: "hmuo" -0xa09e: "hmuop" -0xa09f: "hmot" -0xa0a0: "hmox" -0xa0a1: "hmo" -0xa0a2: "hmop" -0xa0a3: "hmut" -0xa0a4: "hmux" -0xa0a5: "hmu" -0xa0a6: "hmup" -0xa0a7: "hmurx" -0xa0a8: "hmur" -0xa0a9: "hmyx" -0xa0aa: "hmy" -0xa0ab: "hmyp" -0xa0ac: "hmyrx" -0xa0ad: "hmyr" -0xa0ae: "mit" -0xa0af: "mix" -0xa0b0: "mi" -0xa0b1: "mip" -0xa0b2: "miex" -0xa0b3: "mie" -0xa0b4: "miep" -0xa0b5: "mat" -0xa0b6: "max" -0xa0b7: "ma" -0xa0b8: "map" -0xa0b9: "muot" -0xa0ba: "muox" -0xa0bb: "muo" -0xa0bc: "muop" -0xa0bd: "mot" -0xa0be: "mox" -0xa0bf: "mo" -0xa0c0: "mop" -0xa0c1: "mex" -0xa0c2: "me" -0xa0c3: "mut" -0xa0c4: "mux" -0xa0c5: "mu" -0xa0c6: "mup" -0xa0c7: "murx" -0xa0c8: "mur" -0xa0c9: "myt" -0xa0ca: "myx" -0xa0cb: "my" -0xa0cc: "myp" -0xa0cd: "fit" -0xa0ce: "fix" -0xa0cf: "fi" -0xa0d0: "fip" -0xa0d1: "fat" -0xa0d2: "fax" -0xa0d3: "fa" -0xa0d4: "fap" -0xa0d5: "fox" -0xa0d6: "fo" -0xa0d7: "fop" -0xa0d8: "fut" -0xa0d9: "fux" -0xa0da: "fu" -0xa0db: "fup" -0xa0dc: "furx" -0xa0dd: "fur" -0xa0de: "fyt" -0xa0df: "fyx" -0xa0e0: "fy" -0xa0e1: "fyp" -0xa0e2: "vit" -0xa0e3: "vix" -0xa0e4: "vi" -0xa0e5: "vip" -0xa0e6: "viet" -0xa0e7: "viex" -0xa0e8: "vie" -0xa0e9: "viep" -0xa0ea: "vat" -0xa0eb: "vax" -0xa0ec: "va" -0xa0ed: "vap" -0xa0ee: "vot" -0xa0ef: "vox" -0xa0f0: "vo" -0xa0f1: "vop" -0xa0f2: "vex" -0xa0f3: "vep" -0xa0f4: "vut" -0xa0f5: "vux" -0xa0f6: "vu" -0xa0f7: "vup" -0xa0f8: "vurx" -0xa0f9: "vur" -0xa0fa: "vyt" -0xa0fb: "vyx" -0xa0fc: "vy" -0xa0fd: "vyp" -0xa0fe: "vyrx" -0xa0ff: "vyr" -/* x0a1 */ -0xa100: "dit" -0xa101: "dix" -0xa102: "di" -0xa103: "dip" -0xa104: "diex" -0xa105: "die" -0xa106: "diep" -0xa107: "dat" -0xa108: "dax" -0xa109: "da" -0xa10a: "dap" -0xa10b: "duox" -0xa10c: "duo" -0xa10d: "dot" -0xa10e: "dox" -0xa10f: "do" -0xa110: "dop" -0xa111: "dex" -0xa112: "de" -0xa113: "dep" -0xa114: "dut" -0xa115: "dux" -0xa116: "du" -0xa117: "dup" -0xa118: "durx" -0xa119: "dur" -0xa11a: "tit" -0xa11b: "tix" -0xa11c: "ti" -0xa11d: "tip" -0xa11e: "tiex" -0xa11f: "tie" -0xa120: "tiep" -0xa121: "tat" -0xa122: "tax" -0xa123: "ta" -0xa124: "tap" -0xa125: "tuot" -0xa126: "tuox" -0xa127: "tuo" -0xa128: "tuop" -0xa129: "tot" -0xa12a: "tox" -0xa12b: "to" -0xa12c: "top" -0xa12d: "tex" -0xa12e: "te" -0xa12f: "tep" -0xa130: "tut" -0xa131: "tux" -0xa132: "tu" -0xa133: "tup" -0xa134: "turx" -0xa135: "tur" -0xa136: "ddit" -0xa137: "ddix" -0xa138: "ddi" -0xa139: "ddip" -0xa13a: "ddiex" -0xa13b: "ddie" -0xa13c: "ddiep" -0xa13d: "ddat" -0xa13e: "ddax" -0xa13f: "dda" -0xa140: "ddap" -0xa141: "dduox" -0xa142: "dduo" -0xa143: "dduop" -0xa144: "ddot" -0xa145: "ddox" -0xa146: "ddo" -0xa147: "ddop" -0xa148: "ddex" -0xa149: "dde" -0xa14a: "ddep" -0xa14b: "ddut" -0xa14c: "ddux" -0xa14d: "ddu" -0xa14e: "ddup" -0xa14f: "ddurx" -0xa150: "ddur" -0xa151: "ndit" -0xa152: "ndix" -0xa153: "ndi" -0xa154: "ndip" -0xa155: "ndiex" -0xa156: "ndie" -0xa157: "ndat" -0xa158: "ndax" -0xa159: "nda" -0xa15a: "ndap" -0xa15b: "ndot" -0xa15c: "ndox" -0xa15d: "ndo" -0xa15e: "ndop" -0xa15f: "ndex" -0xa160: "nde" -0xa161: "ndep" -0xa162: "ndut" -0xa163: "ndux" -0xa164: "ndu" -0xa165: "ndup" -0xa166: "ndurx" -0xa167: "ndur" -0xa168: "hnit" -0xa169: "hnix" -0xa16a: "hni" -0xa16b: "hnip" -0xa16c: "hniet" -0xa16d: "hniex" -0xa16e: "hnie" -0xa16f: "hniep" -0xa170: "hnat" -0xa171: "hnax" -0xa172: "hna" -0xa173: "hnap" -0xa174: "hnuox" -0xa175: "hnuo" -0xa176: "hnot" -0xa177: "hnox" -0xa178: "hnop" -0xa179: "hnex" -0xa17a: "hne" -0xa17b: "hnep" -0xa17c: "hnut" -0xa17d: "nit" -0xa17e: "nix" -0xa17f: "ni" -0xa180: "nip" -0xa181: "niex" -0xa182: "nie" -0xa183: "niep" -0xa184: "nax" -0xa185: "na" -0xa186: "nap" -0xa187: "nuox" -0xa188: "nuo" -0xa189: "nuop" -0xa18a: "not" -0xa18b: "nox" -0xa18c: "no" -0xa18d: "nop" -0xa18e: "nex" -0xa18f: "ne" -0xa190: "nep" -0xa191: "nut" -0xa192: "nux" -0xa193: "nu" -0xa194: "nup" -0xa195: "nurx" -0xa196: "nur" -0xa197: "hlit" -0xa198: "hlix" -0xa199: "hli" -0xa19a: "hlip" -0xa19b: "hliex" -0xa19c: "hlie" -0xa19d: "hliep" -0xa19e: "hlat" -0xa19f: "hlax" -0xa1a0: "hla" -0xa1a1: "hlap" -0xa1a2: "hluox" -0xa1a3: "hluo" -0xa1a4: "hluop" -0xa1a5: "hlox" -0xa1a6: "hlo" -0xa1a7: "hlop" -0xa1a8: "hlex" -0xa1a9: "hle" -0xa1aa: "hlep" -0xa1ab: "hlut" -0xa1ac: "hlux" -0xa1ad: "hlu" -0xa1ae: "hlup" -0xa1af: "hlurx" -0xa1b0: "hlur" -0xa1b1: "hlyt" -0xa1b2: "hlyx" -0xa1b3: "hly" -0xa1b4: "hlyp" -0xa1b5: "hlyrx" -0xa1b6: "hlyr" -0xa1b7: "lit" -0xa1b8: "lix" -0xa1b9: "li" -0xa1ba: "lip" -0xa1bb: "liet" -0xa1bc: "liex" -0xa1bd: "lie" -0xa1be: "liep" -0xa1bf: "lat" -0xa1c0: "lax" -0xa1c1: "la" -0xa1c2: "lap" -0xa1c3: "luot" -0xa1c4: "luox" -0xa1c5: "luo" -0xa1c6: "luop" -0xa1c7: "lot" -0xa1c8: "lox" -0xa1c9: "lo" -0xa1ca: "lop" -0xa1cb: "lex" -0xa1cc: "le" -0xa1cd: "lep" -0xa1ce: "lut" -0xa1cf: "lux" -0xa1d0: "lu" -0xa1d1: "lup" -0xa1d2: "lurx" -0xa1d3: "lur" -0xa1d4: "lyt" -0xa1d5: "lyx" -0xa1d6: "ly" -0xa1d7: "lyp" -0xa1d8: "lyrx" -0xa1d9: "lyr" -0xa1da: "git" -0xa1db: "gix" -0xa1dc: "gi" -0xa1dd: "gip" -0xa1de: "giet" -0xa1df: "giex" -0xa1e0: "gie" -0xa1e1: "giep" -0xa1e2: "gat" -0xa1e3: "gax" -0xa1e4: "ga" -0xa1e5: "gap" -0xa1e6: "guot" -0xa1e7: "guox" -0xa1e8: "guo" -0xa1e9: "guop" -0xa1ea: "got" -0xa1eb: "gox" -0xa1ec: "go" -0xa1ed: "gop" -0xa1ee: "get" -0xa1ef: "gex" -0xa1f0: "ge" -0xa1f1: "gep" -0xa1f2: "gut" -0xa1f3: "gux" -0xa1f4: "gu" -0xa1f5: "gup" -0xa1f6: "gurx" -0xa1f7: "gur" -0xa1f8: "kit" -0xa1f9: "kix" -0xa1fa: "ki" -0xa1fb: "kip" -0xa1fc: "kiex" -0xa1fd: "kie" -0xa1fe: "kiep" -0xa1ff: "kat" -/* x0a2 */ -0xa200: "kax" -0xa201: "ka" -0xa202: "kap" -0xa203: "kuox" -0xa204: "kuo" -0xa205: "kuop" -0xa206: "kot" -0xa207: "kox" -0xa208: "ko" -0xa209: "kop" -0xa20a: "ket" -0xa20b: "kex" -0xa20c: "ke" -0xa20d: "kep" -0xa20e: "kut" -0xa20f: "kux" -0xa210: "ku" -0xa211: "kup" -0xa212: "kurx" -0xa213: "kur" -0xa214: "ggit" -0xa215: "ggix" -0xa216: "ggi" -0xa217: "ggiex" -0xa218: "ggie" -0xa219: "ggiep" -0xa21a: "ggat" -0xa21b: "ggax" -0xa21c: "gga" -0xa21d: "ggap" -0xa21e: "gguot" -0xa21f: "gguox" -0xa220: "gguo" -0xa221: "gguop" -0xa222: "ggot" -0xa223: "ggox" -0xa224: "ggo" -0xa225: "ggop" -0xa226: "gget" -0xa227: "ggex" -0xa228: "gge" -0xa229: "ggep" -0xa22a: "ggut" -0xa22b: "ggux" -0xa22c: "ggu" -0xa22d: "ggup" -0xa22e: "ggurx" -0xa22f: "ggur" -0xa230: "mgiex" -0xa231: "mgie" -0xa232: "mgat" -0xa233: "mgax" -0xa234: "mga" -0xa235: "mgap" -0xa236: "mguox" -0xa237: "mguo" -0xa238: "mguop" -0xa239: "mgot" -0xa23a: "mgox" -0xa23b: "mgo" -0xa23c: "mgop" -0xa23d: "mgex" -0xa23e: "mge" -0xa23f: "mgep" -0xa240: "mgut" -0xa241: "mgux" -0xa242: "mgu" -0xa243: "mgup" -0xa244: "mgurx" -0xa245: "mgur" -0xa246: "hxit" -0xa247: "hxix" -0xa248: "hxi" -0xa249: "hxip" -0xa24a: "hxiet" -0xa24b: "hxiex" -0xa24c: "hxie" -0xa24d: "hxiep" -0xa24e: "hxat" -0xa24f: "hxax" -0xa250: "hxa" -0xa251: "hxap" -0xa252: "hxuot" -0xa253: "hxuox" -0xa254: "hxuo" -0xa255: "hxuop" -0xa256: "hxot" -0xa257: "hxox" -0xa258: "hxo" -0xa259: "hxop" -0xa25a: "hxex" -0xa25b: "hxe" -0xa25c: "hxep" -0xa25d: "ngiex" -0xa25e: "ngie" -0xa25f: "ngiep" -0xa260: "ngat" -0xa261: "ngax" -0xa262: "nga" -0xa263: "ngap" -0xa264: "nguot" -0xa265: "nguox" -0xa266: "nguo" -0xa267: "ngot" -0xa268: "ngox" -0xa269: "ngo" -0xa26a: "ngop" -0xa26b: "ngex" -0xa26c: "nge" -0xa26d: "ngep" -0xa26e: "hit" -0xa26f: "hiex" -0xa270: "hie" -0xa271: "hat" -0xa272: "hax" -0xa273: "ha" -0xa274: "hap" -0xa275: "huot" -0xa276: "huox" -0xa277: "huo" -0xa278: "huop" -0xa279: "hot" -0xa27a: "hox" -0xa27b: "ho" -0xa27c: "hop" -0xa27d: "hex" -0xa27e: "he" -0xa27f: "hep" -0xa280: "wat" -0xa281: "wax" -0xa282: "wa" -0xa283: "wap" -0xa284: "wuox" -0xa285: "wuo" -0xa286: "wuop" -0xa287: "wox" -0xa288: "wo" -0xa289: "wop" -0xa28a: "wex" -0xa28b: "we" -0xa28c: "wep" -0xa28d: "zit" -0xa28e: "zix" -0xa28f: "zi" -0xa290: "zip" -0xa291: "ziex" -0xa292: "zie" -0xa293: "ziep" -0xa294: "zat" -0xa295: "zax" -0xa296: "za" -0xa297: "zap" -0xa298: "zuox" -0xa299: "zuo" -0xa29a: "zuop" -0xa29b: "zot" -0xa29c: "zox" -0xa29d: "zo" -0xa29e: "zop" -0xa29f: "zex" -0xa2a0: "ze" -0xa2a1: "zep" -0xa2a2: "zut" -0xa2a3: "zux" -0xa2a4: "zu" -0xa2a5: "zup" -0xa2a6: "zurx" -0xa2a7: "zur" -0xa2a8: "zyt" -0xa2a9: "zyx" -0xa2aa: "zy" -0xa2ab: "zyp" -0xa2ac: "zyrx" -0xa2ad: "zyr" -0xa2ae: "cit" -0xa2af: "cix" -0xa2b0: "ci" -0xa2b1: "cip" -0xa2b2: "ciet" -0xa2b3: "ciex" -0xa2b4: "cie" -0xa2b5: "ciep" -0xa2b6: "cat" -0xa2b7: "cax" -0xa2b8: "ca" -0xa2b9: "cap" -0xa2ba: "cuox" -0xa2bb: "cuo" -0xa2bc: "cuop" -0xa2bd: "cot" -0xa2be: "cox" -0xa2bf: "co" -0xa2c0: "cop" -0xa2c1: "cex" -0xa2c2: "ce" -0xa2c3: "cep" -0xa2c4: "cut" -0xa2c5: "cux" -0xa2c6: "cu" -0xa2c7: "cup" -0xa2c8: "curx" -0xa2c9: "cur" -0xa2ca: "cyt" -0xa2cb: "cyx" -0xa2cc: "cy" -0xa2cd: "cyp" -0xa2ce: "cyrx" -0xa2cf: "cyr" -0xa2d0: "zzit" -0xa2d1: "zzix" -0xa2d2: "zzi" -0xa2d3: "zzip" -0xa2d4: "zziet" -0xa2d5: "zziex" -0xa2d6: "zzie" -0xa2d7: "zziep" -0xa2d8: "zzat" -0xa2d9: "zzax" -0xa2da: "zza" -0xa2db: "zzap" -0xa2dc: "zzox" -0xa2dd: "zzo" -0xa2de: "zzop" -0xa2df: "zzex" -0xa2e0: "zze" -0xa2e1: "zzep" -0xa2e2: "zzux" -0xa2e3: "zzu" -0xa2e4: "zzup" -0xa2e5: "zzurx" -0xa2e6: "zzur" -0xa2e7: "zzyt" -0xa2e8: "zzyx" -0xa2e9: "zzy" -0xa2ea: "zzyp" -0xa2eb: "zzyrx" -0xa2ec: "zzyr" -0xa2ed: "nzit" -0xa2ee: "nzix" -0xa2ef: "nzi" -0xa2f0: "nzip" -0xa2f1: "nziex" -0xa2f2: "nzie" -0xa2f3: "nziep" -0xa2f4: "nzat" -0xa2f5: "nzax" -0xa2f6: "nza" -0xa2f7: "nzap" -0xa2f8: "nzuox" -0xa2f9: "nzuo" -0xa2fa: "nzox" -0xa2fb: "nzop" -0xa2fc: "nzex" -0xa2fd: "nze" -0xa2fe: "nzux" -0xa2ff: "nzu" -/* x0a3 */ -0xa300: "nzup" -0xa301: "nzurx" -0xa302: "nzur" -0xa303: "nzyt" -0xa304: "nzyx" -0xa305: "nzy" -0xa306: "nzyp" -0xa307: "nzyrx" -0xa308: "nzyr" -0xa309: "sit" -0xa30a: "six" -0xa30b: "si" -0xa30c: "sip" -0xa30d: "siex" -0xa30e: "sie" -0xa30f: "siep" -0xa310: "sat" -0xa311: "sax" -0xa312: "sa" -0xa313: "sap" -0xa314: "suox" -0xa315: "suo" -0xa316: "suop" -0xa317: "sot" -0xa318: "sox" -0xa319: "so" -0xa31a: "sop" -0xa31b: "sex" -0xa31c: "se" -0xa31d: "sep" -0xa31e: "sut" -0xa31f: "sux" -0xa320: "su" -0xa321: "sup" -0xa322: "surx" -0xa323: "sur" -0xa324: "syt" -0xa325: "syx" -0xa326: "sy" -0xa327: "syp" -0xa328: "syrx" -0xa329: "syr" -0xa32a: "ssit" -0xa32b: "ssix" -0xa32c: "ssi" -0xa32d: "ssip" -0xa32e: "ssiex" -0xa32f: "ssie" -0xa330: "ssiep" -0xa331: "ssat" -0xa332: "ssax" -0xa333: "ssa" -0xa334: "ssap" -0xa335: "ssot" -0xa336: "ssox" -0xa337: "sso" -0xa338: "ssop" -0xa339: "ssex" -0xa33a: "sse" -0xa33b: "ssep" -0xa33c: "ssut" -0xa33d: "ssux" -0xa33e: "ssu" -0xa33f: "ssup" -0xa340: "ssyt" -0xa341: "ssyx" -0xa342: "ssy" -0xa343: "ssyp" -0xa344: "ssyrx" -0xa345: "ssyr" -0xa346: "zhat" -0xa347: "zhax" -0xa348: "zha" -0xa349: "zhap" -0xa34a: "zhuox" -0xa34b: "zhuo" -0xa34c: "zhuop" -0xa34d: "zhot" -0xa34e: "zhox" -0xa34f: "zho" -0xa350: "zhop" -0xa351: "zhet" -0xa352: "zhex" -0xa353: "zhe" -0xa354: "zhep" -0xa355: "zhut" -0xa356: "zhux" -0xa357: "zhu" -0xa358: "zhup" -0xa359: "zhurx" -0xa35a: "zhur" -0xa35b: "zhyt" -0xa35c: "zhyx" -0xa35d: "zhy" -0xa35e: "zhyp" -0xa35f: "zhyrx" -0xa360: "zhyr" -0xa361: "chat" -0xa362: "chax" -0xa363: "cha" -0xa364: "chap" -0xa365: "chuot" -0xa366: "chuox" -0xa367: "chuo" -0xa368: "chuop" -0xa369: "chot" -0xa36a: "chox" -0xa36b: "cho" -0xa36c: "chop" -0xa36d: "chet" -0xa36e: "chex" -0xa36f: "che" -0xa370: "chep" -0xa371: "chux" -0xa372: "chu" -0xa373: "chup" -0xa374: "churx" -0xa375: "chur" -0xa376: "chyt" -0xa377: "chyx" -0xa378: "chy" -0xa379: "chyp" -0xa37a: "chyrx" -0xa37b: "chyr" -0xa37c: "rrax" -0xa37d: "rra" -0xa37e: "rruox" -0xa37f: "rruo" -0xa380: "rrot" -0xa381: "rrox" -0xa382: "rro" -0xa383: "rrop" -0xa384: "rret" -0xa385: "rrex" -0xa386: "rre" -0xa387: "rrep" -0xa388: "rrut" -0xa389: "rrux" -0xa38a: "rru" -0xa38b: "rrup" -0xa38c: "rrurx" -0xa38d: "rrur" -0xa38e: "rryt" -0xa38f: "rryx" -0xa390: "rry" -0xa391: "rryp" -0xa392: "rryrx" -0xa393: "rryr" -0xa394: "nrat" -0xa395: "nrax" -0xa396: "nra" -0xa397: "nrap" -0xa398: "nrox" -0xa399: "nro" -0xa39a: "nrop" -0xa39b: "nret" -0xa39c: "nrex" -0xa39d: "nre" -0xa39e: "nrep" -0xa39f: "nrut" -0xa3a0: "nrux" -0xa3a1: "nru" -0xa3a2: "nrup" -0xa3a3: "nrurx" -0xa3a4: "nrur" -0xa3a5: "nryt" -0xa3a6: "nryx" -0xa3a7: "nry" -0xa3a8: "nryp" -0xa3a9: "nryrx" -0xa3aa: "nryr" -0xa3ab: "shat" -0xa3ac: "shax" -0xa3ad: "sha" -0xa3ae: "shap" -0xa3af: "shuox" -0xa3b0: "shuo" -0xa3b1: "shuop" -0xa3b2: "shot" -0xa3b3: "shox" -0xa3b4: "sho" -0xa3b5: "shop" -0xa3b6: "shet" -0xa3b7: "shex" -0xa3b8: "she" -0xa3b9: "shep" -0xa3ba: "shut" -0xa3bb: "shux" -0xa3bc: "shu" -0xa3bd: "shup" -0xa3be: "shurx" -0xa3bf: "shur" -0xa3c0: "shyt" -0xa3c1: "shyx" -0xa3c2: "shy" -0xa3c3: "shyp" -0xa3c4: "shyrx" -0xa3c5: "shyr" -0xa3c6: "rat" -0xa3c7: "rax" -0xa3c8: "ra" -0xa3c9: "rap" -0xa3ca: "ruox" -0xa3cb: "ruo" -0xa3cc: "ruop" -0xa3cd: "rot" -0xa3ce: "rox" -0xa3cf: "ro" -0xa3d0: "rop" -0xa3d1: "rex" -0xa3d2: "re" -0xa3d3: "rep" -0xa3d4: "rut" -0xa3d5: "rux" -0xa3d6: "ru" -0xa3d7: "rup" -0xa3d8: "rurx" -0xa3d9: "rur" -0xa3da: "ryt" -0xa3db: "ryx" -0xa3dc: "ry" -0xa3dd: "ryp" -0xa3de: "ryrx" -0xa3df: "ryr" -0xa3e0: "jit" -0xa3e1: "jix" -0xa3e2: "ji" -0xa3e3: "jip" -0xa3e4: "jiet" -0xa3e5: "jiex" -0xa3e6: "jie" -0xa3e7: "jiep" -0xa3e8: "juot" -0xa3e9: "juox" -0xa3ea: "juo" -0xa3eb: "juop" -0xa3ec: "jot" -0xa3ed: "jox" -0xa3ee: "jo" -0xa3ef: "jop" -0xa3f0: "jut" -0xa3f1: "jux" -0xa3f2: "ju" -0xa3f3: "jup" -0xa3f4: "jurx" -0xa3f5: "jur" -0xa3f6: "jyt" -0xa3f7: "jyx" -0xa3f8: "jy" -0xa3f9: "jyp" -0xa3fa: "jyrx" -0xa3fb: "jyr" -0xa3fc: "qit" -0xa3fd: "qix" -0xa3fe: "qi" -0xa3ff: "qip" -/* x0a4 */ -0xa400: "qiet" -0xa401: "qiex" -0xa402: "qie" -0xa403: "qiep" -0xa404: "quot" -0xa405: "quox" -0xa406: "quo" -0xa407: "quop" -0xa408: "qot" -0xa409: "qox" -0xa40a: "qo" -0xa40b: "qop" -0xa40c: "qut" -0xa40d: "qux" -0xa40e: "qu" -0xa40f: "qup" -0xa410: "qurx" -0xa411: "qur" -0xa412: "qyt" -0xa413: "qyx" -0xa414: "qy" -0xa415: "qyp" -0xa416: "qyrx" -0xa417: "qyr" -0xa418: "jjit" -0xa419: "jjix" -0xa41a: "jji" -0xa41b: "jjip" -0xa41c: "jjiet" -0xa41d: "jjiex" -0xa41e: "jjie" -0xa41f: "jjiep" -0xa420: "jjuox" -0xa421: "jjuo" -0xa422: "jjuop" -0xa423: "jjot" -0xa424: "jjox" -0xa425: "jjo" -0xa426: "jjop" -0xa427: "jjut" -0xa428: "jjux" -0xa429: "jju" -0xa42a: "jjup" -0xa42b: "jjurx" -0xa42c: "jjur" -0xa42d: "jjyt" -0xa42e: "jjyx" -0xa42f: "jjy" -0xa430: "jjyp" -0xa431: "njit" -0xa432: "njix" -0xa433: "nji" -0xa434: "njip" -0xa435: "njiet" -0xa436: "njiex" -0xa437: "njie" -0xa438: "njiep" -0xa439: "njuox" -0xa43a: "njuo" -0xa43b: "njot" -0xa43c: "njox" -0xa43d: "njo" -0xa43e: "njop" -0xa43f: "njux" -0xa440: "nju" -0xa441: "njup" -0xa442: "njurx" -0xa443: "njur" -0xa444: "njyt" -0xa445: "njyx" -0xa446: "njy" -0xa447: "njyp" -0xa448: "njyrx" -0xa449: "njyr" -0xa44a: "nyit" -0xa44b: "nyix" -0xa44c: "nyi" -0xa44d: "nyip" -0xa44e: "nyiet" -0xa44f: "nyiex" -0xa450: "nyie" -0xa451: "nyiep" -0xa452: "nyuox" -0xa453: "nyuo" -0xa454: "nyuop" -0xa455: "nyot" -0xa456: "nyox" -0xa457: "nyo" -0xa458: "nyop" -0xa459: "nyut" -0xa45a: "nyux" -0xa45b: "nyu" -0xa45c: "nyup" -0xa45d: "xit" -0xa45e: "xix" -0xa45f: "xi" -0xa460: "xip" -0xa461: "xiet" -0xa462: "xiex" -0xa463: "xie" -0xa464: "xiep" -0xa465: "xuox" -0xa466: "xuo" -0xa467: "xot" -0xa468: "xox" -0xa469: "xo" -0xa46a: "xop" -0xa46b: "xyt" -0xa46c: "xyx" -0xa46d: "xy" -0xa46e: "xyp" -0xa46f: "xyrx" -0xa470: "xyr" -0xa471: "yit" -0xa472: "yix" -0xa473: "yi" -0xa474: "yip" -0xa475: "yiet" -0xa476: "yiex" -0xa477: "yie" -0xa478: "yiep" -0xa479: "yuot" -0xa47a: "yuox" -0xa47b: "yuo" -0xa47c: "yuop" -0xa47d: "yot" -0xa47e: "yox" -0xa47f: "yo" -0xa480: "yop" -0xa481: "yut" -0xa482: "yux" -0xa483: "yu" -0xa484: "yup" -0xa485: "yurx" -0xa486: "yur" -0xa487: "yyt" -0xa488: "yyx" -0xa489: "yy" -0xa48a: "yyp" -0xa48b: "yyrx" -0xa48c: "yyr" -0xa48d: "[?]" -0xa48e: "[?]" -0xa48f: "[?]" -0xa490: "Qot" -0xa491: "Li" -0xa492: "Kit" -0xa493: "Nyip" -0xa494: "Cyp" -0xa495: "Ssi" -0xa496: "Ggop" -0xa497: "Gep" -0xa498: "Mi" -0xa499: "Hxit" -0xa49a: "Lyr" -0xa49b: "Bbut" -0xa49c: "Mop" -0xa49d: "Yo" -0xa49e: "Put" -0xa49f: "Hxuo" -0xa4a0: "Tat" -0xa4a1: "Ga" -0xa4a2: "[?]" -0xa4a3: "[?]" -0xa4a4: "Ddur" -0xa4a5: "Bur" -0xa4a6: "Gguo" -0xa4a7: "Nyop" -0xa4a8: "Tu" -0xa4a9: "Op" -0xa4aa: "Jjut" -0xa4ab: "Zot" -0xa4ac: "Pyt" -0xa4ad: "Hmo" -0xa4ae: "Yit" -0xa4af: "Vur" -0xa4b0: "Shy" -0xa4b1: "Vep" -0xa4b2: "Za" -0xa4b3: "Jo" -0xa4b4: "[?]" -0xa4b5: "Jjy" -0xa4b6: "Got" -0xa4b7: "Jjie" -0xa4b8: "Wo" -0xa4b9: "Du" -0xa4ba: "Shur" -0xa4bb: "Lie" -0xa4bc: "Cy" -0xa4bd: "Cuop" -0xa4be: "Cip" -0xa4bf: "Hxop" -0xa4c0: "Shat" -0xa4c1: "[?]" -0xa4c2: "Shop" -0xa4c3: "Che" -0xa4c4: "Zziet" -0xa4c5: "[?]" -0xa4c6: "Ke" -0xa4c7: "[?]" -0xa4c8: "[?]" -0xa4c9: "[?]" -0xa4ca: "[?]" -0xa4cb: "[?]" -0xa4cc: "[?]" -0xa4cd: "[?]" -0xa4ce: "[?]" -0xa4cf: "[?]" -0xa4d0: "[?]" -0xa4d1: "[?]" -0xa4d2: "[?]" -0xa4d3: "[?]" -0xa4d4: "[?]" -0xa4d5: "[?]" -0xa4d6: "[?]" -0xa4d7: "[?]" -0xa4d8: "[?]" -0xa4d9: "[?]" -0xa4da: "[?]" -0xa4db: "[?]" -0xa4dc: "[?]" -0xa4dd: "[?]" -0xa4de: "[?]" -0xa4df: "[?]" -0xa4e0: "[?]" -0xa4e1: "[?]" -0xa4e2: "[?]" -0xa4e3: "[?]" -0xa4e4: "[?]" -0xa4e5: "[?]" -0xa4e6: "[?]" -0xa4e7: "[?]" -0xa4e8: "[?]" -0xa4e9: "[?]" -0xa4ea: "[?]" -0xa4eb: "[?]" -0xa4ec: "[?]" -0xa4ed: "[?]" -0xa4ee: "[?]" -0xa4ef: "[?]" -0xa4f0: "[?]" -0xa4f1: "[?]" -0xa4f2: "[?]" -0xa4f3: "[?]" -0xa4f4: "[?]" -0xa4f5: "[?]" -0xa4f6: "[?]" -0xa4f7: "[?]" -0xa4f8: "[?]" -0xa4f9: "[?]" -0xa4fa: "[?]" -0xa4fb: "[?]" -0xa4fc: "[?]" -0xa4fd: "[?]" -0xa4fe: "[?]" -/* x0ac */ -0xac00: "ga" -0xac01: "gag" -0xac02: "gagg" -0xac03: "gags" -0xac04: "gan" -0xac05: "ganj" -0xac06: "ganh" -0xac07: "gad" -0xac08: "gal" -0xac09: "galg" -0xac0a: "galm" -0xac0b: "galb" -0xac0c: "gals" -0xac0d: "galt" -0xac0e: "galp" -0xac0f: "galh" -0xac10: "gam" -0xac11: "gab" -0xac12: "gabs" -0xac13: "gas" -0xac14: "gass" -0xac15: "gang" -0xac16: "gaj" -0xac17: "gac" -0xac18: "gak" -0xac19: "gat" -0xac1a: "gap" -0xac1b: "gah" -0xac1c: "gae" -0xac1d: "gaeg" -0xac1e: "gaegg" -0xac1f: "gaegs" -0xac20: "gaen" -0xac21: "gaenj" -0xac22: "gaenh" -0xac23: "gaed" -0xac24: "gael" -0xac25: "gaelg" -0xac26: "gaelm" -0xac27: "gaelb" -0xac28: "gaels" -0xac29: "gaelt" -0xac2a: "gaelp" -0xac2b: "gaelh" -0xac2c: "gaem" -0xac2d: "gaeb" -0xac2e: "gaebs" -0xac2f: "gaes" -0xac30: "gaess" -0xac31: "gaeng" -0xac32: "gaej" -0xac33: "gaec" -0xac34: "gaek" -0xac35: "gaet" -0xac36: "gaep" -0xac37: "gaeh" -0xac38: "gya" -0xac39: "gyag" -0xac3a: "gyagg" -0xac3b: "gyags" -0xac3c: "gyan" -0xac3d: "gyanj" -0xac3e: "gyanh" -0xac3f: "gyad" -0xac40: "gyal" -0xac41: "gyalg" -0xac42: "gyalm" -0xac43: "gyalb" -0xac44: "gyals" -0xac45: "gyalt" -0xac46: "gyalp" -0xac47: "gyalh" -0xac48: "gyam" -0xac49: "gyab" -0xac4a: "gyabs" -0xac4b: "gyas" -0xac4c: "gyass" -0xac4d: "gyang" -0xac4e: "gyaj" -0xac4f: "gyac" -0xac50: "gyak" -0xac51: "gyat" -0xac52: "gyap" -0xac53: "gyah" -0xac54: "gyae" -0xac55: "gyaeg" -0xac56: "gyaegg" -0xac57: "gyaegs" -0xac58: "gyaen" -0xac59: "gyaenj" -0xac5a: "gyaenh" -0xac5b: "gyaed" -0xac5c: "gyael" -0xac5d: "gyaelg" -0xac5e: "gyaelm" -0xac5f: "gyaelb" -0xac60: "gyaels" -0xac61: "gyaelt" -0xac62: "gyaelp" -0xac63: "gyaelh" -0xac64: "gyaem" -0xac65: "gyaeb" -0xac66: "gyaebs" -0xac67: "gyaes" -0xac68: "gyaess" -0xac69: "gyaeng" -0xac6a: "gyaej" -0xac6b: "gyaec" -0xac6c: "gyaek" -0xac6d: "gyaet" -0xac6e: "gyaep" -0xac6f: "gyaeh" -0xac70: "geo" -0xac71: "geog" -0xac72: "geogg" -0xac73: "geogs" -0xac74: "geon" -0xac75: "geonj" -0xac76: "geonh" -0xac77: "geod" -0xac78: "geol" -0xac79: "geolg" -0xac7a: "geolm" -0xac7b: "geolb" -0xac7c: "geols" -0xac7d: "geolt" -0xac7e: "geolp" -0xac7f: "geolh" -0xac80: "geom" -0xac81: "geob" -0xac82: "geobs" -0xac83: "geos" -0xac84: "geoss" -0xac85: "geong" -0xac86: "geoj" -0xac87: "geoc" -0xac88: "geok" -0xac89: "geot" -0xac8a: "geop" -0xac8b: "geoh" -0xac8c: "ge" -0xac8d: "geg" -0xac8e: "gegg" -0xac8f: "gegs" -0xac90: "gen" -0xac91: "genj" -0xac92: "genh" -0xac93: "ged" -0xac94: "gel" -0xac95: "gelg" -0xac96: "gelm" -0xac97: "gelb" -0xac98: "gels" -0xac99: "gelt" -0xac9a: "gelp" -0xac9b: "gelh" -0xac9c: "gem" -0xac9d: "geb" -0xac9e: "gebs" -0xac9f: "ges" -0xaca0: "gess" -0xaca1: "geng" -0xaca2: "gej" -0xaca3: "gec" -0xaca4: "gek" -0xaca5: "get" -0xaca6: "gep" -0xaca7: "geh" -0xaca8: "gyeo" -0xaca9: "gyeog" -0xacaa: "gyeogg" -0xacab: "gyeogs" -0xacac: "gyeon" -0xacad: "gyeonj" -0xacae: "gyeonh" -0xacaf: "gyeod" -0xacb0: "gyeol" -0xacb1: "gyeolg" -0xacb2: "gyeolm" -0xacb3: "gyeolb" -0xacb4: "gyeols" -0xacb5: "gyeolt" -0xacb6: "gyeolp" -0xacb7: "gyeolh" -0xacb8: "gyeom" -0xacb9: "gyeob" -0xacba: "gyeobs" -0xacbb: "gyeos" -0xacbc: "gyeoss" -0xacbd: "gyeong" -0xacbe: "gyeoj" -0xacbf: "gyeoc" -0xacc0: "gyeok" -0xacc1: "gyeot" -0xacc2: "gyeop" -0xacc3: "gyeoh" -0xacc4: "gye" -0xacc5: "gyeg" -0xacc6: "gyegg" -0xacc7: "gyegs" -0xacc8: "gyen" -0xacc9: "gyenj" -0xacca: "gyenh" -0xaccb: "gyed" -0xaccc: "gyel" -0xaccd: "gyelg" -0xacce: "gyelm" -0xaccf: "gyelb" -0xacd0: "gyels" -0xacd1: "gyelt" -0xacd2: "gyelp" -0xacd3: "gyelh" -0xacd4: "gyem" -0xacd5: "gyeb" -0xacd6: "gyebs" -0xacd7: "gyes" -0xacd8: "gyess" -0xacd9: "gyeng" -0xacda: "gyej" -0xacdb: "gyec" -0xacdc: "gyek" -0xacdd: "gyet" -0xacde: "gyep" -0xacdf: "gyeh" -0xace0: "go" -0xace1: "gog" -0xace2: "gogg" -0xace3: "gogs" -0xace4: "gon" -0xace5: "gonj" -0xace6: "gonh" -0xace7: "god" -0xace8: "gol" -0xace9: "golg" -0xacea: "golm" -0xaceb: "golb" -0xacec: "gols" -0xaced: "golt" -0xacee: "golp" -0xacef: "golh" -0xacf0: "gom" -0xacf1: "gob" -0xacf2: "gobs" -0xacf3: "gos" -0xacf4: "goss" -0xacf5: "gong" -0xacf6: "goj" -0xacf7: "goc" -0xacf8: "gok" -0xacf9: "got" -0xacfa: "gop" -0xacfb: "goh" -0xacfc: "gwa" -0xacfd: "gwag" -0xacfe: "gwagg" -0xacff: "gwags" -/* x0ad */ -0xad00: "gwan" -0xad01: "gwanj" -0xad02: "gwanh" -0xad03: "gwad" -0xad04: "gwal" -0xad05: "gwalg" -0xad06: "gwalm" -0xad07: "gwalb" -0xad08: "gwals" -0xad09: "gwalt" -0xad0a: "gwalp" -0xad0b: "gwalh" -0xad0c: "gwam" -0xad0d: "gwab" -0xad0e: "gwabs" -0xad0f: "gwas" -0xad10: "gwass" -0xad11: "gwang" -0xad12: "gwaj" -0xad13: "gwac" -0xad14: "gwak" -0xad15: "gwat" -0xad16: "gwap" -0xad17: "gwah" -0xad18: "gwae" -0xad19: "gwaeg" -0xad1a: "gwaegg" -0xad1b: "gwaegs" -0xad1c: "gwaen" -0xad1d: "gwaenj" -0xad1e: "gwaenh" -0xad1f: "gwaed" -0xad20: "gwael" -0xad21: "gwaelg" -0xad22: "gwaelm" -0xad23: "gwaelb" -0xad24: "gwaels" -0xad25: "gwaelt" -0xad26: "gwaelp" -0xad27: "gwaelh" -0xad28: "gwaem" -0xad29: "gwaeb" -0xad2a: "gwaebs" -0xad2b: "gwaes" -0xad2c: "gwaess" -0xad2d: "gwaeng" -0xad2e: "gwaej" -0xad2f: "gwaec" -0xad30: "gwaek" -0xad31: "gwaet" -0xad32: "gwaep" -0xad33: "gwaeh" -0xad34: "goe" -0xad35: "goeg" -0xad36: "goegg" -0xad37: "goegs" -0xad38: "goen" -0xad39: "goenj" -0xad3a: "goenh" -0xad3b: "goed" -0xad3c: "goel" -0xad3d: "goelg" -0xad3e: "goelm" -0xad3f: "goelb" -0xad40: "goels" -0xad41: "goelt" -0xad42: "goelp" -0xad43: "goelh" -0xad44: "goem" -0xad45: "goeb" -0xad46: "goebs" -0xad47: "goes" -0xad48: "goess" -0xad49: "goeng" -0xad4a: "goej" -0xad4b: "goec" -0xad4c: "goek" -0xad4d: "goet" -0xad4e: "goep" -0xad4f: "goeh" -0xad50: "gyo" -0xad51: "gyog" -0xad52: "gyogg" -0xad53: "gyogs" -0xad54: "gyon" -0xad55: "gyonj" -0xad56: "gyonh" -0xad57: "gyod" -0xad58: "gyol" -0xad59: "gyolg" -0xad5a: "gyolm" -0xad5b: "gyolb" -0xad5c: "gyols" -0xad5d: "gyolt" -0xad5e: "gyolp" -0xad5f: "gyolh" -0xad60: "gyom" -0xad61: "gyob" -0xad62: "gyobs" -0xad63: "gyos" -0xad64: "gyoss" -0xad65: "gyong" -0xad66: "gyoj" -0xad67: "gyoc" -0xad68: "gyok" -0xad69: "gyot" -0xad6a: "gyop" -0xad6b: "gyoh" -0xad6c: "gu" -0xad6d: "gug" -0xad6e: "gugg" -0xad6f: "gugs" -0xad70: "gun" -0xad71: "gunj" -0xad72: "gunh" -0xad73: "gud" -0xad74: "gul" -0xad75: "gulg" -0xad76: "gulm" -0xad77: "gulb" -0xad78: "guls" -0xad79: "gult" -0xad7a: "gulp" -0xad7b: "gulh" -0xad7c: "gum" -0xad7d: "gub" -0xad7e: "gubs" -0xad7f: "gus" -0xad80: "guss" -0xad81: "gung" -0xad82: "guj" -0xad83: "guc" -0xad84: "guk" -0xad85: "gut" -0xad86: "gup" -0xad87: "guh" -0xad88: "gweo" -0xad89: "gweog" -0xad8a: "gweogg" -0xad8b: "gweogs" -0xad8c: "gweon" -0xad8d: "gweonj" -0xad8e: "gweonh" -0xad8f: "gweod" -0xad90: "gweol" -0xad91: "gweolg" -0xad92: "gweolm" -0xad93: "gweolb" -0xad94: "gweols" -0xad95: "gweolt" -0xad96: "gweolp" -0xad97: "gweolh" -0xad98: "gweom" -0xad99: "gweob" -0xad9a: "gweobs" -0xad9b: "gweos" -0xad9c: "gweoss" -0xad9d: "gweong" -0xad9e: "gweoj" -0xad9f: "gweoc" -0xada0: "gweok" -0xada1: "gweot" -0xada2: "gweop" -0xada3: "gweoh" -0xada4: "gwe" -0xada5: "gweg" -0xada6: "gwegg" -0xada7: "gwegs" -0xada8: "gwen" -0xada9: "gwenj" -0xadaa: "gwenh" -0xadab: "gwed" -0xadac: "gwel" -0xadad: "gwelg" -0xadae: "gwelm" -0xadaf: "gwelb" -0xadb0: "gwels" -0xadb1: "gwelt" -0xadb2: "gwelp" -0xadb3: "gwelh" -0xadb4: "gwem" -0xadb5: "gweb" -0xadb6: "gwebs" -0xadb7: "gwes" -0xadb8: "gwess" -0xadb9: "gweng" -0xadba: "gwej" -0xadbb: "gwec" -0xadbc: "gwek" -0xadbd: "gwet" -0xadbe: "gwep" -0xadbf: "gweh" -0xadc0: "gwi" -0xadc1: "gwig" -0xadc2: "gwigg" -0xadc3: "gwigs" -0xadc4: "gwin" -0xadc5: "gwinj" -0xadc6: "gwinh" -0xadc7: "gwid" -0xadc8: "gwil" -0xadc9: "gwilg" -0xadca: "gwilm" -0xadcb: "gwilb" -0xadcc: "gwils" -0xadcd: "gwilt" -0xadce: "gwilp" -0xadcf: "gwilh" -0xadd0: "gwim" -0xadd1: "gwib" -0xadd2: "gwibs" -0xadd3: "gwis" -0xadd4: "gwiss" -0xadd5: "gwing" -0xadd6: "gwij" -0xadd7: "gwic" -0xadd8: "gwik" -0xadd9: "gwit" -0xadda: "gwip" -0xaddb: "gwih" -0xaddc: "gyu" -0xaddd: "gyug" -0xadde: "gyugg" -0xaddf: "gyugs" -0xade0: "gyun" -0xade1: "gyunj" -0xade2: "gyunh" -0xade3: "gyud" -0xade4: "gyul" -0xade5: "gyulg" -0xade6: "gyulm" -0xade7: "gyulb" -0xade8: "gyuls" -0xade9: "gyult" -0xadea: "gyulp" -0xadeb: "gyulh" -0xadec: "gyum" -0xaded: "gyub" -0xadee: "gyubs" -0xadef: "gyus" -0xadf0: "gyuss" -0xadf1: "gyung" -0xadf2: "gyuj" -0xadf3: "gyuc" -0xadf4: "gyuk" -0xadf5: "gyut" -0xadf6: "gyup" -0xadf7: "gyuh" -0xadf8: "geu" -0xadf9: "geug" -0xadfa: "geugg" -0xadfb: "geugs" -0xadfc: "geun" -0xadfd: "geunj" -0xadfe: "geunh" -0xadff: "geud" -/* x0ae */ -0xae00: "geul" -0xae01: "geulg" -0xae02: "geulm" -0xae03: "geulb" -0xae04: "geuls" -0xae05: "geult" -0xae06: "geulp" -0xae07: "geulh" -0xae08: "geum" -0xae09: "geub" -0xae0a: "geubs" -0xae0b: "geus" -0xae0c: "geuss" -0xae0d: "geung" -0xae0e: "geuj" -0xae0f: "geuc" -0xae10: "geuk" -0xae11: "geut" -0xae12: "geup" -0xae13: "geuh" -0xae14: "gyi" -0xae15: "gyig" -0xae16: "gyigg" -0xae17: "gyigs" -0xae18: "gyin" -0xae19: "gyinj" -0xae1a: "gyinh" -0xae1b: "gyid" -0xae1c: "gyil" -0xae1d: "gyilg" -0xae1e: "gyilm" -0xae1f: "gyilb" -0xae20: "gyils" -0xae21: "gyilt" -0xae22: "gyilp" -0xae23: "gyilh" -0xae24: "gyim" -0xae25: "gyib" -0xae26: "gyibs" -0xae27: "gyis" -0xae28: "gyiss" -0xae29: "gying" -0xae2a: "gyij" -0xae2b: "gyic" -0xae2c: "gyik" -0xae2d: "gyit" -0xae2e: "gyip" -0xae2f: "gyih" -0xae30: "gi" -0xae31: "gig" -0xae32: "gigg" -0xae33: "gigs" -0xae34: "gin" -0xae35: "ginj" -0xae36: "ginh" -0xae37: "gid" -0xae38: "gil" -0xae39: "gilg" -0xae3a: "gilm" -0xae3b: "gilb" -0xae3c: "gils" -0xae3d: "gilt" -0xae3e: "gilp" -0xae3f: "gilh" -0xae40: "gim" -0xae41: "gib" -0xae42: "gibs" -0xae43: "gis" -0xae44: "giss" -0xae45: "ging" -0xae46: "gij" -0xae47: "gic" -0xae48: "gik" -0xae49: "git" -0xae4a: "gip" -0xae4b: "gih" -0xae4c: "gga" -0xae4d: "ggag" -0xae4e: "ggagg" -0xae4f: "ggags" -0xae50: "ggan" -0xae51: "gganj" -0xae52: "gganh" -0xae53: "ggad" -0xae54: "ggal" -0xae55: "ggalg" -0xae56: "ggalm" -0xae57: "ggalb" -0xae58: "ggals" -0xae59: "ggalt" -0xae5a: "ggalp" -0xae5b: "ggalh" -0xae5c: "ggam" -0xae5d: "ggab" -0xae5e: "ggabs" -0xae5f: "ggas" -0xae60: "ggass" -0xae61: "ggang" -0xae62: "ggaj" -0xae63: "ggac" -0xae64: "ggak" -0xae65: "ggat" -0xae66: "ggap" -0xae67: "ggah" -0xae68: "ggae" -0xae69: "ggaeg" -0xae6a: "ggaegg" -0xae6b: "ggaegs" -0xae6c: "ggaen" -0xae6d: "ggaenj" -0xae6e: "ggaenh" -0xae6f: "ggaed" -0xae70: "ggael" -0xae71: "ggaelg" -0xae72: "ggaelm" -0xae73: "ggaelb" -0xae74: "ggaels" -0xae75: "ggaelt" -0xae76: "ggaelp" -0xae77: "ggaelh" -0xae78: "ggaem" -0xae79: "ggaeb" -0xae7a: "ggaebs" -0xae7b: "ggaes" -0xae7c: "ggaess" -0xae7d: "ggaeng" -0xae7e: "ggaej" -0xae7f: "ggaec" -0xae80: "ggaek" -0xae81: "ggaet" -0xae82: "ggaep" -0xae83: "ggaeh" -0xae84: "ggya" -0xae85: "ggyag" -0xae86: "ggyagg" -0xae87: "ggyags" -0xae88: "ggyan" -0xae89: "ggyanj" -0xae8a: "ggyanh" -0xae8b: "ggyad" -0xae8c: "ggyal" -0xae8d: "ggyalg" -0xae8e: "ggyalm" -0xae8f: "ggyalb" -0xae90: "ggyals" -0xae91: "ggyalt" -0xae92: "ggyalp" -0xae93: "ggyalh" -0xae94: "ggyam" -0xae95: "ggyab" -0xae96: "ggyabs" -0xae97: "ggyas" -0xae98: "ggyass" -0xae99: "ggyang" -0xae9a: "ggyaj" -0xae9b: "ggyac" -0xae9c: "ggyak" -0xae9d: "ggyat" -0xae9e: "ggyap" -0xae9f: "ggyah" -0xaea0: "ggyae" -0xaea1: "ggyaeg" -0xaea2: "ggyaegg" -0xaea3: "ggyaegs" -0xaea4: "ggyaen" -0xaea5: "ggyaenj" -0xaea6: "ggyaenh" -0xaea7: "ggyaed" -0xaea8: "ggyael" -0xaea9: "ggyaelg" -0xaeaa: "ggyaelm" -0xaeab: "ggyaelb" -0xaeac: "ggyaels" -0xaead: "ggyaelt" -0xaeae: "ggyaelp" -0xaeaf: "ggyaelh" -0xaeb0: "ggyaem" -0xaeb1: "ggyaeb" -0xaeb2: "ggyaebs" -0xaeb3: "ggyaes" -0xaeb4: "ggyaess" -0xaeb5: "ggyaeng" -0xaeb6: "ggyaej" -0xaeb7: "ggyaec" -0xaeb8: "ggyaek" -0xaeb9: "ggyaet" -0xaeba: "ggyaep" -0xaebb: "ggyaeh" -0xaebc: "ggeo" -0xaebd: "ggeog" -0xaebe: "ggeogg" -0xaebf: "ggeogs" -0xaec0: "ggeon" -0xaec1: "ggeonj" -0xaec2: "ggeonh" -0xaec3: "ggeod" -0xaec4: "ggeol" -0xaec5: "ggeolg" -0xaec6: "ggeolm" -0xaec7: "ggeolb" -0xaec8: "ggeols" -0xaec9: "ggeolt" -0xaeca: "ggeolp" -0xaecb: "ggeolh" -0xaecc: "ggeom" -0xaecd: "ggeob" -0xaece: "ggeobs" -0xaecf: "ggeos" -0xaed0: "ggeoss" -0xaed1: "ggeong" -0xaed2: "ggeoj" -0xaed3: "ggeoc" -0xaed4: "ggeok" -0xaed5: "ggeot" -0xaed6: "ggeop" -0xaed7: "ggeoh" -0xaed8: "gge" -0xaed9: "ggeg" -0xaeda: "ggegg" -0xaedb: "ggegs" -0xaedc: "ggen" -0xaedd: "ggenj" -0xaede: "ggenh" -0xaedf: "gged" -0xaee0: "ggel" -0xaee1: "ggelg" -0xaee2: "ggelm" -0xaee3: "ggelb" -0xaee4: "ggels" -0xaee5: "ggelt" -0xaee6: "ggelp" -0xaee7: "ggelh" -0xaee8: "ggem" -0xaee9: "ggeb" -0xaeea: "ggebs" -0xaeeb: "gges" -0xaeec: "ggess" -0xaeed: "ggeng" -0xaeee: "ggej" -0xaeef: "ggec" -0xaef0: "ggek" -0xaef1: "gget" -0xaef2: "ggep" -0xaef3: "ggeh" -0xaef4: "ggyeo" -0xaef5: "ggyeog" -0xaef6: "ggyeogg" -0xaef7: "ggyeogs" -0xaef8: "ggyeon" -0xaef9: "ggyeonj" -0xaefa: "ggyeonh" -0xaefb: "ggyeod" -0xaefc: "ggyeol" -0xaefd: "ggyeolg" -0xaefe: "ggyeolm" -0xaeff: "ggyeolb" -/* x0af */ -0xaf00: "ggyeols" -0xaf01: "ggyeolt" -0xaf02: "ggyeolp" -0xaf03: "ggyeolh" -0xaf04: "ggyeom" -0xaf05: "ggyeob" -0xaf06: "ggyeobs" -0xaf07: "ggyeos" -0xaf08: "ggyeoss" -0xaf09: "ggyeong" -0xaf0a: "ggyeoj" -0xaf0b: "ggyeoc" -0xaf0c: "ggyeok" -0xaf0d: "ggyeot" -0xaf0e: "ggyeop" -0xaf0f: "ggyeoh" -0xaf10: "ggye" -0xaf11: "ggyeg" -0xaf12: "ggyegg" -0xaf13: "ggyegs" -0xaf14: "ggyen" -0xaf15: "ggyenj" -0xaf16: "ggyenh" -0xaf17: "ggyed" -0xaf18: "ggyel" -0xaf19: "ggyelg" -0xaf1a: "ggyelm" -0xaf1b: "ggyelb" -0xaf1c: "ggyels" -0xaf1d: "ggyelt" -0xaf1e: "ggyelp" -0xaf1f: "ggyelh" -0xaf20: "ggyem" -0xaf21: "ggyeb" -0xaf22: "ggyebs" -0xaf23: "ggyes" -0xaf24: "ggyess" -0xaf25: "ggyeng" -0xaf26: "ggyej" -0xaf27: "ggyec" -0xaf28: "ggyek" -0xaf29: "ggyet" -0xaf2a: "ggyep" -0xaf2b: "ggyeh" -0xaf2c: "ggo" -0xaf2d: "ggog" -0xaf2e: "ggogg" -0xaf2f: "ggogs" -0xaf30: "ggon" -0xaf31: "ggonj" -0xaf32: "ggonh" -0xaf33: "ggod" -0xaf34: "ggol" -0xaf35: "ggolg" -0xaf36: "ggolm" -0xaf37: "ggolb" -0xaf38: "ggols" -0xaf39: "ggolt" -0xaf3a: "ggolp" -0xaf3b: "ggolh" -0xaf3c: "ggom" -0xaf3d: "ggob" -0xaf3e: "ggobs" -0xaf3f: "ggos" -0xaf40: "ggoss" -0xaf41: "ggong" -0xaf42: "ggoj" -0xaf43: "ggoc" -0xaf44: "ggok" -0xaf45: "ggot" -0xaf46: "ggop" -0xaf47: "ggoh" -0xaf48: "ggwa" -0xaf49: "ggwag" -0xaf4a: "ggwagg" -0xaf4b: "ggwags" -0xaf4c: "ggwan" -0xaf4d: "ggwanj" -0xaf4e: "ggwanh" -0xaf4f: "ggwad" -0xaf50: "ggwal" -0xaf51: "ggwalg" -0xaf52: "ggwalm" -0xaf53: "ggwalb" -0xaf54: "ggwals" -0xaf55: "ggwalt" -0xaf56: "ggwalp" -0xaf57: "ggwalh" -0xaf58: "ggwam" -0xaf59: "ggwab" -0xaf5a: "ggwabs" -0xaf5b: "ggwas" -0xaf5c: "ggwass" -0xaf5d: "ggwang" -0xaf5e: "ggwaj" -0xaf5f: "ggwac" -0xaf60: "ggwak" -0xaf61: "ggwat" -0xaf62: "ggwap" -0xaf63: "ggwah" -0xaf64: "ggwae" -0xaf65: "ggwaeg" -0xaf66: "ggwaegg" -0xaf67: "ggwaegs" -0xaf68: "ggwaen" -0xaf69: "ggwaenj" -0xaf6a: "ggwaenh" -0xaf6b: "ggwaed" -0xaf6c: "ggwael" -0xaf6d: "ggwaelg" -0xaf6e: "ggwaelm" -0xaf6f: "ggwaelb" -0xaf70: "ggwaels" -0xaf71: "ggwaelt" -0xaf72: "ggwaelp" -0xaf73: "ggwaelh" -0xaf74: "ggwaem" -0xaf75: "ggwaeb" -0xaf76: "ggwaebs" -0xaf77: "ggwaes" -0xaf78: "ggwaess" -0xaf79: "ggwaeng" -0xaf7a: "ggwaej" -0xaf7b: "ggwaec" -0xaf7c: "ggwaek" -0xaf7d: "ggwaet" -0xaf7e: "ggwaep" -0xaf7f: "ggwaeh" -0xaf80: "ggoe" -0xaf81: "ggoeg" -0xaf82: "ggoegg" -0xaf83: "ggoegs" -0xaf84: "ggoen" -0xaf85: "ggoenj" -0xaf86: "ggoenh" -0xaf87: "ggoed" -0xaf88: "ggoel" -0xaf89: "ggoelg" -0xaf8a: "ggoelm" -0xaf8b: "ggoelb" -0xaf8c: "ggoels" -0xaf8d: "ggoelt" -0xaf8e: "ggoelp" -0xaf8f: "ggoelh" -0xaf90: "ggoem" -0xaf91: "ggoeb" -0xaf92: "ggoebs" -0xaf93: "ggoes" -0xaf94: "ggoess" -0xaf95: "ggoeng" -0xaf96: "ggoej" -0xaf97: "ggoec" -0xaf98: "ggoek" -0xaf99: "ggoet" -0xaf9a: "ggoep" -0xaf9b: "ggoeh" -0xaf9c: "ggyo" -0xaf9d: "ggyog" -0xaf9e: "ggyogg" -0xaf9f: "ggyogs" -0xafa0: "ggyon" -0xafa1: "ggyonj" -0xafa2: "ggyonh" -0xafa3: "ggyod" -0xafa4: "ggyol" -0xafa5: "ggyolg" -0xafa6: "ggyolm" -0xafa7: "ggyolb" -0xafa8: "ggyols" -0xafa9: "ggyolt" -0xafaa: "ggyolp" -0xafab: "ggyolh" -0xafac: "ggyom" -0xafad: "ggyob" -0xafae: "ggyobs" -0xafaf: "ggyos" -0xafb0: "ggyoss" -0xafb1: "ggyong" -0xafb2: "ggyoj" -0xafb3: "ggyoc" -0xafb4: "ggyok" -0xafb5: "ggyot" -0xafb6: "ggyop" -0xafb7: "ggyoh" -0xafb8: "ggu" -0xafb9: "ggug" -0xafba: "ggugg" -0xafbb: "ggugs" -0xafbc: "ggun" -0xafbd: "ggunj" -0xafbe: "ggunh" -0xafbf: "ggud" -0xafc0: "ggul" -0xafc1: "ggulg" -0xafc2: "ggulm" -0xafc3: "ggulb" -0xafc4: "gguls" -0xafc5: "ggult" -0xafc6: "ggulp" -0xafc7: "ggulh" -0xafc8: "ggum" -0xafc9: "ggub" -0xafca: "ggubs" -0xafcb: "ggus" -0xafcc: "gguss" -0xafcd: "ggung" -0xafce: "gguj" -0xafcf: "gguc" -0xafd0: "gguk" -0xafd1: "ggut" -0xafd2: "ggup" -0xafd3: "gguh" -0xafd4: "ggweo" -0xafd5: "ggweog" -0xafd6: "ggweogg" -0xafd7: "ggweogs" -0xafd8: "ggweon" -0xafd9: "ggweonj" -0xafda: "ggweonh" -0xafdb: "ggweod" -0xafdc: "ggweol" -0xafdd: "ggweolg" -0xafde: "ggweolm" -0xafdf: "ggweolb" -0xafe0: "ggweols" -0xafe1: "ggweolt" -0xafe2: "ggweolp" -0xafe3: "ggweolh" -0xafe4: "ggweom" -0xafe5: "ggweob" -0xafe6: "ggweobs" -0xafe7: "ggweos" -0xafe8: "ggweoss" -0xafe9: "ggweong" -0xafea: "ggweoj" -0xafeb: "ggweoc" -0xafec: "ggweok" -0xafed: "ggweot" -0xafee: "ggweop" -0xafef: "ggweoh" -0xaff0: "ggwe" -0xaff1: "ggweg" -0xaff2: "ggwegg" -0xaff3: "ggwegs" -0xaff4: "ggwen" -0xaff5: "ggwenj" -0xaff6: "ggwenh" -0xaff7: "ggwed" -0xaff8: "ggwel" -0xaff9: "ggwelg" -0xaffa: "ggwelm" -0xaffb: "ggwelb" -0xaffc: "ggwels" -0xaffd: "ggwelt" -0xaffe: "ggwelp" -0xafff: "ggwelh" -/* x0b0 */ -0xb000: "ggwem" -0xb001: "ggweb" -0xb002: "ggwebs" -0xb003: "ggwes" -0xb004: "ggwess" -0xb005: "ggweng" -0xb006: "ggwej" -0xb007: "ggwec" -0xb008: "ggwek" -0xb009: "ggwet" -0xb00a: "ggwep" -0xb00b: "ggweh" -0xb00c: "ggwi" -0xb00d: "ggwig" -0xb00e: "ggwigg" -0xb00f: "ggwigs" -0xb010: "ggwin" -0xb011: "ggwinj" -0xb012: "ggwinh" -0xb013: "ggwid" -0xb014: "ggwil" -0xb015: "ggwilg" -0xb016: "ggwilm" -0xb017: "ggwilb" -0xb018: "ggwils" -0xb019: "ggwilt" -0xb01a: "ggwilp" -0xb01b: "ggwilh" -0xb01c: "ggwim" -0xb01d: "ggwib" -0xb01e: "ggwibs" -0xb01f: "ggwis" -0xb020: "ggwiss" -0xb021: "ggwing" -0xb022: "ggwij" -0xb023: "ggwic" -0xb024: "ggwik" -0xb025: "ggwit" -0xb026: "ggwip" -0xb027: "ggwih" -0xb028: "ggyu" -0xb029: "ggyug" -0xb02a: "ggyugg" -0xb02b: "ggyugs" -0xb02c: "ggyun" -0xb02d: "ggyunj" -0xb02e: "ggyunh" -0xb02f: "ggyud" -0xb030: "ggyul" -0xb031: "ggyulg" -0xb032: "ggyulm" -0xb033: "ggyulb" -0xb034: "ggyuls" -0xb035: "ggyult" -0xb036: "ggyulp" -0xb037: "ggyulh" -0xb038: "ggyum" -0xb039: "ggyub" -0xb03a: "ggyubs" -0xb03b: "ggyus" -0xb03c: "ggyuss" -0xb03d: "ggyung" -0xb03e: "ggyuj" -0xb03f: "ggyuc" -0xb040: "ggyuk" -0xb041: "ggyut" -0xb042: "ggyup" -0xb043: "ggyuh" -0xb044: "ggeu" -0xb045: "ggeug" -0xb046: "ggeugg" -0xb047: "ggeugs" -0xb048: "ggeun" -0xb049: "ggeunj" -0xb04a: "ggeunh" -0xb04b: "ggeud" -0xb04c: "ggeul" -0xb04d: "ggeulg" -0xb04e: "ggeulm" -0xb04f: "ggeulb" -0xb050: "ggeuls" -0xb051: "ggeult" -0xb052: "ggeulp" -0xb053: "ggeulh" -0xb054: "ggeum" -0xb055: "ggeub" -0xb056: "ggeubs" -0xb057: "ggeus" -0xb058: "ggeuss" -0xb059: "ggeung" -0xb05a: "ggeuj" -0xb05b: "ggeuc" -0xb05c: "ggeuk" -0xb05d: "ggeut" -0xb05e: "ggeup" -0xb05f: "ggeuh" -0xb060: "ggyi" -0xb061: "ggyig" -0xb062: "ggyigg" -0xb063: "ggyigs" -0xb064: "ggyin" -0xb065: "ggyinj" -0xb066: "ggyinh" -0xb067: "ggyid" -0xb068: "ggyil" -0xb069: "ggyilg" -0xb06a: "ggyilm" -0xb06b: "ggyilb" -0xb06c: "ggyils" -0xb06d: "ggyilt" -0xb06e: "ggyilp" -0xb06f: "ggyilh" -0xb070: "ggyim" -0xb071: "ggyib" -0xb072: "ggyibs" -0xb073: "ggyis" -0xb074: "ggyiss" -0xb075: "ggying" -0xb076: "ggyij" -0xb077: "ggyic" -0xb078: "ggyik" -0xb079: "ggyit" -0xb07a: "ggyip" -0xb07b: "ggyih" -0xb07c: "ggi" -0xb07d: "ggig" -0xb07e: "ggigg" -0xb07f: "ggigs" -0xb080: "ggin" -0xb081: "gginj" -0xb082: "gginh" -0xb083: "ggid" -0xb084: "ggil" -0xb085: "ggilg" -0xb086: "ggilm" -0xb087: "ggilb" -0xb088: "ggils" -0xb089: "ggilt" -0xb08a: "ggilp" -0xb08b: "ggilh" -0xb08c: "ggim" -0xb08d: "ggib" -0xb08e: "ggibs" -0xb08f: "ggis" -0xb090: "ggiss" -0xb091: "gging" -0xb092: "ggij" -0xb093: "ggic" -0xb094: "ggik" -0xb095: "ggit" -0xb096: "ggip" -0xb097: "ggih" -0xb098: "na" -0xb099: "nag" -0xb09a: "nagg" -0xb09b: "nags" -0xb09c: "nan" -0xb09d: "nanj" -0xb09e: "nanh" -0xb09f: "nad" -0xb0a0: "nal" -0xb0a1: "nalg" -0xb0a2: "nalm" -0xb0a3: "nalb" -0xb0a4: "nals" -0xb0a5: "nalt" -0xb0a6: "nalp" -0xb0a7: "nalh" -0xb0a8: "nam" -0xb0a9: "nab" -0xb0aa: "nabs" -0xb0ab: "nas" -0xb0ac: "nass" -0xb0ad: "nang" -0xb0ae: "naj" -0xb0af: "nac" -0xb0b0: "nak" -0xb0b1: "nat" -0xb0b2: "nap" -0xb0b3: "nah" -0xb0b4: "nae" -0xb0b5: "naeg" -0xb0b6: "naegg" -0xb0b7: "naegs" -0xb0b8: "naen" -0xb0b9: "naenj" -0xb0ba: "naenh" -0xb0bb: "naed" -0xb0bc: "nael" -0xb0bd: "naelg" -0xb0be: "naelm" -0xb0bf: "naelb" -0xb0c0: "naels" -0xb0c1: "naelt" -0xb0c2: "naelp" -0xb0c3: "naelh" -0xb0c4: "naem" -0xb0c5: "naeb" -0xb0c6: "naebs" -0xb0c7: "naes" -0xb0c8: "naess" -0xb0c9: "naeng" -0xb0ca: "naej" -0xb0cb: "naec" -0xb0cc: "naek" -0xb0cd: "naet" -0xb0ce: "naep" -0xb0cf: "naeh" -0xb0d0: "nya" -0xb0d1: "nyag" -0xb0d2: "nyagg" -0xb0d3: "nyags" -0xb0d4: "nyan" -0xb0d5: "nyanj" -0xb0d6: "nyanh" -0xb0d7: "nyad" -0xb0d8: "nyal" -0xb0d9: "nyalg" -0xb0da: "nyalm" -0xb0db: "nyalb" -0xb0dc: "nyals" -0xb0dd: "nyalt" -0xb0de: "nyalp" -0xb0df: "nyalh" -0xb0e0: "nyam" -0xb0e1: "nyab" -0xb0e2: "nyabs" -0xb0e3: "nyas" -0xb0e4: "nyass" -0xb0e5: "nyang" -0xb0e6: "nyaj" -0xb0e7: "nyac" -0xb0e8: "nyak" -0xb0e9: "nyat" -0xb0ea: "nyap" -0xb0eb: "nyah" -0xb0ec: "nyae" -0xb0ed: "nyaeg" -0xb0ee: "nyaegg" -0xb0ef: "nyaegs" -0xb0f0: "nyaen" -0xb0f1: "nyaenj" -0xb0f2: "nyaenh" -0xb0f3: "nyaed" -0xb0f4: "nyael" -0xb0f5: "nyaelg" -0xb0f6: "nyaelm" -0xb0f7: "nyaelb" -0xb0f8: "nyaels" -0xb0f9: "nyaelt" -0xb0fa: "nyaelp" -0xb0fb: "nyaelh" -0xb0fc: "nyaem" -0xb0fd: "nyaeb" -0xb0fe: "nyaebs" -0xb0ff: "nyaes" -/* x0b1 */ -0xb100: "nyaess" -0xb101: "nyaeng" -0xb102: "nyaej" -0xb103: "nyaec" -0xb104: "nyaek" -0xb105: "nyaet" -0xb106: "nyaep" -0xb107: "nyaeh" -0xb108: "neo" -0xb109: "neog" -0xb10a: "neogg" -0xb10b: "neogs" -0xb10c: "neon" -0xb10d: "neonj" -0xb10e: "neonh" -0xb10f: "neod" -0xb110: "neol" -0xb111: "neolg" -0xb112: "neolm" -0xb113: "neolb" -0xb114: "neols" -0xb115: "neolt" -0xb116: "neolp" -0xb117: "neolh" -0xb118: "neom" -0xb119: "neob" -0xb11a: "neobs" -0xb11b: "neos" -0xb11c: "neoss" -0xb11d: "neong" -0xb11e: "neoj" -0xb11f: "neoc" -0xb120: "neok" -0xb121: "neot" -0xb122: "neop" -0xb123: "neoh" -0xb124: "ne" -0xb125: "neg" -0xb126: "negg" -0xb127: "negs" -0xb128: "nen" -0xb129: "nenj" -0xb12a: "nenh" -0xb12b: "ned" -0xb12c: "nel" -0xb12d: "nelg" -0xb12e: "nelm" -0xb12f: "nelb" -0xb130: "nels" -0xb131: "nelt" -0xb132: "nelp" -0xb133: "nelh" -0xb134: "nem" -0xb135: "neb" -0xb136: "nebs" -0xb137: "nes" -0xb138: "ness" -0xb139: "neng" -0xb13a: "nej" -0xb13b: "nec" -0xb13c: "nek" -0xb13d: "net" -0xb13e: "nep" -0xb13f: "neh" -0xb140: "nyeo" -0xb141: "nyeog" -0xb142: "nyeogg" -0xb143: "nyeogs" -0xb144: "nyeon" -0xb145: "nyeonj" -0xb146: "nyeonh" -0xb147: "nyeod" -0xb148: "nyeol" -0xb149: "nyeolg" -0xb14a: "nyeolm" -0xb14b: "nyeolb" -0xb14c: "nyeols" -0xb14d: "nyeolt" -0xb14e: "nyeolp" -0xb14f: "nyeolh" -0xb150: "nyeom" -0xb151: "nyeob" -0xb152: "nyeobs" -0xb153: "nyeos" -0xb154: "nyeoss" -0xb155: "nyeong" -0xb156: "nyeoj" -0xb157: "nyeoc" -0xb158: "nyeok" -0xb159: "nyeot" -0xb15a: "nyeop" -0xb15b: "nyeoh" -0xb15c: "nye" -0xb15d: "nyeg" -0xb15e: "nyegg" -0xb15f: "nyegs" -0xb160: "nyen" -0xb161: "nyenj" -0xb162: "nyenh" -0xb163: "nyed" -0xb164: "nyel" -0xb165: "nyelg" -0xb166: "nyelm" -0xb167: "nyelb" -0xb168: "nyels" -0xb169: "nyelt" -0xb16a: "nyelp" -0xb16b: "nyelh" -0xb16c: "nyem" -0xb16d: "nyeb" -0xb16e: "nyebs" -0xb16f: "nyes" -0xb170: "nyess" -0xb171: "nyeng" -0xb172: "nyej" -0xb173: "nyec" -0xb174: "nyek" -0xb175: "nyet" -0xb176: "nyep" -0xb177: "nyeh" -0xb178: "no" -0xb179: "nog" -0xb17a: "nogg" -0xb17b: "nogs" -0xb17c: "non" -0xb17d: "nonj" -0xb17e: "nonh" -0xb17f: "nod" -0xb180: "nol" -0xb181: "nolg" -0xb182: "nolm" -0xb183: "nolb" -0xb184: "nols" -0xb185: "nolt" -0xb186: "nolp" -0xb187: "nolh" -0xb188: "nom" -0xb189: "nob" -0xb18a: "nobs" -0xb18b: "nos" -0xb18c: "noss" -0xb18d: "nong" -0xb18e: "noj" -0xb18f: "noc" -0xb190: "nok" -0xb191: "not" -0xb192: "nop" -0xb193: "noh" -0xb194: "nwa" -0xb195: "nwag" -0xb196: "nwagg" -0xb197: "nwags" -0xb198: "nwan" -0xb199: "nwanj" -0xb19a: "nwanh" -0xb19b: "nwad" -0xb19c: "nwal" -0xb19d: "nwalg" -0xb19e: "nwalm" -0xb19f: "nwalb" -0xb1a0: "nwals" -0xb1a1: "nwalt" -0xb1a2: "nwalp" -0xb1a3: "nwalh" -0xb1a4: "nwam" -0xb1a5: "nwab" -0xb1a6: "nwabs" -0xb1a7: "nwas" -0xb1a8: "nwass" -0xb1a9: "nwang" -0xb1aa: "nwaj" -0xb1ab: "nwac" -0xb1ac: "nwak" -0xb1ad: "nwat" -0xb1ae: "nwap" -0xb1af: "nwah" -0xb1b0: "nwae" -0xb1b1: "nwaeg" -0xb1b2: "nwaegg" -0xb1b3: "nwaegs" -0xb1b4: "nwaen" -0xb1b5: "nwaenj" -0xb1b6: "nwaenh" -0xb1b7: "nwaed" -0xb1b8: "nwael" -0xb1b9: "nwaelg" -0xb1ba: "nwaelm" -0xb1bb: "nwaelb" -0xb1bc: "nwaels" -0xb1bd: "nwaelt" -0xb1be: "nwaelp" -0xb1bf: "nwaelh" -0xb1c0: "nwaem" -0xb1c1: "nwaeb" -0xb1c2: "nwaebs" -0xb1c3: "nwaes" -0xb1c4: "nwaess" -0xb1c5: "nwaeng" -0xb1c6: "nwaej" -0xb1c7: "nwaec" -0xb1c8: "nwaek" -0xb1c9: "nwaet" -0xb1ca: "nwaep" -0xb1cb: "nwaeh" -0xb1cc: "noe" -0xb1cd: "noeg" -0xb1ce: "noegg" -0xb1cf: "noegs" -0xb1d0: "noen" -0xb1d1: "noenj" -0xb1d2: "noenh" -0xb1d3: "noed" -0xb1d4: "noel" -0xb1d5: "noelg" -0xb1d6: "noelm" -0xb1d7: "noelb" -0xb1d8: "noels" -0xb1d9: "noelt" -0xb1da: "noelp" -0xb1db: "noelh" -0xb1dc: "noem" -0xb1dd: "noeb" -0xb1de: "noebs" -0xb1df: "noes" -0xb1e0: "noess" -0xb1e1: "noeng" -0xb1e2: "noej" -0xb1e3: "noec" -0xb1e4: "noek" -0xb1e5: "noet" -0xb1e6: "noep" -0xb1e7: "noeh" -0xb1e8: "nyo" -0xb1e9: "nyog" -0xb1ea: "nyogg" -0xb1eb: "nyogs" -0xb1ec: "nyon" -0xb1ed: "nyonj" -0xb1ee: "nyonh" -0xb1ef: "nyod" -0xb1f0: "nyol" -0xb1f1: "nyolg" -0xb1f2: "nyolm" -0xb1f3: "nyolb" -0xb1f4: "nyols" -0xb1f5: "nyolt" -0xb1f6: "nyolp" -0xb1f7: "nyolh" -0xb1f8: "nyom" -0xb1f9: "nyob" -0xb1fa: "nyobs" -0xb1fb: "nyos" -0xb1fc: "nyoss" -0xb1fd: "nyong" -0xb1fe: "nyoj" -0xb1ff: "nyoc" -/* x0b2 */ -0xb200: "nyok" -0xb201: "nyot" -0xb202: "nyop" -0xb203: "nyoh" -0xb204: "nu" -0xb205: "nug" -0xb206: "nugg" -0xb207: "nugs" -0xb208: "nun" -0xb209: "nunj" -0xb20a: "nunh" -0xb20b: "nud" -0xb20c: "nul" -0xb20d: "nulg" -0xb20e: "nulm" -0xb20f: "nulb" -0xb210: "nuls" -0xb211: "nult" -0xb212: "nulp" -0xb213: "nulh" -0xb214: "num" -0xb215: "nub" -0xb216: "nubs" -0xb217: "nus" -0xb218: "nuss" -0xb219: "nung" -0xb21a: "nuj" -0xb21b: "nuc" -0xb21c: "nuk" -0xb21d: "nut" -0xb21e: "nup" -0xb21f: "nuh" -0xb220: "nweo" -0xb221: "nweog" -0xb222: "nweogg" -0xb223: "nweogs" -0xb224: "nweon" -0xb225: "nweonj" -0xb226: "nweonh" -0xb227: "nweod" -0xb228: "nweol" -0xb229: "nweolg" -0xb22a: "nweolm" -0xb22b: "nweolb" -0xb22c: "nweols" -0xb22d: "nweolt" -0xb22e: "nweolp" -0xb22f: "nweolh" -0xb230: "nweom" -0xb231: "nweob" -0xb232: "nweobs" -0xb233: "nweos" -0xb234: "nweoss" -0xb235: "nweong" -0xb236: "nweoj" -0xb237: "nweoc" -0xb238: "nweok" -0xb239: "nweot" -0xb23a: "nweop" -0xb23b: "nweoh" -0xb23c: "nwe" -0xb23d: "nweg" -0xb23e: "nwegg" -0xb23f: "nwegs" -0xb240: "nwen" -0xb241: "nwenj" -0xb242: "nwenh" -0xb243: "nwed" -0xb244: "nwel" -0xb245: "nwelg" -0xb246: "nwelm" -0xb247: "nwelb" -0xb248: "nwels" -0xb249: "nwelt" -0xb24a: "nwelp" -0xb24b: "nwelh" -0xb24c: "nwem" -0xb24d: "nweb" -0xb24e: "nwebs" -0xb24f: "nwes" -0xb250: "nwess" -0xb251: "nweng" -0xb252: "nwej" -0xb253: "nwec" -0xb254: "nwek" -0xb255: "nwet" -0xb256: "nwep" -0xb257: "nweh" -0xb258: "nwi" -0xb259: "nwig" -0xb25a: "nwigg" -0xb25b: "nwigs" -0xb25c: "nwin" -0xb25d: "nwinj" -0xb25e: "nwinh" -0xb25f: "nwid" -0xb260: "nwil" -0xb261: "nwilg" -0xb262: "nwilm" -0xb263: "nwilb" -0xb264: "nwils" -0xb265: "nwilt" -0xb266: "nwilp" -0xb267: "nwilh" -0xb268: "nwim" -0xb269: "nwib" -0xb26a: "nwibs" -0xb26b: "nwis" -0xb26c: "nwiss" -0xb26d: "nwing" -0xb26e: "nwij" -0xb26f: "nwic" -0xb270: "nwik" -0xb271: "nwit" -0xb272: "nwip" -0xb273: "nwih" -0xb274: "nyu" -0xb275: "nyug" -0xb276: "nyugg" -0xb277: "nyugs" -0xb278: "nyun" -0xb279: "nyunj" -0xb27a: "nyunh" -0xb27b: "nyud" -0xb27c: "nyul" -0xb27d: "nyulg" -0xb27e: "nyulm" -0xb27f: "nyulb" -0xb280: "nyuls" -0xb281: "nyult" -0xb282: "nyulp" -0xb283: "nyulh" -0xb284: "nyum" -0xb285: "nyub" -0xb286: "nyubs" -0xb287: "nyus" -0xb288: "nyuss" -0xb289: "nyung" -0xb28a: "nyuj" -0xb28b: "nyuc" -0xb28c: "nyuk" -0xb28d: "nyut" -0xb28e: "nyup" -0xb28f: "nyuh" -0xb290: "neu" -0xb291: "neug" -0xb292: "neugg" -0xb293: "neugs" -0xb294: "neun" -0xb295: "neunj" -0xb296: "neunh" -0xb297: "neud" -0xb298: "neul" -0xb299: "neulg" -0xb29a: "neulm" -0xb29b: "neulb" -0xb29c: "neuls" -0xb29d: "neult" -0xb29e: "neulp" -0xb29f: "neulh" -0xb2a0: "neum" -0xb2a1: "neub" -0xb2a2: "neubs" -0xb2a3: "neus" -0xb2a4: "neuss" -0xb2a5: "neung" -0xb2a6: "neuj" -0xb2a7: "neuc" -0xb2a8: "neuk" -0xb2a9: "neut" -0xb2aa: "neup" -0xb2ab: "neuh" -0xb2ac: "nyi" -0xb2ad: "nyig" -0xb2ae: "nyigg" -0xb2af: "nyigs" -0xb2b0: "nyin" -0xb2b1: "nyinj" -0xb2b2: "nyinh" -0xb2b3: "nyid" -0xb2b4: "nyil" -0xb2b5: "nyilg" -0xb2b6: "nyilm" -0xb2b7: "nyilb" -0xb2b8: "nyils" -0xb2b9: "nyilt" -0xb2ba: "nyilp" -0xb2bb: "nyilh" -0xb2bc: "nyim" -0xb2bd: "nyib" -0xb2be: "nyibs" -0xb2bf: "nyis" -0xb2c0: "nyiss" -0xb2c1: "nying" -0xb2c2: "nyij" -0xb2c3: "nyic" -0xb2c4: "nyik" -0xb2c5: "nyit" -0xb2c6: "nyip" -0xb2c7: "nyih" -0xb2c8: "ni" -0xb2c9: "nig" -0xb2ca: "nigg" -0xb2cb: "nigs" -0xb2cc: "nin" -0xb2cd: "ninj" -0xb2ce: "ninh" -0xb2cf: "nid" -0xb2d0: "nil" -0xb2d1: "nilg" -0xb2d2: "nilm" -0xb2d3: "nilb" -0xb2d4: "nils" -0xb2d5: "nilt" -0xb2d6: "nilp" -0xb2d7: "nilh" -0xb2d8: "nim" -0xb2d9: "nib" -0xb2da: "nibs" -0xb2db: "nis" -0xb2dc: "niss" -0xb2dd: "ning" -0xb2de: "nij" -0xb2df: "nic" -0xb2e0: "nik" -0xb2e1: "nit" -0xb2e2: "nip" -0xb2e3: "nih" -0xb2e4: "da" -0xb2e5: "dag" -0xb2e6: "dagg" -0xb2e7: "dags" -0xb2e8: "dan" -0xb2e9: "danj" -0xb2ea: "danh" -0xb2eb: "dad" -0xb2ec: "dal" -0xb2ed: "dalg" -0xb2ee: "dalm" -0xb2ef: "dalb" -0xb2f0: "dals" -0xb2f1: "dalt" -0xb2f2: "dalp" -0xb2f3: "dalh" -0xb2f4: "dam" -0xb2f5: "dab" -0xb2f6: "dabs" -0xb2f7: "das" -0xb2f8: "dass" -0xb2f9: "dang" -0xb2fa: "daj" -0xb2fb: "dac" -0xb2fc: "dak" -0xb2fd: "dat" -0xb2fe: "dap" -0xb2ff: "dah" -/* x0b3 */ -0xb300: "dae" -0xb301: "daeg" -0xb302: "daegg" -0xb303: "daegs" -0xb304: "daen" -0xb305: "daenj" -0xb306: "daenh" -0xb307: "daed" -0xb308: "dael" -0xb309: "daelg" -0xb30a: "daelm" -0xb30b: "daelb" -0xb30c: "daels" -0xb30d: "daelt" -0xb30e: "daelp" -0xb30f: "daelh" -0xb310: "daem" -0xb311: "daeb" -0xb312: "daebs" -0xb313: "daes" -0xb314: "daess" -0xb315: "daeng" -0xb316: "daej" -0xb317: "daec" -0xb318: "daek" -0xb319: "daet" -0xb31a: "daep" -0xb31b: "daeh" -0xb31c: "dya" -0xb31d: "dyag" -0xb31e: "dyagg" -0xb31f: "dyags" -0xb320: "dyan" -0xb321: "dyanj" -0xb322: "dyanh" -0xb323: "dyad" -0xb324: "dyal" -0xb325: "dyalg" -0xb326: "dyalm" -0xb327: "dyalb" -0xb328: "dyals" -0xb329: "dyalt" -0xb32a: "dyalp" -0xb32b: "dyalh" -0xb32c: "dyam" -0xb32d: "dyab" -0xb32e: "dyabs" -0xb32f: "dyas" -0xb330: "dyass" -0xb331: "dyang" -0xb332: "dyaj" -0xb333: "dyac" -0xb334: "dyak" -0xb335: "dyat" -0xb336: "dyap" -0xb337: "dyah" -0xb338: "dyae" -0xb339: "dyaeg" -0xb33a: "dyaegg" -0xb33b: "dyaegs" -0xb33c: "dyaen" -0xb33d: "dyaenj" -0xb33e: "dyaenh" -0xb33f: "dyaed" -0xb340: "dyael" -0xb341: "dyaelg" -0xb342: "dyaelm" -0xb343: "dyaelb" -0xb344: "dyaels" -0xb345: "dyaelt" -0xb346: "dyaelp" -0xb347: "dyaelh" -0xb348: "dyaem" -0xb349: "dyaeb" -0xb34a: "dyaebs" -0xb34b: "dyaes" -0xb34c: "dyaess" -0xb34d: "dyaeng" -0xb34e: "dyaej" -0xb34f: "dyaec" -0xb350: "dyaek" -0xb351: "dyaet" -0xb352: "dyaep" -0xb353: "dyaeh" -0xb354: "deo" -0xb355: "deog" -0xb356: "deogg" -0xb357: "deogs" -0xb358: "deon" -0xb359: "deonj" -0xb35a: "deonh" -0xb35b: "deod" -0xb35c: "deol" -0xb35d: "deolg" -0xb35e: "deolm" -0xb35f: "deolb" -0xb360: "deols" -0xb361: "deolt" -0xb362: "deolp" -0xb363: "deolh" -0xb364: "deom" -0xb365: "deob" -0xb366: "deobs" -0xb367: "deos" -0xb368: "deoss" -0xb369: "deong" -0xb36a: "deoj" -0xb36b: "deoc" -0xb36c: "deok" -0xb36d: "deot" -0xb36e: "deop" -0xb36f: "deoh" -0xb370: "de" -0xb371: "deg" -0xb372: "degg" -0xb373: "degs" -0xb374: "den" -0xb375: "denj" -0xb376: "denh" -0xb377: "ded" -0xb378: "del" -0xb379: "delg" -0xb37a: "delm" -0xb37b: "delb" -0xb37c: "dels" -0xb37d: "delt" -0xb37e: "delp" -0xb37f: "delh" -0xb380: "dem" -0xb381: "deb" -0xb382: "debs" -0xb383: "des" -0xb384: "dess" -0xb385: "deng" -0xb386: "dej" -0xb387: "dec" -0xb388: "dek" -0xb389: "det" -0xb38a: "dep" -0xb38b: "deh" -0xb38c: "dyeo" -0xb38d: "dyeog" -0xb38e: "dyeogg" -0xb38f: "dyeogs" -0xb390: "dyeon" -0xb391: "dyeonj" -0xb392: "dyeonh" -0xb393: "dyeod" -0xb394: "dyeol" -0xb395: "dyeolg" -0xb396: "dyeolm" -0xb397: "dyeolb" -0xb398: "dyeols" -0xb399: "dyeolt" -0xb39a: "dyeolp" -0xb39b: "dyeolh" -0xb39c: "dyeom" -0xb39d: "dyeob" -0xb39e: "dyeobs" -0xb39f: "dyeos" -0xb3a0: "dyeoss" -0xb3a1: "dyeong" -0xb3a2: "dyeoj" -0xb3a3: "dyeoc" -0xb3a4: "dyeok" -0xb3a5: "dyeot" -0xb3a6: "dyeop" -0xb3a7: "dyeoh" -0xb3a8: "dye" -0xb3a9: "dyeg" -0xb3aa: "dyegg" -0xb3ab: "dyegs" -0xb3ac: "dyen" -0xb3ad: "dyenj" -0xb3ae: "dyenh" -0xb3af: "dyed" -0xb3b0: "dyel" -0xb3b1: "dyelg" -0xb3b2: "dyelm" -0xb3b3: "dyelb" -0xb3b4: "dyels" -0xb3b5: "dyelt" -0xb3b6: "dyelp" -0xb3b7: "dyelh" -0xb3b8: "dyem" -0xb3b9: "dyeb" -0xb3ba: "dyebs" -0xb3bb: "dyes" -0xb3bc: "dyess" -0xb3bd: "dyeng" -0xb3be: "dyej" -0xb3bf: "dyec" -0xb3c0: "dyek" -0xb3c1: "dyet" -0xb3c2: "dyep" -0xb3c3: "dyeh" -0xb3c4: "do" -0xb3c5: "dog" -0xb3c6: "dogg" -0xb3c7: "dogs" -0xb3c8: "don" -0xb3c9: "donj" -0xb3ca: "donh" -0xb3cb: "dod" -0xb3cc: "dol" -0xb3cd: "dolg" -0xb3ce: "dolm" -0xb3cf: "dolb" -0xb3d0: "dols" -0xb3d1: "dolt" -0xb3d2: "dolp" -0xb3d3: "dolh" -0xb3d4: "dom" -0xb3d5: "dob" -0xb3d6: "dobs" -0xb3d7: "dos" -0xb3d8: "doss" -0xb3d9: "dong" -0xb3da: "doj" -0xb3db: "doc" -0xb3dc: "dok" -0xb3dd: "dot" -0xb3de: "dop" -0xb3df: "doh" -0xb3e0: "dwa" -0xb3e1: "dwag" -0xb3e2: "dwagg" -0xb3e3: "dwags" -0xb3e4: "dwan" -0xb3e5: "dwanj" -0xb3e6: "dwanh" -0xb3e7: "dwad" -0xb3e8: "dwal" -0xb3e9: "dwalg" -0xb3ea: "dwalm" -0xb3eb: "dwalb" -0xb3ec: "dwals" -0xb3ed: "dwalt" -0xb3ee: "dwalp" -0xb3ef: "dwalh" -0xb3f0: "dwam" -0xb3f1: "dwab" -0xb3f2: "dwabs" -0xb3f3: "dwas" -0xb3f4: "dwass" -0xb3f5: "dwang" -0xb3f6: "dwaj" -0xb3f7: "dwac" -0xb3f8: "dwak" -0xb3f9: "dwat" -0xb3fa: "dwap" -0xb3fb: "dwah" -0xb3fc: "dwae" -0xb3fd: "dwaeg" -0xb3fe: "dwaegg" -0xb3ff: "dwaegs" -/* x0b4 */ -0xb400: "dwaen" -0xb401: "dwaenj" -0xb402: "dwaenh" -0xb403: "dwaed" -0xb404: "dwael" -0xb405: "dwaelg" -0xb406: "dwaelm" -0xb407: "dwaelb" -0xb408: "dwaels" -0xb409: "dwaelt" -0xb40a: "dwaelp" -0xb40b: "dwaelh" -0xb40c: "dwaem" -0xb40d: "dwaeb" -0xb40e: "dwaebs" -0xb40f: "dwaes" -0xb410: "dwaess" -0xb411: "dwaeng" -0xb412: "dwaej" -0xb413: "dwaec" -0xb414: "dwaek" -0xb415: "dwaet" -0xb416: "dwaep" -0xb417: "dwaeh" -0xb418: "doe" -0xb419: "doeg" -0xb41a: "doegg" -0xb41b: "doegs" -0xb41c: "doen" -0xb41d: "doenj" -0xb41e: "doenh" -0xb41f: "doed" -0xb420: "doel" -0xb421: "doelg" -0xb422: "doelm" -0xb423: "doelb" -0xb424: "doels" -0xb425: "doelt" -0xb426: "doelp" -0xb427: "doelh" -0xb428: "doem" -0xb429: "doeb" -0xb42a: "doebs" -0xb42b: "does" -0xb42c: "doess" -0xb42d: "doeng" -0xb42e: "doej" -0xb42f: "doec" -0xb430: "doek" -0xb431: "doet" -0xb432: "doep" -0xb433: "doeh" -0xb434: "dyo" -0xb435: "dyog" -0xb436: "dyogg" -0xb437: "dyogs" -0xb438: "dyon" -0xb439: "dyonj" -0xb43a: "dyonh" -0xb43b: "dyod" -0xb43c: "dyol" -0xb43d: "dyolg" -0xb43e: "dyolm" -0xb43f: "dyolb" -0xb440: "dyols" -0xb441: "dyolt" -0xb442: "dyolp" -0xb443: "dyolh" -0xb444: "dyom" -0xb445: "dyob" -0xb446: "dyobs" -0xb447: "dyos" -0xb448: "dyoss" -0xb449: "dyong" -0xb44a: "dyoj" -0xb44b: "dyoc" -0xb44c: "dyok" -0xb44d: "dyot" -0xb44e: "dyop" -0xb44f: "dyoh" -0xb450: "du" -0xb451: "dug" -0xb452: "dugg" -0xb453: "dugs" -0xb454: "dun" -0xb455: "dunj" -0xb456: "dunh" -0xb457: "dud" -0xb458: "dul" -0xb459: "dulg" -0xb45a: "dulm" -0xb45b: "dulb" -0xb45c: "duls" -0xb45d: "dult" -0xb45e: "dulp" -0xb45f: "dulh" -0xb460: "dum" -0xb461: "dub" -0xb462: "dubs" -0xb463: "dus" -0xb464: "duss" -0xb465: "dung" -0xb466: "duj" -0xb467: "duc" -0xb468: "duk" -0xb469: "dut" -0xb46a: "dup" -0xb46b: "duh" -0xb46c: "dweo" -0xb46d: "dweog" -0xb46e: "dweogg" -0xb46f: "dweogs" -0xb470: "dweon" -0xb471: "dweonj" -0xb472: "dweonh" -0xb473: "dweod" -0xb474: "dweol" -0xb475: "dweolg" -0xb476: "dweolm" -0xb477: "dweolb" -0xb478: "dweols" -0xb479: "dweolt" -0xb47a: "dweolp" -0xb47b: "dweolh" -0xb47c: "dweom" -0xb47d: "dweob" -0xb47e: "dweobs" -0xb47f: "dweos" -0xb480: "dweoss" -0xb481: "dweong" -0xb482: "dweoj" -0xb483: "dweoc" -0xb484: "dweok" -0xb485: "dweot" -0xb486: "dweop" -0xb487: "dweoh" -0xb488: "dwe" -0xb489: "dweg" -0xb48a: "dwegg" -0xb48b: "dwegs" -0xb48c: "dwen" -0xb48d: "dwenj" -0xb48e: "dwenh" -0xb48f: "dwed" -0xb490: "dwel" -0xb491: "dwelg" -0xb492: "dwelm" -0xb493: "dwelb" -0xb494: "dwels" -0xb495: "dwelt" -0xb496: "dwelp" -0xb497: "dwelh" -0xb498: "dwem" -0xb499: "dweb" -0xb49a: "dwebs" -0xb49b: "dwes" -0xb49c: "dwess" -0xb49d: "dweng" -0xb49e: "dwej" -0xb49f: "dwec" -0xb4a0: "dwek" -0xb4a1: "dwet" -0xb4a2: "dwep" -0xb4a3: "dweh" -0xb4a4: "dwi" -0xb4a5: "dwig" -0xb4a6: "dwigg" -0xb4a7: "dwigs" -0xb4a8: "dwin" -0xb4a9: "dwinj" -0xb4aa: "dwinh" -0xb4ab: "dwid" -0xb4ac: "dwil" -0xb4ad: "dwilg" -0xb4ae: "dwilm" -0xb4af: "dwilb" -0xb4b0: "dwils" -0xb4b1: "dwilt" -0xb4b2: "dwilp" -0xb4b3: "dwilh" -0xb4b4: "dwim" -0xb4b5: "dwib" -0xb4b6: "dwibs" -0xb4b7: "dwis" -0xb4b8: "dwiss" -0xb4b9: "dwing" -0xb4ba: "dwij" -0xb4bb: "dwic" -0xb4bc: "dwik" -0xb4bd: "dwit" -0xb4be: "dwip" -0xb4bf: "dwih" -0xb4c0: "dyu" -0xb4c1: "dyug" -0xb4c2: "dyugg" -0xb4c3: "dyugs" -0xb4c4: "dyun" -0xb4c5: "dyunj" -0xb4c6: "dyunh" -0xb4c7: "dyud" -0xb4c8: "dyul" -0xb4c9: "dyulg" -0xb4ca: "dyulm" -0xb4cb: "dyulb" -0xb4cc: "dyuls" -0xb4cd: "dyult" -0xb4ce: "dyulp" -0xb4cf: "dyulh" -0xb4d0: "dyum" -0xb4d1: "dyub" -0xb4d2: "dyubs" -0xb4d3: "dyus" -0xb4d4: "dyuss" -0xb4d5: "dyung" -0xb4d6: "dyuj" -0xb4d7: "dyuc" -0xb4d8: "dyuk" -0xb4d9: "dyut" -0xb4da: "dyup" -0xb4db: "dyuh" -0xb4dc: "deu" -0xb4dd: "deug" -0xb4de: "deugg" -0xb4df: "deugs" -0xb4e0: "deun" -0xb4e1: "deunj" -0xb4e2: "deunh" -0xb4e3: "deud" -0xb4e4: "deul" -0xb4e5: "deulg" -0xb4e6: "deulm" -0xb4e7: "deulb" -0xb4e8: "deuls" -0xb4e9: "deult" -0xb4ea: "deulp" -0xb4eb: "deulh" -0xb4ec: "deum" -0xb4ed: "deub" -0xb4ee: "deubs" -0xb4ef: "deus" -0xb4f0: "deuss" -0xb4f1: "deung" -0xb4f2: "deuj" -0xb4f3: "deuc" -0xb4f4: "deuk" -0xb4f5: "deut" -0xb4f6: "deup" -0xb4f7: "deuh" -0xb4f8: "dyi" -0xb4f9: "dyig" -0xb4fa: "dyigg" -0xb4fb: "dyigs" -0xb4fc: "dyin" -0xb4fd: "dyinj" -0xb4fe: "dyinh" -0xb4ff: "dyid" -/* x0b5 */ -0xb500: "dyil" -0xb501: "dyilg" -0xb502: "dyilm" -0xb503: "dyilb" -0xb504: "dyils" -0xb505: "dyilt" -0xb506: "dyilp" -0xb507: "dyilh" -0xb508: "dyim" -0xb509: "dyib" -0xb50a: "dyibs" -0xb50b: "dyis" -0xb50c: "dyiss" -0xb50d: "dying" -0xb50e: "dyij" -0xb50f: "dyic" -0xb510: "dyik" -0xb511: "dyit" -0xb512: "dyip" -0xb513: "dyih" -0xb514: "di" -0xb515: "dig" -0xb516: "digg" -0xb517: "digs" -0xb518: "din" -0xb519: "dinj" -0xb51a: "dinh" -0xb51b: "did" -0xb51c: "dil" -0xb51d: "dilg" -0xb51e: "dilm" -0xb51f: "dilb" -0xb520: "dils" -0xb521: "dilt" -0xb522: "dilp" -0xb523: "dilh" -0xb524: "dim" -0xb525: "dib" -0xb526: "dibs" -0xb527: "dis" -0xb528: "diss" -0xb529: "ding" -0xb52a: "dij" -0xb52b: "dic" -0xb52c: "dik" -0xb52d: "dit" -0xb52e: "dip" -0xb52f: "dih" -0xb530: "dda" -0xb531: "ddag" -0xb532: "ddagg" -0xb533: "ddags" -0xb534: "ddan" -0xb535: "ddanj" -0xb536: "ddanh" -0xb537: "ddad" -0xb538: "ddal" -0xb539: "ddalg" -0xb53a: "ddalm" -0xb53b: "ddalb" -0xb53c: "ddals" -0xb53d: "ddalt" -0xb53e: "ddalp" -0xb53f: "ddalh" -0xb540: "ddam" -0xb541: "ddab" -0xb542: "ddabs" -0xb543: "ddas" -0xb544: "ddass" -0xb545: "ddang" -0xb546: "ddaj" -0xb547: "ddac" -0xb548: "ddak" -0xb549: "ddat" -0xb54a: "ddap" -0xb54b: "ddah" -0xb54c: "ddae" -0xb54d: "ddaeg" -0xb54e: "ddaegg" -0xb54f: "ddaegs" -0xb550: "ddaen" -0xb551: "ddaenj" -0xb552: "ddaenh" -0xb553: "ddaed" -0xb554: "ddael" -0xb555: "ddaelg" -0xb556: "ddaelm" -0xb557: "ddaelb" -0xb558: "ddaels" -0xb559: "ddaelt" -0xb55a: "ddaelp" -0xb55b: "ddaelh" -0xb55c: "ddaem" -0xb55d: "ddaeb" -0xb55e: "ddaebs" -0xb55f: "ddaes" -0xb560: "ddaess" -0xb561: "ddaeng" -0xb562: "ddaej" -0xb563: "ddaec" -0xb564: "ddaek" -0xb565: "ddaet" -0xb566: "ddaep" -0xb567: "ddaeh" -0xb568: "ddya" -0xb569: "ddyag" -0xb56a: "ddyagg" -0xb56b: "ddyags" -0xb56c: "ddyan" -0xb56d: "ddyanj" -0xb56e: "ddyanh" -0xb56f: "ddyad" -0xb570: "ddyal" -0xb571: "ddyalg" -0xb572: "ddyalm" -0xb573: "ddyalb" -0xb574: "ddyals" -0xb575: "ddyalt" -0xb576: "ddyalp" -0xb577: "ddyalh" -0xb578: "ddyam" -0xb579: "ddyab" -0xb57a: "ddyabs" -0xb57b: "ddyas" -0xb57c: "ddyass" -0xb57d: "ddyang" -0xb57e: "ddyaj" -0xb57f: "ddyac" -0xb580: "ddyak" -0xb581: "ddyat" -0xb582: "ddyap" -0xb583: "ddyah" -0xb584: "ddyae" -0xb585: "ddyaeg" -0xb586: "ddyaegg" -0xb587: "ddyaegs" -0xb588: "ddyaen" -0xb589: "ddyaenj" -0xb58a: "ddyaenh" -0xb58b: "ddyaed" -0xb58c: "ddyael" -0xb58d: "ddyaelg" -0xb58e: "ddyaelm" -0xb58f: "ddyaelb" -0xb590: "ddyaels" -0xb591: "ddyaelt" -0xb592: "ddyaelp" -0xb593: "ddyaelh" -0xb594: "ddyaem" -0xb595: "ddyaeb" -0xb596: "ddyaebs" -0xb597: "ddyaes" -0xb598: "ddyaess" -0xb599: "ddyaeng" -0xb59a: "ddyaej" -0xb59b: "ddyaec" -0xb59c: "ddyaek" -0xb59d: "ddyaet" -0xb59e: "ddyaep" -0xb59f: "ddyaeh" -0xb5a0: "ddeo" -0xb5a1: "ddeog" -0xb5a2: "ddeogg" -0xb5a3: "ddeogs" -0xb5a4: "ddeon" -0xb5a5: "ddeonj" -0xb5a6: "ddeonh" -0xb5a7: "ddeod" -0xb5a8: "ddeol" -0xb5a9: "ddeolg" -0xb5aa: "ddeolm" -0xb5ab: "ddeolb" -0xb5ac: "ddeols" -0xb5ad: "ddeolt" -0xb5ae: "ddeolp" -0xb5af: "ddeolh" -0xb5b0: "ddeom" -0xb5b1: "ddeob" -0xb5b2: "ddeobs" -0xb5b3: "ddeos" -0xb5b4: "ddeoss" -0xb5b5: "ddeong" -0xb5b6: "ddeoj" -0xb5b7: "ddeoc" -0xb5b8: "ddeok" -0xb5b9: "ddeot" -0xb5ba: "ddeop" -0xb5bb: "ddeoh" -0xb5bc: "dde" -0xb5bd: "ddeg" -0xb5be: "ddegg" -0xb5bf: "ddegs" -0xb5c0: "dden" -0xb5c1: "ddenj" -0xb5c2: "ddenh" -0xb5c3: "dded" -0xb5c4: "ddel" -0xb5c5: "ddelg" -0xb5c6: "ddelm" -0xb5c7: "ddelb" -0xb5c8: "ddels" -0xb5c9: "ddelt" -0xb5ca: "ddelp" -0xb5cb: "ddelh" -0xb5cc: "ddem" -0xb5cd: "ddeb" -0xb5ce: "ddebs" -0xb5cf: "ddes" -0xb5d0: "ddess" -0xb5d1: "ddeng" -0xb5d2: "ddej" -0xb5d3: "ddec" -0xb5d4: "ddek" -0xb5d5: "ddet" -0xb5d6: "ddep" -0xb5d7: "ddeh" -0xb5d8: "ddyeo" -0xb5d9: "ddyeog" -0xb5da: "ddyeogg" -0xb5db: "ddyeogs" -0xb5dc: "ddyeon" -0xb5dd: "ddyeonj" -0xb5de: "ddyeonh" -0xb5df: "ddyeod" -0xb5e0: "ddyeol" -0xb5e1: "ddyeolg" -0xb5e2: "ddyeolm" -0xb5e3: "ddyeolb" -0xb5e4: "ddyeols" -0xb5e5: "ddyeolt" -0xb5e6: "ddyeolp" -0xb5e7: "ddyeolh" -0xb5e8: "ddyeom" -0xb5e9: "ddyeob" -0xb5ea: "ddyeobs" -0xb5eb: "ddyeos" -0xb5ec: "ddyeoss" -0xb5ed: "ddyeong" -0xb5ee: "ddyeoj" -0xb5ef: "ddyeoc" -0xb5f0: "ddyeok" -0xb5f1: "ddyeot" -0xb5f2: "ddyeop" -0xb5f3: "ddyeoh" -0xb5f4: "ddye" -0xb5f5: "ddyeg" -0xb5f6: "ddyegg" -0xb5f7: "ddyegs" -0xb5f8: "ddyen" -0xb5f9: "ddyenj" -0xb5fa: "ddyenh" -0xb5fb: "ddyed" -0xb5fc: "ddyel" -0xb5fd: "ddyelg" -0xb5fe: "ddyelm" -0xb5ff: "ddyelb" -/* x0b6 */ -0xb600: "ddyels" -0xb601: "ddyelt" -0xb602: "ddyelp" -0xb603: "ddyelh" -0xb604: "ddyem" -0xb605: "ddyeb" -0xb606: "ddyebs" -0xb607: "ddyes" -0xb608: "ddyess" -0xb609: "ddyeng" -0xb60a: "ddyej" -0xb60b: "ddyec" -0xb60c: "ddyek" -0xb60d: "ddyet" -0xb60e: "ddyep" -0xb60f: "ddyeh" -0xb610: "ddo" -0xb611: "ddog" -0xb612: "ddogg" -0xb613: "ddogs" -0xb614: "ddon" -0xb615: "ddonj" -0xb616: "ddonh" -0xb617: "ddod" -0xb618: "ddol" -0xb619: "ddolg" -0xb61a: "ddolm" -0xb61b: "ddolb" -0xb61c: "ddols" -0xb61d: "ddolt" -0xb61e: "ddolp" -0xb61f: "ddolh" -0xb620: "ddom" -0xb621: "ddob" -0xb622: "ddobs" -0xb623: "ddos" -0xb624: "ddoss" -0xb625: "ddong" -0xb626: "ddoj" -0xb627: "ddoc" -0xb628: "ddok" -0xb629: "ddot" -0xb62a: "ddop" -0xb62b: "ddoh" -0xb62c: "ddwa" -0xb62d: "ddwag" -0xb62e: "ddwagg" -0xb62f: "ddwags" -0xb630: "ddwan" -0xb631: "ddwanj" -0xb632: "ddwanh" -0xb633: "ddwad" -0xb634: "ddwal" -0xb635: "ddwalg" -0xb636: "ddwalm" -0xb637: "ddwalb" -0xb638: "ddwals" -0xb639: "ddwalt" -0xb63a: "ddwalp" -0xb63b: "ddwalh" -0xb63c: "ddwam" -0xb63d: "ddwab" -0xb63e: "ddwabs" -0xb63f: "ddwas" -0xb640: "ddwass" -0xb641: "ddwang" -0xb642: "ddwaj" -0xb643: "ddwac" -0xb644: "ddwak" -0xb645: "ddwat" -0xb646: "ddwap" -0xb647: "ddwah" -0xb648: "ddwae" -0xb649: "ddwaeg" -0xb64a: "ddwaegg" -0xb64b: "ddwaegs" -0xb64c: "ddwaen" -0xb64d: "ddwaenj" -0xb64e: "ddwaenh" -0xb64f: "ddwaed" -0xb650: "ddwael" -0xb651: "ddwaelg" -0xb652: "ddwaelm" -0xb653: "ddwaelb" -0xb654: "ddwaels" -0xb655: "ddwaelt" -0xb656: "ddwaelp" -0xb657: "ddwaelh" -0xb658: "ddwaem" -0xb659: "ddwaeb" -0xb65a: "ddwaebs" -0xb65b: "ddwaes" -0xb65c: "ddwaess" -0xb65d: "ddwaeng" -0xb65e: "ddwaej" -0xb65f: "ddwaec" -0xb660: "ddwaek" -0xb661: "ddwaet" -0xb662: "ddwaep" -0xb663: "ddwaeh" -0xb664: "ddoe" -0xb665: "ddoeg" -0xb666: "ddoegg" -0xb667: "ddoegs" -0xb668: "ddoen" -0xb669: "ddoenj" -0xb66a: "ddoenh" -0xb66b: "ddoed" -0xb66c: "ddoel" -0xb66d: "ddoelg" -0xb66e: "ddoelm" -0xb66f: "ddoelb" -0xb670: "ddoels" -0xb671: "ddoelt" -0xb672: "ddoelp" -0xb673: "ddoelh" -0xb674: "ddoem" -0xb675: "ddoeb" -0xb676: "ddoebs" -0xb677: "ddoes" -0xb678: "ddoess" -0xb679: "ddoeng" -0xb67a: "ddoej" -0xb67b: "ddoec" -0xb67c: "ddoek" -0xb67d: "ddoet" -0xb67e: "ddoep" -0xb67f: "ddoeh" -0xb680: "ddyo" -0xb681: "ddyog" -0xb682: "ddyogg" -0xb683: "ddyogs" -0xb684: "ddyon" -0xb685: "ddyonj" -0xb686: "ddyonh" -0xb687: "ddyod" -0xb688: "ddyol" -0xb689: "ddyolg" -0xb68a: "ddyolm" -0xb68b: "ddyolb" -0xb68c: "ddyols" -0xb68d: "ddyolt" -0xb68e: "ddyolp" -0xb68f: "ddyolh" -0xb690: "ddyom" -0xb691: "ddyob" -0xb692: "ddyobs" -0xb693: "ddyos" -0xb694: "ddyoss" -0xb695: "ddyong" -0xb696: "ddyoj" -0xb697: "ddyoc" -0xb698: "ddyok" -0xb699: "ddyot" -0xb69a: "ddyop" -0xb69b: "ddyoh" -0xb69c: "ddu" -0xb69d: "ddug" -0xb69e: "ddugg" -0xb69f: "ddugs" -0xb6a0: "ddun" -0xb6a1: "ddunj" -0xb6a2: "ddunh" -0xb6a3: "ddud" -0xb6a4: "ddul" -0xb6a5: "ddulg" -0xb6a6: "ddulm" -0xb6a7: "ddulb" -0xb6a8: "dduls" -0xb6a9: "ddult" -0xb6aa: "ddulp" -0xb6ab: "ddulh" -0xb6ac: "ddum" -0xb6ad: "ddub" -0xb6ae: "ddubs" -0xb6af: "ddus" -0xb6b0: "dduss" -0xb6b1: "ddung" -0xb6b2: "dduj" -0xb6b3: "dduc" -0xb6b4: "dduk" -0xb6b5: "ddut" -0xb6b6: "ddup" -0xb6b7: "dduh" -0xb6b8: "ddweo" -0xb6b9: "ddweog" -0xb6ba: "ddweogg" -0xb6bb: "ddweogs" -0xb6bc: "ddweon" -0xb6bd: "ddweonj" -0xb6be: "ddweonh" -0xb6bf: "ddweod" -0xb6c0: "ddweol" -0xb6c1: "ddweolg" -0xb6c2: "ddweolm" -0xb6c3: "ddweolb" -0xb6c4: "ddweols" -0xb6c5: "ddweolt" -0xb6c6: "ddweolp" -0xb6c7: "ddweolh" -0xb6c8: "ddweom" -0xb6c9: "ddweob" -0xb6ca: "ddweobs" -0xb6cb: "ddweos" -0xb6cc: "ddweoss" -0xb6cd: "ddweong" -0xb6ce: "ddweoj" -0xb6cf: "ddweoc" -0xb6d0: "ddweok" -0xb6d1: "ddweot" -0xb6d2: "ddweop" -0xb6d3: "ddweoh" -0xb6d4: "ddwe" -0xb6d5: "ddweg" -0xb6d6: "ddwegg" -0xb6d7: "ddwegs" -0xb6d8: "ddwen" -0xb6d9: "ddwenj" -0xb6da: "ddwenh" -0xb6db: "ddwed" -0xb6dc: "ddwel" -0xb6dd: "ddwelg" -0xb6de: "ddwelm" -0xb6df: "ddwelb" -0xb6e0: "ddwels" -0xb6e1: "ddwelt" -0xb6e2: "ddwelp" -0xb6e3: "ddwelh" -0xb6e4: "ddwem" -0xb6e5: "ddweb" -0xb6e6: "ddwebs" -0xb6e7: "ddwes" -0xb6e8: "ddwess" -0xb6e9: "ddweng" -0xb6ea: "ddwej" -0xb6eb: "ddwec" -0xb6ec: "ddwek" -0xb6ed: "ddwet" -0xb6ee: "ddwep" -0xb6ef: "ddweh" -0xb6f0: "ddwi" -0xb6f1: "ddwig" -0xb6f2: "ddwigg" -0xb6f3: "ddwigs" -0xb6f4: "ddwin" -0xb6f5: "ddwinj" -0xb6f6: "ddwinh" -0xb6f7: "ddwid" -0xb6f8: "ddwil" -0xb6f9: "ddwilg" -0xb6fa: "ddwilm" -0xb6fb: "ddwilb" -0xb6fc: "ddwils" -0xb6fd: "ddwilt" -0xb6fe: "ddwilp" -0xb6ff: "ddwilh" -/* x0b7 */ -0xb700: "ddwim" -0xb701: "ddwib" -0xb702: "ddwibs" -0xb703: "ddwis" -0xb704: "ddwiss" -0xb705: "ddwing" -0xb706: "ddwij" -0xb707: "ddwic" -0xb708: "ddwik" -0xb709: "ddwit" -0xb70a: "ddwip" -0xb70b: "ddwih" -0xb70c: "ddyu" -0xb70d: "ddyug" -0xb70e: "ddyugg" -0xb70f: "ddyugs" -0xb710: "ddyun" -0xb711: "ddyunj" -0xb712: "ddyunh" -0xb713: "ddyud" -0xb714: "ddyul" -0xb715: "ddyulg" -0xb716: "ddyulm" -0xb717: "ddyulb" -0xb718: "ddyuls" -0xb719: "ddyult" -0xb71a: "ddyulp" -0xb71b: "ddyulh" -0xb71c: "ddyum" -0xb71d: "ddyub" -0xb71e: "ddyubs" -0xb71f: "ddyus" -0xb720: "ddyuss" -0xb721: "ddyung" -0xb722: "ddyuj" -0xb723: "ddyuc" -0xb724: "ddyuk" -0xb725: "ddyut" -0xb726: "ddyup" -0xb727: "ddyuh" -0xb728: "ddeu" -0xb729: "ddeug" -0xb72a: "ddeugg" -0xb72b: "ddeugs" -0xb72c: "ddeun" -0xb72d: "ddeunj" -0xb72e: "ddeunh" -0xb72f: "ddeud" -0xb730: "ddeul" -0xb731: "ddeulg" -0xb732: "ddeulm" -0xb733: "ddeulb" -0xb734: "ddeuls" -0xb735: "ddeult" -0xb736: "ddeulp" -0xb737: "ddeulh" -0xb738: "ddeum" -0xb739: "ddeub" -0xb73a: "ddeubs" -0xb73b: "ddeus" -0xb73c: "ddeuss" -0xb73d: "ddeung" -0xb73e: "ddeuj" -0xb73f: "ddeuc" -0xb740: "ddeuk" -0xb741: "ddeut" -0xb742: "ddeup" -0xb743: "ddeuh" -0xb744: "ddyi" -0xb745: "ddyig" -0xb746: "ddyigg" -0xb747: "ddyigs" -0xb748: "ddyin" -0xb749: "ddyinj" -0xb74a: "ddyinh" -0xb74b: "ddyid" -0xb74c: "ddyil" -0xb74d: "ddyilg" -0xb74e: "ddyilm" -0xb74f: "ddyilb" -0xb750: "ddyils" -0xb751: "ddyilt" -0xb752: "ddyilp" -0xb753: "ddyilh" -0xb754: "ddyim" -0xb755: "ddyib" -0xb756: "ddyibs" -0xb757: "ddyis" -0xb758: "ddyiss" -0xb759: "ddying" -0xb75a: "ddyij" -0xb75b: "ddyic" -0xb75c: "ddyik" -0xb75d: "ddyit" -0xb75e: "ddyip" -0xb75f: "ddyih" -0xb760: "ddi" -0xb761: "ddig" -0xb762: "ddigg" -0xb763: "ddigs" -0xb764: "ddin" -0xb765: "ddinj" -0xb766: "ddinh" -0xb767: "ddid" -0xb768: "ddil" -0xb769: "ddilg" -0xb76a: "ddilm" -0xb76b: "ddilb" -0xb76c: "ddils" -0xb76d: "ddilt" -0xb76e: "ddilp" -0xb76f: "ddilh" -0xb770: "ddim" -0xb771: "ddib" -0xb772: "ddibs" -0xb773: "ddis" -0xb774: "ddiss" -0xb775: "dding" -0xb776: "ddij" -0xb777: "ddic" -0xb778: "ddik" -0xb779: "ddit" -0xb77a: "ddip" -0xb77b: "ddih" -0xb77c: "ra" -0xb77d: "rag" -0xb77e: "ragg" -0xb77f: "rags" -0xb780: "ran" -0xb781: "ranj" -0xb782: "ranh" -0xb783: "rad" -0xb784: "ral" -0xb785: "ralg" -0xb786: "ralm" -0xb787: "ralb" -0xb788: "rals" -0xb789: "ralt" -0xb78a: "ralp" -0xb78b: "ralh" -0xb78c: "ram" -0xb78d: "rab" -0xb78e: "rabs" -0xb78f: "ras" -0xb790: "rass" -0xb791: "rang" -0xb792: "raj" -0xb793: "rac" -0xb794: "rak" -0xb795: "rat" -0xb796: "rap" -0xb797: "rah" -0xb798: "rae" -0xb799: "raeg" -0xb79a: "raegg" -0xb79b: "raegs" -0xb79c: "raen" -0xb79d: "raenj" -0xb79e: "raenh" -0xb79f: "raed" -0xb7a0: "rael" -0xb7a1: "raelg" -0xb7a2: "raelm" -0xb7a3: "raelb" -0xb7a4: "raels" -0xb7a5: "raelt" -0xb7a6: "raelp" -0xb7a7: "raelh" -0xb7a8: "raem" -0xb7a9: "raeb" -0xb7aa: "raebs" -0xb7ab: "raes" -0xb7ac: "raess" -0xb7ad: "raeng" -0xb7ae: "raej" -0xb7af: "raec" -0xb7b0: "raek" -0xb7b1: "raet" -0xb7b2: "raep" -0xb7b3: "raeh" -0xb7b4: "rya" -0xb7b5: "ryag" -0xb7b6: "ryagg" -0xb7b7: "ryags" -0xb7b8: "ryan" -0xb7b9: "ryanj" -0xb7ba: "ryanh" -0xb7bb: "ryad" -0xb7bc: "ryal" -0xb7bd: "ryalg" -0xb7be: "ryalm" -0xb7bf: "ryalb" -0xb7c0: "ryals" -0xb7c1: "ryalt" -0xb7c2: "ryalp" -0xb7c3: "ryalh" -0xb7c4: "ryam" -0xb7c5: "ryab" -0xb7c6: "ryabs" -0xb7c7: "ryas" -0xb7c8: "ryass" -0xb7c9: "ryang" -0xb7ca: "ryaj" -0xb7cb: "ryac" -0xb7cc: "ryak" -0xb7cd: "ryat" -0xb7ce: "ryap" -0xb7cf: "ryah" -0xb7d0: "ryae" -0xb7d1: "ryaeg" -0xb7d2: "ryaegg" -0xb7d3: "ryaegs" -0xb7d4: "ryaen" -0xb7d5: "ryaenj" -0xb7d6: "ryaenh" -0xb7d7: "ryaed" -0xb7d8: "ryael" -0xb7d9: "ryaelg" -0xb7da: "ryaelm" -0xb7db: "ryaelb" -0xb7dc: "ryaels" -0xb7dd: "ryaelt" -0xb7de: "ryaelp" -0xb7df: "ryaelh" -0xb7e0: "ryaem" -0xb7e1: "ryaeb" -0xb7e2: "ryaebs" -0xb7e3: "ryaes" -0xb7e4: "ryaess" -0xb7e5: "ryaeng" -0xb7e6: "ryaej" -0xb7e7: "ryaec" -0xb7e8: "ryaek" -0xb7e9: "ryaet" -0xb7ea: "ryaep" -0xb7eb: "ryaeh" -0xb7ec: "reo" -0xb7ed: "reog" -0xb7ee: "reogg" -0xb7ef: "reogs" -0xb7f0: "reon" -0xb7f1: "reonj" -0xb7f2: "reonh" -0xb7f3: "reod" -0xb7f4: "reol" -0xb7f5: "reolg" -0xb7f6: "reolm" -0xb7f7: "reolb" -0xb7f8: "reols" -0xb7f9: "reolt" -0xb7fa: "reolp" -0xb7fb: "reolh" -0xb7fc: "reom" -0xb7fd: "reob" -0xb7fe: "reobs" -0xb7ff: "reos" -/* x0b8 */ -0xb800: "reoss" -0xb801: "reong" -0xb802: "reoj" -0xb803: "reoc" -0xb804: "reok" -0xb805: "reot" -0xb806: "reop" -0xb807: "reoh" -0xb808: "re" -0xb809: "reg" -0xb80a: "regg" -0xb80b: "regs" -0xb80c: "ren" -0xb80d: "renj" -0xb80e: "renh" -0xb80f: "red" -0xb810: "rel" -0xb811: "relg" -0xb812: "relm" -0xb813: "relb" -0xb814: "rels" -0xb815: "relt" -0xb816: "relp" -0xb817: "relh" -0xb818: "rem" -0xb819: "reb" -0xb81a: "rebs" -0xb81b: "res" -0xb81c: "ress" -0xb81d: "reng" -0xb81e: "rej" -0xb81f: "rec" -0xb820: "rek" -0xb821: "ret" -0xb822: "rep" -0xb823: "reh" -0xb824: "ryeo" -0xb825: "ryeog" -0xb826: "ryeogg" -0xb827: "ryeogs" -0xb828: "ryeon" -0xb829: "ryeonj" -0xb82a: "ryeonh" -0xb82b: "ryeod" -0xb82c: "ryeol" -0xb82d: "ryeolg" -0xb82e: "ryeolm" -0xb82f: "ryeolb" -0xb830: "ryeols" -0xb831: "ryeolt" -0xb832: "ryeolp" -0xb833: "ryeolh" -0xb834: "ryeom" -0xb835: "ryeob" -0xb836: "ryeobs" -0xb837: "ryeos" -0xb838: "ryeoss" -0xb839: "ryeong" -0xb83a: "ryeoj" -0xb83b: "ryeoc" -0xb83c: "ryeok" -0xb83d: "ryeot" -0xb83e: "ryeop" -0xb83f: "ryeoh" -0xb840: "rye" -0xb841: "ryeg" -0xb842: "ryegg" -0xb843: "ryegs" -0xb844: "ryen" -0xb845: "ryenj" -0xb846: "ryenh" -0xb847: "ryed" -0xb848: "ryel" -0xb849: "ryelg" -0xb84a: "ryelm" -0xb84b: "ryelb" -0xb84c: "ryels" -0xb84d: "ryelt" -0xb84e: "ryelp" -0xb84f: "ryelh" -0xb850: "ryem" -0xb851: "ryeb" -0xb852: "ryebs" -0xb853: "ryes" -0xb854: "ryess" -0xb855: "ryeng" -0xb856: "ryej" -0xb857: "ryec" -0xb858: "ryek" -0xb859: "ryet" -0xb85a: "ryep" -0xb85b: "ryeh" -0xb85c: "ro" -0xb85d: "rog" -0xb85e: "rogg" -0xb85f: "rogs" -0xb860: "ron" -0xb861: "ronj" -0xb862: "ronh" -0xb863: "rod" -0xb864: "rol" -0xb865: "rolg" -0xb866: "rolm" -0xb867: "rolb" -0xb868: "rols" -0xb869: "rolt" -0xb86a: "rolp" -0xb86b: "rolh" -0xb86c: "rom" -0xb86d: "rob" -0xb86e: "robs" -0xb86f: "ros" -0xb870: "ross" -0xb871: "rong" -0xb872: "roj" -0xb873: "roc" -0xb874: "rok" -0xb875: "rot" -0xb876: "rop" -0xb877: "roh" -0xb878: "rwa" -0xb879: "rwag" -0xb87a: "rwagg" -0xb87b: "rwags" -0xb87c: "rwan" -0xb87d: "rwanj" -0xb87e: "rwanh" -0xb87f: "rwad" -0xb880: "rwal" -0xb881: "rwalg" -0xb882: "rwalm" -0xb883: "rwalb" -0xb884: "rwals" -0xb885: "rwalt" -0xb886: "rwalp" -0xb887: "rwalh" -0xb888: "rwam" -0xb889: "rwab" -0xb88a: "rwabs" -0xb88b: "rwas" -0xb88c: "rwass" -0xb88d: "rwang" -0xb88e: "rwaj" -0xb88f: "rwac" -0xb890: "rwak" -0xb891: "rwat" -0xb892: "rwap" -0xb893: "rwah" -0xb894: "rwae" -0xb895: "rwaeg" -0xb896: "rwaegg" -0xb897: "rwaegs" -0xb898: "rwaen" -0xb899: "rwaenj" -0xb89a: "rwaenh" -0xb89b: "rwaed" -0xb89c: "rwael" -0xb89d: "rwaelg" -0xb89e: "rwaelm" -0xb89f: "rwaelb" -0xb8a0: "rwaels" -0xb8a1: "rwaelt" -0xb8a2: "rwaelp" -0xb8a3: "rwaelh" -0xb8a4: "rwaem" -0xb8a5: "rwaeb" -0xb8a6: "rwaebs" -0xb8a7: "rwaes" -0xb8a8: "rwaess" -0xb8a9: "rwaeng" -0xb8aa: "rwaej" -0xb8ab: "rwaec" -0xb8ac: "rwaek" -0xb8ad: "rwaet" -0xb8ae: "rwaep" -0xb8af: "rwaeh" -0xb8b0: "roe" -0xb8b1: "roeg" -0xb8b2: "roegg" -0xb8b3: "roegs" -0xb8b4: "roen" -0xb8b5: "roenj" -0xb8b6: "roenh" -0xb8b7: "roed" -0xb8b8: "roel" -0xb8b9: "roelg" -0xb8ba: "roelm" -0xb8bb: "roelb" -0xb8bc: "roels" -0xb8bd: "roelt" -0xb8be: "roelp" -0xb8bf: "roelh" -0xb8c0: "roem" -0xb8c1: "roeb" -0xb8c2: "roebs" -0xb8c3: "roes" -0xb8c4: "roess" -0xb8c5: "roeng" -0xb8c6: "roej" -0xb8c7: "roec" -0xb8c8: "roek" -0xb8c9: "roet" -0xb8ca: "roep" -0xb8cb: "roeh" -0xb8cc: "ryo" -0xb8cd: "ryog" -0xb8ce: "ryogg" -0xb8cf: "ryogs" -0xb8d0: "ryon" -0xb8d1: "ryonj" -0xb8d2: "ryonh" -0xb8d3: "ryod" -0xb8d4: "ryol" -0xb8d5: "ryolg" -0xb8d6: "ryolm" -0xb8d7: "ryolb" -0xb8d8: "ryols" -0xb8d9: "ryolt" -0xb8da: "ryolp" -0xb8db: "ryolh" -0xb8dc: "ryom" -0xb8dd: "ryob" -0xb8de: "ryobs" -0xb8df: "ryos" -0xb8e0: "ryoss" -0xb8e1: "ryong" -0xb8e2: "ryoj" -0xb8e3: "ryoc" -0xb8e4: "ryok" -0xb8e5: "ryot" -0xb8e6: "ryop" -0xb8e7: "ryoh" -0xb8e8: "ru" -0xb8e9: "rug" -0xb8ea: "rugg" -0xb8eb: "rugs" -0xb8ec: "run" -0xb8ed: "runj" -0xb8ee: "runh" -0xb8ef: "rud" -0xb8f0: "rul" -0xb8f1: "rulg" -0xb8f2: "rulm" -0xb8f3: "rulb" -0xb8f4: "ruls" -0xb8f5: "rult" -0xb8f6: "rulp" -0xb8f7: "rulh" -0xb8f8: "rum" -0xb8f9: "rub" -0xb8fa: "rubs" -0xb8fb: "rus" -0xb8fc: "russ" -0xb8fd: "rung" -0xb8fe: "ruj" -0xb8ff: "ruc" -/* x0b9 */ -0xb900: "ruk" -0xb901: "rut" -0xb902: "rup" -0xb903: "ruh" -0xb904: "rweo" -0xb905: "rweog" -0xb906: "rweogg" -0xb907: "rweogs" -0xb908: "rweon" -0xb909: "rweonj" -0xb90a: "rweonh" -0xb90b: "rweod" -0xb90c: "rweol" -0xb90d: "rweolg" -0xb90e: "rweolm" -0xb90f: "rweolb" -0xb910: "rweols" -0xb911: "rweolt" -0xb912: "rweolp" -0xb913: "rweolh" -0xb914: "rweom" -0xb915: "rweob" -0xb916: "rweobs" -0xb917: "rweos" -0xb918: "rweoss" -0xb919: "rweong" -0xb91a: "rweoj" -0xb91b: "rweoc" -0xb91c: "rweok" -0xb91d: "rweot" -0xb91e: "rweop" -0xb91f: "rweoh" -0xb920: "rwe" -0xb921: "rweg" -0xb922: "rwegg" -0xb923: "rwegs" -0xb924: "rwen" -0xb925: "rwenj" -0xb926: "rwenh" -0xb927: "rwed" -0xb928: "rwel" -0xb929: "rwelg" -0xb92a: "rwelm" -0xb92b: "rwelb" -0xb92c: "rwels" -0xb92d: "rwelt" -0xb92e: "rwelp" -0xb92f: "rwelh" -0xb930: "rwem" -0xb931: "rweb" -0xb932: "rwebs" -0xb933: "rwes" -0xb934: "rwess" -0xb935: "rweng" -0xb936: "rwej" -0xb937: "rwec" -0xb938: "rwek" -0xb939: "rwet" -0xb93a: "rwep" -0xb93b: "rweh" -0xb93c: "rwi" -0xb93d: "rwig" -0xb93e: "rwigg" -0xb93f: "rwigs" -0xb940: "rwin" -0xb941: "rwinj" -0xb942: "rwinh" -0xb943: "rwid" -0xb944: "rwil" -0xb945: "rwilg" -0xb946: "rwilm" -0xb947: "rwilb" -0xb948: "rwils" -0xb949: "rwilt" -0xb94a: "rwilp" -0xb94b: "rwilh" -0xb94c: "rwim" -0xb94d: "rwib" -0xb94e: "rwibs" -0xb94f: "rwis" -0xb950: "rwiss" -0xb951: "rwing" -0xb952: "rwij" -0xb953: "rwic" -0xb954: "rwik" -0xb955: "rwit" -0xb956: "rwip" -0xb957: "rwih" -0xb958: "ryu" -0xb959: "ryug" -0xb95a: "ryugg" -0xb95b: "ryugs" -0xb95c: "ryun" -0xb95d: "ryunj" -0xb95e: "ryunh" -0xb95f: "ryud" -0xb960: "ryul" -0xb961: "ryulg" -0xb962: "ryulm" -0xb963: "ryulb" -0xb964: "ryuls" -0xb965: "ryult" -0xb966: "ryulp" -0xb967: "ryulh" -0xb968: "ryum" -0xb969: "ryub" -0xb96a: "ryubs" -0xb96b: "ryus" -0xb96c: "ryuss" -0xb96d: "ryung" -0xb96e: "ryuj" -0xb96f: "ryuc" -0xb970: "ryuk" -0xb971: "ryut" -0xb972: "ryup" -0xb973: "ryuh" -0xb974: "reu" -0xb975: "reug" -0xb976: "reugg" -0xb977: "reugs" -0xb978: "reun" -0xb979: "reunj" -0xb97a: "reunh" -0xb97b: "reud" -0xb97c: "reul" -0xb97d: "reulg" -0xb97e: "reulm" -0xb97f: "reulb" -0xb980: "reuls" -0xb981: "reult" -0xb982: "reulp" -0xb983: "reulh" -0xb984: "reum" -0xb985: "reub" -0xb986: "reubs" -0xb987: "reus" -0xb988: "reuss" -0xb989: "reung" -0xb98a: "reuj" -0xb98b: "reuc" -0xb98c: "reuk" -0xb98d: "reut" -0xb98e: "reup" -0xb98f: "reuh" -0xb990: "ryi" -0xb991: "ryig" -0xb992: "ryigg" -0xb993: "ryigs" -0xb994: "ryin" -0xb995: "ryinj" -0xb996: "ryinh" -0xb997: "ryid" -0xb998: "ryil" -0xb999: "ryilg" -0xb99a: "ryilm" -0xb99b: "ryilb" -0xb99c: "ryils" -0xb99d: "ryilt" -0xb99e: "ryilp" -0xb99f: "ryilh" -0xb9a0: "ryim" -0xb9a1: "ryib" -0xb9a2: "ryibs" -0xb9a3: "ryis" -0xb9a4: "ryiss" -0xb9a5: "rying" -0xb9a6: "ryij" -0xb9a7: "ryic" -0xb9a8: "ryik" -0xb9a9: "ryit" -0xb9aa: "ryip" -0xb9ab: "ryih" -0xb9ac: "ri" -0xb9ad: "rig" -0xb9ae: "rigg" -0xb9af: "rigs" -0xb9b0: "rin" -0xb9b1: "rinj" -0xb9b2: "rinh" -0xb9b3: "rid" -0xb9b4: "ril" -0xb9b5: "rilg" -0xb9b6: "rilm" -0xb9b7: "rilb" -0xb9b8: "rils" -0xb9b9: "rilt" -0xb9ba: "rilp" -0xb9bb: "rilh" -0xb9bc: "rim" -0xb9bd: "rib" -0xb9be: "ribs" -0xb9bf: "ris" -0xb9c0: "riss" -0xb9c1: "ring" -0xb9c2: "rij" -0xb9c3: "ric" -0xb9c4: "rik" -0xb9c5: "rit" -0xb9c6: "rip" -0xb9c7: "rih" -0xb9c8: "ma" -0xb9c9: "mag" -0xb9ca: "magg" -0xb9cb: "mags" -0xb9cc: "man" -0xb9cd: "manj" -0xb9ce: "manh" -0xb9cf: "mad" -0xb9d0: "mal" -0xb9d1: "malg" -0xb9d2: "malm" -0xb9d3: "malb" -0xb9d4: "mals" -0xb9d5: "malt" -0xb9d6: "malp" -0xb9d7: "malh" -0xb9d8: "mam" -0xb9d9: "mab" -0xb9da: "mabs" -0xb9db: "mas" -0xb9dc: "mass" -0xb9dd: "mang" -0xb9de: "maj" -0xb9df: "mac" -0xb9e0: "mak" -0xb9e1: "mat" -0xb9e2: "map" -0xb9e3: "mah" -0xb9e4: "mae" -0xb9e5: "maeg" -0xb9e6: "maegg" -0xb9e7: "maegs" -0xb9e8: "maen" -0xb9e9: "maenj" -0xb9ea: "maenh" -0xb9eb: "maed" -0xb9ec: "mael" -0xb9ed: "maelg" -0xb9ee: "maelm" -0xb9ef: "maelb" -0xb9f0: "maels" -0xb9f1: "maelt" -0xb9f2: "maelp" -0xb9f3: "maelh" -0xb9f4: "maem" -0xb9f5: "maeb" -0xb9f6: "maebs" -0xb9f7: "maes" -0xb9f8: "maess" -0xb9f9: "maeng" -0xb9fa: "maej" -0xb9fb: "maec" -0xb9fc: "maek" -0xb9fd: "maet" -0xb9fe: "maep" -0xb9ff: "maeh" -/* x0ba */ -0xba00: "mya" -0xba01: "myag" -0xba02: "myagg" -0xba03: "myags" -0xba04: "myan" -0xba05: "myanj" -0xba06: "myanh" -0xba07: "myad" -0xba08: "myal" -0xba09: "myalg" -0xba0a: "myalm" -0xba0b: "myalb" -0xba0c: "myals" -0xba0d: "myalt" -0xba0e: "myalp" -0xba0f: "myalh" -0xba10: "myam" -0xba11: "myab" -0xba12: "myabs" -0xba13: "myas" -0xba14: "myass" -0xba15: "myang" -0xba16: "myaj" -0xba17: "myac" -0xba18: "myak" -0xba19: "myat" -0xba1a: "myap" -0xba1b: "myah" -0xba1c: "myae" -0xba1d: "myaeg" -0xba1e: "myaegg" -0xba1f: "myaegs" -0xba20: "myaen" -0xba21: "myaenj" -0xba22: "myaenh" -0xba23: "myaed" -0xba24: "myael" -0xba25: "myaelg" -0xba26: "myaelm" -0xba27: "myaelb" -0xba28: "myaels" -0xba29: "myaelt" -0xba2a: "myaelp" -0xba2b: "myaelh" -0xba2c: "myaem" -0xba2d: "myaeb" -0xba2e: "myaebs" -0xba2f: "myaes" -0xba30: "myaess" -0xba31: "myaeng" -0xba32: "myaej" -0xba33: "myaec" -0xba34: "myaek" -0xba35: "myaet" -0xba36: "myaep" -0xba37: "myaeh" -0xba38: "meo" -0xba39: "meog" -0xba3a: "meogg" -0xba3b: "meogs" -0xba3c: "meon" -0xba3d: "meonj" -0xba3e: "meonh" -0xba3f: "meod" -0xba40: "meol" -0xba41: "meolg" -0xba42: "meolm" -0xba43: "meolb" -0xba44: "meols" -0xba45: "meolt" -0xba46: "meolp" -0xba47: "meolh" -0xba48: "meom" -0xba49: "meob" -0xba4a: "meobs" -0xba4b: "meos" -0xba4c: "meoss" -0xba4d: "meong" -0xba4e: "meoj" -0xba4f: "meoc" -0xba50: "meok" -0xba51: "meot" -0xba52: "meop" -0xba53: "meoh" -0xba54: "me" -0xba55: "meg" -0xba56: "megg" -0xba57: "megs" -0xba58: "men" -0xba59: "menj" -0xba5a: "menh" -0xba5b: "med" -0xba5c: "mel" -0xba5d: "melg" -0xba5e: "melm" -0xba5f: "melb" -0xba60: "mels" -0xba61: "melt" -0xba62: "melp" -0xba63: "melh" -0xba64: "mem" -0xba65: "meb" -0xba66: "mebs" -0xba67: "mes" -0xba68: "mess" -0xba69: "meng" -0xba6a: "mej" -0xba6b: "mec" -0xba6c: "mek" -0xba6d: "met" -0xba6e: "mep" -0xba6f: "meh" -0xba70: "myeo" -0xba71: "myeog" -0xba72: "myeogg" -0xba73: "myeogs" -0xba74: "myeon" -0xba75: "myeonj" -0xba76: "myeonh" -0xba77: "myeod" -0xba78: "myeol" -0xba79: "myeolg" -0xba7a: "myeolm" -0xba7b: "myeolb" -0xba7c: "myeols" -0xba7d: "myeolt" -0xba7e: "myeolp" -0xba7f: "myeolh" -0xba80: "myeom" -0xba81: "myeob" -0xba82: "myeobs" -0xba83: "myeos" -0xba84: "myeoss" -0xba85: "myeong" -0xba86: "myeoj" -0xba87: "myeoc" -0xba88: "myeok" -0xba89: "myeot" -0xba8a: "myeop" -0xba8b: "myeoh" -0xba8c: "mye" -0xba8d: "myeg" -0xba8e: "myegg" -0xba8f: "myegs" -0xba90: "myen" -0xba91: "myenj" -0xba92: "myenh" -0xba93: "myed" -0xba94: "myel" -0xba95: "myelg" -0xba96: "myelm" -0xba97: "myelb" -0xba98: "myels" -0xba99: "myelt" -0xba9a: "myelp" -0xba9b: "myelh" -0xba9c: "myem" -0xba9d: "myeb" -0xba9e: "myebs" -0xba9f: "myes" -0xbaa0: "myess" -0xbaa1: "myeng" -0xbaa2: "myej" -0xbaa3: "myec" -0xbaa4: "myek" -0xbaa5: "myet" -0xbaa6: "myep" -0xbaa7: "myeh" -0xbaa8: "mo" -0xbaa9: "mog" -0xbaaa: "mogg" -0xbaab: "mogs" -0xbaac: "mon" -0xbaad: "monj" -0xbaae: "monh" -0xbaaf: "mod" -0xbab0: "mol" -0xbab1: "molg" -0xbab2: "molm" -0xbab3: "molb" -0xbab4: "mols" -0xbab5: "molt" -0xbab6: "molp" -0xbab7: "molh" -0xbab8: "mom" -0xbab9: "mob" -0xbaba: "mobs" -0xbabb: "mos" -0xbabc: "moss" -0xbabd: "mong" -0xbabe: "moj" -0xbabf: "moc" -0xbac0: "mok" -0xbac1: "mot" -0xbac2: "mop" -0xbac3: "moh" -0xbac4: "mwa" -0xbac5: "mwag" -0xbac6: "mwagg" -0xbac7: "mwags" -0xbac8: "mwan" -0xbac9: "mwanj" -0xbaca: "mwanh" -0xbacb: "mwad" -0xbacc: "mwal" -0xbacd: "mwalg" -0xbace: "mwalm" -0xbacf: "mwalb" -0xbad0: "mwals" -0xbad1: "mwalt" -0xbad2: "mwalp" -0xbad3: "mwalh" -0xbad4: "mwam" -0xbad5: "mwab" -0xbad6: "mwabs" -0xbad7: "mwas" -0xbad8: "mwass" -0xbad9: "mwang" -0xbada: "mwaj" -0xbadb: "mwac" -0xbadc: "mwak" -0xbadd: "mwat" -0xbade: "mwap" -0xbadf: "mwah" -0xbae0: "mwae" -0xbae1: "mwaeg" -0xbae2: "mwaegg" -0xbae3: "mwaegs" -0xbae4: "mwaen" -0xbae5: "mwaenj" -0xbae6: "mwaenh" -0xbae7: "mwaed" -0xbae8: "mwael" -0xbae9: "mwaelg" -0xbaea: "mwaelm" -0xbaeb: "mwaelb" -0xbaec: "mwaels" -0xbaed: "mwaelt" -0xbaee: "mwaelp" -0xbaef: "mwaelh" -0xbaf0: "mwaem" -0xbaf1: "mwaeb" -0xbaf2: "mwaebs" -0xbaf3: "mwaes" -0xbaf4: "mwaess" -0xbaf5: "mwaeng" -0xbaf6: "mwaej" -0xbaf7: "mwaec" -0xbaf8: "mwaek" -0xbaf9: "mwaet" -0xbafa: "mwaep" -0xbafb: "mwaeh" -0xbafc: "moe" -0xbafd: "moeg" -0xbafe: "moegg" -0xbaff: "moegs" -/* x0bb */ -0xbb00: "moen" -0xbb01: "moenj" -0xbb02: "moenh" -0xbb03: "moed" -0xbb04: "moel" -0xbb05: "moelg" -0xbb06: "moelm" -0xbb07: "moelb" -0xbb08: "moels" -0xbb09: "moelt" -0xbb0a: "moelp" -0xbb0b: "moelh" -0xbb0c: "moem" -0xbb0d: "moeb" -0xbb0e: "moebs" -0xbb0f: "moes" -0xbb10: "moess" -0xbb11: "moeng" -0xbb12: "moej" -0xbb13: "moec" -0xbb14: "moek" -0xbb15: "moet" -0xbb16: "moep" -0xbb17: "moeh" -0xbb18: "myo" -0xbb19: "myog" -0xbb1a: "myogg" -0xbb1b: "myogs" -0xbb1c: "myon" -0xbb1d: "myonj" -0xbb1e: "myonh" -0xbb1f: "myod" -0xbb20: "myol" -0xbb21: "myolg" -0xbb22: "myolm" -0xbb23: "myolb" -0xbb24: "myols" -0xbb25: "myolt" -0xbb26: "myolp" -0xbb27: "myolh" -0xbb28: "myom" -0xbb29: "myob" -0xbb2a: "myobs" -0xbb2b: "myos" -0xbb2c: "myoss" -0xbb2d: "myong" -0xbb2e: "myoj" -0xbb2f: "myoc" -0xbb30: "myok" -0xbb31: "myot" -0xbb32: "myop" -0xbb33: "myoh" -0xbb34: "mu" -0xbb35: "mug" -0xbb36: "mugg" -0xbb37: "mugs" -0xbb38: "mun" -0xbb39: "munj" -0xbb3a: "munh" -0xbb3b: "mud" -0xbb3c: "mul" -0xbb3d: "mulg" -0xbb3e: "mulm" -0xbb3f: "mulb" -0xbb40: "muls" -0xbb41: "mult" -0xbb42: "mulp" -0xbb43: "mulh" -0xbb44: "mum" -0xbb45: "mub" -0xbb46: "mubs" -0xbb47: "mus" -0xbb48: "muss" -0xbb49: "mung" -0xbb4a: "muj" -0xbb4b: "muc" -0xbb4c: "muk" -0xbb4d: "mut" -0xbb4e: "mup" -0xbb4f: "muh" -0xbb50: "mweo" -0xbb51: "mweog" -0xbb52: "mweogg" -0xbb53: "mweogs" -0xbb54: "mweon" -0xbb55: "mweonj" -0xbb56: "mweonh" -0xbb57: "mweod" -0xbb58: "mweol" -0xbb59: "mweolg" -0xbb5a: "mweolm" -0xbb5b: "mweolb" -0xbb5c: "mweols" -0xbb5d: "mweolt" -0xbb5e: "mweolp" -0xbb5f: "mweolh" -0xbb60: "mweom" -0xbb61: "mweob" -0xbb62: "mweobs" -0xbb63: "mweos" -0xbb64: "mweoss" -0xbb65: "mweong" -0xbb66: "mweoj" -0xbb67: "mweoc" -0xbb68: "mweok" -0xbb69: "mweot" -0xbb6a: "mweop" -0xbb6b: "mweoh" -0xbb6c: "mwe" -0xbb6d: "mweg" -0xbb6e: "mwegg" -0xbb6f: "mwegs" -0xbb70: "mwen" -0xbb71: "mwenj" -0xbb72: "mwenh" -0xbb73: "mwed" -0xbb74: "mwel" -0xbb75: "mwelg" -0xbb76: "mwelm" -0xbb77: "mwelb" -0xbb78: "mwels" -0xbb79: "mwelt" -0xbb7a: "mwelp" -0xbb7b: "mwelh" -0xbb7c: "mwem" -0xbb7d: "mweb" -0xbb7e: "mwebs" -0xbb7f: "mwes" -0xbb80: "mwess" -0xbb81: "mweng" -0xbb82: "mwej" -0xbb83: "mwec" -0xbb84: "mwek" -0xbb85: "mwet" -0xbb86: "mwep" -0xbb87: "mweh" -0xbb88: "mwi" -0xbb89: "mwig" -0xbb8a: "mwigg" -0xbb8b: "mwigs" -0xbb8c: "mwin" -0xbb8d: "mwinj" -0xbb8e: "mwinh" -0xbb8f: "mwid" -0xbb90: "mwil" -0xbb91: "mwilg" -0xbb92: "mwilm" -0xbb93: "mwilb" -0xbb94: "mwils" -0xbb95: "mwilt" -0xbb96: "mwilp" -0xbb97: "mwilh" -0xbb98: "mwim" -0xbb99: "mwib" -0xbb9a: "mwibs" -0xbb9b: "mwis" -0xbb9c: "mwiss" -0xbb9d: "mwing" -0xbb9e: "mwij" -0xbb9f: "mwic" -0xbba0: "mwik" -0xbba1: "mwit" -0xbba2: "mwip" -0xbba3: "mwih" -0xbba4: "myu" -0xbba5: "myug" -0xbba6: "myugg" -0xbba7: "myugs" -0xbba8: "myun" -0xbba9: "myunj" -0xbbaa: "myunh" -0xbbab: "myud" -0xbbac: "myul" -0xbbad: "myulg" -0xbbae: "myulm" -0xbbaf: "myulb" -0xbbb0: "myuls" -0xbbb1: "myult" -0xbbb2: "myulp" -0xbbb3: "myulh" -0xbbb4: "myum" -0xbbb5: "myub" -0xbbb6: "myubs" -0xbbb7: "myus" -0xbbb8: "myuss" -0xbbb9: "myung" -0xbbba: "myuj" -0xbbbb: "myuc" -0xbbbc: "myuk" -0xbbbd: "myut" -0xbbbe: "myup" -0xbbbf: "myuh" -0xbbc0: "meu" -0xbbc1: "meug" -0xbbc2: "meugg" -0xbbc3: "meugs" -0xbbc4: "meun" -0xbbc5: "meunj" -0xbbc6: "meunh" -0xbbc7: "meud" -0xbbc8: "meul" -0xbbc9: "meulg" -0xbbca: "meulm" -0xbbcb: "meulb" -0xbbcc: "meuls" -0xbbcd: "meult" -0xbbce: "meulp" -0xbbcf: "meulh" -0xbbd0: "meum" -0xbbd1: "meub" -0xbbd2: "meubs" -0xbbd3: "meus" -0xbbd4: "meuss" -0xbbd5: "meung" -0xbbd6: "meuj" -0xbbd7: "meuc" -0xbbd8: "meuk" -0xbbd9: "meut" -0xbbda: "meup" -0xbbdb: "meuh" -0xbbdc: "myi" -0xbbdd: "myig" -0xbbde: "myigg" -0xbbdf: "myigs" -0xbbe0: "myin" -0xbbe1: "myinj" -0xbbe2: "myinh" -0xbbe3: "myid" -0xbbe4: "myil" -0xbbe5: "myilg" -0xbbe6: "myilm" -0xbbe7: "myilb" -0xbbe8: "myils" -0xbbe9: "myilt" -0xbbea: "myilp" -0xbbeb: "myilh" -0xbbec: "myim" -0xbbed: "myib" -0xbbee: "myibs" -0xbbef: "myis" -0xbbf0: "myiss" -0xbbf1: "mying" -0xbbf2: "myij" -0xbbf3: "myic" -0xbbf4: "myik" -0xbbf5: "myit" -0xbbf6: "myip" -0xbbf7: "myih" -0xbbf8: "mi" -0xbbf9: "mig" -0xbbfa: "migg" -0xbbfb: "migs" -0xbbfc: "min" -0xbbfd: "minj" -0xbbfe: "minh" -0xbbff: "mid" -/* x0bc */ -0xbc00: "mil" -0xbc01: "milg" -0xbc02: "milm" -0xbc03: "milb" -0xbc04: "mils" -0xbc05: "milt" -0xbc06: "milp" -0xbc07: "milh" -0xbc08: "mim" -0xbc09: "mib" -0xbc0a: "mibs" -0xbc0b: "mis" -0xbc0c: "miss" -0xbc0d: "ming" -0xbc0e: "mij" -0xbc0f: "mic" -0xbc10: "mik" -0xbc11: "mit" -0xbc12: "mip" -0xbc13: "mih" -0xbc14: "ba" -0xbc15: "bag" -0xbc16: "bagg" -0xbc17: "bags" -0xbc18: "ban" -0xbc19: "banj" -0xbc1a: "banh" -0xbc1b: "bad" -0xbc1c: "bal" -0xbc1d: "balg" -0xbc1e: "balm" -0xbc1f: "balb" -0xbc20: "bals" -0xbc21: "balt" -0xbc22: "balp" -0xbc23: "balh" -0xbc24: "bam" -0xbc25: "bab" -0xbc26: "babs" -0xbc27: "bas" -0xbc28: "bass" -0xbc29: "bang" -0xbc2a: "baj" -0xbc2b: "bac" -0xbc2c: "bak" -0xbc2d: "bat" -0xbc2e: "bap" -0xbc2f: "bah" -0xbc30: "bae" -0xbc31: "baeg" -0xbc32: "baegg" -0xbc33: "baegs" -0xbc34: "baen" -0xbc35: "baenj" -0xbc36: "baenh" -0xbc37: "baed" -0xbc38: "bael" -0xbc39: "baelg" -0xbc3a: "baelm" -0xbc3b: "baelb" -0xbc3c: "baels" -0xbc3d: "baelt" -0xbc3e: "baelp" -0xbc3f: "baelh" -0xbc40: "baem" -0xbc41: "baeb" -0xbc42: "baebs" -0xbc43: "baes" -0xbc44: "baess" -0xbc45: "baeng" -0xbc46: "baej" -0xbc47: "baec" -0xbc48: "baek" -0xbc49: "baet" -0xbc4a: "baep" -0xbc4b: "baeh" -0xbc4c: "bya" -0xbc4d: "byag" -0xbc4e: "byagg" -0xbc4f: "byags" -0xbc50: "byan" -0xbc51: "byanj" -0xbc52: "byanh" -0xbc53: "byad" -0xbc54: "byal" -0xbc55: "byalg" -0xbc56: "byalm" -0xbc57: "byalb" -0xbc58: "byals" -0xbc59: "byalt" -0xbc5a: "byalp" -0xbc5b: "byalh" -0xbc5c: "byam" -0xbc5d: "byab" -0xbc5e: "byabs" -0xbc5f: "byas" -0xbc60: "byass" -0xbc61: "byang" -0xbc62: "byaj" -0xbc63: "byac" -0xbc64: "byak" -0xbc65: "byat" -0xbc66: "byap" -0xbc67: "byah" -0xbc68: "byae" -0xbc69: "byaeg" -0xbc6a: "byaegg" -0xbc6b: "byaegs" -0xbc6c: "byaen" -0xbc6d: "byaenj" -0xbc6e: "byaenh" -0xbc6f: "byaed" -0xbc70: "byael" -0xbc71: "byaelg" -0xbc72: "byaelm" -0xbc73: "byaelb" -0xbc74: "byaels" -0xbc75: "byaelt" -0xbc76: "byaelp" -0xbc77: "byaelh" -0xbc78: "byaem" -0xbc79: "byaeb" -0xbc7a: "byaebs" -0xbc7b: "byaes" -0xbc7c: "byaess" -0xbc7d: "byaeng" -0xbc7e: "byaej" -0xbc7f: "byaec" -0xbc80: "byaek" -0xbc81: "byaet" -0xbc82: "byaep" -0xbc83: "byaeh" -0xbc84: "beo" -0xbc85: "beog" -0xbc86: "beogg" -0xbc87: "beogs" -0xbc88: "beon" -0xbc89: "beonj" -0xbc8a: "beonh" -0xbc8b: "beod" -0xbc8c: "beol" -0xbc8d: "beolg" -0xbc8e: "beolm" -0xbc8f: "beolb" -0xbc90: "beols" -0xbc91: "beolt" -0xbc92: "beolp" -0xbc93: "beolh" -0xbc94: "beom" -0xbc95: "beob" -0xbc96: "beobs" -0xbc97: "beos" -0xbc98: "beoss" -0xbc99: "beong" -0xbc9a: "beoj" -0xbc9b: "beoc" -0xbc9c: "beok" -0xbc9d: "beot" -0xbc9e: "beop" -0xbc9f: "beoh" -0xbca0: "be" -0xbca1: "beg" -0xbca2: "begg" -0xbca3: "begs" -0xbca4: "ben" -0xbca5: "benj" -0xbca6: "benh" -0xbca7: "bed" -0xbca8: "bel" -0xbca9: "belg" -0xbcaa: "belm" -0xbcab: "belb" -0xbcac: "bels" -0xbcad: "belt" -0xbcae: "belp" -0xbcaf: "belh" -0xbcb0: "bem" -0xbcb1: "beb" -0xbcb2: "bebs" -0xbcb3: "bes" -0xbcb4: "bess" -0xbcb5: "beng" -0xbcb6: "bej" -0xbcb7: "bec" -0xbcb8: "bek" -0xbcb9: "bet" -0xbcba: "bep" -0xbcbb: "beh" -0xbcbc: "byeo" -0xbcbd: "byeog" -0xbcbe: "byeogg" -0xbcbf: "byeogs" -0xbcc0: "byeon" -0xbcc1: "byeonj" -0xbcc2: "byeonh" -0xbcc3: "byeod" -0xbcc4: "byeol" -0xbcc5: "byeolg" -0xbcc6: "byeolm" -0xbcc7: "byeolb" -0xbcc8: "byeols" -0xbcc9: "byeolt" -0xbcca: "byeolp" -0xbccb: "byeolh" -0xbccc: "byeom" -0xbccd: "byeob" -0xbcce: "byeobs" -0xbccf: "byeos" -0xbcd0: "byeoss" -0xbcd1: "byeong" -0xbcd2: "byeoj" -0xbcd3: "byeoc" -0xbcd4: "byeok" -0xbcd5: "byeot" -0xbcd6: "byeop" -0xbcd7: "byeoh" -0xbcd8: "bye" -0xbcd9: "byeg" -0xbcda: "byegg" -0xbcdb: "byegs" -0xbcdc: "byen" -0xbcdd: "byenj" -0xbcde: "byenh" -0xbcdf: "byed" -0xbce0: "byel" -0xbce1: "byelg" -0xbce2: "byelm" -0xbce3: "byelb" -0xbce4: "byels" -0xbce5: "byelt" -0xbce6: "byelp" -0xbce7: "byelh" -0xbce8: "byem" -0xbce9: "byeb" -0xbcea: "byebs" -0xbceb: "byes" -0xbcec: "byess" -0xbced: "byeng" -0xbcee: "byej" -0xbcef: "byec" -0xbcf0: "byek" -0xbcf1: "byet" -0xbcf2: "byep" -0xbcf3: "byeh" -0xbcf4: "bo" -0xbcf5: "bog" -0xbcf6: "bogg" -0xbcf7: "bogs" -0xbcf8: "bon" -0xbcf9: "bonj" -0xbcfa: "bonh" -0xbcfb: "bod" -0xbcfc: "bol" -0xbcfd: "bolg" -0xbcfe: "bolm" -0xbcff: "bolb" -/* x0bd */ -0xbd00: "bols" -0xbd01: "bolt" -0xbd02: "bolp" -0xbd03: "bolh" -0xbd04: "bom" -0xbd05: "bob" -0xbd06: "bobs" -0xbd07: "bos" -0xbd08: "boss" -0xbd09: "bong" -0xbd0a: "boj" -0xbd0b: "boc" -0xbd0c: "bok" -0xbd0d: "bot" -0xbd0e: "bop" -0xbd0f: "boh" -0xbd10: "bwa" -0xbd11: "bwag" -0xbd12: "bwagg" -0xbd13: "bwags" -0xbd14: "bwan" -0xbd15: "bwanj" -0xbd16: "bwanh" -0xbd17: "bwad" -0xbd18: "bwal" -0xbd19: "bwalg" -0xbd1a: "bwalm" -0xbd1b: "bwalb" -0xbd1c: "bwals" -0xbd1d: "bwalt" -0xbd1e: "bwalp" -0xbd1f: "bwalh" -0xbd20: "bwam" -0xbd21: "bwab" -0xbd22: "bwabs" -0xbd23: "bwas" -0xbd24: "bwass" -0xbd25: "bwang" -0xbd26: "bwaj" -0xbd27: "bwac" -0xbd28: "bwak" -0xbd29: "bwat" -0xbd2a: "bwap" -0xbd2b: "bwah" -0xbd2c: "bwae" -0xbd2d: "bwaeg" -0xbd2e: "bwaegg" -0xbd2f: "bwaegs" -0xbd30: "bwaen" -0xbd31: "bwaenj" -0xbd32: "bwaenh" -0xbd33: "bwaed" -0xbd34: "bwael" -0xbd35: "bwaelg" -0xbd36: "bwaelm" -0xbd37: "bwaelb" -0xbd38: "bwaels" -0xbd39: "bwaelt" -0xbd3a: "bwaelp" -0xbd3b: "bwaelh" -0xbd3c: "bwaem" -0xbd3d: "bwaeb" -0xbd3e: "bwaebs" -0xbd3f: "bwaes" -0xbd40: "bwaess" -0xbd41: "bwaeng" -0xbd42: "bwaej" -0xbd43: "bwaec" -0xbd44: "bwaek" -0xbd45: "bwaet" -0xbd46: "bwaep" -0xbd47: "bwaeh" -0xbd48: "boe" -0xbd49: "boeg" -0xbd4a: "boegg" -0xbd4b: "boegs" -0xbd4c: "boen" -0xbd4d: "boenj" -0xbd4e: "boenh" -0xbd4f: "boed" -0xbd50: "boel" -0xbd51: "boelg" -0xbd52: "boelm" -0xbd53: "boelb" -0xbd54: "boels" -0xbd55: "boelt" -0xbd56: "boelp" -0xbd57: "boelh" -0xbd58: "boem" -0xbd59: "boeb" -0xbd5a: "boebs" -0xbd5b: "boes" -0xbd5c: "boess" -0xbd5d: "boeng" -0xbd5e: "boej" -0xbd5f: "boec" -0xbd60: "boek" -0xbd61: "boet" -0xbd62: "boep" -0xbd63: "boeh" -0xbd64: "byo" -0xbd65: "byog" -0xbd66: "byogg" -0xbd67: "byogs" -0xbd68: "byon" -0xbd69: "byonj" -0xbd6a: "byonh" -0xbd6b: "byod" -0xbd6c: "byol" -0xbd6d: "byolg" -0xbd6e: "byolm" -0xbd6f: "byolb" -0xbd70: "byols" -0xbd71: "byolt" -0xbd72: "byolp" -0xbd73: "byolh" -0xbd74: "byom" -0xbd75: "byob" -0xbd76: "byobs" -0xbd77: "byos" -0xbd78: "byoss" -0xbd79: "byong" -0xbd7a: "byoj" -0xbd7b: "byoc" -0xbd7c: "byok" -0xbd7d: "byot" -0xbd7e: "byop" -0xbd7f: "byoh" -0xbd80: "bu" -0xbd81: "bug" -0xbd82: "bugg" -0xbd83: "bugs" -0xbd84: "bun" -0xbd85: "bunj" -0xbd86: "bunh" -0xbd87: "bud" -0xbd88: "bul" -0xbd89: "bulg" -0xbd8a: "bulm" -0xbd8b: "bulb" -0xbd8c: "buls" -0xbd8d: "bult" -0xbd8e: "bulp" -0xbd8f: "bulh" -0xbd90: "bum" -0xbd91: "bub" -0xbd92: "bubs" -0xbd93: "bus" -0xbd94: "buss" -0xbd95: "bung" -0xbd96: "buj" -0xbd97: "buc" -0xbd98: "buk" -0xbd99: "but" -0xbd9a: "bup" -0xbd9b: "buh" -0xbd9c: "bweo" -0xbd9d: "bweog" -0xbd9e: "bweogg" -0xbd9f: "bweogs" -0xbda0: "bweon" -0xbda1: "bweonj" -0xbda2: "bweonh" -0xbda3: "bweod" -0xbda4: "bweol" -0xbda5: "bweolg" -0xbda6: "bweolm" -0xbda7: "bweolb" -0xbda8: "bweols" -0xbda9: "bweolt" -0xbdaa: "bweolp" -0xbdab: "bweolh" -0xbdac: "bweom" -0xbdad: "bweob" -0xbdae: "bweobs" -0xbdaf: "bweos" -0xbdb0: "bweoss" -0xbdb1: "bweong" -0xbdb2: "bweoj" -0xbdb3: "bweoc" -0xbdb4: "bweok" -0xbdb5: "bweot" -0xbdb6: "bweop" -0xbdb7: "bweoh" -0xbdb8: "bwe" -0xbdb9: "bweg" -0xbdba: "bwegg" -0xbdbb: "bwegs" -0xbdbc: "bwen" -0xbdbd: "bwenj" -0xbdbe: "bwenh" -0xbdbf: "bwed" -0xbdc0: "bwel" -0xbdc1: "bwelg" -0xbdc2: "bwelm" -0xbdc3: "bwelb" -0xbdc4: "bwels" -0xbdc5: "bwelt" -0xbdc6: "bwelp" -0xbdc7: "bwelh" -0xbdc8: "bwem" -0xbdc9: "bweb" -0xbdca: "bwebs" -0xbdcb: "bwes" -0xbdcc: "bwess" -0xbdcd: "bweng" -0xbdce: "bwej" -0xbdcf: "bwec" -0xbdd0: "bwek" -0xbdd1: "bwet" -0xbdd2: "bwep" -0xbdd3: "bweh" -0xbdd4: "bwi" -0xbdd5: "bwig" -0xbdd6: "bwigg" -0xbdd7: "bwigs" -0xbdd8: "bwin" -0xbdd9: "bwinj" -0xbdda: "bwinh" -0xbddb: "bwid" -0xbddc: "bwil" -0xbddd: "bwilg" -0xbdde: "bwilm" -0xbddf: "bwilb" -0xbde0: "bwils" -0xbde1: "bwilt" -0xbde2: "bwilp" -0xbde3: "bwilh" -0xbde4: "bwim" -0xbde5: "bwib" -0xbde6: "bwibs" -0xbde7: "bwis" -0xbde8: "bwiss" -0xbde9: "bwing" -0xbdea: "bwij" -0xbdeb: "bwic" -0xbdec: "bwik" -0xbded: "bwit" -0xbdee: "bwip" -0xbdef: "bwih" -0xbdf0: "byu" -0xbdf1: "byug" -0xbdf2: "byugg" -0xbdf3: "byugs" -0xbdf4: "byun" -0xbdf5: "byunj" -0xbdf6: "byunh" -0xbdf7: "byud" -0xbdf8: "byul" -0xbdf9: "byulg" -0xbdfa: "byulm" -0xbdfb: "byulb" -0xbdfc: "byuls" -0xbdfd: "byult" -0xbdfe: "byulp" -0xbdff: "byulh" -/* x0be */ -0xbe00: "byum" -0xbe01: "byub" -0xbe02: "byubs" -0xbe03: "byus" -0xbe04: "byuss" -0xbe05: "byung" -0xbe06: "byuj" -0xbe07: "byuc" -0xbe08: "byuk" -0xbe09: "byut" -0xbe0a: "byup" -0xbe0b: "byuh" -0xbe0c: "beu" -0xbe0d: "beug" -0xbe0e: "beugg" -0xbe0f: "beugs" -0xbe10: "beun" -0xbe11: "beunj" -0xbe12: "beunh" -0xbe13: "beud" -0xbe14: "beul" -0xbe15: "beulg" -0xbe16: "beulm" -0xbe17: "beulb" -0xbe18: "beuls" -0xbe19: "beult" -0xbe1a: "beulp" -0xbe1b: "beulh" -0xbe1c: "beum" -0xbe1d: "beub" -0xbe1e: "beubs" -0xbe1f: "beus" -0xbe20: "beuss" -0xbe21: "beung" -0xbe22: "beuj" -0xbe23: "beuc" -0xbe24: "beuk" -0xbe25: "beut" -0xbe26: "beup" -0xbe27: "beuh" -0xbe28: "byi" -0xbe29: "byig" -0xbe2a: "byigg" -0xbe2b: "byigs" -0xbe2c: "byin" -0xbe2d: "byinj" -0xbe2e: "byinh" -0xbe2f: "byid" -0xbe30: "byil" -0xbe31: "byilg" -0xbe32: "byilm" -0xbe33: "byilb" -0xbe34: "byils" -0xbe35: "byilt" -0xbe36: "byilp" -0xbe37: "byilh" -0xbe38: "byim" -0xbe39: "byib" -0xbe3a: "byibs" -0xbe3b: "byis" -0xbe3c: "byiss" -0xbe3d: "bying" -0xbe3e: "byij" -0xbe3f: "byic" -0xbe40: "byik" -0xbe41: "byit" -0xbe42: "byip" -0xbe43: "byih" -0xbe44: "bi" -0xbe45: "big" -0xbe46: "bigg" -0xbe47: "bigs" -0xbe48: "bin" -0xbe49: "binj" -0xbe4a: "binh" -0xbe4b: "bid" -0xbe4c: "bil" -0xbe4d: "bilg" -0xbe4e: "bilm" -0xbe4f: "bilb" -0xbe50: "bils" -0xbe51: "bilt" -0xbe52: "bilp" -0xbe53: "bilh" -0xbe54: "bim" -0xbe55: "bib" -0xbe56: "bibs" -0xbe57: "bis" -0xbe58: "biss" -0xbe59: "bing" -0xbe5a: "bij" -0xbe5b: "bic" -0xbe5c: "bik" -0xbe5d: "bit" -0xbe5e: "bip" -0xbe5f: "bih" -0xbe60: "bba" -0xbe61: "bbag" -0xbe62: "bbagg" -0xbe63: "bbags" -0xbe64: "bban" -0xbe65: "bbanj" -0xbe66: "bbanh" -0xbe67: "bbad" -0xbe68: "bbal" -0xbe69: "bbalg" -0xbe6a: "bbalm" -0xbe6b: "bbalb" -0xbe6c: "bbals" -0xbe6d: "bbalt" -0xbe6e: "bbalp" -0xbe6f: "bbalh" -0xbe70: "bbam" -0xbe71: "bbab" -0xbe72: "bbabs" -0xbe73: "bbas" -0xbe74: "bbass" -0xbe75: "bbang" -0xbe76: "bbaj" -0xbe77: "bbac" -0xbe78: "bbak" -0xbe79: "bbat" -0xbe7a: "bbap" -0xbe7b: "bbah" -0xbe7c: "bbae" -0xbe7d: "bbaeg" -0xbe7e: "bbaegg" -0xbe7f: "bbaegs" -0xbe80: "bbaen" -0xbe81: "bbaenj" -0xbe82: "bbaenh" -0xbe83: "bbaed" -0xbe84: "bbael" -0xbe85: "bbaelg" -0xbe86: "bbaelm" -0xbe87: "bbaelb" -0xbe88: "bbaels" -0xbe89: "bbaelt" -0xbe8a: "bbaelp" -0xbe8b: "bbaelh" -0xbe8c: "bbaem" -0xbe8d: "bbaeb" -0xbe8e: "bbaebs" -0xbe8f: "bbaes" -0xbe90: "bbaess" -0xbe91: "bbaeng" -0xbe92: "bbaej" -0xbe93: "bbaec" -0xbe94: "bbaek" -0xbe95: "bbaet" -0xbe96: "bbaep" -0xbe97: "bbaeh" -0xbe98: "bbya" -0xbe99: "bbyag" -0xbe9a: "bbyagg" -0xbe9b: "bbyags" -0xbe9c: "bbyan" -0xbe9d: "bbyanj" -0xbe9e: "bbyanh" -0xbe9f: "bbyad" -0xbea0: "bbyal" -0xbea1: "bbyalg" -0xbea2: "bbyalm" -0xbea3: "bbyalb" -0xbea4: "bbyals" -0xbea5: "bbyalt" -0xbea6: "bbyalp" -0xbea7: "bbyalh" -0xbea8: "bbyam" -0xbea9: "bbyab" -0xbeaa: "bbyabs" -0xbeab: "bbyas" -0xbeac: "bbyass" -0xbead: "bbyang" -0xbeae: "bbyaj" -0xbeaf: "bbyac" -0xbeb0: "bbyak" -0xbeb1: "bbyat" -0xbeb2: "bbyap" -0xbeb3: "bbyah" -0xbeb4: "bbyae" -0xbeb5: "bbyaeg" -0xbeb6: "bbyaegg" -0xbeb7: "bbyaegs" -0xbeb8: "bbyaen" -0xbeb9: "bbyaenj" -0xbeba: "bbyaenh" -0xbebb: "bbyaed" -0xbebc: "bbyael" -0xbebd: "bbyaelg" -0xbebe: "bbyaelm" -0xbebf: "bbyaelb" -0xbec0: "bbyaels" -0xbec1: "bbyaelt" -0xbec2: "bbyaelp" -0xbec3: "bbyaelh" -0xbec4: "bbyaem" -0xbec5: "bbyaeb" -0xbec6: "bbyaebs" -0xbec7: "bbyaes" -0xbec8: "bbyaess" -0xbec9: "bbyaeng" -0xbeca: "bbyaej" -0xbecb: "bbyaec" -0xbecc: "bbyaek" -0xbecd: "bbyaet" -0xbece: "bbyaep" -0xbecf: "bbyaeh" -0xbed0: "bbeo" -0xbed1: "bbeog" -0xbed2: "bbeogg" -0xbed3: "bbeogs" -0xbed4: "bbeon" -0xbed5: "bbeonj" -0xbed6: "bbeonh" -0xbed7: "bbeod" -0xbed8: "bbeol" -0xbed9: "bbeolg" -0xbeda: "bbeolm" -0xbedb: "bbeolb" -0xbedc: "bbeols" -0xbedd: "bbeolt" -0xbede: "bbeolp" -0xbedf: "bbeolh" -0xbee0: "bbeom" -0xbee1: "bbeob" -0xbee2: "bbeobs" -0xbee3: "bbeos" -0xbee4: "bbeoss" -0xbee5: "bbeong" -0xbee6: "bbeoj" -0xbee7: "bbeoc" -0xbee8: "bbeok" -0xbee9: "bbeot" -0xbeea: "bbeop" -0xbeeb: "bbeoh" -0xbeec: "bbe" -0xbeed: "bbeg" -0xbeee: "bbegg" -0xbeef: "bbegs" -0xbef0: "bben" -0xbef1: "bbenj" -0xbef2: "bbenh" -0xbef3: "bbed" -0xbef4: "bbel" -0xbef5: "bbelg" -0xbef6: "bbelm" -0xbef7: "bbelb" -0xbef8: "bbels" -0xbef9: "bbelt" -0xbefa: "bbelp" -0xbefb: "bbelh" -0xbefc: "bbem" -0xbefd: "bbeb" -0xbefe: "bbebs" -0xbeff: "bbes" -/* x0bf */ -0xbf00: "bbess" -0xbf01: "bbeng" -0xbf02: "bbej" -0xbf03: "bbec" -0xbf04: "bbek" -0xbf05: "bbet" -0xbf06: "bbep" -0xbf07: "bbeh" -0xbf08: "bbyeo" -0xbf09: "bbyeog" -0xbf0a: "bbyeogg" -0xbf0b: "bbyeogs" -0xbf0c: "bbyeon" -0xbf0d: "bbyeonj" -0xbf0e: "bbyeonh" -0xbf0f: "bbyeod" -0xbf10: "bbyeol" -0xbf11: "bbyeolg" -0xbf12: "bbyeolm" -0xbf13: "bbyeolb" -0xbf14: "bbyeols" -0xbf15: "bbyeolt" -0xbf16: "bbyeolp" -0xbf17: "bbyeolh" -0xbf18: "bbyeom" -0xbf19: "bbyeob" -0xbf1a: "bbyeobs" -0xbf1b: "bbyeos" -0xbf1c: "bbyeoss" -0xbf1d: "bbyeong" -0xbf1e: "bbyeoj" -0xbf1f: "bbyeoc" -0xbf20: "bbyeok" -0xbf21: "bbyeot" -0xbf22: "bbyeop" -0xbf23: "bbyeoh" -0xbf24: "bbye" -0xbf25: "bbyeg" -0xbf26: "bbyegg" -0xbf27: "bbyegs" -0xbf28: "bbyen" -0xbf29: "bbyenj" -0xbf2a: "bbyenh" -0xbf2b: "bbyed" -0xbf2c: "bbyel" -0xbf2d: "bbyelg" -0xbf2e: "bbyelm" -0xbf2f: "bbyelb" -0xbf30: "bbyels" -0xbf31: "bbyelt" -0xbf32: "bbyelp" -0xbf33: "bbyelh" -0xbf34: "bbyem" -0xbf35: "bbyeb" -0xbf36: "bbyebs" -0xbf37: "bbyes" -0xbf38: "bbyess" -0xbf39: "bbyeng" -0xbf3a: "bbyej" -0xbf3b: "bbyec" -0xbf3c: "bbyek" -0xbf3d: "bbyet" -0xbf3e: "bbyep" -0xbf3f: "bbyeh" -0xbf40: "bbo" -0xbf41: "bbog" -0xbf42: "bbogg" -0xbf43: "bbogs" -0xbf44: "bbon" -0xbf45: "bbonj" -0xbf46: "bbonh" -0xbf47: "bbod" -0xbf48: "bbol" -0xbf49: "bbolg" -0xbf4a: "bbolm" -0xbf4b: "bbolb" -0xbf4c: "bbols" -0xbf4d: "bbolt" -0xbf4e: "bbolp" -0xbf4f: "bbolh" -0xbf50: "bbom" -0xbf51: "bbob" -0xbf52: "bbobs" -0xbf53: "bbos" -0xbf54: "bboss" -0xbf55: "bbong" -0xbf56: "bboj" -0xbf57: "bboc" -0xbf58: "bbok" -0xbf59: "bbot" -0xbf5a: "bbop" -0xbf5b: "bboh" -0xbf5c: "bbwa" -0xbf5d: "bbwag" -0xbf5e: "bbwagg" -0xbf5f: "bbwags" -0xbf60: "bbwan" -0xbf61: "bbwanj" -0xbf62: "bbwanh" -0xbf63: "bbwad" -0xbf64: "bbwal" -0xbf65: "bbwalg" -0xbf66: "bbwalm" -0xbf67: "bbwalb" -0xbf68: "bbwals" -0xbf69: "bbwalt" -0xbf6a: "bbwalp" -0xbf6b: "bbwalh" -0xbf6c: "bbwam" -0xbf6d: "bbwab" -0xbf6e: "bbwabs" -0xbf6f: "bbwas" -0xbf70: "bbwass" -0xbf71: "bbwang" -0xbf72: "bbwaj" -0xbf73: "bbwac" -0xbf74: "bbwak" -0xbf75: "bbwat" -0xbf76: "bbwap" -0xbf77: "bbwah" -0xbf78: "bbwae" -0xbf79: "bbwaeg" -0xbf7a: "bbwaegg" -0xbf7b: "bbwaegs" -0xbf7c: "bbwaen" -0xbf7d: "bbwaenj" -0xbf7e: "bbwaenh" -0xbf7f: "bbwaed" -0xbf80: "bbwael" -0xbf81: "bbwaelg" -0xbf82: "bbwaelm" -0xbf83: "bbwaelb" -0xbf84: "bbwaels" -0xbf85: "bbwaelt" -0xbf86: "bbwaelp" -0xbf87: "bbwaelh" -0xbf88: "bbwaem" -0xbf89: "bbwaeb" -0xbf8a: "bbwaebs" -0xbf8b: "bbwaes" -0xbf8c: "bbwaess" -0xbf8d: "bbwaeng" -0xbf8e: "bbwaej" -0xbf8f: "bbwaec" -0xbf90: "bbwaek" -0xbf91: "bbwaet" -0xbf92: "bbwaep" -0xbf93: "bbwaeh" -0xbf94: "bboe" -0xbf95: "bboeg" -0xbf96: "bboegg" -0xbf97: "bboegs" -0xbf98: "bboen" -0xbf99: "bboenj" -0xbf9a: "bboenh" -0xbf9b: "bboed" -0xbf9c: "bboel" -0xbf9d: "bboelg" -0xbf9e: "bboelm" -0xbf9f: "bboelb" -0xbfa0: "bboels" -0xbfa1: "bboelt" -0xbfa2: "bboelp" -0xbfa3: "bboelh" -0xbfa4: "bboem" -0xbfa5: "bboeb" -0xbfa6: "bboebs" -0xbfa7: "bboes" -0xbfa8: "bboess" -0xbfa9: "bboeng" -0xbfaa: "bboej" -0xbfab: "bboec" -0xbfac: "bboek" -0xbfad: "bboet" -0xbfae: "bboep" -0xbfaf: "bboeh" -0xbfb0: "bbyo" -0xbfb1: "bbyog" -0xbfb2: "bbyogg" -0xbfb3: "bbyogs" -0xbfb4: "bbyon" -0xbfb5: "bbyonj" -0xbfb6: "bbyonh" -0xbfb7: "bbyod" -0xbfb8: "bbyol" -0xbfb9: "bbyolg" -0xbfba: "bbyolm" -0xbfbb: "bbyolb" -0xbfbc: "bbyols" -0xbfbd: "bbyolt" -0xbfbe: "bbyolp" -0xbfbf: "bbyolh" -0xbfc0: "bbyom" -0xbfc1: "bbyob" -0xbfc2: "bbyobs" -0xbfc3: "bbyos" -0xbfc4: "bbyoss" -0xbfc5: "bbyong" -0xbfc6: "bbyoj" -0xbfc7: "bbyoc" -0xbfc8: "bbyok" -0xbfc9: "bbyot" -0xbfca: "bbyop" -0xbfcb: "bbyoh" -0xbfcc: "bbu" -0xbfcd: "bbug" -0xbfce: "bbugg" -0xbfcf: "bbugs" -0xbfd0: "bbun" -0xbfd1: "bbunj" -0xbfd2: "bbunh" -0xbfd3: "bbud" -0xbfd4: "bbul" -0xbfd5: "bbulg" -0xbfd6: "bbulm" -0xbfd7: "bbulb" -0xbfd8: "bbuls" -0xbfd9: "bbult" -0xbfda: "bbulp" -0xbfdb: "bbulh" -0xbfdc: "bbum" -0xbfdd: "bbub" -0xbfde: "bbubs" -0xbfdf: "bbus" -0xbfe0: "bbuss" -0xbfe1: "bbung" -0xbfe2: "bbuj" -0xbfe3: "bbuc" -0xbfe4: "bbuk" -0xbfe5: "bbut" -0xbfe6: "bbup" -0xbfe7: "bbuh" -0xbfe8: "bbweo" -0xbfe9: "bbweog" -0xbfea: "bbweogg" -0xbfeb: "bbweogs" -0xbfec: "bbweon" -0xbfed: "bbweonj" -0xbfee: "bbweonh" -0xbfef: "bbweod" -0xbff0: "bbweol" -0xbff1: "bbweolg" -0xbff2: "bbweolm" -0xbff3: "bbweolb" -0xbff4: "bbweols" -0xbff5: "bbweolt" -0xbff6: "bbweolp" -0xbff7: "bbweolh" -0xbff8: "bbweom" -0xbff9: "bbweob" -0xbffa: "bbweobs" -0xbffb: "bbweos" -0xbffc: "bbweoss" -0xbffd: "bbweong" -0xbffe: "bbweoj" -0xbfff: "bbweoc" -/* x0c0 */ -0xc000: "bbweok" -0xc001: "bbweot" -0xc002: "bbweop" -0xc003: "bbweoh" -0xc004: "bbwe" -0xc005: "bbweg" -0xc006: "bbwegg" -0xc007: "bbwegs" -0xc008: "bbwen" -0xc009: "bbwenj" -0xc00a: "bbwenh" -0xc00b: "bbwed" -0xc00c: "bbwel" -0xc00d: "bbwelg" -0xc00e: "bbwelm" -0xc00f: "bbwelb" -0xc010: "bbwels" -0xc011: "bbwelt" -0xc012: "bbwelp" -0xc013: "bbwelh" -0xc014: "bbwem" -0xc015: "bbweb" -0xc016: "bbwebs" -0xc017: "bbwes" -0xc018: "bbwess" -0xc019: "bbweng" -0xc01a: "bbwej" -0xc01b: "bbwec" -0xc01c: "bbwek" -0xc01d: "bbwet" -0xc01e: "bbwep" -0xc01f: "bbweh" -0xc020: "bbwi" -0xc021: "bbwig" -0xc022: "bbwigg" -0xc023: "bbwigs" -0xc024: "bbwin" -0xc025: "bbwinj" -0xc026: "bbwinh" -0xc027: "bbwid" -0xc028: "bbwil" -0xc029: "bbwilg" -0xc02a: "bbwilm" -0xc02b: "bbwilb" -0xc02c: "bbwils" -0xc02d: "bbwilt" -0xc02e: "bbwilp" -0xc02f: "bbwilh" -0xc030: "bbwim" -0xc031: "bbwib" -0xc032: "bbwibs" -0xc033: "bbwis" -0xc034: "bbwiss" -0xc035: "bbwing" -0xc036: "bbwij" -0xc037: "bbwic" -0xc038: "bbwik" -0xc039: "bbwit" -0xc03a: "bbwip" -0xc03b: "bbwih" -0xc03c: "bbyu" -0xc03d: "bbyug" -0xc03e: "bbyugg" -0xc03f: "bbyugs" -0xc040: "bbyun" -0xc041: "bbyunj" -0xc042: "bbyunh" -0xc043: "bbyud" -0xc044: "bbyul" -0xc045: "bbyulg" -0xc046: "bbyulm" -0xc047: "bbyulb" -0xc048: "bbyuls" -0xc049: "bbyult" -0xc04a: "bbyulp" -0xc04b: "bbyulh" -0xc04c: "bbyum" -0xc04d: "bbyub" -0xc04e: "bbyubs" -0xc04f: "bbyus" -0xc050: "bbyuss" -0xc051: "bbyung" -0xc052: "bbyuj" -0xc053: "bbyuc" -0xc054: "bbyuk" -0xc055: "bbyut" -0xc056: "bbyup" -0xc057: "bbyuh" -0xc058: "bbeu" -0xc059: "bbeug" -0xc05a: "bbeugg" -0xc05b: "bbeugs" -0xc05c: "bbeun" -0xc05d: "bbeunj" -0xc05e: "bbeunh" -0xc05f: "bbeud" -0xc060: "bbeul" -0xc061: "bbeulg" -0xc062: "bbeulm" -0xc063: "bbeulb" -0xc064: "bbeuls" -0xc065: "bbeult" -0xc066: "bbeulp" -0xc067: "bbeulh" -0xc068: "bbeum" -0xc069: "bbeub" -0xc06a: "bbeubs" -0xc06b: "bbeus" -0xc06c: "bbeuss" -0xc06d: "bbeung" -0xc06e: "bbeuj" -0xc06f: "bbeuc" -0xc070: "bbeuk" -0xc071: "bbeut" -0xc072: "bbeup" -0xc073: "bbeuh" -0xc074: "bbyi" -0xc075: "bbyig" -0xc076: "bbyigg" -0xc077: "bbyigs" -0xc078: "bbyin" -0xc079: "bbyinj" -0xc07a: "bbyinh" -0xc07b: "bbyid" -0xc07c: "bbyil" -0xc07d: "bbyilg" -0xc07e: "bbyilm" -0xc07f: "bbyilb" -0xc080: "bbyils" -0xc081: "bbyilt" -0xc082: "bbyilp" -0xc083: "bbyilh" -0xc084: "bbyim" -0xc085: "bbyib" -0xc086: "bbyibs" -0xc087: "bbyis" -0xc088: "bbyiss" -0xc089: "bbying" -0xc08a: "bbyij" -0xc08b: "bbyic" -0xc08c: "bbyik" -0xc08d: "bbyit" -0xc08e: "bbyip" -0xc08f: "bbyih" -0xc090: "bbi" -0xc091: "bbig" -0xc092: "bbigg" -0xc093: "bbigs" -0xc094: "bbin" -0xc095: "bbinj" -0xc096: "bbinh" -0xc097: "bbid" -0xc098: "bbil" -0xc099: "bbilg" -0xc09a: "bbilm" -0xc09b: "bbilb" -0xc09c: "bbils" -0xc09d: "bbilt" -0xc09e: "bbilp" -0xc09f: "bbilh" -0xc0a0: "bbim" -0xc0a1: "bbib" -0xc0a2: "bbibs" -0xc0a3: "bbis" -0xc0a4: "bbiss" -0xc0a5: "bbing" -0xc0a6: "bbij" -0xc0a7: "bbic" -0xc0a8: "bbik" -0xc0a9: "bbit" -0xc0aa: "bbip" -0xc0ab: "bbih" -0xc0ac: "sa" -0xc0ad: "sag" -0xc0ae: "sagg" -0xc0af: "sags" -0xc0b0: "san" -0xc0b1: "sanj" -0xc0b2: "sanh" -0xc0b3: "sad" -0xc0b4: "sal" -0xc0b5: "salg" -0xc0b6: "salm" -0xc0b7: "salb" -0xc0b8: "sals" -0xc0b9: "salt" -0xc0ba: "salp" -0xc0bb: "salh" -0xc0bc: "sam" -0xc0bd: "sab" -0xc0be: "sabs" -0xc0bf: "sas" -0xc0c0: "sass" -0xc0c1: "sang" -0xc0c2: "saj" -0xc0c3: "sac" -0xc0c4: "sak" -0xc0c5: "sat" -0xc0c6: "sap" -0xc0c7: "sah" -0xc0c8: "sae" -0xc0c9: "saeg" -0xc0ca: "saegg" -0xc0cb: "saegs" -0xc0cc: "saen" -0xc0cd: "saenj" -0xc0ce: "saenh" -0xc0cf: "saed" -0xc0d0: "sael" -0xc0d1: "saelg" -0xc0d2: "saelm" -0xc0d3: "saelb" -0xc0d4: "saels" -0xc0d5: "saelt" -0xc0d6: "saelp" -0xc0d7: "saelh" -0xc0d8: "saem" -0xc0d9: "saeb" -0xc0da: "saebs" -0xc0db: "saes" -0xc0dc: "saess" -0xc0dd: "saeng" -0xc0de: "saej" -0xc0df: "saec" -0xc0e0: "saek" -0xc0e1: "saet" -0xc0e2: "saep" -0xc0e3: "saeh" -0xc0e4: "sya" -0xc0e5: "syag" -0xc0e6: "syagg" -0xc0e7: "syags" -0xc0e8: "syan" -0xc0e9: "syanj" -0xc0ea: "syanh" -0xc0eb: "syad" -0xc0ec: "syal" -0xc0ed: "syalg" -0xc0ee: "syalm" -0xc0ef: "syalb" -0xc0f0: "syals" -0xc0f1: "syalt" -0xc0f2: "syalp" -0xc0f3: "syalh" -0xc0f4: "syam" -0xc0f5: "syab" -0xc0f6: "syabs" -0xc0f7: "syas" -0xc0f8: "syass" -0xc0f9: "syang" -0xc0fa: "syaj" -0xc0fb: "syac" -0xc0fc: "syak" -0xc0fd: "syat" -0xc0fe: "syap" -0xc0ff: "syah" -/* x0c1 */ -0xc100: "syae" -0xc101: "syaeg" -0xc102: "syaegg" -0xc103: "syaegs" -0xc104: "syaen" -0xc105: "syaenj" -0xc106: "syaenh" -0xc107: "syaed" -0xc108: "syael" -0xc109: "syaelg" -0xc10a: "syaelm" -0xc10b: "syaelb" -0xc10c: "syaels" -0xc10d: "syaelt" -0xc10e: "syaelp" -0xc10f: "syaelh" -0xc110: "syaem" -0xc111: "syaeb" -0xc112: "syaebs" -0xc113: "syaes" -0xc114: "syaess" -0xc115: "syaeng" -0xc116: "syaej" -0xc117: "syaec" -0xc118: "syaek" -0xc119: "syaet" -0xc11a: "syaep" -0xc11b: "syaeh" -0xc11c: "seo" -0xc11d: "seog" -0xc11e: "seogg" -0xc11f: "seogs" -0xc120: "seon" -0xc121: "seonj" -0xc122: "seonh" -0xc123: "seod" -0xc124: "seol" -0xc125: "seolg" -0xc126: "seolm" -0xc127: "seolb" -0xc128: "seols" -0xc129: "seolt" -0xc12a: "seolp" -0xc12b: "seolh" -0xc12c: "seom" -0xc12d: "seob" -0xc12e: "seobs" -0xc12f: "seos" -0xc130: "seoss" -0xc131: "seong" -0xc132: "seoj" -0xc133: "seoc" -0xc134: "seok" -0xc135: "seot" -0xc136: "seop" -0xc137: "seoh" -0xc138: "se" -0xc139: "seg" -0xc13a: "segg" -0xc13b: "segs" -0xc13c: "sen" -0xc13d: "senj" -0xc13e: "senh" -0xc13f: "sed" -0xc140: "sel" -0xc141: "selg" -0xc142: "selm" -0xc143: "selb" -0xc144: "sels" -0xc145: "selt" -0xc146: "selp" -0xc147: "selh" -0xc148: "sem" -0xc149: "seb" -0xc14a: "sebs" -0xc14b: "ses" -0xc14c: "sess" -0xc14d: "seng" -0xc14e: "sej" -0xc14f: "sec" -0xc150: "sek" -0xc151: "set" -0xc152: "sep" -0xc153: "seh" -0xc154: "syeo" -0xc155: "syeog" -0xc156: "syeogg" -0xc157: "syeogs" -0xc158: "syeon" -0xc159: "syeonj" -0xc15a: "syeonh" -0xc15b: "syeod" -0xc15c: "syeol" -0xc15d: "syeolg" -0xc15e: "syeolm" -0xc15f: "syeolb" -0xc160: "syeols" -0xc161: "syeolt" -0xc162: "syeolp" -0xc163: "syeolh" -0xc164: "syeom" -0xc165: "syeob" -0xc166: "syeobs" -0xc167: "syeos" -0xc168: "syeoss" -0xc169: "syeong" -0xc16a: "syeoj" -0xc16b: "syeoc" -0xc16c: "syeok" -0xc16d: "syeot" -0xc16e: "syeop" -0xc16f: "syeoh" -0xc170: "sye" -0xc171: "syeg" -0xc172: "syegg" -0xc173: "syegs" -0xc174: "syen" -0xc175: "syenj" -0xc176: "syenh" -0xc177: "syed" -0xc178: "syel" -0xc179: "syelg" -0xc17a: "syelm" -0xc17b: "syelb" -0xc17c: "syels" -0xc17d: "syelt" -0xc17e: "syelp" -0xc17f: "syelh" -0xc180: "syem" -0xc181: "syeb" -0xc182: "syebs" -0xc183: "syes" -0xc184: "syess" -0xc185: "syeng" -0xc186: "syej" -0xc187: "syec" -0xc188: "syek" -0xc189: "syet" -0xc18a: "syep" -0xc18b: "syeh" -0xc18c: "so" -0xc18d: "sog" -0xc18e: "sogg" -0xc18f: "sogs" -0xc190: "son" -0xc191: "sonj" -0xc192: "sonh" -0xc193: "sod" -0xc194: "sol" -0xc195: "solg" -0xc196: "solm" -0xc197: "solb" -0xc198: "sols" -0xc199: "solt" -0xc19a: "solp" -0xc19b: "solh" -0xc19c: "som" -0xc19d: "sob" -0xc19e: "sobs" -0xc19f: "sos" -0xc1a0: "soss" -0xc1a1: "song" -0xc1a2: "soj" -0xc1a3: "soc" -0xc1a4: "sok" -0xc1a5: "sot" -0xc1a6: "sop" -0xc1a7: "soh" -0xc1a8: "swa" -0xc1a9: "swag" -0xc1aa: "swagg" -0xc1ab: "swags" -0xc1ac: "swan" -0xc1ad: "swanj" -0xc1ae: "swanh" -0xc1af: "swad" -0xc1b0: "swal" -0xc1b1: "swalg" -0xc1b2: "swalm" -0xc1b3: "swalb" -0xc1b4: "swals" -0xc1b5: "swalt" -0xc1b6: "swalp" -0xc1b7: "swalh" -0xc1b8: "swam" -0xc1b9: "swab" -0xc1ba: "swabs" -0xc1bb: "swas" -0xc1bc: "swass" -0xc1bd: "swang" -0xc1be: "swaj" -0xc1bf: "swac" -0xc1c0: "swak" -0xc1c1: "swat" -0xc1c2: "swap" -0xc1c3: "swah" -0xc1c4: "swae" -0xc1c5: "swaeg" -0xc1c6: "swaegg" -0xc1c7: "swaegs" -0xc1c8: "swaen" -0xc1c9: "swaenj" -0xc1ca: "swaenh" -0xc1cb: "swaed" -0xc1cc: "swael" -0xc1cd: "swaelg" -0xc1ce: "swaelm" -0xc1cf: "swaelb" -0xc1d0: "swaels" -0xc1d1: "swaelt" -0xc1d2: "swaelp" -0xc1d3: "swaelh" -0xc1d4: "swaem" -0xc1d5: "swaeb" -0xc1d6: "swaebs" -0xc1d7: "swaes" -0xc1d8: "swaess" -0xc1d9: "swaeng" -0xc1da: "swaej" -0xc1db: "swaec" -0xc1dc: "swaek" -0xc1dd: "swaet" -0xc1de: "swaep" -0xc1df: "swaeh" -0xc1e0: "soe" -0xc1e1: "soeg" -0xc1e2: "soegg" -0xc1e3: "soegs" -0xc1e4: "soen" -0xc1e5: "soenj" -0xc1e6: "soenh" -0xc1e7: "soed" -0xc1e8: "soel" -0xc1e9: "soelg" -0xc1ea: "soelm" -0xc1eb: "soelb" -0xc1ec: "soels" -0xc1ed: "soelt" -0xc1ee: "soelp" -0xc1ef: "soelh" -0xc1f0: "soem" -0xc1f1: "soeb" -0xc1f2: "soebs" -0xc1f3: "soes" -0xc1f4: "soess" -0xc1f5: "soeng" -0xc1f6: "soej" -0xc1f7: "soec" -0xc1f8: "soek" -0xc1f9: "soet" -0xc1fa: "soep" -0xc1fb: "soeh" -0xc1fc: "syo" -0xc1fd: "syog" -0xc1fe: "syogg" -0xc1ff: "syogs" -/* x0c2 */ -0xc200: "syon" -0xc201: "syonj" -0xc202: "syonh" -0xc203: "syod" -0xc204: "syol" -0xc205: "syolg" -0xc206: "syolm" -0xc207: "syolb" -0xc208: "syols" -0xc209: "syolt" -0xc20a: "syolp" -0xc20b: "syolh" -0xc20c: "syom" -0xc20d: "syob" -0xc20e: "syobs" -0xc20f: "syos" -0xc210: "syoss" -0xc211: "syong" -0xc212: "syoj" -0xc213: "syoc" -0xc214: "syok" -0xc215: "syot" -0xc216: "syop" -0xc217: "syoh" -0xc218: "su" -0xc219: "sug" -0xc21a: "sugg" -0xc21b: "sugs" -0xc21c: "sun" -0xc21d: "sunj" -0xc21e: "sunh" -0xc21f: "sud" -0xc220: "sul" -0xc221: "sulg" -0xc222: "sulm" -0xc223: "sulb" -0xc224: "suls" -0xc225: "sult" -0xc226: "sulp" -0xc227: "sulh" -0xc228: "sum" -0xc229: "sub" -0xc22a: "subs" -0xc22b: "sus" -0xc22c: "suss" -0xc22d: "sung" -0xc22e: "suj" -0xc22f: "suc" -0xc230: "suk" -0xc231: "sut" -0xc232: "sup" -0xc233: "suh" -0xc234: "sweo" -0xc235: "sweog" -0xc236: "sweogg" -0xc237: "sweogs" -0xc238: "sweon" -0xc239: "sweonj" -0xc23a: "sweonh" -0xc23b: "sweod" -0xc23c: "sweol" -0xc23d: "sweolg" -0xc23e: "sweolm" -0xc23f: "sweolb" -0xc240: "sweols" -0xc241: "sweolt" -0xc242: "sweolp" -0xc243: "sweolh" -0xc244: "sweom" -0xc245: "sweob" -0xc246: "sweobs" -0xc247: "sweos" -0xc248: "sweoss" -0xc249: "sweong" -0xc24a: "sweoj" -0xc24b: "sweoc" -0xc24c: "sweok" -0xc24d: "sweot" -0xc24e: "sweop" -0xc24f: "sweoh" -0xc250: "swe" -0xc251: "sweg" -0xc252: "swegg" -0xc253: "swegs" -0xc254: "swen" -0xc255: "swenj" -0xc256: "swenh" -0xc257: "swed" -0xc258: "swel" -0xc259: "swelg" -0xc25a: "swelm" -0xc25b: "swelb" -0xc25c: "swels" -0xc25d: "swelt" -0xc25e: "swelp" -0xc25f: "swelh" -0xc260: "swem" -0xc261: "sweb" -0xc262: "swebs" -0xc263: "swes" -0xc264: "swess" -0xc265: "sweng" -0xc266: "swej" -0xc267: "swec" -0xc268: "swek" -0xc269: "swet" -0xc26a: "swep" -0xc26b: "sweh" -0xc26c: "swi" -0xc26d: "swig" -0xc26e: "swigg" -0xc26f: "swigs" -0xc270: "swin" -0xc271: "swinj" -0xc272: "swinh" -0xc273: "swid" -0xc274: "swil" -0xc275: "swilg" -0xc276: "swilm" -0xc277: "swilb" -0xc278: "swils" -0xc279: "swilt" -0xc27a: "swilp" -0xc27b: "swilh" -0xc27c: "swim" -0xc27d: "swib" -0xc27e: "swibs" -0xc27f: "swis" -0xc280: "swiss" -0xc281: "swing" -0xc282: "swij" -0xc283: "swic" -0xc284: "swik" -0xc285: "swit" -0xc286: "swip" -0xc287: "swih" -0xc288: "syu" -0xc289: "syug" -0xc28a: "syugg" -0xc28b: "syugs" -0xc28c: "syun" -0xc28d: "syunj" -0xc28e: "syunh" -0xc28f: "syud" -0xc290: "syul" -0xc291: "syulg" -0xc292: "syulm" -0xc293: "syulb" -0xc294: "syuls" -0xc295: "syult" -0xc296: "syulp" -0xc297: "syulh" -0xc298: "syum" -0xc299: "syub" -0xc29a: "syubs" -0xc29b: "syus" -0xc29c: "syuss" -0xc29d: "syung" -0xc29e: "syuj" -0xc29f: "syuc" -0xc2a0: "syuk" -0xc2a1: "syut" -0xc2a2: "syup" -0xc2a3: "syuh" -0xc2a4: "seu" -0xc2a5: "seug" -0xc2a6: "seugg" -0xc2a7: "seugs" -0xc2a8: "seun" -0xc2a9: "seunj" -0xc2aa: "seunh" -0xc2ab: "seud" -0xc2ac: "seul" -0xc2ad: "seulg" -0xc2ae: "seulm" -0xc2af: "seulb" -0xc2b0: "seuls" -0xc2b1: "seult" -0xc2b2: "seulp" -0xc2b3: "seulh" -0xc2b4: "seum" -0xc2b5: "seub" -0xc2b6: "seubs" -0xc2b7: "seus" -0xc2b8: "seuss" -0xc2b9: "seung" -0xc2ba: "seuj" -0xc2bb: "seuc" -0xc2bc: "seuk" -0xc2bd: "seut" -0xc2be: "seup" -0xc2bf: "seuh" -0xc2c0: "syi" -0xc2c1: "syig" -0xc2c2: "syigg" -0xc2c3: "syigs" -0xc2c4: "syin" -0xc2c5: "syinj" -0xc2c6: "syinh" -0xc2c7: "syid" -0xc2c8: "syil" -0xc2c9: "syilg" -0xc2ca: "syilm" -0xc2cb: "syilb" -0xc2cc: "syils" -0xc2cd: "syilt" -0xc2ce: "syilp" -0xc2cf: "syilh" -0xc2d0: "syim" -0xc2d1: "syib" -0xc2d2: "syibs" -0xc2d3: "syis" -0xc2d4: "syiss" -0xc2d5: "sying" -0xc2d6: "syij" -0xc2d7: "syic" -0xc2d8: "syik" -0xc2d9: "syit" -0xc2da: "syip" -0xc2db: "syih" -0xc2dc: "si" -0xc2dd: "sig" -0xc2de: "sigg" -0xc2df: "sigs" -0xc2e0: "sin" -0xc2e1: "sinj" -0xc2e2: "sinh" -0xc2e3: "sid" -0xc2e4: "sil" -0xc2e5: "silg" -0xc2e6: "silm" -0xc2e7: "silb" -0xc2e8: "sils" -0xc2e9: "silt" -0xc2ea: "silp" -0xc2eb: "silh" -0xc2ec: "sim" -0xc2ed: "sib" -0xc2ee: "sibs" -0xc2ef: "sis" -0xc2f0: "siss" -0xc2f1: "sing" -0xc2f2: "sij" -0xc2f3: "sic" -0xc2f4: "sik" -0xc2f5: "sit" -0xc2f6: "sip" -0xc2f7: "sih" -0xc2f8: "ssa" -0xc2f9: "ssag" -0xc2fa: "ssagg" -0xc2fb: "ssags" -0xc2fc: "ssan" -0xc2fd: "ssanj" -0xc2fe: "ssanh" -0xc2ff: "ssad" -/* x0c3 */ -0xc300: "ssal" -0xc301: "ssalg" -0xc302: "ssalm" -0xc303: "ssalb" -0xc304: "ssals" -0xc305: "ssalt" -0xc306: "ssalp" -0xc307: "ssalh" -0xc308: "ssam" -0xc309: "ssab" -0xc30a: "ssabs" -0xc30b: "ssas" -0xc30c: "ssass" -0xc30d: "ssang" -0xc30e: "ssaj" -0xc30f: "ssac" -0xc310: "ssak" -0xc311: "ssat" -0xc312: "ssap" -0xc313: "ssah" -0xc314: "ssae" -0xc315: "ssaeg" -0xc316: "ssaegg" -0xc317: "ssaegs" -0xc318: "ssaen" -0xc319: "ssaenj" -0xc31a: "ssaenh" -0xc31b: "ssaed" -0xc31c: "ssael" -0xc31d: "ssaelg" -0xc31e: "ssaelm" -0xc31f: "ssaelb" -0xc320: "ssaels" -0xc321: "ssaelt" -0xc322: "ssaelp" -0xc323: "ssaelh" -0xc324: "ssaem" -0xc325: "ssaeb" -0xc326: "ssaebs" -0xc327: "ssaes" -0xc328: "ssaess" -0xc329: "ssaeng" -0xc32a: "ssaej" -0xc32b: "ssaec" -0xc32c: "ssaek" -0xc32d: "ssaet" -0xc32e: "ssaep" -0xc32f: "ssaeh" -0xc330: "ssya" -0xc331: "ssyag" -0xc332: "ssyagg" -0xc333: "ssyags" -0xc334: "ssyan" -0xc335: "ssyanj" -0xc336: "ssyanh" -0xc337: "ssyad" -0xc338: "ssyal" -0xc339: "ssyalg" -0xc33a: "ssyalm" -0xc33b: "ssyalb" -0xc33c: "ssyals" -0xc33d: "ssyalt" -0xc33e: "ssyalp" -0xc33f: "ssyalh" -0xc340: "ssyam" -0xc341: "ssyab" -0xc342: "ssyabs" -0xc343: "ssyas" -0xc344: "ssyass" -0xc345: "ssyang" -0xc346: "ssyaj" -0xc347: "ssyac" -0xc348: "ssyak" -0xc349: "ssyat" -0xc34a: "ssyap" -0xc34b: "ssyah" -0xc34c: "ssyae" -0xc34d: "ssyaeg" -0xc34e: "ssyaegg" -0xc34f: "ssyaegs" -0xc350: "ssyaen" -0xc351: "ssyaenj" -0xc352: "ssyaenh" -0xc353: "ssyaed" -0xc354: "ssyael" -0xc355: "ssyaelg" -0xc356: "ssyaelm" -0xc357: "ssyaelb" -0xc358: "ssyaels" -0xc359: "ssyaelt" -0xc35a: "ssyaelp" -0xc35b: "ssyaelh" -0xc35c: "ssyaem" -0xc35d: "ssyaeb" -0xc35e: "ssyaebs" -0xc35f: "ssyaes" -0xc360: "ssyaess" -0xc361: "ssyaeng" -0xc362: "ssyaej" -0xc363: "ssyaec" -0xc364: "ssyaek" -0xc365: "ssyaet" -0xc366: "ssyaep" -0xc367: "ssyaeh" -0xc368: "sseo" -0xc369: "sseog" -0xc36a: "sseogg" -0xc36b: "sseogs" -0xc36c: "sseon" -0xc36d: "sseonj" -0xc36e: "sseonh" -0xc36f: "sseod" -0xc370: "sseol" -0xc371: "sseolg" -0xc372: "sseolm" -0xc373: "sseolb" -0xc374: "sseols" -0xc375: "sseolt" -0xc376: "sseolp" -0xc377: "sseolh" -0xc378: "sseom" -0xc379: "sseob" -0xc37a: "sseobs" -0xc37b: "sseos" -0xc37c: "sseoss" -0xc37d: "sseong" -0xc37e: "sseoj" -0xc37f: "sseoc" -0xc380: "sseok" -0xc381: "sseot" -0xc382: "sseop" -0xc383: "sseoh" -0xc384: "sse" -0xc385: "sseg" -0xc386: "ssegg" -0xc387: "ssegs" -0xc388: "ssen" -0xc389: "ssenj" -0xc38a: "ssenh" -0xc38b: "ssed" -0xc38c: "ssel" -0xc38d: "sselg" -0xc38e: "sselm" -0xc38f: "sselb" -0xc390: "ssels" -0xc391: "sselt" -0xc392: "sselp" -0xc393: "sselh" -0xc394: "ssem" -0xc395: "sseb" -0xc396: "ssebs" -0xc397: "sses" -0xc398: "ssess" -0xc399: "sseng" -0xc39a: "ssej" -0xc39b: "ssec" -0xc39c: "ssek" -0xc39d: "sset" -0xc39e: "ssep" -0xc39f: "sseh" -0xc3a0: "ssyeo" -0xc3a1: "ssyeog" -0xc3a2: "ssyeogg" -0xc3a3: "ssyeogs" -0xc3a4: "ssyeon" -0xc3a5: "ssyeonj" -0xc3a6: "ssyeonh" -0xc3a7: "ssyeod" -0xc3a8: "ssyeol" -0xc3a9: "ssyeolg" -0xc3aa: "ssyeolm" -0xc3ab: "ssyeolb" -0xc3ac: "ssyeols" -0xc3ad: "ssyeolt" -0xc3ae: "ssyeolp" -0xc3af: "ssyeolh" -0xc3b0: "ssyeom" -0xc3b1: "ssyeob" -0xc3b2: "ssyeobs" -0xc3b3: "ssyeos" -0xc3b4: "ssyeoss" -0xc3b5: "ssyeong" -0xc3b6: "ssyeoj" -0xc3b7: "ssyeoc" -0xc3b8: "ssyeok" -0xc3b9: "ssyeot" -0xc3ba: "ssyeop" -0xc3bb: "ssyeoh" -0xc3bc: "ssye" -0xc3bd: "ssyeg" -0xc3be: "ssyegg" -0xc3bf: "ssyegs" -0xc3c0: "ssyen" -0xc3c1: "ssyenj" -0xc3c2: "ssyenh" -0xc3c3: "ssyed" -0xc3c4: "ssyel" -0xc3c5: "ssyelg" -0xc3c6: "ssyelm" -0xc3c7: "ssyelb" -0xc3c8: "ssyels" -0xc3c9: "ssyelt" -0xc3ca: "ssyelp" -0xc3cb: "ssyelh" -0xc3cc: "ssyem" -0xc3cd: "ssyeb" -0xc3ce: "ssyebs" -0xc3cf: "ssyes" -0xc3d0: "ssyess" -0xc3d1: "ssyeng" -0xc3d2: "ssyej" -0xc3d3: "ssyec" -0xc3d4: "ssyek" -0xc3d5: "ssyet" -0xc3d6: "ssyep" -0xc3d7: "ssyeh" -0xc3d8: "sso" -0xc3d9: "ssog" -0xc3da: "ssogg" -0xc3db: "ssogs" -0xc3dc: "sson" -0xc3dd: "ssonj" -0xc3de: "ssonh" -0xc3df: "ssod" -0xc3e0: "ssol" -0xc3e1: "ssolg" -0xc3e2: "ssolm" -0xc3e3: "ssolb" -0xc3e4: "ssols" -0xc3e5: "ssolt" -0xc3e6: "ssolp" -0xc3e7: "ssolh" -0xc3e8: "ssom" -0xc3e9: "ssob" -0xc3ea: "ssobs" -0xc3eb: "ssos" -0xc3ec: "ssoss" -0xc3ed: "ssong" -0xc3ee: "ssoj" -0xc3ef: "ssoc" -0xc3f0: "ssok" -0xc3f1: "ssot" -0xc3f2: "ssop" -0xc3f3: "ssoh" -0xc3f4: "sswa" -0xc3f5: "sswag" -0xc3f6: "sswagg" -0xc3f7: "sswags" -0xc3f8: "sswan" -0xc3f9: "sswanj" -0xc3fa: "sswanh" -0xc3fb: "sswad" -0xc3fc: "sswal" -0xc3fd: "sswalg" -0xc3fe: "sswalm" -0xc3ff: "sswalb" -/* x0c4 */ -0xc400: "sswals" -0xc401: "sswalt" -0xc402: "sswalp" -0xc403: "sswalh" -0xc404: "sswam" -0xc405: "sswab" -0xc406: "sswabs" -0xc407: "sswas" -0xc408: "sswass" -0xc409: "sswang" -0xc40a: "sswaj" -0xc40b: "sswac" -0xc40c: "sswak" -0xc40d: "sswat" -0xc40e: "sswap" -0xc40f: "sswah" -0xc410: "sswae" -0xc411: "sswaeg" -0xc412: "sswaegg" -0xc413: "sswaegs" -0xc414: "sswaen" -0xc415: "sswaenj" -0xc416: "sswaenh" -0xc417: "sswaed" -0xc418: "sswael" -0xc419: "sswaelg" -0xc41a: "sswaelm" -0xc41b: "sswaelb" -0xc41c: "sswaels" -0xc41d: "sswaelt" -0xc41e: "sswaelp" -0xc41f: "sswaelh" -0xc420: "sswaem" -0xc421: "sswaeb" -0xc422: "sswaebs" -0xc423: "sswaes" -0xc424: "sswaess" -0xc425: "sswaeng" -0xc426: "sswaej" -0xc427: "sswaec" -0xc428: "sswaek" -0xc429: "sswaet" -0xc42a: "sswaep" -0xc42b: "sswaeh" -0xc42c: "ssoe" -0xc42d: "ssoeg" -0xc42e: "ssoegg" -0xc42f: "ssoegs" -0xc430: "ssoen" -0xc431: "ssoenj" -0xc432: "ssoenh" -0xc433: "ssoed" -0xc434: "ssoel" -0xc435: "ssoelg" -0xc436: "ssoelm" -0xc437: "ssoelb" -0xc438: "ssoels" -0xc439: "ssoelt" -0xc43a: "ssoelp" -0xc43b: "ssoelh" -0xc43c: "ssoem" -0xc43d: "ssoeb" -0xc43e: "ssoebs" -0xc43f: "ssoes" -0xc440: "ssoess" -0xc441: "ssoeng" -0xc442: "ssoej" -0xc443: "ssoec" -0xc444: "ssoek" -0xc445: "ssoet" -0xc446: "ssoep" -0xc447: "ssoeh" -0xc448: "ssyo" -0xc449: "ssyog" -0xc44a: "ssyogg" -0xc44b: "ssyogs" -0xc44c: "ssyon" -0xc44d: "ssyonj" -0xc44e: "ssyonh" -0xc44f: "ssyod" -0xc450: "ssyol" -0xc451: "ssyolg" -0xc452: "ssyolm" -0xc453: "ssyolb" -0xc454: "ssyols" -0xc455: "ssyolt" -0xc456: "ssyolp" -0xc457: "ssyolh" -0xc458: "ssyom" -0xc459: "ssyob" -0xc45a: "ssyobs" -0xc45b: "ssyos" -0xc45c: "ssyoss" -0xc45d: "ssyong" -0xc45e: "ssyoj" -0xc45f: "ssyoc" -0xc460: "ssyok" -0xc461: "ssyot" -0xc462: "ssyop" -0xc463: "ssyoh" -0xc464: "ssu" -0xc465: "ssug" -0xc466: "ssugg" -0xc467: "ssugs" -0xc468: "ssun" -0xc469: "ssunj" -0xc46a: "ssunh" -0xc46b: "ssud" -0xc46c: "ssul" -0xc46d: "ssulg" -0xc46e: "ssulm" -0xc46f: "ssulb" -0xc470: "ssuls" -0xc471: "ssult" -0xc472: "ssulp" -0xc473: "ssulh" -0xc474: "ssum" -0xc475: "ssub" -0xc476: "ssubs" -0xc477: "ssus" -0xc478: "ssuss" -0xc479: "ssung" -0xc47a: "ssuj" -0xc47b: "ssuc" -0xc47c: "ssuk" -0xc47d: "ssut" -0xc47e: "ssup" -0xc47f: "ssuh" -0xc480: "ssweo" -0xc481: "ssweog" -0xc482: "ssweogg" -0xc483: "ssweogs" -0xc484: "ssweon" -0xc485: "ssweonj" -0xc486: "ssweonh" -0xc487: "ssweod" -0xc488: "ssweol" -0xc489: "ssweolg" -0xc48a: "ssweolm" -0xc48b: "ssweolb" -0xc48c: "ssweols" -0xc48d: "ssweolt" -0xc48e: "ssweolp" -0xc48f: "ssweolh" -0xc490: "ssweom" -0xc491: "ssweob" -0xc492: "ssweobs" -0xc493: "ssweos" -0xc494: "ssweoss" -0xc495: "ssweong" -0xc496: "ssweoj" -0xc497: "ssweoc" -0xc498: "ssweok" -0xc499: "ssweot" -0xc49a: "ssweop" -0xc49b: "ssweoh" -0xc49c: "sswe" -0xc49d: "ssweg" -0xc49e: "sswegg" -0xc49f: "sswegs" -0xc4a0: "sswen" -0xc4a1: "sswenj" -0xc4a2: "sswenh" -0xc4a3: "sswed" -0xc4a4: "sswel" -0xc4a5: "sswelg" -0xc4a6: "sswelm" -0xc4a7: "sswelb" -0xc4a8: "sswels" -0xc4a9: "sswelt" -0xc4aa: "sswelp" -0xc4ab: "sswelh" -0xc4ac: "sswem" -0xc4ad: "ssweb" -0xc4ae: "sswebs" -0xc4af: "sswes" -0xc4b0: "sswess" -0xc4b1: "ssweng" -0xc4b2: "sswej" -0xc4b3: "sswec" -0xc4b4: "sswek" -0xc4b5: "sswet" -0xc4b6: "sswep" -0xc4b7: "ssweh" -0xc4b8: "sswi" -0xc4b9: "sswig" -0xc4ba: "sswigg" -0xc4bb: "sswigs" -0xc4bc: "sswin" -0xc4bd: "sswinj" -0xc4be: "sswinh" -0xc4bf: "sswid" -0xc4c0: "sswil" -0xc4c1: "sswilg" -0xc4c2: "sswilm" -0xc4c3: "sswilb" -0xc4c4: "sswils" -0xc4c5: "sswilt" -0xc4c6: "sswilp" -0xc4c7: "sswilh" -0xc4c8: "sswim" -0xc4c9: "sswib" -0xc4ca: "sswibs" -0xc4cb: "sswis" -0xc4cc: "sswiss" -0xc4cd: "sswing" -0xc4ce: "sswij" -0xc4cf: "sswic" -0xc4d0: "sswik" -0xc4d1: "sswit" -0xc4d2: "sswip" -0xc4d3: "sswih" -0xc4d4: "ssyu" -0xc4d5: "ssyug" -0xc4d6: "ssyugg" -0xc4d7: "ssyugs" -0xc4d8: "ssyun" -0xc4d9: "ssyunj" -0xc4da: "ssyunh" -0xc4db: "ssyud" -0xc4dc: "ssyul" -0xc4dd: "ssyulg" -0xc4de: "ssyulm" -0xc4df: "ssyulb" -0xc4e0: "ssyuls" -0xc4e1: "ssyult" -0xc4e2: "ssyulp" -0xc4e3: "ssyulh" -0xc4e4: "ssyum" -0xc4e5: "ssyub" -0xc4e6: "ssyubs" -0xc4e7: "ssyus" -0xc4e8: "ssyuss" -0xc4e9: "ssyung" -0xc4ea: "ssyuj" -0xc4eb: "ssyuc" -0xc4ec: "ssyuk" -0xc4ed: "ssyut" -0xc4ee: "ssyup" -0xc4ef: "ssyuh" -0xc4f0: "sseu" -0xc4f1: "sseug" -0xc4f2: "sseugg" -0xc4f3: "sseugs" -0xc4f4: "sseun" -0xc4f5: "sseunj" -0xc4f6: "sseunh" -0xc4f7: "sseud" -0xc4f8: "sseul" -0xc4f9: "sseulg" -0xc4fa: "sseulm" -0xc4fb: "sseulb" -0xc4fc: "sseuls" -0xc4fd: "sseult" -0xc4fe: "sseulp" -0xc4ff: "sseulh" -/* x0c5 */ -0xc500: "sseum" -0xc501: "sseub" -0xc502: "sseubs" -0xc503: "sseus" -0xc504: "sseuss" -0xc505: "sseung" -0xc506: "sseuj" -0xc507: "sseuc" -0xc508: "sseuk" -0xc509: "sseut" -0xc50a: "sseup" -0xc50b: "sseuh" -0xc50c: "ssyi" -0xc50d: "ssyig" -0xc50e: "ssyigg" -0xc50f: "ssyigs" -0xc510: "ssyin" -0xc511: "ssyinj" -0xc512: "ssyinh" -0xc513: "ssyid" -0xc514: "ssyil" -0xc515: "ssyilg" -0xc516: "ssyilm" -0xc517: "ssyilb" -0xc518: "ssyils" -0xc519: "ssyilt" -0xc51a: "ssyilp" -0xc51b: "ssyilh" -0xc51c: "ssyim" -0xc51d: "ssyib" -0xc51e: "ssyibs" -0xc51f: "ssyis" -0xc520: "ssyiss" -0xc521: "ssying" -0xc522: "ssyij" -0xc523: "ssyic" -0xc524: "ssyik" -0xc525: "ssyit" -0xc526: "ssyip" -0xc527: "ssyih" -0xc528: "ssi" -0xc529: "ssig" -0xc52a: "ssigg" -0xc52b: "ssigs" -0xc52c: "ssin" -0xc52d: "ssinj" -0xc52e: "ssinh" -0xc52f: "ssid" -0xc530: "ssil" -0xc531: "ssilg" -0xc532: "ssilm" -0xc533: "ssilb" -0xc534: "ssils" -0xc535: "ssilt" -0xc536: "ssilp" -0xc537: "ssilh" -0xc538: "ssim" -0xc539: "ssib" -0xc53a: "ssibs" -0xc53b: "ssis" -0xc53c: "ssiss" -0xc53d: "ssing" -0xc53e: "ssij" -0xc53f: "ssic" -0xc540: "ssik" -0xc541: "ssit" -0xc542: "ssip" -0xc543: "ssih" -0xc544: "a" -0xc545: "ag" -0xc546: "agg" -0xc547: "ags" -0xc548: "an" -0xc549: "anj" -0xc54a: "anh" -0xc54b: "ad" -0xc54c: "al" -0xc54d: "alg" -0xc54e: "alm" -0xc54f: "alb" -0xc550: "als" -0xc551: "alt" -0xc552: "alp" -0xc553: "alh" -0xc554: "am" -0xc555: "ab" -0xc556: "abs" -0xc557: "as" -0xc558: "ass" -0xc559: "ang" -0xc55a: "aj" -0xc55b: "ac" -0xc55c: "ak" -0xc55d: "at" -0xc55e: "ap" -0xc55f: "ah" -0xc560: "ae" -0xc561: "aeg" -0xc562: "aegg" -0xc563: "aegs" -0xc564: "aen" -0xc565: "aenj" -0xc566: "aenh" -0xc567: "aed" -0xc568: "ael" -0xc569: "aelg" -0xc56a: "aelm" -0xc56b: "aelb" -0xc56c: "aels" -0xc56d: "aelt" -0xc56e: "aelp" -0xc56f: "aelh" -0xc570: "aem" -0xc571: "aeb" -0xc572: "aebs" -0xc573: "aes" -0xc574: "aess" -0xc575: "aeng" -0xc576: "aej" -0xc577: "aec" -0xc578: "aek" -0xc579: "aet" -0xc57a: "aep" -0xc57b: "aeh" -0xc57c: "ya" -0xc57d: "yag" -0xc57e: "yagg" -0xc57f: "yags" -0xc580: "yan" -0xc581: "yanj" -0xc582: "yanh" -0xc583: "yad" -0xc584: "yal" -0xc585: "yalg" -0xc586: "yalm" -0xc587: "yalb" -0xc588: "yals" -0xc589: "yalt" -0xc58a: "yalp" -0xc58b: "yalh" -0xc58c: "yam" -0xc58d: "yab" -0xc58e: "yabs" -0xc58f: "yas" -0xc590: "yass" -0xc591: "yang" -0xc592: "yaj" -0xc593: "yac" -0xc594: "yak" -0xc595: "yat" -0xc596: "yap" -0xc597: "yah" -0xc598: "yae" -0xc599: "yaeg" -0xc59a: "yaegg" -0xc59b: "yaegs" -0xc59c: "yaen" -0xc59d: "yaenj" -0xc59e: "yaenh" -0xc59f: "yaed" -0xc5a0: "yael" -0xc5a1: "yaelg" -0xc5a2: "yaelm" -0xc5a3: "yaelb" -0xc5a4: "yaels" -0xc5a5: "yaelt" -0xc5a6: "yaelp" -0xc5a7: "yaelh" -0xc5a8: "yaem" -0xc5a9: "yaeb" -0xc5aa: "yaebs" -0xc5ab: "yaes" -0xc5ac: "yaess" -0xc5ad: "yaeng" -0xc5ae: "yaej" -0xc5af: "yaec" -0xc5b0: "yaek" -0xc5b1: "yaet" -0xc5b2: "yaep" -0xc5b3: "yaeh" -0xc5b4: "eo" -0xc5b5: "eog" -0xc5b6: "eogg" -0xc5b7: "eogs" -0xc5b8: "eon" -0xc5b9: "eonj" -0xc5ba: "eonh" -0xc5bb: "eod" -0xc5bc: "eol" -0xc5bd: "eolg" -0xc5be: "eolm" -0xc5bf: "eolb" -0xc5c0: "eols" -0xc5c1: "eolt" -0xc5c2: "eolp" -0xc5c3: "eolh" -0xc5c4: "eom" -0xc5c5: "eob" -0xc5c6: "eobs" -0xc5c7: "eos" -0xc5c8: "eoss" -0xc5c9: "eong" -0xc5ca: "eoj" -0xc5cb: "eoc" -0xc5cc: "eok" -0xc5cd: "eot" -0xc5ce: "eop" -0xc5cf: "eoh" -0xc5d0: "e" -0xc5d1: "eg" -0xc5d2: "egg" -0xc5d3: "egs" -0xc5d4: "en" -0xc5d5: "enj" -0xc5d6: "enh" -0xc5d7: "ed" -0xc5d8: "el" -0xc5d9: "elg" -0xc5da: "elm" -0xc5db: "elb" -0xc5dc: "els" -0xc5dd: "elt" -0xc5de: "elp" -0xc5df: "elh" -0xc5e0: "em" -0xc5e1: "eb" -0xc5e2: "ebs" -0xc5e3: "es" -0xc5e4: "ess" -0xc5e5: "eng" -0xc5e6: "ej" -0xc5e7: "ec" -0xc5e8: "ek" -0xc5e9: "et" -0xc5ea: "ep" -0xc5eb: "eh" -0xc5ec: "yeo" -0xc5ed: "yeog" -0xc5ee: "yeogg" -0xc5ef: "yeogs" -0xc5f0: "yeon" -0xc5f1: "yeonj" -0xc5f2: "yeonh" -0xc5f3: "yeod" -0xc5f4: "yeol" -0xc5f5: "yeolg" -0xc5f6: "yeolm" -0xc5f7: "yeolb" -0xc5f8: "yeols" -0xc5f9: "yeolt" -0xc5fa: "yeolp" -0xc5fb: "yeolh" -0xc5fc: "yeom" -0xc5fd: "yeob" -0xc5fe: "yeobs" -0xc5ff: "yeos" -/* x0c6 */ -0xc600: "yeoss" -0xc601: "yeong" -0xc602: "yeoj" -0xc603: "yeoc" -0xc604: "yeok" -0xc605: "yeot" -0xc606: "yeop" -0xc607: "yeoh" -0xc608: "ye" -0xc609: "yeg" -0xc60a: "yegg" -0xc60b: "yegs" -0xc60c: "yen" -0xc60d: "yenj" -0xc60e: "yenh" -0xc60f: "yed" -0xc610: "yel" -0xc611: "yelg" -0xc612: "yelm" -0xc613: "yelb" -0xc614: "yels" -0xc615: "yelt" -0xc616: "yelp" -0xc617: "yelh" -0xc618: "yem" -0xc619: "yeb" -0xc61a: "yebs" -0xc61b: "yes" -0xc61c: "yess" -0xc61d: "yeng" -0xc61e: "yej" -0xc61f: "yec" -0xc620: "yek" -0xc621: "yet" -0xc622: "yep" -0xc623: "yeh" -0xc624: "o" -0xc625: "og" -0xc626: "ogg" -0xc627: "ogs" -0xc628: "on" -0xc629: "onj" -0xc62a: "onh" -0xc62b: "od" -0xc62c: "ol" -0xc62d: "olg" -0xc62e: "olm" -0xc62f: "olb" -0xc630: "ols" -0xc631: "olt" -0xc632: "olp" -0xc633: "olh" -0xc634: "om" -0xc635: "ob" -0xc636: "obs" -0xc637: "os" -0xc638: "oss" -0xc639: "ong" -0xc63a: "oj" -0xc63b: "oc" -0xc63c: "ok" -0xc63d: "ot" -0xc63e: "op" -0xc63f: "oh" -0xc640: "wa" -0xc641: "wag" -0xc642: "wagg" -0xc643: "wags" -0xc644: "wan" -0xc645: "wanj" -0xc646: "wanh" -0xc647: "wad" -0xc648: "wal" -0xc649: "walg" -0xc64a: "walm" -0xc64b: "walb" -0xc64c: "wals" -0xc64d: "walt" -0xc64e: "walp" -0xc64f: "walh" -0xc650: "wam" -0xc651: "wab" -0xc652: "wabs" -0xc653: "was" -0xc654: "wass" -0xc655: "wang" -0xc656: "waj" -0xc657: "wac" -0xc658: "wak" -0xc659: "wat" -0xc65a: "wap" -0xc65b: "wah" -0xc65c: "wae" -0xc65d: "waeg" -0xc65e: "waegg" -0xc65f: "waegs" -0xc660: "waen" -0xc661: "waenj" -0xc662: "waenh" -0xc663: "waed" -0xc664: "wael" -0xc665: "waelg" -0xc666: "waelm" -0xc667: "waelb" -0xc668: "waels" -0xc669: "waelt" -0xc66a: "waelp" -0xc66b: "waelh" -0xc66c: "waem" -0xc66d: "waeb" -0xc66e: "waebs" -0xc66f: "waes" -0xc670: "waess" -0xc671: "waeng" -0xc672: "waej" -0xc673: "waec" -0xc674: "waek" -0xc675: "waet" -0xc676: "waep" -0xc677: "waeh" -0xc678: "oe" -0xc679: "oeg" -0xc67a: "oegg" -0xc67b: "oegs" -0xc67c: "oen" -0xc67d: "oenj" -0xc67e: "oenh" -0xc67f: "oed" -0xc680: "oel" -0xc681: "oelg" -0xc682: "oelm" -0xc683: "oelb" -0xc684: "oels" -0xc685: "oelt" -0xc686: "oelp" -0xc687: "oelh" -0xc688: "oem" -0xc689: "oeb" -0xc68a: "oebs" -0xc68b: "oes" -0xc68c: "oess" -0xc68d: "oeng" -0xc68e: "oej" -0xc68f: "oec" -0xc690: "oek" -0xc691: "oet" -0xc692: "oep" -0xc693: "oeh" -0xc694: "yo" -0xc695: "yog" -0xc696: "yogg" -0xc697: "yogs" -0xc698: "yon" -0xc699: "yonj" -0xc69a: "yonh" -0xc69b: "yod" -0xc69c: "yol" -0xc69d: "yolg" -0xc69e: "yolm" -0xc69f: "yolb" -0xc6a0: "yols" -0xc6a1: "yolt" -0xc6a2: "yolp" -0xc6a3: "yolh" -0xc6a4: "yom" -0xc6a5: "yob" -0xc6a6: "yobs" -0xc6a7: "yos" -0xc6a8: "yoss" -0xc6a9: "yong" -0xc6aa: "yoj" -0xc6ab: "yoc" -0xc6ac: "yok" -0xc6ad: "yot" -0xc6ae: "yop" -0xc6af: "yoh" -0xc6b0: "u" -0xc6b1: "ug" -0xc6b2: "ugg" -0xc6b3: "ugs" -0xc6b4: "un" -0xc6b5: "unj" -0xc6b6: "unh" -0xc6b7: "ud" -0xc6b8: "ul" -0xc6b9: "ulg" -0xc6ba: "ulm" -0xc6bb: "ulb" -0xc6bc: "uls" -0xc6bd: "ult" -0xc6be: "ulp" -0xc6bf: "ulh" -0xc6c0: "um" -0xc6c1: "ub" -0xc6c2: "ubs" -0xc6c3: "us" -0xc6c4: "uss" -0xc6c5: "ung" -0xc6c6: "uj" -0xc6c7: "uc" -0xc6c8: "uk" -0xc6c9: "ut" -0xc6ca: "up" -0xc6cb: "uh" -0xc6cc: "weo" -0xc6cd: "weog" -0xc6ce: "weogg" -0xc6cf: "weogs" -0xc6d0: "weon" -0xc6d1: "weonj" -0xc6d2: "weonh" -0xc6d3: "weod" -0xc6d4: "weol" -0xc6d5: "weolg" -0xc6d6: "weolm" -0xc6d7: "weolb" -0xc6d8: "weols" -0xc6d9: "weolt" -0xc6da: "weolp" -0xc6db: "weolh" -0xc6dc: "weom" -0xc6dd: "weob" -0xc6de: "weobs" -0xc6df: "weos" -0xc6e0: "weoss" -0xc6e1: "weong" -0xc6e2: "weoj" -0xc6e3: "weoc" -0xc6e4: "weok" -0xc6e5: "weot" -0xc6e6: "weop" -0xc6e7: "weoh" -0xc6e8: "we" -0xc6e9: "weg" -0xc6ea: "wegg" -0xc6eb: "wegs" -0xc6ec: "wen" -0xc6ed: "wenj" -0xc6ee: "wenh" -0xc6ef: "wed" -0xc6f0: "wel" -0xc6f1: "welg" -0xc6f2: "welm" -0xc6f3: "welb" -0xc6f4: "wels" -0xc6f5: "welt" -0xc6f6: "welp" -0xc6f7: "welh" -0xc6f8: "wem" -0xc6f9: "web" -0xc6fa: "webs" -0xc6fb: "wes" -0xc6fc: "wess" -0xc6fd: "weng" -0xc6fe: "wej" -0xc6ff: "wec" -/* x0c7 */ -0xc700: "wek" -0xc701: "wet" -0xc702: "wep" -0xc703: "weh" -0xc704: "wi" -0xc705: "wig" -0xc706: "wigg" -0xc707: "wigs" -0xc708: "win" -0xc709: "winj" -0xc70a: "winh" -0xc70b: "wid" -0xc70c: "wil" -0xc70d: "wilg" -0xc70e: "wilm" -0xc70f: "wilb" -0xc710: "wils" -0xc711: "wilt" -0xc712: "wilp" -0xc713: "wilh" -0xc714: "wim" -0xc715: "wib" -0xc716: "wibs" -0xc717: "wis" -0xc718: "wiss" -0xc719: "wing" -0xc71a: "wij" -0xc71b: "wic" -0xc71c: "wik" -0xc71d: "wit" -0xc71e: "wip" -0xc71f: "wih" -0xc720: "yu" -0xc721: "yug" -0xc722: "yugg" -0xc723: "yugs" -0xc724: "yun" -0xc725: "yunj" -0xc726: "yunh" -0xc727: "yud" -0xc728: "yul" -0xc729: "yulg" -0xc72a: "yulm" -0xc72b: "yulb" -0xc72c: "yuls" -0xc72d: "yult" -0xc72e: "yulp" -0xc72f: "yulh" -0xc730: "yum" -0xc731: "yub" -0xc732: "yubs" -0xc733: "yus" -0xc734: "yuss" -0xc735: "yung" -0xc736: "yuj" -0xc737: "yuc" -0xc738: "yuk" -0xc739: "yut" -0xc73a: "yup" -0xc73b: "yuh" -0xc73c: "eu" -0xc73d: "eug" -0xc73e: "eugg" -0xc73f: "eugs" -0xc740: "eun" -0xc741: "eunj" -0xc742: "eunh" -0xc743: "eud" -0xc744: "eul" -0xc745: "eulg" -0xc746: "eulm" -0xc747: "eulb" -0xc748: "euls" -0xc749: "eult" -0xc74a: "eulp" -0xc74b: "eulh" -0xc74c: "eum" -0xc74d: "eub" -0xc74e: "eubs" -0xc74f: "eus" -0xc750: "euss" -0xc751: "eung" -0xc752: "euj" -0xc753: "euc" -0xc754: "euk" -0xc755: "eut" -0xc756: "eup" -0xc757: "euh" -0xc758: "yi" -0xc759: "yig" -0xc75a: "yigg" -0xc75b: "yigs" -0xc75c: "yin" -0xc75d: "yinj" -0xc75e: "yinh" -0xc75f: "yid" -0xc760: "yil" -0xc761: "yilg" -0xc762: "yilm" -0xc763: "yilb" -0xc764: "yils" -0xc765: "yilt" -0xc766: "yilp" -0xc767: "yilh" -0xc768: "yim" -0xc769: "yib" -0xc76a: "yibs" -0xc76b: "yis" -0xc76c: "yiss" -0xc76d: "ying" -0xc76e: "yij" -0xc76f: "yic" -0xc770: "yik" -0xc771: "yit" -0xc772: "yip" -0xc773: "yih" -0xc774: "i" -0xc775: "ig" -0xc776: "igg" -0xc777: "igs" -0xc778: "in" -0xc779: "inj" -0xc77a: "inh" -0xc77b: "id" -0xc77c: "il" -0xc77d: "ilg" -0xc77e: "ilm" -0xc77f: "ilb" -0xc780: "ils" -0xc781: "ilt" -0xc782: "ilp" -0xc783: "ilh" -0xc784: "im" -0xc785: "ib" -0xc786: "ibs" -0xc787: "is" -0xc788: "iss" -0xc789: "ing" -0xc78a: "ij" -0xc78b: "ic" -0xc78c: "ik" -0xc78d: "it" -0xc78e: "ip" -0xc78f: "ih" -0xc790: "ja" -0xc791: "jag" -0xc792: "jagg" -0xc793: "jags" -0xc794: "jan" -0xc795: "janj" -0xc796: "janh" -0xc797: "jad" -0xc798: "jal" -0xc799: "jalg" -0xc79a: "jalm" -0xc79b: "jalb" -0xc79c: "jals" -0xc79d: "jalt" -0xc79e: "jalp" -0xc79f: "jalh" -0xc7a0: "jam" -0xc7a1: "jab" -0xc7a2: "jabs" -0xc7a3: "jas" -0xc7a4: "jass" -0xc7a5: "jang" -0xc7a6: "jaj" -0xc7a7: "jac" -0xc7a8: "jak" -0xc7a9: "jat" -0xc7aa: "jap" -0xc7ab: "jah" -0xc7ac: "jae" -0xc7ad: "jaeg" -0xc7ae: "jaegg" -0xc7af: "jaegs" -0xc7b0: "jaen" -0xc7b1: "jaenj" -0xc7b2: "jaenh" -0xc7b3: "jaed" -0xc7b4: "jael" -0xc7b5: "jaelg" -0xc7b6: "jaelm" -0xc7b7: "jaelb" -0xc7b8: "jaels" -0xc7b9: "jaelt" -0xc7ba: "jaelp" -0xc7bb: "jaelh" -0xc7bc: "jaem" -0xc7bd: "jaeb" -0xc7be: "jaebs" -0xc7bf: "jaes" -0xc7c0: "jaess" -0xc7c1: "jaeng" -0xc7c2: "jaej" -0xc7c3: "jaec" -0xc7c4: "jaek" -0xc7c5: "jaet" -0xc7c6: "jaep" -0xc7c7: "jaeh" -0xc7c8: "jya" -0xc7c9: "jyag" -0xc7ca: "jyagg" -0xc7cb: "jyags" -0xc7cc: "jyan" -0xc7cd: "jyanj" -0xc7ce: "jyanh" -0xc7cf: "jyad" -0xc7d0: "jyal" -0xc7d1: "jyalg" -0xc7d2: "jyalm" -0xc7d3: "jyalb" -0xc7d4: "jyals" -0xc7d5: "jyalt" -0xc7d6: "jyalp" -0xc7d7: "jyalh" -0xc7d8: "jyam" -0xc7d9: "jyab" -0xc7da: "jyabs" -0xc7db: "jyas" -0xc7dc: "jyass" -0xc7dd: "jyang" -0xc7de: "jyaj" -0xc7df: "jyac" -0xc7e0: "jyak" -0xc7e1: "jyat" -0xc7e2: "jyap" -0xc7e3: "jyah" -0xc7e4: "jyae" -0xc7e5: "jyaeg" -0xc7e6: "jyaegg" -0xc7e7: "jyaegs" -0xc7e8: "jyaen" -0xc7e9: "jyaenj" -0xc7ea: "jyaenh" -0xc7eb: "jyaed" -0xc7ec: "jyael" -0xc7ed: "jyaelg" -0xc7ee: "jyaelm" -0xc7ef: "jyaelb" -0xc7f0: "jyaels" -0xc7f1: "jyaelt" -0xc7f2: "jyaelp" -0xc7f3: "jyaelh" -0xc7f4: "jyaem" -0xc7f5: "jyaeb" -0xc7f6: "jyaebs" -0xc7f7: "jyaes" -0xc7f8: "jyaess" -0xc7f9: "jyaeng" -0xc7fa: "jyaej" -0xc7fb: "jyaec" -0xc7fc: "jyaek" -0xc7fd: "jyaet" -0xc7fe: "jyaep" -0xc7ff: "jyaeh" -/* x0c8 */ -0xc800: "jeo" -0xc801: "jeog" -0xc802: "jeogg" -0xc803: "jeogs" -0xc804: "jeon" -0xc805: "jeonj" -0xc806: "jeonh" -0xc807: "jeod" -0xc808: "jeol" -0xc809: "jeolg" -0xc80a: "jeolm" -0xc80b: "jeolb" -0xc80c: "jeols" -0xc80d: "jeolt" -0xc80e: "jeolp" -0xc80f: "jeolh" -0xc810: "jeom" -0xc811: "jeob" -0xc812: "jeobs" -0xc813: "jeos" -0xc814: "jeoss" -0xc815: "jeong" -0xc816: "jeoj" -0xc817: "jeoc" -0xc818: "jeok" -0xc819: "jeot" -0xc81a: "jeop" -0xc81b: "jeoh" -0xc81c: "je" -0xc81d: "jeg" -0xc81e: "jegg" -0xc81f: "jegs" -0xc820: "jen" -0xc821: "jenj" -0xc822: "jenh" -0xc823: "jed" -0xc824: "jel" -0xc825: "jelg" -0xc826: "jelm" -0xc827: "jelb" -0xc828: "jels" -0xc829: "jelt" -0xc82a: "jelp" -0xc82b: "jelh" -0xc82c: "jem" -0xc82d: "jeb" -0xc82e: "jebs" -0xc82f: "jes" -0xc830: "jess" -0xc831: "jeng" -0xc832: "jej" -0xc833: "jec" -0xc834: "jek" -0xc835: "jet" -0xc836: "jep" -0xc837: "jeh" -0xc838: "jyeo" -0xc839: "jyeog" -0xc83a: "jyeogg" -0xc83b: "jyeogs" -0xc83c: "jyeon" -0xc83d: "jyeonj" -0xc83e: "jyeonh" -0xc83f: "jyeod" -0xc840: "jyeol" -0xc841: "jyeolg" -0xc842: "jyeolm" -0xc843: "jyeolb" -0xc844: "jyeols" -0xc845: "jyeolt" -0xc846: "jyeolp" -0xc847: "jyeolh" -0xc848: "jyeom" -0xc849: "jyeob" -0xc84a: "jyeobs" -0xc84b: "jyeos" -0xc84c: "jyeoss" -0xc84d: "jyeong" -0xc84e: "jyeoj" -0xc84f: "jyeoc" -0xc850: "jyeok" -0xc851: "jyeot" -0xc852: "jyeop" -0xc853: "jyeoh" -0xc854: "jye" -0xc855: "jyeg" -0xc856: "jyegg" -0xc857: "jyegs" -0xc858: "jyen" -0xc859: "jyenj" -0xc85a: "jyenh" -0xc85b: "jyed" -0xc85c: "jyel" -0xc85d: "jyelg" -0xc85e: "jyelm" -0xc85f: "jyelb" -0xc860: "jyels" -0xc861: "jyelt" -0xc862: "jyelp" -0xc863: "jyelh" -0xc864: "jyem" -0xc865: "jyeb" -0xc866: "jyebs" -0xc867: "jyes" -0xc868: "jyess" -0xc869: "jyeng" -0xc86a: "jyej" -0xc86b: "jyec" -0xc86c: "jyek" -0xc86d: "jyet" -0xc86e: "jyep" -0xc86f: "jyeh" -0xc870: "jo" -0xc871: "jog" -0xc872: "jogg" -0xc873: "jogs" -0xc874: "jon" -0xc875: "jonj" -0xc876: "jonh" -0xc877: "jod" -0xc878: "jol" -0xc879: "jolg" -0xc87a: "jolm" -0xc87b: "jolb" -0xc87c: "jols" -0xc87d: "jolt" -0xc87e: "jolp" -0xc87f: "jolh" -0xc880: "jom" -0xc881: "job" -0xc882: "jobs" -0xc883: "jos" -0xc884: "joss" -0xc885: "jong" -0xc886: "joj" -0xc887: "joc" -0xc888: "jok" -0xc889: "jot" -0xc88a: "jop" -0xc88b: "joh" -0xc88c: "jwa" -0xc88d: "jwag" -0xc88e: "jwagg" -0xc88f: "jwags" -0xc890: "jwan" -0xc891: "jwanj" -0xc892: "jwanh" -0xc893: "jwad" -0xc894: "jwal" -0xc895: "jwalg" -0xc896: "jwalm" -0xc897: "jwalb" -0xc898: "jwals" -0xc899: "jwalt" -0xc89a: "jwalp" -0xc89b: "jwalh" -0xc89c: "jwam" -0xc89d: "jwab" -0xc89e: "jwabs" -0xc89f: "jwas" -0xc8a0: "jwass" -0xc8a1: "jwang" -0xc8a2: "jwaj" -0xc8a3: "jwac" -0xc8a4: "jwak" -0xc8a5: "jwat" -0xc8a6: "jwap" -0xc8a7: "jwah" -0xc8a8: "jwae" -0xc8a9: "jwaeg" -0xc8aa: "jwaegg" -0xc8ab: "jwaegs" -0xc8ac: "jwaen" -0xc8ad: "jwaenj" -0xc8ae: "jwaenh" -0xc8af: "jwaed" -0xc8b0: "jwael" -0xc8b1: "jwaelg" -0xc8b2: "jwaelm" -0xc8b3: "jwaelb" -0xc8b4: "jwaels" -0xc8b5: "jwaelt" -0xc8b6: "jwaelp" -0xc8b7: "jwaelh" -0xc8b8: "jwaem" -0xc8b9: "jwaeb" -0xc8ba: "jwaebs" -0xc8bb: "jwaes" -0xc8bc: "jwaess" -0xc8bd: "jwaeng" -0xc8be: "jwaej" -0xc8bf: "jwaec" -0xc8c0: "jwaek" -0xc8c1: "jwaet" -0xc8c2: "jwaep" -0xc8c3: "jwaeh" -0xc8c4: "joe" -0xc8c5: "joeg" -0xc8c6: "joegg" -0xc8c7: "joegs" -0xc8c8: "joen" -0xc8c9: "joenj" -0xc8ca: "joenh" -0xc8cb: "joed" -0xc8cc: "joel" -0xc8cd: "joelg" -0xc8ce: "joelm" -0xc8cf: "joelb" -0xc8d0: "joels" -0xc8d1: "joelt" -0xc8d2: "joelp" -0xc8d3: "joelh" -0xc8d4: "joem" -0xc8d5: "joeb" -0xc8d6: "joebs" -0xc8d7: "joes" -0xc8d8: "joess" -0xc8d9: "joeng" -0xc8da: "joej" -0xc8db: "joec" -0xc8dc: "joek" -0xc8dd: "joet" -0xc8de: "joep" -0xc8df: "joeh" -0xc8e0: "jyo" -0xc8e1: "jyog" -0xc8e2: "jyogg" -0xc8e3: "jyogs" -0xc8e4: "jyon" -0xc8e5: "jyonj" -0xc8e6: "jyonh" -0xc8e7: "jyod" -0xc8e8: "jyol" -0xc8e9: "jyolg" -0xc8ea: "jyolm" -0xc8eb: "jyolb" -0xc8ec: "jyols" -0xc8ed: "jyolt" -0xc8ee: "jyolp" -0xc8ef: "jyolh" -0xc8f0: "jyom" -0xc8f1: "jyob" -0xc8f2: "jyobs" -0xc8f3: "jyos" -0xc8f4: "jyoss" -0xc8f5: "jyong" -0xc8f6: "jyoj" -0xc8f7: "jyoc" -0xc8f8: "jyok" -0xc8f9: "jyot" -0xc8fa: "jyop" -0xc8fb: "jyoh" -0xc8fc: "ju" -0xc8fd: "jug" -0xc8fe: "jugg" -0xc8ff: "jugs" -/* x0c9 */ -0xc900: "jun" -0xc901: "junj" -0xc902: "junh" -0xc903: "jud" -0xc904: "jul" -0xc905: "julg" -0xc906: "julm" -0xc907: "julb" -0xc908: "juls" -0xc909: "jult" -0xc90a: "julp" -0xc90b: "julh" -0xc90c: "jum" -0xc90d: "jub" -0xc90e: "jubs" -0xc90f: "jus" -0xc910: "juss" -0xc911: "jung" -0xc912: "juj" -0xc913: "juc" -0xc914: "juk" -0xc915: "jut" -0xc916: "jup" -0xc917: "juh" -0xc918: "jweo" -0xc919: "jweog" -0xc91a: "jweogg" -0xc91b: "jweogs" -0xc91c: "jweon" -0xc91d: "jweonj" -0xc91e: "jweonh" -0xc91f: "jweod" -0xc920: "jweol" -0xc921: "jweolg" -0xc922: "jweolm" -0xc923: "jweolb" -0xc924: "jweols" -0xc925: "jweolt" -0xc926: "jweolp" -0xc927: "jweolh" -0xc928: "jweom" -0xc929: "jweob" -0xc92a: "jweobs" -0xc92b: "jweos" -0xc92c: "jweoss" -0xc92d: "jweong" -0xc92e: "jweoj" -0xc92f: "jweoc" -0xc930: "jweok" -0xc931: "jweot" -0xc932: "jweop" -0xc933: "jweoh" -0xc934: "jwe" -0xc935: "jweg" -0xc936: "jwegg" -0xc937: "jwegs" -0xc938: "jwen" -0xc939: "jwenj" -0xc93a: "jwenh" -0xc93b: "jwed" -0xc93c: "jwel" -0xc93d: "jwelg" -0xc93e: "jwelm" -0xc93f: "jwelb" -0xc940: "jwels" -0xc941: "jwelt" -0xc942: "jwelp" -0xc943: "jwelh" -0xc944: "jwem" -0xc945: "jweb" -0xc946: "jwebs" -0xc947: "jwes" -0xc948: "jwess" -0xc949: "jweng" -0xc94a: "jwej" -0xc94b: "jwec" -0xc94c: "jwek" -0xc94d: "jwet" -0xc94e: "jwep" -0xc94f: "jweh" -0xc950: "jwi" -0xc951: "jwig" -0xc952: "jwigg" -0xc953: "jwigs" -0xc954: "jwin" -0xc955: "jwinj" -0xc956: "jwinh" -0xc957: "jwid" -0xc958: "jwil" -0xc959: "jwilg" -0xc95a: "jwilm" -0xc95b: "jwilb" -0xc95c: "jwils" -0xc95d: "jwilt" -0xc95e: "jwilp" -0xc95f: "jwilh" -0xc960: "jwim" -0xc961: "jwib" -0xc962: "jwibs" -0xc963: "jwis" -0xc964: "jwiss" -0xc965: "jwing" -0xc966: "jwij" -0xc967: "jwic" -0xc968: "jwik" -0xc969: "jwit" -0xc96a: "jwip" -0xc96b: "jwih" -0xc96c: "jyu" -0xc96d: "jyug" -0xc96e: "jyugg" -0xc96f: "jyugs" -0xc970: "jyun" -0xc971: "jyunj" -0xc972: "jyunh" -0xc973: "jyud" -0xc974: "jyul" -0xc975: "jyulg" -0xc976: "jyulm" -0xc977: "jyulb" -0xc978: "jyuls" -0xc979: "jyult" -0xc97a: "jyulp" -0xc97b: "jyulh" -0xc97c: "jyum" -0xc97d: "jyub" -0xc97e: "jyubs" -0xc97f: "jyus" -0xc980: "jyuss" -0xc981: "jyung" -0xc982: "jyuj" -0xc983: "jyuc" -0xc984: "jyuk" -0xc985: "jyut" -0xc986: "jyup" -0xc987: "jyuh" -0xc988: "jeu" -0xc989: "jeug" -0xc98a: "jeugg" -0xc98b: "jeugs" -0xc98c: "jeun" -0xc98d: "jeunj" -0xc98e: "jeunh" -0xc98f: "jeud" -0xc990: "jeul" -0xc991: "jeulg" -0xc992: "jeulm" -0xc993: "jeulb" -0xc994: "jeuls" -0xc995: "jeult" -0xc996: "jeulp" -0xc997: "jeulh" -0xc998: "jeum" -0xc999: "jeub" -0xc99a: "jeubs" -0xc99b: "jeus" -0xc99c: "jeuss" -0xc99d: "jeung" -0xc99e: "jeuj" -0xc99f: "jeuc" -0xc9a0: "jeuk" -0xc9a1: "jeut" -0xc9a2: "jeup" -0xc9a3: "jeuh" -0xc9a4: "jyi" -0xc9a5: "jyig" -0xc9a6: "jyigg" -0xc9a7: "jyigs" -0xc9a8: "jyin" -0xc9a9: "jyinj" -0xc9aa: "jyinh" -0xc9ab: "jyid" -0xc9ac: "jyil" -0xc9ad: "jyilg" -0xc9ae: "jyilm" -0xc9af: "jyilb" -0xc9b0: "jyils" -0xc9b1: "jyilt" -0xc9b2: "jyilp" -0xc9b3: "jyilh" -0xc9b4: "jyim" -0xc9b5: "jyib" -0xc9b6: "jyibs" -0xc9b7: "jyis" -0xc9b8: "jyiss" -0xc9b9: "jying" -0xc9ba: "jyij" -0xc9bb: "jyic" -0xc9bc: "jyik" -0xc9bd: "jyit" -0xc9be: "jyip" -0xc9bf: "jyih" -0xc9c0: "ji" -0xc9c1: "jig" -0xc9c2: "jigg" -0xc9c3: "jigs" -0xc9c4: "jin" -0xc9c5: "jinj" -0xc9c6: "jinh" -0xc9c7: "jid" -0xc9c8: "jil" -0xc9c9: "jilg" -0xc9ca: "jilm" -0xc9cb: "jilb" -0xc9cc: "jils" -0xc9cd: "jilt" -0xc9ce: "jilp" -0xc9cf: "jilh" -0xc9d0: "jim" -0xc9d1: "jib" -0xc9d2: "jibs" -0xc9d3: "jis" -0xc9d4: "jiss" -0xc9d5: "jing" -0xc9d6: "jij" -0xc9d7: "jic" -0xc9d8: "jik" -0xc9d9: "jit" -0xc9da: "jip" -0xc9db: "jih" -0xc9dc: "jja" -0xc9dd: "jjag" -0xc9de: "jjagg" -0xc9df: "jjags" -0xc9e0: "jjan" -0xc9e1: "jjanj" -0xc9e2: "jjanh" -0xc9e3: "jjad" -0xc9e4: "jjal" -0xc9e5: "jjalg" -0xc9e6: "jjalm" -0xc9e7: "jjalb" -0xc9e8: "jjals" -0xc9e9: "jjalt" -0xc9ea: "jjalp" -0xc9eb: "jjalh" -0xc9ec: "jjam" -0xc9ed: "jjab" -0xc9ee: "jjabs" -0xc9ef: "jjas" -0xc9f0: "jjass" -0xc9f1: "jjang" -0xc9f2: "jjaj" -0xc9f3: "jjac" -0xc9f4: "jjak" -0xc9f5: "jjat" -0xc9f6: "jjap" -0xc9f7: "jjah" -0xc9f8: "jjae" -0xc9f9: "jjaeg" -0xc9fa: "jjaegg" -0xc9fb: "jjaegs" -0xc9fc: "jjaen" -0xc9fd: "jjaenj" -0xc9fe: "jjaenh" -0xc9ff: "jjaed" -/* x0ca */ -0xca00: "jjael" -0xca01: "jjaelg" -0xca02: "jjaelm" -0xca03: "jjaelb" -0xca04: "jjaels" -0xca05: "jjaelt" -0xca06: "jjaelp" -0xca07: "jjaelh" -0xca08: "jjaem" -0xca09: "jjaeb" -0xca0a: "jjaebs" -0xca0b: "jjaes" -0xca0c: "jjaess" -0xca0d: "jjaeng" -0xca0e: "jjaej" -0xca0f: "jjaec" -0xca10: "jjaek" -0xca11: "jjaet" -0xca12: "jjaep" -0xca13: "jjaeh" -0xca14: "jjya" -0xca15: "jjyag" -0xca16: "jjyagg" -0xca17: "jjyags" -0xca18: "jjyan" -0xca19: "jjyanj" -0xca1a: "jjyanh" -0xca1b: "jjyad" -0xca1c: "jjyal" -0xca1d: "jjyalg" -0xca1e: "jjyalm" -0xca1f: "jjyalb" -0xca20: "jjyals" -0xca21: "jjyalt" -0xca22: "jjyalp" -0xca23: "jjyalh" -0xca24: "jjyam" -0xca25: "jjyab" -0xca26: "jjyabs" -0xca27: "jjyas" -0xca28: "jjyass" -0xca29: "jjyang" -0xca2a: "jjyaj" -0xca2b: "jjyac" -0xca2c: "jjyak" -0xca2d: "jjyat" -0xca2e: "jjyap" -0xca2f: "jjyah" -0xca30: "jjyae" -0xca31: "jjyaeg" -0xca32: "jjyaegg" -0xca33: "jjyaegs" -0xca34: "jjyaen" -0xca35: "jjyaenj" -0xca36: "jjyaenh" -0xca37: "jjyaed" -0xca38: "jjyael" -0xca39: "jjyaelg" -0xca3a: "jjyaelm" -0xca3b: "jjyaelb" -0xca3c: "jjyaels" -0xca3d: "jjyaelt" -0xca3e: "jjyaelp" -0xca3f: "jjyaelh" -0xca40: "jjyaem" -0xca41: "jjyaeb" -0xca42: "jjyaebs" -0xca43: "jjyaes" -0xca44: "jjyaess" -0xca45: "jjyaeng" -0xca46: "jjyaej" -0xca47: "jjyaec" -0xca48: "jjyaek" -0xca49: "jjyaet" -0xca4a: "jjyaep" -0xca4b: "jjyaeh" -0xca4c: "jjeo" -0xca4d: "jjeog" -0xca4e: "jjeogg" -0xca4f: "jjeogs" -0xca50: "jjeon" -0xca51: "jjeonj" -0xca52: "jjeonh" -0xca53: "jjeod" -0xca54: "jjeol" -0xca55: "jjeolg" -0xca56: "jjeolm" -0xca57: "jjeolb" -0xca58: "jjeols" -0xca59: "jjeolt" -0xca5a: "jjeolp" -0xca5b: "jjeolh" -0xca5c: "jjeom" -0xca5d: "jjeob" -0xca5e: "jjeobs" -0xca5f: "jjeos" -0xca60: "jjeoss" -0xca61: "jjeong" -0xca62: "jjeoj" -0xca63: "jjeoc" -0xca64: "jjeok" -0xca65: "jjeot" -0xca66: "jjeop" -0xca67: "jjeoh" -0xca68: "jje" -0xca69: "jjeg" -0xca6a: "jjegg" -0xca6b: "jjegs" -0xca6c: "jjen" -0xca6d: "jjenj" -0xca6e: "jjenh" -0xca6f: "jjed" -0xca70: "jjel" -0xca71: "jjelg" -0xca72: "jjelm" -0xca73: "jjelb" -0xca74: "jjels" -0xca75: "jjelt" -0xca76: "jjelp" -0xca77: "jjelh" -0xca78: "jjem" -0xca79: "jjeb" -0xca7a: "jjebs" -0xca7b: "jjes" -0xca7c: "jjess" -0xca7d: "jjeng" -0xca7e: "jjej" -0xca7f: "jjec" -0xca80: "jjek" -0xca81: "jjet" -0xca82: "jjep" -0xca83: "jjeh" -0xca84: "jjyeo" -0xca85: "jjyeog" -0xca86: "jjyeogg" -0xca87: "jjyeogs" -0xca88: "jjyeon" -0xca89: "jjyeonj" -0xca8a: "jjyeonh" -0xca8b: "jjyeod" -0xca8c: "jjyeol" -0xca8d: "jjyeolg" -0xca8e: "jjyeolm" -0xca8f: "jjyeolb" -0xca90: "jjyeols" -0xca91: "jjyeolt" -0xca92: "jjyeolp" -0xca93: "jjyeolh" -0xca94: "jjyeom" -0xca95: "jjyeob" -0xca96: "jjyeobs" -0xca97: "jjyeos" -0xca98: "jjyeoss" -0xca99: "jjyeong" -0xca9a: "jjyeoj" -0xca9b: "jjyeoc" -0xca9c: "jjyeok" -0xca9d: "jjyeot" -0xca9e: "jjyeop" -0xca9f: "jjyeoh" -0xcaa0: "jjye" -0xcaa1: "jjyeg" -0xcaa2: "jjyegg" -0xcaa3: "jjyegs" -0xcaa4: "jjyen" -0xcaa5: "jjyenj" -0xcaa6: "jjyenh" -0xcaa7: "jjyed" -0xcaa8: "jjyel" -0xcaa9: "jjyelg" -0xcaaa: "jjyelm" -0xcaab: "jjyelb" -0xcaac: "jjyels" -0xcaad: "jjyelt" -0xcaae: "jjyelp" -0xcaaf: "jjyelh" -0xcab0: "jjyem" -0xcab1: "jjyeb" -0xcab2: "jjyebs" -0xcab3: "jjyes" -0xcab4: "jjyess" -0xcab5: "jjyeng" -0xcab6: "jjyej" -0xcab7: "jjyec" -0xcab8: "jjyek" -0xcab9: "jjyet" -0xcaba: "jjyep" -0xcabb: "jjyeh" -0xcabc: "jjo" -0xcabd: "jjog" -0xcabe: "jjogg" -0xcabf: "jjogs" -0xcac0: "jjon" -0xcac1: "jjonj" -0xcac2: "jjonh" -0xcac3: "jjod" -0xcac4: "jjol" -0xcac5: "jjolg" -0xcac6: "jjolm" -0xcac7: "jjolb" -0xcac8: "jjols" -0xcac9: "jjolt" -0xcaca: "jjolp" -0xcacb: "jjolh" -0xcacc: "jjom" -0xcacd: "jjob" -0xcace: "jjobs" -0xcacf: "jjos" -0xcad0: "jjoss" -0xcad1: "jjong" -0xcad2: "jjoj" -0xcad3: "jjoc" -0xcad4: "jjok" -0xcad5: "jjot" -0xcad6: "jjop" -0xcad7: "jjoh" -0xcad8: "jjwa" -0xcad9: "jjwag" -0xcada: "jjwagg" -0xcadb: "jjwags" -0xcadc: "jjwan" -0xcadd: "jjwanj" -0xcade: "jjwanh" -0xcadf: "jjwad" -0xcae0: "jjwal" -0xcae1: "jjwalg" -0xcae2: "jjwalm" -0xcae3: "jjwalb" -0xcae4: "jjwals" -0xcae5: "jjwalt" -0xcae6: "jjwalp" -0xcae7: "jjwalh" -0xcae8: "jjwam" -0xcae9: "jjwab" -0xcaea: "jjwabs" -0xcaeb: "jjwas" -0xcaec: "jjwass" -0xcaed: "jjwang" -0xcaee: "jjwaj" -0xcaef: "jjwac" -0xcaf0: "jjwak" -0xcaf1: "jjwat" -0xcaf2: "jjwap" -0xcaf3: "jjwah" -0xcaf4: "jjwae" -0xcaf5: "jjwaeg" -0xcaf6: "jjwaegg" -0xcaf7: "jjwaegs" -0xcaf8: "jjwaen" -0xcaf9: "jjwaenj" -0xcafa: "jjwaenh" -0xcafb: "jjwaed" -0xcafc: "jjwael" -0xcafd: "jjwaelg" -0xcafe: "jjwaelm" -0xcaff: "jjwaelb" -/* x0cb */ -0xcb00: "jjwaels" -0xcb01: "jjwaelt" -0xcb02: "jjwaelp" -0xcb03: "jjwaelh" -0xcb04: "jjwaem" -0xcb05: "jjwaeb" -0xcb06: "jjwaebs" -0xcb07: "jjwaes" -0xcb08: "jjwaess" -0xcb09: "jjwaeng" -0xcb0a: "jjwaej" -0xcb0b: "jjwaec" -0xcb0c: "jjwaek" -0xcb0d: "jjwaet" -0xcb0e: "jjwaep" -0xcb0f: "jjwaeh" -0xcb10: "jjoe" -0xcb11: "jjoeg" -0xcb12: "jjoegg" -0xcb13: "jjoegs" -0xcb14: "jjoen" -0xcb15: "jjoenj" -0xcb16: "jjoenh" -0xcb17: "jjoed" -0xcb18: "jjoel" -0xcb19: "jjoelg" -0xcb1a: "jjoelm" -0xcb1b: "jjoelb" -0xcb1c: "jjoels" -0xcb1d: "jjoelt" -0xcb1e: "jjoelp" -0xcb1f: "jjoelh" -0xcb20: "jjoem" -0xcb21: "jjoeb" -0xcb22: "jjoebs" -0xcb23: "jjoes" -0xcb24: "jjoess" -0xcb25: "jjoeng" -0xcb26: "jjoej" -0xcb27: "jjoec" -0xcb28: "jjoek" -0xcb29: "jjoet" -0xcb2a: "jjoep" -0xcb2b: "jjoeh" -0xcb2c: "jjyo" -0xcb2d: "jjyog" -0xcb2e: "jjyogg" -0xcb2f: "jjyogs" -0xcb30: "jjyon" -0xcb31: "jjyonj" -0xcb32: "jjyonh" -0xcb33: "jjyod" -0xcb34: "jjyol" -0xcb35: "jjyolg" -0xcb36: "jjyolm" -0xcb37: "jjyolb" -0xcb38: "jjyols" -0xcb39: "jjyolt" -0xcb3a: "jjyolp" -0xcb3b: "jjyolh" -0xcb3c: "jjyom" -0xcb3d: "jjyob" -0xcb3e: "jjyobs" -0xcb3f: "jjyos" -0xcb40: "jjyoss" -0xcb41: "jjyong" -0xcb42: "jjyoj" -0xcb43: "jjyoc" -0xcb44: "jjyok" -0xcb45: "jjyot" -0xcb46: "jjyop" -0xcb47: "jjyoh" -0xcb48: "jju" -0xcb49: "jjug" -0xcb4a: "jjugg" -0xcb4b: "jjugs" -0xcb4c: "jjun" -0xcb4d: "jjunj" -0xcb4e: "jjunh" -0xcb4f: "jjud" -0xcb50: "jjul" -0xcb51: "jjulg" -0xcb52: "jjulm" -0xcb53: "jjulb" -0xcb54: "jjuls" -0xcb55: "jjult" -0xcb56: "jjulp" -0xcb57: "jjulh" -0xcb58: "jjum" -0xcb59: "jjub" -0xcb5a: "jjubs" -0xcb5b: "jjus" -0xcb5c: "jjuss" -0xcb5d: "jjung" -0xcb5e: "jjuj" -0xcb5f: "jjuc" -0xcb60: "jjuk" -0xcb61: "jjut" -0xcb62: "jjup" -0xcb63: "jjuh" -0xcb64: "jjweo" -0xcb65: "jjweog" -0xcb66: "jjweogg" -0xcb67: "jjweogs" -0xcb68: "jjweon" -0xcb69: "jjweonj" -0xcb6a: "jjweonh" -0xcb6b: "jjweod" -0xcb6c: "jjweol" -0xcb6d: "jjweolg" -0xcb6e: "jjweolm" -0xcb6f: "jjweolb" -0xcb70: "jjweols" -0xcb71: "jjweolt" -0xcb72: "jjweolp" -0xcb73: "jjweolh" -0xcb74: "jjweom" -0xcb75: "jjweob" -0xcb76: "jjweobs" -0xcb77: "jjweos" -0xcb78: "jjweoss" -0xcb79: "jjweong" -0xcb7a: "jjweoj" -0xcb7b: "jjweoc" -0xcb7c: "jjweok" -0xcb7d: "jjweot" -0xcb7e: "jjweop" -0xcb7f: "jjweoh" -0xcb80: "jjwe" -0xcb81: "jjweg" -0xcb82: "jjwegg" -0xcb83: "jjwegs" -0xcb84: "jjwen" -0xcb85: "jjwenj" -0xcb86: "jjwenh" -0xcb87: "jjwed" -0xcb88: "jjwel" -0xcb89: "jjwelg" -0xcb8a: "jjwelm" -0xcb8b: "jjwelb" -0xcb8c: "jjwels" -0xcb8d: "jjwelt" -0xcb8e: "jjwelp" -0xcb8f: "jjwelh" -0xcb90: "jjwem" -0xcb91: "jjweb" -0xcb92: "jjwebs" -0xcb93: "jjwes" -0xcb94: "jjwess" -0xcb95: "jjweng" -0xcb96: "jjwej" -0xcb97: "jjwec" -0xcb98: "jjwek" -0xcb99: "jjwet" -0xcb9a: "jjwep" -0xcb9b: "jjweh" -0xcb9c: "jjwi" -0xcb9d: "jjwig" -0xcb9e: "jjwigg" -0xcb9f: "jjwigs" -0xcba0: "jjwin" -0xcba1: "jjwinj" -0xcba2: "jjwinh" -0xcba3: "jjwid" -0xcba4: "jjwil" -0xcba5: "jjwilg" -0xcba6: "jjwilm" -0xcba7: "jjwilb" -0xcba8: "jjwils" -0xcba9: "jjwilt" -0xcbaa: "jjwilp" -0xcbab: "jjwilh" -0xcbac: "jjwim" -0xcbad: "jjwib" -0xcbae: "jjwibs" -0xcbaf: "jjwis" -0xcbb0: "jjwiss" -0xcbb1: "jjwing" -0xcbb2: "jjwij" -0xcbb3: "jjwic" -0xcbb4: "jjwik" -0xcbb5: "jjwit" -0xcbb6: "jjwip" -0xcbb7: "jjwih" -0xcbb8: "jjyu" -0xcbb9: "jjyug" -0xcbba: "jjyugg" -0xcbbb: "jjyugs" -0xcbbc: "jjyun" -0xcbbd: "jjyunj" -0xcbbe: "jjyunh" -0xcbbf: "jjyud" -0xcbc0: "jjyul" -0xcbc1: "jjyulg" -0xcbc2: "jjyulm" -0xcbc3: "jjyulb" -0xcbc4: "jjyuls" -0xcbc5: "jjyult" -0xcbc6: "jjyulp" -0xcbc7: "jjyulh" -0xcbc8: "jjyum" -0xcbc9: "jjyub" -0xcbca: "jjyubs" -0xcbcb: "jjyus" -0xcbcc: "jjyuss" -0xcbcd: "jjyung" -0xcbce: "jjyuj" -0xcbcf: "jjyuc" -0xcbd0: "jjyuk" -0xcbd1: "jjyut" -0xcbd2: "jjyup" -0xcbd3: "jjyuh" -0xcbd4: "jjeu" -0xcbd5: "jjeug" -0xcbd6: "jjeugg" -0xcbd7: "jjeugs" -0xcbd8: "jjeun" -0xcbd9: "jjeunj" -0xcbda: "jjeunh" -0xcbdb: "jjeud" -0xcbdc: "jjeul" -0xcbdd: "jjeulg" -0xcbde: "jjeulm" -0xcbdf: "jjeulb" -0xcbe0: "jjeuls" -0xcbe1: "jjeult" -0xcbe2: "jjeulp" -0xcbe3: "jjeulh" -0xcbe4: "jjeum" -0xcbe5: "jjeub" -0xcbe6: "jjeubs" -0xcbe7: "jjeus" -0xcbe8: "jjeuss" -0xcbe9: "jjeung" -0xcbea: "jjeuj" -0xcbeb: "jjeuc" -0xcbec: "jjeuk" -0xcbed: "jjeut" -0xcbee: "jjeup" -0xcbef: "jjeuh" -0xcbf0: "jjyi" -0xcbf1: "jjyig" -0xcbf2: "jjyigg" -0xcbf3: "jjyigs" -0xcbf4: "jjyin" -0xcbf5: "jjyinj" -0xcbf6: "jjyinh" -0xcbf7: "jjyid" -0xcbf8: "jjyil" -0xcbf9: "jjyilg" -0xcbfa: "jjyilm" -0xcbfb: "jjyilb" -0xcbfc: "jjyils" -0xcbfd: "jjyilt" -0xcbfe: "jjyilp" -0xcbff: "jjyilh" -/* x0cc */ -0xcc00: "jjyim" -0xcc01: "jjyib" -0xcc02: "jjyibs" -0xcc03: "jjyis" -0xcc04: "jjyiss" -0xcc05: "jjying" -0xcc06: "jjyij" -0xcc07: "jjyic" -0xcc08: "jjyik" -0xcc09: "jjyit" -0xcc0a: "jjyip" -0xcc0b: "jjyih" -0xcc0c: "jji" -0xcc0d: "jjig" -0xcc0e: "jjigg" -0xcc0f: "jjigs" -0xcc10: "jjin" -0xcc11: "jjinj" -0xcc12: "jjinh" -0xcc13: "jjid" -0xcc14: "jjil" -0xcc15: "jjilg" -0xcc16: "jjilm" -0xcc17: "jjilb" -0xcc18: "jjils" -0xcc19: "jjilt" -0xcc1a: "jjilp" -0xcc1b: "jjilh" -0xcc1c: "jjim" -0xcc1d: "jjib" -0xcc1e: "jjibs" -0xcc1f: "jjis" -0xcc20: "jjiss" -0xcc21: "jjing" -0xcc22: "jjij" -0xcc23: "jjic" -0xcc24: "jjik" -0xcc25: "jjit" -0xcc26: "jjip" -0xcc27: "jjih" -0xcc28: "ca" -0xcc29: "cag" -0xcc2a: "cagg" -0xcc2b: "cags" -0xcc2c: "can" -0xcc2d: "canj" -0xcc2e: "canh" -0xcc2f: "cad" -0xcc30: "cal" -0xcc31: "calg" -0xcc32: "calm" -0xcc33: "calb" -0xcc34: "cals" -0xcc35: "calt" -0xcc36: "calp" -0xcc37: "calh" -0xcc38: "cam" -0xcc39: "cab" -0xcc3a: "cabs" -0xcc3b: "cas" -0xcc3c: "cass" -0xcc3d: "cang" -0xcc3e: "caj" -0xcc3f: "cac" -0xcc40: "cak" -0xcc41: "cat" -0xcc42: "cap" -0xcc43: "cah" -0xcc44: "cae" -0xcc45: "caeg" -0xcc46: "caegg" -0xcc47: "caegs" -0xcc48: "caen" -0xcc49: "caenj" -0xcc4a: "caenh" -0xcc4b: "caed" -0xcc4c: "cael" -0xcc4d: "caelg" -0xcc4e: "caelm" -0xcc4f: "caelb" -0xcc50: "caels" -0xcc51: "caelt" -0xcc52: "caelp" -0xcc53: "caelh" -0xcc54: "caem" -0xcc55: "caeb" -0xcc56: "caebs" -0xcc57: "caes" -0xcc58: "caess" -0xcc59: "caeng" -0xcc5a: "caej" -0xcc5b: "caec" -0xcc5c: "caek" -0xcc5d: "caet" -0xcc5e: "caep" -0xcc5f: "caeh" -0xcc60: "cya" -0xcc61: "cyag" -0xcc62: "cyagg" -0xcc63: "cyags" -0xcc64: "cyan" -0xcc65: "cyanj" -0xcc66: "cyanh" -0xcc67: "cyad" -0xcc68: "cyal" -0xcc69: "cyalg" -0xcc6a: "cyalm" -0xcc6b: "cyalb" -0xcc6c: "cyals" -0xcc6d: "cyalt" -0xcc6e: "cyalp" -0xcc6f: "cyalh" -0xcc70: "cyam" -0xcc71: "cyab" -0xcc72: "cyabs" -0xcc73: "cyas" -0xcc74: "cyass" -0xcc75: "cyang" -0xcc76: "cyaj" -0xcc77: "cyac" -0xcc78: "cyak" -0xcc79: "cyat" -0xcc7a: "cyap" -0xcc7b: "cyah" -0xcc7c: "cyae" -0xcc7d: "cyaeg" -0xcc7e: "cyaegg" -0xcc7f: "cyaegs" -0xcc80: "cyaen" -0xcc81: "cyaenj" -0xcc82: "cyaenh" -0xcc83: "cyaed" -0xcc84: "cyael" -0xcc85: "cyaelg" -0xcc86: "cyaelm" -0xcc87: "cyaelb" -0xcc88: "cyaels" -0xcc89: "cyaelt" -0xcc8a: "cyaelp" -0xcc8b: "cyaelh" -0xcc8c: "cyaem" -0xcc8d: "cyaeb" -0xcc8e: "cyaebs" -0xcc8f: "cyaes" -0xcc90: "cyaess" -0xcc91: "cyaeng" -0xcc92: "cyaej" -0xcc93: "cyaec" -0xcc94: "cyaek" -0xcc95: "cyaet" -0xcc96: "cyaep" -0xcc97: "cyaeh" -0xcc98: "ceo" -0xcc99: "ceog" -0xcc9a: "ceogg" -0xcc9b: "ceogs" -0xcc9c: "ceon" -0xcc9d: "ceonj" -0xcc9e: "ceonh" -0xcc9f: "ceod" -0xcca0: "ceol" -0xcca1: "ceolg" -0xcca2: "ceolm" -0xcca3: "ceolb" -0xcca4: "ceols" -0xcca5: "ceolt" -0xcca6: "ceolp" -0xcca7: "ceolh" -0xcca8: "ceom" -0xcca9: "ceob" -0xccaa: "ceobs" -0xccab: "ceos" -0xccac: "ceoss" -0xccad: "ceong" -0xccae: "ceoj" -0xccaf: "ceoc" -0xccb0: "ceok" -0xccb1: "ceot" -0xccb2: "ceop" -0xccb3: "ceoh" -0xccb4: "ce" -0xccb5: "ceg" -0xccb6: "cegg" -0xccb7: "cegs" -0xccb8: "cen" -0xccb9: "cenj" -0xccba: "cenh" -0xccbb: "ced" -0xccbc: "cel" -0xccbd: "celg" -0xccbe: "celm" -0xccbf: "celb" -0xccc0: "cels" -0xccc1: "celt" -0xccc2: "celp" -0xccc3: "celh" -0xccc4: "cem" -0xccc5: "ceb" -0xccc6: "cebs" -0xccc7: "ces" -0xccc8: "cess" -0xccc9: "ceng" -0xccca: "cej" -0xcccb: "cec" -0xcccc: "cek" -0xcccd: "cet" -0xccce: "cep" -0xcccf: "ceh" -0xccd0: "cyeo" -0xccd1: "cyeog" -0xccd2: "cyeogg" -0xccd3: "cyeogs" -0xccd4: "cyeon" -0xccd5: "cyeonj" -0xccd6: "cyeonh" -0xccd7: "cyeod" -0xccd8: "cyeol" -0xccd9: "cyeolg" -0xccda: "cyeolm" -0xccdb: "cyeolb" -0xccdc: "cyeols" -0xccdd: "cyeolt" -0xccde: "cyeolp" -0xccdf: "cyeolh" -0xcce0: "cyeom" -0xcce1: "cyeob" -0xcce2: "cyeobs" -0xcce3: "cyeos" -0xcce4: "cyeoss" -0xcce5: "cyeong" -0xcce6: "cyeoj" -0xcce7: "cyeoc" -0xcce8: "cyeok" -0xcce9: "cyeot" -0xccea: "cyeop" -0xcceb: "cyeoh" -0xccec: "cye" -0xcced: "cyeg" -0xccee: "cyegg" -0xccef: "cyegs" -0xccf0: "cyen" -0xccf1: "cyenj" -0xccf2: "cyenh" -0xccf3: "cyed" -0xccf4: "cyel" -0xccf5: "cyelg" -0xccf6: "cyelm" -0xccf7: "cyelb" -0xccf8: "cyels" -0xccf9: "cyelt" -0xccfa: "cyelp" -0xccfb: "cyelh" -0xccfc: "cyem" -0xccfd: "cyeb" -0xccfe: "cyebs" -0xccff: "cyes" -/* x0cd */ -0xcd00: "cyess" -0xcd01: "cyeng" -0xcd02: "cyej" -0xcd03: "cyec" -0xcd04: "cyek" -0xcd05: "cyet" -0xcd06: "cyep" -0xcd07: "cyeh" -0xcd08: "co" -0xcd09: "cog" -0xcd0a: "cogg" -0xcd0b: "cogs" -0xcd0c: "con" -0xcd0d: "conj" -0xcd0e: "conh" -0xcd0f: "cod" -0xcd10: "col" -0xcd11: "colg" -0xcd12: "colm" -0xcd13: "colb" -0xcd14: "cols" -0xcd15: "colt" -0xcd16: "colp" -0xcd17: "colh" -0xcd18: "com" -0xcd19: "cob" -0xcd1a: "cobs" -0xcd1b: "cos" -0xcd1c: "coss" -0xcd1d: "cong" -0xcd1e: "coj" -0xcd1f: "coc" -0xcd20: "cok" -0xcd21: "cot" -0xcd22: "cop" -0xcd23: "coh" -0xcd24: "cwa" -0xcd25: "cwag" -0xcd26: "cwagg" -0xcd27: "cwags" -0xcd28: "cwan" -0xcd29: "cwanj" -0xcd2a: "cwanh" -0xcd2b: "cwad" -0xcd2c: "cwal" -0xcd2d: "cwalg" -0xcd2e: "cwalm" -0xcd2f: "cwalb" -0xcd30: "cwals" -0xcd31: "cwalt" -0xcd32: "cwalp" -0xcd33: "cwalh" -0xcd34: "cwam" -0xcd35: "cwab" -0xcd36: "cwabs" -0xcd37: "cwas" -0xcd38: "cwass" -0xcd39: "cwang" -0xcd3a: "cwaj" -0xcd3b: "cwac" -0xcd3c: "cwak" -0xcd3d: "cwat" -0xcd3e: "cwap" -0xcd3f: "cwah" -0xcd40: "cwae" -0xcd41: "cwaeg" -0xcd42: "cwaegg" -0xcd43: "cwaegs" -0xcd44: "cwaen" -0xcd45: "cwaenj" -0xcd46: "cwaenh" -0xcd47: "cwaed" -0xcd48: "cwael" -0xcd49: "cwaelg" -0xcd4a: "cwaelm" -0xcd4b: "cwaelb" -0xcd4c: "cwaels" -0xcd4d: "cwaelt" -0xcd4e: "cwaelp" -0xcd4f: "cwaelh" -0xcd50: "cwaem" -0xcd51: "cwaeb" -0xcd52: "cwaebs" -0xcd53: "cwaes" -0xcd54: "cwaess" -0xcd55: "cwaeng" -0xcd56: "cwaej" -0xcd57: "cwaec" -0xcd58: "cwaek" -0xcd59: "cwaet" -0xcd5a: "cwaep" -0xcd5b: "cwaeh" -0xcd5c: "coe" -0xcd5d: "coeg" -0xcd5e: "coegg" -0xcd5f: "coegs" -0xcd60: "coen" -0xcd61: "coenj" -0xcd62: "coenh" -0xcd63: "coed" -0xcd64: "coel" -0xcd65: "coelg" -0xcd66: "coelm" -0xcd67: "coelb" -0xcd68: "coels" -0xcd69: "coelt" -0xcd6a: "coelp" -0xcd6b: "coelh" -0xcd6c: "coem" -0xcd6d: "coeb" -0xcd6e: "coebs" -0xcd6f: "coes" -0xcd70: "coess" -0xcd71: "coeng" -0xcd72: "coej" -0xcd73: "coec" -0xcd74: "coek" -0xcd75: "coet" -0xcd76: "coep" -0xcd77: "coeh" -0xcd78: "cyo" -0xcd79: "cyog" -0xcd7a: "cyogg" -0xcd7b: "cyogs" -0xcd7c: "cyon" -0xcd7d: "cyonj" -0xcd7e: "cyonh" -0xcd7f: "cyod" -0xcd80: "cyol" -0xcd81: "cyolg" -0xcd82: "cyolm" -0xcd83: "cyolb" -0xcd84: "cyols" -0xcd85: "cyolt" -0xcd86: "cyolp" -0xcd87: "cyolh" -0xcd88: "cyom" -0xcd89: "cyob" -0xcd8a: "cyobs" -0xcd8b: "cyos" -0xcd8c: "cyoss" -0xcd8d: "cyong" -0xcd8e: "cyoj" -0xcd8f: "cyoc" -0xcd90: "cyok" -0xcd91: "cyot" -0xcd92: "cyop" -0xcd93: "cyoh" -0xcd94: "cu" -0xcd95: "cug" -0xcd96: "cugg" -0xcd97: "cugs" -0xcd98: "cun" -0xcd99: "cunj" -0xcd9a: "cunh" -0xcd9b: "cud" -0xcd9c: "cul" -0xcd9d: "culg" -0xcd9e: "culm" -0xcd9f: "culb" -0xcda0: "culs" -0xcda1: "cult" -0xcda2: "culp" -0xcda3: "culh" -0xcda4: "cum" -0xcda5: "cub" -0xcda6: "cubs" -0xcda7: "cus" -0xcda8: "cuss" -0xcda9: "cung" -0xcdaa: "cuj" -0xcdab: "cuc" -0xcdac: "cuk" -0xcdad: "cut" -0xcdae: "cup" -0xcdaf: "cuh" -0xcdb0: "cweo" -0xcdb1: "cweog" -0xcdb2: "cweogg" -0xcdb3: "cweogs" -0xcdb4: "cweon" -0xcdb5: "cweonj" -0xcdb6: "cweonh" -0xcdb7: "cweod" -0xcdb8: "cweol" -0xcdb9: "cweolg" -0xcdba: "cweolm" -0xcdbb: "cweolb" -0xcdbc: "cweols" -0xcdbd: "cweolt" -0xcdbe: "cweolp" -0xcdbf: "cweolh" -0xcdc0: "cweom" -0xcdc1: "cweob" -0xcdc2: "cweobs" -0xcdc3: "cweos" -0xcdc4: "cweoss" -0xcdc5: "cweong" -0xcdc6: "cweoj" -0xcdc7: "cweoc" -0xcdc8: "cweok" -0xcdc9: "cweot" -0xcdca: "cweop" -0xcdcb: "cweoh" -0xcdcc: "cwe" -0xcdcd: "cweg" -0xcdce: "cwegg" -0xcdcf: "cwegs" -0xcdd0: "cwen" -0xcdd1: "cwenj" -0xcdd2: "cwenh" -0xcdd3: "cwed" -0xcdd4: "cwel" -0xcdd5: "cwelg" -0xcdd6: "cwelm" -0xcdd7: "cwelb" -0xcdd8: "cwels" -0xcdd9: "cwelt" -0xcdda: "cwelp" -0xcddb: "cwelh" -0xcddc: "cwem" -0xcddd: "cweb" -0xcdde: "cwebs" -0xcddf: "cwes" -0xcde0: "cwess" -0xcde1: "cweng" -0xcde2: "cwej" -0xcde3: "cwec" -0xcde4: "cwek" -0xcde5: "cwet" -0xcde6: "cwep" -0xcde7: "cweh" -0xcde8: "cwi" -0xcde9: "cwig" -0xcdea: "cwigg" -0xcdeb: "cwigs" -0xcdec: "cwin" -0xcded: "cwinj" -0xcdee: "cwinh" -0xcdef: "cwid" -0xcdf0: "cwil" -0xcdf1: "cwilg" -0xcdf2: "cwilm" -0xcdf3: "cwilb" -0xcdf4: "cwils" -0xcdf5: "cwilt" -0xcdf6: "cwilp" -0xcdf7: "cwilh" -0xcdf8: "cwim" -0xcdf9: "cwib" -0xcdfa: "cwibs" -0xcdfb: "cwis" -0xcdfc: "cwiss" -0xcdfd: "cwing" -0xcdfe: "cwij" -0xcdff: "cwic" -/* x0ce */ -0xce00: "cwik" -0xce01: "cwit" -0xce02: "cwip" -0xce03: "cwih" -0xce04: "cyu" -0xce05: "cyug" -0xce06: "cyugg" -0xce07: "cyugs" -0xce08: "cyun" -0xce09: "cyunj" -0xce0a: "cyunh" -0xce0b: "cyud" -0xce0c: "cyul" -0xce0d: "cyulg" -0xce0e: "cyulm" -0xce0f: "cyulb" -0xce10: "cyuls" -0xce11: "cyult" -0xce12: "cyulp" -0xce13: "cyulh" -0xce14: "cyum" -0xce15: "cyub" -0xce16: "cyubs" -0xce17: "cyus" -0xce18: "cyuss" -0xce19: "cyung" -0xce1a: "cyuj" -0xce1b: "cyuc" -0xce1c: "cyuk" -0xce1d: "cyut" -0xce1e: "cyup" -0xce1f: "cyuh" -0xce20: "ceu" -0xce21: "ceug" -0xce22: "ceugg" -0xce23: "ceugs" -0xce24: "ceun" -0xce25: "ceunj" -0xce26: "ceunh" -0xce27: "ceud" -0xce28: "ceul" -0xce29: "ceulg" -0xce2a: "ceulm" -0xce2b: "ceulb" -0xce2c: "ceuls" -0xce2d: "ceult" -0xce2e: "ceulp" -0xce2f: "ceulh" -0xce30: "ceum" -0xce31: "ceub" -0xce32: "ceubs" -0xce33: "ceus" -0xce34: "ceuss" -0xce35: "ceung" -0xce36: "ceuj" -0xce37: "ceuc" -0xce38: "ceuk" -0xce39: "ceut" -0xce3a: "ceup" -0xce3b: "ceuh" -0xce3c: "cyi" -0xce3d: "cyig" -0xce3e: "cyigg" -0xce3f: "cyigs" -0xce40: "cyin" -0xce41: "cyinj" -0xce42: "cyinh" -0xce43: "cyid" -0xce44: "cyil" -0xce45: "cyilg" -0xce46: "cyilm" -0xce47: "cyilb" -0xce48: "cyils" -0xce49: "cyilt" -0xce4a: "cyilp" -0xce4b: "cyilh" -0xce4c: "cyim" -0xce4d: "cyib" -0xce4e: "cyibs" -0xce4f: "cyis" -0xce50: "cyiss" -0xce51: "cying" -0xce52: "cyij" -0xce53: "cyic" -0xce54: "cyik" -0xce55: "cyit" -0xce56: "cyip" -0xce57: "cyih" -0xce58: "ci" -0xce59: "cig" -0xce5a: "cigg" -0xce5b: "cigs" -0xce5c: "cin" -0xce5d: "cinj" -0xce5e: "cinh" -0xce5f: "cid" -0xce60: "cil" -0xce61: "cilg" -0xce62: "cilm" -0xce63: "cilb" -0xce64: "cils" -0xce65: "cilt" -0xce66: "cilp" -0xce67: "cilh" -0xce68: "cim" -0xce69: "cib" -0xce6a: "cibs" -0xce6b: "cis" -0xce6c: "ciss" -0xce6d: "cing" -0xce6e: "cij" -0xce6f: "cic" -0xce70: "cik" -0xce71: "cit" -0xce72: "cip" -0xce73: "cih" -0xce74: "ka" -0xce75: "kag" -0xce76: "kagg" -0xce77: "kags" -0xce78: "kan" -0xce79: "kanj" -0xce7a: "kanh" -0xce7b: "kad" -0xce7c: "kal" -0xce7d: "kalg" -0xce7e: "kalm" -0xce7f: "kalb" -0xce80: "kals" -0xce81: "kalt" -0xce82: "kalp" -0xce83: "kalh" -0xce84: "kam" -0xce85: "kab" -0xce86: "kabs" -0xce87: "kas" -0xce88: "kass" -0xce89: "kang" -0xce8a: "kaj" -0xce8b: "kac" -0xce8c: "kak" -0xce8d: "kat" -0xce8e: "kap" -0xce8f: "kah" -0xce90: "kae" -0xce91: "kaeg" -0xce92: "kaegg" -0xce93: "kaegs" -0xce94: "kaen" -0xce95: "kaenj" -0xce96: "kaenh" -0xce97: "kaed" -0xce98: "kael" -0xce99: "kaelg" -0xce9a: "kaelm" -0xce9b: "kaelb" -0xce9c: "kaels" -0xce9d: "kaelt" -0xce9e: "kaelp" -0xce9f: "kaelh" -0xcea0: "kaem" -0xcea1: "kaeb" -0xcea2: "kaebs" -0xcea3: "kaes" -0xcea4: "kaess" -0xcea5: "kaeng" -0xcea6: "kaej" -0xcea7: "kaec" -0xcea8: "kaek" -0xcea9: "kaet" -0xceaa: "kaep" -0xceab: "kaeh" -0xceac: "kya" -0xcead: "kyag" -0xceae: "kyagg" -0xceaf: "kyags" -0xceb0: "kyan" -0xceb1: "kyanj" -0xceb2: "kyanh" -0xceb3: "kyad" -0xceb4: "kyal" -0xceb5: "kyalg" -0xceb6: "kyalm" -0xceb7: "kyalb" -0xceb8: "kyals" -0xceb9: "kyalt" -0xceba: "kyalp" -0xcebb: "kyalh" -0xcebc: "kyam" -0xcebd: "kyab" -0xcebe: "kyabs" -0xcebf: "kyas" -0xcec0: "kyass" -0xcec1: "kyang" -0xcec2: "kyaj" -0xcec3: "kyac" -0xcec4: "kyak" -0xcec5: "kyat" -0xcec6: "kyap" -0xcec7: "kyah" -0xcec8: "kyae" -0xcec9: "kyaeg" -0xceca: "kyaegg" -0xcecb: "kyaegs" -0xcecc: "kyaen" -0xcecd: "kyaenj" -0xcece: "kyaenh" -0xcecf: "kyaed" -0xced0: "kyael" -0xced1: "kyaelg" -0xced2: "kyaelm" -0xced3: "kyaelb" -0xced4: "kyaels" -0xced5: "kyaelt" -0xced6: "kyaelp" -0xced7: "kyaelh" -0xced8: "kyaem" -0xced9: "kyaeb" -0xceda: "kyaebs" -0xcedb: "kyaes" -0xcedc: "kyaess" -0xcedd: "kyaeng" -0xcede: "kyaej" -0xcedf: "kyaec" -0xcee0: "kyaek" -0xcee1: "kyaet" -0xcee2: "kyaep" -0xcee3: "kyaeh" -0xcee4: "keo" -0xcee5: "keog" -0xcee6: "keogg" -0xcee7: "keogs" -0xcee8: "keon" -0xcee9: "keonj" -0xceea: "keonh" -0xceeb: "keod" -0xceec: "keol" -0xceed: "keolg" -0xceee: "keolm" -0xceef: "keolb" -0xcef0: "keols" -0xcef1: "keolt" -0xcef2: "keolp" -0xcef3: "keolh" -0xcef4: "keom" -0xcef5: "keob" -0xcef6: "keobs" -0xcef7: "keos" -0xcef8: "keoss" -0xcef9: "keong" -0xcefa: "keoj" -0xcefb: "keoc" -0xcefc: "keok" -0xcefd: "keot" -0xcefe: "keop" -0xceff: "keoh" -/* x0cf */ -0xcf00: "ke" -0xcf01: "keg" -0xcf02: "kegg" -0xcf03: "kegs" -0xcf04: "ken" -0xcf05: "kenj" -0xcf06: "kenh" -0xcf07: "ked" -0xcf08: "kel" -0xcf09: "kelg" -0xcf0a: "kelm" -0xcf0b: "kelb" -0xcf0c: "kels" -0xcf0d: "kelt" -0xcf0e: "kelp" -0xcf0f: "kelh" -0xcf10: "kem" -0xcf11: "keb" -0xcf12: "kebs" -0xcf13: "kes" -0xcf14: "kess" -0xcf15: "keng" -0xcf16: "kej" -0xcf17: "kec" -0xcf18: "kek" -0xcf19: "ket" -0xcf1a: "kep" -0xcf1b: "keh" -0xcf1c: "kyeo" -0xcf1d: "kyeog" -0xcf1e: "kyeogg" -0xcf1f: "kyeogs" -0xcf20: "kyeon" -0xcf21: "kyeonj" -0xcf22: "kyeonh" -0xcf23: "kyeod" -0xcf24: "kyeol" -0xcf25: "kyeolg" -0xcf26: "kyeolm" -0xcf27: "kyeolb" -0xcf28: "kyeols" -0xcf29: "kyeolt" -0xcf2a: "kyeolp" -0xcf2b: "kyeolh" -0xcf2c: "kyeom" -0xcf2d: "kyeob" -0xcf2e: "kyeobs" -0xcf2f: "kyeos" -0xcf30: "kyeoss" -0xcf31: "kyeong" -0xcf32: "kyeoj" -0xcf33: "kyeoc" -0xcf34: "kyeok" -0xcf35: "kyeot" -0xcf36: "kyeop" -0xcf37: "kyeoh" -0xcf38: "kye" -0xcf39: "kyeg" -0xcf3a: "kyegg" -0xcf3b: "kyegs" -0xcf3c: "kyen" -0xcf3d: "kyenj" -0xcf3e: "kyenh" -0xcf3f: "kyed" -0xcf40: "kyel" -0xcf41: "kyelg" -0xcf42: "kyelm" -0xcf43: "kyelb" -0xcf44: "kyels" -0xcf45: "kyelt" -0xcf46: "kyelp" -0xcf47: "kyelh" -0xcf48: "kyem" -0xcf49: "kyeb" -0xcf4a: "kyebs" -0xcf4b: "kyes" -0xcf4c: "kyess" -0xcf4d: "kyeng" -0xcf4e: "kyej" -0xcf4f: "kyec" -0xcf50: "kyek" -0xcf51: "kyet" -0xcf52: "kyep" -0xcf53: "kyeh" -0xcf54: "ko" -0xcf55: "kog" -0xcf56: "kogg" -0xcf57: "kogs" -0xcf58: "kon" -0xcf59: "konj" -0xcf5a: "konh" -0xcf5b: "kod" -0xcf5c: "kol" -0xcf5d: "kolg" -0xcf5e: "kolm" -0xcf5f: "kolb" -0xcf60: "kols" -0xcf61: "kolt" -0xcf62: "kolp" -0xcf63: "kolh" -0xcf64: "kom" -0xcf65: "kob" -0xcf66: "kobs" -0xcf67: "kos" -0xcf68: "koss" -0xcf69: "kong" -0xcf6a: "koj" -0xcf6b: "koc" -0xcf6c: "kok" -0xcf6d: "kot" -0xcf6e: "kop" -0xcf6f: "koh" -0xcf70: "kwa" -0xcf71: "kwag" -0xcf72: "kwagg" -0xcf73: "kwags" -0xcf74: "kwan" -0xcf75: "kwanj" -0xcf76: "kwanh" -0xcf77: "kwad" -0xcf78: "kwal" -0xcf79: "kwalg" -0xcf7a: "kwalm" -0xcf7b: "kwalb" -0xcf7c: "kwals" -0xcf7d: "kwalt" -0xcf7e: "kwalp" -0xcf7f: "kwalh" -0xcf80: "kwam" -0xcf81: "kwab" -0xcf82: "kwabs" -0xcf83: "kwas" -0xcf84: "kwass" -0xcf85: "kwang" -0xcf86: "kwaj" -0xcf87: "kwac" -0xcf88: "kwak" -0xcf89: "kwat" -0xcf8a: "kwap" -0xcf8b: "kwah" -0xcf8c: "kwae" -0xcf8d: "kwaeg" -0xcf8e: "kwaegg" -0xcf8f: "kwaegs" -0xcf90: "kwaen" -0xcf91: "kwaenj" -0xcf92: "kwaenh" -0xcf93: "kwaed" -0xcf94: "kwael" -0xcf95: "kwaelg" -0xcf96: "kwaelm" -0xcf97: "kwaelb" -0xcf98: "kwaels" -0xcf99: "kwaelt" -0xcf9a: "kwaelp" -0xcf9b: "kwaelh" -0xcf9c: "kwaem" -0xcf9d: "kwaeb" -0xcf9e: "kwaebs" -0xcf9f: "kwaes" -0xcfa0: "kwaess" -0xcfa1: "kwaeng" -0xcfa2: "kwaej" -0xcfa3: "kwaec" -0xcfa4: "kwaek" -0xcfa5: "kwaet" -0xcfa6: "kwaep" -0xcfa7: "kwaeh" -0xcfa8: "koe" -0xcfa9: "koeg" -0xcfaa: "koegg" -0xcfab: "koegs" -0xcfac: "koen" -0xcfad: "koenj" -0xcfae: "koenh" -0xcfaf: "koed" -0xcfb0: "koel" -0xcfb1: "koelg" -0xcfb2: "koelm" -0xcfb3: "koelb" -0xcfb4: "koels" -0xcfb5: "koelt" -0xcfb6: "koelp" -0xcfb7: "koelh" -0xcfb8: "koem" -0xcfb9: "koeb" -0xcfba: "koebs" -0xcfbb: "koes" -0xcfbc: "koess" -0xcfbd: "koeng" -0xcfbe: "koej" -0xcfbf: "koec" -0xcfc0: "koek" -0xcfc1: "koet" -0xcfc2: "koep" -0xcfc3: "koeh" -0xcfc4: "kyo" -0xcfc5: "kyog" -0xcfc6: "kyogg" -0xcfc7: "kyogs" -0xcfc8: "kyon" -0xcfc9: "kyonj" -0xcfca: "kyonh" -0xcfcb: "kyod" -0xcfcc: "kyol" -0xcfcd: "kyolg" -0xcfce: "kyolm" -0xcfcf: "kyolb" -0xcfd0: "kyols" -0xcfd1: "kyolt" -0xcfd2: "kyolp" -0xcfd3: "kyolh" -0xcfd4: "kyom" -0xcfd5: "kyob" -0xcfd6: "kyobs" -0xcfd7: "kyos" -0xcfd8: "kyoss" -0xcfd9: "kyong" -0xcfda: "kyoj" -0xcfdb: "kyoc" -0xcfdc: "kyok" -0xcfdd: "kyot" -0xcfde: "kyop" -0xcfdf: "kyoh" -0xcfe0: "ku" -0xcfe1: "kug" -0xcfe2: "kugg" -0xcfe3: "kugs" -0xcfe4: "kun" -0xcfe5: "kunj" -0xcfe6: "kunh" -0xcfe7: "kud" -0xcfe8: "kul" -0xcfe9: "kulg" -0xcfea: "kulm" -0xcfeb: "kulb" -0xcfec: "kuls" -0xcfed: "kult" -0xcfee: "kulp" -0xcfef: "kulh" -0xcff0: "kum" -0xcff1: "kub" -0xcff2: "kubs" -0xcff3: "kus" -0xcff4: "kuss" -0xcff5: "kung" -0xcff6: "kuj" -0xcff7: "kuc" -0xcff8: "kuk" -0xcff9: "kut" -0xcffa: "kup" -0xcffb: "kuh" -0xcffc: "kweo" -0xcffd: "kweog" -0xcffe: "kweogg" -0xcfff: "kweogs" -/* x0d0 */ -0xd000: "kweon" -0xd001: "kweonj" -0xd002: "kweonh" -0xd003: "kweod" -0xd004: "kweol" -0xd005: "kweolg" -0xd006: "kweolm" -0xd007: "kweolb" -0xd008: "kweols" -0xd009: "kweolt" -0xd00a: "kweolp" -0xd00b: "kweolh" -0xd00c: "kweom" -0xd00d: "kweob" -0xd00e: "kweobs" -0xd00f: "kweos" -0xd010: "kweoss" -0xd011: "kweong" -0xd012: "kweoj" -0xd013: "kweoc" -0xd014: "kweok" -0xd015: "kweot" -0xd016: "kweop" -0xd017: "kweoh" -0xd018: "kwe" -0xd019: "kweg" -0xd01a: "kwegg" -0xd01b: "kwegs" -0xd01c: "kwen" -0xd01d: "kwenj" -0xd01e: "kwenh" -0xd01f: "kwed" -0xd020: "kwel" -0xd021: "kwelg" -0xd022: "kwelm" -0xd023: "kwelb" -0xd024: "kwels" -0xd025: "kwelt" -0xd026: "kwelp" -0xd027: "kwelh" -0xd028: "kwem" -0xd029: "kweb" -0xd02a: "kwebs" -0xd02b: "kwes" -0xd02c: "kwess" -0xd02d: "kweng" -0xd02e: "kwej" -0xd02f: "kwec" -0xd030: "kwek" -0xd031: "kwet" -0xd032: "kwep" -0xd033: "kweh" -0xd034: "kwi" -0xd035: "kwig" -0xd036: "kwigg" -0xd037: "kwigs" -0xd038: "kwin" -0xd039: "kwinj" -0xd03a: "kwinh" -0xd03b: "kwid" -0xd03c: "kwil" -0xd03d: "kwilg" -0xd03e: "kwilm" -0xd03f: "kwilb" -0xd040: "kwils" -0xd041: "kwilt" -0xd042: "kwilp" -0xd043: "kwilh" -0xd044: "kwim" -0xd045: "kwib" -0xd046: "kwibs" -0xd047: "kwis" -0xd048: "kwiss" -0xd049: "kwing" -0xd04a: "kwij" -0xd04b: "kwic" -0xd04c: "kwik" -0xd04d: "kwit" -0xd04e: "kwip" -0xd04f: "kwih" -0xd050: "kyu" -0xd051: "kyug" -0xd052: "kyugg" -0xd053: "kyugs" -0xd054: "kyun" -0xd055: "kyunj" -0xd056: "kyunh" -0xd057: "kyud" -0xd058: "kyul" -0xd059: "kyulg" -0xd05a: "kyulm" -0xd05b: "kyulb" -0xd05c: "kyuls" -0xd05d: "kyult" -0xd05e: "kyulp" -0xd05f: "kyulh" -0xd060: "kyum" -0xd061: "kyub" -0xd062: "kyubs" -0xd063: "kyus" -0xd064: "kyuss" -0xd065: "kyung" -0xd066: "kyuj" -0xd067: "kyuc" -0xd068: "kyuk" -0xd069: "kyut" -0xd06a: "kyup" -0xd06b: "kyuh" -0xd06c: "keu" -0xd06d: "keug" -0xd06e: "keugg" -0xd06f: "keugs" -0xd070: "keun" -0xd071: "keunj" -0xd072: "keunh" -0xd073: "keud" -0xd074: "keul" -0xd075: "keulg" -0xd076: "keulm" -0xd077: "keulb" -0xd078: "keuls" -0xd079: "keult" -0xd07a: "keulp" -0xd07b: "keulh" -0xd07c: "keum" -0xd07d: "keub" -0xd07e: "keubs" -0xd07f: "keus" -0xd080: "keuss" -0xd081: "keung" -0xd082: "keuj" -0xd083: "keuc" -0xd084: "keuk" -0xd085: "keut" -0xd086: "keup" -0xd087: "keuh" -0xd088: "kyi" -0xd089: "kyig" -0xd08a: "kyigg" -0xd08b: "kyigs" -0xd08c: "kyin" -0xd08d: "kyinj" -0xd08e: "kyinh" -0xd08f: "kyid" -0xd090: "kyil" -0xd091: "kyilg" -0xd092: "kyilm" -0xd093: "kyilb" -0xd094: "kyils" -0xd095: "kyilt" -0xd096: "kyilp" -0xd097: "kyilh" -0xd098: "kyim" -0xd099: "kyib" -0xd09a: "kyibs" -0xd09b: "kyis" -0xd09c: "kyiss" -0xd09d: "kying" -0xd09e: "kyij" -0xd09f: "kyic" -0xd0a0: "kyik" -0xd0a1: "kyit" -0xd0a2: "kyip" -0xd0a3: "kyih" -0xd0a4: "ki" -0xd0a5: "kig" -0xd0a6: "kigg" -0xd0a7: "kigs" -0xd0a8: "kin" -0xd0a9: "kinj" -0xd0aa: "kinh" -0xd0ab: "kid" -0xd0ac: "kil" -0xd0ad: "kilg" -0xd0ae: "kilm" -0xd0af: "kilb" -0xd0b0: "kils" -0xd0b1: "kilt" -0xd0b2: "kilp" -0xd0b3: "kilh" -0xd0b4: "kim" -0xd0b5: "kib" -0xd0b6: "kibs" -0xd0b7: "kis" -0xd0b8: "kiss" -0xd0b9: "king" -0xd0ba: "kij" -0xd0bb: "kic" -0xd0bc: "kik" -0xd0bd: "kit" -0xd0be: "kip" -0xd0bf: "kih" -0xd0c0: "ta" -0xd0c1: "tag" -0xd0c2: "tagg" -0xd0c3: "tags" -0xd0c4: "tan" -0xd0c5: "tanj" -0xd0c6: "tanh" -0xd0c7: "tad" -0xd0c8: "tal" -0xd0c9: "talg" -0xd0ca: "talm" -0xd0cb: "talb" -0xd0cc: "tals" -0xd0cd: "talt" -0xd0ce: "talp" -0xd0cf: "talh" -0xd0d0: "tam" -0xd0d1: "tab" -0xd0d2: "tabs" -0xd0d3: "tas" -0xd0d4: "tass" -0xd0d5: "tang" -0xd0d6: "taj" -0xd0d7: "tac" -0xd0d8: "tak" -0xd0d9: "tat" -0xd0da: "tap" -0xd0db: "tah" -0xd0dc: "tae" -0xd0dd: "taeg" -0xd0de: "taegg" -0xd0df: "taegs" -0xd0e0: "taen" -0xd0e1: "taenj" -0xd0e2: "taenh" -0xd0e3: "taed" -0xd0e4: "tael" -0xd0e5: "taelg" -0xd0e6: "taelm" -0xd0e7: "taelb" -0xd0e8: "taels" -0xd0e9: "taelt" -0xd0ea: "taelp" -0xd0eb: "taelh" -0xd0ec: "taem" -0xd0ed: "taeb" -0xd0ee: "taebs" -0xd0ef: "taes" -0xd0f0: "taess" -0xd0f1: "taeng" -0xd0f2: "taej" -0xd0f3: "taec" -0xd0f4: "taek" -0xd0f5: "taet" -0xd0f6: "taep" -0xd0f7: "taeh" -0xd0f8: "tya" -0xd0f9: "tyag" -0xd0fa: "tyagg" -0xd0fb: "tyags" -0xd0fc: "tyan" -0xd0fd: "tyanj" -0xd0fe: "tyanh" -0xd0ff: "tyad" -/* x0d1 */ -0xd100: "tyal" -0xd101: "tyalg" -0xd102: "tyalm" -0xd103: "tyalb" -0xd104: "tyals" -0xd105: "tyalt" -0xd106: "tyalp" -0xd107: "tyalh" -0xd108: "tyam" -0xd109: "tyab" -0xd10a: "tyabs" -0xd10b: "tyas" -0xd10c: "tyass" -0xd10d: "tyang" -0xd10e: "tyaj" -0xd10f: "tyac" -0xd110: "tyak" -0xd111: "tyat" -0xd112: "tyap" -0xd113: "tyah" -0xd114: "tyae" -0xd115: "tyaeg" -0xd116: "tyaegg" -0xd117: "tyaegs" -0xd118: "tyaen" -0xd119: "tyaenj" -0xd11a: "tyaenh" -0xd11b: "tyaed" -0xd11c: "tyael" -0xd11d: "tyaelg" -0xd11e: "tyaelm" -0xd11f: "tyaelb" -0xd120: "tyaels" -0xd121: "tyaelt" -0xd122: "tyaelp" -0xd123: "tyaelh" -0xd124: "tyaem" -0xd125: "tyaeb" -0xd126: "tyaebs" -0xd127: "tyaes" -0xd128: "tyaess" -0xd129: "tyaeng" -0xd12a: "tyaej" -0xd12b: "tyaec" -0xd12c: "tyaek" -0xd12d: "tyaet" -0xd12e: "tyaep" -0xd12f: "tyaeh" -0xd130: "teo" -0xd131: "teog" -0xd132: "teogg" -0xd133: "teogs" -0xd134: "teon" -0xd135: "teonj" -0xd136: "teonh" -0xd137: "teod" -0xd138: "teol" -0xd139: "teolg" -0xd13a: "teolm" -0xd13b: "teolb" -0xd13c: "teols" -0xd13d: "teolt" -0xd13e: "teolp" -0xd13f: "teolh" -0xd140: "teom" -0xd141: "teob" -0xd142: "teobs" -0xd143: "teos" -0xd144: "teoss" -0xd145: "teong" -0xd146: "teoj" -0xd147: "teoc" -0xd148: "teok" -0xd149: "teot" -0xd14a: "teop" -0xd14b: "teoh" -0xd14c: "te" -0xd14d: "teg" -0xd14e: "tegg" -0xd14f: "tegs" -0xd150: "ten" -0xd151: "tenj" -0xd152: "tenh" -0xd153: "ted" -0xd154: "tel" -0xd155: "telg" -0xd156: "telm" -0xd157: "telb" -0xd158: "tels" -0xd159: "telt" -0xd15a: "telp" -0xd15b: "telh" -0xd15c: "tem" -0xd15d: "teb" -0xd15e: "tebs" -0xd15f: "tes" -0xd160: "tess" -0xd161: "teng" -0xd162: "tej" -0xd163: "tec" -0xd164: "tek" -0xd165: "tet" -0xd166: "tep" -0xd167: "teh" -0xd168: "tyeo" -0xd169: "tyeog" -0xd16a: "tyeogg" -0xd16b: "tyeogs" -0xd16c: "tyeon" -0xd16d: "tyeonj" -0xd16e: "tyeonh" -0xd16f: "tyeod" -0xd170: "tyeol" -0xd171: "tyeolg" -0xd172: "tyeolm" -0xd173: "tyeolb" -0xd174: "tyeols" -0xd175: "tyeolt" -0xd176: "tyeolp" -0xd177: "tyeolh" -0xd178: "tyeom" -0xd179: "tyeob" -0xd17a: "tyeobs" -0xd17b: "tyeos" -0xd17c: "tyeoss" -0xd17d: "tyeong" -0xd17e: "tyeoj" -0xd17f: "tyeoc" -0xd180: "tyeok" -0xd181: "tyeot" -0xd182: "tyeop" -0xd183: "tyeoh" -0xd184: "tye" -0xd185: "tyeg" -0xd186: "tyegg" -0xd187: "tyegs" -0xd188: "tyen" -0xd189: "tyenj" -0xd18a: "tyenh" -0xd18b: "tyed" -0xd18c: "tyel" -0xd18d: "tyelg" -0xd18e: "tyelm" -0xd18f: "tyelb" -0xd190: "tyels" -0xd191: "tyelt" -0xd192: "tyelp" -0xd193: "tyelh" -0xd194: "tyem" -0xd195: "tyeb" -0xd196: "tyebs" -0xd197: "tyes" -0xd198: "tyess" -0xd199: "tyeng" -0xd19a: "tyej" -0xd19b: "tyec" -0xd19c: "tyek" -0xd19d: "tyet" -0xd19e: "tyep" -0xd19f: "tyeh" -0xd1a0: "to" -0xd1a1: "tog" -0xd1a2: "togg" -0xd1a3: "togs" -0xd1a4: "ton" -0xd1a5: "tonj" -0xd1a6: "tonh" -0xd1a7: "tod" -0xd1a8: "tol" -0xd1a9: "tolg" -0xd1aa: "tolm" -0xd1ab: "tolb" -0xd1ac: "tols" -0xd1ad: "tolt" -0xd1ae: "tolp" -0xd1af: "tolh" -0xd1b0: "tom" -0xd1b1: "tob" -0xd1b2: "tobs" -0xd1b3: "tos" -0xd1b4: "toss" -0xd1b5: "tong" -0xd1b6: "toj" -0xd1b7: "toc" -0xd1b8: "tok" -0xd1b9: "tot" -0xd1ba: "top" -0xd1bb: "toh" -0xd1bc: "twa" -0xd1bd: "twag" -0xd1be: "twagg" -0xd1bf: "twags" -0xd1c0: "twan" -0xd1c1: "twanj" -0xd1c2: "twanh" -0xd1c3: "twad" -0xd1c4: "twal" -0xd1c5: "twalg" -0xd1c6: "twalm" -0xd1c7: "twalb" -0xd1c8: "twals" -0xd1c9: "twalt" -0xd1ca: "twalp" -0xd1cb: "twalh" -0xd1cc: "twam" -0xd1cd: "twab" -0xd1ce: "twabs" -0xd1cf: "twas" -0xd1d0: "twass" -0xd1d1: "twang" -0xd1d2: "twaj" -0xd1d3: "twac" -0xd1d4: "twak" -0xd1d5: "twat" -0xd1d6: "twap" -0xd1d7: "twah" -0xd1d8: "twae" -0xd1d9: "twaeg" -0xd1da: "twaegg" -0xd1db: "twaegs" -0xd1dc: "twaen" -0xd1dd: "twaenj" -0xd1de: "twaenh" -0xd1df: "twaed" -0xd1e0: "twael" -0xd1e1: "twaelg" -0xd1e2: "twaelm" -0xd1e3: "twaelb" -0xd1e4: "twaels" -0xd1e5: "twaelt" -0xd1e6: "twaelp" -0xd1e7: "twaelh" -0xd1e8: "twaem" -0xd1e9: "twaeb" -0xd1ea: "twaebs" -0xd1eb: "twaes" -0xd1ec: "twaess" -0xd1ed: "twaeng" -0xd1ee: "twaej" -0xd1ef: "twaec" -0xd1f0: "twaek" -0xd1f1: "twaet" -0xd1f2: "twaep" -0xd1f3: "twaeh" -0xd1f4: "toe" -0xd1f5: "toeg" -0xd1f6: "toegg" -0xd1f7: "toegs" -0xd1f8: "toen" -0xd1f9: "toenj" -0xd1fa: "toenh" -0xd1fb: "toed" -0xd1fc: "toel" -0xd1fd: "toelg" -0xd1fe: "toelm" -0xd1ff: "toelb" -/* x0d2 */ -0xd200: "toels" -0xd201: "toelt" -0xd202: "toelp" -0xd203: "toelh" -0xd204: "toem" -0xd205: "toeb" -0xd206: "toebs" -0xd207: "toes" -0xd208: "toess" -0xd209: "toeng" -0xd20a: "toej" -0xd20b: "toec" -0xd20c: "toek" -0xd20d: "toet" -0xd20e: "toep" -0xd20f: "toeh" -0xd210: "tyo" -0xd211: "tyog" -0xd212: "tyogg" -0xd213: "tyogs" -0xd214: "tyon" -0xd215: "tyonj" -0xd216: "tyonh" -0xd217: "tyod" -0xd218: "tyol" -0xd219: "tyolg" -0xd21a: "tyolm" -0xd21b: "tyolb" -0xd21c: "tyols" -0xd21d: "tyolt" -0xd21e: "tyolp" -0xd21f: "tyolh" -0xd220: "tyom" -0xd221: "tyob" -0xd222: "tyobs" -0xd223: "tyos" -0xd224: "tyoss" -0xd225: "tyong" -0xd226: "tyoj" -0xd227: "tyoc" -0xd228: "tyok" -0xd229: "tyot" -0xd22a: "tyop" -0xd22b: "tyoh" -0xd22c: "tu" -0xd22d: "tug" -0xd22e: "tugg" -0xd22f: "tugs" -0xd230: "tun" -0xd231: "tunj" -0xd232: "tunh" -0xd233: "tud" -0xd234: "tul" -0xd235: "tulg" -0xd236: "tulm" -0xd237: "tulb" -0xd238: "tuls" -0xd239: "tult" -0xd23a: "tulp" -0xd23b: "tulh" -0xd23c: "tum" -0xd23d: "tub" -0xd23e: "tubs" -0xd23f: "tus" -0xd240: "tuss" -0xd241: "tung" -0xd242: "tuj" -0xd243: "tuc" -0xd244: "tuk" -0xd245: "tut" -0xd246: "tup" -0xd247: "tuh" -0xd248: "tweo" -0xd249: "tweog" -0xd24a: "tweogg" -0xd24b: "tweogs" -0xd24c: "tweon" -0xd24d: "tweonj" -0xd24e: "tweonh" -0xd24f: "tweod" -0xd250: "tweol" -0xd251: "tweolg" -0xd252: "tweolm" -0xd253: "tweolb" -0xd254: "tweols" -0xd255: "tweolt" -0xd256: "tweolp" -0xd257: "tweolh" -0xd258: "tweom" -0xd259: "tweob" -0xd25a: "tweobs" -0xd25b: "tweos" -0xd25c: "tweoss" -0xd25d: "tweong" -0xd25e: "tweoj" -0xd25f: "tweoc" -0xd260: "tweok" -0xd261: "tweot" -0xd262: "tweop" -0xd263: "tweoh" -0xd264: "twe" -0xd265: "tweg" -0xd266: "twegg" -0xd267: "twegs" -0xd268: "twen" -0xd269: "twenj" -0xd26a: "twenh" -0xd26b: "twed" -0xd26c: "twel" -0xd26d: "twelg" -0xd26e: "twelm" -0xd26f: "twelb" -0xd270: "twels" -0xd271: "twelt" -0xd272: "twelp" -0xd273: "twelh" -0xd274: "twem" -0xd275: "tweb" -0xd276: "twebs" -0xd277: "twes" -0xd278: "twess" -0xd279: "tweng" -0xd27a: "twej" -0xd27b: "twec" -0xd27c: "twek" -0xd27d: "twet" -0xd27e: "twep" -0xd27f: "tweh" -0xd280: "twi" -0xd281: "twig" -0xd282: "twigg" -0xd283: "twigs" -0xd284: "twin" -0xd285: "twinj" -0xd286: "twinh" -0xd287: "twid" -0xd288: "twil" -0xd289: "twilg" -0xd28a: "twilm" -0xd28b: "twilb" -0xd28c: "twils" -0xd28d: "twilt" -0xd28e: "twilp" -0xd28f: "twilh" -0xd290: "twim" -0xd291: "twib" -0xd292: "twibs" -0xd293: "twis" -0xd294: "twiss" -0xd295: "twing" -0xd296: "twij" -0xd297: "twic" -0xd298: "twik" -0xd299: "twit" -0xd29a: "twip" -0xd29b: "twih" -0xd29c: "tyu" -0xd29d: "tyug" -0xd29e: "tyugg" -0xd29f: "tyugs" -0xd2a0: "tyun" -0xd2a1: "tyunj" -0xd2a2: "tyunh" -0xd2a3: "tyud" -0xd2a4: "tyul" -0xd2a5: "tyulg" -0xd2a6: "tyulm" -0xd2a7: "tyulb" -0xd2a8: "tyuls" -0xd2a9: "tyult" -0xd2aa: "tyulp" -0xd2ab: "tyulh" -0xd2ac: "tyum" -0xd2ad: "tyub" -0xd2ae: "tyubs" -0xd2af: "tyus" -0xd2b0: "tyuss" -0xd2b1: "tyung" -0xd2b2: "tyuj" -0xd2b3: "tyuc" -0xd2b4: "tyuk" -0xd2b5: "tyut" -0xd2b6: "tyup" -0xd2b7: "tyuh" -0xd2b8: "teu" -0xd2b9: "teug" -0xd2ba: "teugg" -0xd2bb: "teugs" -0xd2bc: "teun" -0xd2bd: "teunj" -0xd2be: "teunh" -0xd2bf: "teud" -0xd2c0: "teul" -0xd2c1: "teulg" -0xd2c2: "teulm" -0xd2c3: "teulb" -0xd2c4: "teuls" -0xd2c5: "teult" -0xd2c6: "teulp" -0xd2c7: "teulh" -0xd2c8: "teum" -0xd2c9: "teub" -0xd2ca: "teubs" -0xd2cb: "teus" -0xd2cc: "teuss" -0xd2cd: "teung" -0xd2ce: "teuj" -0xd2cf: "teuc" -0xd2d0: "teuk" -0xd2d1: "teut" -0xd2d2: "teup" -0xd2d3: "teuh" -0xd2d4: "tyi" -0xd2d5: "tyig" -0xd2d6: "tyigg" -0xd2d7: "tyigs" -0xd2d8: "tyin" -0xd2d9: "tyinj" -0xd2da: "tyinh" -0xd2db: "tyid" -0xd2dc: "tyil" -0xd2dd: "tyilg" -0xd2de: "tyilm" -0xd2df: "tyilb" -0xd2e0: "tyils" -0xd2e1: "tyilt" -0xd2e2: "tyilp" -0xd2e3: "tyilh" -0xd2e4: "tyim" -0xd2e5: "tyib" -0xd2e6: "tyibs" -0xd2e7: "tyis" -0xd2e8: "tyiss" -0xd2e9: "tying" -0xd2ea: "tyij" -0xd2eb: "tyic" -0xd2ec: "tyik" -0xd2ed: "tyit" -0xd2ee: "tyip" -0xd2ef: "tyih" -0xd2f0: "ti" -0xd2f1: "tig" -0xd2f2: "tigg" -0xd2f3: "tigs" -0xd2f4: "tin" -0xd2f5: "tinj" -0xd2f6: "tinh" -0xd2f7: "tid" -0xd2f8: "til" -0xd2f9: "tilg" -0xd2fa: "tilm" -0xd2fb: "tilb" -0xd2fc: "tils" -0xd2fd: "tilt" -0xd2fe: "tilp" -0xd2ff: "tilh" -/* x0d3 */ -0xd300: "tim" -0xd301: "tib" -0xd302: "tibs" -0xd303: "tis" -0xd304: "tiss" -0xd305: "ting" -0xd306: "tij" -0xd307: "tic" -0xd308: "tik" -0xd309: "tit" -0xd30a: "tip" -0xd30b: "tih" -0xd30c: "pa" -0xd30d: "pag" -0xd30e: "pagg" -0xd30f: "pags" -0xd310: "pan" -0xd311: "panj" -0xd312: "panh" -0xd313: "pad" -0xd314: "pal" -0xd315: "palg" -0xd316: "palm" -0xd317: "palb" -0xd318: "pals" -0xd319: "palt" -0xd31a: "palp" -0xd31b: "palh" -0xd31c: "pam" -0xd31d: "pab" -0xd31e: "pabs" -0xd31f: "pas" -0xd320: "pass" -0xd321: "pang" -0xd322: "paj" -0xd323: "pac" -0xd324: "pak" -0xd325: "pat" -0xd326: "pap" -0xd327: "pah" -0xd328: "pae" -0xd329: "paeg" -0xd32a: "paegg" -0xd32b: "paegs" -0xd32c: "paen" -0xd32d: "paenj" -0xd32e: "paenh" -0xd32f: "paed" -0xd330: "pael" -0xd331: "paelg" -0xd332: "paelm" -0xd333: "paelb" -0xd334: "paels" -0xd335: "paelt" -0xd336: "paelp" -0xd337: "paelh" -0xd338: "paem" -0xd339: "paeb" -0xd33a: "paebs" -0xd33b: "paes" -0xd33c: "paess" -0xd33d: "paeng" -0xd33e: "paej" -0xd33f: "paec" -0xd340: "paek" -0xd341: "paet" -0xd342: "paep" -0xd343: "paeh" -0xd344: "pya" -0xd345: "pyag" -0xd346: "pyagg" -0xd347: "pyags" -0xd348: "pyan" -0xd349: "pyanj" -0xd34a: "pyanh" -0xd34b: "pyad" -0xd34c: "pyal" -0xd34d: "pyalg" -0xd34e: "pyalm" -0xd34f: "pyalb" -0xd350: "pyals" -0xd351: "pyalt" -0xd352: "pyalp" -0xd353: "pyalh" -0xd354: "pyam" -0xd355: "pyab" -0xd356: "pyabs" -0xd357: "pyas" -0xd358: "pyass" -0xd359: "pyang" -0xd35a: "pyaj" -0xd35b: "pyac" -0xd35c: "pyak" -0xd35d: "pyat" -0xd35e: "pyap" -0xd35f: "pyah" -0xd360: "pyae" -0xd361: "pyaeg" -0xd362: "pyaegg" -0xd363: "pyaegs" -0xd364: "pyaen" -0xd365: "pyaenj" -0xd366: "pyaenh" -0xd367: "pyaed" -0xd368: "pyael" -0xd369: "pyaelg" -0xd36a: "pyaelm" -0xd36b: "pyaelb" -0xd36c: "pyaels" -0xd36d: "pyaelt" -0xd36e: "pyaelp" -0xd36f: "pyaelh" -0xd370: "pyaem" -0xd371: "pyaeb" -0xd372: "pyaebs" -0xd373: "pyaes" -0xd374: "pyaess" -0xd375: "pyaeng" -0xd376: "pyaej" -0xd377: "pyaec" -0xd378: "pyaek" -0xd379: "pyaet" -0xd37a: "pyaep" -0xd37b: "pyaeh" -0xd37c: "peo" -0xd37d: "peog" -0xd37e: "peogg" -0xd37f: "peogs" -0xd380: "peon" -0xd381: "peonj" -0xd382: "peonh" -0xd383: "peod" -0xd384: "peol" -0xd385: "peolg" -0xd386: "peolm" -0xd387: "peolb" -0xd388: "peols" -0xd389: "peolt" -0xd38a: "peolp" -0xd38b: "peolh" -0xd38c: "peom" -0xd38d: "peob" -0xd38e: "peobs" -0xd38f: "peos" -0xd390: "peoss" -0xd391: "peong" -0xd392: "peoj" -0xd393: "peoc" -0xd394: "peok" -0xd395: "peot" -0xd396: "peop" -0xd397: "peoh" -0xd398: "pe" -0xd399: "peg" -0xd39a: "pegg" -0xd39b: "pegs" -0xd39c: "pen" -0xd39d: "penj" -0xd39e: "penh" -0xd39f: "ped" -0xd3a0: "pel" -0xd3a1: "pelg" -0xd3a2: "pelm" -0xd3a3: "pelb" -0xd3a4: "pels" -0xd3a5: "pelt" -0xd3a6: "pelp" -0xd3a7: "pelh" -0xd3a8: "pem" -0xd3a9: "peb" -0xd3aa: "pebs" -0xd3ab: "pes" -0xd3ac: "pess" -0xd3ad: "peng" -0xd3ae: "pej" -0xd3af: "pec" -0xd3b0: "pek" -0xd3b1: "pet" -0xd3b2: "pep" -0xd3b3: "peh" -0xd3b4: "pyeo" -0xd3b5: "pyeog" -0xd3b6: "pyeogg" -0xd3b7: "pyeogs" -0xd3b8: "pyeon" -0xd3b9: "pyeonj" -0xd3ba: "pyeonh" -0xd3bb: "pyeod" -0xd3bc: "pyeol" -0xd3bd: "pyeolg" -0xd3be: "pyeolm" -0xd3bf: "pyeolb" -0xd3c0: "pyeols" -0xd3c1: "pyeolt" -0xd3c2: "pyeolp" -0xd3c3: "pyeolh" -0xd3c4: "pyeom" -0xd3c5: "pyeob" -0xd3c6: "pyeobs" -0xd3c7: "pyeos" -0xd3c8: "pyeoss" -0xd3c9: "pyeong" -0xd3ca: "pyeoj" -0xd3cb: "pyeoc" -0xd3cc: "pyeok" -0xd3cd: "pyeot" -0xd3ce: "pyeop" -0xd3cf: "pyeoh" -0xd3d0: "pye" -0xd3d1: "pyeg" -0xd3d2: "pyegg" -0xd3d3: "pyegs" -0xd3d4: "pyen" -0xd3d5: "pyenj" -0xd3d6: "pyenh" -0xd3d7: "pyed" -0xd3d8: "pyel" -0xd3d9: "pyelg" -0xd3da: "pyelm" -0xd3db: "pyelb" -0xd3dc: "pyels" -0xd3dd: "pyelt" -0xd3de: "pyelp" -0xd3df: "pyelh" -0xd3e0: "pyem" -0xd3e1: "pyeb" -0xd3e2: "pyebs" -0xd3e3: "pyes" -0xd3e4: "pyess" -0xd3e5: "pyeng" -0xd3e6: "pyej" -0xd3e7: "pyec" -0xd3e8: "pyek" -0xd3e9: "pyet" -0xd3ea: "pyep" -0xd3eb: "pyeh" -0xd3ec: "po" -0xd3ed: "pog" -0xd3ee: "pogg" -0xd3ef: "pogs" -0xd3f0: "pon" -0xd3f1: "ponj" -0xd3f2: "ponh" -0xd3f3: "pod" -0xd3f4: "pol" -0xd3f5: "polg" -0xd3f6: "polm" -0xd3f7: "polb" -0xd3f8: "pols" -0xd3f9: "polt" -0xd3fa: "polp" -0xd3fb: "polh" -0xd3fc: "pom" -0xd3fd: "pob" -0xd3fe: "pobs" -0xd3ff: "pos" -/* x0d4 */ -0xd400: "poss" -0xd401: "pong" -0xd402: "poj" -0xd403: "poc" -0xd404: "pok" -0xd405: "pot" -0xd406: "pop" -0xd407: "poh" -0xd408: "pwa" -0xd409: "pwag" -0xd40a: "pwagg" -0xd40b: "pwags" -0xd40c: "pwan" -0xd40d: "pwanj" -0xd40e: "pwanh" -0xd40f: "pwad" -0xd410: "pwal" -0xd411: "pwalg" -0xd412: "pwalm" -0xd413: "pwalb" -0xd414: "pwals" -0xd415: "pwalt" -0xd416: "pwalp" -0xd417: "pwalh" -0xd418: "pwam" -0xd419: "pwab" -0xd41a: "pwabs" -0xd41b: "pwas" -0xd41c: "pwass" -0xd41d: "pwang" -0xd41e: "pwaj" -0xd41f: "pwac" -0xd420: "pwak" -0xd421: "pwat" -0xd422: "pwap" -0xd423: "pwah" -0xd424: "pwae" -0xd425: "pwaeg" -0xd426: "pwaegg" -0xd427: "pwaegs" -0xd428: "pwaen" -0xd429: "pwaenj" -0xd42a: "pwaenh" -0xd42b: "pwaed" -0xd42c: "pwael" -0xd42d: "pwaelg" -0xd42e: "pwaelm" -0xd42f: "pwaelb" -0xd430: "pwaels" -0xd431: "pwaelt" -0xd432: "pwaelp" -0xd433: "pwaelh" -0xd434: "pwaem" -0xd435: "pwaeb" -0xd436: "pwaebs" -0xd437: "pwaes" -0xd438: "pwaess" -0xd439: "pwaeng" -0xd43a: "pwaej" -0xd43b: "pwaec" -0xd43c: "pwaek" -0xd43d: "pwaet" -0xd43e: "pwaep" -0xd43f: "pwaeh" -0xd440: "poe" -0xd441: "poeg" -0xd442: "poegg" -0xd443: "poegs" -0xd444: "poen" -0xd445: "poenj" -0xd446: "poenh" -0xd447: "poed" -0xd448: "poel" -0xd449: "poelg" -0xd44a: "poelm" -0xd44b: "poelb" -0xd44c: "poels" -0xd44d: "poelt" -0xd44e: "poelp" -0xd44f: "poelh" -0xd450: "poem" -0xd451: "poeb" -0xd452: "poebs" -0xd453: "poes" -0xd454: "poess" -0xd455: "poeng" -0xd456: "poej" -0xd457: "poec" -0xd458: "poek" -0xd459: "poet" -0xd45a: "poep" -0xd45b: "poeh" -0xd45c: "pyo" -0xd45d: "pyog" -0xd45e: "pyogg" -0xd45f: "pyogs" -0xd460: "pyon" -0xd461: "pyonj" -0xd462: "pyonh" -0xd463: "pyod" -0xd464: "pyol" -0xd465: "pyolg" -0xd466: "pyolm" -0xd467: "pyolb" -0xd468: "pyols" -0xd469: "pyolt" -0xd46a: "pyolp" -0xd46b: "pyolh" -0xd46c: "pyom" -0xd46d: "pyob" -0xd46e: "pyobs" -0xd46f: "pyos" -0xd470: "pyoss" -0xd471: "pyong" -0xd472: "pyoj" -0xd473: "pyoc" -0xd474: "pyok" -0xd475: "pyot" -0xd476: "pyop" -0xd477: "pyoh" -0xd478: "pu" -0xd479: "pug" -0xd47a: "pugg" -0xd47b: "pugs" -0xd47c: "pun" -0xd47d: "punj" -0xd47e: "punh" -0xd47f: "pud" -0xd480: "pul" -0xd481: "pulg" -0xd482: "pulm" -0xd483: "pulb" -0xd484: "puls" -0xd485: "pult" -0xd486: "pulp" -0xd487: "pulh" -0xd488: "pum" -0xd489: "pub" -0xd48a: "pubs" -0xd48b: "pus" -0xd48c: "puss" -0xd48d: "pung" -0xd48e: "puj" -0xd48f: "puc" -0xd490: "puk" -0xd491: "put" -0xd492: "pup" -0xd493: "puh" -0xd494: "pweo" -0xd495: "pweog" -0xd496: "pweogg" -0xd497: "pweogs" -0xd498: "pweon" -0xd499: "pweonj" -0xd49a: "pweonh" -0xd49b: "pweod" -0xd49c: "pweol" -0xd49d: "pweolg" -0xd49e: "pweolm" -0xd49f: "pweolb" -0xd4a0: "pweols" -0xd4a1: "pweolt" -0xd4a2: "pweolp" -0xd4a3: "pweolh" -0xd4a4: "pweom" -0xd4a5: "pweob" -0xd4a6: "pweobs" -0xd4a7: "pweos" -0xd4a8: "pweoss" -0xd4a9: "pweong" -0xd4aa: "pweoj" -0xd4ab: "pweoc" -0xd4ac: "pweok" -0xd4ad: "pweot" -0xd4ae: "pweop" -0xd4af: "pweoh" -0xd4b0: "pwe" -0xd4b1: "pweg" -0xd4b2: "pwegg" -0xd4b3: "pwegs" -0xd4b4: "pwen" -0xd4b5: "pwenj" -0xd4b6: "pwenh" -0xd4b7: "pwed" -0xd4b8: "pwel" -0xd4b9: "pwelg" -0xd4ba: "pwelm" -0xd4bb: "pwelb" -0xd4bc: "pwels" -0xd4bd: "pwelt" -0xd4be: "pwelp" -0xd4bf: "pwelh" -0xd4c0: "pwem" -0xd4c1: "pweb" -0xd4c2: "pwebs" -0xd4c3: "pwes" -0xd4c4: "pwess" -0xd4c5: "pweng" -0xd4c6: "pwej" -0xd4c7: "pwec" -0xd4c8: "pwek" -0xd4c9: "pwet" -0xd4ca: "pwep" -0xd4cb: "pweh" -0xd4cc: "pwi" -0xd4cd: "pwig" -0xd4ce: "pwigg" -0xd4cf: "pwigs" -0xd4d0: "pwin" -0xd4d1: "pwinj" -0xd4d2: "pwinh" -0xd4d3: "pwid" -0xd4d4: "pwil" -0xd4d5: "pwilg" -0xd4d6: "pwilm" -0xd4d7: "pwilb" -0xd4d8: "pwils" -0xd4d9: "pwilt" -0xd4da: "pwilp" -0xd4db: "pwilh" -0xd4dc: "pwim" -0xd4dd: "pwib" -0xd4de: "pwibs" -0xd4df: "pwis" -0xd4e0: "pwiss" -0xd4e1: "pwing" -0xd4e2: "pwij" -0xd4e3: "pwic" -0xd4e4: "pwik" -0xd4e5: "pwit" -0xd4e6: "pwip" -0xd4e7: "pwih" -0xd4e8: "pyu" -0xd4e9: "pyug" -0xd4ea: "pyugg" -0xd4eb: "pyugs" -0xd4ec: "pyun" -0xd4ed: "pyunj" -0xd4ee: "pyunh" -0xd4ef: "pyud" -0xd4f0: "pyul" -0xd4f1: "pyulg" -0xd4f2: "pyulm" -0xd4f3: "pyulb" -0xd4f4: "pyuls" -0xd4f5: "pyult" -0xd4f6: "pyulp" -0xd4f7: "pyulh" -0xd4f8: "pyum" -0xd4f9: "pyub" -0xd4fa: "pyubs" -0xd4fb: "pyus" -0xd4fc: "pyuss" -0xd4fd: "pyung" -0xd4fe: "pyuj" -0xd4ff: "pyuc" -/* x0d5 */ -0xd500: "pyuk" -0xd501: "pyut" -0xd502: "pyup" -0xd503: "pyuh" -0xd504: "peu" -0xd505: "peug" -0xd506: "peugg" -0xd507: "peugs" -0xd508: "peun" -0xd509: "peunj" -0xd50a: "peunh" -0xd50b: "peud" -0xd50c: "peul" -0xd50d: "peulg" -0xd50e: "peulm" -0xd50f: "peulb" -0xd510: "peuls" -0xd511: "peult" -0xd512: "peulp" -0xd513: "peulh" -0xd514: "peum" -0xd515: "peub" -0xd516: "peubs" -0xd517: "peus" -0xd518: "peuss" -0xd519: "peung" -0xd51a: "peuj" -0xd51b: "peuc" -0xd51c: "peuk" -0xd51d: "peut" -0xd51e: "peup" -0xd51f: "peuh" -0xd520: "pyi" -0xd521: "pyig" -0xd522: "pyigg" -0xd523: "pyigs" -0xd524: "pyin" -0xd525: "pyinj" -0xd526: "pyinh" -0xd527: "pyid" -0xd528: "pyil" -0xd529: "pyilg" -0xd52a: "pyilm" -0xd52b: "pyilb" -0xd52c: "pyils" -0xd52d: "pyilt" -0xd52e: "pyilp" -0xd52f: "pyilh" -0xd530: "pyim" -0xd531: "pyib" -0xd532: "pyibs" -0xd533: "pyis" -0xd534: "pyiss" -0xd535: "pying" -0xd536: "pyij" -0xd537: "pyic" -0xd538: "pyik" -0xd539: "pyit" -0xd53a: "pyip" -0xd53b: "pyih" -0xd53c: "pi" -0xd53d: "pig" -0xd53e: "pigg" -0xd53f: "pigs" -0xd540: "pin" -0xd541: "pinj" -0xd542: "pinh" -0xd543: "pid" -0xd544: "pil" -0xd545: "pilg" -0xd546: "pilm" -0xd547: "pilb" -0xd548: "pils" -0xd549: "pilt" -0xd54a: "pilp" -0xd54b: "pilh" -0xd54c: "pim" -0xd54d: "pib" -0xd54e: "pibs" -0xd54f: "pis" -0xd550: "piss" -0xd551: "ping" -0xd552: "pij" -0xd553: "pic" -0xd554: "pik" -0xd555: "pit" -0xd556: "pip" -0xd557: "pih" -0xd558: "ha" -0xd559: "hag" -0xd55a: "hagg" -0xd55b: "hags" -0xd55c: "han" -0xd55d: "hanj" -0xd55e: "hanh" -0xd55f: "had" -0xd560: "hal" -0xd561: "halg" -0xd562: "halm" -0xd563: "halb" -0xd564: "hals" -0xd565: "halt" -0xd566: "halp" -0xd567: "halh" -0xd568: "ham" -0xd569: "hab" -0xd56a: "habs" -0xd56b: "has" -0xd56c: "hass" -0xd56d: "hang" -0xd56e: "haj" -0xd56f: "hac" -0xd570: "hak" -0xd571: "hat" -0xd572: "hap" -0xd573: "hah" -0xd574: "hae" -0xd575: "haeg" -0xd576: "haegg" -0xd577: "haegs" -0xd578: "haen" -0xd579: "haenj" -0xd57a: "haenh" -0xd57b: "haed" -0xd57c: "hael" -0xd57d: "haelg" -0xd57e: "haelm" -0xd57f: "haelb" -0xd580: "haels" -0xd581: "haelt" -0xd582: "haelp" -0xd583: "haelh" -0xd584: "haem" -0xd585: "haeb" -0xd586: "haebs" -0xd587: "haes" -0xd588: "haess" -0xd589: "haeng" -0xd58a: "haej" -0xd58b: "haec" -0xd58c: "haek" -0xd58d: "haet" -0xd58e: "haep" -0xd58f: "haeh" -0xd590: "hya" -0xd591: "hyag" -0xd592: "hyagg" -0xd593: "hyags" -0xd594: "hyan" -0xd595: "hyanj" -0xd596: "hyanh" -0xd597: "hyad" -0xd598: "hyal" -0xd599: "hyalg" -0xd59a: "hyalm" -0xd59b: "hyalb" -0xd59c: "hyals" -0xd59d: "hyalt" -0xd59e: "hyalp" -0xd59f: "hyalh" -0xd5a0: "hyam" -0xd5a1: "hyab" -0xd5a2: "hyabs" -0xd5a3: "hyas" -0xd5a4: "hyass" -0xd5a5: "hyang" -0xd5a6: "hyaj" -0xd5a7: "hyac" -0xd5a8: "hyak" -0xd5a9: "hyat" -0xd5aa: "hyap" -0xd5ab: "hyah" -0xd5ac: "hyae" -0xd5ad: "hyaeg" -0xd5ae: "hyaegg" -0xd5af: "hyaegs" -0xd5b0: "hyaen" -0xd5b1: "hyaenj" -0xd5b2: "hyaenh" -0xd5b3: "hyaed" -0xd5b4: "hyael" -0xd5b5: "hyaelg" -0xd5b6: "hyaelm" -0xd5b7: "hyaelb" -0xd5b8: "hyaels" -0xd5b9: "hyaelt" -0xd5ba: "hyaelp" -0xd5bb: "hyaelh" -0xd5bc: "hyaem" -0xd5bd: "hyaeb" -0xd5be: "hyaebs" -0xd5bf: "hyaes" -0xd5c0: "hyaess" -0xd5c1: "hyaeng" -0xd5c2: "hyaej" -0xd5c3: "hyaec" -0xd5c4: "hyaek" -0xd5c5: "hyaet" -0xd5c6: "hyaep" -0xd5c7: "hyaeh" -0xd5c8: "heo" -0xd5c9: "heog" -0xd5ca: "heogg" -0xd5cb: "heogs" -0xd5cc: "heon" -0xd5cd: "heonj" -0xd5ce: "heonh" -0xd5cf: "heod" -0xd5d0: "heol" -0xd5d1: "heolg" -0xd5d2: "heolm" -0xd5d3: "heolb" -0xd5d4: "heols" -0xd5d5: "heolt" -0xd5d6: "heolp" -0xd5d7: "heolh" -0xd5d8: "heom" -0xd5d9: "heob" -0xd5da: "heobs" -0xd5db: "heos" -0xd5dc: "heoss" -0xd5dd: "heong" -0xd5de: "heoj" -0xd5df: "heoc" -0xd5e0: "heok" -0xd5e1: "heot" -0xd5e2: "heop" -0xd5e3: "heoh" -0xd5e4: "he" -0xd5e5: "heg" -0xd5e6: "hegg" -0xd5e7: "hegs" -0xd5e8: "hen" -0xd5e9: "henj" -0xd5ea: "henh" -0xd5eb: "hed" -0xd5ec: "hel" -0xd5ed: "helg" -0xd5ee: "helm" -0xd5ef: "helb" -0xd5f0: "hels" -0xd5f1: "helt" -0xd5f2: "help" -0xd5f3: "helh" -0xd5f4: "hem" -0xd5f5: "heb" -0xd5f6: "hebs" -0xd5f7: "hes" -0xd5f8: "hess" -0xd5f9: "heng" -0xd5fa: "hej" -0xd5fb: "hec" -0xd5fc: "hek" -0xd5fd: "het" -0xd5fe: "hep" -0xd5ff: "heh" -/* x0d6 */ -0xd600: "hyeo" -0xd601: "hyeog" -0xd602: "hyeogg" -0xd603: "hyeogs" -0xd604: "hyeon" -0xd605: "hyeonj" -0xd606: "hyeonh" -0xd607: "hyeod" -0xd608: "hyeol" -0xd609: "hyeolg" -0xd60a: "hyeolm" -0xd60b: "hyeolb" -0xd60c: "hyeols" -0xd60d: "hyeolt" -0xd60e: "hyeolp" -0xd60f: "hyeolh" -0xd610: "hyeom" -0xd611: "hyeob" -0xd612: "hyeobs" -0xd613: "hyeos" -0xd614: "hyeoss" -0xd615: "hyeong" -0xd616: "hyeoj" -0xd617: "hyeoc" -0xd618: "hyeok" -0xd619: "hyeot" -0xd61a: "hyeop" -0xd61b: "hyeoh" -0xd61c: "hye" -0xd61d: "hyeg" -0xd61e: "hyegg" -0xd61f: "hyegs" -0xd620: "hyen" -0xd621: "hyenj" -0xd622: "hyenh" -0xd623: "hyed" -0xd624: "hyel" -0xd625: "hyelg" -0xd626: "hyelm" -0xd627: "hyelb" -0xd628: "hyels" -0xd629: "hyelt" -0xd62a: "hyelp" -0xd62b: "hyelh" -0xd62c: "hyem" -0xd62d: "hyeb" -0xd62e: "hyebs" -0xd62f: "hyes" -0xd630: "hyess" -0xd631: "hyeng" -0xd632: "hyej" -0xd633: "hyec" -0xd634: "hyek" -0xd635: "hyet" -0xd636: "hyep" -0xd637: "hyeh" -0xd638: "ho" -0xd639: "hog" -0xd63a: "hogg" -0xd63b: "hogs" -0xd63c: "hon" -0xd63d: "honj" -0xd63e: "honh" -0xd63f: "hod" -0xd640: "hol" -0xd641: "holg" -0xd642: "holm" -0xd643: "holb" -0xd644: "hols" -0xd645: "holt" -0xd646: "holp" -0xd647: "holh" -0xd648: "hom" -0xd649: "hob" -0xd64a: "hobs" -0xd64b: "hos" -0xd64c: "hoss" -0xd64d: "hong" -0xd64e: "hoj" -0xd64f: "hoc" -0xd650: "hok" -0xd651: "hot" -0xd652: "hop" -0xd653: "hoh" -0xd654: "hwa" -0xd655: "hwag" -0xd656: "hwagg" -0xd657: "hwags" -0xd658: "hwan" -0xd659: "hwanj" -0xd65a: "hwanh" -0xd65b: "hwad" -0xd65c: "hwal" -0xd65d: "hwalg" -0xd65e: "hwalm" -0xd65f: "hwalb" -0xd660: "hwals" -0xd661: "hwalt" -0xd662: "hwalp" -0xd663: "hwalh" -0xd664: "hwam" -0xd665: "hwab" -0xd666: "hwabs" -0xd667: "hwas" -0xd668: "hwass" -0xd669: "hwang" -0xd66a: "hwaj" -0xd66b: "hwac" -0xd66c: "hwak" -0xd66d: "hwat" -0xd66e: "hwap" -0xd66f: "hwah" -0xd670: "hwae" -0xd671: "hwaeg" -0xd672: "hwaegg" -0xd673: "hwaegs" -0xd674: "hwaen" -0xd675: "hwaenj" -0xd676: "hwaenh" -0xd677: "hwaed" -0xd678: "hwael" -0xd679: "hwaelg" -0xd67a: "hwaelm" -0xd67b: "hwaelb" -0xd67c: "hwaels" -0xd67d: "hwaelt" -0xd67e: "hwaelp" -0xd67f: "hwaelh" -0xd680: "hwaem" -0xd681: "hwaeb" -0xd682: "hwaebs" -0xd683: "hwaes" -0xd684: "hwaess" -0xd685: "hwaeng" -0xd686: "hwaej" -0xd687: "hwaec" -0xd688: "hwaek" -0xd689: "hwaet" -0xd68a: "hwaep" -0xd68b: "hwaeh" -0xd68c: "hoe" -0xd68d: "hoeg" -0xd68e: "hoegg" -0xd68f: "hoegs" -0xd690: "hoen" -0xd691: "hoenj" -0xd692: "hoenh" -0xd693: "hoed" -0xd694: "hoel" -0xd695: "hoelg" -0xd696: "hoelm" -0xd697: "hoelb" -0xd698: "hoels" -0xd699: "hoelt" -0xd69a: "hoelp" -0xd69b: "hoelh" -0xd69c: "hoem" -0xd69d: "hoeb" -0xd69e: "hoebs" -0xd69f: "hoes" -0xd6a0: "hoess" -0xd6a1: "hoeng" -0xd6a2: "hoej" -0xd6a3: "hoec" -0xd6a4: "hoek" -0xd6a5: "hoet" -0xd6a6: "hoep" -0xd6a7: "hoeh" -0xd6a8: "hyo" -0xd6a9: "hyog" -0xd6aa: "hyogg" -0xd6ab: "hyogs" -0xd6ac: "hyon" -0xd6ad: "hyonj" -0xd6ae: "hyonh" -0xd6af: "hyod" -0xd6b0: "hyol" -0xd6b1: "hyolg" -0xd6b2: "hyolm" -0xd6b3: "hyolb" -0xd6b4: "hyols" -0xd6b5: "hyolt" -0xd6b6: "hyolp" -0xd6b7: "hyolh" -0xd6b8: "hyom" -0xd6b9: "hyob" -0xd6ba: "hyobs" -0xd6bb: "hyos" -0xd6bc: "hyoss" -0xd6bd: "hyong" -0xd6be: "hyoj" -0xd6bf: "hyoc" -0xd6c0: "hyok" -0xd6c1: "hyot" -0xd6c2: "hyop" -0xd6c3: "hyoh" -0xd6c4: "hu" -0xd6c5: "hug" -0xd6c6: "hugg" -0xd6c7: "hugs" -0xd6c8: "hun" -0xd6c9: "hunj" -0xd6ca: "hunh" -0xd6cb: "hud" -0xd6cc: "hul" -0xd6cd: "hulg" -0xd6ce: "hulm" -0xd6cf: "hulb" -0xd6d0: "huls" -0xd6d1: "hult" -0xd6d2: "hulp" -0xd6d3: "hulh" -0xd6d4: "hum" -0xd6d5: "hub" -0xd6d6: "hubs" -0xd6d7: "hus" -0xd6d8: "huss" -0xd6d9: "hung" -0xd6da: "huj" -0xd6db: "huc" -0xd6dc: "huk" -0xd6dd: "hut" -0xd6de: "hup" -0xd6df: "huh" -0xd6e0: "hweo" -0xd6e1: "hweog" -0xd6e2: "hweogg" -0xd6e3: "hweogs" -0xd6e4: "hweon" -0xd6e5: "hweonj" -0xd6e6: "hweonh" -0xd6e7: "hweod" -0xd6e8: "hweol" -0xd6e9: "hweolg" -0xd6ea: "hweolm" -0xd6eb: "hweolb" -0xd6ec: "hweols" -0xd6ed: "hweolt" -0xd6ee: "hweolp" -0xd6ef: "hweolh" -0xd6f0: "hweom" -0xd6f1: "hweob" -0xd6f2: "hweobs" -0xd6f3: "hweos" -0xd6f4: "hweoss" -0xd6f5: "hweong" -0xd6f6: "hweoj" -0xd6f7: "hweoc" -0xd6f8: "hweok" -0xd6f9: "hweot" -0xd6fa: "hweop" -0xd6fb: "hweoh" -0xd6fc: "hwe" -0xd6fd: "hweg" -0xd6fe: "hwegg" -0xd6ff: "hwegs" -/* x0d7 */ -0xd700: "hwen" -0xd701: "hwenj" -0xd702: "hwenh" -0xd703: "hwed" -0xd704: "hwel" -0xd705: "hwelg" -0xd706: "hwelm" -0xd707: "hwelb" -0xd708: "hwels" -0xd709: "hwelt" -0xd70a: "hwelp" -0xd70b: "hwelh" -0xd70c: "hwem" -0xd70d: "hweb" -0xd70e: "hwebs" -0xd70f: "hwes" -0xd710: "hwess" -0xd711: "hweng" -0xd712: "hwej" -0xd713: "hwec" -0xd714: "hwek" -0xd715: "hwet" -0xd716: "hwep" -0xd717: "hweh" -0xd718: "hwi" -0xd719: "hwig" -0xd71a: "hwigg" -0xd71b: "hwigs" -0xd71c: "hwin" -0xd71d: "hwinj" -0xd71e: "hwinh" -0xd71f: "hwid" -0xd720: "hwil" -0xd721: "hwilg" -0xd722: "hwilm" -0xd723: "hwilb" -0xd724: "hwils" -0xd725: "hwilt" -0xd726: "hwilp" -0xd727: "hwilh" -0xd728: "hwim" -0xd729: "hwib" -0xd72a: "hwibs" -0xd72b: "hwis" -0xd72c: "hwiss" -0xd72d: "hwing" -0xd72e: "hwij" -0xd72f: "hwic" -0xd730: "hwik" -0xd731: "hwit" -0xd732: "hwip" -0xd733: "hwih" -0xd734: "hyu" -0xd735: "hyug" -0xd736: "hyugg" -0xd737: "hyugs" -0xd738: "hyun" -0xd739: "hyunj" -0xd73a: "hyunh" -0xd73b: "hyud" -0xd73c: "hyul" -0xd73d: "hyulg" -0xd73e: "hyulm" -0xd73f: "hyulb" -0xd740: "hyuls" -0xd741: "hyult" -0xd742: "hyulp" -0xd743: "hyulh" -0xd744: "hyum" -0xd745: "hyub" -0xd746: "hyubs" -0xd747: "hyus" -0xd748: "hyuss" -0xd749: "hyung" -0xd74a: "hyuj" -0xd74b: "hyuc" -0xd74c: "hyuk" -0xd74d: "hyut" -0xd74e: "hyup" -0xd74f: "hyuh" -0xd750: "heu" -0xd751: "heug" -0xd752: "heugg" -0xd753: "heugs" -0xd754: "heun" -0xd755: "heunj" -0xd756: "heunh" -0xd757: "heud" -0xd758: "heul" -0xd759: "heulg" -0xd75a: "heulm" -0xd75b: "heulb" -0xd75c: "heuls" -0xd75d: "heult" -0xd75e: "heulp" -0xd75f: "heulh" -0xd760: "heum" -0xd761: "heub" -0xd762: "heubs" -0xd763: "heus" -0xd764: "heuss" -0xd765: "heung" -0xd766: "heuj" -0xd767: "heuc" -0xd768: "heuk" -0xd769: "heut" -0xd76a: "heup" -0xd76b: "heuh" -0xd76c: "hyi" -0xd76d: "hyig" -0xd76e: "hyigg" -0xd76f: "hyigs" -0xd770: "hyin" -0xd771: "hyinj" -0xd772: "hyinh" -0xd773: "hyid" -0xd774: "hyil" -0xd775: "hyilg" -0xd776: "hyilm" -0xd777: "hyilb" -0xd778: "hyils" -0xd779: "hyilt" -0xd77a: "hyilp" -0xd77b: "hyilh" -0xd77c: "hyim" -0xd77d: "hyib" -0xd77e: "hyibs" -0xd77f: "hyis" -0xd780: "hyiss" -0xd781: "hying" -0xd782: "hyij" -0xd783: "hyic" -0xd784: "hyik" -0xd785: "hyit" -0xd786: "hyip" -0xd787: "hyih" -0xd788: "hi" -0xd789: "hig" -0xd78a: "higg" -0xd78b: "higs" -0xd78c: "hin" -0xd78d: "hinj" -0xd78e: "hinh" -0xd78f: "hid" -0xd790: "hil" -0xd791: "hilg" -0xd792: "hilm" -0xd793: "hilb" -0xd794: "hils" -0xd795: "hilt" -0xd796: "hilp" -0xd797: "hilh" -0xd798: "him" -0xd799: "hib" -0xd79a: "hibs" -0xd79b: "his" -0xd79c: "hiss" -0xd79d: "hing" -0xd79e: "hij" -0xd79f: "hic" -0xd7a0: "hik" -0xd7a1: "hit" -0xd7a2: "hip" -0xd7a3: "hih" -0xd7a4: "[?]" -0xd7a5: "[?]" -0xd7a6: "[?]" -0xd7a7: "[?]" -0xd7a8: "[?]" -0xd7a9: "[?]" -0xd7aa: "[?]" -0xd7ab: "[?]" -0xd7ac: "[?]" -0xd7ad: "[?]" -0xd7ae: "[?]" -0xd7af: "[?]" -0xd7b0: "[?]" -0xd7b1: "[?]" -0xd7b2: "[?]" -0xd7b3: "[?]" -0xd7b4: "[?]" -0xd7b5: "[?]" -0xd7b6: "[?]" -0xd7b7: "[?]" -0xd7b8: "[?]" -0xd7b9: "[?]" -0xd7ba: "[?]" -0xd7bb: "[?]" -0xd7bc: "[?]" -0xd7bd: "[?]" -0xd7be: "[?]" -0xd7bf: "[?]" -0xd7c0: "[?]" -0xd7c1: "[?]" -0xd7c2: "[?]" -0xd7c3: "[?]" -0xd7c4: "[?]" -0xd7c5: "[?]" -0xd7c6: "[?]" -0xd7c7: "[?]" -0xd7c8: "[?]" -0xd7c9: "[?]" -0xd7ca: "[?]" -0xd7cb: "[?]" -0xd7cc: "[?]" -0xd7cd: "[?]" -0xd7ce: "[?]" -0xd7cf: "[?]" -0xd7d0: "[?]" -0xd7d1: "[?]" -0xd7d2: "[?]" -0xd7d3: "[?]" -0xd7d4: "[?]" -0xd7d5: "[?]" -0xd7d6: "[?]" -0xd7d7: "[?]" -0xd7d8: "[?]" -0xd7d9: "[?]" -0xd7da: "[?]" -0xd7db: "[?]" -0xd7dc: "[?]" -0xd7dd: "[?]" -0xd7de: "[?]" -0xd7df: "[?]" -0xd7e0: "[?]" -0xd7e1: "[?]" -0xd7e2: "[?]" -0xd7e3: "[?]" -0xd7e4: "[?]" -0xd7e5: "[?]" -0xd7e6: "[?]" -0xd7e7: "[?]" -0xd7e8: "[?]" -0xd7e9: "[?]" -0xd7ea: "[?]" -0xd7eb: "[?]" -0xd7ec: "[?]" -0xd7ed: "[?]" -0xd7ee: "[?]" -0xd7ef: "[?]" -0xd7f0: "[?]" -0xd7f1: "[?]" -0xd7f2: "[?]" -0xd7f3: "[?]" -0xd7f4: "[?]" -0xd7f5: "[?]" -0xd7f6: "[?]" -0xd7f7: "[?]" -0xd7f8: "[?]" -0xd7f9: "[?]" -0xd7fa: "[?]" -0xd7fb: "[?]" -0xd7fc: "[?]" -0xd7fd: "[?]" -0xd7fe: "[?]" -/* x0f9 */ -0xf900: "Kay " -0xf901: "Kayng " -0xf902: "Ke " -0xf903: "Ko " -0xf904: "Kol " -0xf905: "Koc " -0xf906: "Kwi " -0xf907: "Kwi " -0xf908: "Kyun " -0xf909: "Kul " -0xf90a: "Kum " -0xf90b: "Na " -0xf90c: "Na " -0xf90d: "Na " -0xf90e: "La " -0xf90f: "Na " -0xf910: "Na " -0xf911: "Na " -0xf912: "Na " -0xf913: "Na " -0xf914: "Nak " -0xf915: "Nak " -0xf916: "Nak " -0xf917: "Nak " -0xf918: "Nak " -0xf919: "Nak " -0xf91a: "Nak " -0xf91b: "Nan " -0xf91c: "Nan " -0xf91d: "Nan " -0xf91e: "Nan " -0xf91f: "Nan " -0xf920: "Nan " -0xf921: "Nam " -0xf922: "Nam " -0xf923: "Nam " -0xf924: "Nam " -0xf925: "Nap " -0xf926: "Nap " -0xf927: "Nap " -0xf928: "Nang " -0xf929: "Nang " -0xf92a: "Nang " -0xf92b: "Nang " -0xf92c: "Nang " -0xf92d: "Nay " -0xf92e: "Nayng " -0xf92f: "No " -0xf930: "No " -0xf931: "No " -0xf932: "No " -0xf933: "No " -0xf934: "No " -0xf935: "No " -0xf936: "No " -0xf937: "No " -0xf938: "No " -0xf939: "No " -0xf93a: "No " -0xf93b: "Nok " -0xf93c: "Nok " -0xf93d: "Nok " -0xf93e: "Nok " -0xf93f: "Nok " -0xf940: "Nok " -0xf941: "Non " -0xf942: "Nong " -0xf943: "Nong " -0xf944: "Nong " -0xf945: "Nong " -0xf946: "Noy " -0xf947: "Noy " -0xf948: "Noy " -0xf949: "Noy " -0xf94a: "Nwu " -0xf94b: "Nwu " -0xf94c: "Nwu " -0xf94d: "Nwu " -0xf94e: "Nwu " -0xf94f: "Nwu " -0xf950: "Nwu " -0xf951: "Nwu " -0xf952: "Nuk " -0xf953: "Nuk " -0xf954: "Num " -0xf955: "Nung " -0xf956: "Nung " -0xf957: "Nung " -0xf958: "Nung " -0xf959: "Nung " -0xf95a: "Twu " -0xf95b: "La " -0xf95c: "Lak " -0xf95d: "Lak " -0xf95e: "Lan " -0xf95f: "Lyeng " -0xf960: "Lo " -0xf961: "Lyul " -0xf962: "Li " -0xf963: "Pey " -0xf964: "Pen " -0xf965: "Pyen " -0xf966: "Pwu " -0xf967: "Pwul " -0xf968: "Pi " -0xf969: "Sak " -0xf96a: "Sak " -0xf96b: "Sam " -0xf96c: "Sayk " -0xf96d: "Sayng " -0xf96e: "Sep " -0xf96f: "Sey " -0xf970: "Sway " -0xf971: "Sin " -0xf972: "Sim " -0xf973: "Sip " -0xf974: "Ya " -0xf975: "Yak " -0xf976: "Yak " -0xf977: "Yang " -0xf978: "Yang " -0xf979: "Yang " -0xf97a: "Yang " -0xf97b: "Yang " -0xf97c: "Yang " -0xf97d: "Yang " -0xf97e: "Yang " -0xf97f: "Ye " -0xf980: "Ye " -0xf981: "Ye " -0xf982: "Ye " -0xf983: "Ye " -0xf984: "Ye " -0xf985: "Ye " -0xf986: "Ye " -0xf987: "Ye " -0xf988: "Ye " -0xf989: "Ye " -0xf98a: "Yek " -0xf98b: "Yek " -0xf98c: "Yek " -0xf98d: "Yek " -0xf98e: "Yen " -0xf98f: "Yen " -0xf990: "Yen " -0xf991: "Yen " -0xf992: "Yen " -0xf993: "Yen " -0xf994: "Yen " -0xf995: "Yen " -0xf996: "Yen " -0xf997: "Yen " -0xf998: "Yen " -0xf999: "Yen " -0xf99a: "Yen " -0xf99b: "Yen " -0xf99c: "Yel " -0xf99d: "Yel " -0xf99e: "Yel " -0xf99f: "Yel " -0xf9a0: "Yel " -0xf9a1: "Yel " -0xf9a2: "Yem " -0xf9a3: "Yem " -0xf9a4: "Yem " -0xf9a5: "Yem " -0xf9a6: "Yem " -0xf9a7: "Yep " -0xf9a8: "Yeng " -0xf9a9: "Yeng " -0xf9aa: "Yeng " -0xf9ab: "Yeng " -0xf9ac: "Yeng " -0xf9ad: "Yeng " -0xf9ae: "Yeng " -0xf9af: "Yeng " -0xf9b0: "Yeng " -0xf9b1: "Yeng " -0xf9b2: "Yeng " -0xf9b3: "Yeng " -0xf9b4: "Yeng " -0xf9b5: "Yey " -0xf9b6: "Yey " -0xf9b7: "Yey " -0xf9b8: "Yey " -0xf9b9: "O " -0xf9ba: "Yo " -0xf9bb: "Yo " -0xf9bc: "Yo " -0xf9bd: "Yo " -0xf9be: "Yo " -0xf9bf: "Yo " -0xf9c0: "Yo " -0xf9c1: "Yo " -0xf9c2: "Yo " -0xf9c3: "Yo " -0xf9c4: "Yong " -0xf9c5: "Wun " -0xf9c6: "Wen " -0xf9c7: "Yu " -0xf9c8: "Yu " -0xf9c9: "Yu " -0xf9ca: "Yu " -0xf9cb: "Yu " -0xf9cc: "Yu " -0xf9cd: "Yu " -0xf9ce: "Yu " -0xf9cf: "Yu " -0xf9d0: "Yu " -0xf9d1: "Yuk " -0xf9d2: "Yuk " -0xf9d3: "Yuk " -0xf9d4: "Yun " -0xf9d5: "Yun " -0xf9d6: "Yun " -0xf9d7: "Yun " -0xf9d8: "Yul " -0xf9d9: "Yul " -0xf9da: "Yul " -0xf9db: "Yul " -0xf9dc: "Yung " -0xf9dd: "I " -0xf9de: "I " -0xf9df: "I " -0xf9e0: "I " -0xf9e1: "I " -0xf9e2: "I " -0xf9e3: "I " -0xf9e4: "I " -0xf9e5: "I " -0xf9e6: "I " -0xf9e7: "I " -0xf9e8: "I " -0xf9e9: "I " -0xf9ea: "I " -0xf9eb: "Ik " -0xf9ec: "Ik " -0xf9ed: "In " -0xf9ee: "In " -0xf9ef: "In " -0xf9f0: "In " -0xf9f1: "In " -0xf9f2: "In " -0xf9f3: "In " -0xf9f4: "Im " -0xf9f5: "Im " -0xf9f6: "Im " -0xf9f7: "Ip " -0xf9f8: "Ip " -0xf9f9: "Ip " -0xf9fa: "Cang " -0xf9fb: "Cek " -0xf9fc: "Ci " -0xf9fd: "Cip " -0xf9fe: "Cha " -0xf9ff: "Chek " -/* x0fa */ -0xfa00: "Chey " -0xfa01: "Thak " -0xfa02: "Thak " -0xfa03: "Thang " -0xfa04: "Thayk " -0xfa05: "Thong " -0xfa06: "Pho " -0xfa07: "Phok " -0xfa08: "Hang " -0xfa09: "Hang " -0xfa0a: "Hyen " -0xfa0b: "Hwak " -0xfa0c: "Wu " -0xfa0d: "Huo " -0xfa0e: "[?] " -0xfa0f: "[?] " -0xfa10: "Zhong " -0xfa11: "[?] " -0xfa12: "Qing " -0xfa13: "[?] " -0xfa14: "[?] " -0xfa15: "Xi " -0xfa16: "Zhu " -0xfa17: "Yi " -0xfa18: "Li " -0xfa19: "Shen " -0xfa1a: "Xiang " -0xfa1b: "Fu " -0xfa1c: "Jing " -0xfa1d: "Jing " -0xfa1e: "Yu " -0xfa1f: "[?] " -0xfa20: "Hagi " -0xfa21: "[?] " -0xfa22: "Zhu " -0xfa23: "[?] " -0xfa24: "[?] " -0xfa25: "Yi " -0xfa26: "Du " -0xfa27: "[?] " -0xfa28: "[?] " -0xfa29: "[?] " -0xfa2a: "Fan " -0xfa2b: "Si " -0xfa2c: "Guan " -0xfa2d: "[?]" -0xfa2e: "[?]" -0xfa2f: "[?]" -0xfa30: "[?]" -0xfa31: "[?]" -0xfa32: "[?]" -0xfa33: "[?]" -0xfa34: "[?]" -0xfa35: "[?]" -0xfa36: "[?]" -0xfa37: "[?]" -0xfa38: "[?]" -0xfa39: "[?]" -0xfa3a: "[?]" -0xfa3b: "[?]" -0xfa3c: "[?]" -0xfa3d: "[?]" -0xfa3e: "[?]" -0xfa3f: "[?]" -0xfa40: "[?]" -0xfa41: "[?]" -0xfa42: "[?]" -0xfa43: "[?]" -0xfa44: "[?]" -0xfa45: "[?]" -0xfa46: "[?]" -0xfa47: "[?]" -0xfa48: "[?]" -0xfa49: "[?]" -0xfa4a: "[?]" -0xfa4b: "[?]" -0xfa4c: "[?]" -0xfa4d: "[?]" -0xfa4e: "[?]" -0xfa4f: "[?]" -0xfa50: "[?]" -0xfa51: "[?]" -0xfa52: "[?]" -0xfa53: "[?]" -0xfa54: "[?]" -0xfa55: "[?]" -0xfa56: "[?]" -0xfa57: "[?]" -0xfa58: "[?]" -0xfa59: "[?]" -0xfa5a: "[?]" -0xfa5b: "[?]" -0xfa5c: "[?]" -0xfa5d: "[?]" -0xfa5e: "[?]" -0xfa5f: "[?]" -0xfa60: "[?]" -0xfa61: "[?]" -0xfa62: "[?]" -0xfa63: "[?]" -0xfa64: "[?]" -0xfa65: "[?]" -0xfa66: "[?]" -0xfa67: "[?]" -0xfa68: "[?]" -0xfa69: "[?]" -0xfa6a: "[?]" -0xfa6b: "[?]" -0xfa6c: "[?]" -0xfa6d: "[?]" -0xfa6e: "[?]" -0xfa6f: "[?]" -0xfa70: "[?]" -0xfa71: "[?]" -0xfa72: "[?]" -0xfa73: "[?]" -0xfa74: "[?]" -0xfa75: "[?]" -0xfa76: "[?]" -0xfa77: "[?]" -0xfa78: "[?]" -0xfa79: "[?]" -0xfa7a: "[?]" -0xfa7b: "[?]" -0xfa7c: "[?]" -0xfa7d: "[?]" -0xfa7e: "[?]" -0xfa7f: "[?]" -0xfa80: "[?]" -0xfa81: "[?]" -0xfa82: "[?]" -0xfa83: "[?]" -0xfa84: "[?]" -0xfa85: "[?]" -0xfa86: "[?]" -0xfa87: "[?]" -0xfa88: "[?]" -0xfa89: "[?]" -0xfa8a: "[?]" -0xfa8b: "[?]" -0xfa8c: "[?]" -0xfa8d: "[?]" -0xfa8e: "[?]" -0xfa8f: "[?]" -0xfa90: "[?]" -0xfa91: "[?]" -0xfa92: "[?]" -0xfa93: "[?]" -0xfa94: "[?]" -0xfa95: "[?]" -0xfa96: "[?]" -0xfa97: "[?]" -0xfa98: "[?]" -0xfa99: "[?]" -0xfa9a: "[?]" -0xfa9b: "[?]" -0xfa9c: "[?]" -0xfa9d: "[?]" -0xfa9e: "[?]" -0xfa9f: "[?]" -0xfaa0: "[?]" -0xfaa1: "[?]" -0xfaa2: "[?]" -0xfaa3: "[?]" -0xfaa4: "[?]" -0xfaa5: "[?]" -0xfaa6: "[?]" -0xfaa7: "[?]" -0xfaa8: "[?]" -0xfaa9: "[?]" -0xfaaa: "[?]" -0xfaab: "[?]" -0xfaac: "[?]" -0xfaad: "[?]" -0xfaae: "[?]" -0xfaaf: "[?]" -0xfab0: "[?]" -0xfab1: "[?]" -0xfab2: "[?]" -0xfab3: "[?]" -0xfab4: "[?]" -0xfab5: "[?]" -0xfab6: "[?]" -0xfab7: "[?]" -0xfab8: "[?]" -0xfab9: "[?]" -0xfaba: "[?]" -0xfabb: "[?]" -0xfabc: "[?]" -0xfabd: "[?]" -0xfabe: "[?]" -0xfabf: "[?]" -0xfac0: "[?]" -0xfac1: "[?]" -0xfac2: "[?]" -0xfac3: "[?]" -0xfac4: "[?]" -0xfac5: "[?]" -0xfac6: "[?]" -0xfac7: "[?]" -0xfac8: "[?]" -0xfac9: "[?]" -0xfaca: "[?]" -0xfacb: "[?]" -0xfacc: "[?]" -0xfacd: "[?]" -0xface: "[?]" -0xfacf: "[?]" -0xfad0: "[?]" -0xfad1: "[?]" -0xfad2: "[?]" -0xfad3: "[?]" -0xfad4: "[?]" -0xfad5: "[?]" -0xfad6: "[?]" -0xfad7: "[?]" -0xfad8: "[?]" -0xfad9: "[?]" -0xfada: "[?]" -0xfadb: "[?]" -0xfadc: "[?]" -0xfadd: "[?]" -0xfade: "[?]" -0xfadf: "[?]" -0xfae0: "[?]" -0xfae1: "[?]" -0xfae2: "[?]" -0xfae3: "[?]" -0xfae4: "[?]" -0xfae5: "[?]" -0xfae6: "[?]" -0xfae7: "[?]" -0xfae8: "[?]" -0xfae9: "[?]" -0xfaea: "[?]" -0xfaeb: "[?]" -0xfaec: "[?]" -0xfaed: "[?]" -0xfaee: "[?]" -0xfaef: "[?]" -0xfaf0: "[?]" -0xfaf1: "[?]" -0xfaf2: "[?]" -0xfaf3: "[?]" -0xfaf4: "[?]" -0xfaf5: "[?]" -0xfaf6: "[?]" -0xfaf7: "[?]" -0xfaf8: "[?]" -0xfaf9: "[?]" -0xfafa: "[?]" -0xfafb: "[?]" -0xfafc: "[?]" -0xfafd: "[?]" -0xfafe: "[?]" -/* x0fb */ -0xfb00: "ff" -0xfb01: "fi" -0xfb02: "fl" -0xfb03: "ffi" -0xfb04: "ffl" -0xfb05: "st" -0xfb06: "st" -0xfb07: "[?]" -0xfb08: "[?]" -0xfb09: "[?]" -0xfb0a: "[?]" -0xfb0b: "[?]" -0xfb0c: "[?]" -0xfb0d: "[?]" -0xfb0e: "[?]" -0xfb0f: "[?]" -0xfb10: "[?]" -0xfb11: "[?]" -0xfb12: "[?]" -0xfb13: "mn" -0xfb14: "me" -0xfb15: "mi" -0xfb16: "vn" -0xfb17: "mkh" -0xfb18: "[?]" -0xfb19: "[?]" -0xfb1a: "[?]" -0xfb1b: "[?]" -0xfb1c: "[?]" -0xfb1d: "yi" -0xfb1e: "" -0xfb1f: "ay" -0xfb20: "`" -0xfb21: "" -0xfb22: "d" -0xfb23: "h" -0xfb24: "k" -0xfb25: "l" -0xfb26: "m" -0xfb27: "m" -0xfb28: "t" -0xfb29: "+" -0xfb2a: "sh" -0xfb2b: "s" -0xfb2c: "sh" -0xfb2d: "s" -0xfb2e: "a" -0xfb2f: "a" -0xfb30: "" -0xfb31: "b" -0xfb32: "g" -0xfb33: "d" -0xfb34: "h" -0xfb35: "v" -0xfb36: "z" -0xfb37: "[?]" -0xfb38: "t" -0xfb39: "y" -0xfb3a: "k" -0xfb3b: "k" -0xfb3c: "l" -0xfb3d: "[?]" -0xfb3e: "l" -0xfb3f: "[?]" -0xfb40: "n" -0xfb41: "n" -0xfb42: "[?]" -0xfb43: "p" -0xfb44: "p" -0xfb45: "[?]" -0xfb46: "ts" -0xfb47: "ts" -0xfb48: "r" -0xfb49: "sh" -0xfb4a: "t" -0xfb4b: "vo" -0xfb4c: "b" -0xfb4d: "k" -0xfb4e: "p" -0xfb4f: "l" -0xfb50: "" -0xfb51: "" -0xfb52: "" -0xfb53: "" -0xfb54: "" -0xfb55: "" -0xfb56: "" -0xfb57: "" -0xfb58: "" -0xfb59: "" -0xfb5a: "" -0xfb5b: "" -0xfb5c: "" -0xfb5d: "" -0xfb5e: "" -0xfb5f: "" -0xfb60: "" -0xfb61: "" -0xfb62: "" -0xfb63: "" -0xfb64: "" -0xfb65: "" -0xfb66: "" -0xfb67: "" -0xfb68: "" -0xfb69: "" -0xfb6a: "" -0xfb6b: "" -0xfb6c: "" -0xfb6d: "" -0xfb6e: "" -0xfb6f: "" -0xfb70: "" -0xfb71: "" -0xfb72: "" -0xfb73: "" -0xfb74: "" -0xfb75: "" -0xfb76: "" -0xfb77: "" -0xfb78: "" -0xfb79: "" -0xfb7a: "" -0xfb7b: "" -0xfb7c: "" -0xfb7d: "" -0xfb7e: "" -0xfb7f: "" -0xfb80: "" -0xfb81: "" -0xfb82: "" -0xfb83: "" -0xfb84: "" -0xfb85: "" -0xfb86: "" -0xfb87: "" -0xfb88: "" -0xfb89: "" -0xfb8a: "" -0xfb8b: "" -0xfb8c: "" -0xfb8d: "" -0xfb8e: "" -0xfb8f: "" -0xfb90: "" -0xfb91: "" -0xfb92: "" -0xfb93: "" -0xfb94: "" -0xfb95: "" -0xfb96: "" -0xfb97: "" -0xfb98: "" -0xfb99: "" -0xfb9a: "" -0xfb9b: "" -0xfb9c: "" -0xfb9d: "" -0xfb9e: "" -0xfb9f: "" -0xfba0: "" -0xfba1: "" -0xfba2: "" -0xfba3: "" -0xfba4: "" -0xfba5: "" -0xfba6: "" -0xfba7: "" -0xfba8: "" -0xfba9: "" -0xfbaa: "" -0xfbab: "" -0xfbac: "" -0xfbad: "" -0xfbae: "" -0xfbaf: "" -0xfbb0: "" -0xfbb1: "" -0xfbb2: "[?]" -0xfbb3: "[?]" -0xfbb4: "[?]" -0xfbb5: "[?]" -0xfbb6: "[?]" -0xfbb7: "[?]" -0xfbb8: "[?]" -0xfbb9: "[?]" -0xfbba: "[?]" -0xfbbb: "[?]" -0xfbbc: "[?]" -0xfbbd: "[?]" -0xfbbe: "[?]" -0xfbbf: "[?]" -0xfbc0: "[?]" -0xfbc1: "[?]" -0xfbc2: "[?]" -0xfbc3: "[?]" -0xfbc4: "[?]" -0xfbc5: "[?]" -0xfbc6: "[?]" -0xfbc7: "[?]" -0xfbc8: "[?]" -0xfbc9: "[?]" -0xfbca: "[?]" -0xfbcb: "[?]" -0xfbcc: "[?]" -0xfbcd: "[?]" -0xfbce: "[?]" -0xfbcf: "[?]" -0xfbd0: "[?]" -0xfbd1: "[?]" -0xfbd2: "[?]" -0xfbd3: "" -0xfbd4: "" -0xfbd5: "" -0xfbd6: "" -0xfbd7: "" -0xfbd8: "" -0xfbd9: "" -0xfbda: "" -0xfbdb: "" -0xfbdc: "" -0xfbdd: "" -0xfbde: "" -0xfbdf: "" -0xfbe0: "" -0xfbe1: "" -0xfbe2: "" -0xfbe3: "" -0xfbe4: "" -0xfbe5: "" -0xfbe6: "" -0xfbe7: "" -0xfbe8: "" -0xfbe9: "" -0xfbea: "" -0xfbeb: "" -0xfbec: "" -0xfbed: "" -0xfbee: "" -0xfbef: "" -0xfbf0: "" -0xfbf1: "" -0xfbf2: "" -0xfbf3: "" -0xfbf4: "" -0xfbf5: "" -0xfbf6: "" -0xfbf7: "" -0xfbf8: "" -0xfbf9: "" -0xfbfa: "" -0xfbfb: "" -0xfbfc: "" -0xfbfd: "" -0xfbfe: "" -0xfbff: "" -/* x0fc */ -0xfc00: "" -0xfc01: "" -0xfc02: "" -0xfc03: "" -0xfc04: "" -0xfc05: "" -0xfc06: "" -0xfc07: "" -0xfc08: "" -0xfc09: "" -0xfc0a: "" -0xfc0b: "" -0xfc0c: "" -0xfc0d: "" -0xfc0e: "" -0xfc0f: "" -0xfc10: "" -0xfc11: "" -0xfc12: "" -0xfc13: "" -0xfc14: "" -0xfc15: "" -0xfc16: "" -0xfc17: "" -0xfc18: "" -0xfc19: "" -0xfc1a: "" -0xfc1b: "" -0xfc1c: "" -0xfc1d: "" -0xfc1e: "" -0xfc1f: "" -0xfc20: "" -0xfc21: "" -0xfc22: "" -0xfc23: "" -0xfc24: "" -0xfc25: "" -0xfc26: "" -0xfc27: "" -0xfc28: "" -0xfc29: "" -0xfc2a: "" -0xfc2b: "" -0xfc2c: "" -0xfc2d: "" -0xfc2e: "" -0xfc2f: "" -0xfc30: "" -0xfc31: "" -0xfc32: "" -0xfc33: "" -0xfc34: "" -0xfc35: "" -0xfc36: "" -0xfc37: "" -0xfc38: "" -0xfc39: "" -0xfc3a: "" -0xfc3b: "" -0xfc3c: "" -0xfc3d: "" -0xfc3e: "" -0xfc3f: "" -0xfc40: "" -0xfc41: "" -0xfc42: "" -0xfc43: "" -0xfc44: "" -0xfc45: "" -0xfc46: "" -0xfc47: "" -0xfc48: "" -0xfc49: "" -0xfc4a: "" -0xfc4b: "" -0xfc4c: "" -0xfc4d: "" -0xfc4e: "" -0xfc4f: "" -0xfc50: "" -0xfc51: "" -0xfc52: "" -0xfc53: "" -0xfc54: "" -0xfc55: "" -0xfc56: "" -0xfc57: "" -0xfc58: "" -0xfc59: "" -0xfc5a: "" -0xfc5b: "" -0xfc5c: "" -0xfc5d: "" -0xfc5e: "" -0xfc5f: "" -0xfc60: "" -0xfc61: "" -0xfc62: "" -0xfc63: "" -0xfc64: "" -0xfc65: "" -0xfc66: "" -0xfc67: "" -0xfc68: "" -0xfc69: "" -0xfc6a: "" -0xfc6b: "" -0xfc6c: "" -0xfc6d: "" -0xfc6e: "" -0xfc6f: "" -0xfc70: "" -0xfc71: "" -0xfc72: "" -0xfc73: "" -0xfc74: "" -0xfc75: "" -0xfc76: "" -0xfc77: "" -0xfc78: "" -0xfc79: "" -0xfc7a: "" -0xfc7b: "" -0xfc7c: "" -0xfc7d: "" -0xfc7e: "" -0xfc7f: "" -0xfc80: "" -0xfc81: "" -0xfc82: "" -0xfc83: "" -0xfc84: "" -0xfc85: "" -0xfc86: "" -0xfc87: "" -0xfc88: "" -0xfc89: "" -0xfc8a: "" -0xfc8b: "" -0xfc8c: "" -0xfc8d: "" -0xfc8e: "" -0xfc8f: "" -0xfc90: "" -0xfc91: "" -0xfc92: "" -0xfc93: "" -0xfc94: "" -0xfc95: "" -0xfc96: "" -0xfc97: "" -0xfc98: "" -0xfc99: "" -0xfc9a: "" -0xfc9b: "" -0xfc9c: "" -0xfc9d: "" -0xfc9e: "" -0xfc9f: "" -0xfca0: "" -0xfca1: "" -0xfca2: "" -0xfca3: "" -0xfca4: "" -0xfca5: "" -0xfca6: "" -0xfca7: "" -0xfca8: "" -0xfca9: "" -0xfcaa: "" -0xfcab: "" -0xfcac: "" -0xfcad: "" -0xfcae: "" -0xfcaf: "" -0xfcb0: "" -0xfcb1: "" -0xfcb2: "" -0xfcb3: "" -0xfcb4: "" -0xfcb5: "" -0xfcb6: "" -0xfcb7: "" -0xfcb8: "" -0xfcb9: "" -0xfcba: "" -0xfcbb: "" -0xfcbc: "" -0xfcbd: "" -0xfcbe: "" -0xfcbf: "" -0xfcc0: "" -0xfcc1: "" -0xfcc2: "" -0xfcc3: "" -0xfcc4: "" -0xfcc5: "" -0xfcc6: "" -0xfcc7: "" -0xfcc8: "" -0xfcc9: "" -0xfcca: "" -0xfccb: "" -0xfccc: "" -0xfccd: "" -0xfcce: "" -0xfccf: "" -0xfcd0: "" -0xfcd1: "" -0xfcd2: "" -0xfcd3: "" -0xfcd4: "" -0xfcd5: "" -0xfcd6: "" -0xfcd7: "" -0xfcd8: "" -0xfcd9: "" -0xfcda: "" -0xfcdb: "" -0xfcdc: "" -0xfcdd: "" -0xfcde: "" -0xfcdf: "" -0xfce0: "" -0xfce1: "" -0xfce2: "" -0xfce3: "" -0xfce4: "" -0xfce5: "" -0xfce6: "" -0xfce7: "" -0xfce8: "" -0xfce9: "" -0xfcea: "" -0xfceb: "" -0xfcec: "" -0xfced: "" -0xfcee: "" -0xfcef: "" -0xfcf0: "" -0xfcf1: "" -0xfcf2: "" -0xfcf3: "" -0xfcf4: "" -0xfcf5: "" -0xfcf6: "" -0xfcf7: "" -0xfcf8: "" -0xfcf9: "" -0xfcfa: "" -0xfcfb: "" -0xfcfc: "" -0xfcfd: "" -0xfcfe: "" -0xfcff: "" -/* x0fd */ -0xfd00: "" -0xfd01: "" -0xfd02: "" -0xfd03: "" -0xfd04: "" -0xfd05: "" -0xfd06: "" -0xfd07: "" -0xfd08: "" -0xfd09: "" -0xfd0a: "" -0xfd0b: "" -0xfd0c: "" -0xfd0d: "" -0xfd0e: "" -0xfd0f: "" -0xfd10: "" -0xfd11: "" -0xfd12: "" -0xfd13: "" -0xfd14: "" -0xfd15: "" -0xfd16: "" -0xfd17: "" -0xfd18: "" -0xfd19: "" -0xfd1a: "" -0xfd1b: "" -0xfd1c: "" -0xfd1d: "" -0xfd1e: "" -0xfd1f: "" -0xfd20: "" -0xfd21: "" -0xfd22: "" -0xfd23: "" -0xfd24: "" -0xfd25: "" -0xfd26: "" -0xfd27: "" -0xfd28: "" -0xfd29: "" -0xfd2a: "" -0xfd2b: "" -0xfd2c: "" -0xfd2d: "" -0xfd2e: "" -0xfd2f: "" -0xfd30: "" -0xfd31: "" -0xfd32: "" -0xfd33: "" -0xfd34: "" -0xfd35: "" -0xfd36: "" -0xfd37: "" -0xfd38: "" -0xfd39: "" -0xfd3a: "" -0xfd3b: "" -0xfd3c: "" -0xfd3d: "" -0xfd3e: "" -0xfd3f: "" -0xfd40: "[?]" -0xfd41: "[?]" -0xfd42: "[?]" -0xfd43: "[?]" -0xfd44: "[?]" -0xfd45: "[?]" -0xfd46: "[?]" -0xfd47: "[?]" -0xfd48: "[?]" -0xfd49: "[?]" -0xfd4a: "[?]" -0xfd4b: "[?]" -0xfd4c: "[?]" -0xfd4d: "[?]" -0xfd4e: "[?]" -0xfd4f: "[?]" -0xfd50: "" -0xfd51: "" -0xfd52: "" -0xfd53: "" -0xfd54: "" -0xfd55: "" -0xfd56: "" -0xfd57: "" -0xfd58: "" -0xfd59: "" -0xfd5a: "" -0xfd5b: "" -0xfd5c: "" -0xfd5d: "" -0xfd5e: "" -0xfd5f: "" -0xfd60: "" -0xfd61: "" -0xfd62: "" -0xfd63: "" -0xfd64: "" -0xfd65: "" -0xfd66: "" -0xfd67: "" -0xfd68: "" -0xfd69: "" -0xfd6a: "" -0xfd6b: "" -0xfd6c: "" -0xfd6d: "" -0xfd6e: "" -0xfd6f: "" -0xfd70: "" -0xfd71: "" -0xfd72: "" -0xfd73: "" -0xfd74: "" -0xfd75: "" -0xfd76: "" -0xfd77: "" -0xfd78: "" -0xfd79: "" -0xfd7a: "" -0xfd7b: "" -0xfd7c: "" -0xfd7d: "" -0xfd7e: "" -0xfd7f: "" -0xfd80: "" -0xfd81: "" -0xfd82: "" -0xfd83: "" -0xfd84: "" -0xfd85: "" -0xfd86: "" -0xfd87: "" -0xfd88: "" -0xfd89: "" -0xfd8a: "" -0xfd8b: "" -0xfd8c: "" -0xfd8d: "" -0xfd8e: "" -0xfd8f: "" -0xfd90: "[?]" -0xfd91: "[?]" -0xfd92: "" -0xfd93: "" -0xfd94: "" -0xfd95: "" -0xfd96: "" -0xfd97: "" -0xfd98: "" -0xfd99: "" -0xfd9a: "" -0xfd9b: "" -0xfd9c: "" -0xfd9d: "" -0xfd9e: "" -0xfd9f: "" -0xfda0: "" -0xfda1: "" -0xfda2: "" -0xfda3: "" -0xfda4: "" -0xfda5: "" -0xfda6: "" -0xfda7: "" -0xfda8: "" -0xfda9: "" -0xfdaa: "" -0xfdab: "" -0xfdac: "" -0xfdad: "" -0xfdae: "" -0xfdaf: "" -0xfdb0: "" -0xfdb1: "" -0xfdb2: "" -0xfdb3: "" -0xfdb4: "" -0xfdb5: "" -0xfdb6: "" -0xfdb7: "" -0xfdb8: "" -0xfdb9: "" -0xfdba: "" -0xfdbb: "" -0xfdbc: "" -0xfdbd: "" -0xfdbe: "" -0xfdbf: "" -0xfdc0: "" -0xfdc1: "" -0xfdc2: "" -0xfdc3: "" -0xfdc4: "" -0xfdc5: "" -0xfdc6: "" -0xfdc7: "" -0xfdc8: "[?]" -0xfdc9: "[?]" -0xfdca: "[?]" -0xfdcb: "[?]" -0xfdcc: "[?]" -0xfdcd: "[?]" -0xfdce: "[?]" -0xfdcf: "[?]" -0xfdd0: "[?]" -0xfdd1: "[?]" -0xfdd2: "[?]" -0xfdd3: "[?]" -0xfdd4: "[?]" -0xfdd5: "[?]" -0xfdd6: "[?]" -0xfdd7: "[?]" -0xfdd8: "[?]" -0xfdd9: "[?]" -0xfdda: "[?]" -0xfddb: "[?]" -0xfddc: "[?]" -0xfddd: "[?]" -0xfdde: "[?]" -0xfddf: "[?]" -0xfde0: "[?]" -0xfde1: "[?]" -0xfde2: "[?]" -0xfde3: "[?]" -0xfde4: "[?]" -0xfde5: "[?]" -0xfde6: "[?]" -0xfde7: "[?]" -0xfde8: "[?]" -0xfde9: "[?]" -0xfdea: "[?]" -0xfdeb: "[?]" -0xfdec: "[?]" -0xfded: "[?]" -0xfdee: "[?]" -0xfdef: "[?]" -0xfdf0: "" -0xfdf1: "" -0xfdf2: "" -0xfdf3: "" -0xfdf4: "" -0xfdf5: "" -0xfdf6: "" -0xfdf7: "" -0xfdf8: "" -0xfdf9: "" -0xfdfa: "" -0xfdfb: "" -0xfdfc: "[?]" -0xfdfd: "[?]" -0xfdfe: "[?]" -/* x0fe */ -0xfe00: "[?]" -0xfe01: "[?]" -0xfe02: "[?]" -0xfe03: "[?]" -0xfe04: "[?]" -0xfe05: "[?]" -0xfe06: "[?]" -0xfe07: "[?]" -0xfe08: "[?]" -0xfe09: "[?]" -0xfe0a: "[?]" -0xfe0b: "[?]" -0xfe0c: "[?]" -0xfe0d: "[?]" -0xfe0e: "[?]" -0xfe0f: "[?]" -0xfe10: "[?]" -0xfe11: "[?]" -0xfe12: "[?]" -0xfe13: "[?]" -0xfe14: "[?]" -0xfe15: "[?]" -0xfe16: "[?]" -0xfe17: "[?]" -0xfe18: "[?]" -0xfe19: "[?]" -0xfe1a: "[?]" -0xfe1b: "[?]" -0xfe1c: "[?]" -0xfe1d: "[?]" -0xfe1e: "[?]" -0xfe1f: "[?]" -0xfe20: "" -0xfe21: "" -0xfe22: "" -0xfe23: "~" -0xfe24: "[?]" -0xfe25: "[?]" -0xfe26: "[?]" -0xfe27: "[?]" -0xfe28: "[?]" -0xfe29: "[?]" -0xfe2a: "[?]" -0xfe2b: "[?]" -0xfe2c: "[?]" -0xfe2d: "[?]" -0xfe2e: "[?]" -0xfe2f: "[?]" -0xfe30: ".." -0xfe31: "--" -0xfe32: "-" -0xfe33: "_" -0xfe34: "_" -0xfe35: "(" -0xfe36: ") " -0xfe37: "{" -0xfe38: "} " -0xfe39: "[" -0xfe3a: "] " -0xfe3b: "[(" -0xfe3c: ")] " -0xfe3d: "<<" -0xfe3e: ">> " -0xfe3f: "<" -0xfe40: "> " -0xfe41: "[" -0xfe42: "] " -0xfe43: "{" -0xfe44: "}" -0xfe45: "[?]" -0xfe46: "[?]" -0xfe47: "[?]" -0xfe48: "[?]" -0xfe49: "" -0xfe4a: "" -0xfe4b: "" -0xfe4c: "" -0xfe4d: "" -0xfe4e: "" -0xfe4f: "" -0xfe50: "," -0xfe51: "," -0xfe52: "." -0xfe53: "" -0xfe54: ";" -0xfe55: ":" -0xfe56: "?" -0xfe57: "!" -0xfe58: "-" -0xfe59: "(" -0xfe5a: ")" -0xfe5b: "{" -0xfe5c: "}" -0xfe5d: "{" -0xfe5e: "}" -0xfe5f: "#" -0xfe60: "&" -0xfe61: "*" -0xfe62: "+" -0xfe63: "-" -0xfe64: "<" -0xfe65: ">" -0xfe66: "=" -0xfe67: "" -0xfe68: "\\" -0xfe69: "$" -0xfe6a: "%" -0xfe6b: "@" -0xfe6c: "[?]" -0xfe6d: "[?]" -0xfe6e: "[?]" -0xfe6f: "[?]" -0xfe70: "" -0xfe71: "" -0xfe72: "" -0xfe73: "[?]" -0xfe74: "" -0xfe75: "[?]" -0xfe76: "" -0xfe77: "" -0xfe78: "" -0xfe79: "" -0xfe7a: "" -0xfe7b: "" -0xfe7c: "" -0xfe7d: "" -0xfe7e: "" -0xfe7f: "" -0xfe80: "" -0xfe81: "" -0xfe82: "" -0xfe83: "" -0xfe84: "" -0xfe85: "" -0xfe86: "" -0xfe87: "" -0xfe88: "" -0xfe89: "" -0xfe8a: "" -0xfe8b: "" -0xfe8c: "" -0xfe8d: "" -0xfe8e: "" -0xfe8f: "" -0xfe90: "" -0xfe91: "" -0xfe92: "" -0xfe93: "" -0xfe94: "" -0xfe95: "" -0xfe96: "" -0xfe97: "" -0xfe98: "" -0xfe99: "" -0xfe9a: "" -0xfe9b: "" -0xfe9c: "" -0xfe9d: "" -0xfe9e: "" -0xfe9f: "" -0xfea0: "" -0xfea1: "" -0xfea2: "" -0xfea3: "" -0xfea4: "" -0xfea5: "" -0xfea6: "" -0xfea7: "" -0xfea8: "" -0xfea9: "" -0xfeaa: "" -0xfeab: "" -0xfeac: "" -0xfead: "" -0xfeae: "" -0xfeaf: "" -0xfeb0: "" -0xfeb1: "" -0xfeb2: "" -0xfeb3: "" -0xfeb4: "" -0xfeb5: "" -0xfeb6: "" -0xfeb7: "" -0xfeb8: "" -0xfeb9: "" -0xfeba: "" -0xfebb: "" -0xfebc: "" -0xfebd: "" -0xfebe: "" -0xfebf: "" -0xfec0: "" -0xfec1: "" -0xfec2: "" -0xfec3: "" -0xfec4: "" -0xfec5: "" -0xfec6: "" -0xfec7: "" -0xfec8: "" -0xfec9: "" -0xfeca: "" -0xfecb: "" -0xfecc: "" -0xfecd: "" -0xfece: "" -0xfecf: "" -0xfed0: "" -0xfed1: "" -0xfed2: "" -0xfed3: "" -0xfed4: "" -0xfed5: "" -0xfed6: "" -0xfed7: "" -0xfed8: "" -0xfed9: "" -0xfeda: "" -0xfedb: "" -0xfedc: "" -0xfedd: "" -0xfede: "" -0xfedf: "" -0xfee0: "" -0xfee1: "" -0xfee2: "" -0xfee3: "" -0xfee4: "" -0xfee5: "" -0xfee6: "" -0xfee7: "" -0xfee8: "" -0xfee9: "" -0xfeea: "" -0xfeeb: "" -0xfeec: "" -0xfeed: "" -0xfeee: "" -0xfeef: "" -0xfef0: "" -0xfef1: "" -0xfef2: "" -0xfef3: "" -0xfef4: "" -0xfef5: "" -0xfef6: "" -0xfef7: "" -0xfef8: "" -0xfef9: "" -0xfefa: "" -0xfefb: "" -0xfefc: "" -0xfefd: "[?]" -0xfefe: "[?]" -0xfeff: "" -/* x0ff */ -0xff00: "[?]" -0xff01: "!" -0xff02: "\"" -0xff03: "#" -0xff04: "$" -0xff05: "%" -0xff06: "&" -0xff07: "'" -0xff08: "(" -0xff09: ")" -0xff0a: "*" -0xff0b: "+" -0xff0c: "," -0xff0d: "-" -0xff0e: "." -0xff0f: "/" -0xff10: "0" -0xff11: "1" -0xff12: "2" -0xff13: "3" -0xff14: "4" -0xff15: "5" -0xff16: "6" -0xff17: "7" -0xff18: "8" -0xff19: "9" -0xff1a: ":" -0xff1b: ";" -0xff1c: "<" -0xff1d: "=" -0xff1e: ">" -0xff1f: "?" -0xff20: "@" -0xff21: "A" -0xff22: "B" -0xff23: "C" -0xff24: "D" -0xff25: "E" -0xff26: "F" -0xff27: "G" -0xff28: "H" -0xff29: "I" -0xff2a: "J" -0xff2b: "K" -0xff2c: "L" -0xff2d: "M" -0xff2e: "N" -0xff2f: "O" -0xff30: "P" -0xff31: "Q" -0xff32: "R" -0xff33: "S" -0xff34: "T" -0xff35: "U" -0xff36: "V" -0xff37: "W" -0xff38: "X" -0xff39: "Y" -0xff3a: "Z" -0xff3b: "[" -0xff3c: "\\" -0xff3d: "]" -0xff3e: "^" -0xff3f: "_" -0xff40: "`" -0xff41: "a" -0xff42: "b" -0xff43: "c" -0xff44: "d" -0xff45: "e" -0xff46: "f" -0xff47: "g" -0xff48: "h" -0xff49: "i" -0xff4a: "j" -0xff4b: "k" -0xff4c: "l" -0xff4d: "m" -0xff4e: "n" -0xff4f: "o" -0xff50: "p" -0xff51: "q" -0xff52: "r" -0xff53: "s" -0xff54: "t" -0xff55: "u" -0xff56: "v" -0xff57: "w" -0xff58: "x" -0xff59: "y" -0xff5a: "z" -0xff5b: "{" -0xff5c: "|" -0xff5d: "}" -0xff5e: "~" -0xff5f: "[?]" -0xff60: "[?]" -0xff61: "." -0xff62: "[" -0xff63: "]" -0xff64: "," -0xff65: "*" -0xff66: "wo" -0xff67: "a" -0xff68: "i" -0xff69: "u" -0xff6a: "e" -0xff6b: "o" -0xff6c: "ya" -0xff6d: "yu" -0xff6e: "yo" -0xff6f: "tu" -0xff70: "+" -0xff71: "a" -0xff72: "i" -0xff73: "u" -0xff74: "e" -0xff75: "o" -0xff76: "ka" -0xff77: "ki" -0xff78: "ku" -0xff79: "ke" -0xff7a: "ko" -0xff7b: "sa" -0xff7c: "si" -0xff7d: "su" -0xff7e: "se" -0xff7f: "so" -0xff80: "ta" -0xff81: "ti" -0xff82: "tu" -0xff83: "te" -0xff84: "to" -0xff85: "na" -0xff86: "ni" -0xff87: "nu" -0xff88: "ne" -0xff89: "no" -0xff8a: "ha" -0xff8b: "hi" -0xff8c: "hu" -0xff8d: "he" -0xff8e: "ho" -0xff8f: "ma" -0xff90: "mi" -0xff91: "mu" -0xff92: "me" -0xff93: "mo" -0xff94: "ya" -0xff95: "yu" -0xff96: "yo" -0xff97: "ra" -0xff98: "ri" -0xff99: "ru" -0xff9a: "re" -0xff9b: "ro" -0xff9c: "wa" -0xff9d: "n" -0xff9e: ":" -0xff9f: ";" -0xffa0: "" -0xffa1: "g" -0xffa2: "gg" -0xffa3: "gs" -0xffa4: "n" -0xffa5: "nj" -0xffa6: "nh" -0xffa7: "d" -0xffa8: "dd" -0xffa9: "r" -0xffaa: "lg" -0xffab: "lm" -0xffac: "lb" -0xffad: "ls" -0xffae: "lt" -0xffaf: "lp" -0xffb0: "rh" -0xffb1: "m" -0xffb2: "b" -0xffb3: "bb" -0xffb4: "bs" -0xffb5: "s" -0xffb6: "ss" -0xffb7: "" -0xffb8: "j" -0xffb9: "jj" -0xffba: "c" -0xffbb: "k" -0xffbc: "t" -0xffbd: "p" -0xffbe: "h" -0xffbf: "[?]" -0xffc0: "[?]" -0xffc1: "[?]" -0xffc2: "a" -0xffc3: "ae" -0xffc4: "ya" -0xffc5: "yae" -0xffc6: "eo" -0xffc7: "e" -0xffc8: "[?]" -0xffc9: "[?]" -0xffca: "yeo" -0xffcb: "ye" -0xffcc: "o" -0xffcd: "wa" -0xffce: "wae" -0xffcf: "oe" -0xffd0: "[?]" -0xffd1: "[?]" -0xffd2: "yo" -0xffd3: "u" -0xffd4: "weo" -0xffd5: "we" -0xffd6: "wi" -0xffd7: "yu" -0xffd8: "[?]" -0xffd9: "[?]" -0xffda: "eu" -0xffdb: "yi" -0xffdc: "i" -0xffdd: "[?]" -0xffde: "[?]" -0xffdf: "[?]" -0xffe0: "/C" -0xffe1: "PS" -0xffe2: "!" -0xffe3: "-" -0xffe4: "|" -0xffe5: "Y=" -0xffe6: "W=" -0xffe7: "[?]" -0xffe8: "|" -0xffe9: "-" -0xffea: "|" -0xffeb: "-" -0xffec: "|" -0xffed: "#" -0xffee: "O" -0xffef: "[?]" -0xfff0: "[?]" -0xfff1: "[?]" -0xfff2: "[?]" -0xfff3: "[?]" -0xfff4: "[?]" -0xfff5: "[?]" -0xfff6: "[?]" -0xfff7: "[?]" -0xfff8: "[?]" -0xfff9: "{" -0xfffa: "|" -0xfffb: "}" -0xfffc: "" -0xfffd: "" -0xfffe: "" -0xffff: "" diff --git a/vendor/github.com/gosimple/unidecode/unidecode.go b/vendor/github.com/gosimple/unidecode/unidecode.go deleted file mode 100644 index bc5f8a10..00000000 --- a/vendor/github.com/gosimple/unidecode/unidecode.go +++ /dev/null @@ -1,58 +0,0 @@ -// Package unidecode implements a unicode transliterator -// which replaces non-ASCII characters with their ASCII -// approximations. -package unidecode - -//go:generate go run make_table.go - -import ( - "sync" - "unicode" -) - -const pooledCapacity = 64 - -var ( - slicePool sync.Pool - decodingOnce sync.Once -) - -// Unidecode implements a unicode transliterator, which -// replaces non-ASCII characters with their ASCII -// counterparts. -// Given an unicode encoded string, returns -// another string with non-ASCII characters replaced -// with their closest ASCII counterparts. -// e.g. Unicode("áéíóú") => "aeiou" -func Unidecode(s string) string { - decodingOnce.Do(decodeTransliterations) - l := len(s) - var r []rune - if l > pooledCapacity { - r = make([]rune, 0, len(s)) - } else { - if x := slicePool.Get(); x != nil { - r = x.([]rune)[:0] - } else { - r = make([]rune, 0, pooledCapacity) - } - } - for _, c := range s { - if c <= unicode.MaxASCII { - r = append(r, c) - continue - } - if c > unicode.MaxRune || c >= transCount { - /* Ignore reserved chars */ - continue - } - if d := transliterations[c]; d != nil { - r = append(r, d...) - } - } - res := string(r) - if l <= pooledCapacity { - slicePool.Put(r) - } - return res -} diff --git a/vendor/github.com/inconshreveable/go-update/LICENSE b/vendor/github.com/inconshreveable/go-update/LICENSE deleted file mode 100644 index 418a5d1e..00000000 --- a/vendor/github.com/inconshreveable/go-update/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Alan Shreve - -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/github.com/inconshreveable/go-update/README.md b/vendor/github.com/inconshreveable/go-update/README.md deleted file mode 100644 index 438ffd43..00000000 --- a/vendor/github.com/inconshreveable/go-update/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# go-update: Build self-updating Go programs [![godoc reference](https://godoc.org/github.com/inconshreveable/go-update?status.png)](https://godoc.org/github.com/inconshreveable/go-update) - -Package update provides functionality to implement secure, self-updating Go programs (or other single-file targets) -A program can update itself by replacing its executable file with a new version. - -It provides the flexibility to implement different updating user experiences -like auto-updating, or manual user-initiated updates. It also boasts -advanced features like binary patching and code signing verification. - -Example of updating from a URL: - -```go -import ( - "fmt" - "net/http" - - "github.com/inconshreveable/go-update" -) - -func doUpdate(url string) error { - resp, err := http.Get(url) - if err != nil { - return err - } - defer resp.Body.Close() - err := update.Apply(resp.Body, update.Options{}) - if err != nil { - // error handling - } - return err -} -``` - -## Features - -- Cross platform support (Windows too!) -- Binary patch application -- Checksum verification -- Code signing verification -- Support for updating arbitrary files - -## [equinox.io](https://equinox.io) -[equinox.io](https://equinox.io) is a complete ready-to-go updating solution built on top of go-update that provides: - -- Hosted updates -- Update channels (stable, beta, nightly, ...) -- Dynamically computed binary diffs -- Automatic key generation and code -- Release tooling with proper code signing -- Update/download metrics - -## API Compatibility Promises -The master branch of `go-update` is *not* guaranteed to have a stable API over time. For any production application, you should vendor -your dependency on `go-update` with a tool like git submodules, [gb](http://getgb.io/) or [govendor](https://github.com/kardianos/govendor). - -The `go-update` package makes the following promises about API compatibility: -1. A list of all API-breaking changes will be documented in this README. -1. `go-update` will strive for as few API-breaking changes as possible. - -## API Breaking Changes -- **Sept 3, 2015**: The `Options` struct passed to `Apply` was changed to be passed by value instead of passed by pointer. Old API at `28de026`. -- **Aug 9, 2015**: 2.0 API. Old API at `221d034` or `gopkg.in/inconshreveable/go-update.v0`. - -## License -Apache diff --git a/vendor/github.com/inconshreveable/go-update/apply.go b/vendor/github.com/inconshreveable/go-update/apply.go deleted file mode 100644 index b26dae1c..00000000 --- a/vendor/github.com/inconshreveable/go-update/apply.go +++ /dev/null @@ -1,322 +0,0 @@ -package update - -import ( - "bytes" - "crypto" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - - "github.com/inconshreveable/go-update/internal/osext" -) - -var ( - openFile = os.OpenFile -) - -// Apply performs an update of the current executable (or opts.TargetFile, if set) with the contents of the given io.Reader. -// -// Apply performs the following actions to ensure a safe cross-platform update: -// -// 1. If configured, applies the contents of the update io.Reader as a binary patch. -// -// 2. If configured, computes the checksum of the new executable and verifies it matches. -// -// 3. If configured, verifies the signature with a public key. -// -// 4. Creates a new file, /path/to/.target.new with the TargetMode with the contents of the updated file -// -// 5. Renames /path/to/target to /path/to/.target.old -// -// 6. Renames /path/to/.target.new to /path/to/target -// -// 7. If the final rename is successful, deletes /path/to/.target.old, returns no error. On Windows, -// the removal of /path/to/target.old always fails, so instead Apply hides the old file instead. -// -// 8. If the final rename fails, attempts to roll back by renaming /path/to/.target.old -// back to /path/to/target. -// -// If the roll back operation fails, the file system is left in an inconsistent state (betweet steps 5 and 6) where -// there is no new executable file and the old executable file could not be be moved to its original location. In this -// case you should notify the user of the bad news and ask them to recover manually. Applications can determine whether -// the rollback failed by calling RollbackError, see the documentation on that function for additional detail. -func Apply(update io.Reader, opts Options) error { - // validate - verify := false - switch { - case opts.Signature != nil && opts.PublicKey != nil: - // okay - verify = true - case opts.Signature != nil: - return errors.New("no public key to verify signature with") - case opts.PublicKey != nil: - return errors.New("No signature to verify with") - } - - // set defaults - if opts.Hash == 0 { - opts.Hash = crypto.SHA256 - } - if opts.Verifier == nil { - opts.Verifier = NewECDSAVerifier() - } - if opts.TargetMode == 0 { - opts.TargetMode = 0755 - } - - // get target path - var err error - opts.TargetPath, err = opts.getPath() - if err != nil { - return err - } - - var newBytes []byte - if opts.Patcher != nil { - if newBytes, err = opts.applyPatch(update); err != nil { - return err - } - } else { - // no patch to apply, go on through - if newBytes, err = ioutil.ReadAll(update); err != nil { - return err - } - } - - // verify checksum if requested - if opts.Checksum != nil { - if err = opts.verifyChecksum(newBytes); err != nil { - return err - } - } - - if verify { - if err = opts.verifySignature(newBytes); err != nil { - return err - } - } - - // get the directory the executable exists in - updateDir := filepath.Dir(opts.TargetPath) - filename := filepath.Base(opts.TargetPath) - - // Copy the contents of newbinary to a new executable file - newPath := filepath.Join(updateDir, fmt.Sprintf(".%s.new", filename)) - fp, err := openFile(newPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, opts.TargetMode) - if err != nil { - return err - } - defer fp.Close() - - _, err = io.Copy(fp, bytes.NewReader(newBytes)) - if err != nil { - return err - } - - // if we don't call fp.Close(), windows won't let us move the new executable - // because the file will still be "in use" - fp.Close() - - // this is where we'll move the executable to so that we can swap in the updated replacement - oldPath := opts.OldSavePath - removeOld := opts.OldSavePath == "" - if removeOld { - oldPath = filepath.Join(updateDir, fmt.Sprintf(".%s.old", filename)) - } - - // delete any existing old exec file - this is necessary on Windows for two reasons: - // 1. after a successful update, Windows can't remove the .old file because the process is still running - // 2. windows rename operations fail if the destination file already exists - _ = os.Remove(oldPath) - - // move the existing executable to a new file in the same directory - err = os.Rename(opts.TargetPath, oldPath) - if err != nil { - return err - } - - // move the new exectuable in to become the new program - err = os.Rename(newPath, opts.TargetPath) - - if err != nil { - // move unsuccessful - // - // The filesystem is now in a bad state. We have successfully - // moved the existing binary to a new location, but we couldn't move the new - // binary to take its place. That means there is no file where the current executable binary - // used to be! - // Try to rollback by restoring the old binary to its original path. - rerr := os.Rename(oldPath, opts.TargetPath) - if rerr != nil { - return &rollbackErr{err, rerr} - } - - return err - } - - // move successful, remove the old binary if needed - if removeOld { - errRemove := os.Remove(oldPath) - - // windows has trouble with removing old binaries, so hide it instead - if errRemove != nil { - _ = hideFile(oldPath) - } - } - - return nil -} - -// RollbackError takes an error value returned by Apply and returns the error, if any, -// that occurred when attempting to roll back from a failed update. Applications should -// always call this function on any non-nil errors returned by Apply. -// -// If no rollback was needed or if the rollback was successful, RollbackError returns nil, -// otherwise it returns the error encountered when trying to roll back. -func RollbackError(err error) error { - if err == nil { - return nil - } - if rerr, ok := err.(*rollbackErr); ok { - return rerr.rollbackErr - } - return nil -} - -type rollbackErr struct { - error // original error - rollbackErr error // error encountered while rolling back -} - -type Options struct { - // TargetPath defines the path to the file to update. - // The emptry string means 'the executable file of the running program'. - TargetPath string - - // Create TargetPath replacement with this file mode. If zero, defaults to 0755. - TargetMode os.FileMode - - // Checksum of the new binary to verify against. If nil, no checksum or signature verification is done. - Checksum []byte - - // Public key to use for signature verification. If nil, no signature verification is done. - PublicKey crypto.PublicKey - - // Signature to verify the updated file. If nil, no signature verification is done. - Signature []byte - - // Pluggable signature verification algorithm. If nil, ECDSA is used. - Verifier Verifier - - // Use this hash function to generate the checksum. If not set, SHA256 is used. - Hash crypto.Hash - - // If nil, treat the update as a complete replacement for the contents of the file at TargetPath. - // If non-nil, treat the update contents as a patch and use this object to apply the patch. - Patcher Patcher - - // Store the old executable file at this path after a successful update. - // The empty string means the old executable file will be removed after the update. - OldSavePath string -} - -// CheckPermissions determines whether the process has the correct permissions to -// perform the requested update. If the update can proceed, it returns nil, otherwise -// it returns the error that would occur if an update were attempted. -func (o *Options) CheckPermissions() error { - // get the directory the file exists in - path, err := o.getPath() - if err != nil { - return err - } - - fileDir := filepath.Dir(path) - fileName := filepath.Base(path) - - // attempt to open a file in the file's directory - newPath := filepath.Join(fileDir, fmt.Sprintf(".%s.new", fileName)) - fp, err := openFile(newPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, o.TargetMode) - if err != nil { - return err - } - fp.Close() - - _ = os.Remove(newPath) - return nil -} - -// SetPublicKeyPEM is a convenience method to set the PublicKey property -// used for checking a completed update's signature by parsing a -// Public Key formatted as PEM data. -func (o *Options) SetPublicKeyPEM(pembytes []byte) error { - block, _ := pem.Decode(pembytes) - if block == nil { - return errors.New("couldn't parse PEM data") - } - - pub, err := x509.ParsePKIXPublicKey(block.Bytes) - if err != nil { - return err - } - o.PublicKey = pub - return nil -} - -func (o *Options) getPath() (string, error) { - if o.TargetPath == "" { - return osext.Executable() - } else { - return o.TargetPath, nil - } -} - -func (o *Options) applyPatch(patch io.Reader) ([]byte, error) { - // open the file to patch - old, err := os.Open(o.TargetPath) - if err != nil { - return nil, err - } - defer old.Close() - - // apply the patch - var applied bytes.Buffer - if err = o.Patcher.Patch(old, &applied, patch); err != nil { - return nil, err - } - - return applied.Bytes(), nil -} - -func (o *Options) verifyChecksum(updated []byte) error { - checksum, err := checksumFor(o.Hash, updated) - if err != nil { - return err - } - - if !bytes.Equal(o.Checksum, checksum) { - return fmt.Errorf("Updated file has wrong checksum. Expected: %x, got: %x", o.Checksum, checksum) - } - return nil -} - -func (o *Options) verifySignature(updated []byte) error { - checksum, err := checksumFor(o.Hash, updated) - if err != nil { - return err - } - return o.Verifier.VerifySignature(checksum, o.Signature, o.Hash, o.PublicKey) -} - -func checksumFor(h crypto.Hash, payload []byte) ([]byte, error) { - if !h.Available() { - return nil, errors.New("requested hash function not available") - } - hash := h.New() - hash.Write(payload) // guaranteed not to error - return hash.Sum([]byte{}), nil -} diff --git a/vendor/github.com/inconshreveable/go-update/doc.go b/vendor/github.com/inconshreveable/go-update/doc.go deleted file mode 100644 index 468411f9..00000000 --- a/vendor/github.com/inconshreveable/go-update/doc.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Package update provides functionality to implement secure, self-updating Go programs (or other single-file targets). - -For complete updating solutions please see Equinox (https://equinox.io) and go-tuf (https://github.com/flynn/go-tuf). - -Basic Example - -This example shows how to update a program remotely from a URL. - - import ( - "fmt" - "net/http" - - "github.com/inconshreveable/go-update" - ) - - func doUpdate(url string) error { - // request the new file - resp, err := http.Get(url) - if err != nil { - return err - } - defer resp.Body.Close() - err := update.Apply(resp.Body, update.Options{}) - if err != nil { - if rerr := update.RollbackError(err); rerr != nil { - fmt.Println("Failed to rollback from bad update: %v", rerr) - } - } - return err - } - - -Binary Patching - -Go binaries can often be large. It can be advantageous to only ship a binary patch to a client -instead of the complete program text of a new version. - -This example shows how to update a program with a bsdiff binary patch. Other patch formats -may be applied by implementing the Patcher interface. - - import ( - "encoding/hex" - "io" - - "github.com/inconshreveable/go-update" - ) - - func updateWithPatch(patch io.Reader) error { - err := update.Apply(patch, update.Options{ - Patcher: update.NewBSDiffPatcher() - }) - if err != nil { - // error handling - } - return err - } - -Checksum Verification - -Updating executable code on a computer can be a dangerous operation unless you -take the appropriate steps to guarantee the authenticity of the new code. While -checksum verification is important, it should always be combined with signature -verification (next section) to guarantee that the code came from a trusted party. - -go-update validates SHA256 checksums by default, but this is pluggable via the Hash -property on the Options struct. - -This example shows how to guarantee that the newly-updated binary is verified to -have an appropriate checksum (that was otherwise retrived via a secure channel) -specified as a hex string. - - import ( - "crypto" - _ "crypto/sha256" - "encoding/hex" - "io" - - "github.com/inconshreveable/go-update" - ) - - func updateWithChecksum(binary io.Reader, hexChecksum string) error { - checksum, err := hex.DecodeString(hexChecksum) - if err != nil { - return err - } - err = update.Apply(binary, update.Options{ - Hash: crypto.SHA256, // this is the default, you don't need to specify it - Checksum: checksum, - }) - if err != nil { - // error handling - } - return err - } - -Cryptographic Signature Verification - -Cryptographic verification of new code from an update is an extremely important way to guarantee the -security and integrity of your updates. - -Verification is performed by validating the signature of a hash of the new file. This -means nothing changes if you apply your update with a patch. - -This example shows how to add signature verification to your updates. To make all of this work -an application distributor must first create a public/private key pair and embed the public key -into their application. When they issue a new release, the issuer must sign the new executable file -with the private key and distribute the signature along with the update. - - import ( - "crypto" - _ "crypto/sha256" - "encoding/hex" - "io" - - "github.com/inconshreveable/go-update" - ) - - var publicKey = []byte(` - -----BEGIN PUBLIC KEY----- - MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEtrVmBxQvheRArXjg2vG1xIprWGuCyESx - MMY8pjmjepSy2kuz+nl9aFLqmr+rDNdYvEBqQaZrYMc6k29gjvoQnQ== - -----END PUBLIC KEY----- - `) - - func verifiedUpdate(binary io.Reader, hexChecksum, hexSignature string) { - checksum, err := hex.DecodeString(hexChecksum) - if err != nil { - return err - } - signature, err := hex.DecodeString(hexSignature) - if err != nil { - return err - } - opts := update.Options{ - Checksum: checksum, - Signature: signature, - Hash: crypto.SHA256, // this is the default, you don't need to specify it - Verifier: update.NewECDSAVerifier(), // this is the default, you don't need to specify it - } - err = opts.SetPublicKeyPEM(publicKey) - if err != nil { - return err - } - err = update.Apply(binary, opts) - if err != nil { - // error handling - } - return err - } - - -Building Single-File Go Binaries - -In order to update a Go application with go-update, you must distributed it as a single executable. -This is often easy, but some applications require static assets (like HTML and CSS asset files or TLS certificates). -In order to update applications like these, you'll want to make sure to embed those asset files into -the distributed binary with a tool like go-bindata (my favorite): https://github.com/jteeuwen/go-bindata - -Non-Goals - -Mechanisms and protocols for determining whether an update should be applied and, if so, which one are -out of scope for this package. Please consult go-tuf (https://github.com/flynn/go-tuf) or Equinox (https://equinox.io) -for more complete solutions. - -go-update only works for self-updating applications that are distributed as a single binary, i.e. -applications that do not have additional assets or dependency files. -Updating application that are distributed as mutliple on-disk files is out of scope, although this -may change in future versions of this library. - -*/ -package update diff --git a/vendor/github.com/inconshreveable/go-update/hide_noop.go b/vendor/github.com/inconshreveable/go-update/hide_noop.go deleted file mode 100644 index 37077560..00000000 --- a/vendor/github.com/inconshreveable/go-update/hide_noop.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !windows - -package update - -func hideFile(path string) error { - return nil -} diff --git a/vendor/github.com/inconshreveable/go-update/hide_windows.go b/vendor/github.com/inconshreveable/go-update/hide_windows.go deleted file mode 100644 index c368b9cc..00000000 --- a/vendor/github.com/inconshreveable/go-update/hide_windows.go +++ /dev/null @@ -1,19 +0,0 @@ -package update - -import ( - "syscall" - "unsafe" -) - -func hideFile(path string) error { - kernel32 := syscall.NewLazyDLL("kernel32.dll") - setFileAttributes := kernel32.NewProc("SetFileAttributesW") - - r1, _, err := setFileAttributes.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))), 2) - - if r1 == 0 { - return err - } else { - return nil - } -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/License b/vendor/github.com/inconshreveable/go-update/internal/binarydist/License deleted file mode 100644 index 183c3898..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/License +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012 Keith Rarick - -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/inconshreveable/go-update/internal/binarydist/Readme.md b/vendor/github.com/inconshreveable/go-update/internal/binarydist/Readme.md deleted file mode 100644 index dadc3683..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/Readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# binarydist - -Package binarydist implements binary diff and patch as described on -. It reads and writes files -compatible with the tools there. - -Documentation at . diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/bzip2.go b/vendor/github.com/inconshreveable/go-update/internal/binarydist/bzip2.go deleted file mode 100644 index a2516b81..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/bzip2.go +++ /dev/null @@ -1,40 +0,0 @@ -package binarydist - -import ( - "io" - "os/exec" -) - -type bzip2Writer struct { - c *exec.Cmd - w io.WriteCloser -} - -func (w bzip2Writer) Write(b []byte) (int, error) { - return w.w.Write(b) -} - -func (w bzip2Writer) Close() error { - if err := w.w.Close(); err != nil { - return err - } - return w.c.Wait() -} - -// Package compress/bzip2 implements only decompression, -// so we'll fake it by running bzip2 in another process. -func newBzip2Writer(w io.Writer) (wc io.WriteCloser, err error) { - var bw bzip2Writer - bw.c = exec.Command("bzip2", "-c") - bw.c.Stdout = w - - if bw.w, err = bw.c.StdinPipe(); err != nil { - return nil, err - } - - if err = bw.c.Start(); err != nil { - return nil, err - } - - return bw, nil -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/diff.go b/vendor/github.com/inconshreveable/go-update/internal/binarydist/diff.go deleted file mode 100644 index 1d2d951b..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/diff.go +++ /dev/null @@ -1,408 +0,0 @@ -package binarydist - -import ( - "bytes" - "encoding/binary" - "io" - "io/ioutil" -) - -func swap(a []int, i, j int) { a[i], a[j] = a[j], a[i] } - -func split(I, V []int, start, length, h int) { - var i, j, k, x, jj, kk int - - if length < 16 { - for k = start; k < start+length; k += j { - j = 1 - x = V[I[k]+h] - for i = 1; k+i < start+length; i++ { - if V[I[k+i]+h] < x { - x = V[I[k+i]+h] - j = 0 - } - if V[I[k+i]+h] == x { - swap(I, k+i, k+j) - j++ - } - } - for i = 0; i < j; i++ { - V[I[k+i]] = k + j - 1 - } - if j == 1 { - I[k] = -1 - } - } - return - } - - x = V[I[start+length/2]+h] - jj = 0 - kk = 0 - for i = start; i < start+length; i++ { - if V[I[i]+h] < x { - jj++ - } - if V[I[i]+h] == x { - kk++ - } - } - jj += start - kk += jj - - i = start - j = 0 - k = 0 - for i < jj { - if V[I[i]+h] < x { - i++ - } else if V[I[i]+h] == x { - swap(I, i, jj+j) - j++ - } else { - swap(I, i, kk+k) - k++ - } - } - - for jj+j < kk { - if V[I[jj+j]+h] == x { - j++ - } else { - swap(I, jj+j, kk+k) - k++ - } - } - - if jj > start { - split(I, V, start, jj-start, h) - } - - for i = 0; i < kk-jj; i++ { - V[I[jj+i]] = kk - 1 - } - if jj == kk-1 { - I[jj] = -1 - } - - if start+length > kk { - split(I, V, kk, start+length-kk, h) - } -} - -func qsufsort(obuf []byte) []int { - var buckets [256]int - var i, h int - I := make([]int, len(obuf)+1) - V := make([]int, len(obuf)+1) - - for _, c := range obuf { - buckets[c]++ - } - for i = 1; i < 256; i++ { - buckets[i] += buckets[i-1] - } - copy(buckets[1:], buckets[:]) - buckets[0] = 0 - - for i, c := range obuf { - buckets[c]++ - I[buckets[c]] = i - } - - I[0] = len(obuf) - for i, c := range obuf { - V[i] = buckets[c] - } - - V[len(obuf)] = 0 - for i = 1; i < 256; i++ { - if buckets[i] == buckets[i-1]+1 { - I[buckets[i]] = -1 - } - } - I[0] = -1 - - for h = 1; I[0] != -(len(obuf) + 1); h += h { - var n int - for i = 0; i < len(obuf)+1; { - if I[i] < 0 { - n -= I[i] - i -= I[i] - } else { - if n != 0 { - I[i-n] = -n - } - n = V[I[i]] + 1 - i - split(I, V, i, n, h) - i += n - n = 0 - } - } - if n != 0 { - I[i-n] = -n - } - } - - for i = 0; i < len(obuf)+1; i++ { - I[V[i]] = i - } - return I -} - -func matchlen(a, b []byte) (i int) { - for i < len(a) && i < len(b) && a[i] == b[i] { - i++ - } - return i -} - -func search(I []int, obuf, nbuf []byte, st, en int) (pos, n int) { - if en-st < 2 { - x := matchlen(obuf[I[st]:], nbuf) - y := matchlen(obuf[I[en]:], nbuf) - - if x > y { - return I[st], x - } else { - return I[en], y - } - } - - x := st + (en-st)/2 - if bytes.Compare(obuf[I[x]:], nbuf) < 0 { - return search(I, obuf, nbuf, x, en) - } else { - return search(I, obuf, nbuf, st, x) - } - panic("unreached") -} - -// Diff computes the difference between old and new, according to the bsdiff -// algorithm, and writes the result to patch. -func Diff(old, new io.Reader, patch io.Writer) error { - obuf, err := ioutil.ReadAll(old) - if err != nil { - return err - } - - nbuf, err := ioutil.ReadAll(new) - if err != nil { - return err - } - - pbuf, err := diffBytes(obuf, nbuf) - if err != nil { - return err - } - - _, err = patch.Write(pbuf) - return err -} - -func diffBytes(obuf, nbuf []byte) ([]byte, error) { - var patch seekBuffer - err := diff(obuf, nbuf, &patch) - if err != nil { - return nil, err - } - return patch.buf, nil -} - -func diff(obuf, nbuf []byte, patch io.WriteSeeker) error { - var lenf int - I := qsufsort(obuf) - db := make([]byte, len(nbuf)) - eb := make([]byte, len(nbuf)) - var dblen, eblen int - - var hdr header - hdr.Magic = magic - hdr.NewSize = int64(len(nbuf)) - err := binary.Write(patch, signMagLittleEndian{}, &hdr) - if err != nil { - return err - } - - // Compute the differences, writing ctrl as we go - pfbz2, err := newBzip2Writer(patch) - if err != nil { - return err - } - var scan, pos, length int - var lastscan, lastpos, lastoffset int - for scan < len(nbuf) { - var oldscore int - scan += length - for scsc := scan; scan < len(nbuf); scan++ { - pos, length = search(I, obuf, nbuf[scan:], 0, len(obuf)) - - for ; scsc < scan+length; scsc++ { - if scsc+lastoffset < len(obuf) && - obuf[scsc+lastoffset] == nbuf[scsc] { - oldscore++ - } - } - - if (length == oldscore && length != 0) || length > oldscore+8 { - break - } - - if scan+lastoffset < len(obuf) && obuf[scan+lastoffset] == nbuf[scan] { - oldscore-- - } - } - - if length != oldscore || scan == len(nbuf) { - var s, Sf int - lenf = 0 - for i := 0; lastscan+i < scan && lastpos+i < len(obuf); { - if obuf[lastpos+i] == nbuf[lastscan+i] { - s++ - } - i++ - if s*2-i > Sf*2-lenf { - Sf = s - lenf = i - } - } - - lenb := 0 - if scan < len(nbuf) { - var s, Sb int - for i := 1; (scan >= lastscan+i) && (pos >= i); i++ { - if obuf[pos-i] == nbuf[scan-i] { - s++ - } - if s*2-i > Sb*2-lenb { - Sb = s - lenb = i - } - } - } - - if lastscan+lenf > scan-lenb { - overlap := (lastscan + lenf) - (scan - lenb) - s := 0 - Ss := 0 - lens := 0 - for i := 0; i < overlap; i++ { - if nbuf[lastscan+lenf-overlap+i] == obuf[lastpos+lenf-overlap+i] { - s++ - } - if nbuf[scan-lenb+i] == obuf[pos-lenb+i] { - s-- - } - if s > Ss { - Ss = s - lens = i + 1 - } - } - - lenf += lens - overlap - lenb -= lens - } - - for i := 0; i < lenf; i++ { - db[dblen+i] = nbuf[lastscan+i] - obuf[lastpos+i] - } - for i := 0; i < (scan-lenb)-(lastscan+lenf); i++ { - eb[eblen+i] = nbuf[lastscan+lenf+i] - } - - dblen += lenf - eblen += (scan - lenb) - (lastscan + lenf) - - err = binary.Write(pfbz2, signMagLittleEndian{}, int64(lenf)) - if err != nil { - pfbz2.Close() - return err - } - - val := (scan - lenb) - (lastscan + lenf) - err = binary.Write(pfbz2, signMagLittleEndian{}, int64(val)) - if err != nil { - pfbz2.Close() - return err - } - - val = (pos - lenb) - (lastpos + lenf) - err = binary.Write(pfbz2, signMagLittleEndian{}, int64(val)) - if err != nil { - pfbz2.Close() - return err - } - - lastscan = scan - lenb - lastpos = pos - lenb - lastoffset = pos - scan - } - } - err = pfbz2.Close() - if err != nil { - return err - } - - // Compute size of compressed ctrl data - l64, err := patch.Seek(0, 1) - if err != nil { - return err - } - hdr.CtrlLen = int64(l64 - 32) - - // Write compressed diff data - pfbz2, err = newBzip2Writer(patch) - if err != nil { - return err - } - n, err := pfbz2.Write(db[:dblen]) - if err != nil { - pfbz2.Close() - return err - } - if n != dblen { - pfbz2.Close() - return io.ErrShortWrite - } - err = pfbz2.Close() - if err != nil { - return err - } - - // Compute size of compressed diff data - n64, err := patch.Seek(0, 1) - if err != nil { - return err - } - hdr.DiffLen = n64 - l64 - - // Write compressed extra data - pfbz2, err = newBzip2Writer(patch) - if err != nil { - return err - } - n, err = pfbz2.Write(eb[:eblen]) - if err != nil { - pfbz2.Close() - return err - } - if n != eblen { - pfbz2.Close() - return io.ErrShortWrite - } - err = pfbz2.Close() - if err != nil { - return err - } - - // Seek to the beginning, write the header, and close the file - _, err = patch.Seek(0, 0) - if err != nil { - return err - } - err = binary.Write(patch, signMagLittleEndian{}, &hdr) - if err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/doc.go b/vendor/github.com/inconshreveable/go-update/internal/binarydist/doc.go deleted file mode 100644 index 3c92d875..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -// Package binarydist implements binary diff and patch as described on -// http://www.daemonology.net/bsdiff/. It reads and writes files -// compatible with the tools there. -package binarydist - -var magic = [8]byte{'B', 'S', 'D', 'I', 'F', 'F', '4', '0'} - -// File format: -// 0 8 "BSDIFF40" -// 8 8 X -// 16 8 Y -// 24 8 sizeof(newfile) -// 32 X bzip2(control block) -// 32+X Y bzip2(diff block) -// 32+X+Y ??? bzip2(extra block) -// with control block a set of triples (x,y,z) meaning "add x bytes -// from oldfile to x bytes from the diff block; copy y bytes from the -// extra block; seek forwards in oldfile by z bytes". -type header struct { - Magic [8]byte - CtrlLen int64 - DiffLen int64 - NewSize int64 -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/encoding.go b/vendor/github.com/inconshreveable/go-update/internal/binarydist/encoding.go deleted file mode 100644 index 75ba5856..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/encoding.go +++ /dev/null @@ -1,53 +0,0 @@ -package binarydist - -// SignMagLittleEndian is the numeric encoding used by the bsdiff tools. -// It implements binary.ByteOrder using a sign-magnitude format -// and little-endian byte order. Only methods Uint64 and String -// have been written; the rest panic. -type signMagLittleEndian struct{} - -func (signMagLittleEndian) Uint16(b []byte) uint16 { panic("unimplemented") } - -func (signMagLittleEndian) PutUint16(b []byte, v uint16) { panic("unimplemented") } - -func (signMagLittleEndian) Uint32(b []byte) uint32 { panic("unimplemented") } - -func (signMagLittleEndian) PutUint32(b []byte, v uint32) { panic("unimplemented") } - -func (signMagLittleEndian) Uint64(b []byte) uint64 { - y := int64(b[0]) | - int64(b[1])<<8 | - int64(b[2])<<16 | - int64(b[3])<<24 | - int64(b[4])<<32 | - int64(b[5])<<40 | - int64(b[6])<<48 | - int64(b[7]&0x7f)<<56 - - if b[7]&0x80 != 0 { - y = -y - } - return uint64(y) -} - -func (signMagLittleEndian) PutUint64(b []byte, v uint64) { - x := int64(v) - neg := x < 0 - if neg { - x = -x - } - - b[0] = byte(x) - b[1] = byte(x >> 8) - b[2] = byte(x >> 16) - b[3] = byte(x >> 24) - b[4] = byte(x >> 32) - b[5] = byte(x >> 40) - b[6] = byte(x >> 48) - b[7] = byte(x >> 56) - if neg { - b[7] |= 0x80 - } -} - -func (signMagLittleEndian) String() string { return "signMagLittleEndian" } diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/patch.go b/vendor/github.com/inconshreveable/go-update/internal/binarydist/patch.go deleted file mode 100644 index eb032257..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/patch.go +++ /dev/null @@ -1,109 +0,0 @@ -package binarydist - -import ( - "bytes" - "compress/bzip2" - "encoding/binary" - "errors" - "io" - "io/ioutil" -) - -var ErrCorrupt = errors.New("corrupt patch") - -// Patch applies patch to old, according to the bspatch algorithm, -// and writes the result to new. -func Patch(old io.Reader, new io.Writer, patch io.Reader) error { - var hdr header - err := binary.Read(patch, signMagLittleEndian{}, &hdr) - if err != nil { - return err - } - if hdr.Magic != magic { - return ErrCorrupt - } - if hdr.CtrlLen < 0 || hdr.DiffLen < 0 || hdr.NewSize < 0 { - return ErrCorrupt - } - - ctrlbuf := make([]byte, hdr.CtrlLen) - _, err = io.ReadFull(patch, ctrlbuf) - if err != nil { - return err - } - cpfbz2 := bzip2.NewReader(bytes.NewReader(ctrlbuf)) - - diffbuf := make([]byte, hdr.DiffLen) - _, err = io.ReadFull(patch, diffbuf) - if err != nil { - return err - } - dpfbz2 := bzip2.NewReader(bytes.NewReader(diffbuf)) - - // The entire rest of the file is the extra block. - epfbz2 := bzip2.NewReader(patch) - - obuf, err := ioutil.ReadAll(old) - if err != nil { - return err - } - - nbuf := make([]byte, hdr.NewSize) - - var oldpos, newpos int64 - for newpos < hdr.NewSize { - var ctrl struct{ Add, Copy, Seek int64 } - err = binary.Read(cpfbz2, signMagLittleEndian{}, &ctrl) - if err != nil { - return err - } - - // Sanity-check - if newpos+ctrl.Add > hdr.NewSize { - return ErrCorrupt - } - - // Read diff string - _, err = io.ReadFull(dpfbz2, nbuf[newpos:newpos+ctrl.Add]) - if err != nil { - return ErrCorrupt - } - - // Add old data to diff string - for i := int64(0); i < ctrl.Add; i++ { - if oldpos+i >= 0 && oldpos+i < int64(len(obuf)) { - nbuf[newpos+i] += obuf[oldpos+i] - } - } - - // Adjust pointers - newpos += ctrl.Add - oldpos += ctrl.Add - - // Sanity-check - if newpos+ctrl.Copy > hdr.NewSize { - return ErrCorrupt - } - - // Read extra string - _, err = io.ReadFull(epfbz2, nbuf[newpos:newpos+ctrl.Copy]) - if err != nil { - return ErrCorrupt - } - - // Adjust pointers - newpos += ctrl.Copy - oldpos += ctrl.Seek - } - - // Write the new file - for len(nbuf) > 0 { - n, err := new.Write(nbuf) - if err != nil { - return err - } - nbuf = nbuf[n:] - } - - return nil -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/binarydist/seek.go b/vendor/github.com/inconshreveable/go-update/internal/binarydist/seek.go deleted file mode 100644 index 96c03461..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/binarydist/seek.go +++ /dev/null @@ -1,43 +0,0 @@ -package binarydist - -import ( - "errors" -) - -type seekBuffer struct { - buf []byte - pos int -} - -func (b *seekBuffer) Write(p []byte) (n int, err error) { - n = copy(b.buf[b.pos:], p) - if n == len(p) { - b.pos += n - return n, nil - } - b.buf = append(b.buf, p[n:]...) - b.pos += len(p) - return len(p), nil -} - -func (b *seekBuffer) Seek(offset int64, whence int) (ret int64, err error) { - var abs int64 - switch whence { - case 0: - abs = offset - case 1: - abs = int64(b.pos) + offset - case 2: - abs = int64(len(b.buf)) + offset - default: - return 0, errors.New("binarydist: invalid whence") - } - if abs < 0 { - return 0, errors.New("binarydist: negative position") - } - if abs >= 1<<31 { - return 0, errors.New("binarydist: position out of range") - } - b.pos = int(abs) - return abs, nil -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/LICENSE b/vendor/github.com/inconshreveable/go-update/internal/osext/LICENSE deleted file mode 100644 index 74487567..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/README.md b/vendor/github.com/inconshreveable/go-update/internal/osext/README.md deleted file mode 100644 index 61350bab..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/README.md +++ /dev/null @@ -1,16 +0,0 @@ -### Extensions to the "os" package. - -## Find the current Executable and ExecutableFolder. - -There is sometimes utility in finding the current executable file -that is running. This can be used for upgrading the current executable -or finding resources located relative to the executable file. Both -working directory and the os.Args[0] value are arbitrary and cannot -be relied on; os.Args[0] can be "faked". - -Multi-platform and supports: - * Linux - * OS X - * Windows - * Plan 9 - * BSDs. diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/osext.go b/vendor/github.com/inconshreveable/go-update/internal/osext/osext.go deleted file mode 100644 index 7bef46f0..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/osext.go +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// Extensions to the standard "os" package. -package osext - -import "path/filepath" - -// Executable returns an absolute path that can be used to -// re-invoke the current program. -// It may not be valid after the current program exits. -func Executable() (string, error) { - p, err := executable() - return filepath.Clean(p), err -} - -// Returns same path as Executable, returns just the folder -// path. Excludes the executable name and any trailing slash. -func ExecutableFolder() (string, error) { - p, err := Executable() - if err != nil { - return "", err - } - - return filepath.Dir(p), nil -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_plan9.go b/vendor/github.com/inconshreveable/go-update/internal/osext/osext_plan9.go deleted file mode 100644 index 655750c5..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_plan9.go +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -package osext - -import ( - "os" - "strconv" - "syscall" -) - -func executable() (string, error) { - f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") - if err != nil { - return "", err - } - defer f.Close() - return syscall.Fd2path(int(f.Fd())) -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_procfs.go b/vendor/github.com/inconshreveable/go-update/internal/osext/osext_procfs.go deleted file mode 100644 index b2598bc7..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_procfs.go +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -// +build linux netbsd openbsd solaris dragonfly - -package osext - -import ( - "errors" - "fmt" - "os" - "runtime" - "strings" -) - -func executable() (string, error) { - switch runtime.GOOS { - case "linux": - const deletedTag = " (deleted)" - execpath, err := os.Readlink("/proc/self/exe") - if err != nil { - return execpath, err - } - execpath = strings.TrimSuffix(execpath, deletedTag) - execpath = strings.TrimPrefix(execpath, deletedTag) - return execpath, nil - case "netbsd": - return os.Readlink("/proc/curproc/exe") - case "openbsd", "dragonfly": - return os.Readlink("/proc/curproc/file") - case "solaris": - return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid())) - } - return "", errors.New("ExecPath not implemented for " + runtime.GOOS) -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_sysctl.go b/vendor/github.com/inconshreveable/go-update/internal/osext/osext_sysctl.go deleted file mode 100644 index b66cac87..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_sysctl.go +++ /dev/null @@ -1,79 +0,0 @@ -// 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. - -// +build darwin freebsd - -package osext - -import ( - "os" - "path/filepath" - "runtime" - "syscall" - "unsafe" -) - -var initCwd, initCwdErr = os.Getwd() - -func executable() (string, error) { - var mib [4]int32 - switch runtime.GOOS { - case "freebsd": - mib = [4]int32{1 /* CTL_KERN */, 14 /* KERN_PROC */, 12 /* KERN_PROC_PATHNAME */, -1} - case "darwin": - mib = [4]int32{1 /* CTL_KERN */, 38 /* KERN_PROCARGS */, int32(os.Getpid()), -1} - } - - n := uintptr(0) - // Get length. - _, _, errNum := syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib[0])), 4, 0, uintptr(unsafe.Pointer(&n)), 0, 0) - if errNum != 0 { - return "", errNum - } - if n == 0 { // This shouldn't happen. - return "", nil - } - buf := make([]byte, n) - _, _, errNum = syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib[0])), 4, uintptr(unsafe.Pointer(&buf[0])), uintptr(unsafe.Pointer(&n)), 0, 0) - if errNum != 0 { - return "", errNum - } - if n == 0 { // This shouldn't happen. - return "", nil - } - for i, v := range buf { - if v == 0 { - buf = buf[:i] - break - } - } - var err error - execPath := string(buf) - // execPath will not be empty due to above checks. - // Try to get the absolute path if the execPath is not rooted. - if execPath[0] != '/' { - execPath, err = getAbs(execPath) - if err != nil { - return execPath, err - } - } - // For darwin KERN_PROCARGS may return the path to a symlink rather than the - // actual executable. - if runtime.GOOS == "darwin" { - if execPath, err = filepath.EvalSymlinks(execPath); err != nil { - return execPath, err - } - } - return execPath, nil -} - -func getAbs(execPath string) (string, error) { - if initCwdErr != nil { - return execPath, initCwdErr - } - // The execPath may begin with a "../" or a "./" so clean it first. - // Join the two paths, trailing and starting slashes undetermined, so use - // the generic Join function. - return filepath.Join(initCwd, filepath.Clean(execPath)), nil -} diff --git a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_windows.go b/vendor/github.com/inconshreveable/go-update/internal/osext/osext_windows.go deleted file mode 100644 index 72d282cf..00000000 --- a/vendor/github.com/inconshreveable/go-update/internal/osext/osext_windows.go +++ /dev/null @@ -1,34 +0,0 @@ -// 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. - -package osext - -import ( - "syscall" - "unicode/utf16" - "unsafe" -) - -var ( - kernel = syscall.MustLoadDLL("kernel32.dll") - getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") -) - -// GetModuleFileName() with hModule = NULL -func executable() (exePath string, err error) { - return getModuleFileName() -} - -func getModuleFileName() (string, error) { - var n uint32 - b := make([]uint16, syscall.MAX_PATH) - size := uint32(len(b)) - - r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) - n = uint32(r0) - if n == 0 { - return "", e1 - } - return string(utf16.Decode(b[0:n])), nil -} diff --git a/vendor/github.com/inconshreveable/go-update/patcher.go b/vendor/github.com/inconshreveable/go-update/patcher.go deleted file mode 100644 index 1da89cb8..00000000 --- a/vendor/github.com/inconshreveable/go-update/patcher.go +++ /dev/null @@ -1,24 +0,0 @@ -package update - -import ( - "io" - - "github.com/inconshreveable/go-update/internal/binarydist" -) - -// Patcher defines an interface for applying binary patches to an old item to get an updated item. -type Patcher interface { - Patch(old io.Reader, new io.Writer, patch io.Reader) error -} - -type patchFn func(io.Reader, io.Writer, io.Reader) error - -func (fn patchFn) Patch(old io.Reader, new io.Writer, patch io.Reader) error { - return fn(old, new, patch) -} - -// NewBSDifferPatcher returns a new Patcher that applies binary patches using -// the bsdiff algorithm. See http://www.daemonology.net/bsdiff/ -func NewBSDiffPatcher() Patcher { - return patchFn(binarydist.Patch) -} diff --git a/vendor/github.com/inconshreveable/go-update/verifier.go b/vendor/github.com/inconshreveable/go-update/verifier.go deleted file mode 100644 index af1fc576..00000000 --- a/vendor/github.com/inconshreveable/go-update/verifier.go +++ /dev/null @@ -1,74 +0,0 @@ -package update - -import ( - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "crypto/rsa" - "encoding/asn1" - "errors" - "math/big" -) - -// Verifier defines an interface for verfiying an update's signature with a public key. -type Verifier interface { - VerifySignature(checksum, signature []byte, h crypto.Hash, publicKey crypto.PublicKey) error -} - -type verifyFn func([]byte, []byte, crypto.Hash, crypto.PublicKey) error - -func (fn verifyFn) VerifySignature(checksum []byte, signature []byte, hash crypto.Hash, publicKey crypto.PublicKey) error { - return fn(checksum, signature, hash, publicKey) -} - -// NewRSAVerifier returns a Verifier that uses the RSA algorithm to verify updates. -func NewRSAVerifier() Verifier { - return verifyFn(func(checksum, signature []byte, hash crypto.Hash, publicKey crypto.PublicKey) error { - key, ok := publicKey.(*rsa.PublicKey) - if !ok { - return errors.New("not a valid RSA public key") - } - return rsa.VerifyPKCS1v15(key, hash, checksum, signature) - }) -} - -type rsDER struct { - R *big.Int - S *big.Int -} - -// NewECDSAVerifier returns a Verifier that uses the ECDSA algorithm to verify updates. -func NewECDSAVerifier() Verifier { - return verifyFn(func(checksum, signature []byte, hash crypto.Hash, publicKey crypto.PublicKey) error { - key, ok := publicKey.(*ecdsa.PublicKey) - if !ok { - return errors.New("not a valid ECDSA public key") - } - var rs rsDER - if _, err := asn1.Unmarshal(signature, &rs); err != nil { - return err - } - if !ecdsa.Verify(key, checksum, rs.R, rs.S) { - return errors.New("failed to verify ecsda signature") - } - return nil - }) -} - -// NewDSAVerifier returns a Verifier that uses the DSA algorithm to verify updates. -func NewDSAVerifier() Verifier { - return verifyFn(func(checksum, signature []byte, hash crypto.Hash, publicKey crypto.PublicKey) error { - key, ok := publicKey.(*dsa.PublicKey) - if !ok { - return errors.New("not a valid DSA public key") - } - var rs rsDER - if _, err := asn1.Unmarshal(signature, &rs); err != nil { - return err - } - if !dsa.Verify(key, checksum, rs.R, rs.S) { - return errors.New("failed to verify ecsda signature") - } - return nil - }) -} diff --git a/vendor/github.com/inconshreveable/mousetrap/LICENSE b/vendor/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f920e97..00000000 --- a/vendor/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,201 +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 2022 Alan Shreve (@inconshreveable) - - 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/github.com/inconshreveable/mousetrap/README.md b/vendor/github.com/inconshreveable/mousetrap/README.md deleted file mode 100644 index 7a950d17..00000000 --- a/vendor/github.com/inconshreveable/mousetrap/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# mousetrap - -mousetrap is a tiny library that answers a single question. - -On a Windows machine, was the process invoked by someone double clicking on -the executable file while browsing in explorer? - -### Motivation - -Windows developers unfamiliar with command line tools will often "double-click" -the executable for a tool. Because most CLI tools print the help and then exit -when invoked without arguments, this is often very frustrating for those users. - -mousetrap provides a way to detect these invocations so that you can provide -more helpful behavior and instructions on how to run the CLI tool. To see what -this looks like, both from an organizational and a technical perspective, see -https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/ - -### The interface - -The library exposes a single interface: - - func StartedByExplorer() (bool) diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_others.go b/vendor/github.com/inconshreveable/mousetrap/trap_others.go deleted file mode 100644 index 06a91f08..00000000 --- a/vendor/github.com/inconshreveable/mousetrap/trap_others.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !windows -// +build !windows - -package mousetrap - -// StartedByExplorer returns true if the program was invoked by the user -// double-clicking on the executable from explorer.exe -// -// It is conservative and returns false if any of the internal calls fail. -// It does not guarantee that the program was run from a terminal. It only can tell you -// whether it was launched from explorer.exe -// -// On non-Windows platforms, it always returns false. -func StartedByExplorer() bool { - return false -} diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_windows.go b/vendor/github.com/inconshreveable/mousetrap/trap_windows.go deleted file mode 100644 index 0c568802..00000000 --- a/vendor/github.com/inconshreveable/mousetrap/trap_windows.go +++ /dev/null @@ -1,42 +0,0 @@ -package mousetrap - -import ( - "syscall" - "unsafe" -) - -func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) { - snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0) - if err != nil { - return nil, err - } - defer syscall.CloseHandle(snapshot) - var procEntry syscall.ProcessEntry32 - procEntry.Size = uint32(unsafe.Sizeof(procEntry)) - if err = syscall.Process32First(snapshot, &procEntry); err != nil { - return nil, err - } - for { - if procEntry.ProcessID == uint32(pid) { - return &procEntry, nil - } - err = syscall.Process32Next(snapshot, &procEntry) - if err != nil { - return nil, err - } - } -} - -// StartedByExplorer returns true if the program was invoked by the user double-clicking -// on the executable from explorer.exe -// -// It is conservative and returns false if any of the internal calls fail. -// It does not guarantee that the program was run from a terminal. It only can tell you -// whether it was launched from explorer.exe -func StartedByExplorer() bool { - pe, err := getProcessEntry(syscall.Getppid()) - if err != nil { - return false - } - return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:]) -} diff --git a/vendor/github.com/pmezard/go-difflib/LICENSE b/vendor/github.com/pmezard/go-difflib/LICENSE deleted file mode 100644 index c67dad61..00000000 --- a/vendor/github.com/pmezard/go-difflib/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go deleted file mode 100644 index 003e99fa..00000000 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ /dev/null @@ -1,772 +0,0 @@ -// Package difflib is a partial port of Python difflib module. -// -// It provides tools to compare sequences of strings and generate textual diffs. -// -// The following class and functions have been ported: -// -// - SequenceMatcher -// -// - unified_diff -// -// - context_diff -// -// Getting unified diffs was the main goal of the port. Keep in mind this code -// is mostly suitable to output text differences in a human friendly way, there -// are no guarantees generated diffs are consumable by patch(1). -package difflib - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" -) - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func calculateRatio(matches, length int) float64 { - if length > 0 { - return 2.0 * float64(matches) / float64(length) - } - return 1.0 -} - -type Match struct { - A int - B int - Size int -} - -type OpCode struct { - Tag byte - I1 int - I2 int - J1 int - J2 int -} - -// SequenceMatcher compares sequence of strings. The basic -// algorithm predates, and is a little fancier than, an algorithm -// published in the late 1980's by Ratcliff and Obershelp under the -// hyperbolic name "gestalt pattern matching". The basic idea is to find -// the longest contiguous matching subsequence that contains no "junk" -// elements (R-O doesn't address junk). The same idea is then applied -// recursively to the pieces of the sequences to the left and to the right -// of the matching subsequence. This does not yield minimal edit -// sequences, but does tend to yield matches that "look right" to people. -// -// SequenceMatcher tries to compute a "human-friendly diff" between two -// sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the -// longest *contiguous* & junk-free matching subsequence. That's what -// catches peoples' eyes. The Windows(tm) windiff has another interesting -// notion, pairing up elements that appear uniquely in each sequence. -// That, and the method here, appear to yield more intuitive difference -// reports than does diff. This method appears to be the least vulnerable -// to synching up on blocks of "junk lines", though (like blank lines in -// ordinary text files, or maybe "

" lines in HTML files). That may be -// because this is the only method of the 3 that has a *concept* of -// "junk" . -// -// Timing: Basic R-O is cubic time worst case and quadratic time expected -// case. SequenceMatcher is quadratic time for the worst case and has -// expected-case behavior dependent in a complicated way on how many -// elements the sequences have in common; best case time is linear. -type SequenceMatcher struct { - a []string - b []string - b2j map[string][]int - IsJunk func(string) bool - autoJunk bool - bJunk map[string]struct{} - matchingBlocks []Match - fullBCount map[string]int - bPopular map[string]struct{} - opCodes []OpCode -} - -func NewMatcher(a, b []string) *SequenceMatcher { - m := SequenceMatcher{autoJunk: true} - m.SetSeqs(a, b) - return &m -} - -func NewMatcherWithJunk(a, b []string, autoJunk bool, - isJunk func(string) bool) *SequenceMatcher { - - m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} - m.SetSeqs(a, b) - return &m -} - -// Set two sequences to be compared. -func (m *SequenceMatcher) SetSeqs(a, b []string) { - m.SetSeq1(a) - m.SetSeq2(b) -} - -// Set the first sequence to be compared. The second sequence to be compared is -// not changed. -// -// SequenceMatcher computes and caches detailed information about the second -// sequence, so if you want to compare one sequence S against many sequences, -// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other -// sequences. -// -// See also SetSeqs() and SetSeq2(). -func (m *SequenceMatcher) SetSeq1(a []string) { - if &a == &m.a { - return - } - m.a = a - m.matchingBlocks = nil - m.opCodes = nil -} - -// Set the second sequence to be compared. The first sequence to be compared is -// not changed. -func (m *SequenceMatcher) SetSeq2(b []string) { - if &b == &m.b { - return - } - m.b = b - m.matchingBlocks = nil - m.opCodes = nil - m.fullBCount = nil - m.chainB() -} - -func (m *SequenceMatcher) chainB() { - // Populate line -> index mapping - b2j := map[string][]int{} - for i, s := range m.b { - indices := b2j[s] - indices = append(indices, i) - b2j[s] = indices - } - - // Purge junk elements - m.bJunk = map[string]struct{}{} - if m.IsJunk != nil { - junk := m.bJunk - for s, _ := range b2j { - if m.IsJunk(s) { - junk[s] = struct{}{} - } - } - for s, _ := range junk { - delete(b2j, s) - } - } - - // Purge remaining popular elements - popular := map[string]struct{}{} - n := len(m.b) - if m.autoJunk && n >= 200 { - ntest := n/100 + 1 - for s, indices := range b2j { - if len(indices) > ntest { - popular[s] = struct{}{} - } - } - for s, _ := range popular { - delete(b2j, s) - } - } - m.bPopular = popular - m.b2j = b2j -} - -func (m *SequenceMatcher) isBJunk(s string) bool { - _, ok := m.bJunk[s] - return ok -} - -// Find longest matching block in a[alo:ahi] and b[blo:bhi]. -// -// If IsJunk is not defined: -// -// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi -// and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' -// -// In other words, of all maximal matching blocks, return one that -// starts earliest in a, and of all those maximal matching blocks that -// start earliest in a, return the one that starts earliest in b. -// -// If IsJunk is defined, first the longest matching block is -// determined as above, but with the additional restriction that no -// junk element appears in the block. Then that block is extended as -// far as possible by matching (only) junk elements on both sides. So -// the resulting block never matches on junk except as identical junk -// happens to be adjacent to an "interesting" match. -// -// If no blocks match, return (alo, blo, 0). -func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { - // CAUTION: stripping common prefix or suffix would be incorrect. - // E.g., - // ab - // acab - // Longest matching block is "ab", but if common prefix is - // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so - // strip, so ends up claiming that ab is changed to acab by - // inserting "ca" in the middle. That's minimal but unintuitive: - // "it's obvious" that someone inserted "ac" at the front. - // Windiff ends up at the same place as diff, but by pairing up - // the unique 'b's and then matching the first two 'a's. - besti, bestj, bestsize := alo, blo, 0 - - // find longest junk-free match - // during an iteration of the loop, j2len[j] = length of longest - // junk-free match ending with a[i-1] and b[j] - j2len := map[int]int{} - for i := alo; i != ahi; i++ { - // look at all instances of a[i] in b; note that because - // b2j has no junk keys, the loop is skipped if a[i] is junk - newj2len := map[int]int{} - for _, j := range m.b2j[m.a[i]] { - // a[i] matches b[j] - if j < blo { - continue - } - if j >= bhi { - break - } - k := j2len[j-1] + 1 - newj2len[j] = k - if k > bestsize { - besti, bestj, bestsize = i-k+1, j-k+1, k - } - } - j2len = newj2len - } - - // Extend the best by non-junk elements on each end. In particular, - // "popular" non-junk elements aren't in b2j, which greatly speeds - // the inner loop above, but also means "the best" match so far - // doesn't contain any junk *or* popular non-junk elements. - for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - !m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - // Now that we have a wholly interesting match (albeit possibly - // empty!), we may as well suck up the matching junk on each - // side of it too. Can't think of a good reason not to, and it - // saves post-processing the (possibly considerable) expense of - // figuring out what to do with it. In the case of an empty - // interesting match, this is clearly the right thing to do, - // because no other kind of match is possible in the regions. - for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - return Match{A: besti, B: bestj, Size: bestsize} -} - -// Return list of triples describing matching subsequences. -// -// Each triple is of the form (i, j, n), and means that -// a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in -// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are -// adjacent triples in the list, and the second is not the last triple in the -// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe -// adjacent equal blocks. -// -// The last triple is a dummy, (len(a), len(b), 0), and is the only -// triple with n==0. -func (m *SequenceMatcher) GetMatchingBlocks() []Match { - if m.matchingBlocks != nil { - return m.matchingBlocks - } - - var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match - matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { - match := m.findLongestMatch(alo, ahi, blo, bhi) - i, j, k := match.A, match.B, match.Size - if match.Size > 0 { - if alo < i && blo < j { - matched = matchBlocks(alo, i, blo, j, matched) - } - matched = append(matched, match) - if i+k < ahi && j+k < bhi { - matched = matchBlocks(i+k, ahi, j+k, bhi, matched) - } - } - return matched - } - matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) - - // It's possible that we have adjacent equal blocks in the - // matching_blocks list now. - nonAdjacent := []Match{} - i1, j1, k1 := 0, 0, 0 - for _, b := range matched { - // Is this block adjacent to i1, j1, k1? - i2, j2, k2 := b.A, b.B, b.Size - if i1+k1 == i2 && j1+k1 == j2 { - // Yes, so collapse them -- this just increases the length of - // the first block by the length of the second, and the first - // block so lengthened remains the block to compare against. - k1 += k2 - } else { - // Not adjacent. Remember the first block (k1==0 means it's - // the dummy we started with), and make the second block the - // new block to compare against. - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - i1, j1, k1 = i2, j2, k2 - } - } - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - - nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) - m.matchingBlocks = nonAdjacent - return m.matchingBlocks -} - -// Return list of 5-tuples describing how to turn a into b. -// -// Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple -// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the -// tuple preceding it, and likewise for j1 == the previous j2. -// -// The tags are characters, with these meanings: -// -// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] -// -// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. -// -// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. -// -// 'e' (equal): a[i1:i2] == b[j1:j2] -func (m *SequenceMatcher) GetOpCodes() []OpCode { - if m.opCodes != nil { - return m.opCodes - } - i, j := 0, 0 - matching := m.GetMatchingBlocks() - opCodes := make([]OpCode, 0, len(matching)) - for _, m := range matching { - // invariant: we've pumped out correct diffs to change - // a[:i] into b[:j], and the next matching block is - // a[ai:ai+size] == b[bj:bj+size]. So we need to pump - // out a diff to change a[i:ai] into b[j:bj], pump out - // the matching block, and move (i,j) beyond the match - ai, bj, size := m.A, m.B, m.Size - tag := byte(0) - if i < ai && j < bj { - tag = 'r' - } else if i < ai { - tag = 'd' - } else if j < bj { - tag = 'i' - } - if tag > 0 { - opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) - } - i, j = ai+size, bj+size - // the list of matching blocks is terminated by a - // sentinel with size 0 - if size > 0 { - opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) - } - } - m.opCodes = opCodes - return m.opCodes -} - -// Isolate change clusters by eliminating ranges with no changes. -// -// Return a generator of groups with up to n lines of context. -// Each group is in the same format as returned by GetOpCodes(). -func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { - if n < 0 { - n = 3 - } - codes := m.GetOpCodes() - if len(codes) == 0 { - codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} - } - // Fixup leading and trailing groups if they show no changes. - if codes[0].Tag == 'e' { - c := codes[0] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} - } - if codes[len(codes)-1].Tag == 'e' { - c := codes[len(codes)-1] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} - } - nn := n + n - groups := [][]OpCode{} - group := []OpCode{} - for _, c := range codes { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - // End the current group and start a new one whenever - // there is a large range with no changes. - if c.Tag == 'e' && i2-i1 > nn { - group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), - j1, min(j2, j1+n)}) - groups = append(groups, group) - group = []OpCode{} - i1, j1 = max(i1, i2-n), max(j1, j2-n) - } - group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) - } - if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { - groups = append(groups, group) - } - return groups -} - -// Return a measure of the sequences' similarity (float in [0,1]). -// -// Where T is the total number of elements in both sequences, and -// M is the number of matches, this is 2.0*M / T. -// Note that this is 1 if the sequences are identical, and 0 if -// they have nothing in common. -// -// .Ratio() is expensive to compute if you haven't already computed -// .GetMatchingBlocks() or .GetOpCodes(), in which case you may -// want to try .QuickRatio() or .RealQuickRation() first to get an -// upper bound. -func (m *SequenceMatcher) Ratio() float64 { - matches := 0 - for _, m := range m.GetMatchingBlocks() { - matches += m.Size - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() relatively quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute. -func (m *SequenceMatcher) QuickRatio() float64 { - // viewing a and b as multisets, set matches to the cardinality - // of their intersection; this counts the number of matches - // without regard to order, so is clearly an upper bound - if m.fullBCount == nil { - m.fullBCount = map[string]int{} - for _, s := range m.b { - m.fullBCount[s] = m.fullBCount[s] + 1 - } - } - - // avail[x] is the number of times x appears in 'b' less the - // number of times we've seen it in 'a' so far ... kinda - avail := map[string]int{} - matches := 0 - for _, s := range m.a { - n, ok := avail[s] - if !ok { - n = m.fullBCount[s] - } - avail[s] = n - 1 - if n > 0 { - matches += 1 - } - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() very quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute than either .Ratio() or .QuickRatio(). -func (m *SequenceMatcher) RealQuickRatio() float64 { - la, lb := len(m.a), len(m.b) - return calculateRatio(min(la, lb), la+lb) -} - -// Convert range to the "ed" format -func formatRangeUnified(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 1 { - return fmt.Sprintf("%d", beginning) - } - if length == 0 { - beginning -= 1 // empty ranges begin at line just before the range - } - return fmt.Sprintf("%d,%d", beginning, length) -} - -// Unified diff parameters -type UnifiedDiff struct { - A []string // First sequence lines - FromFile string // First file name - FromDate string // First file time - B []string // Second sequence lines - ToFile string // Second file name - ToDate string // Second file time - Eol string // Headers end of line, defaults to LF - Context int // Number of context lines -} - -// Compare two sequences of lines; generate the delta as a unified diff. -// -// Unified diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by 'n' which -// defaults to three. -// -// By default, the diff control lines (those with ---, +++, or @@) are -// created with a trailing newline. This is helpful so that inputs -// created from file.readlines() result in diffs that are suitable for -// file.writelines() since both the inputs and outputs have trailing -// newlines. -// -// For inputs that do not have trailing newlines, set the lineterm -// argument to "" so that the output will be uniformly newline free. -// -// The unidiff format normally has a header for filenames and modification -// times. Any or all of these may be specified using strings for -// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. -// The modification times are normally expressed in the ISO 8601 format. -func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - wf := func(format string, args ...interface{}) error { - _, err := buf.WriteString(fmt.Sprintf(format, args...)) - return err - } - ws := func(s string) error { - _, err := buf.WriteString(s) - return err - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) - if err != nil { - return err - } - err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) - if err != nil { - return err - } - } - } - first, last := g[0], g[len(g)-1] - range1 := formatRangeUnified(first.I1, last.I2) - range2 := formatRangeUnified(first.J1, last.J2) - if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { - return err - } - for _, c := range g { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - if c.Tag == 'e' { - for _, line := range diff.A[i1:i2] { - if err := ws(" " + line); err != nil { - return err - } - } - continue - } - if c.Tag == 'r' || c.Tag == 'd' { - for _, line := range diff.A[i1:i2] { - if err := ws("-" + line); err != nil { - return err - } - } - } - if c.Tag == 'r' || c.Tag == 'i' { - for _, line := range diff.B[j1:j2] { - if err := ws("+" + line); err != nil { - return err - } - } - } - } - } - return nil -} - -// Like WriteUnifiedDiff but returns the diff a string. -func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteUnifiedDiff(w, diff) - return string(w.Bytes()), err -} - -// Convert range to the "ed" format. -func formatRangeContext(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 0 { - beginning -= 1 // empty ranges begin at line just before the range - } - if length <= 1 { - return fmt.Sprintf("%d", beginning) - } - return fmt.Sprintf("%d,%d", beginning, beginning+length-1) -} - -type ContextDiff UnifiedDiff - -// Compare two sequences of lines; generate the delta as a context diff. -// -// Context diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by diff.Context -// which defaults to three. -// -// By default, the diff control lines (those with *** or ---) are -// created with a trailing newline. -// -// For inputs that do not have trailing newlines, set the diff.Eol -// argument to "" so that the output will be uniformly newline free. -// -// The context diff format normally has a header for filenames and -// modification times. Any or all of these may be specified using -// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. -// The modification times are normally expressed in the ISO 8601 format. -// If not specified, the strings default to blanks. -func WriteContextDiff(writer io.Writer, diff ContextDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - var diffErr error - wf := func(format string, args ...interface{}) { - _, err := buf.WriteString(fmt.Sprintf(format, args...)) - if diffErr == nil && err != nil { - diffErr = err - } - } - ws := func(s string) { - _, err := buf.WriteString(s) - if diffErr == nil && err != nil { - diffErr = err - } - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - prefix := map[byte]string{ - 'i': "+ ", - 'd': "- ", - 'r': "! ", - 'e': " ", - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) - wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol) - } - } - - first, last := g[0], g[len(g)-1] - ws("***************" + diff.Eol) - - range1 := formatRangeContext(first.I1, last.I2) - wf("*** %s ****%s", range1, diff.Eol) - for _, c := range g { - if c.Tag == 'r' || c.Tag == 'd' { - for _, cc := range g { - if cc.Tag == 'i' { - continue - } - for _, line := range diff.A[cc.I1:cc.I2] { - ws(prefix[cc.Tag] + line) - } - } - break - } - } - - range2 := formatRangeContext(first.J1, last.J2) - wf("--- %s ----%s", range2, diff.Eol) - for _, c := range g { - if c.Tag == 'r' || c.Tag == 'i' { - for _, cc := range g { - if cc.Tag == 'd' { - continue - } - for _, line := range diff.B[cc.J1:cc.J2] { - ws(prefix[cc.Tag] + line) - } - } - break - } - } - } - return diffErr -} - -// Like WriteContextDiff but returns the diff a string. -func GetContextDiffString(diff ContextDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteContextDiff(w, diff) - return string(w.Bytes()), err -} - -// Split a string on "\n" while preserving them. The output can be used -// as input for UnifiedDiff and ContextDiff structures. -func SplitLines(s string) []string { - lines := strings.SplitAfter(s, "\n") - lines[len(lines)-1] += "\n" - return lines -} diff --git a/vendor/github.com/prometheus/common/LICENSE b/vendor/github.com/prometheus/common/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/vendor/github.com/prometheus/common/LICENSE +++ /dev/null @@ -1,201 +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/github.com/prometheus/common/NOTICE b/vendor/github.com/prometheus/common/NOTICE deleted file mode 100644 index 636a2c1a..00000000 --- a/vendor/github.com/prometheus/common/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Common libraries shared by Prometheus Go components. -Copyright 2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/common/model/alert.go b/vendor/github.com/prometheus/common/model/alert.go deleted file mode 100644 index 35e739c7..00000000 --- a/vendor/github.com/prometheus/common/model/alert.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "fmt" - "time" -) - -type AlertStatus string - -const ( - AlertFiring AlertStatus = "firing" - AlertResolved AlertStatus = "resolved" -) - -// Alert is a generic representation of an alert in the Prometheus eco-system. -type Alert struct { - // Label value pairs for purpose of aggregation, matching, and disposition - // dispatching. This must minimally include an "alertname" label. - Labels LabelSet `json:"labels"` - - // Extra key/value information which does not define alert identity. - Annotations LabelSet `json:"annotations"` - - // The known time range for this alert. Both ends are optional. - StartsAt time.Time `json:"startsAt,omitempty"` - EndsAt time.Time `json:"endsAt,omitempty"` - GeneratorURL string `json:"generatorURL"` -} - -// Name returns the name of the alert. It is equivalent to the "alertname" label. -func (a *Alert) Name() string { - return string(a.Labels[AlertNameLabel]) -} - -// Fingerprint returns a unique hash for the alert. It is equivalent to -// the fingerprint of the alert's label set. -func (a *Alert) Fingerprint() Fingerprint { - return a.Labels.Fingerprint() -} - -func (a *Alert) String() string { - s := fmt.Sprintf("%s[%s]", a.Name(), a.Fingerprint().String()[:7]) - if a.Resolved() { - return s + "[resolved]" - } - return s + "[active]" -} - -// Resolved returns true iff the activity interval ended in the past. -func (a *Alert) Resolved() bool { - return a.ResolvedAt(time.Now()) -} - -// ResolvedAt returns true off the activity interval ended before -// the given timestamp. -func (a *Alert) ResolvedAt(ts time.Time) bool { - if a.EndsAt.IsZero() { - return false - } - return !a.EndsAt.After(ts) -} - -// Status returns the status of the alert. -func (a *Alert) Status() AlertStatus { - if a.Resolved() { - return AlertResolved - } - return AlertFiring -} - -// Validate checks whether the alert data is inconsistent. -func (a *Alert) Validate() error { - if a.StartsAt.IsZero() { - return fmt.Errorf("start time missing") - } - if !a.EndsAt.IsZero() && a.EndsAt.Before(a.StartsAt) { - return fmt.Errorf("start time must be before end time") - } - if err := a.Labels.Validate(); err != nil { - return fmt.Errorf("invalid label set: %s", err) - } - if len(a.Labels) == 0 { - return fmt.Errorf("at least one label pair required") - } - if err := a.Annotations.Validate(); err != nil { - return fmt.Errorf("invalid annotations: %s", err) - } - return nil -} - -// Alert is a list of alerts that can be sorted in chronological order. -type Alerts []*Alert - -func (as Alerts) Len() int { return len(as) } -func (as Alerts) Swap(i, j int) { as[i], as[j] = as[j], as[i] } - -func (as Alerts) Less(i, j int) bool { - if as[i].StartsAt.Before(as[j].StartsAt) { - return true - } - if as[i].EndsAt.Before(as[j].EndsAt) { - return true - } - return as[i].Fingerprint() < as[j].Fingerprint() -} - -// HasFiring returns true iff one of the alerts is not resolved. -func (as Alerts) HasFiring() bool { - for _, a := range as { - if !a.Resolved() { - return true - } - } - return false -} - -// Status returns StatusFiring iff at least one of the alerts is firing. -func (as Alerts) Status() AlertStatus { - if as.HasFiring() { - return AlertFiring - } - return AlertResolved -} diff --git a/vendor/github.com/prometheus/common/model/fingerprinting.go b/vendor/github.com/prometheus/common/model/fingerprinting.go deleted file mode 100644 index fc4de410..00000000 --- a/vendor/github.com/prometheus/common/model/fingerprinting.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "fmt" - "strconv" -) - -// Fingerprint provides a hash-capable representation of a Metric. -// For our purposes, FNV-1A 64-bit is used. -type Fingerprint uint64 - -// FingerprintFromString transforms a string representation into a Fingerprint. -func FingerprintFromString(s string) (Fingerprint, error) { - num, err := strconv.ParseUint(s, 16, 64) - return Fingerprint(num), err -} - -// ParseFingerprint parses the input string into a fingerprint. -func ParseFingerprint(s string) (Fingerprint, error) { - num, err := strconv.ParseUint(s, 16, 64) - if err != nil { - return 0, err - } - return Fingerprint(num), nil -} - -func (f Fingerprint) String() string { - return fmt.Sprintf("%016x", uint64(f)) -} - -// Fingerprints represents a collection of Fingerprint subject to a given -// natural sorting scheme. It implements sort.Interface. -type Fingerprints []Fingerprint - -// Len implements sort.Interface. -func (f Fingerprints) Len() int { - return len(f) -} - -// Less implements sort.Interface. -func (f Fingerprints) Less(i, j int) bool { - return f[i] < f[j] -} - -// Swap implements sort.Interface. -func (f Fingerprints) Swap(i, j int) { - f[i], f[j] = f[j], f[i] -} - -// FingerprintSet is a set of Fingerprints. -type FingerprintSet map[Fingerprint]struct{} - -// Equal returns true if both sets contain the same elements (and not more). -func (s FingerprintSet) Equal(o FingerprintSet) bool { - if len(s) != len(o) { - return false - } - - for k := range s { - if _, ok := o[k]; !ok { - return false - } - } - - return true -} - -// Intersection returns the elements contained in both sets. -func (s FingerprintSet) Intersection(o FingerprintSet) FingerprintSet { - myLength, otherLength := len(s), len(o) - if myLength == 0 || otherLength == 0 { - return FingerprintSet{} - } - - subSet := s - superSet := o - - if otherLength < myLength { - subSet = o - superSet = s - } - - out := FingerprintSet{} - - for k := range subSet { - if _, ok := superSet[k]; ok { - out[k] = struct{}{} - } - } - - return out -} diff --git a/vendor/github.com/prometheus/common/model/fnv.go b/vendor/github.com/prometheus/common/model/fnv.go deleted file mode 100644 index 367afecd..00000000 --- a/vendor/github.com/prometheus/common/model/fnv.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 The Prometheus 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 model - -// Inline and byte-free variant of hash/fnv's fnv64a. - -const ( - offset64 = 14695981039346656037 - prime64 = 1099511628211 -) - -// hashNew initializes a new fnv64a hash value. -func hashNew() uint64 { - return offset64 -} - -// hashAdd adds a string to a fnv64a hash value, returning the updated hash. -func hashAdd(h uint64, s string) uint64 { - for i := 0; i < len(s); i++ { - h ^= uint64(s[i]) - h *= prime64 - } - return h -} - -// hashAddByte adds a byte to a fnv64a hash value, returning the updated hash. -func hashAddByte(h uint64, b byte) uint64 { - h ^= uint64(b) - h *= prime64 - return h -} diff --git a/vendor/github.com/prometheus/common/model/labels.go b/vendor/github.com/prometheus/common/model/labels.go deleted file mode 100644 index ef895633..00000000 --- a/vendor/github.com/prometheus/common/model/labels.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "regexp" - "strings" - "unicode/utf8" -) - -const ( - // AlertNameLabel is the name of the label containing the an alert's name. - AlertNameLabel = "alertname" - - // ExportedLabelPrefix is the prefix to prepend to the label names present in - // exported metrics if a label of the same name is added by the server. - ExportedLabelPrefix = "exported_" - - // MetricNameLabel is the label name indicating the metric name of a - // timeseries. - MetricNameLabel = "__name__" - - // SchemeLabel is the name of the label that holds the scheme on which to - // scrape a target. - SchemeLabel = "__scheme__" - - // AddressLabel is the name of the label that holds the address of - // a scrape target. - AddressLabel = "__address__" - - // MetricsPathLabel is the name of the label that holds the path on which to - // scrape a target. - MetricsPathLabel = "__metrics_path__" - - // ScrapeIntervalLabel is the name of the label that holds the scrape interval - // used to scrape a target. - ScrapeIntervalLabel = "__scrape_interval__" - - // ScrapeTimeoutLabel is the name of the label that holds the scrape - // timeout used to scrape a target. - ScrapeTimeoutLabel = "__scrape_timeout__" - - // ReservedLabelPrefix is a prefix which is not legal in user-supplied - // label names. - ReservedLabelPrefix = "__" - - // MetaLabelPrefix is a prefix for labels that provide meta information. - // Labels with this prefix are used for intermediate label processing and - // will not be attached to time series. - MetaLabelPrefix = "__meta_" - - // TmpLabelPrefix is a prefix for temporary labels as part of relabelling. - // Labels with this prefix are used for intermediate label processing and - // will not be attached to time series. This is reserved for use in - // Prometheus configuration files by users. - TmpLabelPrefix = "__tmp_" - - // ParamLabelPrefix is a prefix for labels that provide URL parameters - // used to scrape a target. - ParamLabelPrefix = "__param_" - - // JobLabel is the label name indicating the job from which a timeseries - // was scraped. - JobLabel = "job" - - // InstanceLabel is the label name used for the instance label. - InstanceLabel = "instance" - - // BucketLabel is used for the label that defines the upper bound of a - // bucket of a histogram ("le" -> "less or equal"). - BucketLabel = "le" - - // QuantileLabel is used for the label that defines the quantile in a - // summary. - QuantileLabel = "quantile" -) - -// LabelNameRE is a regular expression matching valid label names. Note that the -// IsValid method of LabelName performs the same check but faster than a match -// with this regular expression. -var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") - -// A LabelName is a key for a LabelSet or Metric. It has a value associated -// therewith. -type LabelName string - -// IsValid is true iff the label name matches the pattern of LabelNameRE. This -// method, however, does not use LabelNameRE for the check but a much faster -// hardcoded implementation. -func (ln LabelName) IsValid() bool { - if len(ln) == 0 { - return false - } - for i, b := range ln { - if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) { - return false - } - } - return true -} - -// UnmarshalYAML implements the yaml.Unmarshaler interface. -func (ln *LabelName) UnmarshalYAML(unmarshal func(interface{}) error) error { - var s string - if err := unmarshal(&s); err != nil { - return err - } - if !LabelName(s).IsValid() { - return fmt.Errorf("%q is not a valid label name", s) - } - *ln = LabelName(s) - return nil -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (ln *LabelName) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - if !LabelName(s).IsValid() { - return fmt.Errorf("%q is not a valid label name", s) - } - *ln = LabelName(s) - return nil -} - -// LabelNames is a sortable LabelName slice. In implements sort.Interface. -type LabelNames []LabelName - -func (l LabelNames) Len() int { - return len(l) -} - -func (l LabelNames) Less(i, j int) bool { - return l[i] < l[j] -} - -func (l LabelNames) Swap(i, j int) { - l[i], l[j] = l[j], l[i] -} - -func (l LabelNames) String() string { - labelStrings := make([]string, 0, len(l)) - for _, label := range l { - labelStrings = append(labelStrings, string(label)) - } - return strings.Join(labelStrings, ", ") -} - -// A LabelValue is an associated value for a LabelName. -type LabelValue string - -// IsValid returns true iff the string is a valid UTF8. -func (lv LabelValue) IsValid() bool { - return utf8.ValidString(string(lv)) -} - -// LabelValues is a sortable LabelValue slice. It implements sort.Interface. -type LabelValues []LabelValue - -func (l LabelValues) Len() int { - return len(l) -} - -func (l LabelValues) Less(i, j int) bool { - return string(l[i]) < string(l[j]) -} - -func (l LabelValues) Swap(i, j int) { - l[i], l[j] = l[j], l[i] -} - -// LabelPair pairs a name with a value. -type LabelPair struct { - Name LabelName - Value LabelValue -} - -// LabelPairs is a sortable slice of LabelPair pointers. It implements -// sort.Interface. -type LabelPairs []*LabelPair - -func (l LabelPairs) Len() int { - return len(l) -} - -func (l LabelPairs) Less(i, j int) bool { - switch { - case l[i].Name > l[j].Name: - return false - case l[i].Name < l[j].Name: - return true - case l[i].Value > l[j].Value: - return false - case l[i].Value < l[j].Value: - return true - default: - return false - } -} - -func (l LabelPairs) Swap(i, j int) { - l[i], l[j] = l[j], l[i] -} diff --git a/vendor/github.com/prometheus/common/model/labelset.go b/vendor/github.com/prometheus/common/model/labelset.go deleted file mode 100644 index 6eda08a7..00000000 --- a/vendor/github.com/prometheus/common/model/labelset.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "sort" - "strings" -) - -// A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet -// may be fully-qualified down to the point where it may resolve to a single -// Metric in the data store or not. All operations that occur within the realm -// of a LabelSet can emit a vector of Metric entities to which the LabelSet may -// match. -type LabelSet map[LabelName]LabelValue - -// Validate checks whether all names and values in the label set -// are valid. -func (ls LabelSet) Validate() error { - for ln, lv := range ls { - if !ln.IsValid() { - return fmt.Errorf("invalid name %q", ln) - } - if !lv.IsValid() { - return fmt.Errorf("invalid value %q", lv) - } - } - return nil -} - -// Equal returns true iff both label sets have exactly the same key/value pairs. -func (ls LabelSet) Equal(o LabelSet) bool { - if len(ls) != len(o) { - return false - } - for ln, lv := range ls { - olv, ok := o[ln] - if !ok { - return false - } - if olv != lv { - return false - } - } - return true -} - -// Before compares the metrics, using the following criteria: -// -// If m has fewer labels than o, it is before o. If it has more, it is not. -// -// If the number of labels is the same, the superset of all label names is -// sorted alphanumerically. The first differing label pair found in that order -// determines the outcome: If the label does not exist at all in m, then m is -// before o, and vice versa. Otherwise the label value is compared -// alphanumerically. -// -// If m and o are equal, the method returns false. -func (ls LabelSet) Before(o LabelSet) bool { - if len(ls) < len(o) { - return true - } - if len(ls) > len(o) { - return false - } - - lns := make(LabelNames, 0, len(ls)+len(o)) - for ln := range ls { - lns = append(lns, ln) - } - for ln := range o { - lns = append(lns, ln) - } - // It's probably not worth it to de-dup lns. - sort.Sort(lns) - for _, ln := range lns { - mlv, ok := ls[ln] - if !ok { - return true - } - olv, ok := o[ln] - if !ok { - return false - } - if mlv < olv { - return true - } - if mlv > olv { - return false - } - } - return false -} - -// Clone returns a copy of the label set. -func (ls LabelSet) Clone() LabelSet { - lsn := make(LabelSet, len(ls)) - for ln, lv := range ls { - lsn[ln] = lv - } - return lsn -} - -// Merge is a helper function to non-destructively merge two label sets. -func (l LabelSet) Merge(other LabelSet) LabelSet { - result := make(LabelSet, len(l)) - - for k, v := range l { - result[k] = v - } - - for k, v := range other { - result[k] = v - } - - return result -} - -func (l LabelSet) String() string { - lstrs := make([]string, 0, len(l)) - for l, v := range l { - lstrs = append(lstrs, fmt.Sprintf("%s=%q", l, v)) - } - - sort.Strings(lstrs) - return fmt.Sprintf("{%s}", strings.Join(lstrs, ", ")) -} - -// Fingerprint returns the LabelSet's fingerprint. -func (ls LabelSet) Fingerprint() Fingerprint { - return labelSetToFingerprint(ls) -} - -// FastFingerprint returns the LabelSet's Fingerprint calculated by a faster hashing -// algorithm, which is, however, more susceptible to hash collisions. -func (ls LabelSet) FastFingerprint() Fingerprint { - return labelSetToFastFingerprint(ls) -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (l *LabelSet) UnmarshalJSON(b []byte) error { - var m map[LabelName]LabelValue - if err := json.Unmarshal(b, &m); err != nil { - return err - } - // encoding/json only unmarshals maps of the form map[string]T. It treats - // LabelName as a string and does not call its UnmarshalJSON method. - // Thus, we have to replicate the behavior here. - for ln := range m { - if !ln.IsValid() { - return fmt.Errorf("%q is not a valid label name", ln) - } - } - *l = LabelSet(m) - return nil -} diff --git a/vendor/github.com/prometheus/common/model/metric.go b/vendor/github.com/prometheus/common/model/metric.go deleted file mode 100644 index 00804b7f..00000000 --- a/vendor/github.com/prometheus/common/model/metric.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "fmt" - "regexp" - "sort" - "strings" -) - -var ( - // MetricNameRE is a regular expression matching valid metric - // names. Note that the IsValidMetricName function performs the same - // check but faster than a match with this regular expression. - MetricNameRE = regexp.MustCompile(`^[a-zA-Z_:][a-zA-Z0-9_:]*$`) -) - -// A Metric is similar to a LabelSet, but the key difference is that a Metric is -// a singleton and refers to one and only one stream of samples. -type Metric LabelSet - -// Equal compares the metrics. -func (m Metric) Equal(o Metric) bool { - return LabelSet(m).Equal(LabelSet(o)) -} - -// Before compares the metrics' underlying label sets. -func (m Metric) Before(o Metric) bool { - return LabelSet(m).Before(LabelSet(o)) -} - -// Clone returns a copy of the Metric. -func (m Metric) Clone() Metric { - clone := make(Metric, len(m)) - for k, v := range m { - clone[k] = v - } - return clone -} - -func (m Metric) String() string { - metricName, hasName := m[MetricNameLabel] - numLabels := len(m) - 1 - if !hasName { - numLabels = len(m) - } - labelStrings := make([]string, 0, numLabels) - for label, value := range m { - if label != MetricNameLabel { - labelStrings = append(labelStrings, fmt.Sprintf("%s=%q", label, value)) - } - } - - switch numLabels { - case 0: - if hasName { - return string(metricName) - } - return "{}" - default: - sort.Strings(labelStrings) - return fmt.Sprintf("%s{%s}", metricName, strings.Join(labelStrings, ", ")) - } -} - -// Fingerprint returns a Metric's Fingerprint. -func (m Metric) Fingerprint() Fingerprint { - return LabelSet(m).Fingerprint() -} - -// FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing -// algorithm, which is, however, more susceptible to hash collisions. -func (m Metric) FastFingerprint() Fingerprint { - return LabelSet(m).FastFingerprint() -} - -// IsValidMetricName returns true iff name matches the pattern of MetricNameRE. -// This function, however, does not use MetricNameRE for the check but a much -// faster hardcoded implementation. -func IsValidMetricName(n LabelValue) bool { - if len(n) == 0 { - return false - } - for i, b := range n { - if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == ':' || (b >= '0' && b <= '9' && i > 0)) { - return false - } - } - return true -} diff --git a/vendor/github.com/prometheus/common/model/model.go b/vendor/github.com/prometheus/common/model/model.go deleted file mode 100644 index a7b96917..00000000 --- a/vendor/github.com/prometheus/common/model/model.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2013 The Prometheus 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 model contains common data structures that are shared across -// Prometheus components and libraries. -package model diff --git a/vendor/github.com/prometheus/common/model/signature.go b/vendor/github.com/prometheus/common/model/signature.go deleted file mode 100644 index 8762b13c..00000000 --- a/vendor/github.com/prometheus/common/model/signature.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2014 The Prometheus 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 model - -import ( - "sort" -) - -// SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is -// used to separate label names, label values, and other strings from each other -// when calculating their combined hash value (aka signature aka fingerprint). -const SeparatorByte byte = 255 - -var ( - // cache the signature of an empty label set. - emptyLabelSignature = hashNew() -) - -// LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a -// given label set. (Collisions are possible but unlikely if the number of label -// sets the function is applied to is small.) -func LabelsToSignature(labels map[string]string) uint64 { - if len(labels) == 0 { - return emptyLabelSignature - } - - labelNames := make([]string, 0, len(labels)) - for labelName := range labels { - labelNames = append(labelNames, labelName) - } - sort.Strings(labelNames) - - sum := hashNew() - for _, labelName := range labelNames { - sum = hashAdd(sum, labelName) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, labels[labelName]) - sum = hashAddByte(sum, SeparatorByte) - } - return sum -} - -// labelSetToFingerprint works exactly as LabelsToSignature but takes a LabelSet as -// parameter (rather than a label map) and returns a Fingerprint. -func labelSetToFingerprint(ls LabelSet) Fingerprint { - if len(ls) == 0 { - return Fingerprint(emptyLabelSignature) - } - - labelNames := make(LabelNames, 0, len(ls)) - for labelName := range ls { - labelNames = append(labelNames, labelName) - } - sort.Sort(labelNames) - - sum := hashNew() - for _, labelName := range labelNames { - sum = hashAdd(sum, string(labelName)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(ls[labelName])) - sum = hashAddByte(sum, SeparatorByte) - } - return Fingerprint(sum) -} - -// labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a -// faster and less allocation-heavy hash function, which is more susceptible to -// create hash collisions. Therefore, collision detection should be applied. -func labelSetToFastFingerprint(ls LabelSet) Fingerprint { - if len(ls) == 0 { - return Fingerprint(emptyLabelSignature) - } - - var result uint64 - for labelName, labelValue := range ls { - sum := hashNew() - sum = hashAdd(sum, string(labelName)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(labelValue)) - result ^= sum - } - return Fingerprint(result) -} - -// SignatureForLabels works like LabelsToSignature but takes a Metric as -// parameter (rather than a label map) and only includes the labels with the -// specified LabelNames into the signature calculation. The labels passed in -// will be sorted by this function. -func SignatureForLabels(m Metric, labels ...LabelName) uint64 { - if len(labels) == 0 { - return emptyLabelSignature - } - - sort.Sort(LabelNames(labels)) - - sum := hashNew() - for _, label := range labels { - sum = hashAdd(sum, string(label)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(m[label])) - sum = hashAddByte(sum, SeparatorByte) - } - return sum -} - -// SignatureWithoutLabels works like LabelsToSignature but takes a Metric as -// parameter (rather than a label map) and excludes the labels with any of the -// specified LabelNames from the signature calculation. -func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64 { - if len(m) == 0 { - return emptyLabelSignature - } - - labelNames := make(LabelNames, 0, len(m)) - for labelName := range m { - if _, exclude := labels[labelName]; !exclude { - labelNames = append(labelNames, labelName) - } - } - if len(labelNames) == 0 { - return emptyLabelSignature - } - sort.Sort(labelNames) - - sum := hashNew() - for _, labelName := range labelNames { - sum = hashAdd(sum, string(labelName)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(m[labelName])) - sum = hashAddByte(sum, SeparatorByte) - } - return sum -} diff --git a/vendor/github.com/prometheus/common/model/silence.go b/vendor/github.com/prometheus/common/model/silence.go deleted file mode 100644 index bb99889d..00000000 --- a/vendor/github.com/prometheus/common/model/silence.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2015 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "regexp" - "time" -) - -// Matcher describes a matches the value of a given label. -type Matcher struct { - Name LabelName `json:"name"` - Value string `json:"value"` - IsRegex bool `json:"isRegex"` -} - -func (m *Matcher) UnmarshalJSON(b []byte) error { - type plain Matcher - if err := json.Unmarshal(b, (*plain)(m)); err != nil { - return err - } - - if len(m.Name) == 0 { - return fmt.Errorf("label name in matcher must not be empty") - } - if m.IsRegex { - if _, err := regexp.Compile(m.Value); err != nil { - return err - } - } - return nil -} - -// Validate returns true iff all fields of the matcher have valid values. -func (m *Matcher) Validate() error { - if !m.Name.IsValid() { - return fmt.Errorf("invalid name %q", m.Name) - } - if m.IsRegex { - if _, err := regexp.Compile(m.Value); err != nil { - return fmt.Errorf("invalid regular expression %q", m.Value) - } - } else if !LabelValue(m.Value).IsValid() || len(m.Value) == 0 { - return fmt.Errorf("invalid value %q", m.Value) - } - return nil -} - -// Silence defines the representation of a silence definition in the Prometheus -// eco-system. -type Silence struct { - ID uint64 `json:"id,omitempty"` - - Matchers []*Matcher `json:"matchers"` - - StartsAt time.Time `json:"startsAt"` - EndsAt time.Time `json:"endsAt"` - - CreatedAt time.Time `json:"createdAt,omitempty"` - CreatedBy string `json:"createdBy"` - Comment string `json:"comment,omitempty"` -} - -// Validate returns true iff all fields of the silence have valid values. -func (s *Silence) Validate() error { - if len(s.Matchers) == 0 { - return fmt.Errorf("at least one matcher required") - } - for _, m := range s.Matchers { - if err := m.Validate(); err != nil { - return fmt.Errorf("invalid matcher: %s", err) - } - } - if s.StartsAt.IsZero() { - return fmt.Errorf("start time missing") - } - if s.EndsAt.IsZero() { - return fmt.Errorf("end time missing") - } - if s.EndsAt.Before(s.StartsAt) { - return fmt.Errorf("start time must be before end time") - } - if s.CreatedBy == "" { - return fmt.Errorf("creator information missing") - } - if s.Comment == "" { - return fmt.Errorf("comment missing") - } - if s.CreatedAt.IsZero() { - return fmt.Errorf("creation timestamp missing") - } - return nil -} diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go deleted file mode 100644 index 5727452c..00000000 --- a/vendor/github.com/prometheus/common/model/time.go +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "strconv" - "strings" - "time" -) - -const ( - // MinimumTick is the minimum supported time resolution. This has to be - // at least time.Second in order for the code below to work. - minimumTick = time.Millisecond - // second is the Time duration equivalent to one second. - second = int64(time.Second / minimumTick) - // The number of nanoseconds per minimum tick. - nanosPerTick = int64(minimumTick / time.Nanosecond) - - // Earliest is the earliest Time representable. Handy for - // initializing a high watermark. - Earliest = Time(math.MinInt64) - // Latest is the latest Time representable. Handy for initializing - // a low watermark. - Latest = Time(math.MaxInt64) -) - -// Time is the number of milliseconds since the epoch -// (1970-01-01 00:00 UTC) excluding leap seconds. -type Time int64 - -// Interval describes an interval between two timestamps. -type Interval struct { - Start, End Time -} - -// Now returns the current time as a Time. -func Now() Time { - return TimeFromUnixNano(time.Now().UnixNano()) -} - -// TimeFromUnix returns the Time equivalent to the Unix Time t -// provided in seconds. -func TimeFromUnix(t int64) Time { - return Time(t * second) -} - -// TimeFromUnixNano returns the Time equivalent to the Unix Time -// t provided in nanoseconds. -func TimeFromUnixNano(t int64) Time { - return Time(t / nanosPerTick) -} - -// Equal reports whether two Times represent the same instant. -func (t Time) Equal(o Time) bool { - return t == o -} - -// Before reports whether the Time t is before o. -func (t Time) Before(o Time) bool { - return t < o -} - -// After reports whether the Time t is after o. -func (t Time) After(o Time) bool { - return t > o -} - -// Add returns the Time t + d. -func (t Time) Add(d time.Duration) Time { - return t + Time(d/minimumTick) -} - -// Sub returns the Duration t - o. -func (t Time) Sub(o Time) time.Duration { - return time.Duration(t-o) * minimumTick -} - -// Time returns the time.Time representation of t. -func (t Time) Time() time.Time { - return time.Unix(int64(t)/second, (int64(t)%second)*nanosPerTick) -} - -// Unix returns t as a Unix time, the number of seconds elapsed -// since January 1, 1970 UTC. -func (t Time) Unix() int64 { - return int64(t) / second -} - -// UnixNano returns t as a Unix time, the number of nanoseconds elapsed -// since January 1, 1970 UTC. -func (t Time) UnixNano() int64 { - return int64(t) * nanosPerTick -} - -// The number of digits after the dot. -var dotPrecision = int(math.Log10(float64(second))) - -// String returns a string representation of the Time. -func (t Time) String() string { - return strconv.FormatFloat(float64(t)/float64(second), 'f', -1, 64) -} - -// MarshalJSON implements the json.Marshaler interface. -func (t Time) MarshalJSON() ([]byte, error) { - return []byte(t.String()), nil -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (t *Time) UnmarshalJSON(b []byte) error { - p := strings.Split(string(b), ".") - switch len(p) { - case 1: - v, err := strconv.ParseInt(string(p[0]), 10, 64) - if err != nil { - return err - } - *t = Time(v * second) - - case 2: - v, err := strconv.ParseInt(string(p[0]), 10, 64) - if err != nil { - return err - } - v *= second - - prec := dotPrecision - len(p[1]) - if prec < 0 { - p[1] = p[1][:dotPrecision] - } else if prec > 0 { - p[1] = p[1] + strings.Repeat("0", prec) - } - - va, err := strconv.ParseInt(p[1], 10, 32) - if err != nil { - return err - } - - // If the value was something like -0.1 the negative is lost in the - // parsing because of the leading zero, this ensures that we capture it. - if len(p[0]) > 0 && p[0][0] == '-' && v+va > 0 { - *t = Time(v+va) * -1 - } else { - *t = Time(v + va) - } - - default: - return fmt.Errorf("invalid time %q", string(b)) - } - return nil -} - -// Duration wraps time.Duration. It is used to parse the custom duration format -// from YAML. -// This type should not propagate beyond the scope of input/output processing. -type Duration time.Duration - -// Set implements pflag/flag.Value -func (d *Duration) Set(s string) error { - var err error - *d, err = ParseDuration(s) - return err -} - -// Type implements pflag.Value -func (d *Duration) Type() string { - return "duration" -} - -func isdigit(c byte) bool { return c >= '0' && c <= '9' } - -// Units are required to go in order from biggest to smallest. -// This guards against confusion from "1m1d" being 1 minute + 1 day, not 1 month + 1 day. -var unitMap = map[string]struct { - pos int - mult uint64 -}{ - "ms": {7, uint64(time.Millisecond)}, - "s": {6, uint64(time.Second)}, - "m": {5, uint64(time.Minute)}, - "h": {4, uint64(time.Hour)}, - "d": {3, uint64(24 * time.Hour)}, - "w": {2, uint64(7 * 24 * time.Hour)}, - "y": {1, uint64(365 * 24 * time.Hour)}, -} - -// ParseDuration parses a string into a time.Duration, assuming that a year -// always has 365d, a week always has 7d, and a day always has 24h. -func ParseDuration(s string) (Duration, error) { - switch s { - case "0": - // Allow 0 without a unit. - return 0, nil - case "": - return 0, errors.New("empty duration string") - } - - orig := s - var dur uint64 - lastUnitPos := 0 - - for s != "" { - if !isdigit(s[0]) { - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - // Consume [0-9]* - i := 0 - for ; i < len(s) && isdigit(s[i]); i++ { - } - v, err := strconv.ParseUint(s[:i], 10, 0) - if err != nil { - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - s = s[i:] - - // Consume unit. - for i = 0; i < len(s) && !isdigit(s[i]); i++ { - } - if i == 0 { - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - u := s[:i] - s = s[i:] - unit, ok := unitMap[u] - if !ok { - return 0, fmt.Errorf("unknown unit %q in duration %q", u, orig) - } - if unit.pos <= lastUnitPos { // Units must go in order from biggest to smallest. - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - lastUnitPos = unit.pos - // Check if the provided duration overflows time.Duration (> ~ 290years). - if v > 1<<63/unit.mult { - return 0, errors.New("duration out of range") - } - dur += v * unit.mult - if dur > 1<<63-1 { - return 0, errors.New("duration out of range") - } - } - return Duration(dur), nil -} - -func (d Duration) String() string { - var ( - ms = int64(time.Duration(d) / time.Millisecond) - r = "" - ) - if ms == 0 { - return "0s" - } - - f := func(unit string, mult int64, exact bool) { - if exact && ms%mult != 0 { - return - } - if v := ms / mult; v > 0 { - r += fmt.Sprintf("%d%s", v, unit) - ms -= v * mult - } - } - - // Only format years and weeks if the remainder is zero, as it is often - // easier to read 90d than 12w6d. - f("y", 1000*60*60*24*365, true) - f("w", 1000*60*60*24*7, true) - - f("d", 1000*60*60*24, false) - f("h", 1000*60*60, false) - f("m", 1000*60, false) - f("s", 1000, false) - f("ms", 1, false) - - return r -} - -// MarshalJSON implements the json.Marshaler interface. -func (d Duration) MarshalJSON() ([]byte, error) { - return json.Marshal(d.String()) -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (d *Duration) UnmarshalJSON(bytes []byte) error { - var s string - if err := json.Unmarshal(bytes, &s); err != nil { - return err - } - dur, err := ParseDuration(s) - if err != nil { - return err - } - *d = dur - return nil -} - -// MarshalText implements the encoding.TextMarshaler interface. -func (d *Duration) MarshalText() ([]byte, error) { - return []byte(d.String()), nil -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (d *Duration) UnmarshalText(text []byte) error { - var err error - *d, err = ParseDuration(string(text)) - return err -} - -// MarshalYAML implements the yaml.Marshaler interface. -func (d Duration) MarshalYAML() (interface{}, error) { - return d.String(), nil -} - -// UnmarshalYAML implements the yaml.Unmarshaler interface. -func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error { - var s string - if err := unmarshal(&s); err != nil { - return err - } - dur, err := ParseDuration(s) - if err != nil { - return err - } - *d = dur - return nil -} diff --git a/vendor/github.com/prometheus/common/model/value.go b/vendor/github.com/prometheus/common/model/value.go deleted file mode 100644 index 9eb44041..00000000 --- a/vendor/github.com/prometheus/common/model/value.go +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "sort" - "strconv" - "strings" -) - -var ( - // ZeroSample is the pseudo zero-value of Sample used to signal a - // non-existing sample. It is a Sample with timestamp Earliest, value 0.0, - // and metric nil. Note that the natural zero value of Sample has a timestamp - // of 0, which is possible to appear in a real Sample and thus not suitable - // to signal a non-existing Sample. - ZeroSample = Sample{Timestamp: Earliest} -) - -// Sample is a sample pair associated with a metric. A single sample must either -// define Value or Histogram but not both. Histogram == nil implies the Value -// field is used, otherwise it should be ignored. -type Sample struct { - Metric Metric `json:"metric"` - Value SampleValue `json:"value"` - Timestamp Time `json:"timestamp"` - Histogram *SampleHistogram `json:"histogram"` -} - -// Equal compares first the metrics, then the timestamp, then the value. The -// semantics of value equality is defined by SampleValue.Equal. -func (s *Sample) Equal(o *Sample) bool { - if s == o { - return true - } - - if !s.Metric.Equal(o.Metric) { - return false - } - if !s.Timestamp.Equal(o.Timestamp) { - return false - } - if s.Histogram != nil { - return s.Histogram.Equal(o.Histogram) - } - return s.Value.Equal(o.Value) -} - -func (s Sample) String() string { - if s.Histogram != nil { - return fmt.Sprintf("%s => %s", s.Metric, SampleHistogramPair{ - Timestamp: s.Timestamp, - Histogram: s.Histogram, - }) - } - return fmt.Sprintf("%s => %s", s.Metric, SamplePair{ - Timestamp: s.Timestamp, - Value: s.Value, - }) -} - -// MarshalJSON implements json.Marshaler. -func (s Sample) MarshalJSON() ([]byte, error) { - if s.Histogram != nil { - v := struct { - Metric Metric `json:"metric"` - Histogram SampleHistogramPair `json:"histogram"` - }{ - Metric: s.Metric, - Histogram: SampleHistogramPair{ - Timestamp: s.Timestamp, - Histogram: s.Histogram, - }, - } - return json.Marshal(&v) - } - v := struct { - Metric Metric `json:"metric"` - Value SamplePair `json:"value"` - }{ - Metric: s.Metric, - Value: SamplePair{ - Timestamp: s.Timestamp, - Value: s.Value, - }, - } - return json.Marshal(&v) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *Sample) UnmarshalJSON(b []byte) error { - v := struct { - Metric Metric `json:"metric"` - Value SamplePair `json:"value"` - Histogram SampleHistogramPair `json:"histogram"` - }{ - Metric: s.Metric, - Value: SamplePair{ - Timestamp: s.Timestamp, - Value: s.Value, - }, - Histogram: SampleHistogramPair{ - Timestamp: s.Timestamp, - Histogram: s.Histogram, - }, - } - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - s.Metric = v.Metric - if v.Histogram.Histogram != nil { - s.Timestamp = v.Histogram.Timestamp - s.Histogram = v.Histogram.Histogram - } else { - s.Timestamp = v.Value.Timestamp - s.Value = v.Value.Value - } - - return nil -} - -// Samples is a sortable Sample slice. It implements sort.Interface. -type Samples []*Sample - -func (s Samples) Len() int { - return len(s) -} - -// Less compares first the metrics, then the timestamp. -func (s Samples) Less(i, j int) bool { - switch { - case s[i].Metric.Before(s[j].Metric): - return true - case s[j].Metric.Before(s[i].Metric): - return false - case s[i].Timestamp.Before(s[j].Timestamp): - return true - default: - return false - } -} - -func (s Samples) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Equal compares two sets of samples and returns true if they are equal. -func (s Samples) Equal(o Samples) bool { - if len(s) != len(o) { - return false - } - - for i, sample := range s { - if !sample.Equal(o[i]) { - return false - } - } - return true -} - -// SampleStream is a stream of Values belonging to an attached COWMetric. -type SampleStream struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - Histograms []SampleHistogramPair `json:"histograms"` -} - -func (ss SampleStream) String() string { - valuesLength := len(ss.Values) - vals := make([]string, valuesLength+len(ss.Histograms)) - for i, v := range ss.Values { - vals[i] = v.String() - } - for i, v := range ss.Histograms { - vals[i+valuesLength] = v.String() - } - return fmt.Sprintf("%s =>\n%s", ss.Metric, strings.Join(vals, "\n")) -} - -func (ss SampleStream) MarshalJSON() ([]byte, error) { - if len(ss.Histograms) > 0 && len(ss.Values) > 0 { - v := struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - Histograms []SampleHistogramPair `json:"histograms"` - }{ - Metric: ss.Metric, - Values: ss.Values, - Histograms: ss.Histograms, - } - return json.Marshal(&v) - } else if len(ss.Histograms) > 0 { - v := struct { - Metric Metric `json:"metric"` - Histograms []SampleHistogramPair `json:"histograms"` - }{ - Metric: ss.Metric, - Histograms: ss.Histograms, - } - return json.Marshal(&v) - } else { - v := struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - }{ - Metric: ss.Metric, - Values: ss.Values, - } - return json.Marshal(&v) - } -} - -func (ss *SampleStream) UnmarshalJSON(b []byte) error { - v := struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - Histograms []SampleHistogramPair `json:"histograms"` - }{ - Metric: ss.Metric, - Values: ss.Values, - Histograms: ss.Histograms, - } - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - ss.Metric = v.Metric - ss.Values = v.Values - ss.Histograms = v.Histograms - - return nil -} - -// Scalar is a scalar value evaluated at the set timestamp. -type Scalar struct { - Value SampleValue `json:"value"` - Timestamp Time `json:"timestamp"` -} - -func (s Scalar) String() string { - return fmt.Sprintf("scalar: %v @[%v]", s.Value, s.Timestamp) -} - -// MarshalJSON implements json.Marshaler. -func (s Scalar) MarshalJSON() ([]byte, error) { - v := strconv.FormatFloat(float64(s.Value), 'f', -1, 64) - return json.Marshal([...]interface{}{s.Timestamp, string(v)}) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *Scalar) UnmarshalJSON(b []byte) error { - var f string - v := [...]interface{}{&s.Timestamp, &f} - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - value, err := strconv.ParseFloat(f, 64) - if err != nil { - return fmt.Errorf("error parsing sample value: %s", err) - } - s.Value = SampleValue(value) - return nil -} - -// String is a string value evaluated at the set timestamp. -type String struct { - Value string `json:"value"` - Timestamp Time `json:"timestamp"` -} - -func (s *String) String() string { - return s.Value -} - -// MarshalJSON implements json.Marshaler. -func (s String) MarshalJSON() ([]byte, error) { - return json.Marshal([]interface{}{s.Timestamp, s.Value}) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *String) UnmarshalJSON(b []byte) error { - v := [...]interface{}{&s.Timestamp, &s.Value} - return json.Unmarshal(b, &v) -} - -// Vector is basically only an alias for Samples, but the -// contract is that in a Vector, all Samples have the same timestamp. -type Vector []*Sample - -func (vec Vector) String() string { - entries := make([]string, len(vec)) - for i, s := range vec { - entries[i] = s.String() - } - return strings.Join(entries, "\n") -} - -func (vec Vector) Len() int { return len(vec) } -func (vec Vector) Swap(i, j int) { vec[i], vec[j] = vec[j], vec[i] } - -// Less compares first the metrics, then the timestamp. -func (vec Vector) Less(i, j int) bool { - switch { - case vec[i].Metric.Before(vec[j].Metric): - return true - case vec[j].Metric.Before(vec[i].Metric): - return false - case vec[i].Timestamp.Before(vec[j].Timestamp): - return true - default: - return false - } -} - -// Equal compares two sets of samples and returns true if they are equal. -func (vec Vector) Equal(o Vector) bool { - if len(vec) != len(o) { - return false - } - - for i, sample := range vec { - if !sample.Equal(o[i]) { - return false - } - } - return true -} - -// Matrix is a list of time series. -type Matrix []*SampleStream - -func (m Matrix) Len() int { return len(m) } -func (m Matrix) Less(i, j int) bool { return m[i].Metric.Before(m[j].Metric) } -func (m Matrix) Swap(i, j int) { m[i], m[j] = m[j], m[i] } - -func (mat Matrix) String() string { - matCp := make(Matrix, len(mat)) - copy(matCp, mat) - sort.Sort(matCp) - - strs := make([]string, len(matCp)) - - for i, ss := range matCp { - strs[i] = ss.String() - } - - return strings.Join(strs, "\n") -} diff --git a/vendor/github.com/prometheus/common/model/value_float.go b/vendor/github.com/prometheus/common/model/value_float.go deleted file mode 100644 index 0f615a70..00000000 --- a/vendor/github.com/prometheus/common/model/value_float.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "math" - "strconv" -) - -var ( - // ZeroSamplePair is the pseudo zero-value of SamplePair used to signal a - // non-existing sample pair. It is a SamplePair with timestamp Earliest and - // value 0.0. Note that the natural zero value of SamplePair has a timestamp - // of 0, which is possible to appear in a real SamplePair and thus not - // suitable to signal a non-existing SamplePair. - ZeroSamplePair = SamplePair{Timestamp: Earliest} -) - -// A SampleValue is a representation of a value for a given sample at a given -// time. -type SampleValue float64 - -// MarshalJSON implements json.Marshaler. -func (v SampleValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (v *SampleValue) UnmarshalJSON(b []byte) error { - if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { - return fmt.Errorf("sample value must be a quoted string") - } - f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) - if err != nil { - return err - } - *v = SampleValue(f) - return nil -} - -// Equal returns true if the value of v and o is equal or if both are NaN. Note -// that v==o is false if both are NaN. If you want the conventional float -// behavior, use == to compare two SampleValues. -func (v SampleValue) Equal(o SampleValue) bool { - if v == o { - return true - } - return math.IsNaN(float64(v)) && math.IsNaN(float64(o)) -} - -func (v SampleValue) String() string { - return strconv.FormatFloat(float64(v), 'f', -1, 64) -} - -// SamplePair pairs a SampleValue with a Timestamp. -type SamplePair struct { - Timestamp Time - Value SampleValue -} - -func (s SamplePair) MarshalJSON() ([]byte, error) { - t, err := json.Marshal(s.Timestamp) - if err != nil { - return nil, err - } - v, err := json.Marshal(s.Value) - if err != nil { - return nil, err - } - return []byte(fmt.Sprintf("[%s,%s]", t, v)), nil -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *SamplePair) UnmarshalJSON(b []byte) error { - v := [...]json.Unmarshaler{&s.Timestamp, &s.Value} - return json.Unmarshal(b, &v) -} - -// Equal returns true if this SamplePair and o have equal Values and equal -// Timestamps. The semantics of Value equality is defined by SampleValue.Equal. -func (s *SamplePair) Equal(o *SamplePair) bool { - return s == o || (s.Value.Equal(o.Value) && s.Timestamp.Equal(o.Timestamp)) -} - -func (s SamplePair) String() string { - return fmt.Sprintf("%s @[%s]", s.Value, s.Timestamp) -} diff --git a/vendor/github.com/prometheus/common/model/value_histogram.go b/vendor/github.com/prometheus/common/model/value_histogram.go deleted file mode 100644 index 54bb038c..00000000 --- a/vendor/github.com/prometheus/common/model/value_histogram.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "strconv" - "strings" -) - -type FloatString float64 - -func (v FloatString) String() string { - return strconv.FormatFloat(float64(v), 'f', -1, 64) -} - -func (v FloatString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -func (v *FloatString) UnmarshalJSON(b []byte) error { - if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { - return fmt.Errorf("float value must be a quoted string") - } - f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) - if err != nil { - return err - } - *v = FloatString(f) - return nil -} - -type HistogramBucket struct { - Boundaries int32 - Lower FloatString - Upper FloatString - Count FloatString -} - -func (s HistogramBucket) MarshalJSON() ([]byte, error) { - b, err := json.Marshal(s.Boundaries) - if err != nil { - return nil, err - } - l, err := json.Marshal(s.Lower) - if err != nil { - return nil, err - } - u, err := json.Marshal(s.Upper) - if err != nil { - return nil, err - } - c, err := json.Marshal(s.Count) - if err != nil { - return nil, err - } - return []byte(fmt.Sprintf("[%s,%s,%s,%s]", b, l, u, c)), nil -} - -func (s *HistogramBucket) UnmarshalJSON(buf []byte) error { - tmp := []interface{}{&s.Boundaries, &s.Lower, &s.Upper, &s.Count} - wantLen := len(tmp) - if err := json.Unmarshal(buf, &tmp); err != nil { - return err - } - if gotLen := len(tmp); gotLen != wantLen { - return fmt.Errorf("wrong number of fields: %d != %d", gotLen, wantLen) - } - return nil -} - -func (s *HistogramBucket) Equal(o *HistogramBucket) bool { - return s == o || (s.Boundaries == o.Boundaries && s.Lower == o.Lower && s.Upper == o.Upper && s.Count == o.Count) -} - -func (b HistogramBucket) String() string { - var sb strings.Builder - lowerInclusive := b.Boundaries == 1 || b.Boundaries == 3 - upperInclusive := b.Boundaries == 0 || b.Boundaries == 3 - if lowerInclusive { - sb.WriteRune('[') - } else { - sb.WriteRune('(') - } - fmt.Fprintf(&sb, "%g,%g", b.Lower, b.Upper) - if upperInclusive { - sb.WriteRune(']') - } else { - sb.WriteRune(')') - } - fmt.Fprintf(&sb, ":%v", b.Count) - return sb.String() -} - -type HistogramBuckets []*HistogramBucket - -func (s HistogramBuckets) Equal(o HistogramBuckets) bool { - if len(s) != len(o) { - return false - } - - for i, bucket := range s { - if !bucket.Equal(o[i]) { - return false - } - } - return true -} - -type SampleHistogram struct { - Count FloatString `json:"count"` - Sum FloatString `json:"sum"` - Buckets HistogramBuckets `json:"buckets"` -} - -func (s SampleHistogram) String() string { - return fmt.Sprintf("Count: %f, Sum: %f, Buckets: %v", s.Count, s.Sum, s.Buckets) -} - -func (s *SampleHistogram) Equal(o *SampleHistogram) bool { - return s == o || (s.Count == o.Count && s.Sum == o.Sum && s.Buckets.Equal(o.Buckets)) -} - -type SampleHistogramPair struct { - Timestamp Time - // Histogram should never be nil, it's only stored as pointer for efficiency. - Histogram *SampleHistogram -} - -func (s SampleHistogramPair) MarshalJSON() ([]byte, error) { - if s.Histogram == nil { - return nil, fmt.Errorf("histogram is nil") - } - t, err := json.Marshal(s.Timestamp) - if err != nil { - return nil, err - } - v, err := json.Marshal(s.Histogram) - if err != nil { - return nil, err - } - return []byte(fmt.Sprintf("[%s,%s]", t, v)), nil -} - -func (s *SampleHistogramPair) UnmarshalJSON(buf []byte) error { - tmp := []interface{}{&s.Timestamp, &s.Histogram} - wantLen := len(tmp) - if err := json.Unmarshal(buf, &tmp); err != nil { - return err - } - if gotLen := len(tmp); gotLen != wantLen { - return fmt.Errorf("wrong number of fields: %d != %d", gotLen, wantLen) - } - if s.Histogram == nil { - return fmt.Errorf("histogram is null") - } - return nil -} - -func (s SampleHistogramPair) String() string { - return fmt.Sprintf("%s @[%s]", s.Histogram, s.Timestamp) -} - -func (s *SampleHistogramPair) Equal(o *SampleHistogramPair) bool { - return s == o || (s.Histogram.Equal(o.Histogram) && s.Timestamp.Equal(o.Timestamp)) -} diff --git a/vendor/github.com/prometheus/common/model/value_type.go b/vendor/github.com/prometheus/common/model/value_type.go deleted file mode 100644 index 726c50ee..00000000 --- a/vendor/github.com/prometheus/common/model/value_type.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" -) - -// Value is a generic interface for values resulting from a query evaluation. -type Value interface { - Type() ValueType - String() string -} - -func (Matrix) Type() ValueType { return ValMatrix } -func (Vector) Type() ValueType { return ValVector } -func (*Scalar) Type() ValueType { return ValScalar } -func (*String) Type() ValueType { return ValString } - -type ValueType int - -const ( - ValNone ValueType = iota - ValScalar - ValVector - ValMatrix - ValString -) - -// MarshalJSON implements json.Marshaler. -func (et ValueType) MarshalJSON() ([]byte, error) { - return json.Marshal(et.String()) -} - -func (et *ValueType) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - switch s { - case "": - *et = ValNone - case "scalar": - *et = ValScalar - case "vector": - *et = ValVector - case "matrix": - *et = ValMatrix - case "string": - *et = ValString - default: - return fmt.Errorf("unknown value type %q", s) - } - return nil -} - -func (e ValueType) String() string { - switch e { - case ValNone: - return "" - case ValScalar: - return "scalar" - case ValVector: - return "vector" - case ValMatrix: - return "matrix" - case ValString: - return "string" - } - panic("ValueType.String: unhandled value type") -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/LICENSE b/vendor/github.com/rhysd/go-github-selfupdate/LICENSE deleted file mode 100644 index 540fd4ed..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -the MIT License - -Copyright (c) 2017 rhysd - -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/rhysd/go-github-selfupdate/selfupdate/detect.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/detect.go deleted file mode 100644 index 6ca1af7f..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/detect.go +++ /dev/null @@ -1,206 +0,0 @@ -package selfupdate - -import ( - "fmt" - "regexp" - "runtime" - "strings" - - "github.com/blang/semver" - "github.com/google/go-github/v30/github" -) - -var reVersion = regexp.MustCompile(`\d+\.\d+\.\d+`) - -func findAssetFromRelease(rel *github.RepositoryRelease, - suffixes []string, targetVersion string, filters []*regexp.Regexp) (*github.ReleaseAsset, semver.Version, bool) { - - if targetVersion != "" && targetVersion != rel.GetTagName() { - log.Println("Skip", rel.GetTagName(), "not matching to specified version", targetVersion) - return nil, semver.Version{}, false - } - - if targetVersion == "" && rel.GetDraft() { - log.Println("Skip draft version", rel.GetTagName()) - return nil, semver.Version{}, false - } - if targetVersion == "" && rel.GetPrerelease() { - log.Println("Skip pre-release version", rel.GetTagName()) - return nil, semver.Version{}, false - } - - verText := rel.GetTagName() - indices := reVersion.FindStringIndex(verText) - if indices == nil { - log.Println("Skip version not adopting semver", verText) - return nil, semver.Version{}, false - } - if indices[0] > 0 { - log.Println("Strip prefix of version", verText[:indices[0]], "from", verText) - verText = verText[indices[0]:] - } - - // If semver cannot parse the version text, it means that the text is not adopting - // the semantic versioning. So it should be skipped. - ver, err := semver.Make(verText) - if err != nil { - log.Println("Failed to parse a semantic version", verText) - return nil, semver.Version{}, false - } - - for _, asset := range rel.Assets { - name := asset.GetName() - if len(filters) > 0 { - // if some filters are defined, match them: if any one matches, the asset is selected - matched := false - for _, filter := range filters { - if filter.MatchString(name) { - log.Println("Selected filtered asset", name) - matched = true - break - } - log.Printf("Skipping asset %q not matching filter %v\n", name, filter) - } - if !matched { - continue - } - } - - for _, s := range suffixes { - if strings.HasSuffix(name, s) { // require version, arch etc - // default: assume single artifact - return asset, ver, true - } - } - } - - log.Println("No suitable asset was found in release", rel.GetTagName()) - return nil, semver.Version{}, false -} - -func findValidationAsset(rel *github.RepositoryRelease, validationName string) (*github.ReleaseAsset, bool) { - for _, asset := range rel.Assets { - if asset.GetName() == validationName { - return asset, true - } - } - return nil, false -} - -func findReleaseAndAsset(rels []*github.RepositoryRelease, - targetVersion string, - filters []*regexp.Regexp) (*github.RepositoryRelease, *github.ReleaseAsset, semver.Version, bool) { - // Generate candidates - suffixes := make([]string, 0, 2*7*2) - for _, sep := range []rune{'_', '-'} { - for _, ext := range []string{".zip", ".tar.gz", ".tgz", ".gzip", ".gz", ".tar.xz", ".xz", ""} { - suffix := fmt.Sprintf("%s%c%s%s", runtime.GOOS, sep, runtime.GOARCH, ext) - suffixes = append(suffixes, suffix) - if runtime.GOOS == "windows" { - suffix = fmt.Sprintf("%s%c%s.exe%s", runtime.GOOS, sep, runtime.GOARCH, ext) - suffixes = append(suffixes, suffix) - } - } - } - - var ver semver.Version - var asset *github.ReleaseAsset - var release *github.RepositoryRelease - - // Find the latest version from the list of releases. - // Returned list from GitHub API is in the order of the date when created. - // ref: https://github.com/rhysd/go-github-selfupdate/issues/11 - for _, rel := range rels { - if a, v, ok := findAssetFromRelease(rel, suffixes, targetVersion, filters); ok { - // Note: any version with suffix is less than any version without suffix. - // e.g. 0.0.1 > 0.0.1-beta - if release == nil || v.GTE(ver) { - ver = v - asset = a - release = rel - } - } - } - - if release == nil { - log.Println("Could not find any release for", runtime.GOOS, "and", runtime.GOARCH) - return nil, nil, semver.Version{}, false - } - - return release, asset, ver, true -} - -// DetectLatest tries to get the latest version of the repository on GitHub. 'slug' means 'owner/name' formatted string. -// It fetches releases information from GitHub API and find out the latest release with matching the tag names and asset names. -// Drafts and pre-releases are ignored. Assets would be suffixed by the OS name and the arch name such as 'foo_linux_amd64' -// where 'foo' is a command name. '-' can also be used as a separator. File can be compressed with zip, gzip, zxip, tar&zip or tar&zxip. -// So the asset can have a file extension for the corresponding compression format such as '.zip'. -// On Windows, '.exe' also can be contained such as 'foo_windows_amd64.exe.zip'. -func (up *Updater) DetectLatest(slug string) (release *Release, found bool, err error) { - return up.DetectVersion(slug, "") -} - -// DetectVersion tries to get the given version of the repository on Github. `slug` means `owner/name` formatted string. -// And version indicates the required version. -func (up *Updater) DetectVersion(slug string, version string) (release *Release, found bool, err error) { - repo := strings.Split(slug, "/") - if len(repo) != 2 || repo[0] == "" || repo[1] == "" { - return nil, false, fmt.Errorf("Invalid slug format. It should be 'owner/name': %s", slug) - } - - rels, res, err := up.api.Repositories.ListReleases(up.apiCtx, repo[0], repo[1], nil) - if err != nil { - log.Println("API returned an error response:", err) - if res != nil && res.StatusCode == 404 { - // 404 means repository not found or release not found. It's not an error here. - err = nil - log.Println("API returned 404. Repository or release not found") - } - return nil, false, err - } - - rel, asset, ver, found := findReleaseAndAsset(rels, version, up.filters) - if !found { - return nil, false, nil - } - - url := asset.GetBrowserDownloadURL() - log.Println("Successfully fetched the latest release. tag:", rel.GetTagName(), ", name:", rel.GetName(), ", URL:", rel.GetURL(), ", Asset:", url) - - publishedAt := rel.GetPublishedAt().Time - release = &Release{ - ver, - url, - asset.GetSize(), - asset.GetID(), - -1, - rel.GetHTMLURL(), - rel.GetBody(), - rel.GetName(), - &publishedAt, - repo[0], - repo[1], - } - - if up.validator != nil { - validationName := asset.GetName() + up.validator.Suffix() - validationAsset, ok := findValidationAsset(rel, validationName) - if !ok { - return nil, false, fmt.Errorf("Failed finding validation file %q", validationName) - } - release.ValidationAssetID = validationAsset.GetID() - } - - return release, true, nil -} - -// DetectLatest detects the latest release of the slug (owner/repo). -// This function is a shortcut version of updater.DetectLatest() method. -func DetectLatest(slug string) (*Release, bool, error) { - return DefaultUpdater().DetectLatest(slug) -} - -// DetectVersion detects the given release of the slug (owner/repo) from its version. -func DetectVersion(slug string, version string) (*Release, bool, error) { - return DefaultUpdater().DetectVersion(slug, version) -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/doc.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/doc.go deleted file mode 100644 index 38fc167c..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/doc.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Package selfupdate provides self-update mechanism to Go command line tools. - -Go does not provide the way to install/update the stable version of tools. By default, Go command line tools are updated - -- using `go get -u` (updating to HEAD) -- using system's package manager (depending on the platform) -- downloading executables from GitHub release page manually - -By using this library, you will get 4th choice: - -- from your command line tool directly (and automatically) - -go-github-selfupdate detects the information of the latest release via GitHub Releases API and check the current version. -If newer version than itself is detected, it downloads released binary from GitHub and replaces itself. - -- Automatically detects the latest version of released binary on GitHub -- Retrieve the proper binary for the OS and arch where the binary is running -- Update the binary with rollback support on failure -- Tested on Linux, macOS and Windows -- Many archive and compression formats are supported (zip, gzip, xzip, tar) - -There are some naming rules. Please read following links. - -Naming Rules of Released Binaries: - https://github.com/rhysd/go-github-selfupdate#naming-rules-of-released-binaries - -Naming Rules of Git Tags: - https://github.com/rhysd/go-github-selfupdate#naming-rules-of-git-tags - -This package is hosted on GitHub: - https://github.com/rhysd/go-github-selfupdate - -Small CLI tools as wrapper of this library are available also: - https://github.com/rhysd/go-github-selfupdate/cmd/detect-latest-release - https://github.com/rhysd/go-github-selfupdate/cmd/go-get-release -*/ -package selfupdate diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/log.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/log.go deleted file mode 100644 index 7c5e7ac4..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/log.go +++ /dev/null @@ -1,30 +0,0 @@ -package selfupdate - -import ( - "io/ioutil" - stdlog "log" - "os" -) - -var log = stdlog.New(ioutil.Discard, "", 0) -var logEnabled = false - -// EnableLog enables to output logging messages in library -func EnableLog() { - if logEnabled { - return - } - logEnabled = true - log.SetOutput(os.Stderr) - log.SetFlags(stdlog.Ltime) -} - -// DisableLog disables to output logging messages in library -func DisableLog() { - if !logEnabled { - return - } - logEnabled = false - log.SetOutput(ioutil.Discard) - log.SetFlags(0) -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/release.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/release.go deleted file mode 100644 index 014ac477..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/release.go +++ /dev/null @@ -1,33 +0,0 @@ -package selfupdate - -import ( - "time" - - "github.com/blang/semver" -) - -// Release represents a release asset for current OS and arch. -type Release struct { - // Version is the version of the release - Version semver.Version - // AssetURL is a URL to the uploaded file for the release - AssetURL string - // AssetSize represents the size of asset in bytes - AssetByteSize int - // AssetID is the ID of the asset on GitHub - AssetID int64 - // ValidationAssetID is the ID of additional validaton asset on GitHub - ValidationAssetID int64 - // URL is a URL to release page for browsing - URL string - // ReleaseNotes is a release notes of the release - ReleaseNotes string - // Name represents a name of the release - Name string - // PublishedAt is the time when the release was published - PublishedAt *time.Time - // RepoOwner is the owner of the repository of the release - RepoOwner string - // RepoName is the name of the repository of the release - RepoName string -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/uncompress.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/uncompress.go deleted file mode 100644 index 0449ec97..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/uncompress.go +++ /dev/null @@ -1,136 +0,0 @@ -package selfupdate - -import ( - "archive/tar" - "archive/zip" - "bytes" - "compress/gzip" - "fmt" - "github.com/ulikunitz/xz" - "io" - "io/ioutil" - "path/filepath" - "runtime" - "strings" -) - -func matchExecutableName(cmd, target string) bool { - if cmd == target { - return true - } - - o, a := runtime.GOOS, runtime.GOARCH - - // When the contained executable name is full name (e.g. foo_darwin_amd64), - // it is also regarded as a target executable file. (#19) - for _, d := range []rune{'_', '-'} { - c := fmt.Sprintf("%s%c%s%c%s", cmd, d, o, d, a) - if o == "windows" { - c += ".exe" - } - if c == target { - return true - } - } - - return false -} - -func unarchiveTar(src io.Reader, url, cmd string) (io.Reader, error) { - t := tar.NewReader(src) - for { - h, err := t.Next() - if err == io.EOF { - break - } - if err != nil { - return nil, fmt.Errorf("Failed to unarchive .tar file: %s", err) - } - _, name := filepath.Split(h.Name) - if matchExecutableName(cmd, name) { - log.Println("Executable file", h.Name, "was found in tar archive") - return t, nil - } - } - - return nil, fmt.Errorf("File '%s' for the command is not found in %s", cmd, url) -} - -// UncompressCommand uncompresses the given source. Archive and compression format is -// automatically detected from 'url' parameter, which represents the URL of asset. -// This returns a reader for the uncompressed command given by 'cmd'. '.zip', -// '.tar.gz', '.tar.xz', '.tgz', '.gz' and '.xz' are supported. -func UncompressCommand(src io.Reader, url, cmd string) (io.Reader, error) { - if strings.HasSuffix(url, ".zip") { - log.Println("Uncompressing zip file", url) - - // Zip format requires its file size for uncompressing. - // So we need to read the HTTP response into a buffer at first. - buf, err := ioutil.ReadAll(src) - if err != nil { - return nil, fmt.Errorf("Failed to create buffer for zip file: %s", err) - } - - r := bytes.NewReader(buf) - z, err := zip.NewReader(r, r.Size()) - if err != nil { - return nil, fmt.Errorf("Failed to uncompress zip file: %s", err) - } - - for _, file := range z.File { - _, name := filepath.Split(file.Name) - if !file.FileInfo().IsDir() && matchExecutableName(cmd, name) { - log.Println("Executable file", file.Name, "was found in zip archive") - return file.Open() - } - } - - return nil, fmt.Errorf("File '%s' for the command is not found in %s", cmd, url) - } else if strings.HasSuffix(url, ".tar.gz") || strings.HasSuffix(url, ".tgz") { - log.Println("Uncompressing tar.gz file", url) - - gz, err := gzip.NewReader(src) - if err != nil { - return nil, fmt.Errorf("Failed to uncompress .tar.gz file: %s", err) - } - - return unarchiveTar(gz, url, cmd) - } else if strings.HasSuffix(url, ".gzip") || strings.HasSuffix(url, ".gz") { - log.Println("Uncompressing gzip file", url) - - r, err := gzip.NewReader(src) - if err != nil { - return nil, fmt.Errorf("Failed to uncompress gzip file downloaded from %s: %s", url, err) - } - - name := r.Header.Name - if !matchExecutableName(cmd, name) { - return nil, fmt.Errorf("File name '%s' does not match to command '%s' found in %s", name, cmd, url) - } - - log.Println("Executable file", name, "was found in gzip file") - return r, nil - } else if strings.HasSuffix(url, ".tar.xz") { - log.Println("Uncompressing tar.xz file", url) - - xzip, err := xz.NewReader(src) - if err != nil { - return nil, fmt.Errorf("Failed to uncompress .tar.xz file: %s", err) - } - - return unarchiveTar(xzip, url, cmd) - } else if strings.HasSuffix(url, ".xz") { - log.Println("Uncompressing xzip file", url) - - xzip, err := xz.NewReader(src) - if err != nil { - return nil, fmt.Errorf("Failed to uncompress xzip file downloaded from %s: %s", url, err) - } - - log.Println("Uncompressed file from xzip is assumed to be an executable", cmd) - return xzip, nil - } - - log.Println("Uncompression is not needed", url) - return src, nil -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/update.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/update.go deleted file mode 100644 index 1ae0d7d5..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/update.go +++ /dev/null @@ -1,181 +0,0 @@ -package selfupdate - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "net/http" - "os" - "path/filepath" - "runtime" - "strings" - - "github.com/blang/semver" - "github.com/inconshreveable/go-update" -) - -func uncompressAndUpdate(src io.Reader, assetURL, cmdPath string) error { - _, cmd := filepath.Split(cmdPath) - asset, err := UncompressCommand(src, assetURL, cmd) - if err != nil { - return err - } - - log.Println("Will update", cmdPath, "to the latest downloaded from", assetURL) - return update.Apply(asset, update.Options{ - TargetPath: cmdPath, - }) -} - -func (up *Updater) downloadDirectlyFromURL(assetURL string) (io.ReadCloser, error) { - req, err := http.NewRequest("GET", assetURL, nil) - if err != nil { - return nil, fmt.Errorf("Failed to create HTTP request to %s: %s", assetURL, err) - } - - req.Header.Add("Accept", "application/octet-stream") - req = req.WithContext(up.apiCtx) - - // OAuth HTTP client is not available to download blob from URL when the URL is a redirect URL - // returned from GitHub Releases API (response status 400). - // Use default HTTP client instead. - res, err := http.DefaultClient.Do(req) - if err != nil { - return nil, fmt.Errorf("Failed to download a release file from %s: %s", assetURL, err) - } - - if res.StatusCode != 200 { - return nil, fmt.Errorf("Failed to download a release file from %s: Not successful status %d", assetURL, res.StatusCode) - } - - return res.Body, nil -} - -// UpdateTo downloads an executable from GitHub Releases API and replace current binary with the downloaded one. -// It downloads a release asset via GitHub Releases API so this function is available for update releases on private repository. -// If a redirect occurs, it fallbacks into directly downloading from the redirect URL. -func (up *Updater) UpdateTo(rel *Release, cmdPath string) error { - var client http.Client - src, redirectURL, err := up.api.Repositories.DownloadReleaseAsset(up.apiCtx, rel.RepoOwner, rel.RepoName, rel.AssetID, &client) - if err != nil { - return fmt.Errorf("Failed to call GitHub Releases API for getting an asset(ID: %d) for repository '%s/%s': %s", rel.AssetID, rel.RepoOwner, rel.RepoName, err) - } - if redirectURL != "" { - log.Println("Redirect URL was returned while trying to download a release asset from GitHub API. Falling back to downloading from asset URL directly:", redirectURL) - src, err = up.downloadDirectlyFromURL(redirectURL) - if err != nil { - return err - } - } - defer src.Close() - - data, err := ioutil.ReadAll(src) - if err != nil { - return fmt.Errorf("Failed reading asset body: %v", err) - } - - if up.validator == nil { - return uncompressAndUpdate(bytes.NewReader(data), rel.AssetURL, cmdPath) - } - - validationSrc, validationRedirectURL, err := up.api.Repositories.DownloadReleaseAsset(up.apiCtx, rel.RepoOwner, rel.RepoName, rel.ValidationAssetID, &client) - if err != nil { - return fmt.Errorf("Failed to call GitHub Releases API for getting an validation asset(ID: %d) for repository '%s/%s': %s", rel.ValidationAssetID, rel.RepoOwner, rel.RepoName, err) - } - if validationRedirectURL != "" { - log.Println("Redirect URL was returned while trying to download a release validation asset from GitHub API. Falling back to downloading from asset URL directly:", redirectURL) - validationSrc, err = up.downloadDirectlyFromURL(validationRedirectURL) - if err != nil { - return err - } - } - - defer validationSrc.Close() - - validationData, err := ioutil.ReadAll(validationSrc) - if err != nil { - return fmt.Errorf("Failed reading validation asset body: %v", err) - } - - if err := up.validator.Validate(data, validationData); err != nil { - return fmt.Errorf("Failed validating asset content: %v", err) - } - - return uncompressAndUpdate(bytes.NewReader(data), rel.AssetURL, cmdPath) -} - -// UpdateCommand updates a given command binary to the latest version. -// 'slug' represents 'owner/name' repository on GitHub and 'current' means the current version. -func (up *Updater) UpdateCommand(cmdPath string, current semver.Version, slug string) (*Release, error) { - if runtime.GOOS == "windows" && !strings.HasSuffix(cmdPath, ".exe") { - // Ensure to add '.exe' to given path on Windows - cmdPath = cmdPath + ".exe" - } - - stat, err := os.Lstat(cmdPath) - if err != nil { - return nil, fmt.Errorf("Failed to stat '%s'. File may not exist: %s", cmdPath, err) - } - if stat.Mode()&os.ModeSymlink != 0 { - p, err := filepath.EvalSymlinks(cmdPath) - if err != nil { - return nil, fmt.Errorf("Failed to resolve symlink '%s' for executable: %s", cmdPath, err) - } - cmdPath = p - } - - rel, ok, err := up.DetectLatest(slug) - if err != nil { - return nil, err - } - if !ok { - log.Println("No release detected. Current version is considered up-to-date") - return &Release{Version: current}, nil - } - if current.Equals(rel.Version) { - log.Println("Current version", current, "is the latest. Update is not needed") - return rel, nil - } - log.Println("Will update", cmdPath, "to the latest version", rel.Version) - if err := up.UpdateTo(rel, cmdPath); err != nil { - return nil, err - } - return rel, nil -} - -// UpdateSelf updates the running executable itself to the latest version. -// 'slug' represents 'owner/name' repository on GitHub and 'current' means the current version. -func (up *Updater) UpdateSelf(current semver.Version, slug string) (*Release, error) { - cmdPath, err := os.Executable() - if err != nil { - return nil, err - } - return up.UpdateCommand(cmdPath, current, slug) -} - -// UpdateTo downloads an executable from assetURL and replace the current binary with the downloaded one. -// This function is low-level API to update the binary. Because it does not use GitHub API and downloads asset directly from the URL via HTTP, -// this function is not available to update a release for private repositories. -// cmdPath is a file path to command executable. -func UpdateTo(assetURL, cmdPath string) error { - up := DefaultUpdater() - src, err := up.downloadDirectlyFromURL(assetURL) - if err != nil { - return err - } - defer src.Close() - return uncompressAndUpdate(src, assetURL, cmdPath) -} - -// UpdateCommand updates a given command binary to the latest version. -// This function is a shortcut version of updater.UpdateCommand. -func UpdateCommand(cmdPath string, current semver.Version, slug string) (*Release, error) { - return DefaultUpdater().UpdateCommand(cmdPath, current, slug) -} - -// UpdateSelf updates the running executable itself to the latest version. -// This function is a shortcut version of updater.UpdateSelf. -func UpdateSelf(current semver.Version, slug string) (*Release, error) { - return DefaultUpdater().UpdateSelf(current, slug) -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/updater.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/updater.go deleted file mode 100644 index 32cf5e0b..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/updater.go +++ /dev/null @@ -1,99 +0,0 @@ -package selfupdate - -import ( - "context" - "fmt" - "net/http" - "os" - "regexp" - - "github.com/google/go-github/v30/github" - gitconfig "github.com/tcnksm/go-gitconfig" - "golang.org/x/oauth2" -) - -// Updater is responsible for managing the context of self-update. -// It contains GitHub client and its context. -type Updater struct { - api *github.Client - apiCtx context.Context - validator Validator - filters []*regexp.Regexp -} - -// Config represents the configuration of self-update. -type Config struct { - // APIToken represents GitHub API token. If it's not empty, it will be used for authentication of GitHub API - APIToken string - // EnterpriseBaseURL is a base URL of GitHub API. If you want to use this library with GitHub Enterprise, - // please set "https://{your-organization-address}/api/v3/" to this field. - EnterpriseBaseURL string - // EnterpriseUploadURL is a URL to upload stuffs to GitHub Enterprise instance. This is often the same as an API base URL. - // So if this field is not set and EnterpriseBaseURL is set, EnterpriseBaseURL is also set to this field. - EnterpriseUploadURL string - // Validator represents types which enable additional validation of downloaded release. - Validator Validator - // Filters are regexp used to filter on specific assets for releases with multiple assets. - // An asset is selected if it matches any of those, in addition to the regular tag, os, arch, extensions. - // Please make sure that your filter(s) uniquely match an asset. - Filters []string -} - -func newHTTPClient(ctx context.Context, token string) *http.Client { - if token == "" { - return http.DefaultClient - } - src := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token}) - return oauth2.NewClient(ctx, src) -} - -// NewUpdater creates a new updater instance. It initializes GitHub API client. -// If you set your API token to $GITHUB_TOKEN, the client will use it. -func NewUpdater(config Config) (*Updater, error) { - token := config.APIToken - if token == "" { - token = os.Getenv("GITHUB_TOKEN") - } - if token == "" { - token, _ = gitconfig.GithubToken() - } - ctx := context.Background() - hc := newHTTPClient(ctx, token) - - filtersRe := make([]*regexp.Regexp, 0, len(config.Filters)) - for _, filter := range config.Filters { - re, err := regexp.Compile(filter) - if err != nil { - return nil, fmt.Errorf("Could not compile regular expression %q for filtering releases: %v", filter, err) - } - filtersRe = append(filtersRe, re) - } - - if config.EnterpriseBaseURL == "" { - client := github.NewClient(hc) - return &Updater{api: client, apiCtx: ctx, validator: config.Validator, filters: filtersRe}, nil - } - - u := config.EnterpriseUploadURL - if u == "" { - u = config.EnterpriseBaseURL - } - client, err := github.NewEnterpriseClient(config.EnterpriseBaseURL, u, hc) - if err != nil { - return nil, err - } - return &Updater{api: client, apiCtx: ctx, validator: config.Validator, filters: filtersRe}, nil -} - -// DefaultUpdater creates a new updater instance with default configuration. -// It initializes GitHub API client with default API base URL. -// If you set your API token to $GITHUB_TOKEN, the client will use it. -func DefaultUpdater() *Updater { - token := os.Getenv("GITHUB_TOKEN") - if token == "" { - token, _ = gitconfig.GithubToken() - } - ctx := context.Background() - client := newHTTPClient(ctx, token) - return &Updater{api: github.NewClient(client), apiCtx: ctx} -} diff --git a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/validate.go b/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/validate.go deleted file mode 100644 index 10066aa9..00000000 --- a/vendor/github.com/rhysd/go-github-selfupdate/selfupdate/validate.go +++ /dev/null @@ -1,73 +0,0 @@ -package selfupdate - -import ( - "crypto/ecdsa" - "crypto/sha256" - "encoding/asn1" - "fmt" - "math/big" -) - -// Validator represents an interface which enables additional validation of releases. -type Validator interface { - // Validate validates release bytes against an additional asset bytes. - // See SHA2Validator or ECDSAValidator for more information. - Validate(release, asset []byte) error - // Suffix describes the additional file ending which is used for finding the - // additional asset. - Suffix() string -} - -// SHA2Validator specifies a SHA256 validator for additional file validation -// before updating. -type SHA2Validator struct { -} - -// Validate validates the SHA256 sum of the release against the contents of an -// additional asset file. -func (v *SHA2Validator) Validate(release, asset []byte) error { - calculatedHash := fmt.Sprintf("%x", sha256.Sum256(release)) - hash := fmt.Sprintf("%s", asset[:sha256.BlockSize]) - if calculatedHash != hash { - return fmt.Errorf("sha2: validation failed: hash mismatch: expected=%q, got=%q", calculatedHash, hash) - } - return nil -} - -// Suffix returns the suffix for SHA2 validation. -func (v *SHA2Validator) Suffix() string { - return ".sha256" -} - -// ECDSAValidator specifies a ECDSA validator for additional file validation -// before updating. -type ECDSAValidator struct { - PublicKey *ecdsa.PublicKey -} - -// Validate validates the ECDSA signature the release against the signature -// contained in an additional asset file. -// additional asset file. -func (v *ECDSAValidator) Validate(input, signature []byte) error { - h := sha256.New() - h.Write(input) - - var rs struct { - R *big.Int - S *big.Int - } - if _, err := asn1.Unmarshal(signature, &rs); err != nil { - return fmt.Errorf("failed to unmarshal ecdsa signature: %v", err) - } - - if !ecdsa.Verify(v.PublicKey, h.Sum([]byte{}), rs.R, rs.S) { - return fmt.Errorf("ecdsa: signature verification failed") - } - - return nil -} - -// Suffix returns the suffix for ECDSA validation. -func (v *ECDSAValidator) Suffix() string { - return ".sig" -} diff --git a/vendor/github.com/spf13/cobra/.gitignore b/vendor/github.com/spf13/cobra/.gitignore deleted file mode 100644 index c7b459e4..00000000 --- a/vendor/github.com/spf13/cobra/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -# 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 - -# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore -# swap -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -# session -Session.vim -# temporary -.netrwhist -*~ -# auto-generated tag files -tags - -*.exe -cobra.test -bin - -.idea/ -*.iml diff --git a/vendor/github.com/spf13/cobra/.golangci.yml b/vendor/github.com/spf13/cobra/.golangci.yml deleted file mode 100644 index a618ec24..00000000 --- a/vendor/github.com/spf13/cobra/.golangci.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2013-2023 The Cobra 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. - -run: - deadline: 5m - -linters: - disable-all: true - enable: - #- bodyclose - # - deadcode ! deprecated since v1.49.0; replaced by 'unused' - #- depguard - #- dogsled - #- dupl - - errcheck - #- exhaustive - #- funlen - - gas - #- gochecknoinits - - goconst - #- gocritic - #- gocyclo - #- gofmt - - goimports - - golint - #- gomnd - #- goprintffuncname - #- gosec - #- gosimple - - govet - - ineffassign - - interfacer - #- lll - - maligned - - megacheck - #- misspell - #- nakedret - #- noctx - #- nolintlint - #- rowserrcheck - #- scopelint - #- staticcheck - #- structcheck ! deprecated since v1.49.0; replaced by 'unused' - #- stylecheck - #- typecheck - - unconvert - #- unparam - - unused - # - varcheck ! deprecated since v1.49.0; replaced by 'unused' - #- whitespace - fast: false diff --git a/vendor/github.com/spf13/cobra/.mailmap b/vendor/github.com/spf13/cobra/.mailmap deleted file mode 100644 index 94ec5306..00000000 --- a/vendor/github.com/spf13/cobra/.mailmap +++ /dev/null @@ -1,3 +0,0 @@ -Steve Francia -Bjørn Erik Pedersen -Fabiano Franz diff --git a/vendor/github.com/spf13/cobra/CONDUCT.md b/vendor/github.com/spf13/cobra/CONDUCT.md deleted file mode 100644 index 9d16f88f..00000000 --- a/vendor/github.com/spf13/cobra/CONDUCT.md +++ /dev/null @@ -1,37 +0,0 @@ -## Cobra User Contract - -### Versioning -Cobra will follow a steady release cadence. Non breaking changes will be released as minor versions quarterly. Patch bug releases are at the discretion of the maintainers. Users can expect security patch fixes to be released within relatively short order of a CVE becoming known. For more information on security patch fixes see the CVE section below. Releases will follow [Semantic Versioning](https://semver.org/). Users tracking the Master branch should expect unpredictable breaking changes as the project continues to move forward. For stability, it is highly recommended to use a release. - -### Backward Compatibility -We will maintain two major releases in a moving window. The N-1 release will only receive bug fixes and security updates and will be dropped once N+1 is released. - -### Deprecation -Deprecation of Go versions or dependent packages will only occur in major releases. To reduce the change of this taking users by surprise, any large deprecation will be preceded by an announcement in the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) and an Issue on Github. - -### CVE -Maintainers will make every effort to release security patches in the case of a medium to high severity CVE directly impacting the library. The speed in which these patches reach a release is up to the discretion of the maintainers. A low severity CVE may be a lower priority than a high severity one. - -### Communication -Cobra maintainers will use GitHub issues and the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) as the primary means of communication with the community. This is to foster open communication with all users and contributors. - -### Breaking Changes -Breaking changes are generally allowed in the master branch, as this is the branch used to develop the next release of Cobra. - -There may be times, however, when master is closed for breaking changes. This is likely to happen as we near the release of a new version. - -Breaking changes are not allowed in release branches, as these represent minor versions that have already been released. These version have consumers who expect the APIs, behaviors, etc, to remain stable during the lifetime of the patch stream for the minor release. - -Examples of breaking changes include: -- Removing or renaming exported constant, variable, type, or function. -- Updating the version of critical libraries such as `spf13/pflag`, `spf13/viper` etc... - - Some version updates may be acceptable for picking up bug fixes, but maintainers must exercise caution when reviewing. - -There may, at times, need to be exceptions where breaking changes are allowed in release branches. These are at the discretion of the project's maintainers, and must be carefully considered before merging. - -### CI Testing -Maintainers will ensure the Cobra test suite utilizes the current supported versions of Golang. - -### Disclaimer -Changes to this document and the contents therein are at the discretion of the maintainers. -None of the contents of this document are legally binding in any way to the maintainers or the users. diff --git a/vendor/github.com/spf13/cobra/CONTRIBUTING.md b/vendor/github.com/spf13/cobra/CONTRIBUTING.md deleted file mode 100644 index 6f356e6a..00000000 --- a/vendor/github.com/spf13/cobra/CONTRIBUTING.md +++ /dev/null @@ -1,50 +0,0 @@ -# Contributing to Cobra - -Thank you so much for contributing to Cobra. We appreciate your time and help. -Here are some guidelines to help you get started. - -## Code of Conduct - -Be kind and respectful to the members of the community. Take time to educate -others who are seeking help. Harassment of any kind will not be tolerated. - -## Questions - -If you have questions regarding Cobra, feel free to ask it in the community -[#cobra Slack channel][cobra-slack] - -## Filing a bug or feature - -1. Before filing an issue, please check the existing issues to see if a - similar one was already opened. If there is one already opened, feel free - to comment on it. -1. If you believe you've found a bug, please provide detailed steps of - reproduction, the version of Cobra and anything else you believe will be - useful to help troubleshoot it (e.g. OS environment, environment variables, - etc...). Also state the current behavior vs. the expected behavior. -1. If you'd like to see a feature or an enhancement please open an issue with - a clear title and description of what the feature is and why it would be - beneficial to the project and its users. - -## Submitting changes - -1. CLA: Upon submitting a Pull Request (PR), contributors will be prompted to - sign a CLA. Please sign the CLA :slightly_smiling_face: -1. Tests: If you are submitting code, please ensure you have adequate tests - for the feature. Tests can be run via `go test ./...` or `make test`. -1. Since this is golang project, ensure the new code is properly formatted to - ensure code consistency. Run `make all`. - -### Quick steps to contribute - -1. Fork the project. -1. Download your fork to your PC (`git clone https://github.com/your_username/cobra && cd cobra`) -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Make changes and run tests (`make test`) -1. Add them to staging (`git add .`) -1. Commit your changes (`git commit -m 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new pull request - - -[cobra-slack]: https://gophers.slack.com/archives/CD3LP1199 diff --git a/vendor/github.com/spf13/cobra/LICENSE.txt b/vendor/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e26..00000000 --- a/vendor/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +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. diff --git a/vendor/github.com/spf13/cobra/MAINTAINERS b/vendor/github.com/spf13/cobra/MAINTAINERS deleted file mode 100644 index 4c5ac3dd..00000000 --- a/vendor/github.com/spf13/cobra/MAINTAINERS +++ /dev/null @@ -1,13 +0,0 @@ -maintainers: -- spf13 -- johnSchnake -- jpmcb -- marckhouzam -inactive: -- anthonyfok -- bep -- bogem -- broady -- eparis -- jharshman -- wfernandes diff --git a/vendor/github.com/spf13/cobra/Makefile b/vendor/github.com/spf13/cobra/Makefile deleted file mode 100644 index 0da8d7aa..00000000 --- a/vendor/github.com/spf13/cobra/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -BIN="./bin" -SRC=$(shell find . -name "*.go") - -ifeq (, $(shell which golangci-lint)) -$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh") -endif - -.PHONY: fmt lint test install_deps clean - -default: all - -all: fmt test - -fmt: - $(info ******************** checking formatting ********************) - @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) - -lint: - $(info ******************** running lint tools ********************) - golangci-lint run -v - -test: install_deps - $(info ******************** running tests ********************) - go test -v ./... - -richtest: install_deps - $(info ******************** running tests with kyoh86/richgo ********************) - richgo test -v ./... - -install_deps: - $(info ******************** downloading dependencies ********************) - go get -v ./... - -clean: - rm -rf $(BIN) diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md deleted file mode 100644 index 6444f4b7..00000000 --- a/vendor/github.com/spf13/cobra/README.md +++ /dev/null @@ -1,112 +0,0 @@ -![cobra logo](assets/CobraMain.png) - -Cobra is a library for creating powerful modern CLI applications. - -Cobra is used in many Go projects such as [Kubernetes](https://kubernetes.io/), -[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to -name a few. [This list](site/content/projects_using_cobra.md) contains a more extensive list of projects using Cobra. - -[![](https://img.shields.io/github/actions/workflow/status/spf13/cobra/test.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest) -[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra) -[![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199) - -# Overview - -Cobra is a library providing a simple interface to create powerful modern CLI -interfaces similar to git & go tools. - -Cobra provides: -* Easy subcommand-based CLIs: `app server`, `app fetch`, etc. -* Fully POSIX-compliant flags (including short & long versions) -* Nested subcommands -* Global, local and cascading flags -* Intelligent suggestions (`app srver`... did you mean `app server`?) -* Automatic help generation for commands and flags -* Grouping help for subcommands -* Automatic help flag recognition of `-h`, `--help`, etc. -* Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell) -* Automatically generated man pages for your application -* Command aliases so you can change things without breaking them -* The flexibility to define your own help, usage, etc. -* Optional seamless integration with [viper](https://github.com/spf13/viper) for 12-factor apps - -# Concepts - -Cobra is built on a structure of commands, arguments & flags. - -**Commands** represent actions, **Args** are things and **Flags** are modifiers for those actions. - -The best applications read like sentences when used, and as a result, users -intuitively know how to interact with them. - -The pattern to follow is -`APPNAME VERB NOUN --ADJECTIVE` - or -`APPNAME COMMAND ARG --FLAG`. - -A few good real world examples may better illustrate this point. - -In the following example, 'server' is a command, and 'port' is a flag: - - hugo server --port=1313 - -In this command we are telling Git to clone the url bare. - - git clone URL --bare - -## Commands - -Command is the central point of the application. Each interaction that -the application supports will be contained in a Command. A command can -have children commands and optionally run an action. - -In the example above, 'server' is the command. - -[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command) - -## Flags - -A flag is a way to modify the behavior of a command. Cobra supports -fully POSIX-compliant flags as well as the Go [flag package](https://golang.org/pkg/flag/). -A Cobra command can define flags that persist through to children commands -and flags that are only available to that command. - -In the example above, 'port' is the flag. - -Flag functionality is provided by the [pflag -library](https://github.com/spf13/pflag), a fork of the flag standard library -which maintains the same interface while adding POSIX compliance. - -# Installing -Using Cobra is easy. First, use `go get` to install the latest version -of the library. - -``` -go get -u github.com/spf13/cobra@latest -``` - -Next, include Cobra in your application: - -```go -import "github.com/spf13/cobra" -``` - -# Usage -`cobra-cli` is a command line program to generate cobra applications and command files. -It will bootstrap your application scaffolding to rapidly -develop a Cobra-based application. It is the easiest way to incorporate Cobra into your application. - -It can be installed by running: - -``` -go install github.com/spf13/cobra-cli@latest -``` - -For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md) - -For complete details on using the Cobra library, please read the [The Cobra User Guide](site/content/user_guide.md). - -# License - -Cobra is released under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt) diff --git a/vendor/github.com/spf13/cobra/active_help.go b/vendor/github.com/spf13/cobra/active_help.go deleted file mode 100644 index 5f965e05..00000000 --- a/vendor/github.com/spf13/cobra/active_help.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "fmt" - "os" - "regexp" - "strings" -) - -const ( - activeHelpMarker = "_activeHelp_ " - // The below values should not be changed: programs will be using them explicitly - // in their user documentation, and users will be using them explicitly. - activeHelpEnvVarSuffix = "_ACTIVE_HELP" - activeHelpGlobalEnvVar = "COBRA_ACTIVE_HELP" - activeHelpGlobalDisable = "0" -) - -var activeHelpEnvVarPrefixSubstRegexp = regexp.MustCompile(`[^A-Z0-9_]`) - -// AppendActiveHelp adds the specified string to the specified array to be used as ActiveHelp. -// Such strings will be processed by the completion script and will be shown as ActiveHelp -// to the user. -// The array parameter should be the array that will contain the completions. -// This function can be called multiple times before and/or after completions are added to -// the array. Each time this function is called with the same array, the new -// ActiveHelp line will be shown below the previous ones when completion is triggered. -func AppendActiveHelp(compArray []string, activeHelpStr string) []string { - return append(compArray, fmt.Sprintf("%s%s", activeHelpMarker, activeHelpStr)) -} - -// GetActiveHelpConfig returns the value of the ActiveHelp environment variable -// _ACTIVE_HELP where is the name of the root command in upper -// case, with all non-ASCII-alphanumeric characters replaced by `_`. -// It will always return "0" if the global environment variable COBRA_ACTIVE_HELP -// is set to "0". -func GetActiveHelpConfig(cmd *Command) string { - activeHelpCfg := os.Getenv(activeHelpGlobalEnvVar) - if activeHelpCfg != activeHelpGlobalDisable { - activeHelpCfg = os.Getenv(activeHelpEnvVar(cmd.Root().Name())) - } - return activeHelpCfg -} - -// activeHelpEnvVar returns the name of the program-specific ActiveHelp environment -// variable. It has the format _ACTIVE_HELP where is the name of the -// root command in upper case, with all non-ASCII-alphanumeric characters replaced by `_`. -func activeHelpEnvVar(name string) string { - // This format should not be changed: users will be using it explicitly. - activeHelpEnvVar := strings.ToUpper(fmt.Sprintf("%s%s", name, activeHelpEnvVarSuffix)) - activeHelpEnvVar = activeHelpEnvVarPrefixSubstRegexp.ReplaceAllString(activeHelpEnvVar, "_") - return activeHelpEnvVar -} diff --git a/vendor/github.com/spf13/cobra/args.go b/vendor/github.com/spf13/cobra/args.go deleted file mode 100644 index e79ec33a..00000000 --- a/vendor/github.com/spf13/cobra/args.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "fmt" - "strings" -) - -type PositionalArgs func(cmd *Command, args []string) error - -// legacyArgs validation has the following behaviour: -// - root commands with no subcommands can take arbitrary arguments -// - root commands with subcommands will do subcommand validity checking -// - subcommands will always accept arbitrary arguments -func legacyArgs(cmd *Command, args []string) error { - // no subcommand, always take args - if !cmd.HasSubCommands() { - return nil - } - - // root command with subcommands, do subcommand checking. - if !cmd.HasParent() && len(args) > 0 { - return fmt.Errorf("unknown command %q for %q%s", args[0], cmd.CommandPath(), cmd.findSuggestions(args[0])) - } - return nil -} - -// NoArgs returns an error if any args are included. -func NoArgs(cmd *Command, args []string) error { - if len(args) > 0 { - return fmt.Errorf("unknown command %q for %q", args[0], cmd.CommandPath()) - } - return nil -} - -// OnlyValidArgs returns an error if there are any positional args that are not in -// the `ValidArgs` field of `Command` -func OnlyValidArgs(cmd *Command, args []string) error { - if len(cmd.ValidArgs) > 0 { - // Remove any description that may be included in ValidArgs. - // A description is following a tab character. - var validArgs []string - for _, v := range cmd.ValidArgs { - validArgs = append(validArgs, strings.Split(v, "\t")[0]) - } - for _, v := range args { - if !stringInSlice(v, validArgs) { - return fmt.Errorf("invalid argument %q for %q%s", v, cmd.CommandPath(), cmd.findSuggestions(args[0])) - } - } - } - return nil -} - -// ArbitraryArgs never returns an error. -func ArbitraryArgs(cmd *Command, args []string) error { - return nil -} - -// MinimumNArgs returns an error if there is not at least N args. -func MinimumNArgs(n int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) < n { - return fmt.Errorf("requires at least %d arg(s), only received %d", n, len(args)) - } - return nil - } -} - -// MaximumNArgs returns an error if there are more than N args. -func MaximumNArgs(n int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) > n { - return fmt.Errorf("accepts at most %d arg(s), received %d", n, len(args)) - } - return nil - } -} - -// ExactArgs returns an error if there are not exactly n args. -func ExactArgs(n int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) != n { - return fmt.Errorf("accepts %d arg(s), received %d", n, len(args)) - } - return nil - } -} - -// RangeArgs returns an error if the number of args is not within the expected range. -func RangeArgs(min int, max int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) < min || len(args) > max { - return fmt.Errorf("accepts between %d and %d arg(s), received %d", min, max, len(args)) - } - return nil - } -} - -// MatchAll allows combining several PositionalArgs to work in concert. -func MatchAll(pargs ...PositionalArgs) PositionalArgs { - return func(cmd *Command, args []string) error { - for _, parg := range pargs { - if err := parg(cmd, args); err != nil { - return err - } - } - return nil - } -} - -// ExactValidArgs returns an error if there are not exactly N positional args OR -// there are any positional args that are not in the `ValidArgs` field of `Command` -// -// Deprecated: use MatchAll(ExactArgs(n), OnlyValidArgs) instead -func ExactValidArgs(n int) PositionalArgs { - return MatchAll(ExactArgs(n), OnlyValidArgs) -} diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go deleted file mode 100644 index 8a531518..00000000 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ /dev/null @@ -1,712 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "bytes" - "fmt" - "io" - "os" - "sort" - "strings" - - "github.com/spf13/pflag" -) - -// Annotations for Bash completion. -const ( - BashCompFilenameExt = "cobra_annotation_bash_completion_filename_extensions" - BashCompCustom = "cobra_annotation_bash_completion_custom" - BashCompOneRequiredFlag = "cobra_annotation_bash_completion_one_required_flag" - BashCompSubdirsInDir = "cobra_annotation_bash_completion_subdirs_in_dir" -) - -func writePreamble(buf io.StringWriter, name string) { - WriteStringAndCheck(buf, fmt.Sprintf("# bash completion for %-36s -*- shell-script -*-\n", name)) - WriteStringAndCheck(buf, fmt.Sprintf(` -__%[1]s_debug() -{ - if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then - echo "$*" >> "${BASH_COMP_DEBUG_FILE}" - fi -} - -# Homebrew on Macs have version 1.3 of bash-completion which doesn't include -# _init_completion. This is a very minimal version of that function. -__%[1]s_init_completion() -{ - COMPREPLY=() - _get_comp_words_by_ref "$@" cur prev words cword -} - -__%[1]s_index_of_word() -{ - local w word=$1 - shift - index=0 - for w in "$@"; do - [[ $w = "$word" ]] && return - index=$((index+1)) - done - index=-1 -} - -__%[1]s_contains_word() -{ - local w word=$1; shift - for w in "$@"; do - [[ $w = "$word" ]] && return - done - return 1 -} - -__%[1]s_handle_go_custom_completion() -{ - __%[1]s_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}" - - local shellCompDirectiveError=%[3]d - local shellCompDirectiveNoSpace=%[4]d - local shellCompDirectiveNoFileComp=%[5]d - local shellCompDirectiveFilterFileExt=%[6]d - local shellCompDirectiveFilterDirs=%[7]d - - local out requestComp lastParam lastChar comp directive args - - # Prepare the command to request completions for the program. - # Calling ${words[0]} instead of directly %[1]s allows handling aliases - args=("${words[@]:1}") - # Disable ActiveHelp which is not supported for bash completion v1 - requestComp="%[8]s=0 ${words[0]} %[2]s ${args[*]}" - - lastParam=${words[$((${#words[@]}-1))]} - lastChar=${lastParam:$((${#lastParam}-1)):1} - __%[1]s_debug "${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}" - - if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go method. - __%[1]s_debug "${FUNCNAME[0]}: Adding extra empty parameter" - requestComp="${requestComp} \"\"" - fi - - __%[1]s_debug "${FUNCNAME[0]}: calling ${requestComp}" - # Use eval to handle any environment variables and such - out=$(eval "${requestComp}" 2>/dev/null) - - # Extract the directive integer at the very end of the output following a colon (:) - directive=${out##*:} - # Remove the directive - out=${out%%:*} - if [ "${directive}" = "${out}" ]; then - # There is not directive specified - directive=0 - fi - __%[1]s_debug "${FUNCNAME[0]}: the completion directive is: ${directive}" - __%[1]s_debug "${FUNCNAME[0]}: the completions are: ${out}" - - if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then - # Error code. No completion. - __%[1]s_debug "${FUNCNAME[0]}: received error from custom completion go code" - return - else - if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then - if [[ $(type -t compopt) = "builtin" ]]; then - __%[1]s_debug "${FUNCNAME[0]}: activating no space" - compopt -o nospace - fi - fi - if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then - if [[ $(type -t compopt) = "builtin" ]]; then - __%[1]s_debug "${FUNCNAME[0]}: activating no file completion" - compopt +o default - fi - fi - fi - - if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then - # File extension filtering - local fullFilter filter filteringCmd - # Do not use quotes around the $out variable or else newline - # characters will be kept. - for filter in ${out}; do - fullFilter+="$filter|" - done - - filteringCmd="_filedir $fullFilter" - __%[1]s_debug "File filtering command: $filteringCmd" - $filteringCmd - elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then - # File completion for directories only - local subdir - # Use printf to strip any trailing newline - subdir=$(printf "%%s" "${out}") - if [ -n "$subdir" ]; then - __%[1]s_debug "Listing directories in $subdir" - __%[1]s_handle_subdirs_in_dir_flag "$subdir" - else - __%[1]s_debug "Listing directories in ." - _filedir -d - fi - else - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${out}" -- "$cur") - fi -} - -__%[1]s_handle_reply() -{ - __%[1]s_debug "${FUNCNAME[0]}" - local comp - case $cur in - -*) - if [[ $(type -t compopt) = "builtin" ]]; then - compopt -o nospace - fi - local allflags - if [ ${#must_have_one_flag[@]} -ne 0 ]; then - allflags=("${must_have_one_flag[@]}") - else - allflags=("${flags[*]} ${two_word_flags[*]}") - fi - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${allflags[*]}" -- "$cur") - if [[ $(type -t compopt) = "builtin" ]]; then - [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace - fi - - # complete after --flag=abc - if [[ $cur == *=* ]]; then - if [[ $(type -t compopt) = "builtin" ]]; then - compopt +o nospace - fi - - local index flag - flag="${cur%%=*}" - __%[1]s_index_of_word "${flag}" "${flags_with_completion[@]}" - COMPREPLY=() - if [[ ${index} -ge 0 ]]; then - PREFIX="" - cur="${cur#*=}" - ${flags_completion[${index}]} - if [ -n "${ZSH_VERSION:-}" ]; then - # zsh completion needs --flag= prefix - eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )" - fi - fi - fi - - if [[ -z "${flag_parsing_disabled}" ]]; then - # If flag parsing is enabled, we have completed the flags and can return. - # If flag parsing is disabled, we may not know all (or any) of the flags, so we fallthrough - # to possibly call handle_go_custom_completion. - return 0; - fi - ;; - esac - - # check if we are handling a flag with special work handling - local index - __%[1]s_index_of_word "${prev}" "${flags_with_completion[@]}" - if [[ ${index} -ge 0 ]]; then - ${flags_completion[${index}]} - return - fi - - # we are parsing a flag and don't have a special handler, no completion - if [[ ${cur} != "${words[cword]}" ]]; then - return - fi - - local completions - completions=("${commands[@]}") - if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then - completions+=("${must_have_one_noun[@]}") - elif [[ -n "${has_completion_function}" ]]; then - # if a go completion function is provided, defer to that function - __%[1]s_handle_go_custom_completion - fi - if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then - completions+=("${must_have_one_flag[@]}") - fi - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${completions[*]}" -- "$cur") - - if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${noun_aliases[*]}" -- "$cur") - fi - - if [[ ${#COMPREPLY[@]} -eq 0 ]]; then - if declare -F __%[1]s_custom_func >/dev/null; then - # try command name qualified custom func - __%[1]s_custom_func - else - # otherwise fall back to unqualified for compatibility - declare -F __custom_func >/dev/null && __custom_func - fi - fi - - # available in bash-completion >= 2, not always present on macOS - if declare -F __ltrim_colon_completions >/dev/null; then - __ltrim_colon_completions "$cur" - fi - - # If there is only 1 completion and it is a flag with an = it will be completed - # but we don't want a space after the = - if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then - compopt -o nospace - fi -} - -# The arguments should be in the form "ext1|ext2|extn" -__%[1]s_handle_filename_extension_flag() -{ - local ext="$1" - _filedir "@(${ext})" -} - -__%[1]s_handle_subdirs_in_dir_flag() -{ - local dir="$1" - pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return -} - -__%[1]s_handle_flag() -{ - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - # if a command required a flag, and we found it, unset must_have_one_flag() - local flagname=${words[c]} - local flagvalue="" - # if the word contained an = - if [[ ${words[c]} == *"="* ]]; then - flagvalue=${flagname#*=} # take in as flagvalue after the = - flagname=${flagname%%=*} # strip everything after the = - flagname="${flagname}=" # but put the = back - fi - __%[1]s_debug "${FUNCNAME[0]}: looking for ${flagname}" - if __%[1]s_contains_word "${flagname}" "${must_have_one_flag[@]}"; then - must_have_one_flag=() - fi - - # if you set a flag which only applies to this command, don't show subcommands - if __%[1]s_contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then - commands=() - fi - - # keep flag value with flagname as flaghash - # flaghash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then - if [ -n "${flagvalue}" ] ; then - flaghash[${flagname}]=${flagvalue} - elif [ -n "${words[ $((c+1)) ]}" ] ; then - flaghash[${flagname}]=${words[ $((c+1)) ]} - else - flaghash[${flagname}]="true" # pad "true" for bool flag - fi - fi - - # skip the argument to a two word flag - if [[ ${words[c]} != *"="* ]] && __%[1]s_contains_word "${words[c]}" "${two_word_flags[@]}"; then - __%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument" - c=$((c+1)) - # if we are looking for a flags value, don't show commands - if [[ $c -eq $cword ]]; then - commands=() - fi - fi - - c=$((c+1)) - -} - -__%[1]s_handle_noun() -{ - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - if __%[1]s_contains_word "${words[c]}" "${must_have_one_noun[@]}"; then - must_have_one_noun=() - elif __%[1]s_contains_word "${words[c]}" "${noun_aliases[@]}"; then - must_have_one_noun=() - fi - - nouns+=("${words[c]}") - c=$((c+1)) -} - -__%[1]s_handle_command() -{ - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - local next_command - if [[ -n ${last_command} ]]; then - next_command="_${last_command}_${words[c]//:/__}" - else - if [[ $c -eq 0 ]]; then - next_command="_%[1]s_root_command" - else - next_command="_${words[c]//:/__}" - fi - fi - c=$((c+1)) - __%[1]s_debug "${FUNCNAME[0]}: looking for ${next_command}" - declare -F "$next_command" >/dev/null && $next_command -} - -__%[1]s_handle_word() -{ - if [[ $c -ge $cword ]]; then - __%[1]s_handle_reply - return - fi - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - if [[ "${words[c]}" == -* ]]; then - __%[1]s_handle_flag - elif __%[1]s_contains_word "${words[c]}" "${commands[@]}"; then - __%[1]s_handle_command - elif [[ $c -eq 0 ]]; then - __%[1]s_handle_command - elif __%[1]s_contains_word "${words[c]}" "${command_aliases[@]}"; then - # aliashash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then - words[c]=${aliashash[${words[c]}]} - __%[1]s_handle_command - else - __%[1]s_handle_noun - fi - else - __%[1]s_handle_noun - fi - __%[1]s_handle_word -} - -`, name, ShellCompNoDescRequestCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name))) -} - -func writePostscript(buf io.StringWriter, name string) { - name = strings.ReplaceAll(name, ":", "__") - WriteStringAndCheck(buf, fmt.Sprintf("__start_%s()\n", name)) - WriteStringAndCheck(buf, fmt.Sprintf(`{ - local cur prev words cword split - declare -A flaghash 2>/dev/null || : - declare -A aliashash 2>/dev/null || : - if declare -F _init_completion >/dev/null 2>&1; then - _init_completion -s || return - else - __%[1]s_init_completion -n "=" || return - fi - - local c=0 - local flag_parsing_disabled= - local flags=() - local two_word_flags=() - local local_nonpersistent_flags=() - local flags_with_completion=() - local flags_completion=() - local commands=("%[1]s") - local command_aliases=() - local must_have_one_flag=() - local must_have_one_noun=() - local has_completion_function="" - local last_command="" - local nouns=() - local noun_aliases=() - - __%[1]s_handle_word -} - -`, name)) - WriteStringAndCheck(buf, fmt.Sprintf(`if [[ $(type -t compopt) = "builtin" ]]; then - complete -o default -F __start_%s %s -else - complete -o default -o nospace -F __start_%s %s -fi - -`, name, name, name, name)) - WriteStringAndCheck(buf, "# ex: ts=4 sw=4 et filetype=sh\n") -} - -func writeCommands(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " commands=()\n") - for _, c := range cmd.Commands() { - if !c.IsAvailableCommand() && c != cmd.helpCommand { - continue - } - WriteStringAndCheck(buf, fmt.Sprintf(" commands+=(%q)\n", c.Name())) - writeCmdAliases(buf, c) - } - WriteStringAndCheck(buf, "\n") -} - -func writeFlagHandler(buf io.StringWriter, name string, annotations map[string][]string, cmd *Command) { - for key, value := range annotations { - switch key { - case BashCompFilenameExt: - WriteStringAndCheck(buf, fmt.Sprintf(" flags_with_completion+=(%q)\n", name)) - - var ext string - if len(value) > 0 { - ext = fmt.Sprintf("__%s_handle_filename_extension_flag ", cmd.Root().Name()) + strings.Join(value, "|") - } else { - ext = "_filedir" - } - WriteStringAndCheck(buf, fmt.Sprintf(" flags_completion+=(%q)\n", ext)) - case BashCompCustom: - WriteStringAndCheck(buf, fmt.Sprintf(" flags_with_completion+=(%q)\n", name)) - - if len(value) > 0 { - handlers := strings.Join(value, "; ") - WriteStringAndCheck(buf, fmt.Sprintf(" flags_completion+=(%q)\n", handlers)) - } else { - WriteStringAndCheck(buf, " flags_completion+=(:)\n") - } - case BashCompSubdirsInDir: - WriteStringAndCheck(buf, fmt.Sprintf(" flags_with_completion+=(%q)\n", name)) - - var ext string - if len(value) == 1 { - ext = fmt.Sprintf("__%s_handle_subdirs_in_dir_flag ", cmd.Root().Name()) + value[0] - } else { - ext = "_filedir -d" - } - WriteStringAndCheck(buf, fmt.Sprintf(" flags_completion+=(%q)\n", ext)) - } - } -} - -const cbn = "\")\n" - -func writeShortFlag(buf io.StringWriter, flag *pflag.Flag, cmd *Command) { - name := flag.Shorthand - format := " " - if len(flag.NoOptDefVal) == 0 { - format += "two_word_" - } - format += "flags+=(\"-%s" + cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - writeFlagHandler(buf, "-"+name, flag.Annotations, cmd) -} - -func writeFlag(buf io.StringWriter, flag *pflag.Flag, cmd *Command) { - name := flag.Name - format := " flags+=(\"--%s" - if len(flag.NoOptDefVal) == 0 { - format += "=" - } - format += cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - if len(flag.NoOptDefVal) == 0 { - format = " two_word_flags+=(\"--%s" + cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - } - writeFlagHandler(buf, "--"+name, flag.Annotations, cmd) -} - -func writeLocalNonPersistentFlag(buf io.StringWriter, flag *pflag.Flag) { - name := flag.Name - format := " local_nonpersistent_flags+=(\"--%[1]s" + cbn - if len(flag.NoOptDefVal) == 0 { - format += " local_nonpersistent_flags+=(\"--%[1]s=" + cbn - } - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - if len(flag.Shorthand) > 0 { - WriteStringAndCheck(buf, fmt.Sprintf(" local_nonpersistent_flags+=(\"-%s\")\n", flag.Shorthand)) - } -} - -// prepareCustomAnnotationsForFlags setup annotations for go completions for registered flags -func prepareCustomAnnotationsForFlags(cmd *Command) { - flagCompletionMutex.RLock() - defer flagCompletionMutex.RUnlock() - for flag := range flagCompletionFunctions { - // Make sure the completion script calls the __*_go_custom_completion function for - // every registered flag. We need to do this here (and not when the flag was registered - // for completion) so that we can know the root command name for the prefix - // of ___go_custom_completion - if flag.Annotations == nil { - flag.Annotations = map[string][]string{} - } - flag.Annotations[BashCompCustom] = []string{fmt.Sprintf("__%[1]s_handle_go_custom_completion", cmd.Root().Name())} - } -} - -func writeFlags(buf io.StringWriter, cmd *Command) { - prepareCustomAnnotationsForFlags(cmd) - WriteStringAndCheck(buf, ` flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - -`) - - if cmd.DisableFlagParsing { - WriteStringAndCheck(buf, " flag_parsing_disabled=1\n") - } - - localNonPersistentFlags := cmd.LocalNonPersistentFlags() - cmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - if nonCompletableFlag(flag) { - return - } - writeFlag(buf, flag, cmd) - if len(flag.Shorthand) > 0 { - writeShortFlag(buf, flag, cmd) - } - // localNonPersistentFlags are used to stop the completion of subcommands when one is set - // if TraverseChildren is true we should allow to complete subcommands - if localNonPersistentFlags.Lookup(flag.Name) != nil && !cmd.Root().TraverseChildren { - writeLocalNonPersistentFlag(buf, flag) - } - }) - cmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { - if nonCompletableFlag(flag) { - return - } - writeFlag(buf, flag, cmd) - if len(flag.Shorthand) > 0 { - writeShortFlag(buf, flag, cmd) - } - }) - - WriteStringAndCheck(buf, "\n") -} - -func writeRequiredFlag(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " must_have_one_flag=()\n") - flags := cmd.NonInheritedFlags() - flags.VisitAll(func(flag *pflag.Flag) { - if nonCompletableFlag(flag) { - return - } - for key := range flag.Annotations { - switch key { - case BashCompOneRequiredFlag: - format := " must_have_one_flag+=(\"--%s" - if flag.Value.Type() != "bool" { - format += "=" - } - format += cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, flag.Name)) - - if len(flag.Shorthand) > 0 { - WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_flag+=(\"-%s"+cbn, flag.Shorthand)) - } - } - } - }) -} - -func writeRequiredNouns(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " must_have_one_noun=()\n") - sort.Strings(cmd.ValidArgs) - for _, value := range cmd.ValidArgs { - // Remove any description that may be included following a tab character. - // Descriptions are not supported by bash completion. - value = strings.Split(value, "\t")[0] - WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_noun+=(%q)\n", value)) - } - if cmd.ValidArgsFunction != nil { - WriteStringAndCheck(buf, " has_completion_function=1\n") - } -} - -func writeCmdAliases(buf io.StringWriter, cmd *Command) { - if len(cmd.Aliases) == 0 { - return - } - - sort.Strings(cmd.Aliases) - - WriteStringAndCheck(buf, fmt.Sprint(` if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then`, "\n")) - for _, value := range cmd.Aliases { - WriteStringAndCheck(buf, fmt.Sprintf(" command_aliases+=(%q)\n", value)) - WriteStringAndCheck(buf, fmt.Sprintf(" aliashash[%q]=%q\n", value, cmd.Name())) - } - WriteStringAndCheck(buf, ` fi`) - WriteStringAndCheck(buf, "\n") -} -func writeArgAliases(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " noun_aliases=()\n") - sort.Strings(cmd.ArgAliases) - for _, value := range cmd.ArgAliases { - WriteStringAndCheck(buf, fmt.Sprintf(" noun_aliases+=(%q)\n", value)) - } -} - -func gen(buf io.StringWriter, cmd *Command) { - for _, c := range cmd.Commands() { - if !c.IsAvailableCommand() && c != cmd.helpCommand { - continue - } - gen(buf, c) - } - commandName := cmd.CommandPath() - commandName = strings.ReplaceAll(commandName, " ", "_") - commandName = strings.ReplaceAll(commandName, ":", "__") - - if cmd.Root() == cmd { - WriteStringAndCheck(buf, fmt.Sprintf("_%s_root_command()\n{\n", commandName)) - } else { - WriteStringAndCheck(buf, fmt.Sprintf("_%s()\n{\n", commandName)) - } - - WriteStringAndCheck(buf, fmt.Sprintf(" last_command=%q\n", commandName)) - WriteStringAndCheck(buf, "\n") - WriteStringAndCheck(buf, " command_aliases=()\n") - WriteStringAndCheck(buf, "\n") - - writeCommands(buf, cmd) - writeFlags(buf, cmd) - writeRequiredFlag(buf, cmd) - writeRequiredNouns(buf, cmd) - writeArgAliases(buf, cmd) - WriteStringAndCheck(buf, "}\n\n") -} - -// GenBashCompletion generates bash completion file and writes to the passed writer. -func (c *Command) GenBashCompletion(w io.Writer) error { - buf := new(bytes.Buffer) - writePreamble(buf, c.Name()) - if len(c.BashCompletionFunction) > 0 { - buf.WriteString(c.BashCompletionFunction + "\n") - } - gen(buf, c) - writePostscript(buf, c.Name()) - - _, err := buf.WriteTo(w) - return err -} - -func nonCompletableFlag(flag *pflag.Flag) bool { - return flag.Hidden || len(flag.Deprecated) > 0 -} - -// GenBashCompletionFile generates bash completion file. -func (c *Command) GenBashCompletionFile(filename string) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenBashCompletion(outFile) -} diff --git a/vendor/github.com/spf13/cobra/bash_completionsV2.go b/vendor/github.com/spf13/cobra/bash_completionsV2.go deleted file mode 100644 index 1cce5c32..00000000 --- a/vendor/github.com/spf13/cobra/bash_completionsV2.go +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "bytes" - "fmt" - "io" - "os" -) - -func (c *Command) genBashCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genBashComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -func genBashComp(buf io.StringWriter, name string, includeDesc bool) { - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - - WriteStringAndCheck(buf, fmt.Sprintf(`# bash completion V2 for %-36[1]s -*- shell-script -*- - -__%[1]s_debug() -{ - if [[ -n ${BASH_COMP_DEBUG_FILE-} ]]; then - echo "$*" >> "${BASH_COMP_DEBUG_FILE}" - fi -} - -# Macs have bash3 for which the bash-completion package doesn't include -# _init_completion. This is a minimal version of that function. -__%[1]s_init_completion() -{ - COMPREPLY=() - _get_comp_words_by_ref "$@" cur prev words cword -} - -# This function calls the %[1]s program to obtain the completion -# results and the directive. It fills the 'out' and 'directive' vars. -__%[1]s_get_completion_results() { - local requestComp lastParam lastChar args - - # Prepare the command to request completions for the program. - # Calling ${words[0]} instead of directly %[1]s allows handling aliases - args=("${words[@]:1}") - requestComp="${words[0]} %[2]s ${args[*]}" - - lastParam=${words[$((${#words[@]}-1))]} - lastChar=${lastParam:$((${#lastParam}-1)):1} - __%[1]s_debug "lastParam ${lastParam}, lastChar ${lastChar}" - - if [[ -z ${cur} && ${lastChar} != = ]]; then - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go method. - __%[1]s_debug "Adding extra empty parameter" - requestComp="${requestComp} ''" - fi - - # When completing a flag with an = (e.g., %[1]s -n=) - # bash focuses on the part after the =, so we need to remove - # the flag part from $cur - if [[ ${cur} == -*=* ]]; then - cur="${cur#*=}" - fi - - __%[1]s_debug "Calling ${requestComp}" - # Use eval to handle any environment variables and such - out=$(eval "${requestComp}" 2>/dev/null) - - # Extract the directive integer at the very end of the output following a colon (:) - directive=${out##*:} - # Remove the directive - out=${out%%:*} - if [[ ${directive} == "${out}" ]]; then - # There is not directive specified - directive=0 - fi - __%[1]s_debug "The completion directive is: ${directive}" - __%[1]s_debug "The completions are: ${out}" -} - -__%[1]s_process_completion_results() { - local shellCompDirectiveError=%[3]d - local shellCompDirectiveNoSpace=%[4]d - local shellCompDirectiveNoFileComp=%[5]d - local shellCompDirectiveFilterFileExt=%[6]d - local shellCompDirectiveFilterDirs=%[7]d - local shellCompDirectiveKeepOrder=%[8]d - - if (((directive & shellCompDirectiveError) != 0)); then - # Error code. No completion. - __%[1]s_debug "Received error from custom completion go code" - return - else - if (((directive & shellCompDirectiveNoSpace) != 0)); then - if [[ $(type -t compopt) == builtin ]]; then - __%[1]s_debug "Activating no space" - compopt -o nospace - else - __%[1]s_debug "No space directive not supported in this version of bash" - fi - fi - if (((directive & shellCompDirectiveKeepOrder) != 0)); then - if [[ $(type -t compopt) == builtin ]]; then - # no sort isn't supported for bash less than < 4.4 - if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then - __%[1]s_debug "No sort directive not supported in this version of bash" - else - __%[1]s_debug "Activating keep order" - compopt -o nosort - fi - else - __%[1]s_debug "No sort directive not supported in this version of bash" - fi - fi - if (((directive & shellCompDirectiveNoFileComp) != 0)); then - if [[ $(type -t compopt) == builtin ]]; then - __%[1]s_debug "Activating no file completion" - compopt +o default - else - __%[1]s_debug "No file completion directive not supported in this version of bash" - fi - fi - fi - - # Separate activeHelp from normal completions - local completions=() - local activeHelp=() - __%[1]s_extract_activeHelp - - if (((directive & shellCompDirectiveFilterFileExt) != 0)); then - # File extension filtering - local fullFilter filter filteringCmd - - # Do not use quotes around the $completions variable or else newline - # characters will be kept. - for filter in ${completions[*]}; do - fullFilter+="$filter|" - done - - filteringCmd="_filedir $fullFilter" - __%[1]s_debug "File filtering command: $filteringCmd" - $filteringCmd - elif (((directive & shellCompDirectiveFilterDirs) != 0)); then - # File completion for directories only - - local subdir - subdir=${completions[0]} - if [[ -n $subdir ]]; then - __%[1]s_debug "Listing directories in $subdir" - pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return - else - __%[1]s_debug "Listing directories in ." - _filedir -d - fi - else - __%[1]s_handle_completion_types - fi - - __%[1]s_handle_special_char "$cur" : - __%[1]s_handle_special_char "$cur" = - - # Print the activeHelp statements before we finish - if ((${#activeHelp[*]} != 0)); then - printf "\n"; - printf "%%s\n" "${activeHelp[@]}" - printf "\n" - - # The prompt format is only available from bash 4.4. - # We test if it is available before using it. - if (x=${PS1@P}) 2> /dev/null; then - printf "%%s" "${PS1@P}${COMP_LINE[@]}" - else - # Can't print the prompt. Just print the - # text the user had typed, it is workable enough. - printf "%%s" "${COMP_LINE[@]}" - fi - fi -} - -# Separate activeHelp lines from real completions. -# Fills the $activeHelp and $completions arrays. -__%[1]s_extract_activeHelp() { - local activeHelpMarker="%[9]s" - local endIndex=${#activeHelpMarker} - - while IFS='' read -r comp; do - if [[ ${comp:0:endIndex} == $activeHelpMarker ]]; then - comp=${comp:endIndex} - __%[1]s_debug "ActiveHelp found: $comp" - if [[ -n $comp ]]; then - activeHelp+=("$comp") - fi - else - # Not an activeHelp line but a normal completion - completions+=("$comp") - fi - done <<<"${out}" -} - -__%[1]s_handle_completion_types() { - __%[1]s_debug "__%[1]s_handle_completion_types: COMP_TYPE is $COMP_TYPE" - - case $COMP_TYPE in - 37|42) - # Type: menu-complete/menu-complete-backward and insert-completions - # If the user requested inserting one completion at a time, or all - # completions at once on the command-line we must remove the descriptions. - # https://github.com/spf13/cobra/issues/1508 - local tab=$'\t' comp - while IFS='' read -r comp; do - [[ -z $comp ]] && continue - # Strip any description - comp=${comp%%%%$tab*} - # Only consider the completions that match - if [[ $comp == "$cur"* ]]; then - COMPREPLY+=("$comp") - fi - done < <(printf "%%s\n" "${completions[@]}") - ;; - - *) - # Type: complete (normal completion) - __%[1]s_handle_standard_completion_case - ;; - esac -} - -__%[1]s_handle_standard_completion_case() { - local tab=$'\t' comp - - # Short circuit to optimize if we don't have descriptions - if [[ "${completions[*]}" != *$tab* ]]; then - IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur") - return 0 - fi - - local longest=0 - local compline - # Look for the longest completion so that we can format things nicely - while IFS='' read -r compline; do - [[ -z $compline ]] && continue - # Strip any description before checking the length - comp=${compline%%%%$tab*} - # Only consider the completions that match - [[ $comp == "$cur"* ]] || continue - COMPREPLY+=("$compline") - if ((${#comp}>longest)); then - longest=${#comp} - fi - done < <(printf "%%s\n" "${completions[@]}") - - # If there is a single completion left, remove the description text - if ((${#COMPREPLY[*]} == 1)); then - __%[1]s_debug "COMPREPLY[0]: ${COMPREPLY[0]}" - comp="${COMPREPLY[0]%%%%$tab*}" - __%[1]s_debug "Removed description from single completion, which is now: ${comp}" - COMPREPLY[0]=$comp - else # Format the descriptions - __%[1]s_format_comp_descriptions $longest - fi -} - -__%[1]s_handle_special_char() -{ - local comp="$1" - local char=$2 - if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then - local word=${comp%%"${comp##*${char}}"} - local idx=${#COMPREPLY[*]} - while ((--idx >= 0)); do - COMPREPLY[idx]=${COMPREPLY[idx]#"$word"} - done - fi -} - -__%[1]s_format_comp_descriptions() -{ - local tab=$'\t' - local comp desc maxdesclength - local longest=$1 - - local i ci - for ci in ${!COMPREPLY[*]}; do - comp=${COMPREPLY[ci]} - # Properly format the description string which follows a tab character if there is one - if [[ "$comp" == *$tab* ]]; then - __%[1]s_debug "Original comp: $comp" - desc=${comp#*$tab} - comp=${comp%%%%$tab*} - - # $COLUMNS stores the current shell width. - # Remove an extra 4 because we add 2 spaces and 2 parentheses. - maxdesclength=$(( COLUMNS - longest - 4 )) - - # Make sure we can fit a description of at least 8 characters - # if we are to align the descriptions. - if ((maxdesclength > 8)); then - # Add the proper number of spaces to align the descriptions - for ((i = ${#comp} ; i < longest ; i++)); do - comp+=" " - done - else - # Don't pad the descriptions so we can fit more text after the completion - maxdesclength=$(( COLUMNS - ${#comp} - 4 )) - fi - - # If there is enough space for any description text, - # truncate the descriptions that are too long for the shell width - if ((maxdesclength > 0)); then - if ((${#desc} > maxdesclength)); then - desc=${desc:0:$(( maxdesclength - 1 ))} - desc+="…" - fi - comp+=" ($desc)" - fi - COMPREPLY[ci]=$comp - __%[1]s_debug "Final comp: $comp" - fi - done -} - -__start_%[1]s() -{ - local cur prev words cword split - - COMPREPLY=() - - # Call _init_completion from the bash-completion package - # to prepare the arguments properly - if declare -F _init_completion >/dev/null 2>&1; then - _init_completion -n =: || return - else - __%[1]s_init_completion -n =: || return - fi - - __%[1]s_debug - __%[1]s_debug "========= starting completion logic ==========" - __%[1]s_debug "cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword" - - # The user could have moved the cursor backwards on the command-line. - # We need to trigger completion from the $cword location, so we need - # to truncate the command-line ($words) up to the $cword location. - words=("${words[@]:0:$cword+1}") - __%[1]s_debug "Truncated words[*]: ${words[*]}," - - local out directive - __%[1]s_get_completion_results - __%[1]s_process_completion_results -} - -if [[ $(type -t compopt) = "builtin" ]]; then - complete -o default -F __start_%[1]s %[1]s -else - complete -o default -o nospace -F __start_%[1]s %[1]s -fi - -# ex: ts=4 sw=4 et filetype=sh -`, name, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, - activeHelpMarker)) -} - -// GenBashCompletionFileV2 generates Bash completion version 2. -func (c *Command) GenBashCompletionFileV2(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenBashCompletionV2(outFile, includeDesc) -} - -// GenBashCompletionV2 generates Bash completion file version 2 -// and writes it to the passed writer. -func (c *Command) GenBashCompletionV2(w io.Writer, includeDesc bool) error { - return c.genBashCompletion(w, includeDesc) -} diff --git a/vendor/github.com/spf13/cobra/cobra.go b/vendor/github.com/spf13/cobra/cobra.go deleted file mode 100644 index a6b160ce..00000000 --- a/vendor/github.com/spf13/cobra/cobra.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2013-2023 The Cobra 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. - -// Commands similar to git, go tools and other modern CLI tools -// inspired by go, go-Commander, gh and subcommand - -package cobra - -import ( - "fmt" - "io" - "os" - "reflect" - "strconv" - "strings" - "text/template" - "time" - "unicode" -) - -var templateFuncs = template.FuncMap{ - "trim": strings.TrimSpace, - "trimRightSpace": trimRightSpace, - "trimTrailingWhitespaces": trimRightSpace, - "appendIfNotPresent": appendIfNotPresent, - "rpad": rpad, - "gt": Gt, - "eq": Eq, -} - -var initializers []func() -var finalizers []func() - -const ( - defaultPrefixMatching = false - defaultCommandSorting = true - defaultCaseInsensitive = false - defaultTraverseRunHooks = false -) - -// EnablePrefixMatching allows setting automatic prefix matching. Automatic prefix matching can be a dangerous thing -// to automatically enable in CLI tools. -// Set this to true to enable it. -var EnablePrefixMatching = defaultPrefixMatching - -// EnableCommandSorting controls sorting of the slice of commands, which is turned on by default. -// To disable sorting, set it to false. -var EnableCommandSorting = defaultCommandSorting - -// EnableCaseInsensitive allows case-insensitive commands names. (case sensitive by default) -var EnableCaseInsensitive = defaultCaseInsensitive - -// EnableTraverseRunHooks executes persistent pre-run and post-run hooks from all parents. -// By default this is disabled, which means only the first run hook to be found is executed. -var EnableTraverseRunHooks = defaultTraverseRunHooks - -// MousetrapHelpText enables an information splash screen on Windows -// if the CLI is started from explorer.exe. -// To disable the mousetrap, just set this variable to blank string (""). -// Works only on Microsoft Windows. -var MousetrapHelpText = `This is a command line tool. - -You need to open cmd.exe and run it from there. -` - -// MousetrapDisplayDuration controls how long the MousetrapHelpText message is displayed on Windows -// if the CLI is started from explorer.exe. Set to 0 to wait for the return key to be pressed. -// To disable the mousetrap, just set MousetrapHelpText to blank string (""). -// Works only on Microsoft Windows. -var MousetrapDisplayDuration = 5 * time.Second - -// AddTemplateFunc adds a template function that's available to Usage and Help -// template generation. -func AddTemplateFunc(name string, tmplFunc interface{}) { - templateFuncs[name] = tmplFunc -} - -// AddTemplateFuncs adds multiple template functions that are available to Usage and -// Help template generation. -func AddTemplateFuncs(tmplFuncs template.FuncMap) { - for k, v := range tmplFuncs { - templateFuncs[k] = v - } -} - -// OnInitialize sets the passed functions to be run when each command's -// Execute method is called. -func OnInitialize(y ...func()) { - initializers = append(initializers, y...) -} - -// OnFinalize sets the passed functions to be run when each command's -// Execute method is terminated. -func OnFinalize(y ...func()) { - finalizers = append(finalizers, y...) -} - -// FIXME Gt is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra. - -// Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans, -// Maps and Slices, Gt will compare their lengths. Ints are compared directly while strings are first parsed as -// ints and then compared. -func Gt(a interface{}, b interface{}) bool { - var left, right int64 - av := reflect.ValueOf(a) - - switch av.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - left = int64(av.Len()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - left = av.Int() - case reflect.String: - left, _ = strconv.ParseInt(av.String(), 10, 64) - } - - bv := reflect.ValueOf(b) - - switch bv.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - right = int64(bv.Len()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - right = bv.Int() - case reflect.String: - right, _ = strconv.ParseInt(bv.String(), 10, 64) - } - - return left > right -} - -// FIXME Eq is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra. - -// Eq takes two types and checks whether they are equal. Supported types are int and string. Unsupported types will panic. -func Eq(a interface{}, b interface{}) bool { - av := reflect.ValueOf(a) - bv := reflect.ValueOf(b) - - switch av.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - panic("Eq called on unsupported type") - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return av.Int() == bv.Int() - case reflect.String: - return av.String() == bv.String() - } - return false -} - -func trimRightSpace(s string) string { - return strings.TrimRightFunc(s, unicode.IsSpace) -} - -// FIXME appendIfNotPresent is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra. - -// appendIfNotPresent will append stringToAppend to the end of s, but only if it's not yet present in s. -func appendIfNotPresent(s, stringToAppend string) string { - if strings.Contains(s, stringToAppend) { - return s - } - return s + " " + stringToAppend -} - -// rpad adds padding to the right of a string. -func rpad(s string, padding int) string { - formattedString := fmt.Sprintf("%%-%ds", padding) - return fmt.Sprintf(formattedString, s) -} - -// tmpl executes the given template text on data, writing the result to w. -func tmpl(w io.Writer, text string, data interface{}) error { - t := template.New("top") - t.Funcs(templateFuncs) - template.Must(t.Parse(text)) - return t.Execute(w, data) -} - -// ld compares two strings and returns the levenshtein distance between them. -func ld(s, t string, ignoreCase bool) int { - if ignoreCase { - s = strings.ToLower(s) - t = strings.ToLower(t) - } - d := make([][]int, len(s)+1) - for i := range d { - d[i] = make([]int, len(t)+1) - } - for i := range d { - d[i][0] = i - } - for j := range d[0] { - d[0][j] = j - } - for j := 1; j <= len(t); j++ { - for i := 1; i <= len(s); i++ { - if s[i-1] == t[j-1] { - d[i][j] = d[i-1][j-1] - } else { - min := d[i-1][j] - if d[i][j-1] < min { - min = d[i][j-1] - } - if d[i-1][j-1] < min { - min = d[i-1][j-1] - } - d[i][j] = min + 1 - } - } - - } - return d[len(s)][len(t)] -} - -func stringInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -// CheckErr prints the msg with the prefix 'Error:' and exits with error code 1. If the msg is nil, it does nothing. -func CheckErr(msg interface{}) { - if msg != nil { - fmt.Fprintln(os.Stderr, "Error:", msg) - os.Exit(1) - } -} - -// WriteStringAndCheck writes a string into a buffer, and checks if the error is not nil. -func WriteStringAndCheck(b io.StringWriter, s string) { - _, err := b.WriteString(s) - CheckErr(err) -} diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go deleted file mode 100644 index 2fbe6c13..00000000 --- a/vendor/github.com/spf13/cobra/command.go +++ /dev/null @@ -1,1885 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra is a commander providing a simple interface to create powerful modern CLI interfaces. -// In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code. -package cobra - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "os" - "path/filepath" - "sort" - "strings" - - flag "github.com/spf13/pflag" -) - -const ( - FlagSetByCobraAnnotation = "cobra_annotation_flag_set_by_cobra" - CommandDisplayNameAnnotation = "cobra_annotation_command_display_name" -) - -// FParseErrWhitelist configures Flag parse errors to be ignored -type FParseErrWhitelist flag.ParseErrorsWhitelist - -// Group Structure to manage groups for commands -type Group struct { - ID string - Title string -} - -// Command is just that, a command for your application. -// E.g. 'go run ...' - 'run' is the command. Cobra requires -// you to define the usage and description as part of your command -// definition to ensure usability. -type Command struct { - // Use is the one-line usage message. - // Recommended syntax is as follows: - // [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required. - // ... indicates that you can specify multiple values for the previous argument. - // | indicates mutually exclusive information. You can use the argument to the left of the separator or the - // argument to the right of the separator. You cannot use both arguments in a single use of the command. - // { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are - // optional, they are enclosed in brackets ([ ]). - // Example: add [-F file | -D dir]... [-f format] profile - Use string - - // Aliases is an array of aliases that can be used instead of the first word in Use. - Aliases []string - - // SuggestFor is an array of command names for which this command will be suggested - - // similar to aliases but only suggests. - SuggestFor []string - - // Short is the short description shown in the 'help' output. - Short string - - // The group id under which this subcommand is grouped in the 'help' output of its parent. - GroupID string - - // Long is the long message shown in the 'help ' output. - Long string - - // Example is examples of how to use the command. - Example string - - // ValidArgs is list of all valid non-flag arguments that are accepted in shell completions - ValidArgs []string - // ValidArgsFunction is an optional function that provides valid non-flag arguments for shell completion. - // It is a dynamic version of using ValidArgs. - // Only one of ValidArgs and ValidArgsFunction can be used for a command. - ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) - - // Expected arguments - Args PositionalArgs - - // ArgAliases is List of aliases for ValidArgs. - // These are not suggested to the user in the shell completion, - // but accepted if entered manually. - ArgAliases []string - - // BashCompletionFunction is custom bash functions used by the legacy bash autocompletion generator. - // For portability with other shells, it is recommended to instead use ValidArgsFunction - BashCompletionFunction string - - // Deprecated defines, if this command is deprecated and should print this string when used. - Deprecated string - - // Annotations are key/value pairs that can be used by applications to identify or - // group commands or set special options. - Annotations map[string]string - - // Version defines the version for this command. If this value is non-empty and the command does not - // define a "version" flag, a "version" boolean flag will be added to the command and, if specified, - // will print content of the "Version" variable. A shorthand "v" flag will also be added if the - // command does not define one. - Version string - - // The *Run functions are executed in the following order: - // * PersistentPreRun() - // * PreRun() - // * Run() - // * PostRun() - // * PersistentPostRun() - // All functions get the same args, the arguments after the command name. - // The *PreRun and *PostRun functions will only be executed if the Run function of the current - // command has been declared. - // - // PersistentPreRun: children of this command will inherit and execute. - PersistentPreRun func(cmd *Command, args []string) - // PersistentPreRunE: PersistentPreRun but returns an error. - PersistentPreRunE func(cmd *Command, args []string) error - // PreRun: children of this command will not inherit. - PreRun func(cmd *Command, args []string) - // PreRunE: PreRun but returns an error. - PreRunE func(cmd *Command, args []string) error - // Run: Typically the actual work function. Most commands will only implement this. - Run func(cmd *Command, args []string) - // RunE: Run but returns an error. - RunE func(cmd *Command, args []string) error - // PostRun: run after the Run command. - PostRun func(cmd *Command, args []string) - // PostRunE: PostRun but returns an error. - PostRunE func(cmd *Command, args []string) error - // PersistentPostRun: children of this command will inherit and execute after PostRun. - PersistentPostRun func(cmd *Command, args []string) - // PersistentPostRunE: PersistentPostRun but returns an error. - PersistentPostRunE func(cmd *Command, args []string) error - - // groups for subcommands - commandgroups []*Group - - // args is actual args parsed from flags. - args []string - // flagErrorBuf contains all error messages from pflag. - flagErrorBuf *bytes.Buffer - // flags is full set of flags. - flags *flag.FlagSet - // pflags contains persistent flags. - pflags *flag.FlagSet - // lflags contains local flags. - lflags *flag.FlagSet - // iflags contains inherited flags. - iflags *flag.FlagSet - // parentsPflags is all persistent flags of cmd's parents. - parentsPflags *flag.FlagSet - // globNormFunc is the global normalization function - // that we can use on every pflag set and children commands - globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName - - // usageFunc is usage func defined by user. - usageFunc func(*Command) error - // usageTemplate is usage template defined by user. - usageTemplate string - // flagErrorFunc is func defined by user and it's called when the parsing of - // flags returns an error. - flagErrorFunc func(*Command, error) error - // helpTemplate is help template defined by user. - helpTemplate string - // helpFunc is help func defined by user. - helpFunc func(*Command, []string) - // helpCommand is command with usage 'help'. If it's not defined by user, - // cobra uses default help command. - helpCommand *Command - // helpCommandGroupID is the group id for the helpCommand - helpCommandGroupID string - - // completionCommandGroupID is the group id for the completion command - completionCommandGroupID string - - // versionTemplate is the version template defined by user. - versionTemplate string - - // errPrefix is the error message prefix defined by user. - errPrefix string - - // inReader is a reader defined by the user that replaces stdin - inReader io.Reader - // outWriter is a writer defined by the user that replaces stdout - outWriter io.Writer - // errWriter is a writer defined by the user that replaces stderr - errWriter io.Writer - - // FParseErrWhitelist flag parse errors to be ignored - FParseErrWhitelist FParseErrWhitelist - - // CompletionOptions is a set of options to control the handling of shell completion - CompletionOptions CompletionOptions - - // commandsAreSorted defines, if command slice are sorted or not. - commandsAreSorted bool - // commandCalledAs is the name or alias value used to call this command. - commandCalledAs struct { - name string - called bool - } - - ctx context.Context - - // commands is the list of commands supported by this program. - commands []*Command - // parent is a parent command for this command. - parent *Command - // Max lengths of commands' string lengths for use in padding. - commandsMaxUseLen int - commandsMaxCommandPathLen int - commandsMaxNameLen int - - // TraverseChildren parses flags on all parents before executing child command. - TraverseChildren bool - - // Hidden defines, if this command is hidden and should NOT show up in the list of available commands. - Hidden bool - - // SilenceErrors is an option to quiet errors down stream. - SilenceErrors bool - - // SilenceUsage is an option to silence usage when an error occurs. - SilenceUsage bool - - // DisableFlagParsing disables the flag parsing. - // If this is true all flags will be passed to the command as arguments. - DisableFlagParsing bool - - // DisableAutoGenTag defines, if gen tag ("Auto generated by spf13/cobra...") - // will be printed by generating docs for this command. - DisableAutoGenTag bool - - // DisableFlagsInUseLine will disable the addition of [flags] to the usage - // line of a command when printing help or generating docs - DisableFlagsInUseLine bool - - // DisableSuggestions disables the suggestions based on Levenshtein distance - // that go along with 'unknown command' messages. - DisableSuggestions bool - - // SuggestionsMinimumDistance defines minimum levenshtein distance to display suggestions. - // Must be > 0. - SuggestionsMinimumDistance int -} - -// Context returns underlying command context. If command was executed -// with ExecuteContext or the context was set with SetContext, the -// previously set context will be returned. Otherwise, nil is returned. -// -// Notice that a call to Execute and ExecuteC will replace a nil context of -// a command with a context.Background, so a background context will be -// returned by Context after one of these functions has been called. -func (c *Command) Context() context.Context { - return c.ctx -} - -// SetContext sets context for the command. This context will be overwritten by -// Command.ExecuteContext or Command.ExecuteContextC. -func (c *Command) SetContext(ctx context.Context) { - c.ctx = ctx -} - -// SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden -// particularly useful when testing. -func (c *Command) SetArgs(a []string) { - c.args = a -} - -// SetOutput sets the destination for usage and error messages. -// If output is nil, os.Stderr is used. -// Deprecated: Use SetOut and/or SetErr instead -func (c *Command) SetOutput(output io.Writer) { - c.outWriter = output - c.errWriter = output -} - -// SetOut sets the destination for usage messages. -// If newOut is nil, os.Stdout is used. -func (c *Command) SetOut(newOut io.Writer) { - c.outWriter = newOut -} - -// SetErr sets the destination for error messages. -// If newErr is nil, os.Stderr is used. -func (c *Command) SetErr(newErr io.Writer) { - c.errWriter = newErr -} - -// SetIn sets the source for input data -// If newIn is nil, os.Stdin is used. -func (c *Command) SetIn(newIn io.Reader) { - c.inReader = newIn -} - -// SetUsageFunc sets usage function. Usage can be defined by application. -func (c *Command) SetUsageFunc(f func(*Command) error) { - c.usageFunc = f -} - -// SetUsageTemplate sets usage template. Can be defined by Application. -func (c *Command) SetUsageTemplate(s string) { - c.usageTemplate = s -} - -// SetFlagErrorFunc sets a function to generate an error when flag parsing -// fails. -func (c *Command) SetFlagErrorFunc(f func(*Command, error) error) { - c.flagErrorFunc = f -} - -// SetHelpFunc sets help function. Can be defined by Application. -func (c *Command) SetHelpFunc(f func(*Command, []string)) { - c.helpFunc = f -} - -// SetHelpCommand sets help command. -func (c *Command) SetHelpCommand(cmd *Command) { - c.helpCommand = cmd -} - -// SetHelpCommandGroupID sets the group id of the help command. -func (c *Command) SetHelpCommandGroupID(groupID string) { - if c.helpCommand != nil { - c.helpCommand.GroupID = groupID - } - // helpCommandGroupID is used if no helpCommand is defined by the user - c.helpCommandGroupID = groupID -} - -// SetCompletionCommandGroupID sets the group id of the completion command. -func (c *Command) SetCompletionCommandGroupID(groupID string) { - // completionCommandGroupID is used if no completion command is defined by the user - c.Root().completionCommandGroupID = groupID -} - -// SetHelpTemplate sets help template to be used. Application can use it to set custom template. -func (c *Command) SetHelpTemplate(s string) { - c.helpTemplate = s -} - -// SetVersionTemplate sets version template to be used. Application can use it to set custom template. -func (c *Command) SetVersionTemplate(s string) { - c.versionTemplate = s -} - -// SetErrPrefix sets error message prefix to be used. Application can use it to set custom prefix. -func (c *Command) SetErrPrefix(s string) { - c.errPrefix = s -} - -// SetGlobalNormalizationFunc sets a normalization function to all flag sets and also to child commands. -// The user should not have a cyclic dependency on commands. -func (c *Command) SetGlobalNormalizationFunc(n func(f *flag.FlagSet, name string) flag.NormalizedName) { - c.Flags().SetNormalizeFunc(n) - c.PersistentFlags().SetNormalizeFunc(n) - c.globNormFunc = n - - for _, command := range c.commands { - command.SetGlobalNormalizationFunc(n) - } -} - -// OutOrStdout returns output to stdout. -func (c *Command) OutOrStdout() io.Writer { - return c.getOut(os.Stdout) -} - -// OutOrStderr returns output to stderr -func (c *Command) OutOrStderr() io.Writer { - return c.getOut(os.Stderr) -} - -// ErrOrStderr returns output to stderr -func (c *Command) ErrOrStderr() io.Writer { - return c.getErr(os.Stderr) -} - -// InOrStdin returns input to stdin -func (c *Command) InOrStdin() io.Reader { - return c.getIn(os.Stdin) -} - -func (c *Command) getOut(def io.Writer) io.Writer { - if c.outWriter != nil { - return c.outWriter - } - if c.HasParent() { - return c.parent.getOut(def) - } - return def -} - -func (c *Command) getErr(def io.Writer) io.Writer { - if c.errWriter != nil { - return c.errWriter - } - if c.HasParent() { - return c.parent.getErr(def) - } - return def -} - -func (c *Command) getIn(def io.Reader) io.Reader { - if c.inReader != nil { - return c.inReader - } - if c.HasParent() { - return c.parent.getIn(def) - } - return def -} - -// UsageFunc returns either the function set by SetUsageFunc for this command -// or a parent, or it returns a default usage function. -func (c *Command) UsageFunc() (f func(*Command) error) { - if c.usageFunc != nil { - return c.usageFunc - } - if c.HasParent() { - return c.Parent().UsageFunc() - } - return func(c *Command) error { - c.mergePersistentFlags() - err := tmpl(c.OutOrStderr(), c.UsageTemplate(), c) - if err != nil { - c.PrintErrln(err) - } - return err - } -} - -// Usage puts out the usage for the command. -// Used when a user provides invalid input. -// Can be defined by user by overriding UsageFunc. -func (c *Command) Usage() error { - return c.UsageFunc()(c) -} - -// HelpFunc returns either the function set by SetHelpFunc for this command -// or a parent, or it returns a function with default help behavior. -func (c *Command) HelpFunc() func(*Command, []string) { - if c.helpFunc != nil { - return c.helpFunc - } - if c.HasParent() { - return c.Parent().HelpFunc() - } - return func(c *Command, a []string) { - c.mergePersistentFlags() - // The help should be sent to stdout - // See https://github.com/spf13/cobra/issues/1002 - err := tmpl(c.OutOrStdout(), c.HelpTemplate(), c) - if err != nil { - c.PrintErrln(err) - } - } -} - -// Help puts out the help for the command. -// Used when a user calls help [command]. -// Can be defined by user by overriding HelpFunc. -func (c *Command) Help() error { - c.HelpFunc()(c, []string{}) - return nil -} - -// UsageString returns usage string. -func (c *Command) UsageString() string { - // Storing normal writers - tmpOutput := c.outWriter - tmpErr := c.errWriter - - bb := new(bytes.Buffer) - c.outWriter = bb - c.errWriter = bb - - CheckErr(c.Usage()) - - // Setting things back to normal - c.outWriter = tmpOutput - c.errWriter = tmpErr - - return bb.String() -} - -// FlagErrorFunc returns either the function set by SetFlagErrorFunc for this -// command or a parent, or it returns a function which returns the original -// error. -func (c *Command) FlagErrorFunc() (f func(*Command, error) error) { - if c.flagErrorFunc != nil { - return c.flagErrorFunc - } - - if c.HasParent() { - return c.parent.FlagErrorFunc() - } - return func(c *Command, err error) error { - return err - } -} - -var minUsagePadding = 25 - -// UsagePadding return padding for the usage. -func (c *Command) UsagePadding() int { - if c.parent == nil || minUsagePadding > c.parent.commandsMaxUseLen { - return minUsagePadding - } - return c.parent.commandsMaxUseLen -} - -var minCommandPathPadding = 11 - -// CommandPathPadding return padding for the command path. -func (c *Command) CommandPathPadding() int { - if c.parent == nil || minCommandPathPadding > c.parent.commandsMaxCommandPathLen { - return minCommandPathPadding - } - return c.parent.commandsMaxCommandPathLen -} - -var minNamePadding = 11 - -// NamePadding returns padding for the name. -func (c *Command) NamePadding() int { - if c.parent == nil || minNamePadding > c.parent.commandsMaxNameLen { - return minNamePadding - } - return c.parent.commandsMaxNameLen -} - -// UsageTemplate returns usage template for the command. -func (c *Command) UsageTemplate() string { - if c.usageTemplate != "" { - return c.usageTemplate - } - - if c.HasParent() { - return c.parent.UsageTemplate() - } - return `Usage:{{if .Runnable}} - {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} - {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} - -Aliases: - {{.NameAndAliases}}{{end}}{{if .HasExample}} - -Examples: -{{.Example}}{{end}}{{if .HasAvailableSubCommands}}{{$cmds := .Commands}}{{if eq (len .Groups) 0}} - -Available Commands:{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name "help"))}} - {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{else}}{{range $group := .Groups}} - -{{.Title}}{{range $cmds}}{{if (and (eq .GroupID $group.ID) (or .IsAvailableCommand (eq .Name "help")))}} - {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if not .AllChildCommandsHaveGroup}} - -Additional Commands:{{range $cmds}}{{if (and (eq .GroupID "") (or .IsAvailableCommand (eq .Name "help")))}} - {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}} - -Flags: -{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}} - -Global Flags: -{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}} - -Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}} - {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}} - -Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}} -` -} - -// HelpTemplate return help template for the command. -func (c *Command) HelpTemplate() string { - if c.helpTemplate != "" { - return c.helpTemplate - } - - if c.HasParent() { - return c.parent.HelpTemplate() - } - return `{{with (or .Long .Short)}}{{. | trimTrailingWhitespaces}} - -{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}` -} - -// VersionTemplate return version template for the command. -func (c *Command) VersionTemplate() string { - if c.versionTemplate != "" { - return c.versionTemplate - } - - if c.HasParent() { - return c.parent.VersionTemplate() - } - return `{{with .Name}}{{printf "%s " .}}{{end}}{{printf "version %s" .Version}} -` -} - -// ErrPrefix return error message prefix for the command -func (c *Command) ErrPrefix() string { - if c.errPrefix != "" { - return c.errPrefix - } - - if c.HasParent() { - return c.parent.ErrPrefix() - } - return "Error:" -} - -func hasNoOptDefVal(name string, fs *flag.FlagSet) bool { - flag := fs.Lookup(name) - if flag == nil { - return false - } - return flag.NoOptDefVal != "" -} - -func shortHasNoOptDefVal(name string, fs *flag.FlagSet) bool { - if len(name) == 0 { - return false - } - - flag := fs.ShorthandLookup(name[:1]) - if flag == nil { - return false - } - return flag.NoOptDefVal != "" -} - -func stripFlags(args []string, c *Command) []string { - if len(args) == 0 { - return args - } - c.mergePersistentFlags() - - commands := []string{} - flags := c.Flags() - -Loop: - for len(args) > 0 { - s := args[0] - args = args[1:] - switch { - case s == "--": - // "--" terminates the flags - break Loop - case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags): - // If '--flag arg' then - // delete arg from args. - fallthrough // (do the same as below) - case strings.HasPrefix(s, "-") && !strings.Contains(s, "=") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags): - // If '-f arg' then - // delete 'arg' from args or break the loop if len(args) <= 1. - if len(args) <= 1 { - break Loop - } else { - args = args[1:] - continue - } - case s != "" && !strings.HasPrefix(s, "-"): - commands = append(commands, s) - } - } - - return commands -} - -// argsMinusFirstX removes only the first x from args. Otherwise, commands that look like -// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]). -// Special care needs to be taken not to remove a flag value. -func (c *Command) argsMinusFirstX(args []string, x string) []string { - if len(args) == 0 { - return args - } - c.mergePersistentFlags() - flags := c.Flags() - -Loop: - for pos := 0; pos < len(args); pos++ { - s := args[pos] - switch { - case s == "--": - // -- means we have reached the end of the parseable args. Break out of the loop now. - break Loop - case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags): - fallthrough - case strings.HasPrefix(s, "-") && !strings.Contains(s, "=") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags): - // This is a flag without a default value, and an equal sign is not used. Increment pos in order to skip - // over the next arg, because that is the value of this flag. - pos++ - continue - case !strings.HasPrefix(s, "-"): - // This is not a flag or a flag value. Check to see if it matches what we're looking for, and if so, - // return the args, excluding the one at this position. - if s == x { - ret := []string{} - ret = append(ret, args[:pos]...) - ret = append(ret, args[pos+1:]...) - return ret - } - } - } - return args -} - -func isFlagArg(arg string) bool { - return ((len(arg) >= 3 && arg[0:2] == "--") || - (len(arg) >= 2 && arg[0] == '-' && arg[1] != '-')) -} - -// Find the target command given the args and command tree -// Meant to be run on the highest node. Only searches down. -func (c *Command) Find(args []string) (*Command, []string, error) { - var innerfind func(*Command, []string) (*Command, []string) - - innerfind = func(c *Command, innerArgs []string) (*Command, []string) { - argsWOflags := stripFlags(innerArgs, c) - if len(argsWOflags) == 0 { - return c, innerArgs - } - nextSubCmd := argsWOflags[0] - - cmd := c.findNext(nextSubCmd) - if cmd != nil { - return innerfind(cmd, c.argsMinusFirstX(innerArgs, nextSubCmd)) - } - return c, innerArgs - } - - commandFound, a := innerfind(c, args) - if commandFound.Args == nil { - return commandFound, a, legacyArgs(commandFound, stripFlags(a, commandFound)) - } - return commandFound, a, nil -} - -func (c *Command) findSuggestions(arg string) string { - if c.DisableSuggestions { - return "" - } - if c.SuggestionsMinimumDistance <= 0 { - c.SuggestionsMinimumDistance = 2 - } - suggestionsString := "" - if suggestions := c.SuggestionsFor(arg); len(suggestions) > 0 { - suggestionsString += "\n\nDid you mean this?\n" - for _, s := range suggestions { - suggestionsString += fmt.Sprintf("\t%v\n", s) - } - } - return suggestionsString -} - -func (c *Command) findNext(next string) *Command { - matches := make([]*Command, 0) - for _, cmd := range c.commands { - if commandNameMatches(cmd.Name(), next) || cmd.HasAlias(next) { - cmd.commandCalledAs.name = next - return cmd - } - if EnablePrefixMatching && cmd.hasNameOrAliasPrefix(next) { - matches = append(matches, cmd) - } - } - - if len(matches) == 1 { - // Temporarily disable gosec G602, which produces a false positive. - // See https://github.com/securego/gosec/issues/1005. - return matches[0] // #nosec G602 - } - - return nil -} - -// Traverse the command tree to find the command, and parse args for -// each parent. -func (c *Command) Traverse(args []string) (*Command, []string, error) { - flags := []string{} - inFlag := false - - for i, arg := range args { - switch { - // A long flag with a space separated value - case strings.HasPrefix(arg, "--") && !strings.Contains(arg, "="): - // TODO: this isn't quite right, we should really check ahead for 'true' or 'false' - inFlag = !hasNoOptDefVal(arg[2:], c.Flags()) - flags = append(flags, arg) - continue - // A short flag with a space separated value - case strings.HasPrefix(arg, "-") && !strings.Contains(arg, "=") && len(arg) == 2 && !shortHasNoOptDefVal(arg[1:], c.Flags()): - inFlag = true - flags = append(flags, arg) - continue - // The value for a flag - case inFlag: - inFlag = false - flags = append(flags, arg) - continue - // A flag without a value, or with an `=` separated value - case isFlagArg(arg): - flags = append(flags, arg) - continue - } - - cmd := c.findNext(arg) - if cmd == nil { - return c, args, nil - } - - if err := c.ParseFlags(flags); err != nil { - return nil, args, err - } - return cmd.Traverse(args[i+1:]) - } - return c, args, nil -} - -// SuggestionsFor provides suggestions for the typedName. -func (c *Command) SuggestionsFor(typedName string) []string { - suggestions := []string{} - for _, cmd := range c.commands { - if cmd.IsAvailableCommand() { - levenshteinDistance := ld(typedName, cmd.Name(), true) - suggestByLevenshtein := levenshteinDistance <= c.SuggestionsMinimumDistance - suggestByPrefix := strings.HasPrefix(strings.ToLower(cmd.Name()), strings.ToLower(typedName)) - if suggestByLevenshtein || suggestByPrefix { - suggestions = append(suggestions, cmd.Name()) - } - for _, explicitSuggestion := range cmd.SuggestFor { - if strings.EqualFold(typedName, explicitSuggestion) { - suggestions = append(suggestions, cmd.Name()) - } - } - } - } - return suggestions -} - -// VisitParents visits all parents of the command and invokes fn on each parent. -func (c *Command) VisitParents(fn func(*Command)) { - if c.HasParent() { - fn(c.Parent()) - c.Parent().VisitParents(fn) - } -} - -// Root finds root command. -func (c *Command) Root() *Command { - if c.HasParent() { - return c.Parent().Root() - } - return c -} - -// ArgsLenAtDash will return the length of c.Flags().Args at the moment -// when a -- was found during args parsing. -func (c *Command) ArgsLenAtDash() int { - return c.Flags().ArgsLenAtDash() -} - -func (c *Command) execute(a []string) (err error) { - if c == nil { - return fmt.Errorf("Called Execute() on a nil Command") - } - - if len(c.Deprecated) > 0 { - c.Printf("Command %q is deprecated, %s\n", c.Name(), c.Deprecated) - } - - // initialize help and version flag at the last point possible to allow for user - // overriding - c.InitDefaultHelpFlag() - c.InitDefaultVersionFlag() - - err = c.ParseFlags(a) - if err != nil { - return c.FlagErrorFunc()(c, err) - } - - // If help is called, regardless of other flags, return we want help. - // Also say we need help if the command isn't runnable. - helpVal, err := c.Flags().GetBool("help") - if err != nil { - // should be impossible to get here as we always declare a help - // flag in InitDefaultHelpFlag() - c.Println("\"help\" flag declared as non-bool. Please correct your code") - return err - } - - if helpVal { - return flag.ErrHelp - } - - // for back-compat, only add version flag behavior if version is defined - if c.Version != "" { - versionVal, err := c.Flags().GetBool("version") - if err != nil { - c.Println("\"version\" flag declared as non-bool. Please correct your code") - return err - } - if versionVal { - err := tmpl(c.OutOrStdout(), c.VersionTemplate(), c) - if err != nil { - c.Println(err) - } - return err - } - } - - if !c.Runnable() { - return flag.ErrHelp - } - - c.preRun() - - defer c.postRun() - - argWoFlags := c.Flags().Args() - if c.DisableFlagParsing { - argWoFlags = a - } - - if err := c.ValidateArgs(argWoFlags); err != nil { - return err - } - - parents := make([]*Command, 0, 5) - for p := c; p != nil; p = p.Parent() { - if EnableTraverseRunHooks { - // When EnableTraverseRunHooks is set: - // - Execute all persistent pre-runs from the root parent till this command. - // - Execute all persistent post-runs from this command till the root parent. - parents = append([]*Command{p}, parents...) - } else { - // Otherwise, execute only the first found persistent hook. - parents = append(parents, p) - } - } - for _, p := range parents { - if p.PersistentPreRunE != nil { - if err := p.PersistentPreRunE(c, argWoFlags); err != nil { - return err - } - if !EnableTraverseRunHooks { - break - } - } else if p.PersistentPreRun != nil { - p.PersistentPreRun(c, argWoFlags) - if !EnableTraverseRunHooks { - break - } - } - } - if c.PreRunE != nil { - if err := c.PreRunE(c, argWoFlags); err != nil { - return err - } - } else if c.PreRun != nil { - c.PreRun(c, argWoFlags) - } - - if err := c.ValidateRequiredFlags(); err != nil { - return err - } - if err := c.ValidateFlagGroups(); err != nil { - return err - } - - if c.RunE != nil { - if err := c.RunE(c, argWoFlags); err != nil { - return err - } - } else { - c.Run(c, argWoFlags) - } - if c.PostRunE != nil { - if err := c.PostRunE(c, argWoFlags); err != nil { - return err - } - } else if c.PostRun != nil { - c.PostRun(c, argWoFlags) - } - for p := c; p != nil; p = p.Parent() { - if p.PersistentPostRunE != nil { - if err := p.PersistentPostRunE(c, argWoFlags); err != nil { - return err - } - if !EnableTraverseRunHooks { - break - } - } else if p.PersistentPostRun != nil { - p.PersistentPostRun(c, argWoFlags) - if !EnableTraverseRunHooks { - break - } - } - } - - return nil -} - -func (c *Command) preRun() { - for _, x := range initializers { - x() - } -} - -func (c *Command) postRun() { - for _, x := range finalizers { - x() - } -} - -// ExecuteContext is the same as Execute(), but sets the ctx on the command. -// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs -// functions. -func (c *Command) ExecuteContext(ctx context.Context) error { - c.ctx = ctx - return c.Execute() -} - -// Execute uses the args (os.Args[1:] by default) -// and run through the command tree finding appropriate matches -// for commands and then corresponding flags. -func (c *Command) Execute() error { - _, err := c.ExecuteC() - return err -} - -// ExecuteContextC is the same as ExecuteC(), but sets the ctx on the command. -// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs -// functions. -func (c *Command) ExecuteContextC(ctx context.Context) (*Command, error) { - c.ctx = ctx - return c.ExecuteC() -} - -// ExecuteC executes the command. -func (c *Command) ExecuteC() (cmd *Command, err error) { - if c.ctx == nil { - c.ctx = context.Background() - } - - // Regardless of what command execute is called on, run on Root only - if c.HasParent() { - return c.Root().ExecuteC() - } - - // windows hook - if preExecHookFn != nil { - preExecHookFn(c) - } - - // initialize help at the last point to allow for user overriding - c.InitDefaultHelpCmd() - // initialize completion at the last point to allow for user overriding - c.InitDefaultCompletionCmd() - - // Now that all commands have been created, let's make sure all groups - // are properly created also - c.checkCommandGroups() - - args := c.args - - // Workaround FAIL with "go test -v" or "cobra.test -test.v", see #155 - if c.args == nil && filepath.Base(os.Args[0]) != "cobra.test" { - args = os.Args[1:] - } - - // initialize the hidden command to be used for shell completion - c.initCompleteCmd(args) - - var flags []string - if c.TraverseChildren { - cmd, flags, err = c.Traverse(args) - } else { - cmd, flags, err = c.Find(args) - } - if err != nil { - // If found parse to a subcommand and then failed, talk about the subcommand - if cmd != nil { - c = cmd - } - if !c.SilenceErrors { - c.PrintErrln(c.ErrPrefix(), err.Error()) - c.PrintErrf("Run '%v --help' for usage.\n", c.CommandPath()) - } - return c, err - } - - cmd.commandCalledAs.called = true - if cmd.commandCalledAs.name == "" { - cmd.commandCalledAs.name = cmd.Name() - } - - // We have to pass global context to children command - // if context is present on the parent command. - if cmd.ctx == nil { - cmd.ctx = c.ctx - } - - err = cmd.execute(flags) - if err != nil { - // Always show help if requested, even if SilenceErrors is in - // effect - if errors.Is(err, flag.ErrHelp) { - cmd.HelpFunc()(cmd, args) - return cmd, nil - } - - // If root command has SilenceErrors flagged, - // all subcommands should respect it - if !cmd.SilenceErrors && !c.SilenceErrors { - c.PrintErrln(cmd.ErrPrefix(), err.Error()) - } - - // If root command has SilenceUsage flagged, - // all subcommands should respect it - if !cmd.SilenceUsage && !c.SilenceUsage { - c.Println(cmd.UsageString()) - } - } - return cmd, err -} - -func (c *Command) ValidateArgs(args []string) error { - if c.Args == nil { - return ArbitraryArgs(c, args) - } - return c.Args(c, args) -} - -// ValidateRequiredFlags validates all required flags are present and returns an error otherwise -func (c *Command) ValidateRequiredFlags() error { - if c.DisableFlagParsing { - return nil - } - - flags := c.Flags() - missingFlagNames := []string{} - flags.VisitAll(func(pflag *flag.Flag) { - requiredAnnotation, found := pflag.Annotations[BashCompOneRequiredFlag] - if !found { - return - } - if (requiredAnnotation[0] == "true") && !pflag.Changed { - missingFlagNames = append(missingFlagNames, pflag.Name) - } - }) - - if len(missingFlagNames) > 0 { - return fmt.Errorf(`required flag(s) "%s" not set`, strings.Join(missingFlagNames, `", "`)) - } - return nil -} - -// checkCommandGroups checks if a command has been added to a group that does not exists. -// If so, we panic because it indicates a coding error that should be corrected. -func (c *Command) checkCommandGroups() { - for _, sub := range c.commands { - // if Group is not defined let the developer know right away - if sub.GroupID != "" && !c.ContainsGroup(sub.GroupID) { - panic(fmt.Sprintf("group id '%s' is not defined for subcommand '%s'", sub.GroupID, sub.CommandPath())) - } - - sub.checkCommandGroups() - } -} - -// InitDefaultHelpFlag adds default help flag to c. -// It is called automatically by executing the c or by calling help and usage. -// If c already has help flag, it will do nothing. -func (c *Command) InitDefaultHelpFlag() { - c.mergePersistentFlags() - if c.Flags().Lookup("help") == nil { - usage := "help for " - if c.Name() == "" { - usage += "this command" - } else { - usage += c.Name() - } - c.Flags().BoolP("help", "h", false, usage) - _ = c.Flags().SetAnnotation("help", FlagSetByCobraAnnotation, []string{"true"}) - } -} - -// InitDefaultVersionFlag adds default version flag to c. -// It is called automatically by executing the c. -// If c already has a version flag, it will do nothing. -// If c.Version is empty, it will do nothing. -func (c *Command) InitDefaultVersionFlag() { - if c.Version == "" { - return - } - - c.mergePersistentFlags() - if c.Flags().Lookup("version") == nil { - usage := "version for " - if c.Name() == "" { - usage += "this command" - } else { - usage += c.Name() - } - if c.Flags().ShorthandLookup("v") == nil { - c.Flags().BoolP("version", "v", false, usage) - } else { - c.Flags().Bool("version", false, usage) - } - _ = c.Flags().SetAnnotation("version", FlagSetByCobraAnnotation, []string{"true"}) - } -} - -// InitDefaultHelpCmd adds default help command to c. -// It is called automatically by executing the c or by calling help and usage. -// If c already has help command or c has no subcommands, it will do nothing. -func (c *Command) InitDefaultHelpCmd() { - if !c.HasSubCommands() { - return - } - - if c.helpCommand == nil { - c.helpCommand = &Command{ - Use: "help [command]", - Short: "Help about any command", - Long: `Help provides help for any command in the application. -Simply type ` + c.Name() + ` help [path to command] for full details.`, - ValidArgsFunction: func(c *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - var completions []string - cmd, _, e := c.Root().Find(args) - if e != nil { - return nil, ShellCompDirectiveNoFileComp - } - if cmd == nil { - // Root help command. - cmd = c.Root() - } - for _, subCmd := range cmd.Commands() { - if subCmd.IsAvailableCommand() || subCmd == cmd.helpCommand { - if strings.HasPrefix(subCmd.Name(), toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) - } - } - } - return completions, ShellCompDirectiveNoFileComp - }, - Run: func(c *Command, args []string) { - cmd, _, e := c.Root().Find(args) - if cmd == nil || e != nil { - c.Printf("Unknown help topic %#q\n", args) - CheckErr(c.Root().Usage()) - } else { - cmd.InitDefaultHelpFlag() // make possible 'help' flag to be shown - cmd.InitDefaultVersionFlag() // make possible 'version' flag to be shown - CheckErr(cmd.Help()) - } - }, - GroupID: c.helpCommandGroupID, - } - } - c.RemoveCommand(c.helpCommand) - c.AddCommand(c.helpCommand) -} - -// ResetCommands delete parent, subcommand and help command from c. -func (c *Command) ResetCommands() { - c.parent = nil - c.commands = nil - c.helpCommand = nil - c.parentsPflags = nil -} - -// Sorts commands by their names. -type commandSorterByName []*Command - -func (c commandSorterByName) Len() int { return len(c) } -func (c commandSorterByName) Swap(i, j int) { c[i], c[j] = c[j], c[i] } -func (c commandSorterByName) Less(i, j int) bool { return c[i].Name() < c[j].Name() } - -// Commands returns a sorted slice of child commands. -func (c *Command) Commands() []*Command { - // do not sort commands if it already sorted or sorting was disabled - if EnableCommandSorting && !c.commandsAreSorted { - sort.Sort(commandSorterByName(c.commands)) - c.commandsAreSorted = true - } - return c.commands -} - -// AddCommand adds one or more commands to this parent command. -func (c *Command) AddCommand(cmds ...*Command) { - for i, x := range cmds { - if cmds[i] == c { - panic("Command can't be a child of itself") - } - cmds[i].parent = c - // update max lengths - usageLen := len(x.Use) - if usageLen > c.commandsMaxUseLen { - c.commandsMaxUseLen = usageLen - } - commandPathLen := len(x.CommandPath()) - if commandPathLen > c.commandsMaxCommandPathLen { - c.commandsMaxCommandPathLen = commandPathLen - } - nameLen := len(x.Name()) - if nameLen > c.commandsMaxNameLen { - c.commandsMaxNameLen = nameLen - } - // If global normalization function exists, update all children - if c.globNormFunc != nil { - x.SetGlobalNormalizationFunc(c.globNormFunc) - } - c.commands = append(c.commands, x) - c.commandsAreSorted = false - } -} - -// Groups returns a slice of child command groups. -func (c *Command) Groups() []*Group { - return c.commandgroups -} - -// AllChildCommandsHaveGroup returns if all subcommands are assigned to a group -func (c *Command) AllChildCommandsHaveGroup() bool { - for _, sub := range c.commands { - if (sub.IsAvailableCommand() || sub == c.helpCommand) && sub.GroupID == "" { - return false - } - } - return true -} - -// ContainsGroup return if groupID exists in the list of command groups. -func (c *Command) ContainsGroup(groupID string) bool { - for _, x := range c.commandgroups { - if x.ID == groupID { - return true - } - } - return false -} - -// AddGroup adds one or more command groups to this parent command. -func (c *Command) AddGroup(groups ...*Group) { - c.commandgroups = append(c.commandgroups, groups...) -} - -// RemoveCommand removes one or more commands from a parent command. -func (c *Command) RemoveCommand(cmds ...*Command) { - commands := []*Command{} -main: - for _, command := range c.commands { - for _, cmd := range cmds { - if command == cmd { - command.parent = nil - continue main - } - } - commands = append(commands, command) - } - c.commands = commands - // recompute all lengths - c.commandsMaxUseLen = 0 - c.commandsMaxCommandPathLen = 0 - c.commandsMaxNameLen = 0 - for _, command := range c.commands { - usageLen := len(command.Use) - if usageLen > c.commandsMaxUseLen { - c.commandsMaxUseLen = usageLen - } - commandPathLen := len(command.CommandPath()) - if commandPathLen > c.commandsMaxCommandPathLen { - c.commandsMaxCommandPathLen = commandPathLen - } - nameLen := len(command.Name()) - if nameLen > c.commandsMaxNameLen { - c.commandsMaxNameLen = nameLen - } - } -} - -// Print is a convenience method to Print to the defined output, fallback to Stderr if not set. -func (c *Command) Print(i ...interface{}) { - fmt.Fprint(c.OutOrStderr(), i...) -} - -// Println is a convenience method to Println to the defined output, fallback to Stderr if not set. -func (c *Command) Println(i ...interface{}) { - c.Print(fmt.Sprintln(i...)) -} - -// Printf is a convenience method to Printf to the defined output, fallback to Stderr if not set. -func (c *Command) Printf(format string, i ...interface{}) { - c.Print(fmt.Sprintf(format, i...)) -} - -// PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set. -func (c *Command) PrintErr(i ...interface{}) { - fmt.Fprint(c.ErrOrStderr(), i...) -} - -// PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set. -func (c *Command) PrintErrln(i ...interface{}) { - c.PrintErr(fmt.Sprintln(i...)) -} - -// PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set. -func (c *Command) PrintErrf(format string, i ...interface{}) { - c.PrintErr(fmt.Sprintf(format, i...)) -} - -// CommandPath returns the full path to this command. -func (c *Command) CommandPath() string { - if c.HasParent() { - return c.Parent().CommandPath() + " " + c.Name() - } - if displayName, ok := c.Annotations[CommandDisplayNameAnnotation]; ok { - return displayName - } - return c.Name() -} - -// UseLine puts out the full usage for a given command (including parents). -func (c *Command) UseLine() string { - var useline string - if c.HasParent() { - useline = c.parent.CommandPath() + " " + c.Use - } else { - useline = c.Use - } - if c.DisableFlagsInUseLine { - return useline - } - if c.HasAvailableFlags() && !strings.Contains(useline, "[flags]") { - useline += " [flags]" - } - return useline -} - -// DebugFlags used to determine which flags have been assigned to which commands -// and which persist. -// nolint:goconst -func (c *Command) DebugFlags() { - c.Println("DebugFlags called on", c.Name()) - var debugflags func(*Command) - - debugflags = func(x *Command) { - if x.HasFlags() || x.HasPersistentFlags() { - c.Println(x.Name()) - } - if x.HasFlags() { - x.flags.VisitAll(func(f *flag.Flag) { - if x.HasPersistentFlags() && x.persistentFlag(f.Name) != nil { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [LP]") - } else { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [L]") - } - }) - } - if x.HasPersistentFlags() { - x.pflags.VisitAll(func(f *flag.Flag) { - if x.HasFlags() { - if x.flags.Lookup(f.Name) == nil { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [P]") - } - } else { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [P]") - } - }) - } - c.Println(x.flagErrorBuf) - if x.HasSubCommands() { - for _, y := range x.commands { - debugflags(y) - } - } - } - - debugflags(c) -} - -// Name returns the command's name: the first word in the use line. -func (c *Command) Name() string { - name := c.Use - i := strings.Index(name, " ") - if i >= 0 { - name = name[:i] - } - return name -} - -// HasAlias determines if a given string is an alias of the command. -func (c *Command) HasAlias(s string) bool { - for _, a := range c.Aliases { - if commandNameMatches(a, s) { - return true - } - } - return false -} - -// CalledAs returns the command name or alias that was used to invoke -// this command or an empty string if the command has not been called. -func (c *Command) CalledAs() string { - if c.commandCalledAs.called { - return c.commandCalledAs.name - } - return "" -} - -// hasNameOrAliasPrefix returns true if the Name or any of aliases start -// with prefix -func (c *Command) hasNameOrAliasPrefix(prefix string) bool { - if strings.HasPrefix(c.Name(), prefix) { - c.commandCalledAs.name = c.Name() - return true - } - for _, alias := range c.Aliases { - if strings.HasPrefix(alias, prefix) { - c.commandCalledAs.name = alias - return true - } - } - return false -} - -// NameAndAliases returns a list of the command name and all aliases -func (c *Command) NameAndAliases() string { - return strings.Join(append([]string{c.Name()}, c.Aliases...), ", ") -} - -// HasExample determines if the command has example. -func (c *Command) HasExample() bool { - return len(c.Example) > 0 -} - -// Runnable determines if the command is itself runnable. -func (c *Command) Runnable() bool { - return c.Run != nil || c.RunE != nil -} - -// HasSubCommands determines if the command has children commands. -func (c *Command) HasSubCommands() bool { - return len(c.commands) > 0 -} - -// IsAvailableCommand determines if a command is available as a non-help command -// (this includes all non deprecated/hidden commands). -func (c *Command) IsAvailableCommand() bool { - if len(c.Deprecated) != 0 || c.Hidden { - return false - } - - if c.HasParent() && c.Parent().helpCommand == c { - return false - } - - if c.Runnable() || c.HasAvailableSubCommands() { - return true - } - - return false -} - -// IsAdditionalHelpTopicCommand determines if a command is an additional -// help topic command; additional help topic command is determined by the -// fact that it is NOT runnable/hidden/deprecated, and has no sub commands that -// are runnable/hidden/deprecated. -// Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924. -func (c *Command) IsAdditionalHelpTopicCommand() bool { - // if a command is runnable, deprecated, or hidden it is not a 'help' command - if c.Runnable() || len(c.Deprecated) != 0 || c.Hidden { - return false - } - - // if any non-help sub commands are found, the command is not a 'help' command - for _, sub := range c.commands { - if !sub.IsAdditionalHelpTopicCommand() { - return false - } - } - - // the command either has no sub commands, or no non-help sub commands - return true -} - -// HasHelpSubCommands determines if a command has any available 'help' sub commands -// that need to be shown in the usage/help default template under 'additional help -// topics'. -func (c *Command) HasHelpSubCommands() bool { - // return true on the first found available 'help' sub command - for _, sub := range c.commands { - if sub.IsAdditionalHelpTopicCommand() { - return true - } - } - - // the command either has no sub commands, or no available 'help' sub commands - return false -} - -// HasAvailableSubCommands determines if a command has available sub commands that -// need to be shown in the usage/help default template under 'available commands'. -func (c *Command) HasAvailableSubCommands() bool { - // return true on the first found available (non deprecated/help/hidden) - // sub command - for _, sub := range c.commands { - if sub.IsAvailableCommand() { - return true - } - } - - // the command either has no sub commands, or no available (non deprecated/help/hidden) - // sub commands - return false -} - -// HasParent determines if the command is a child command. -func (c *Command) HasParent() bool { - return c.parent != nil -} - -// GlobalNormalizationFunc returns the global normalization function or nil if it doesn't exist. -func (c *Command) GlobalNormalizationFunc() func(f *flag.FlagSet, name string) flag.NormalizedName { - return c.globNormFunc -} - -// Flags returns the complete FlagSet that applies -// to this command (local and persistent declared here and by all parents). -func (c *Command) Flags() *flag.FlagSet { - if c.flags == nil { - c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.flags.SetOutput(c.flagErrorBuf) - } - - return c.flags -} - -// LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands. -func (c *Command) LocalNonPersistentFlags() *flag.FlagSet { - persistentFlags := c.PersistentFlags() - - out := flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.LocalFlags().VisitAll(func(f *flag.Flag) { - if persistentFlags.Lookup(f.Name) == nil { - out.AddFlag(f) - } - }) - return out -} - -// LocalFlags returns the local FlagSet specifically set in the current command. -func (c *Command) LocalFlags() *flag.FlagSet { - c.mergePersistentFlags() - - if c.lflags == nil { - c.lflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.lflags.SetOutput(c.flagErrorBuf) - } - c.lflags.SortFlags = c.Flags().SortFlags - if c.globNormFunc != nil { - c.lflags.SetNormalizeFunc(c.globNormFunc) - } - - addToLocal := func(f *flag.Flag) { - // Add the flag if it is not a parent PFlag, or it shadows a parent PFlag - if c.lflags.Lookup(f.Name) == nil && f != c.parentsPflags.Lookup(f.Name) { - c.lflags.AddFlag(f) - } - } - c.Flags().VisitAll(addToLocal) - c.PersistentFlags().VisitAll(addToLocal) - return c.lflags -} - -// InheritedFlags returns all flags which were inherited from parent commands. -func (c *Command) InheritedFlags() *flag.FlagSet { - c.mergePersistentFlags() - - if c.iflags == nil { - c.iflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.iflags.SetOutput(c.flagErrorBuf) - } - - local := c.LocalFlags() - if c.globNormFunc != nil { - c.iflags.SetNormalizeFunc(c.globNormFunc) - } - - c.parentsPflags.VisitAll(func(f *flag.Flag) { - if c.iflags.Lookup(f.Name) == nil && local.Lookup(f.Name) == nil { - c.iflags.AddFlag(f) - } - }) - return c.iflags -} - -// NonInheritedFlags returns all flags which were not inherited from parent commands. -func (c *Command) NonInheritedFlags() *flag.FlagSet { - return c.LocalFlags() -} - -// PersistentFlags returns the persistent FlagSet specifically set in the current command. -func (c *Command) PersistentFlags() *flag.FlagSet { - if c.pflags == nil { - c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.pflags.SetOutput(c.flagErrorBuf) - } - return c.pflags -} - -// ResetFlags deletes all flags from command. -func (c *Command) ResetFlags() { - c.flagErrorBuf = new(bytes.Buffer) - c.flagErrorBuf.Reset() - c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.flags.SetOutput(c.flagErrorBuf) - c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.pflags.SetOutput(c.flagErrorBuf) - - c.lflags = nil - c.iflags = nil - c.parentsPflags = nil -} - -// HasFlags checks if the command contains any flags (local plus persistent from the entire structure). -func (c *Command) HasFlags() bool { - return c.Flags().HasFlags() -} - -// HasPersistentFlags checks if the command contains persistent flags. -func (c *Command) HasPersistentFlags() bool { - return c.PersistentFlags().HasFlags() -} - -// HasLocalFlags checks if the command has flags specifically declared locally. -func (c *Command) HasLocalFlags() bool { - return c.LocalFlags().HasFlags() -} - -// HasInheritedFlags checks if the command has flags inherited from its parent command. -func (c *Command) HasInheritedFlags() bool { - return c.InheritedFlags().HasFlags() -} - -// HasAvailableFlags checks if the command contains any flags (local plus persistent from the entire -// structure) which are not hidden or deprecated. -func (c *Command) HasAvailableFlags() bool { - return c.Flags().HasAvailableFlags() -} - -// HasAvailablePersistentFlags checks if the command contains persistent flags which are not hidden or deprecated. -func (c *Command) HasAvailablePersistentFlags() bool { - return c.PersistentFlags().HasAvailableFlags() -} - -// HasAvailableLocalFlags checks if the command has flags specifically declared locally which are not hidden -// or deprecated. -func (c *Command) HasAvailableLocalFlags() bool { - return c.LocalFlags().HasAvailableFlags() -} - -// HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are -// not hidden or deprecated. -func (c *Command) HasAvailableInheritedFlags() bool { - return c.InheritedFlags().HasAvailableFlags() -} - -// Flag climbs up the command tree looking for matching flag. -func (c *Command) Flag(name string) (flag *flag.Flag) { - flag = c.Flags().Lookup(name) - - if flag == nil { - flag = c.persistentFlag(name) - } - - return -} - -// Recursively find matching persistent flag. -func (c *Command) persistentFlag(name string) (flag *flag.Flag) { - if c.HasPersistentFlags() { - flag = c.PersistentFlags().Lookup(name) - } - - if flag == nil { - c.updateParentsPflags() - flag = c.parentsPflags.Lookup(name) - } - return -} - -// ParseFlags parses persistent flag tree and local flags. -func (c *Command) ParseFlags(args []string) error { - if c.DisableFlagParsing { - return nil - } - - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - beforeErrorBufLen := c.flagErrorBuf.Len() - c.mergePersistentFlags() - - // do it here after merging all flags and just before parse - c.Flags().ParseErrorsWhitelist = flag.ParseErrorsWhitelist(c.FParseErrWhitelist) - - err := c.Flags().Parse(args) - // Print warnings if they occurred (e.g. deprecated flag messages). - if c.flagErrorBuf.Len()-beforeErrorBufLen > 0 && err == nil { - c.Print(c.flagErrorBuf.String()) - } - - return err -} - -// Parent returns a commands parent command. -func (c *Command) Parent() *Command { - return c.parent -} - -// mergePersistentFlags merges c.PersistentFlags() to c.Flags() -// and adds missing persistent flags of all parents. -func (c *Command) mergePersistentFlags() { - c.updateParentsPflags() - c.Flags().AddFlagSet(c.PersistentFlags()) - c.Flags().AddFlagSet(c.parentsPflags) -} - -// updateParentsPflags updates c.parentsPflags by adding -// new persistent flags of all parents. -// If c.parentsPflags == nil, it makes new. -func (c *Command) updateParentsPflags() { - if c.parentsPflags == nil { - c.parentsPflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.parentsPflags.SetOutput(c.flagErrorBuf) - c.parentsPflags.SortFlags = false - } - - if c.globNormFunc != nil { - c.parentsPflags.SetNormalizeFunc(c.globNormFunc) - } - - c.Root().PersistentFlags().AddFlagSet(flag.CommandLine) - - c.VisitParents(func(parent *Command) { - c.parentsPflags.AddFlagSet(parent.PersistentFlags()) - }) -} - -// commandNameMatches checks if two command names are equal -// taking into account case sensitivity according to -// EnableCaseInsensitive global configuration. -func commandNameMatches(s string, t string) bool { - if EnableCaseInsensitive { - return strings.EqualFold(s, t) - } - - return s == t -} diff --git a/vendor/github.com/spf13/cobra/command_notwin.go b/vendor/github.com/spf13/cobra/command_notwin.go deleted file mode 100644 index 307f0c12..00000000 --- a/vendor/github.com/spf13/cobra/command_notwin.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2013-2023 The Cobra 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. - -//go:build !windows -// +build !windows - -package cobra - -var preExecHookFn func(*Command) diff --git a/vendor/github.com/spf13/cobra/command_win.go b/vendor/github.com/spf13/cobra/command_win.go deleted file mode 100644 index adbef395..00000000 --- a/vendor/github.com/spf13/cobra/command_win.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2013-2023 The Cobra 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. - -//go:build windows -// +build windows - -package cobra - -import ( - "fmt" - "os" - "time" - - "github.com/inconshreveable/mousetrap" -) - -var preExecHookFn = preExecHook - -func preExecHook(c *Command) { - if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { - c.Print(MousetrapHelpText) - if MousetrapDisplayDuration > 0 { - time.Sleep(MousetrapDisplayDuration) - } else { - c.Println("Press return to continue...") - fmt.Scanln() - } - os.Exit(1) - } -} diff --git a/vendor/github.com/spf13/cobra/completions.go b/vendor/github.com/spf13/cobra/completions.go deleted file mode 100644 index b60f6b20..00000000 --- a/vendor/github.com/spf13/cobra/completions.go +++ /dev/null @@ -1,901 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "fmt" - "os" - "strings" - "sync" - - "github.com/spf13/pflag" -) - -const ( - // ShellCompRequestCmd is the name of the hidden command that is used to request - // completion results from the program. It is used by the shell completion scripts. - ShellCompRequestCmd = "__complete" - // ShellCompNoDescRequestCmd is the name of the hidden command that is used to request - // completion results without their description. It is used by the shell completion scripts. - ShellCompNoDescRequestCmd = "__completeNoDesc" -) - -// Global map of flag completion functions. Make sure to use flagCompletionMutex before you try to read and write from it. -var flagCompletionFunctions = map[*pflag.Flag]func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective){} - -// lock for reading and writing from flagCompletionFunctions -var flagCompletionMutex = &sync.RWMutex{} - -// ShellCompDirective is a bit map representing the different behaviors the shell -// can be instructed to have once completions have been provided. -type ShellCompDirective int - -type flagCompError struct { - subCommand string - flagName string -} - -func (e *flagCompError) Error() string { - return "Subcommand '" + e.subCommand + "' does not support flag '" + e.flagName + "'" -} - -const ( - // ShellCompDirectiveError indicates an error occurred and completions should be ignored. - ShellCompDirectiveError ShellCompDirective = 1 << iota - - // ShellCompDirectiveNoSpace indicates that the shell should not add a space - // after the completion even if there is a single completion provided. - ShellCompDirectiveNoSpace - - // ShellCompDirectiveNoFileComp indicates that the shell should not provide - // file completion even when no completion is provided. - ShellCompDirectiveNoFileComp - - // ShellCompDirectiveFilterFileExt indicates that the provided completions - // should be used as file extension filters. - // For flags, using Command.MarkFlagFilename() and Command.MarkPersistentFlagFilename() - // is a shortcut to using this directive explicitly. The BashCompFilenameExt - // annotation can also be used to obtain the same behavior for flags. - ShellCompDirectiveFilterFileExt - - // ShellCompDirectiveFilterDirs indicates that only directory names should - // be provided in file completion. To request directory names within another - // directory, the returned completions should specify the directory within - // which to search. The BashCompSubdirsInDir annotation can be used to - // obtain the same behavior but only for flags. - ShellCompDirectiveFilterDirs - - // ShellCompDirectiveKeepOrder indicates that the shell should preserve the order - // in which the completions are provided - ShellCompDirectiveKeepOrder - - // =========================================================================== - - // All directives using iota should be above this one. - // For internal use. - shellCompDirectiveMaxValue - - // ShellCompDirectiveDefault indicates to let the shell perform its default - // behavior after completions have been provided. - // This one must be last to avoid messing up the iota count. - ShellCompDirectiveDefault ShellCompDirective = 0 -) - -const ( - // Constants for the completion command - compCmdName = "completion" - compCmdNoDescFlagName = "no-descriptions" - compCmdNoDescFlagDesc = "disable completion descriptions" - compCmdNoDescFlagDefault = false -) - -// CompletionOptions are the options to control shell completion -type CompletionOptions struct { - // DisableDefaultCmd prevents Cobra from creating a default 'completion' command - DisableDefaultCmd bool - // DisableNoDescFlag prevents Cobra from creating the '--no-descriptions' flag - // for shells that support completion descriptions - DisableNoDescFlag bool - // DisableDescriptions turns off all completion descriptions for shells - // that support them - DisableDescriptions bool - // HiddenDefaultCmd makes the default 'completion' command hidden - HiddenDefaultCmd bool -} - -// NoFileCompletions can be used to disable file completion for commands that should -// not trigger file completions. -func NoFileCompletions(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - return nil, ShellCompDirectiveNoFileComp -} - -// FixedCompletions can be used to create a completion function which always -// returns the same results. -func FixedCompletions(choices []string, directive ShellCompDirective) func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - return func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - return choices, directive - } -} - -// RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag. -func (c *Command) RegisterFlagCompletionFunc(flagName string, f func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)) error { - flag := c.Flag(flagName) - if flag == nil { - return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' does not exist", flagName) - } - flagCompletionMutex.Lock() - defer flagCompletionMutex.Unlock() - - if _, exists := flagCompletionFunctions[flag]; exists { - return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' already registered", flagName) - } - flagCompletionFunctions[flag] = f - return nil -} - -// GetFlagCompletionFunc returns the completion function for the given flag of the command, if available. -func (c *Command) GetFlagCompletionFunc(flagName string) (func(*Command, []string, string) ([]string, ShellCompDirective), bool) { - flag := c.Flag(flagName) - if flag == nil { - return nil, false - } - - flagCompletionMutex.RLock() - defer flagCompletionMutex.RUnlock() - - completionFunc, exists := flagCompletionFunctions[flag] - return completionFunc, exists -} - -// Returns a string listing the different directive enabled in the specified parameter -func (d ShellCompDirective) string() string { - var directives []string - if d&ShellCompDirectiveError != 0 { - directives = append(directives, "ShellCompDirectiveError") - } - if d&ShellCompDirectiveNoSpace != 0 { - directives = append(directives, "ShellCompDirectiveNoSpace") - } - if d&ShellCompDirectiveNoFileComp != 0 { - directives = append(directives, "ShellCompDirectiveNoFileComp") - } - if d&ShellCompDirectiveFilterFileExt != 0 { - directives = append(directives, "ShellCompDirectiveFilterFileExt") - } - if d&ShellCompDirectiveFilterDirs != 0 { - directives = append(directives, "ShellCompDirectiveFilterDirs") - } - if d&ShellCompDirectiveKeepOrder != 0 { - directives = append(directives, "ShellCompDirectiveKeepOrder") - } - if len(directives) == 0 { - directives = append(directives, "ShellCompDirectiveDefault") - } - - if d >= shellCompDirectiveMaxValue { - return fmt.Sprintf("ERROR: unexpected ShellCompDirective value: %d", d) - } - return strings.Join(directives, ", ") -} - -// initCompleteCmd adds a special hidden command that can be used to request custom completions. -func (c *Command) initCompleteCmd(args []string) { - completeCmd := &Command{ - Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd), - Aliases: []string{ShellCompNoDescRequestCmd}, - DisableFlagsInUseLine: true, - Hidden: true, - DisableFlagParsing: true, - Args: MinimumNArgs(1), - Short: "Request shell completion choices for the specified command-line", - Long: fmt.Sprintf("%[2]s is a special command that is used by the shell completion logic\n%[1]s", - "to request completion choices for the specified command-line.", ShellCompRequestCmd), - Run: func(cmd *Command, args []string) { - finalCmd, completions, directive, err := cmd.getCompletions(args) - if err != nil { - CompErrorln(err.Error()) - // Keep going for multiple reasons: - // 1- There could be some valid completions even though there was an error - // 2- Even without completions, we need to print the directive - } - - noDescriptions := (cmd.CalledAs() == ShellCompNoDescRequestCmd) - for _, comp := range completions { - if GetActiveHelpConfig(finalCmd) == activeHelpGlobalDisable { - // Remove all activeHelp entries in this case - if strings.HasPrefix(comp, activeHelpMarker) { - continue - } - } - if noDescriptions { - // Remove any description that may be included following a tab character. - comp = strings.Split(comp, "\t")[0] - } - - // Make sure we only write the first line to the output. - // This is needed if a description contains a linebreak. - // Otherwise the shell scripts will interpret the other lines as new flags - // and could therefore provide a wrong completion. - comp = strings.Split(comp, "\n")[0] - - // Finally trim the completion. This is especially important to get rid - // of a trailing tab when there are no description following it. - // For example, a sub-command without a description should not be completed - // with a tab at the end (or else zsh will show a -- following it - // although there is no description). - comp = strings.TrimSpace(comp) - - // Print each possible completion to stdout for the completion script to consume. - fmt.Fprintln(finalCmd.OutOrStdout(), comp) - } - - // As the last printout, print the completion directive for the completion script to parse. - // The directive integer must be that last character following a single colon (:). - // The completion script expects : - fmt.Fprintf(finalCmd.OutOrStdout(), ":%d\n", directive) - - // Print some helpful info to stderr for the user to understand. - // Output from stderr must be ignored by the completion script. - fmt.Fprintf(finalCmd.ErrOrStderr(), "Completion ended with directive: %s\n", directive.string()) - }, - } - c.AddCommand(completeCmd) - subCmd, _, err := c.Find(args) - if err != nil || subCmd.Name() != ShellCompRequestCmd { - // Only create this special command if it is actually being called. - // This reduces possible side-effects of creating such a command; - // for example, having this command would cause problems to a - // cobra program that only consists of the root command, since this - // command would cause the root command to suddenly have a subcommand. - c.RemoveCommand(completeCmd) - } -} - -func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDirective, error) { - // The last argument, which is not completely typed by the user, - // should not be part of the list of arguments - toComplete := args[len(args)-1] - trimmedArgs := args[:len(args)-1] - - var finalCmd *Command - var finalArgs []string - var err error - // Find the real command for which completion must be performed - // check if we need to traverse here to parse local flags on parent commands - if c.Root().TraverseChildren { - finalCmd, finalArgs, err = c.Root().Traverse(trimmedArgs) - } else { - // For Root commands that don't specify any value for their Args fields, when we call - // Find(), if those Root commands don't have any sub-commands, they will accept arguments. - // However, because we have added the __complete sub-command in the current code path, the - // call to Find() -> legacyArgs() will return an error if there are any arguments. - // To avoid this, we first remove the __complete command to get back to having no sub-commands. - rootCmd := c.Root() - if len(rootCmd.Commands()) == 1 { - rootCmd.RemoveCommand(c) - } - - finalCmd, finalArgs, err = rootCmd.Find(trimmedArgs) - } - if err != nil { - // Unable to find the real command. E.g., someInvalidCmd - return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Unable to find a command for arguments: %v", trimmedArgs) - } - finalCmd.ctx = c.ctx - - // These flags are normally added when `execute()` is called on `finalCmd`, - // however, when doing completion, we don't call `finalCmd.execute()`. - // Let's add the --help and --version flag ourselves but only if the finalCmd - // has not disabled flag parsing; if flag parsing is disabled, it is up to the - // finalCmd itself to handle the completion of *all* flags. - if !finalCmd.DisableFlagParsing { - finalCmd.InitDefaultHelpFlag() - finalCmd.InitDefaultVersionFlag() - } - - // Check if we are doing flag value completion before parsing the flags. - // This is important because if we are completing a flag value, we need to also - // remove the flag name argument from the list of finalArgs or else the parsing - // could fail due to an invalid value (incomplete) for the flag. - flag, finalArgs, toComplete, flagErr := checkIfFlagCompletion(finalCmd, finalArgs, toComplete) - - // Check if interspersed is false or -- was set on a previous arg. - // This works by counting the arguments. Normally -- is not counted as arg but - // if -- was already set or interspersed is false and there is already one arg then - // the extra added -- is counted as arg. - flagCompletion := true - _ = finalCmd.ParseFlags(append(finalArgs, "--")) - newArgCount := finalCmd.Flags().NArg() - - // Parse the flags early so we can check if required flags are set - if err = finalCmd.ParseFlags(finalArgs); err != nil { - return finalCmd, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Error while parsing flags from args %v: %s", finalArgs, err.Error()) - } - - realArgCount := finalCmd.Flags().NArg() - if newArgCount > realArgCount { - // don't do flag completion (see above) - flagCompletion = false - } - // Error while attempting to parse flags - if flagErr != nil { - // If error type is flagCompError and we don't want flagCompletion we should ignore the error - if _, ok := flagErr.(*flagCompError); !(ok && !flagCompletion) { - return finalCmd, []string{}, ShellCompDirectiveDefault, flagErr - } - } - - // Look for the --help or --version flags. If they are present, - // there should be no further completions. - if helpOrVersionFlagPresent(finalCmd) { - return finalCmd, []string{}, ShellCompDirectiveNoFileComp, nil - } - - // We only remove the flags from the arguments if DisableFlagParsing is not set. - // This is important for commands which have requested to do their own flag completion. - if !finalCmd.DisableFlagParsing { - finalArgs = finalCmd.Flags().Args() - } - - if flag != nil && flagCompletion { - // Check if we are completing a flag value subject to annotations - if validExts, present := flag.Annotations[BashCompFilenameExt]; present { - if len(validExts) != 0 { - // File completion filtered by extensions - return finalCmd, validExts, ShellCompDirectiveFilterFileExt, nil - } - - // The annotation requests simple file completion. There is no reason to do - // that since it is the default behavior anyway. Let's ignore this annotation - // in case the program also registered a completion function for this flag. - // Even though it is a mistake on the program's side, let's be nice when we can. - } - - if subDir, present := flag.Annotations[BashCompSubdirsInDir]; present { - if len(subDir) == 1 { - // Directory completion from within a directory - return finalCmd, subDir, ShellCompDirectiveFilterDirs, nil - } - // Directory completion - return finalCmd, []string{}, ShellCompDirectiveFilterDirs, nil - } - } - - var completions []string - var directive ShellCompDirective - - // Enforce flag groups before doing flag completions - finalCmd.enforceFlagGroupsForCompletion() - - // Note that we want to perform flagname completion even if finalCmd.DisableFlagParsing==true; - // doing this allows for completion of persistent flag names even for commands that disable flag parsing. - // - // When doing completion of a flag name, as soon as an argument starts with - // a '-' we know it is a flag. We cannot use isFlagArg() here as it requires - // the flag name to be complete - if flag == nil && len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, "=") && flagCompletion { - // First check for required flags - completions = completeRequireFlags(finalCmd, toComplete) - - // If we have not found any required flags, only then can we show regular flags - if len(completions) == 0 { - doCompleteFlags := func(flag *pflag.Flag) { - if !flag.Changed || - strings.Contains(flag.Value.Type(), "Slice") || - strings.Contains(flag.Value.Type(), "Array") { - // If the flag is not already present, or if it can be specified multiple times (Array or Slice) - // we suggest it as a completion - completions = append(completions, getFlagNameCompletions(flag, toComplete)...) - } - } - - // We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands - // that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and - // non-inherited flags. - finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteFlags(flag) - }) - // Try to complete non-inherited flags even if DisableFlagParsing==true. - // This allows programs to tell Cobra about flags for completion even - // if the actual parsing of flags is not done by Cobra. - // For instance, Helm uses this to provide flag name completion for - // some of its plugins. - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteFlags(flag) - }) - } - - directive = ShellCompDirectiveNoFileComp - if len(completions) == 1 && strings.HasSuffix(completions[0], "=") { - // If there is a single completion, the shell usually adds a space - // after the completion. We don't want that if the flag ends with an = - directive = ShellCompDirectiveNoSpace - } - - if !finalCmd.DisableFlagParsing { - // If DisableFlagParsing==false, we have completed the flags as known by Cobra; - // we can return what we found. - // If DisableFlagParsing==true, Cobra may not be aware of all flags, so we - // let the logic continue to see if ValidArgsFunction needs to be called. - return finalCmd, completions, directive, nil - } - } else { - directive = ShellCompDirectiveDefault - if flag == nil { - foundLocalNonPersistentFlag := false - // If TraverseChildren is true on the root command we don't check for - // local flags because we can use a local flag on a parent command - if !finalCmd.Root().TraverseChildren { - // Check if there are any local, non-persistent flags on the command-line - localNonPersistentFlags := finalCmd.LocalNonPersistentFlags() - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed { - foundLocalNonPersistentFlag = true - } - }) - } - - // Complete subcommand names, including the help command - if len(finalArgs) == 0 && !foundLocalNonPersistentFlag { - // We only complete sub-commands if: - // - there are no arguments on the command-line and - // - there are no local, non-persistent flags on the command-line or TraverseChildren is true - for _, subCmd := range finalCmd.Commands() { - if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand { - if strings.HasPrefix(subCmd.Name(), toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) - } - directive = ShellCompDirectiveNoFileComp - } - } - } - - // Complete required flags even without the '-' prefix - completions = append(completions, completeRequireFlags(finalCmd, toComplete)...) - - // Always complete ValidArgs, even if we are completing a subcommand name. - // This is for commands that have both subcommands and ValidArgs. - if len(finalCmd.ValidArgs) > 0 { - if len(finalArgs) == 0 { - // ValidArgs are only for the first argument - for _, validArg := range finalCmd.ValidArgs { - if strings.HasPrefix(validArg, toComplete) { - completions = append(completions, validArg) - } - } - directive = ShellCompDirectiveNoFileComp - - // If no completions were found within commands or ValidArgs, - // see if there are any ArgAliases that should be completed. - if len(completions) == 0 { - for _, argAlias := range finalCmd.ArgAliases { - if strings.HasPrefix(argAlias, toComplete) { - completions = append(completions, argAlias) - } - } - } - } - - // If there are ValidArgs specified (even if they don't match), we stop completion. - // Only one of ValidArgs or ValidArgsFunction can be used for a single command. - return finalCmd, completions, directive, nil - } - - // Let the logic continue so as to add any ValidArgsFunction completions, - // even if we already found sub-commands. - // This is for commands that have subcommands but also specify a ValidArgsFunction. - } - } - - // Find the completion function for the flag or command - var completionFn func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) - if flag != nil && flagCompletion { - flagCompletionMutex.RLock() - completionFn = flagCompletionFunctions[flag] - flagCompletionMutex.RUnlock() - } else { - completionFn = finalCmd.ValidArgsFunction - } - if completionFn != nil { - // Go custom completion defined for this flag or command. - // Call the registered completion function to get the completions. - var comps []string - comps, directive = completionFn(finalCmd, finalArgs, toComplete) - completions = append(completions, comps...) - } - - return finalCmd, completions, directive, nil -} - -func helpOrVersionFlagPresent(cmd *Command) bool { - if versionFlag := cmd.Flags().Lookup("version"); versionFlag != nil && - len(versionFlag.Annotations[FlagSetByCobraAnnotation]) > 0 && versionFlag.Changed { - return true - } - if helpFlag := cmd.Flags().Lookup("help"); helpFlag != nil && - len(helpFlag.Annotations[FlagSetByCobraAnnotation]) > 0 && helpFlag.Changed { - return true - } - return false -} - -func getFlagNameCompletions(flag *pflag.Flag, toComplete string) []string { - if nonCompletableFlag(flag) { - return []string{} - } - - var completions []string - flagName := "--" + flag.Name - if strings.HasPrefix(flagName, toComplete) { - // Flag without the = - completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) - - // Why suggest both long forms: --flag and --flag= ? - // This forces the user to *always* have to type either an = or a space after the flag name. - // Let's be nice and avoid making users have to do that. - // Since boolean flags and shortname flags don't show the = form, let's go that route and never show it. - // The = form will still work, we just won't suggest it. - // This also makes the list of suggested flags shorter as we avoid all the = forms. - // - // if len(flag.NoOptDefVal) == 0 { - // // Flag requires a value, so it can be suffixed with = - // flagName += "=" - // completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) - // } - } - - flagName = "-" + flag.Shorthand - if len(flag.Shorthand) > 0 && strings.HasPrefix(flagName, toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) - } - - return completions -} - -func completeRequireFlags(finalCmd *Command, toComplete string) []string { - var completions []string - - doCompleteRequiredFlags := func(flag *pflag.Flag) { - if _, present := flag.Annotations[BashCompOneRequiredFlag]; present { - if !flag.Changed { - // If the flag is not already present, we suggest it as a completion - completions = append(completions, getFlagNameCompletions(flag, toComplete)...) - } - } - } - - // We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands - // that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and - // non-inherited flags. - finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteRequiredFlags(flag) - }) - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteRequiredFlags(flag) - }) - - return completions -} - -func checkIfFlagCompletion(finalCmd *Command, args []string, lastArg string) (*pflag.Flag, []string, string, error) { - if finalCmd.DisableFlagParsing { - // We only do flag completion if we are allowed to parse flags - // This is important for commands which have requested to do their own flag completion. - return nil, args, lastArg, nil - } - - var flagName string - trimmedArgs := args - flagWithEqual := false - orgLastArg := lastArg - - // When doing completion of a flag name, as soon as an argument starts with - // a '-' we know it is a flag. We cannot use isFlagArg() here as that function - // requires the flag name to be complete - if len(lastArg) > 0 && lastArg[0] == '-' { - if index := strings.Index(lastArg, "="); index >= 0 { - // Flag with an = - if strings.HasPrefix(lastArg[:index], "--") { - // Flag has full name - flagName = lastArg[2:index] - } else { - // Flag is shorthand - // We have to get the last shorthand flag name - // e.g. `-asd` => d to provide the correct completion - // https://github.com/spf13/cobra/issues/1257 - flagName = lastArg[index-1 : index] - } - lastArg = lastArg[index+1:] - flagWithEqual = true - } else { - // Normal flag completion - return nil, args, lastArg, nil - } - } - - if len(flagName) == 0 { - if len(args) > 0 { - prevArg := args[len(args)-1] - if isFlagArg(prevArg) { - // Only consider the case where the flag does not contain an =. - // If the flag contains an = it means it has already been fully processed, - // so we don't need to deal with it here. - if index := strings.Index(prevArg, "="); index < 0 { - if strings.HasPrefix(prevArg, "--") { - // Flag has full name - flagName = prevArg[2:] - } else { - // Flag is shorthand - // We have to get the last shorthand flag name - // e.g. `-asd` => d to provide the correct completion - // https://github.com/spf13/cobra/issues/1257 - flagName = prevArg[len(prevArg)-1:] - } - // Remove the uncompleted flag or else there could be an error created - // for an invalid value for that flag - trimmedArgs = args[:len(args)-1] - } - } - } - } - - if len(flagName) == 0 { - // Not doing flag completion - return nil, trimmedArgs, lastArg, nil - } - - flag := findFlag(finalCmd, flagName) - if flag == nil { - // Flag not supported by this command, the interspersed option might be set so return the original args - return nil, args, orgLastArg, &flagCompError{subCommand: finalCmd.Name(), flagName: flagName} - } - - if !flagWithEqual { - if len(flag.NoOptDefVal) != 0 { - // We had assumed dealing with a two-word flag but the flag is a boolean flag. - // In that case, there is no value following it, so we are not really doing flag completion. - // Reset everything to do noun completion. - trimmedArgs = args - flag = nil - } - } - - return flag, trimmedArgs, lastArg, nil -} - -// InitDefaultCompletionCmd adds a default 'completion' command to c. -// This function will do nothing if any of the following is true: -// 1- the feature has been explicitly disabled by the program, -// 2- c has no subcommands (to avoid creating one), -// 3- c already has a 'completion' command provided by the program. -func (c *Command) InitDefaultCompletionCmd() { - if c.CompletionOptions.DisableDefaultCmd || !c.HasSubCommands() { - return - } - - for _, cmd := range c.commands { - if cmd.Name() == compCmdName || cmd.HasAlias(compCmdName) { - // A completion command is already available - return - } - } - - haveNoDescFlag := !c.CompletionOptions.DisableNoDescFlag && !c.CompletionOptions.DisableDescriptions - - completionCmd := &Command{ - Use: compCmdName, - Short: "Generate the autocompletion script for the specified shell", - Long: fmt.Sprintf(`Generate the autocompletion script for %[1]s for the specified shell. -See each sub-command's help for details on how to use the generated script. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - Hidden: c.CompletionOptions.HiddenDefaultCmd, - GroupID: c.completionCommandGroupID, - } - c.AddCommand(completionCmd) - - out := c.OutOrStdout() - noDesc := c.CompletionOptions.DisableDescriptions - shortDesc := "Generate the autocompletion script for %s" - bash := &Command{ - Use: "bash", - Short: fmt.Sprintf(shortDesc, "bash"), - Long: fmt.Sprintf(`Generate the autocompletion script for the bash shell. - -This script depends on the 'bash-completion' package. -If it is not installed already, you can install it via your OS's package manager. - -To load completions in your current shell session: - - source <(%[1]s completion bash) - -To load completions for every new session, execute once: - -#### Linux: - - %[1]s completion bash > /etc/bash_completion.d/%[1]s - -#### macOS: - - %[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s - -You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), - Args: NoArgs, - DisableFlagsInUseLine: true, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - return cmd.Root().GenBashCompletionV2(out, !noDesc) - }, - } - if haveNoDescFlag { - bash.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - zsh := &Command{ - Use: "zsh", - Short: fmt.Sprintf(shortDesc, "zsh"), - Long: fmt.Sprintf(`Generate the autocompletion script for the zsh shell. - -If shell completion is not already enabled in your environment you will need -to enable it. You can execute the following once: - - echo "autoload -U compinit; compinit" >> ~/.zshrc - -To load completions in your current shell session: - - source <(%[1]s completion zsh) - -To load completions for every new session, execute once: - -#### Linux: - - %[1]s completion zsh > "${fpath[1]}/_%[1]s" - -#### macOS: - - %[1]s completion zsh > $(brew --prefix)/share/zsh/site-functions/_%[1]s - -You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - if noDesc { - return cmd.Root().GenZshCompletionNoDesc(out) - } - return cmd.Root().GenZshCompletion(out) - }, - } - if haveNoDescFlag { - zsh.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - fish := &Command{ - Use: "fish", - Short: fmt.Sprintf(shortDesc, "fish"), - Long: fmt.Sprintf(`Generate the autocompletion script for the fish shell. - -To load completions in your current shell session: - - %[1]s completion fish | source - -To load completions for every new session, execute once: - - %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish - -You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - return cmd.Root().GenFishCompletion(out, !noDesc) - }, - } - if haveNoDescFlag { - fish.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - powershell := &Command{ - Use: "powershell", - Short: fmt.Sprintf(shortDesc, "powershell"), - Long: fmt.Sprintf(`Generate the autocompletion script for powershell. - -To load completions in your current shell session: - - %[1]s completion powershell | Out-String | Invoke-Expression - -To load completions for every new session, add the output of the above command -to your powershell profile. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - if noDesc { - return cmd.Root().GenPowerShellCompletion(out) - } - return cmd.Root().GenPowerShellCompletionWithDesc(out) - - }, - } - if haveNoDescFlag { - powershell.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - completionCmd.AddCommand(bash, zsh, fish, powershell) -} - -func findFlag(cmd *Command, name string) *pflag.Flag { - flagSet := cmd.Flags() - if len(name) == 1 { - // First convert the short flag into a long flag - // as the cmd.Flag() search only accepts long flags - if short := flagSet.ShorthandLookup(name); short != nil { - name = short.Name - } else { - set := cmd.InheritedFlags() - if short = set.ShorthandLookup(name); short != nil { - name = short.Name - } else { - return nil - } - } - } - return cmd.Flag(name) -} - -// CompDebug prints the specified string to the same file as where the -// completion script prints its logs. -// Note that completion printouts should never be on stdout as they would -// be wrongly interpreted as actual completion choices by the completion script. -func CompDebug(msg string, printToStdErr bool) { - msg = fmt.Sprintf("[Debug] %s", msg) - - // Such logs are only printed when the user has set the environment - // variable BASH_COMP_DEBUG_FILE to the path of some file to be used. - if path := os.Getenv("BASH_COMP_DEBUG_FILE"); path != "" { - f, err := os.OpenFile(path, - os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) - if err == nil { - defer f.Close() - WriteStringAndCheck(f, msg) - } - } - - if printToStdErr { - // Must print to stderr for this not to be read by the completion script. - fmt.Fprint(os.Stderr, msg) - } -} - -// CompDebugln prints the specified string with a newline at the end -// to the same file as where the completion script prints its logs. -// Such logs are only printed when the user has set the environment -// variable BASH_COMP_DEBUG_FILE to the path of some file to be used. -func CompDebugln(msg string, printToStdErr bool) { - CompDebug(fmt.Sprintf("%s\n", msg), printToStdErr) -} - -// CompError prints the specified completion message to stderr. -func CompError(msg string) { - msg = fmt.Sprintf("[Error] %s", msg) - CompDebug(msg, true) -} - -// CompErrorln prints the specified completion message to stderr with a newline at the end. -func CompErrorln(msg string) { - CompError(fmt.Sprintf("%s\n", msg)) -} diff --git a/vendor/github.com/spf13/cobra/fish_completions.go b/vendor/github.com/spf13/cobra/fish_completions.go deleted file mode 100644 index 12d61b69..00000000 --- a/vendor/github.com/spf13/cobra/fish_completions.go +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "bytes" - "fmt" - "io" - "os" - "strings" -) - -func genFishComp(buf io.StringWriter, name string, includeDesc bool) { - // Variables should not contain a '-' or ':' character - nameForVar := name - nameForVar = strings.ReplaceAll(nameForVar, "-", "_") - nameForVar = strings.ReplaceAll(nameForVar, ":", "_") - - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - WriteStringAndCheck(buf, fmt.Sprintf("# fish completion for %-36s -*- shell-script -*-\n", name)) - WriteStringAndCheck(buf, fmt.Sprintf(` -function __%[1]s_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __%[1]s_perform_completion - __%[1]s_debug "Starting __%[1]s_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __%[1]s_debug "args: $args" - __%[1]s_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "%[10]s=0 $args[1] %[3]s $args[2..-1] $lastArg" - - __%[1]s_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __%[1]s_debug "Comps: $comps" - __%[1]s_debug "DirectiveLine: $directiveLine" - __%[1]s_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%%s%%s\n" "$flagPrefix" "$comp" - end - - printf "%%s\n" "$directiveLine" -end - -# this function limits calls to __%[1]s_perform_completion, by caching the result behind $__%[1]s_perform_completion_once_result -function __%[1]s_perform_completion_once - __%[1]s_debug "Starting __%[1]s_perform_completion_once" - - if test -n "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "Seems like a valid result already exists, skipping __%[1]s_perform_completion" - return 0 - end - - set --global __%[1]s_perform_completion_once_result (__%[1]s_perform_completion) - if test -z "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "No completions, probably due to a failure" - return 1 - end - - __%[1]s_debug "Performed completions and set __%[1]s_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__%[1]s_perform_completion_once_result variable after completions are run -function __%[1]s_clear_perform_completion_once_result - __%[1]s_debug "" - __%[1]s_debug "========= clearing previously set __%[1]s_perform_completion_once_result variable ==========" - set --erase __%[1]s_perform_completion_once_result - __%[1]s_debug "Successfully erased the variable __%[1]s_perform_completion_once_result" -end - -function __%[1]s_requires_order_preservation - __%[1]s_debug "" - __%[1]s_debug "========= checking if order preservation is required ==========" - - __%[1]s_perform_completion_once - if test -z "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1]) - __%[1]s_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder %[9]d - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) %% 2) - __%[1]s_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __%[1]s_debug "This does require order preservation" - return 0 - end - - __%[1]s_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __%[1]s_comp_results -# - Return false if file completion should be performed -function __%[1]s_prepare_completions - __%[1]s_debug "" - __%[1]s_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __%[1]s_comp_results - - __%[1]s_perform_completion_once - __%[1]s_debug "Completion results: $__%[1]s_perform_completion_once_result" - - if test -z "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1]) - set --global __%[1]s_comp_results $__%[1]s_perform_completion_once_result[1..-2] - - __%[1]s_debug "Completions are: $__%[1]s_comp_results" - __%[1]s_debug "Directive is: $directive" - - set -l shellCompDirectiveError %[4]d - set -l shellCompDirectiveNoSpace %[5]d - set -l shellCompDirectiveNoFileComp %[6]d - set -l shellCompDirectiveFilterFileExt %[7]d - set -l shellCompDirectiveFilterDirs %[8]d - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) %% 2) - if test $compErr -eq 1 - __%[1]s_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) %% 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) %% 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __%[1]s_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) %% 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) %% 2) - - __%[1]s_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __%[1]s_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__%[1]s_comp_results) - set --global __%[1]s_comp_results $completions - __%[1]s_debug "Filtered completions are: $__%[1]s_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__%[1]s_comp_results) - __%[1]s_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__%[1]s_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __%[1]s_debug "Adding second completion to perform nospace directive" - set --global __%[1]s_comp_results $split[1] $split[1]. - __%[1]s_debug "Completions are now: $__%[1]s_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __%[1]s_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "%[2]s" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "%[2]s " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c %[2]s -e - -# this will get called after the two calls below and clear the $__%[1]s_perform_completion_once_result global -complete -c %[2]s -n '__%[1]s_clear_perform_completion_once_result' -# The call to __%[1]s_prepare_completions will setup __%[1]s_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c %[2]s -n 'not __%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' -# otherwise we use the -k flag -complete -k -c %[2]s -n '__%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' -`, nameForVar, name, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name))) -} - -// GenFishCompletion generates fish completion file and writes to the passed writer. -func (c *Command) GenFishCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genFishComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -// GenFishCompletionFile generates fish completion file. -func (c *Command) GenFishCompletionFile(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenFishCompletion(outFile, includeDesc) -} diff --git a/vendor/github.com/spf13/cobra/flag_groups.go b/vendor/github.com/spf13/cobra/flag_groups.go deleted file mode 100644 index 0671ec5f..00000000 --- a/vendor/github.com/spf13/cobra/flag_groups.go +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "fmt" - "sort" - "strings" - - flag "github.com/spf13/pflag" -) - -const ( - requiredAsGroup = "cobra_annotation_required_if_others_set" - oneRequired = "cobra_annotation_one_required" - mutuallyExclusive = "cobra_annotation_mutually_exclusive" -) - -// MarkFlagsRequiredTogether marks the given flags with annotations so that Cobra errors -// if the command is invoked with a subset (but not all) of the given flags. -func (c *Command) MarkFlagsRequiredTogether(flagNames ...string) { - c.mergePersistentFlags() - for _, v := range flagNames { - f := c.Flags().Lookup(v) - if f == nil { - panic(fmt.Sprintf("Failed to find flag %q and mark it as being required in a flag group", v)) - } - if err := c.Flags().SetAnnotation(v, requiredAsGroup, append(f.Annotations[requiredAsGroup], strings.Join(flagNames, " "))); err != nil { - // Only errs if the flag isn't found. - panic(err) - } - } -} - -// MarkFlagsOneRequired marks the given flags with annotations so that Cobra errors -// if the command is invoked without at least one flag from the given set of flags. -func (c *Command) MarkFlagsOneRequired(flagNames ...string) { - c.mergePersistentFlags() - for _, v := range flagNames { - f := c.Flags().Lookup(v) - if f == nil { - panic(fmt.Sprintf("Failed to find flag %q and mark it as being in a one-required flag group", v)) - } - if err := c.Flags().SetAnnotation(v, oneRequired, append(f.Annotations[oneRequired], strings.Join(flagNames, " "))); err != nil { - // Only errs if the flag isn't found. - panic(err) - } - } -} - -// MarkFlagsMutuallyExclusive marks the given flags with annotations so that Cobra errors -// if the command is invoked with more than one flag from the given set of flags. -func (c *Command) MarkFlagsMutuallyExclusive(flagNames ...string) { - c.mergePersistentFlags() - for _, v := range flagNames { - f := c.Flags().Lookup(v) - if f == nil { - panic(fmt.Sprintf("Failed to find flag %q and mark it as being in a mutually exclusive flag group", v)) - } - // Each time this is called is a single new entry; this allows it to be a member of multiple groups if needed. - if err := c.Flags().SetAnnotation(v, mutuallyExclusive, append(f.Annotations[mutuallyExclusive], strings.Join(flagNames, " "))); err != nil { - panic(err) - } - } -} - -// ValidateFlagGroups validates the mutuallyExclusive/oneRequired/requiredAsGroup logic and returns the -// first error encountered. -func (c *Command) ValidateFlagGroups() error { - if c.DisableFlagParsing { - return nil - } - - flags := c.Flags() - - // groupStatus format is the list of flags as a unique ID, - // then a map of each flag name and whether it is set or not. - groupStatus := map[string]map[string]bool{} - oneRequiredGroupStatus := map[string]map[string]bool{} - mutuallyExclusiveGroupStatus := map[string]map[string]bool{} - flags.VisitAll(func(pflag *flag.Flag) { - processFlagForGroupAnnotation(flags, pflag, requiredAsGroup, groupStatus) - processFlagForGroupAnnotation(flags, pflag, oneRequired, oneRequiredGroupStatus) - processFlagForGroupAnnotation(flags, pflag, mutuallyExclusive, mutuallyExclusiveGroupStatus) - }) - - if err := validateRequiredFlagGroups(groupStatus); err != nil { - return err - } - if err := validateOneRequiredFlagGroups(oneRequiredGroupStatus); err != nil { - return err - } - if err := validateExclusiveFlagGroups(mutuallyExclusiveGroupStatus); err != nil { - return err - } - return nil -} - -func hasAllFlags(fs *flag.FlagSet, flagnames ...string) bool { - for _, fname := range flagnames { - f := fs.Lookup(fname) - if f == nil { - return false - } - } - return true -} - -func processFlagForGroupAnnotation(flags *flag.FlagSet, pflag *flag.Flag, annotation string, groupStatus map[string]map[string]bool) { - groupInfo, found := pflag.Annotations[annotation] - if found { - for _, group := range groupInfo { - if groupStatus[group] == nil { - flagnames := strings.Split(group, " ") - - // Only consider this flag group at all if all the flags are defined. - if !hasAllFlags(flags, flagnames...) { - continue - } - - groupStatus[group] = map[string]bool{} - for _, name := range flagnames { - groupStatus[group][name] = false - } - } - - groupStatus[group][pflag.Name] = pflag.Changed - } - } -} - -func validateRequiredFlagGroups(data map[string]map[string]bool) error { - keys := sortedKeys(data) - for _, flagList := range keys { - flagnameAndStatus := data[flagList] - - unset := []string{} - for flagname, isSet := range flagnameAndStatus { - if !isSet { - unset = append(unset, flagname) - } - } - if len(unset) == len(flagnameAndStatus) || len(unset) == 0 { - continue - } - - // Sort values, so they can be tested/scripted against consistently. - sort.Strings(unset) - return fmt.Errorf("if any flags in the group [%v] are set they must all be set; missing %v", flagList, unset) - } - - return nil -} - -func validateOneRequiredFlagGroups(data map[string]map[string]bool) error { - keys := sortedKeys(data) - for _, flagList := range keys { - flagnameAndStatus := data[flagList] - var set []string - for flagname, isSet := range flagnameAndStatus { - if isSet { - set = append(set, flagname) - } - } - if len(set) >= 1 { - continue - } - - // Sort values, so they can be tested/scripted against consistently. - sort.Strings(set) - return fmt.Errorf("at least one of the flags in the group [%v] is required", flagList) - } - return nil -} - -func validateExclusiveFlagGroups(data map[string]map[string]bool) error { - keys := sortedKeys(data) - for _, flagList := range keys { - flagnameAndStatus := data[flagList] - var set []string - for flagname, isSet := range flagnameAndStatus { - if isSet { - set = append(set, flagname) - } - } - if len(set) == 0 || len(set) == 1 { - continue - } - - // Sort values, so they can be tested/scripted against consistently. - sort.Strings(set) - return fmt.Errorf("if any flags in the group [%v] are set none of the others can be; %v were all set", flagList, set) - } - return nil -} - -func sortedKeys(m map[string]map[string]bool) []string { - keys := make([]string, len(m)) - i := 0 - for k := range m { - keys[i] = k - i++ - } - sort.Strings(keys) - return keys -} - -// enforceFlagGroupsForCompletion will do the following: -// - when a flag in a group is present, other flags in the group will be marked required -// - when none of the flags in a one-required group are present, all flags in the group will be marked required -// - when a flag in a mutually exclusive group is present, other flags in the group will be marked as hidden -// This allows the standard completion logic to behave appropriately for flag groups -func (c *Command) enforceFlagGroupsForCompletion() { - if c.DisableFlagParsing { - return - } - - flags := c.Flags() - groupStatus := map[string]map[string]bool{} - oneRequiredGroupStatus := map[string]map[string]bool{} - mutuallyExclusiveGroupStatus := map[string]map[string]bool{} - c.Flags().VisitAll(func(pflag *flag.Flag) { - processFlagForGroupAnnotation(flags, pflag, requiredAsGroup, groupStatus) - processFlagForGroupAnnotation(flags, pflag, oneRequired, oneRequiredGroupStatus) - processFlagForGroupAnnotation(flags, pflag, mutuallyExclusive, mutuallyExclusiveGroupStatus) - }) - - // If a flag that is part of a group is present, we make all the other flags - // of that group required so that the shell completion suggests them automatically - for flagList, flagnameAndStatus := range groupStatus { - for _, isSet := range flagnameAndStatus { - if isSet { - // One of the flags of the group is set, mark the other ones as required - for _, fName := range strings.Split(flagList, " ") { - _ = c.MarkFlagRequired(fName) - } - } - } - } - - // If none of the flags of a one-required group are present, we make all the flags - // of that group required so that the shell completion suggests them automatically - for flagList, flagnameAndStatus := range oneRequiredGroupStatus { - set := 0 - - for _, isSet := range flagnameAndStatus { - if isSet { - set++ - } - } - - // None of the flags of the group are set, mark all flags in the group - // as required - if set == 0 { - for _, fName := range strings.Split(flagList, " ") { - _ = c.MarkFlagRequired(fName) - } - } - } - - // If a flag that is mutually exclusive to others is present, we hide the other - // flags of that group so the shell completion does not suggest them - for flagList, flagnameAndStatus := range mutuallyExclusiveGroupStatus { - for flagName, isSet := range flagnameAndStatus { - if isSet { - // One of the flags of the mutually exclusive group is set, mark the other ones as hidden - // Don't mark the flag that is already set as hidden because it may be an - // array or slice flag and therefore must continue being suggested - for _, fName := range strings.Split(flagList, " ") { - if fName != flagName { - flag := c.Flags().Lookup(fName) - flag.Hidden = true - } - } - } - } - } -} diff --git a/vendor/github.com/spf13/cobra/powershell_completions.go b/vendor/github.com/spf13/cobra/powershell_completions.go deleted file mode 100644 index 55195193..00000000 --- a/vendor/github.com/spf13/cobra/powershell_completions.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2013-2023 The Cobra 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. - -// The generated scripts require PowerShell v5.0+ (which comes Windows 10, but -// can be downloaded separately for windows 7 or 8.1). - -package cobra - -import ( - "bytes" - "fmt" - "io" - "os" - "strings" -) - -func genPowerShellComp(buf io.StringWriter, name string, includeDesc bool) { - // Variables should not contain a '-' or ':' character - nameForVar := name - nameForVar = strings.Replace(nameForVar, "-", "_", -1) - nameForVar = strings.Replace(nameForVar, ":", "_", -1) - - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - WriteStringAndCheck(buf, fmt.Sprintf(`# powershell completion for %-36[1]s -*- shell-script -*- - -function __%[1]s_debug { - if ($env:BASH_COMP_DEBUG_FILE) { - "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" - } -} - -filter __%[1]s_escapeStringWithSpecialChars { -`+" $_ -replace '\\s|#|@|\\$|;|,|''|\\{|\\}|\\(|\\)|\"|`|\\||<|>|&','`$&'"+` -} - -[scriptblock]${__%[2]sCompleterBlock} = { - param( - $WordToComplete, - $CommandAst, - $CursorPosition - ) - - # Get the current command line and convert into a string - $Command = $CommandAst.CommandElements - $Command = "$Command" - - __%[1]s_debug "" - __%[1]s_debug "========= starting completion logic ==========" - __%[1]s_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" - - # The user could have moved the cursor backwards on the command-line. - # We need to trigger completion from the $CursorPosition location, so we need - # to truncate the command-line ($Command) up to the $CursorPosition location. - # Make sure the $Command is longer then the $CursorPosition before we truncate. - # This happens because the $Command does not include the last space. - if ($Command.Length -gt $CursorPosition) { - $Command=$Command.Substring(0,$CursorPosition) - } - __%[1]s_debug "Truncated command: $Command" - - $ShellCompDirectiveError=%[4]d - $ShellCompDirectiveNoSpace=%[5]d - $ShellCompDirectiveNoFileComp=%[6]d - $ShellCompDirectiveFilterFileExt=%[7]d - $ShellCompDirectiveFilterDirs=%[8]d - $ShellCompDirectiveKeepOrder=%[9]d - - # Prepare the command to request completions for the program. - # Split the command at the first space to separate the program and arguments. - $Program,$Arguments = $Command.Split(" ",2) - - $RequestComp="$Program %[3]s $Arguments" - __%[1]s_debug "RequestComp: $RequestComp" - - # we cannot use $WordToComplete because it - # has the wrong values if the cursor was moved - # so use the last argument - if ($WordToComplete -ne "" ) { - $WordToComplete = $Arguments.Split(" ")[-1] - } - __%[1]s_debug "New WordToComplete: $WordToComplete" - - - # Check for flag with equal sign - $IsEqualFlag = ($WordToComplete -Like "--*=*" ) - if ( $IsEqualFlag ) { - __%[1]s_debug "Completing equal sign flag" - # Remove the flag part - $Flag,$WordToComplete = $WordToComplete.Split("=",2) - } - - if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go method. - __%[1]s_debug "Adding extra empty parameter" - # PowerShell 7.2+ changed the way how the arguments are passed to executables, - # so for pre-7.2 or when Legacy argument passing is enabled we need to use -`+" # `\"`\" to pass an empty argument, a \"\" or '' does not work!!!"+` - if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or - ($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or - (($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and - $PSNativeCommandArgumentPassing -eq 'Legacy')) { -`+" $RequestComp=\"$RequestComp\" + ' `\"`\"'"+` - } else { - $RequestComp="$RequestComp" + ' ""' - } - } - - __%[1]s_debug "Calling $RequestComp" - # First disable ActiveHelp which is not supported for Powershell - ${env:%[10]s}=0 - - #call the command store the output in $out and redirect stderr and stdout to null - # $Out is an array contains each line per element - Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null - - # get directive from last line - [int]$Directive = $Out[-1].TrimStart(':') - if ($Directive -eq "") { - # There is no directive specified - $Directive = 0 - } - __%[1]s_debug "The completion directive is: $Directive" - - # remove directive (last element) from out - $Out = $Out | Where-Object { $_ -ne $Out[-1] } - __%[1]s_debug "The completions are: $Out" - - if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { - # Error code. No completion. - __%[1]s_debug "Received error from custom completion go code" - return - } - - $Longest = 0 - [Array]$Values = $Out | ForEach-Object { - #Split the output in name and description -`+" $Name, $Description = $_.Split(\"`t\",2)"+` - __%[1]s_debug "Name: $Name Description: $Description" - - # Look for the longest completion so that we can format things nicely - if ($Longest -lt $Name.Length) { - $Longest = $Name.Length - } - - # Set the description to a one space string if there is none set. - # This is needed because the CompletionResult does not accept an empty string as argument - if (-Not $Description) { - $Description = " " - } - @{Name="$Name";Description="$Description"} - } - - - $Space = " " - if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { - # remove the space here - __%[1]s_debug "ShellCompDirectiveNoSpace is called" - $Space = "" - } - - if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or - (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { - __%[1]s_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" - - # return here to prevent the completion of the extensions - return - } - - $Values = $Values | Where-Object { - # filter the result - $_.Name -like "$WordToComplete*" - - # Join the flag back if we have an equal sign flag - if ( $IsEqualFlag ) { - __%[1]s_debug "Join the equal sign flag back to the completion value" - $_.Name = $Flag + "=" + $_.Name - } - } - - # we sort the values in ascending order by name if keep order isn't passed - if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) { - $Values = $Values | Sort-Object -Property Name - } - - if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { - __%[1]s_debug "ShellCompDirectiveNoFileComp is called" - - if ($Values.Length -eq 0) { - # Just print an empty string here so the - # shell does not start to complete paths. - # We cannot use CompletionResult here because - # it does not accept an empty string as argument. - "" - return - } - } - - # Get the current mode - $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function - __%[1]s_debug "Mode: $Mode" - - $Values | ForEach-Object { - - # store temporary because switch will overwrite $_ - $comp = $_ - - # PowerShell supports three different completion modes - # - TabCompleteNext (default windows style - on each key press the next option is displayed) - # - Complete (works like bash) - # - MenuComplete (works like zsh) - # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function - - # CompletionResult Arguments: - # 1) CompletionText text to be used as the auto completion result - # 2) ListItemText text to be displayed in the suggestion list - # 3) ResultType type of completion result - # 4) ToolTip text for the tooltip with details about the object - - switch ($Mode) { - - # bash like - "Complete" { - - if ($Values.Length -eq 1) { - __%[1]s_debug "Only one completion left" - - # insert space after value - [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") - - } else { - # Add the proper number of spaces to align the descriptions - while($comp.Name.Length -lt $Longest) { - $comp.Name = $comp.Name + " " - } - - # Check for empty description and only add parentheses if needed - if ($($comp.Description) -eq " " ) { - $Description = "" - } else { - $Description = " ($($comp.Description))" - } - - [System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") - } - } - - # zsh like - "MenuComplete" { - # insert space after value - # MenuComplete will automatically show the ToolTip of - # the highlighted value at the bottom of the suggestions. - [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") - } - - # TabCompleteNext and in case we get something unknown - Default { - # Like MenuComplete but we don't want to add a space here because - # the user need to press space anyway to get the completion. - # Description will not be shown because that's not possible with TabCompleteNext - [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") - } - } - - } -} - -Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock ${__%[2]sCompleterBlock} -`, name, nameForVar, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name))) -} - -func (c *Command) genPowerShellCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genPowerShellComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -func (c *Command) genPowerShellCompletionFile(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.genPowerShellCompletion(outFile, includeDesc) -} - -// GenPowerShellCompletionFile generates powershell completion file without descriptions. -func (c *Command) GenPowerShellCompletionFile(filename string) error { - return c.genPowerShellCompletionFile(filename, false) -} - -// GenPowerShellCompletion generates powershell completion file without descriptions -// and writes it to the passed writer. -func (c *Command) GenPowerShellCompletion(w io.Writer) error { - return c.genPowerShellCompletion(w, false) -} - -// GenPowerShellCompletionFileWithDesc generates powershell completion file with descriptions. -func (c *Command) GenPowerShellCompletionFileWithDesc(filename string) error { - return c.genPowerShellCompletionFile(filename, true) -} - -// GenPowerShellCompletionWithDesc generates powershell completion file with descriptions -// and writes it to the passed writer. -func (c *Command) GenPowerShellCompletionWithDesc(w io.Writer) error { - return c.genPowerShellCompletion(w, true) -} diff --git a/vendor/github.com/spf13/cobra/shell_completions.go b/vendor/github.com/spf13/cobra/shell_completions.go deleted file mode 100644 index b035742d..00000000 --- a/vendor/github.com/spf13/cobra/shell_completions.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "github.com/spf13/pflag" -) - -// MarkFlagRequired instructs the various shell completion implementations to -// prioritize the named flag when performing completion, -// and causes your command to report an error if invoked without the flag. -func (c *Command) MarkFlagRequired(name string) error { - return MarkFlagRequired(c.Flags(), name) -} - -// MarkPersistentFlagRequired instructs the various shell completion implementations to -// prioritize the named persistent flag when performing completion, -// and causes your command to report an error if invoked without the flag. -func (c *Command) MarkPersistentFlagRequired(name string) error { - return MarkFlagRequired(c.PersistentFlags(), name) -} - -// MarkFlagRequired instructs the various shell completion implementations to -// prioritize the named flag when performing completion, -// and causes your command to report an error if invoked without the flag. -func MarkFlagRequired(flags *pflag.FlagSet, name string) error { - return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}) -} - -// MarkFlagFilename instructs the various shell completion implementations to -// limit completions for the named flag to the specified file extensions. -func (c *Command) MarkFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(c.Flags(), name, extensions...) -} - -// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. -// The bash completion script will call the bash function f for the flag. -// -// This will only work for bash completion. -// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows -// to register a Go function which will work across all shells. -func (c *Command) MarkFlagCustom(name string, f string) error { - return MarkFlagCustom(c.Flags(), name, f) -} - -// MarkPersistentFlagFilename instructs the various shell completion -// implementations to limit completions for the named persistent flag to the -// specified file extensions. -func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(c.PersistentFlags(), name, extensions...) -} - -// MarkFlagFilename instructs the various shell completion implementations to -// limit completions for the named flag to the specified file extensions. -func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error { - return flags.SetAnnotation(name, BashCompFilenameExt, extensions) -} - -// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. -// The bash completion script will call the bash function f for the flag. -// -// This will only work for bash completion. -// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows -// to register a Go function which will work across all shells. -func MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error { - return flags.SetAnnotation(name, BashCompCustom, []string{f}) -} - -// MarkFlagDirname instructs the various shell completion implementations to -// limit completions for the named flag to directory names. -func (c *Command) MarkFlagDirname(name string) error { - return MarkFlagDirname(c.Flags(), name) -} - -// MarkPersistentFlagDirname instructs the various shell completion -// implementations to limit completions for the named persistent flag to -// directory names. -func (c *Command) MarkPersistentFlagDirname(name string) error { - return MarkFlagDirname(c.PersistentFlags(), name) -} - -// MarkFlagDirname instructs the various shell completion implementations to -// limit completions for the named flag to directory names. -func MarkFlagDirname(flags *pflag.FlagSet, name string) error { - return flags.SetAnnotation(name, BashCompSubdirsInDir, []string{}) -} diff --git a/vendor/github.com/spf13/cobra/zsh_completions.go b/vendor/github.com/spf13/cobra/zsh_completions.go deleted file mode 100644 index 1856e4c7..00000000 --- a/vendor/github.com/spf13/cobra/zsh_completions.go +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2013-2023 The Cobra 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 cobra - -import ( - "bytes" - "fmt" - "io" - "os" -) - -// GenZshCompletionFile generates zsh completion file including descriptions. -func (c *Command) GenZshCompletionFile(filename string) error { - return c.genZshCompletionFile(filename, true) -} - -// GenZshCompletion generates zsh completion file including descriptions -// and writes it to the passed writer. -func (c *Command) GenZshCompletion(w io.Writer) error { - return c.genZshCompletion(w, true) -} - -// GenZshCompletionFileNoDesc generates zsh completion file without descriptions. -func (c *Command) GenZshCompletionFileNoDesc(filename string) error { - return c.genZshCompletionFile(filename, false) -} - -// GenZshCompletionNoDesc generates zsh completion file without descriptions -// and writes it to the passed writer. -func (c *Command) GenZshCompletionNoDesc(w io.Writer) error { - return c.genZshCompletion(w, false) -} - -// MarkZshCompPositionalArgumentFile only worked for zsh and its behavior was -// not consistent with Bash completion. It has therefore been disabled. -// Instead, when no other completion is specified, file completion is done by -// default for every argument. One can disable file completion on a per-argument -// basis by using ValidArgsFunction and ShellCompDirectiveNoFileComp. -// To achieve file extension filtering, one can use ValidArgsFunction and -// ShellCompDirectiveFilterFileExt. -// -// Deprecated -func (c *Command) MarkZshCompPositionalArgumentFile(argPosition int, patterns ...string) error { - return nil -} - -// MarkZshCompPositionalArgumentWords only worked for zsh. It has therefore -// been disabled. -// To achieve the same behavior across all shells, one can use -// ValidArgs (for the first argument only) or ValidArgsFunction for -// any argument (can include the first one also). -// -// Deprecated -func (c *Command) MarkZshCompPositionalArgumentWords(argPosition int, words ...string) error { - return nil -} - -func (c *Command) genZshCompletionFile(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.genZshCompletion(outFile, includeDesc) -} - -func (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genZshComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -func genZshComp(buf io.StringWriter, name string, includeDesc bool) { - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - WriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s -compdef _%[1]s %[1]s - -# zsh completion for %-36[1]s -*- shell-script -*- - -__%[1]s_debug() -{ - local file="$BASH_COMP_DEBUG_FILE" - if [[ -n ${file} ]]; then - echo "$*" >> "${file}" - fi -} - -_%[1]s() -{ - local shellCompDirectiveError=%[3]d - local shellCompDirectiveNoSpace=%[4]d - local shellCompDirectiveNoFileComp=%[5]d - local shellCompDirectiveFilterFileExt=%[6]d - local shellCompDirectiveFilterDirs=%[7]d - local shellCompDirectiveKeepOrder=%[8]d - - local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder - local -a completions - - __%[1]s_debug "\n========= starting completion logic ==========" - __%[1]s_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" - - # The user could have moved the cursor backwards on the command-line. - # We need to trigger completion from the $CURRENT location, so we need - # to truncate the command-line ($words) up to the $CURRENT location. - # (We cannot use $CURSOR as its value does not work when a command is an alias.) - words=("${=words[1,CURRENT]}") - __%[1]s_debug "Truncated words[*]: ${words[*]}," - - lastParam=${words[-1]} - lastChar=${lastParam[-1]} - __%[1]s_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" - - # For zsh, when completing a flag with an = (e.g., %[1]s -n=) - # completions must be prefixed with the flag - setopt local_options BASH_REMATCH - if [[ "${lastParam}" =~ '-.*=' ]]; then - # We are dealing with a flag with an = - flagPrefix="-P ${BASH_REMATCH}" - fi - - # Prepare the command to obtain completions - requestComp="${words[1]} %[2]s ${words[2,-1]}" - if [ "${lastChar}" = "" ]; then - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go completion code. - __%[1]s_debug "Adding extra empty parameter" - requestComp="${requestComp} \"\"" - fi - - __%[1]s_debug "About to call: eval ${requestComp}" - - # Use eval to handle any environment variables and such - out=$(eval ${requestComp} 2>/dev/null) - __%[1]s_debug "completion output: ${out}" - - # Extract the directive integer following a : from the last line - local lastLine - while IFS='\n' read -r line; do - lastLine=${line} - done < <(printf "%%s\n" "${out[@]}") - __%[1]s_debug "last line: ${lastLine}" - - if [ "${lastLine[1]}" = : ]; then - directive=${lastLine[2,-1]} - # Remove the directive including the : and the newline - local suffix - (( suffix=${#lastLine}+2)) - out=${out[1,-$suffix]} - else - # There is no directive specified. Leave $out as is. - __%[1]s_debug "No directive found. Setting do default" - directive=0 - fi - - __%[1]s_debug "directive: ${directive}" - __%[1]s_debug "completions: ${out}" - __%[1]s_debug "flagPrefix: ${flagPrefix}" - - if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then - __%[1]s_debug "Completion received error. Ignoring completions." - return - fi - - local activeHelpMarker="%[9]s" - local endIndex=${#activeHelpMarker} - local startIndex=$((${#activeHelpMarker}+1)) - local hasActiveHelp=0 - while IFS='\n' read -r comp; do - # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) - if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then - __%[1]s_debug "ActiveHelp found: $comp" - comp="${comp[$startIndex,-1]}" - if [ -n "$comp" ]; then - compadd -x "${comp}" - __%[1]s_debug "ActiveHelp will need delimiter" - hasActiveHelp=1 - fi - - continue - fi - - if [ -n "$comp" ]; then - # If requested, completions are returned with a description. - # The description is preceded by a TAB character. - # For zsh's _describe, we need to use a : instead of a TAB. - # We first need to escape any : as part of the completion itself. - comp=${comp//:/\\:} - - local tab="$(printf '\t')" - comp=${comp//$tab/:} - - __%[1]s_debug "Adding completion: ${comp}" - completions+=${comp} - lastComp=$comp - fi - done < <(printf "%%s\n" "${out[@]}") - - # Add a delimiter after the activeHelp statements, but only if: - # - there are completions following the activeHelp statements, or - # - file completion will be performed (so there will be choices after the activeHelp) - if [ $hasActiveHelp -eq 1 ]; then - if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then - __%[1]s_debug "Adding activeHelp delimiter" - compadd -x "--" - hasActiveHelp=0 - fi - fi - - if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then - __%[1]s_debug "Activating nospace." - noSpace="-S ''" - fi - - if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then - __%[1]s_debug "Activating keep order." - keepOrder="-V" - fi - - if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then - # File extension filtering - local filteringCmd - filteringCmd='_files' - for filter in ${completions[@]}; do - if [ ${filter[1]} != '*' ]; then - # zsh requires a glob pattern to do file filtering - filter="\*.$filter" - fi - filteringCmd+=" -g $filter" - done - filteringCmd+=" ${flagPrefix}" - - __%[1]s_debug "File filtering command: $filteringCmd" - _arguments '*:filename:'"$filteringCmd" - elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then - # File completion for directories only - local subdir - subdir="${completions[1]}" - if [ -n "$subdir" ]; then - __%[1]s_debug "Listing directories in $subdir" - pushd "${subdir}" >/dev/null 2>&1 - else - __%[1]s_debug "Listing directories in ." - fi - - local result - _arguments '*:dirname:_files -/'" ${flagPrefix}" - result=$? - if [ -n "$subdir" ]; then - popd >/dev/null 2>&1 - fi - return $result - else - __%[1]s_debug "Calling _describe" - if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then - __%[1]s_debug "_describe found some completions" - - # Return the success of having called _describe - return 0 - else - __%[1]s_debug "_describe did not find completions." - __%[1]s_debug "Checking if we should do file completion." - if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then - __%[1]s_debug "deactivating file completion" - - # We must return an error code here to let zsh know that there were no - # completions found by _describe; this is what will trigger other - # matching algorithms to attempt to find completions. - # For example zsh can match letters in the middle of words. - return 1 - else - # Perform file completion - __%[1]s_debug "Activating file completion" - - # We must return the result of this command, so it must be the - # last command, or else we must store its result to return it. - _arguments '*:filename:_files'" ${flagPrefix}" - fi - fi - fi -} - -# don't run the completion function when being source-ed or eval-ed -if [ "$funcstack[1]" = "_%[1]s" ]; then - _%[1]s -fi -`, name, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, - activeHelpMarker)) -} diff --git a/vendor/github.com/spf13/pflag/.gitignore b/vendor/github.com/spf13/pflag/.gitignore deleted file mode 100644 index c3da2901..00000000 --- a/vendor/github.com/spf13/pflag/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea/* - diff --git a/vendor/github.com/spf13/pflag/.travis.yml b/vendor/github.com/spf13/pflag/.travis.yml deleted file mode 100644 index 00d04cb9..00000000 --- a/vendor/github.com/spf13/pflag/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -sudo: false - -language: go - -go: - - 1.9.x - - 1.10.x - - 1.11.x - - tip - -matrix: - allow_failures: - - go: tip - -install: - - go get golang.org/x/lint/golint - - export PATH=$GOPATH/bin:$PATH - - go install ./... - -script: - - verify/all.sh -v - - go test ./... diff --git a/vendor/github.com/spf13/pflag/LICENSE b/vendor/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cfe..00000000 --- a/vendor/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/spf13/pflag/README.md b/vendor/github.com/spf13/pflag/README.md deleted file mode 100644 index 7eacc5bd..00000000 --- a/vendor/github.com/spf13/pflag/README.md +++ /dev/null @@ -1,296 +0,0 @@ -[![Build Status](https://travis-ci.org/spf13/pflag.svg?branch=master)](https://travis-ci.org/spf13/pflag) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/pflag)](https://goreportcard.com/report/github.com/spf13/pflag) -[![GoDoc](https://godoc.org/github.com/spf13/pflag?status.svg)](https://godoc.org/github.com/spf13/pflag) - -## Description - -pflag is a drop-in replacement for Go's flag package, implementing -POSIX/GNU-style --flags. - -pflag is compatible with the [GNU extensions to the POSIX recommendations -for command-line options][1]. For a more precise description, see the -"Command-line flag syntax" section below. - -[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - -pflag is available under the same style of BSD license as the Go language, -which can be found in the LICENSE file. - -## Installation - -pflag is available using the standard `go get` command. - -Install by running: - - go get github.com/spf13/pflag - -Run tests by running: - - go test github.com/spf13/pflag - -## Usage - -pflag is a drop-in replacement of Go's native flag package. If you import -pflag under the name "flag" then all code should continue to function -with no changes. - -``` go -import flag "github.com/spf13/pflag" -``` - -There is one exception to this: if you directly instantiate the Flag struct -there is one more field "Shorthand" that you will need to set. -Most code never instantiates this struct directly, and instead uses -functions such as String(), BoolVar(), and Var(), and is therefore -unaffected. - -Define flags using flag.String(), Bool(), Int(), etc. - -This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - -``` go -var ip *int = flag.Int("flagname", 1234, "help message for flagname") -``` - -If you like, you can bind the flag to a variable using the Var() functions. - -``` go -var flagvar int -func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") -} -``` - -Or you can create custom flags that satisfy the Value interface (with -pointer receivers) and couple them to flag parsing by - -``` go -flag.Var(&flagVal, "name", "help message for flagname") -``` - -For such flags, the default value is just the initial value of the variable. - -After all flags are defined, call - -``` go -flag.Parse() -``` - -to parse the command line into the defined flags. - -Flags may then be used directly. If you're using the flags themselves, -they are all pointers; if you bind to variables, they're values. - -``` go -fmt.Println("ip has value ", *ip) -fmt.Println("flagvar has value ", flagvar) -``` - -There are helper functions available to get the value stored in a Flag if you have a FlagSet but find -it difficult to keep up with all of the pointers in your code. -If you have a pflag.FlagSet with a flag called 'flagname' of type int you -can use GetInt() to get the int value. But notice that 'flagname' must exist -and it must be an int. GetString("flagname") will fail. - -``` go -i, err := flagset.GetInt("flagname") -``` - -After parsing, the arguments after the flag are available as the -slice flag.Args() or individually as flag.Arg(i). -The arguments are indexed from 0 through flag.NArg()-1. - -The pflag package also defines some new functions that are not in flag, -that give one-letter shorthands for flags. You can use these by appending -'P' to the name of any function that defines a flag. - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -var flagvar bool -func init() { - flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") -} -flag.VarP(&flagVal, "varname", "v", "help message") -``` - -Shorthand letters can be used with single dashes on the command line. -Boolean shorthand flags can be combined with other shorthand flags. - -The default set of command-line flags is controlled by -top-level functions. The FlagSet type allows one to define -independent sets of flags, such as to implement subcommands -in a command-line interface. The methods of FlagSet are -analogous to the top-level functions for the command-line -flag set. - -## Setting no option default values for flags - -After you create a flag it is possible to set the pflag.NoOptDefVal for -the given flag. Doing this changes the meaning of the flag slightly. If -a flag has a NoOptDefVal and the flag is set on the command line without -an option the flag will be set to the NoOptDefVal. For example given: - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -flag.Lookup("flagname").NoOptDefVal = "4321" -``` - -Would result in something like - -| Parsed Arguments | Resulting Value | -| ------------- | ------------- | -| --flagname=1357 | ip=1357 | -| --flagname | ip=4321 | -| [nothing] | ip=1234 | - -## Command line flag syntax - -``` ---flag // boolean flags, or flags with no option default values ---flag x // only on flags without a default value ---flag=x -``` - -Unlike the flag package, a single dash before an option means something -different than a double dash. Single dashes signify a series of shorthand -letters for flags. All but the last shorthand letter must be boolean flags -or a flag with a default value - -``` -// boolean or flags where the 'no option default value' is set --f --f=true --abc -but --b true is INVALID - -// non-boolean and flags without a 'no option default value' --n 1234 --n=1234 --n1234 - -// mixed --abcs "hello" --absd="hello" --abcs1234 -``` - -Flag parsing stops after the terminator "--". Unlike the flag package, -flags can be interspersed with arguments anywhere on the command line -before this terminator. - -Integer flags accept 1234, 0664, 0x1234 and may be negative. -Boolean flags (in their long form) accept 1, 0, t, f, true, false, -TRUE, FALSE, True, False. -Duration flags accept any input valid for time.ParseDuration. - -## Mutating or "Normalizing" Flag names - -It is possible to set a custom flag name 'normalization function.' It allows flag names to be mutated both when created in the code and when used on the command line to some 'normalized' form. The 'normalized' form is used for comparison. Two examples of using the custom normalization func follow. - -**Example #1**: You want -, _, and . in flags to compare the same. aka --my-flag == --my_flag == --my.flag - -``` go -func wordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { - from := []string{"-", "_"} - to := "." - for _, sep := range from { - name = strings.Replace(name, sep, to, -1) - } - return pflag.NormalizedName(name) -} - -myFlagSet.SetNormalizeFunc(wordSepNormalizeFunc) -``` - -**Example #2**: You want to alias two flags. aka --old-flag-name == --new-flag-name - -``` go -func aliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { - switch name { - case "old-flag-name": - name = "new-flag-name" - break - } - return pflag.NormalizedName(name) -} - -myFlagSet.SetNormalizeFunc(aliasNormalizeFunc) -``` - -## Deprecating a flag or its shorthand -It is possible to deprecate a flag, or just its shorthand. Deprecating a flag/shorthand hides it from help text and prints a usage message when the deprecated flag/shorthand is used. - -**Example #1**: You want to deprecate a flag named "badflag" as well as inform the users what flag they should use instead. -```go -// deprecate a flag by specifying its name and a usage message -flags.MarkDeprecated("badflag", "please use --good-flag instead") -``` -This hides "badflag" from help text, and prints `Flag --badflag has been deprecated, please use --good-flag instead` when "badflag" is used. - -**Example #2**: You want to keep a flag name "noshorthandflag" but deprecate its shortname "n". -```go -// deprecate a flag shorthand by specifying its flag name and a usage message -flags.MarkShorthandDeprecated("noshorthandflag", "please use --noshorthandflag only") -``` -This hides the shortname "n" from help text, and prints `Flag shorthand -n has been deprecated, please use --noshorthandflag only` when the shorthand "n" is used. - -Note that usage message is essential here, and it should not be empty. - -## Hidden flags -It is possible to mark a flag as hidden, meaning it will still function as normal, however will not show up in usage/help text. - -**Example**: You have a flag named "secretFlag" that you need for internal use only and don't want it showing up in help text, or for its usage text to be available. -```go -// hide a flag by specifying its name -flags.MarkHidden("secretFlag") -``` - -## Disable sorting of flags -`pflag` allows you to disable sorting of flags for help and usage message. - -**Example**: -```go -flags.BoolP("verbose", "v", false, "verbose output") -flags.String("coolflag", "yeaah", "it's really cool flag") -flags.Int("usefulflag", 777, "sometimes it's very useful") -flags.SortFlags = false -flags.PrintDefaults() -``` -**Output**: -``` - -v, --verbose verbose output - --coolflag string it's really cool flag (default "yeaah") - --usefulflag int sometimes it's very useful (default 777) -``` - - -## Supporting Go flags when using pflag -In order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary -to support flags defined by third-party dependencies (e.g. `golang/glog`). - -**Example**: You want to add the Go flags to the `CommandLine` flagset -```go -import ( - goflag "flag" - flag "github.com/spf13/pflag" -) - -var ip *int = flag.Int("flagname", 1234, "help message for flagname") - -func main() { - flag.CommandLine.AddGoFlagSet(goflag.CommandLine) - flag.Parse() -} -``` - -## More info - -You can see the full reference documentation of the pflag package -[at godoc.org][3], or through go's standard documentation system by -running `godoc -http=:6060` and browsing to -[http://localhost:6060/pkg/github.com/spf13/pflag][2] after -installation. - -[2]: http://localhost:6060/pkg/github.com/spf13/pflag -[3]: http://godoc.org/github.com/spf13/pflag diff --git a/vendor/github.com/spf13/pflag/bool.go b/vendor/github.com/spf13/pflag/bool.go deleted file mode 100644 index c4c5c0bf..00000000 --- a/vendor/github.com/spf13/pflag/bool.go +++ /dev/null @@ -1,94 +0,0 @@ -package pflag - -import "strconv" - -// optional interface to indicate boolean flags that can be -// supplied without "=value" text -type boolFlag interface { - Value - IsBoolFlag() bool -} - -// -- bool Value -type boolValue bool - -func newBoolValue(val bool, p *bool) *boolValue { - *p = val - return (*boolValue)(p) -} - -func (b *boolValue) Set(s string) error { - v, err := strconv.ParseBool(s) - *b = boolValue(v) - return err -} - -func (b *boolValue) Type() string { - return "bool" -} - -func (b *boolValue) String() string { return strconv.FormatBool(bool(*b)) } - -func (b *boolValue) IsBoolFlag() bool { return true } - -func boolConv(sval string) (interface{}, error) { - return strconv.ParseBool(sval) -} - -// GetBool return the bool value of a flag with the given name -func (f *FlagSet) GetBool(name string) (bool, error) { - val, err := f.getFlagType(name, "bool", boolConv) - if err != nil { - return false, err - } - return val.(bool), nil -} - -// BoolVar defines a bool flag with specified name, default value, and usage string. -// The argument p points to a bool variable in which to store the value of the flag. -func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) { - f.BoolVarP(p, name, "", value, usage) -} - -// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) { - flag := f.VarPF(newBoolValue(value, p), name, shorthand, usage) - flag.NoOptDefVal = "true" -} - -// BoolVar defines a bool flag with specified name, default value, and usage string. -// The argument p points to a bool variable in which to store the value of the flag. -func BoolVar(p *bool, name string, value bool, usage string) { - BoolVarP(p, name, "", value, usage) -} - -// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash. -func BoolVarP(p *bool, name, shorthand string, value bool, usage string) { - flag := CommandLine.VarPF(newBoolValue(value, p), name, shorthand, usage) - flag.NoOptDefVal = "true" -} - -// Bool defines a bool flag with specified name, default value, and usage string. -// The return value is the address of a bool variable that stores the value of the flag. -func (f *FlagSet) Bool(name string, value bool, usage string) *bool { - return f.BoolP(name, "", value, usage) -} - -// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool { - p := new(bool) - f.BoolVarP(p, name, shorthand, value, usage) - return p -} - -// Bool defines a bool flag with specified name, default value, and usage string. -// The return value is the address of a bool variable that stores the value of the flag. -func Bool(name string, value bool, usage string) *bool { - return BoolP(name, "", value, usage) -} - -// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. -func BoolP(name, shorthand string, value bool, usage string) *bool { - b := CommandLine.BoolP(name, shorthand, value, usage) - return b -} diff --git a/vendor/github.com/spf13/pflag/bool_slice.go b/vendor/github.com/spf13/pflag/bool_slice.go deleted file mode 100644 index 3731370d..00000000 --- a/vendor/github.com/spf13/pflag/bool_slice.go +++ /dev/null @@ -1,185 +0,0 @@ -package pflag - -import ( - "io" - "strconv" - "strings" -) - -// -- boolSlice Value -type boolSliceValue struct { - value *[]bool - changed bool -} - -func newBoolSliceValue(val []bool, p *[]bool) *boolSliceValue { - bsv := new(boolSliceValue) - bsv.value = p - *bsv.value = val - return bsv -} - -// Set converts, and assigns, the comma-separated boolean argument string representation as the []bool value of this flag. -// If Set is called on a flag that already has a []bool assigned, the newly converted values will be appended. -func (s *boolSliceValue) Set(val string) error { - - // remove all quote characters - rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "") - - // read flag arguments with CSV parser - boolStrSlice, err := readAsCSV(rmQuote.Replace(val)) - if err != nil && err != io.EOF { - return err - } - - // parse boolean values into slice - out := make([]bool, 0, len(boolStrSlice)) - for _, boolStr := range boolStrSlice { - b, err := strconv.ParseBool(strings.TrimSpace(boolStr)) - if err != nil { - return err - } - out = append(out, b) - } - - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - - s.changed = true - - return nil -} - -// Type returns a string that uniquely represents this flag's type. -func (s *boolSliceValue) Type() string { - return "boolSlice" -} - -// String defines a "native" format for this boolean slice flag value. -func (s *boolSliceValue) String() string { - - boolStrSlice := make([]string, len(*s.value)) - for i, b := range *s.value { - boolStrSlice[i] = strconv.FormatBool(b) - } - - out, _ := writeAsCSV(boolStrSlice) - - return "[" + out + "]" -} - -func (s *boolSliceValue) fromString(val string) (bool, error) { - return strconv.ParseBool(val) -} - -func (s *boolSliceValue) toString(val bool) string { - return strconv.FormatBool(val) -} - -func (s *boolSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *boolSliceValue) Replace(val []string) error { - out := make([]bool, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *boolSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func boolSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []bool{}, nil - } - ss := strings.Split(val, ",") - out := make([]bool, len(ss)) - for i, t := range ss { - var err error - out[i], err = strconv.ParseBool(t) - if err != nil { - return nil, err - } - } - return out, nil -} - -// GetBoolSlice returns the []bool value of a flag with the given name. -func (f *FlagSet) GetBoolSlice(name string) ([]bool, error) { - val, err := f.getFlagType(name, "boolSlice", boolSliceConv) - if err != nil { - return []bool{}, err - } - return val.([]bool), nil -} - -// BoolSliceVar defines a boolSlice flag with specified name, default value, and usage string. -// The argument p points to a []bool variable in which to store the value of the flag. -func (f *FlagSet) BoolSliceVar(p *[]bool, name string, value []bool, usage string) { - f.VarP(newBoolSliceValue(value, p), name, "", usage) -} - -// BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string) { - f.VarP(newBoolSliceValue(value, p), name, shorthand, usage) -} - -// BoolSliceVar defines a []bool flag with specified name, default value, and usage string. -// The argument p points to a []bool variable in which to store the value of the flag. -func BoolSliceVar(p *[]bool, name string, value []bool, usage string) { - CommandLine.VarP(newBoolSliceValue(value, p), name, "", usage) -} - -// BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash. -func BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string) { - CommandLine.VarP(newBoolSliceValue(value, p), name, shorthand, usage) -} - -// BoolSlice defines a []bool flag with specified name, default value, and usage string. -// The return value is the address of a []bool variable that stores the value of the flag. -func (f *FlagSet) BoolSlice(name string, value []bool, usage string) *[]bool { - p := []bool{} - f.BoolSliceVarP(&p, name, "", value, usage) - return &p -} - -// BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool { - p := []bool{} - f.BoolSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// BoolSlice defines a []bool flag with specified name, default value, and usage string. -// The return value is the address of a []bool variable that stores the value of the flag. -func BoolSlice(name string, value []bool, usage string) *[]bool { - return CommandLine.BoolSliceP(name, "", value, usage) -} - -// BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash. -func BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool { - return CommandLine.BoolSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/bytes.go b/vendor/github.com/spf13/pflag/bytes.go deleted file mode 100644 index 67d53045..00000000 --- a/vendor/github.com/spf13/pflag/bytes.go +++ /dev/null @@ -1,209 +0,0 @@ -package pflag - -import ( - "encoding/base64" - "encoding/hex" - "fmt" - "strings" -) - -// BytesHex adapts []byte for use as a flag. Value of flag is HEX encoded -type bytesHexValue []byte - -// String implements pflag.Value.String. -func (bytesHex bytesHexValue) String() string { - return fmt.Sprintf("%X", []byte(bytesHex)) -} - -// Set implements pflag.Value.Set. -func (bytesHex *bytesHexValue) Set(value string) error { - bin, err := hex.DecodeString(strings.TrimSpace(value)) - - if err != nil { - return err - } - - *bytesHex = bin - - return nil -} - -// Type implements pflag.Value.Type. -func (*bytesHexValue) Type() string { - return "bytesHex" -} - -func newBytesHexValue(val []byte, p *[]byte) *bytesHexValue { - *p = val - return (*bytesHexValue)(p) -} - -func bytesHexConv(sval string) (interface{}, error) { - - bin, err := hex.DecodeString(sval) - - if err == nil { - return bin, nil - } - - return nil, fmt.Errorf("invalid string being converted to Bytes: %s %s", sval, err) -} - -// GetBytesHex return the []byte value of a flag with the given name -func (f *FlagSet) GetBytesHex(name string) ([]byte, error) { - val, err := f.getFlagType(name, "bytesHex", bytesHexConv) - - if err != nil { - return []byte{}, err - } - - return val.([]byte), nil -} - -// BytesHexVar defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func (f *FlagSet) BytesHexVar(p *[]byte, name string, value []byte, usage string) { - f.VarP(newBytesHexValue(value, p), name, "", usage) -} - -// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) { - f.VarP(newBytesHexValue(value, p), name, shorthand, usage) -} - -// BytesHexVar defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func BytesHexVar(p *[]byte, name string, value []byte, usage string) { - CommandLine.VarP(newBytesHexValue(value, p), name, "", usage) -} - -// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash. -func BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) { - CommandLine.VarP(newBytesHexValue(value, p), name, shorthand, usage) -} - -// BytesHex defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func (f *FlagSet) BytesHex(name string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesHexVarP(p, name, "", value, usage) - return p -} - -// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesHexP(name, shorthand string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesHexVarP(p, name, shorthand, value, usage) - return p -} - -// BytesHex defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func BytesHex(name string, value []byte, usage string) *[]byte { - return CommandLine.BytesHexP(name, "", value, usage) -} - -// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash. -func BytesHexP(name, shorthand string, value []byte, usage string) *[]byte { - return CommandLine.BytesHexP(name, shorthand, value, usage) -} - -// BytesBase64 adapts []byte for use as a flag. Value of flag is Base64 encoded -type bytesBase64Value []byte - -// String implements pflag.Value.String. -func (bytesBase64 bytesBase64Value) String() string { - return base64.StdEncoding.EncodeToString([]byte(bytesBase64)) -} - -// Set implements pflag.Value.Set. -func (bytesBase64 *bytesBase64Value) Set(value string) error { - bin, err := base64.StdEncoding.DecodeString(strings.TrimSpace(value)) - - if err != nil { - return err - } - - *bytesBase64 = bin - - return nil -} - -// Type implements pflag.Value.Type. -func (*bytesBase64Value) Type() string { - return "bytesBase64" -} - -func newBytesBase64Value(val []byte, p *[]byte) *bytesBase64Value { - *p = val - return (*bytesBase64Value)(p) -} - -func bytesBase64ValueConv(sval string) (interface{}, error) { - - bin, err := base64.StdEncoding.DecodeString(sval) - if err == nil { - return bin, nil - } - - return nil, fmt.Errorf("invalid string being converted to Bytes: %s %s", sval, err) -} - -// GetBytesBase64 return the []byte value of a flag with the given name -func (f *FlagSet) GetBytesBase64(name string) ([]byte, error) { - val, err := f.getFlagType(name, "bytesBase64", bytesBase64ValueConv) - - if err != nil { - return []byte{}, err - } - - return val.([]byte), nil -} - -// BytesBase64Var defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func (f *FlagSet) BytesBase64Var(p *[]byte, name string, value []byte, usage string) { - f.VarP(newBytesBase64Value(value, p), name, "", usage) -} - -// BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string) { - f.VarP(newBytesBase64Value(value, p), name, shorthand, usage) -} - -// BytesBase64Var defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func BytesBase64Var(p *[]byte, name string, value []byte, usage string) { - CommandLine.VarP(newBytesBase64Value(value, p), name, "", usage) -} - -// BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash. -func BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string) { - CommandLine.VarP(newBytesBase64Value(value, p), name, shorthand, usage) -} - -// BytesBase64 defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func (f *FlagSet) BytesBase64(name string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesBase64VarP(p, name, "", value, usage) - return p -} - -// BytesBase64P is like BytesBase64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesBase64P(name, shorthand string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesBase64VarP(p, name, shorthand, value, usage) - return p -} - -// BytesBase64 defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func BytesBase64(name string, value []byte, usage string) *[]byte { - return CommandLine.BytesBase64P(name, "", value, usage) -} - -// BytesBase64P is like BytesBase64, but accepts a shorthand letter that can be used after a single dash. -func BytesBase64P(name, shorthand string, value []byte, usage string) *[]byte { - return CommandLine.BytesBase64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/count.go b/vendor/github.com/spf13/pflag/count.go deleted file mode 100644 index a0b2679f..00000000 --- a/vendor/github.com/spf13/pflag/count.go +++ /dev/null @@ -1,96 +0,0 @@ -package pflag - -import "strconv" - -// -- count Value -type countValue int - -func newCountValue(val int, p *int) *countValue { - *p = val - return (*countValue)(p) -} - -func (i *countValue) Set(s string) error { - // "+1" means that no specific value was passed, so increment - if s == "+1" { - *i = countValue(*i + 1) - return nil - } - v, err := strconv.ParseInt(s, 0, 0) - *i = countValue(v) - return err -} - -func (i *countValue) Type() string { - return "count" -} - -func (i *countValue) String() string { return strconv.Itoa(int(*i)) } - -func countConv(sval string) (interface{}, error) { - i, err := strconv.Atoi(sval) - if err != nil { - return nil, err - } - return i, nil -} - -// GetCount return the int value of a flag with the given name -func (f *FlagSet) GetCount(name string) (int, error) { - val, err := f.getFlagType(name, "count", countConv) - if err != nil { - return 0, err - } - return val.(int), nil -} - -// CountVar defines a count flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -// A count flag will add 1 to its value every time it is found on the command line -func (f *FlagSet) CountVar(p *int, name string, usage string) { - f.CountVarP(p, name, "", usage) -} - -// CountVarP is like CountVar only take a shorthand for the flag name. -func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string) { - flag := f.VarPF(newCountValue(0, p), name, shorthand, usage) - flag.NoOptDefVal = "+1" -} - -// CountVar like CountVar only the flag is placed on the CommandLine instead of a given flag set -func CountVar(p *int, name string, usage string) { - CommandLine.CountVar(p, name, usage) -} - -// CountVarP is like CountVar only take a shorthand for the flag name. -func CountVarP(p *int, name, shorthand string, usage string) { - CommandLine.CountVarP(p, name, shorthand, usage) -} - -// Count defines a count flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -// A count flag will add 1 to its value every time it is found on the command line -func (f *FlagSet) Count(name string, usage string) *int { - p := new(int) - f.CountVarP(p, name, "", usage) - return p -} - -// CountP is like Count only takes a shorthand for the flag name. -func (f *FlagSet) CountP(name, shorthand string, usage string) *int { - p := new(int) - f.CountVarP(p, name, shorthand, usage) - return p -} - -// Count defines a count flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -// A count flag will add 1 to its value evey time it is found on the command line -func Count(name string, usage string) *int { - return CommandLine.CountP(name, "", usage) -} - -// CountP is like Count only takes a shorthand for the flag name. -func CountP(name, shorthand string, usage string) *int { - return CommandLine.CountP(name, shorthand, usage) -} diff --git a/vendor/github.com/spf13/pflag/duration.go b/vendor/github.com/spf13/pflag/duration.go deleted file mode 100644 index e9debef8..00000000 --- a/vendor/github.com/spf13/pflag/duration.go +++ /dev/null @@ -1,86 +0,0 @@ -package pflag - -import ( - "time" -) - -// -- time.Duration Value -type durationValue time.Duration - -func newDurationValue(val time.Duration, p *time.Duration) *durationValue { - *p = val - return (*durationValue)(p) -} - -func (d *durationValue) Set(s string) error { - v, err := time.ParseDuration(s) - *d = durationValue(v) - return err -} - -func (d *durationValue) Type() string { - return "duration" -} - -func (d *durationValue) String() string { return (*time.Duration)(d).String() } - -func durationConv(sval string) (interface{}, error) { - return time.ParseDuration(sval) -} - -// GetDuration return the duration value of a flag with the given name -func (f *FlagSet) GetDuration(name string) (time.Duration, error) { - val, err := f.getFlagType(name, "duration", durationConv) - if err != nil { - return 0, err - } - return val.(time.Duration), nil -} - -// DurationVar defines a time.Duration flag with specified name, default value, and usage string. -// The argument p points to a time.Duration variable in which to store the value of the flag. -func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) { - f.VarP(newDurationValue(value, p), name, "", usage) -} - -// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { - f.VarP(newDurationValue(value, p), name, shorthand, usage) -} - -// DurationVar defines a time.Duration flag with specified name, default value, and usage string. -// The argument p points to a time.Duration variable in which to store the value of the flag. -func DurationVar(p *time.Duration, name string, value time.Duration, usage string) { - CommandLine.VarP(newDurationValue(value, p), name, "", usage) -} - -// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. -func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { - CommandLine.VarP(newDurationValue(value, p), name, shorthand, usage) -} - -// Duration defines a time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a time.Duration variable that stores the value of the flag. -func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration { - p := new(time.Duration) - f.DurationVarP(p, name, "", value, usage) - return p -} - -// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { - p := new(time.Duration) - f.DurationVarP(p, name, shorthand, value, usage) - return p -} - -// Duration defines a time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a time.Duration variable that stores the value of the flag. -func Duration(name string, value time.Duration, usage string) *time.Duration { - return CommandLine.DurationP(name, "", value, usage) -} - -// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. -func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { - return CommandLine.DurationP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/duration_slice.go b/vendor/github.com/spf13/pflag/duration_slice.go deleted file mode 100644 index badadda5..00000000 --- a/vendor/github.com/spf13/pflag/duration_slice.go +++ /dev/null @@ -1,166 +0,0 @@ -package pflag - -import ( - "fmt" - "strings" - "time" -) - -// -- durationSlice Value -type durationSliceValue struct { - value *[]time.Duration - changed bool -} - -func newDurationSliceValue(val []time.Duration, p *[]time.Duration) *durationSliceValue { - dsv := new(durationSliceValue) - dsv.value = p - *dsv.value = val - return dsv -} - -func (s *durationSliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]time.Duration, len(ss)) - for i, d := range ss { - var err error - out[i], err = time.ParseDuration(d) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *durationSliceValue) Type() string { - return "durationSlice" -} - -func (s *durationSliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%s", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *durationSliceValue) fromString(val string) (time.Duration, error) { - return time.ParseDuration(val) -} - -func (s *durationSliceValue) toString(val time.Duration) string { - return fmt.Sprintf("%s", val) -} - -func (s *durationSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *durationSliceValue) Replace(val []string) error { - out := make([]time.Duration, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *durationSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func durationSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []time.Duration{}, nil - } - ss := strings.Split(val, ",") - out := make([]time.Duration, len(ss)) - for i, d := range ss { - var err error - out[i], err = time.ParseDuration(d) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetDurationSlice returns the []time.Duration value of a flag with the given name -func (f *FlagSet) GetDurationSlice(name string) ([]time.Duration, error) { - val, err := f.getFlagType(name, "durationSlice", durationSliceConv) - if err != nil { - return []time.Duration{}, err - } - return val.([]time.Duration), nil -} - -// DurationSliceVar defines a durationSlice flag with specified name, default value, and usage string. -// The argument p points to a []time.Duration variable in which to store the value of the flag. -func (f *FlagSet) DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string) { - f.VarP(newDurationSliceValue(value, p), name, "", usage) -} - -// DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string) { - f.VarP(newDurationSliceValue(value, p), name, shorthand, usage) -} - -// DurationSliceVar defines a duration[] flag with specified name, default value, and usage string. -// The argument p points to a duration[] variable in which to store the value of the flag. -func DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string) { - CommandLine.VarP(newDurationSliceValue(value, p), name, "", usage) -} - -// DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash. -func DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string) { - CommandLine.VarP(newDurationSliceValue(value, p), name, shorthand, usage) -} - -// DurationSlice defines a []time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a []time.Duration variable that stores the value of the flag. -func (f *FlagSet) DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration { - p := []time.Duration{} - f.DurationSliceVarP(&p, name, "", value, usage) - return &p -} - -// DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration { - p := []time.Duration{} - f.DurationSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// DurationSlice defines a []time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a []time.Duration variable that stores the value of the flag. -func DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration { - return CommandLine.DurationSliceP(name, "", value, usage) -} - -// DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash. -func DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration { - return CommandLine.DurationSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go deleted file mode 100644 index 24a5036e..00000000 --- a/vendor/github.com/spf13/pflag/flag.go +++ /dev/null @@ -1,1239 +0,0 @@ -// Copyright 2009 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 pflag is a drop-in replacement for Go's flag package, implementing -POSIX/GNU-style --flags. - -pflag is compatible with the GNU extensions to the POSIX recommendations -for command-line options. See -http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - -Usage: - -pflag is a drop-in replacement of Go's native flag package. If you import -pflag under the name "flag" then all code should continue to function -with no changes. - - import flag "github.com/spf13/pflag" - -There is one exception to this: if you directly instantiate the Flag struct -there is one more field "Shorthand" that you will need to set. -Most code never instantiates this struct directly, and instead uses -functions such as String(), BoolVar(), and Var(), and is therefore -unaffected. - -Define flags using flag.String(), Bool(), Int(), etc. - -This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - var ip = flag.Int("flagname", 1234, "help message for flagname") -If you like, you can bind the flag to a variable using the Var() functions. - var flagvar int - func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") - } -Or you can create custom flags that satisfy the Value interface (with -pointer receivers) and couple them to flag parsing by - flag.Var(&flagVal, "name", "help message for flagname") -For such flags, the default value is just the initial value of the variable. - -After all flags are defined, call - flag.Parse() -to parse the command line into the defined flags. - -Flags may then be used directly. If you're using the flags themselves, -they are all pointers; if you bind to variables, they're values. - fmt.Println("ip has value ", *ip) - fmt.Println("flagvar has value ", flagvar) - -After parsing, the arguments after the flag are available as the -slice flag.Args() or individually as flag.Arg(i). -The arguments are indexed from 0 through flag.NArg()-1. - -The pflag package also defines some new functions that are not in flag, -that give one-letter shorthands for flags. You can use these by appending -'P' to the name of any function that defines a flag. - var ip = flag.IntP("flagname", "f", 1234, "help message") - var flagvar bool - func init() { - flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") - } - flag.VarP(&flagval, "varname", "v", "help message") -Shorthand letters can be used with single dashes on the command line. -Boolean shorthand flags can be combined with other shorthand flags. - -Command line flag syntax: - --flag // boolean flags only - --flag=x - -Unlike the flag package, a single dash before an option means something -different than a double dash. Single dashes signify a series of shorthand -letters for flags. All but the last shorthand letter must be boolean flags. - // boolean flags - -f - -abc - // non-boolean flags - -n 1234 - -Ifile - // mixed - -abcs "hello" - -abcn1234 - -Flag parsing stops after the terminator "--". Unlike the flag package, -flags can be interspersed with arguments anywhere on the command line -before this terminator. - -Integer flags accept 1234, 0664, 0x1234 and may be negative. -Boolean flags (in their long form) accept 1, 0, t, f, true, false, -TRUE, FALSE, True, False. -Duration flags accept any input valid for time.ParseDuration. - -The default set of command-line flags is controlled by -top-level functions. The FlagSet type allows one to define -independent sets of flags, such as to implement subcommands -in a command-line interface. The methods of FlagSet are -analogous to the top-level functions for the command-line -flag set. -*/ -package pflag - -import ( - "bytes" - "errors" - goflag "flag" - "fmt" - "io" - "os" - "sort" - "strings" -) - -// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined. -var ErrHelp = errors.New("pflag: help requested") - -// ErrorHandling defines how to handle flag parsing errors. -type ErrorHandling int - -const ( - // ContinueOnError will return an err from Parse() if an error is found - ContinueOnError ErrorHandling = iota - // ExitOnError will call os.Exit(2) if an error is found when parsing - ExitOnError - // PanicOnError will panic() if an error is found when parsing flags - PanicOnError -) - -// ParseErrorsWhitelist defines the parsing errors that can be ignored -type ParseErrorsWhitelist struct { - // UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags - UnknownFlags bool -} - -// NormalizedName is a flag name that has been normalized according to rules -// for the FlagSet (e.g. making '-' and '_' equivalent). -type NormalizedName string - -// A FlagSet represents a set of defined flags. -type FlagSet struct { - // Usage is the function called when an error occurs while parsing flags. - // The field is a function (not a method) that may be changed to point to - // a custom error handler. - Usage func() - - // SortFlags is used to indicate, if user wants to have sorted flags in - // help/usage messages. - SortFlags bool - - // ParseErrorsWhitelist is used to configure a whitelist of errors - ParseErrorsWhitelist ParseErrorsWhitelist - - name string - parsed bool - actual map[NormalizedName]*Flag - orderedActual []*Flag - sortedActual []*Flag - formal map[NormalizedName]*Flag - orderedFormal []*Flag - sortedFormal []*Flag - shorthands map[byte]*Flag - args []string // arguments after flags - argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no -- - errorHandling ErrorHandling - output io.Writer // nil means stderr; use out() accessor - interspersed bool // allow interspersed option/non-option args - normalizeNameFunc func(f *FlagSet, name string) NormalizedName - - addedGoFlagSets []*goflag.FlagSet -} - -// A Flag represents the state of a flag. -type Flag struct { - Name string // name as it appears on command line - Shorthand string // one-letter abbreviated flag - Usage string // help message - Value Value // value as set - DefValue string // default value (as text); for usage message - Changed bool // If the user set the value (or if left to default) - NoOptDefVal string // default value (as text); if the flag is on the command line without any options - Deprecated string // If this flag is deprecated, this string is the new or now thing to use - Hidden bool // used by cobra.Command to allow flags to be hidden from help/usage text - ShorthandDeprecated string // If the shorthand of this flag is deprecated, this string is the new or now thing to use - Annotations map[string][]string // used by cobra.Command bash autocomple code -} - -// Value is the interface to the dynamic value stored in a flag. -// (The default value is represented as a string.) -type Value interface { - String() string - Set(string) error - Type() string -} - -// SliceValue is a secondary interface to all flags which hold a list -// of values. This allows full control over the value of list flags, -// and avoids complicated marshalling and unmarshalling to csv. -type SliceValue interface { - // Append adds the specified value to the end of the flag value list. - Append(string) error - // Replace will fully overwrite any data currently in the flag value list. - Replace([]string) error - // GetSlice returns the flag value list as an array of strings. - GetSlice() []string -} - -// sortFlags returns the flags as a slice in lexicographical sorted order. -func sortFlags(flags map[NormalizedName]*Flag) []*Flag { - list := make(sort.StringSlice, len(flags)) - i := 0 - for k := range flags { - list[i] = string(k) - i++ - } - list.Sort() - result := make([]*Flag, len(list)) - for i, name := range list { - result[i] = flags[NormalizedName(name)] - } - return result -} - -// SetNormalizeFunc allows you to add a function which can translate flag names. -// Flags added to the FlagSet will be translated and then when anything tries to -// look up the flag that will also be translated. So it would be possible to create -// a flag named "getURL" and have it translated to "geturl". A user could then pass -// "--getUrl" which may also be translated to "geturl" and everything will work. -func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) { - f.normalizeNameFunc = n - f.sortedFormal = f.sortedFormal[:0] - for fname, flag := range f.formal { - nname := f.normalizeFlagName(flag.Name) - if fname == nname { - continue - } - flag.Name = string(nname) - delete(f.formal, fname) - f.formal[nname] = flag - if _, set := f.actual[fname]; set { - delete(f.actual, fname) - f.actual[nname] = flag - } - } -} - -// GetNormalizeFunc returns the previously set NormalizeFunc of a function which -// does no translation, if not set previously. -func (f *FlagSet) GetNormalizeFunc() func(f *FlagSet, name string) NormalizedName { - if f.normalizeNameFunc != nil { - return f.normalizeNameFunc - } - return func(f *FlagSet, name string) NormalizedName { return NormalizedName(name) } -} - -func (f *FlagSet) normalizeFlagName(name string) NormalizedName { - n := f.GetNormalizeFunc() - return n(f, name) -} - -func (f *FlagSet) out() io.Writer { - if f.output == nil { - return os.Stderr - } - return f.output -} - -// SetOutput sets the destination for usage and error messages. -// If output is nil, os.Stderr is used. -func (f *FlagSet) SetOutput(output io.Writer) { - f.output = output -} - -// VisitAll visits the flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits all flags, even those not set. -func (f *FlagSet) VisitAll(fn func(*Flag)) { - if len(f.formal) == 0 { - return - } - - var flags []*Flag - if f.SortFlags { - if len(f.formal) != len(f.sortedFormal) { - f.sortedFormal = sortFlags(f.formal) - } - flags = f.sortedFormal - } else { - flags = f.orderedFormal - } - - for _, flag := range flags { - fn(flag) - } -} - -// HasFlags returns a bool to indicate if the FlagSet has any flags defined. -func (f *FlagSet) HasFlags() bool { - return len(f.formal) > 0 -} - -// HasAvailableFlags returns a bool to indicate if the FlagSet has any flags -// that are not hidden. -func (f *FlagSet) HasAvailableFlags() bool { - for _, flag := range f.formal { - if !flag.Hidden { - return true - } - } - return false -} - -// VisitAll visits the command-line flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits all flags, even those not set. -func VisitAll(fn func(*Flag)) { - CommandLine.VisitAll(fn) -} - -// Visit visits the flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits only those flags that have been set. -func (f *FlagSet) Visit(fn func(*Flag)) { - if len(f.actual) == 0 { - return - } - - var flags []*Flag - if f.SortFlags { - if len(f.actual) != len(f.sortedActual) { - f.sortedActual = sortFlags(f.actual) - } - flags = f.sortedActual - } else { - flags = f.orderedActual - } - - for _, flag := range flags { - fn(flag) - } -} - -// Visit visits the command-line flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits only those flags that have been set. -func Visit(fn func(*Flag)) { - CommandLine.Visit(fn) -} - -// Lookup returns the Flag structure of the named flag, returning nil if none exists. -func (f *FlagSet) Lookup(name string) *Flag { - return f.lookup(f.normalizeFlagName(name)) -} - -// ShorthandLookup returns the Flag structure of the short handed flag, -// returning nil if none exists. -// It panics, if len(name) > 1. -func (f *FlagSet) ShorthandLookup(name string) *Flag { - if name == "" { - return nil - } - if len(name) > 1 { - msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name) - fmt.Fprintf(f.out(), msg) - panic(msg) - } - c := name[0] - return f.shorthands[c] -} - -// lookup returns the Flag structure of the named flag, returning nil if none exists. -func (f *FlagSet) lookup(name NormalizedName) *Flag { - return f.formal[name] -} - -// func to return a given type for a given flag name -func (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) { - flag := f.Lookup(name) - if flag == nil { - err := fmt.Errorf("flag accessed but not defined: %s", name) - return nil, err - } - - if flag.Value.Type() != ftype { - err := fmt.Errorf("trying to get %s value of flag of type %s", ftype, flag.Value.Type()) - return nil, err - } - - sval := flag.Value.String() - result, err := convFunc(sval) - if err != nil { - return nil, err - } - return result, nil -} - -// ArgsLenAtDash will return the length of f.Args at the moment when a -- was -// found during arg parsing. This allows your program to know which args were -// before the -- and which came after. -func (f *FlagSet) ArgsLenAtDash() int { - return f.argsLenAtDash -} - -// MarkDeprecated indicated that a flag is deprecated in your program. It will -// continue to function but will not show up in help or usage messages. Using -// this flag will also print the given usageMessage. -func (f *FlagSet) MarkDeprecated(name string, usageMessage string) error { - flag := f.Lookup(name) - if flag == nil { - return fmt.Errorf("flag %q does not exist", name) - } - if usageMessage == "" { - return fmt.Errorf("deprecated message for flag %q must be set", name) - } - flag.Deprecated = usageMessage - flag.Hidden = true - return nil -} - -// MarkShorthandDeprecated will mark the shorthand of a flag deprecated in your -// program. It will continue to function but will not show up in help or usage -// messages. Using this flag will also print the given usageMessage. -func (f *FlagSet) MarkShorthandDeprecated(name string, usageMessage string) error { - flag := f.Lookup(name) - if flag == nil { - return fmt.Errorf("flag %q does not exist", name) - } - if usageMessage == "" { - return fmt.Errorf("deprecated message for flag %q must be set", name) - } - flag.ShorthandDeprecated = usageMessage - return nil -} - -// MarkHidden sets a flag to 'hidden' in your program. It will continue to -// function but will not show up in help or usage messages. -func (f *FlagSet) MarkHidden(name string) error { - flag := f.Lookup(name) - if flag == nil { - return fmt.Errorf("flag %q does not exist", name) - } - flag.Hidden = true - return nil -} - -// Lookup returns the Flag structure of the named command-line flag, -// returning nil if none exists. -func Lookup(name string) *Flag { - return CommandLine.Lookup(name) -} - -// ShorthandLookup returns the Flag structure of the short handed flag, -// returning nil if none exists. -func ShorthandLookup(name string) *Flag { - return CommandLine.ShorthandLookup(name) -} - -// Set sets the value of the named flag. -func (f *FlagSet) Set(name, value string) error { - normalName := f.normalizeFlagName(name) - flag, ok := f.formal[normalName] - if !ok { - return fmt.Errorf("no such flag -%v", name) - } - - err := flag.Value.Set(value) - if err != nil { - var flagName string - if flag.Shorthand != "" && flag.ShorthandDeprecated == "" { - flagName = fmt.Sprintf("-%s, --%s", flag.Shorthand, flag.Name) - } else { - flagName = fmt.Sprintf("--%s", flag.Name) - } - return fmt.Errorf("invalid argument %q for %q flag: %v", value, flagName, err) - } - - if !flag.Changed { - if f.actual == nil { - f.actual = make(map[NormalizedName]*Flag) - } - f.actual[normalName] = flag - f.orderedActual = append(f.orderedActual, flag) - - flag.Changed = true - } - - if flag.Deprecated != "" { - fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) - } - return nil -} - -// SetAnnotation allows one to set arbitrary annotations on a flag in the FlagSet. -// This is sometimes used by spf13/cobra programs which want to generate additional -// bash completion information. -func (f *FlagSet) SetAnnotation(name, key string, values []string) error { - normalName := f.normalizeFlagName(name) - flag, ok := f.formal[normalName] - if !ok { - return fmt.Errorf("no such flag -%v", name) - } - if flag.Annotations == nil { - flag.Annotations = map[string][]string{} - } - flag.Annotations[key] = values - return nil -} - -// Changed returns true if the flag was explicitly set during Parse() and false -// otherwise -func (f *FlagSet) Changed(name string) bool { - flag := f.Lookup(name) - // If a flag doesn't exist, it wasn't changed.... - if flag == nil { - return false - } - return flag.Changed -} - -// Set sets the value of the named command-line flag. -func Set(name, value string) error { - return CommandLine.Set(name, value) -} - -// PrintDefaults prints, to standard error unless configured -// otherwise, the default values of all defined flags in the set. -func (f *FlagSet) PrintDefaults() { - usages := f.FlagUsages() - fmt.Fprint(f.out(), usages) -} - -// defaultIsZeroValue returns true if the default value for this flag represents -// a zero value. -func (f *Flag) defaultIsZeroValue() bool { - switch f.Value.(type) { - case boolFlag: - return f.DefValue == "false" - case *durationValue: - // Beginning in Go 1.7, duration zero values are "0s" - return f.DefValue == "0" || f.DefValue == "0s" - case *intValue, *int8Value, *int32Value, *int64Value, *uintValue, *uint8Value, *uint16Value, *uint32Value, *uint64Value, *countValue, *float32Value, *float64Value: - return f.DefValue == "0" - case *stringValue: - return f.DefValue == "" - case *ipValue, *ipMaskValue, *ipNetValue: - return f.DefValue == "" - case *intSliceValue, *stringSliceValue, *stringArrayValue: - return f.DefValue == "[]" - default: - switch f.Value.String() { - case "false": - return true - case "": - return true - case "": - return true - case "0": - return true - } - return false - } -} - -// UnquoteUsage extracts a back-quoted name from the usage -// string for a flag and returns it and the un-quoted usage. -// Given "a `name` to show" it returns ("name", "a name to show"). -// If there are no back quotes, the name is an educated guess of the -// type of the flag's value, or the empty string if the flag is boolean. -func UnquoteUsage(flag *Flag) (name string, usage string) { - // Look for a back-quoted name, but avoid the strings package. - usage = flag.Usage - for i := 0; i < len(usage); i++ { - if usage[i] == '`' { - for j := i + 1; j < len(usage); j++ { - if usage[j] == '`' { - name = usage[i+1 : j] - usage = usage[:i] + name + usage[j+1:] - return name, usage - } - } - break // Only one back quote; use type name. - } - } - - name = flag.Value.Type() - switch name { - case "bool": - name = "" - case "float64": - name = "float" - case "int64": - name = "int" - case "uint64": - name = "uint" - case "stringSlice": - name = "strings" - case "intSlice": - name = "ints" - case "uintSlice": - name = "uints" - case "boolSlice": - name = "bools" - } - - return -} - -// Splits the string `s` on whitespace into an initial substring up to -// `i` runes in length and the remainder. Will go `slop` over `i` if -// that encompasses the entire string (which allows the caller to -// avoid short orphan words on the final line). -func wrapN(i, slop int, s string) (string, string) { - if i+slop > len(s) { - return s, "" - } - - w := strings.LastIndexAny(s[:i], " \t\n") - if w <= 0 { - return s, "" - } - nlPos := strings.LastIndex(s[:i], "\n") - if nlPos > 0 && nlPos < w { - return s[:nlPos], s[nlPos+1:] - } - return s[:w], s[w+1:] -} - -// Wraps the string `s` to a maximum width `w` with leading indent -// `i`. The first line is not indented (this is assumed to be done by -// caller). Pass `w` == 0 to do no wrapping -func wrap(i, w int, s string) string { - if w == 0 { - return strings.Replace(s, "\n", "\n"+strings.Repeat(" ", i), -1) - } - - // space between indent i and end of line width w into which - // we should wrap the text. - wrap := w - i - - var r, l string - - // Not enough space for sensible wrapping. Wrap as a block on - // the next line instead. - if wrap < 24 { - i = 16 - wrap = w - i - r += "\n" + strings.Repeat(" ", i) - } - // If still not enough space then don't even try to wrap. - if wrap < 24 { - return strings.Replace(s, "\n", r, -1) - } - - // Try to avoid short orphan words on the final line, by - // allowing wrapN to go a bit over if that would fit in the - // remainder of the line. - slop := 5 - wrap = wrap - slop - - // Handle first line, which is indented by the caller (or the - // special case above) - l, s = wrapN(wrap, slop, s) - r = r + strings.Replace(l, "\n", "\n"+strings.Repeat(" ", i), -1) - - // Now wrap the rest - for s != "" { - var t string - - t, s = wrapN(wrap, slop, s) - r = r + "\n" + strings.Repeat(" ", i) + strings.Replace(t, "\n", "\n"+strings.Repeat(" ", i), -1) - } - - return r - -} - -// FlagUsagesWrapped returns a string containing the usage information -// for all flags in the FlagSet. Wrapped to `cols` columns (0 for no -// wrapping) -func (f *FlagSet) FlagUsagesWrapped(cols int) string { - buf := new(bytes.Buffer) - - lines := make([]string, 0, len(f.formal)) - - maxlen := 0 - f.VisitAll(func(flag *Flag) { - if flag.Hidden { - return - } - - line := "" - if flag.Shorthand != "" && flag.ShorthandDeprecated == "" { - line = fmt.Sprintf(" -%s, --%s", flag.Shorthand, flag.Name) - } else { - line = fmt.Sprintf(" --%s", flag.Name) - } - - varname, usage := UnquoteUsage(flag) - if varname != "" { - line += " " + varname - } - if flag.NoOptDefVal != "" { - switch flag.Value.Type() { - case "string": - line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal) - case "bool": - if flag.NoOptDefVal != "true" { - line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) - } - case "count": - if flag.NoOptDefVal != "+1" { - line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) - } - default: - line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) - } - } - - // This special character will be replaced with spacing once the - // correct alignment is calculated - line += "\x00" - if len(line) > maxlen { - maxlen = len(line) - } - - line += usage - if !flag.defaultIsZeroValue() { - if flag.Value.Type() == "string" { - line += fmt.Sprintf(" (default %q)", flag.DefValue) - } else { - line += fmt.Sprintf(" (default %s)", flag.DefValue) - } - } - if len(flag.Deprecated) != 0 { - line += fmt.Sprintf(" (DEPRECATED: %s)", flag.Deprecated) - } - - lines = append(lines, line) - }) - - for _, line := range lines { - sidx := strings.Index(line, "\x00") - spacing := strings.Repeat(" ", maxlen-sidx) - // maxlen + 2 comes from + 1 for the \x00 and + 1 for the (deliberate) off-by-one in maxlen-sidx - fmt.Fprintln(buf, line[:sidx], spacing, wrap(maxlen+2, cols, line[sidx+1:])) - } - - return buf.String() -} - -// FlagUsages returns a string containing the usage information for all flags in -// the FlagSet -func (f *FlagSet) FlagUsages() string { - return f.FlagUsagesWrapped(0) -} - -// PrintDefaults prints to standard error the default values of all defined command-line flags. -func PrintDefaults() { - CommandLine.PrintDefaults() -} - -// defaultUsage is the default function to print a usage message. -func defaultUsage(f *FlagSet) { - fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) - f.PrintDefaults() -} - -// NOTE: Usage is not just defaultUsage(CommandLine) -// because it serves (via godoc flag Usage) as the example -// for how to write your own usage function. - -// Usage prints to standard error a usage message documenting all defined command-line flags. -// The function is a variable that may be changed to point to a custom function. -// By default it prints a simple header and calls PrintDefaults; for details about the -// format of the output and how to control it, see the documentation for PrintDefaults. -var Usage = func() { - fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) - PrintDefaults() -} - -// NFlag returns the number of flags that have been set. -func (f *FlagSet) NFlag() int { return len(f.actual) } - -// NFlag returns the number of command-line flags that have been set. -func NFlag() int { return len(CommandLine.actual) } - -// Arg returns the i'th argument. Arg(0) is the first remaining argument -// after flags have been processed. -func (f *FlagSet) Arg(i int) string { - if i < 0 || i >= len(f.args) { - return "" - } - return f.args[i] -} - -// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument -// after flags have been processed. -func Arg(i int) string { - return CommandLine.Arg(i) -} - -// NArg is the number of arguments remaining after flags have been processed. -func (f *FlagSet) NArg() int { return len(f.args) } - -// NArg is the number of arguments remaining after flags have been processed. -func NArg() int { return len(CommandLine.args) } - -// Args returns the non-flag arguments. -func (f *FlagSet) Args() []string { return f.args } - -// Args returns the non-flag command-line arguments. -func Args() []string { return CommandLine.args } - -// Var defines a flag with the specified name and usage string. The type and -// value of the flag are represented by the first argument, of type Value, which -// typically holds a user-defined implementation of Value. For instance, the -// caller could create a flag that turns a comma-separated string into a slice -// of strings by giving the slice the methods of Value; in particular, Set would -// decompose the comma-separated string into the slice. -func (f *FlagSet) Var(value Value, name string, usage string) { - f.VarP(value, name, "", usage) -} - -// VarPF is like VarP, but returns the flag created -func (f *FlagSet) VarPF(value Value, name, shorthand, usage string) *Flag { - // Remember the default value as a string; it won't change. - flag := &Flag{ - Name: name, - Shorthand: shorthand, - Usage: usage, - Value: value, - DefValue: value.String(), - } - f.AddFlag(flag) - return flag -} - -// VarP is like Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) VarP(value Value, name, shorthand, usage string) { - f.VarPF(value, name, shorthand, usage) -} - -// AddFlag will add the flag to the FlagSet -func (f *FlagSet) AddFlag(flag *Flag) { - normalizedFlagName := f.normalizeFlagName(flag.Name) - - _, alreadyThere := f.formal[normalizedFlagName] - if alreadyThere { - msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) - fmt.Fprintln(f.out(), msg) - panic(msg) // Happens only if flags are declared with identical names - } - if f.formal == nil { - f.formal = make(map[NormalizedName]*Flag) - } - - flag.Name = string(normalizedFlagName) - f.formal[normalizedFlagName] = flag - f.orderedFormal = append(f.orderedFormal, flag) - - if flag.Shorthand == "" { - return - } - if len(flag.Shorthand) > 1 { - msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand) - fmt.Fprintf(f.out(), msg) - panic(msg) - } - if f.shorthands == nil { - f.shorthands = make(map[byte]*Flag) - } - c := flag.Shorthand[0] - used, alreadyThere := f.shorthands[c] - if alreadyThere { - msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name) - fmt.Fprintf(f.out(), msg) - panic(msg) - } - f.shorthands[c] = flag -} - -// AddFlagSet adds one FlagSet to another. If a flag is already present in f -// the flag from newSet will be ignored. -func (f *FlagSet) AddFlagSet(newSet *FlagSet) { - if newSet == nil { - return - } - newSet.VisitAll(func(flag *Flag) { - if f.Lookup(flag.Name) == nil { - f.AddFlag(flag) - } - }) -} - -// Var defines a flag with the specified name and usage string. The type and -// value of the flag are represented by the first argument, of type Value, which -// typically holds a user-defined implementation of Value. For instance, the -// caller could create a flag that turns a comma-separated string into a slice -// of strings by giving the slice the methods of Value; in particular, Set would -// decompose the comma-separated string into the slice. -func Var(value Value, name string, usage string) { - CommandLine.VarP(value, name, "", usage) -} - -// VarP is like Var, but accepts a shorthand letter that can be used after a single dash. -func VarP(value Value, name, shorthand, usage string) { - CommandLine.VarP(value, name, shorthand, usage) -} - -// failf prints to standard error a formatted error and usage message and -// returns the error. -func (f *FlagSet) failf(format string, a ...interface{}) error { - err := fmt.Errorf(format, a...) - if f.errorHandling != ContinueOnError { - fmt.Fprintln(f.out(), err) - f.usage() - } - return err -} - -// usage calls the Usage method for the flag set, or the usage function if -// the flag set is CommandLine. -func (f *FlagSet) usage() { - if f == CommandLine { - Usage() - } else if f.Usage == nil { - defaultUsage(f) - } else { - f.Usage() - } -} - -//--unknown (args will be empty) -//--unknown --next-flag ... (args will be --next-flag ...) -//--unknown arg ... (args will be arg ...) -func stripUnknownFlagValue(args []string) []string { - if len(args) == 0 { - //--unknown - return args - } - - first := args[0] - if len(first) > 0 && first[0] == '-' { - //--unknown --next-flag ... - return args - } - - //--unknown arg ... (args will be arg ...) - if len(args) > 1 { - return args[1:] - } - return nil -} - -func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []string, err error) { - a = args - name := s[2:] - if len(name) == 0 || name[0] == '-' || name[0] == '=' { - err = f.failf("bad flag syntax: %s", s) - return - } - - split := strings.SplitN(name, "=", 2) - name = split[0] - flag, exists := f.formal[f.normalizeFlagName(name)] - - if !exists { - switch { - case name == "help": - f.usage() - return a, ErrHelp - case f.ParseErrorsWhitelist.UnknownFlags: - // --unknown=unknownval arg ... - // we do not want to lose arg in this case - if len(split) >= 2 { - return a, nil - } - - return stripUnknownFlagValue(a), nil - default: - err = f.failf("unknown flag: --%s", name) - return - } - } - - var value string - if len(split) == 2 { - // '--flag=arg' - value = split[1] - } else if flag.NoOptDefVal != "" { - // '--flag' (arg was optional) - value = flag.NoOptDefVal - } else if len(a) > 0 { - // '--flag arg' - value = a[0] - a = a[1:] - } else { - // '--flag' (arg was required) - err = f.failf("flag needs an argument: %s", s) - return - } - - err = fn(flag, value) - if err != nil { - f.failf(err.Error()) - } - return -} - -func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parseFunc) (outShorts string, outArgs []string, err error) { - outArgs = args - - if strings.HasPrefix(shorthands, "test.") { - return - } - - outShorts = shorthands[1:] - c := shorthands[0] - - flag, exists := f.shorthands[c] - if !exists { - switch { - case c == 'h': - f.usage() - err = ErrHelp - return - case f.ParseErrorsWhitelist.UnknownFlags: - // '-f=arg arg ...' - // we do not want to lose arg in this case - if len(shorthands) > 2 && shorthands[1] == '=' { - outShorts = "" - return - } - - outArgs = stripUnknownFlagValue(outArgs) - return - default: - err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands) - return - } - } - - var value string - if len(shorthands) > 2 && shorthands[1] == '=' { - // '-f=arg' - value = shorthands[2:] - outShorts = "" - } else if flag.NoOptDefVal != "" { - // '-f' (arg was optional) - value = flag.NoOptDefVal - } else if len(shorthands) > 1 { - // '-farg' - value = shorthands[1:] - outShorts = "" - } else if len(args) > 0 { - // '-f arg' - value = args[0] - outArgs = args[1:] - } else { - // '-f' (arg was required) - err = f.failf("flag needs an argument: %q in -%s", c, shorthands) - return - } - - if flag.ShorthandDeprecated != "" { - fmt.Fprintf(f.out(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) - } - - err = fn(flag, value) - if err != nil { - f.failf(err.Error()) - } - return -} - -func (f *FlagSet) parseShortArg(s string, args []string, fn parseFunc) (a []string, err error) { - a = args - shorthands := s[1:] - - // "shorthands" can be a series of shorthand letters of flags (e.g. "-vvv"). - for len(shorthands) > 0 { - shorthands, a, err = f.parseSingleShortArg(shorthands, args, fn) - if err != nil { - return - } - } - - return -} - -func (f *FlagSet) parseArgs(args []string, fn parseFunc) (err error) { - for len(args) > 0 { - s := args[0] - args = args[1:] - if len(s) == 0 || s[0] != '-' || len(s) == 1 { - if !f.interspersed { - f.args = append(f.args, s) - f.args = append(f.args, args...) - return nil - } - f.args = append(f.args, s) - continue - } - - if s[1] == '-' { - if len(s) == 2 { // "--" terminates the flags - f.argsLenAtDash = len(f.args) - f.args = append(f.args, args...) - break - } - args, err = f.parseLongArg(s, args, fn) - } else { - args, err = f.parseShortArg(s, args, fn) - } - if err != nil { - return - } - } - return -} - -// Parse parses flag definitions from the argument list, which should not -// include the command name. Must be called after all flags in the FlagSet -// are defined and before flags are accessed by the program. -// The return value will be ErrHelp if -help was set but not defined. -func (f *FlagSet) Parse(arguments []string) error { - if f.addedGoFlagSets != nil { - for _, goFlagSet := range f.addedGoFlagSets { - goFlagSet.Parse(nil) - } - } - f.parsed = true - - if len(arguments) < 0 { - return nil - } - - f.args = make([]string, 0, len(arguments)) - - set := func(flag *Flag, value string) error { - return f.Set(flag.Name, value) - } - - err := f.parseArgs(arguments, set) - if err != nil { - switch f.errorHandling { - case ContinueOnError: - return err - case ExitOnError: - fmt.Println(err) - os.Exit(2) - case PanicOnError: - panic(err) - } - } - return nil -} - -type parseFunc func(flag *Flag, value string) error - -// ParseAll parses flag definitions from the argument list, which should not -// include the command name. The arguments for fn are flag and value. Must be -// called after all flags in the FlagSet are defined and before flags are -// accessed by the program. The return value will be ErrHelp if -help was set -// but not defined. -func (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string) error) error { - f.parsed = true - f.args = make([]string, 0, len(arguments)) - - err := f.parseArgs(arguments, fn) - if err != nil { - switch f.errorHandling { - case ContinueOnError: - return err - case ExitOnError: - os.Exit(2) - case PanicOnError: - panic(err) - } - } - return nil -} - -// Parsed reports whether f.Parse has been called. -func (f *FlagSet) Parsed() bool { - return f.parsed -} - -// Parse parses the command-line flags from os.Args[1:]. Must be called -// after all flags are defined and before flags are accessed by the program. -func Parse() { - // Ignore errors; CommandLine is set for ExitOnError. - CommandLine.Parse(os.Args[1:]) -} - -// ParseAll parses the command-line flags from os.Args[1:] and called fn for each. -// The arguments for fn are flag and value. Must be called after all flags are -// defined and before flags are accessed by the program. -func ParseAll(fn func(flag *Flag, value string) error) { - // Ignore errors; CommandLine is set for ExitOnError. - CommandLine.ParseAll(os.Args[1:], fn) -} - -// SetInterspersed sets whether to support interspersed option/non-option arguments. -func SetInterspersed(interspersed bool) { - CommandLine.SetInterspersed(interspersed) -} - -// Parsed returns true if the command-line flags have been parsed. -func Parsed() bool { - return CommandLine.Parsed() -} - -// CommandLine is the default set of command-line flags, parsed from os.Args. -var CommandLine = NewFlagSet(os.Args[0], ExitOnError) - -// NewFlagSet returns a new, empty flag set with the specified name, -// error handling property and SortFlags set to true. -func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { - f := &FlagSet{ - name: name, - errorHandling: errorHandling, - argsLenAtDash: -1, - interspersed: true, - SortFlags: true, - } - return f -} - -// SetInterspersed sets whether to support interspersed option/non-option arguments. -func (f *FlagSet) SetInterspersed(interspersed bool) { - f.interspersed = interspersed -} - -// Init sets the name and error handling property for a flag set. -// By default, the zero FlagSet uses an empty name and the -// ContinueOnError error handling policy. -func (f *FlagSet) Init(name string, errorHandling ErrorHandling) { - f.name = name - f.errorHandling = errorHandling - f.argsLenAtDash = -1 -} diff --git a/vendor/github.com/spf13/pflag/float32.go b/vendor/github.com/spf13/pflag/float32.go deleted file mode 100644 index a243f81f..00000000 --- a/vendor/github.com/spf13/pflag/float32.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- float32 Value -type float32Value float32 - -func newFloat32Value(val float32, p *float32) *float32Value { - *p = val - return (*float32Value)(p) -} - -func (f *float32Value) Set(s string) error { - v, err := strconv.ParseFloat(s, 32) - *f = float32Value(v) - return err -} - -func (f *float32Value) Type() string { - return "float32" -} - -func (f *float32Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 32) } - -func float32Conv(sval string) (interface{}, error) { - v, err := strconv.ParseFloat(sval, 32) - if err != nil { - return 0, err - } - return float32(v), nil -} - -// GetFloat32 return the float32 value of a flag with the given name -func (f *FlagSet) GetFloat32(name string) (float32, error) { - val, err := f.getFlagType(name, "float32", float32Conv) - if err != nil { - return 0, err - } - return val.(float32), nil -} - -// Float32Var defines a float32 flag with specified name, default value, and usage string. -// The argument p points to a float32 variable in which to store the value of the flag. -func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string) { - f.VarP(newFloat32Value(value, p), name, "", usage) -} - -// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string) { - f.VarP(newFloat32Value(value, p), name, shorthand, usage) -} - -// Float32Var defines a float32 flag with specified name, default value, and usage string. -// The argument p points to a float32 variable in which to store the value of the flag. -func Float32Var(p *float32, name string, value float32, usage string) { - CommandLine.VarP(newFloat32Value(value, p), name, "", usage) -} - -// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash. -func Float32VarP(p *float32, name, shorthand string, value float32, usage string) { - CommandLine.VarP(newFloat32Value(value, p), name, shorthand, usage) -} - -// Float32 defines a float32 flag with specified name, default value, and usage string. -// The return value is the address of a float32 variable that stores the value of the flag. -func (f *FlagSet) Float32(name string, value float32, usage string) *float32 { - p := new(float32) - f.Float32VarP(p, name, "", value, usage) - return p -} - -// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32 { - p := new(float32) - f.Float32VarP(p, name, shorthand, value, usage) - return p -} - -// Float32 defines a float32 flag with specified name, default value, and usage string. -// The return value is the address of a float32 variable that stores the value of the flag. -func Float32(name string, value float32, usage string) *float32 { - return CommandLine.Float32P(name, "", value, usage) -} - -// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash. -func Float32P(name, shorthand string, value float32, usage string) *float32 { - return CommandLine.Float32P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/float32_slice.go b/vendor/github.com/spf13/pflag/float32_slice.go deleted file mode 100644 index caa35274..00000000 --- a/vendor/github.com/spf13/pflag/float32_slice.go +++ /dev/null @@ -1,174 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- float32Slice Value -type float32SliceValue struct { - value *[]float32 - changed bool -} - -func newFloat32SliceValue(val []float32, p *[]float32) *float32SliceValue { - isv := new(float32SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *float32SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]float32, len(ss)) - for i, d := range ss { - var err error - var temp64 float64 - temp64, err = strconv.ParseFloat(d, 32) - if err != nil { - return err - } - out[i] = float32(temp64) - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *float32SliceValue) Type() string { - return "float32Slice" -} - -func (s *float32SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%f", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *float32SliceValue) fromString(val string) (float32, error) { - t64, err := strconv.ParseFloat(val, 32) - if err != nil { - return 0, err - } - return float32(t64), nil -} - -func (s *float32SliceValue) toString(val float32) string { - return fmt.Sprintf("%f", val) -} - -func (s *float32SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *float32SliceValue) Replace(val []string) error { - out := make([]float32, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *float32SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func float32SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []float32{}, nil - } - ss := strings.Split(val, ",") - out := make([]float32, len(ss)) - for i, d := range ss { - var err error - var temp64 float64 - temp64, err = strconv.ParseFloat(d, 32) - if err != nil { - return nil, err - } - out[i] = float32(temp64) - - } - return out, nil -} - -// GetFloat32Slice return the []float32 value of a flag with the given name -func (f *FlagSet) GetFloat32Slice(name string) ([]float32, error) { - val, err := f.getFlagType(name, "float32Slice", float32SliceConv) - if err != nil { - return []float32{}, err - } - return val.([]float32), nil -} - -// Float32SliceVar defines a float32Slice flag with specified name, default value, and usage string. -// The argument p points to a []float32 variable in which to store the value of the flag. -func (f *FlagSet) Float32SliceVar(p *[]float32, name string, value []float32, usage string) { - f.VarP(newFloat32SliceValue(value, p), name, "", usage) -} - -// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) { - f.VarP(newFloat32SliceValue(value, p), name, shorthand, usage) -} - -// Float32SliceVar defines a float32[] flag with specified name, default value, and usage string. -// The argument p points to a float32[] variable in which to store the value of the flag. -func Float32SliceVar(p *[]float32, name string, value []float32, usage string) { - CommandLine.VarP(newFloat32SliceValue(value, p), name, "", usage) -} - -// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) { - CommandLine.VarP(newFloat32SliceValue(value, p), name, shorthand, usage) -} - -// Float32Slice defines a []float32 flag with specified name, default value, and usage string. -// The return value is the address of a []float32 variable that stores the value of the flag. -func (f *FlagSet) Float32Slice(name string, value []float32, usage string) *[]float32 { - p := []float32{} - f.Float32SliceVarP(&p, name, "", value, usage) - return &p -} - -// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 { - p := []float32{} - f.Float32SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Float32Slice defines a []float32 flag with specified name, default value, and usage string. -// The return value is the address of a []float32 variable that stores the value of the flag. -func Float32Slice(name string, value []float32, usage string) *[]float32 { - return CommandLine.Float32SliceP(name, "", value, usage) -} - -// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash. -func Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 { - return CommandLine.Float32SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/float64.go b/vendor/github.com/spf13/pflag/float64.go deleted file mode 100644 index 04b5492a..00000000 --- a/vendor/github.com/spf13/pflag/float64.go +++ /dev/null @@ -1,84 +0,0 @@ -package pflag - -import "strconv" - -// -- float64 Value -type float64Value float64 - -func newFloat64Value(val float64, p *float64) *float64Value { - *p = val - return (*float64Value)(p) -} - -func (f *float64Value) Set(s string) error { - v, err := strconv.ParseFloat(s, 64) - *f = float64Value(v) - return err -} - -func (f *float64Value) Type() string { - return "float64" -} - -func (f *float64Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 64) } - -func float64Conv(sval string) (interface{}, error) { - return strconv.ParseFloat(sval, 64) -} - -// GetFloat64 return the float64 value of a flag with the given name -func (f *FlagSet) GetFloat64(name string) (float64, error) { - val, err := f.getFlagType(name, "float64", float64Conv) - if err != nil { - return 0, err - } - return val.(float64), nil -} - -// Float64Var defines a float64 flag with specified name, default value, and usage string. -// The argument p points to a float64 variable in which to store the value of the flag. -func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) { - f.VarP(newFloat64Value(value, p), name, "", usage) -} - -// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) { - f.VarP(newFloat64Value(value, p), name, shorthand, usage) -} - -// Float64Var defines a float64 flag with specified name, default value, and usage string. -// The argument p points to a float64 variable in which to store the value of the flag. -func Float64Var(p *float64, name string, value float64, usage string) { - CommandLine.VarP(newFloat64Value(value, p), name, "", usage) -} - -// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash. -func Float64VarP(p *float64, name, shorthand string, value float64, usage string) { - CommandLine.VarP(newFloat64Value(value, p), name, shorthand, usage) -} - -// Float64 defines a float64 flag with specified name, default value, and usage string. -// The return value is the address of a float64 variable that stores the value of the flag. -func (f *FlagSet) Float64(name string, value float64, usage string) *float64 { - p := new(float64) - f.Float64VarP(p, name, "", value, usage) - return p -} - -// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 { - p := new(float64) - f.Float64VarP(p, name, shorthand, value, usage) - return p -} - -// Float64 defines a float64 flag with specified name, default value, and usage string. -// The return value is the address of a float64 variable that stores the value of the flag. -func Float64(name string, value float64, usage string) *float64 { - return CommandLine.Float64P(name, "", value, usage) -} - -// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash. -func Float64P(name, shorthand string, value float64, usage string) *float64 { - return CommandLine.Float64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/float64_slice.go b/vendor/github.com/spf13/pflag/float64_slice.go deleted file mode 100644 index 85bf3073..00000000 --- a/vendor/github.com/spf13/pflag/float64_slice.go +++ /dev/null @@ -1,166 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- float64Slice Value -type float64SliceValue struct { - value *[]float64 - changed bool -} - -func newFloat64SliceValue(val []float64, p *[]float64) *float64SliceValue { - isv := new(float64SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *float64SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]float64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseFloat(d, 64) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *float64SliceValue) Type() string { - return "float64Slice" -} - -func (s *float64SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%f", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *float64SliceValue) fromString(val string) (float64, error) { - return strconv.ParseFloat(val, 64) -} - -func (s *float64SliceValue) toString(val float64) string { - return fmt.Sprintf("%f", val) -} - -func (s *float64SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *float64SliceValue) Replace(val []string) error { - out := make([]float64, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *float64SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func float64SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []float64{}, nil - } - ss := strings.Split(val, ",") - out := make([]float64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseFloat(d, 64) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetFloat64Slice return the []float64 value of a flag with the given name -func (f *FlagSet) GetFloat64Slice(name string) ([]float64, error) { - val, err := f.getFlagType(name, "float64Slice", float64SliceConv) - if err != nil { - return []float64{}, err - } - return val.([]float64), nil -} - -// Float64SliceVar defines a float64Slice flag with specified name, default value, and usage string. -// The argument p points to a []float64 variable in which to store the value of the flag. -func (f *FlagSet) Float64SliceVar(p *[]float64, name string, value []float64, usage string) { - f.VarP(newFloat64SliceValue(value, p), name, "", usage) -} - -// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) { - f.VarP(newFloat64SliceValue(value, p), name, shorthand, usage) -} - -// Float64SliceVar defines a float64[] flag with specified name, default value, and usage string. -// The argument p points to a float64[] variable in which to store the value of the flag. -func Float64SliceVar(p *[]float64, name string, value []float64, usage string) { - CommandLine.VarP(newFloat64SliceValue(value, p), name, "", usage) -} - -// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) { - CommandLine.VarP(newFloat64SliceValue(value, p), name, shorthand, usage) -} - -// Float64Slice defines a []float64 flag with specified name, default value, and usage string. -// The return value is the address of a []float64 variable that stores the value of the flag. -func (f *FlagSet) Float64Slice(name string, value []float64, usage string) *[]float64 { - p := []float64{} - f.Float64SliceVarP(&p, name, "", value, usage) - return &p -} - -// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 { - p := []float64{} - f.Float64SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Float64Slice defines a []float64 flag with specified name, default value, and usage string. -// The return value is the address of a []float64 variable that stores the value of the flag. -func Float64Slice(name string, value []float64, usage string) *[]float64 { - return CommandLine.Float64SliceP(name, "", value, usage) -} - -// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash. -func Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 { - return CommandLine.Float64SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/golangflag.go b/vendor/github.com/spf13/pflag/golangflag.go deleted file mode 100644 index d3dd72b7..00000000 --- a/vendor/github.com/spf13/pflag/golangflag.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2009 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 pflag - -import ( - goflag "flag" - "reflect" - "strings" -) - -// flagValueWrapper implements pflag.Value around a flag.Value. The main -// difference here is the addition of the Type method that returns a string -// name of the type. As this is generally unknown, we approximate that with -// reflection. -type flagValueWrapper struct { - inner goflag.Value - flagType string -} - -// We are just copying the boolFlag interface out of goflag as that is what -// they use to decide if a flag should get "true" when no arg is given. -type goBoolFlag interface { - goflag.Value - IsBoolFlag() bool -} - -func wrapFlagValue(v goflag.Value) Value { - // If the flag.Value happens to also be a pflag.Value, just use it directly. - if pv, ok := v.(Value); ok { - return pv - } - - pv := &flagValueWrapper{ - inner: v, - } - - t := reflect.TypeOf(v) - if t.Kind() == reflect.Interface || t.Kind() == reflect.Ptr { - t = t.Elem() - } - - pv.flagType = strings.TrimSuffix(t.Name(), "Value") - return pv -} - -func (v *flagValueWrapper) String() string { - return v.inner.String() -} - -func (v *flagValueWrapper) Set(s string) error { - return v.inner.Set(s) -} - -func (v *flagValueWrapper) Type() string { - return v.flagType -} - -// PFlagFromGoFlag will return a *pflag.Flag given a *flag.Flag -// If the *flag.Flag.Name was a single character (ex: `v`) it will be accessiblei -// with both `-v` and `--v` in flags. If the golang flag was more than a single -// character (ex: `verbose`) it will only be accessible via `--verbose` -func PFlagFromGoFlag(goflag *goflag.Flag) *Flag { - // Remember the default value as a string; it won't change. - flag := &Flag{ - Name: goflag.Name, - Usage: goflag.Usage, - Value: wrapFlagValue(goflag.Value), - // Looks like golang flags don't set DefValue correctly :-( - //DefValue: goflag.DefValue, - DefValue: goflag.Value.String(), - } - // Ex: if the golang flag was -v, allow both -v and --v to work - if len(flag.Name) == 1 { - flag.Shorthand = flag.Name - } - if fv, ok := goflag.Value.(goBoolFlag); ok && fv.IsBoolFlag() { - flag.NoOptDefVal = "true" - } - return flag -} - -// AddGoFlag will add the given *flag.Flag to the pflag.FlagSet -func (f *FlagSet) AddGoFlag(goflag *goflag.Flag) { - if f.Lookup(goflag.Name) != nil { - return - } - newflag := PFlagFromGoFlag(goflag) - f.AddFlag(newflag) -} - -// AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet -func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) { - if newSet == nil { - return - } - newSet.VisitAll(func(goflag *goflag.Flag) { - f.AddGoFlag(goflag) - }) - if f.addedGoFlagSets == nil { - f.addedGoFlagSets = make([]*goflag.FlagSet, 0) - } - f.addedGoFlagSets = append(f.addedGoFlagSets, newSet) -} diff --git a/vendor/github.com/spf13/pflag/int.go b/vendor/github.com/spf13/pflag/int.go deleted file mode 100644 index 1474b89d..00000000 --- a/vendor/github.com/spf13/pflag/int.go +++ /dev/null @@ -1,84 +0,0 @@ -package pflag - -import "strconv" - -// -- int Value -type intValue int - -func newIntValue(val int, p *int) *intValue { - *p = val - return (*intValue)(p) -} - -func (i *intValue) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *i = intValue(v) - return err -} - -func (i *intValue) Type() string { - return "int" -} - -func (i *intValue) String() string { return strconv.Itoa(int(*i)) } - -func intConv(sval string) (interface{}, error) { - return strconv.Atoi(sval) -} - -// GetInt return the int value of a flag with the given name -func (f *FlagSet) GetInt(name string) (int, error) { - val, err := f.getFlagType(name, "int", intConv) - if err != nil { - return 0, err - } - return val.(int), nil -} - -// IntVar defines an int flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -func (f *FlagSet) IntVar(p *int, name string, value int, usage string) { - f.VarP(newIntValue(value, p), name, "", usage) -} - -// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) { - f.VarP(newIntValue(value, p), name, shorthand, usage) -} - -// IntVar defines an int flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -func IntVar(p *int, name string, value int, usage string) { - CommandLine.VarP(newIntValue(value, p), name, "", usage) -} - -// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. -func IntVarP(p *int, name, shorthand string, value int, usage string) { - CommandLine.VarP(newIntValue(value, p), name, shorthand, usage) -} - -// Int defines an int flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -func (f *FlagSet) Int(name string, value int, usage string) *int { - p := new(int) - f.IntVarP(p, name, "", value, usage) - return p -} - -// IntP is like Int, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int { - p := new(int) - f.IntVarP(p, name, shorthand, value, usage) - return p -} - -// Int defines an int flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -func Int(name string, value int, usage string) *int { - return CommandLine.IntP(name, "", value, usage) -} - -// IntP is like Int, but accepts a shorthand letter that can be used after a single dash. -func IntP(name, shorthand string, value int, usage string) *int { - return CommandLine.IntP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int16.go b/vendor/github.com/spf13/pflag/int16.go deleted file mode 100644 index f1a01d05..00000000 --- a/vendor/github.com/spf13/pflag/int16.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- int16 Value -type int16Value int16 - -func newInt16Value(val int16, p *int16) *int16Value { - *p = val - return (*int16Value)(p) -} - -func (i *int16Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 16) - *i = int16Value(v) - return err -} - -func (i *int16Value) Type() string { - return "int16" -} - -func (i *int16Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int16Conv(sval string) (interface{}, error) { - v, err := strconv.ParseInt(sval, 0, 16) - if err != nil { - return 0, err - } - return int16(v), nil -} - -// GetInt16 returns the int16 value of a flag with the given name -func (f *FlagSet) GetInt16(name string) (int16, error) { - val, err := f.getFlagType(name, "int16", int16Conv) - if err != nil { - return 0, err - } - return val.(int16), nil -} - -// Int16Var defines an int16 flag with specified name, default value, and usage string. -// The argument p points to an int16 variable in which to store the value of the flag. -func (f *FlagSet) Int16Var(p *int16, name string, value int16, usage string) { - f.VarP(newInt16Value(value, p), name, "", usage) -} - -// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int16VarP(p *int16, name, shorthand string, value int16, usage string) { - f.VarP(newInt16Value(value, p), name, shorthand, usage) -} - -// Int16Var defines an int16 flag with specified name, default value, and usage string. -// The argument p points to an int16 variable in which to store the value of the flag. -func Int16Var(p *int16, name string, value int16, usage string) { - CommandLine.VarP(newInt16Value(value, p), name, "", usage) -} - -// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash. -func Int16VarP(p *int16, name, shorthand string, value int16, usage string) { - CommandLine.VarP(newInt16Value(value, p), name, shorthand, usage) -} - -// Int16 defines an int16 flag with specified name, default value, and usage string. -// The return value is the address of an int16 variable that stores the value of the flag. -func (f *FlagSet) Int16(name string, value int16, usage string) *int16 { - p := new(int16) - f.Int16VarP(p, name, "", value, usage) - return p -} - -// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int16P(name, shorthand string, value int16, usage string) *int16 { - p := new(int16) - f.Int16VarP(p, name, shorthand, value, usage) - return p -} - -// Int16 defines an int16 flag with specified name, default value, and usage string. -// The return value is the address of an int16 variable that stores the value of the flag. -func Int16(name string, value int16, usage string) *int16 { - return CommandLine.Int16P(name, "", value, usage) -} - -// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash. -func Int16P(name, shorthand string, value int16, usage string) *int16 { - return CommandLine.Int16P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int32.go b/vendor/github.com/spf13/pflag/int32.go deleted file mode 100644 index 9b95944f..00000000 --- a/vendor/github.com/spf13/pflag/int32.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- int32 Value -type int32Value int32 - -func newInt32Value(val int32, p *int32) *int32Value { - *p = val - return (*int32Value)(p) -} - -func (i *int32Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 32) - *i = int32Value(v) - return err -} - -func (i *int32Value) Type() string { - return "int32" -} - -func (i *int32Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int32Conv(sval string) (interface{}, error) { - v, err := strconv.ParseInt(sval, 0, 32) - if err != nil { - return 0, err - } - return int32(v), nil -} - -// GetInt32 return the int32 value of a flag with the given name -func (f *FlagSet) GetInt32(name string) (int32, error) { - val, err := f.getFlagType(name, "int32", int32Conv) - if err != nil { - return 0, err - } - return val.(int32), nil -} - -// Int32Var defines an int32 flag with specified name, default value, and usage string. -// The argument p points to an int32 variable in which to store the value of the flag. -func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) { - f.VarP(newInt32Value(value, p), name, "", usage) -} - -// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string) { - f.VarP(newInt32Value(value, p), name, shorthand, usage) -} - -// Int32Var defines an int32 flag with specified name, default value, and usage string. -// The argument p points to an int32 variable in which to store the value of the flag. -func Int32Var(p *int32, name string, value int32, usage string) { - CommandLine.VarP(newInt32Value(value, p), name, "", usage) -} - -// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash. -func Int32VarP(p *int32, name, shorthand string, value int32, usage string) { - CommandLine.VarP(newInt32Value(value, p), name, shorthand, usage) -} - -// Int32 defines an int32 flag with specified name, default value, and usage string. -// The return value is the address of an int32 variable that stores the value of the flag. -func (f *FlagSet) Int32(name string, value int32, usage string) *int32 { - p := new(int32) - f.Int32VarP(p, name, "", value, usage) - return p -} - -// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32 { - p := new(int32) - f.Int32VarP(p, name, shorthand, value, usage) - return p -} - -// Int32 defines an int32 flag with specified name, default value, and usage string. -// The return value is the address of an int32 variable that stores the value of the flag. -func Int32(name string, value int32, usage string) *int32 { - return CommandLine.Int32P(name, "", value, usage) -} - -// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash. -func Int32P(name, shorthand string, value int32, usage string) *int32 { - return CommandLine.Int32P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int32_slice.go b/vendor/github.com/spf13/pflag/int32_slice.go deleted file mode 100644 index ff128ff0..00000000 --- a/vendor/github.com/spf13/pflag/int32_slice.go +++ /dev/null @@ -1,174 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- int32Slice Value -type int32SliceValue struct { - value *[]int32 - changed bool -} - -func newInt32SliceValue(val []int32, p *[]int32) *int32SliceValue { - isv := new(int32SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *int32SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]int32, len(ss)) - for i, d := range ss { - var err error - var temp64 int64 - temp64, err = strconv.ParseInt(d, 0, 32) - if err != nil { - return err - } - out[i] = int32(temp64) - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *int32SliceValue) Type() string { - return "int32Slice" -} - -func (s *int32SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *int32SliceValue) fromString(val string) (int32, error) { - t64, err := strconv.ParseInt(val, 0, 32) - if err != nil { - return 0, err - } - return int32(t64), nil -} - -func (s *int32SliceValue) toString(val int32) string { - return fmt.Sprintf("%d", val) -} - -func (s *int32SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *int32SliceValue) Replace(val []string) error { - out := make([]int32, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *int32SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func int32SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []int32{}, nil - } - ss := strings.Split(val, ",") - out := make([]int32, len(ss)) - for i, d := range ss { - var err error - var temp64 int64 - temp64, err = strconv.ParseInt(d, 0, 32) - if err != nil { - return nil, err - } - out[i] = int32(temp64) - - } - return out, nil -} - -// GetInt32Slice return the []int32 value of a flag with the given name -func (f *FlagSet) GetInt32Slice(name string) ([]int32, error) { - val, err := f.getFlagType(name, "int32Slice", int32SliceConv) - if err != nil { - return []int32{}, err - } - return val.([]int32), nil -} - -// Int32SliceVar defines a int32Slice flag with specified name, default value, and usage string. -// The argument p points to a []int32 variable in which to store the value of the flag. -func (f *FlagSet) Int32SliceVar(p *[]int32, name string, value []int32, usage string) { - f.VarP(newInt32SliceValue(value, p), name, "", usage) -} - -// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) { - f.VarP(newInt32SliceValue(value, p), name, shorthand, usage) -} - -// Int32SliceVar defines a int32[] flag with specified name, default value, and usage string. -// The argument p points to a int32[] variable in which to store the value of the flag. -func Int32SliceVar(p *[]int32, name string, value []int32, usage string) { - CommandLine.VarP(newInt32SliceValue(value, p), name, "", usage) -} - -// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) { - CommandLine.VarP(newInt32SliceValue(value, p), name, shorthand, usage) -} - -// Int32Slice defines a []int32 flag with specified name, default value, and usage string. -// The return value is the address of a []int32 variable that stores the value of the flag. -func (f *FlagSet) Int32Slice(name string, value []int32, usage string) *[]int32 { - p := []int32{} - f.Int32SliceVarP(&p, name, "", value, usage) - return &p -} - -// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 { - p := []int32{} - f.Int32SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Int32Slice defines a []int32 flag with specified name, default value, and usage string. -// The return value is the address of a []int32 variable that stores the value of the flag. -func Int32Slice(name string, value []int32, usage string) *[]int32 { - return CommandLine.Int32SliceP(name, "", value, usage) -} - -// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash. -func Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 { - return CommandLine.Int32SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int64.go b/vendor/github.com/spf13/pflag/int64.go deleted file mode 100644 index 0026d781..00000000 --- a/vendor/github.com/spf13/pflag/int64.go +++ /dev/null @@ -1,84 +0,0 @@ -package pflag - -import "strconv" - -// -- int64 Value -type int64Value int64 - -func newInt64Value(val int64, p *int64) *int64Value { - *p = val - return (*int64Value)(p) -} - -func (i *int64Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *i = int64Value(v) - return err -} - -func (i *int64Value) Type() string { - return "int64" -} - -func (i *int64Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int64Conv(sval string) (interface{}, error) { - return strconv.ParseInt(sval, 0, 64) -} - -// GetInt64 return the int64 value of a flag with the given name -func (f *FlagSet) GetInt64(name string) (int64, error) { - val, err := f.getFlagType(name, "int64", int64Conv) - if err != nil { - return 0, err - } - return val.(int64), nil -} - -// Int64Var defines an int64 flag with specified name, default value, and usage string. -// The argument p points to an int64 variable in which to store the value of the flag. -func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) { - f.VarP(newInt64Value(value, p), name, "", usage) -} - -// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) { - f.VarP(newInt64Value(value, p), name, shorthand, usage) -} - -// Int64Var defines an int64 flag with specified name, default value, and usage string. -// The argument p points to an int64 variable in which to store the value of the flag. -func Int64Var(p *int64, name string, value int64, usage string) { - CommandLine.VarP(newInt64Value(value, p), name, "", usage) -} - -// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash. -func Int64VarP(p *int64, name, shorthand string, value int64, usage string) { - CommandLine.VarP(newInt64Value(value, p), name, shorthand, usage) -} - -// Int64 defines an int64 flag with specified name, default value, and usage string. -// The return value is the address of an int64 variable that stores the value of the flag. -func (f *FlagSet) Int64(name string, value int64, usage string) *int64 { - p := new(int64) - f.Int64VarP(p, name, "", value, usage) - return p -} - -// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 { - p := new(int64) - f.Int64VarP(p, name, shorthand, value, usage) - return p -} - -// Int64 defines an int64 flag with specified name, default value, and usage string. -// The return value is the address of an int64 variable that stores the value of the flag. -func Int64(name string, value int64, usage string) *int64 { - return CommandLine.Int64P(name, "", value, usage) -} - -// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash. -func Int64P(name, shorthand string, value int64, usage string) *int64 { - return CommandLine.Int64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int64_slice.go b/vendor/github.com/spf13/pflag/int64_slice.go deleted file mode 100644 index 25464638..00000000 --- a/vendor/github.com/spf13/pflag/int64_slice.go +++ /dev/null @@ -1,166 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- int64Slice Value -type int64SliceValue struct { - value *[]int64 - changed bool -} - -func newInt64SliceValue(val []int64, p *[]int64) *int64SliceValue { - isv := new(int64SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *int64SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]int64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseInt(d, 0, 64) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *int64SliceValue) Type() string { - return "int64Slice" -} - -func (s *int64SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *int64SliceValue) fromString(val string) (int64, error) { - return strconv.ParseInt(val, 0, 64) -} - -func (s *int64SliceValue) toString(val int64) string { - return fmt.Sprintf("%d", val) -} - -func (s *int64SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *int64SliceValue) Replace(val []string) error { - out := make([]int64, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *int64SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func int64SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []int64{}, nil - } - ss := strings.Split(val, ",") - out := make([]int64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseInt(d, 0, 64) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetInt64Slice return the []int64 value of a flag with the given name -func (f *FlagSet) GetInt64Slice(name string) ([]int64, error) { - val, err := f.getFlagType(name, "int64Slice", int64SliceConv) - if err != nil { - return []int64{}, err - } - return val.([]int64), nil -} - -// Int64SliceVar defines a int64Slice flag with specified name, default value, and usage string. -// The argument p points to a []int64 variable in which to store the value of the flag. -func (f *FlagSet) Int64SliceVar(p *[]int64, name string, value []int64, usage string) { - f.VarP(newInt64SliceValue(value, p), name, "", usage) -} - -// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) { - f.VarP(newInt64SliceValue(value, p), name, shorthand, usage) -} - -// Int64SliceVar defines a int64[] flag with specified name, default value, and usage string. -// The argument p points to a int64[] variable in which to store the value of the flag. -func Int64SliceVar(p *[]int64, name string, value []int64, usage string) { - CommandLine.VarP(newInt64SliceValue(value, p), name, "", usage) -} - -// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) { - CommandLine.VarP(newInt64SliceValue(value, p), name, shorthand, usage) -} - -// Int64Slice defines a []int64 flag with specified name, default value, and usage string. -// The return value is the address of a []int64 variable that stores the value of the flag. -func (f *FlagSet) Int64Slice(name string, value []int64, usage string) *[]int64 { - p := []int64{} - f.Int64SliceVarP(&p, name, "", value, usage) - return &p -} - -// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 { - p := []int64{} - f.Int64SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Int64Slice defines a []int64 flag with specified name, default value, and usage string. -// The return value is the address of a []int64 variable that stores the value of the flag. -func Int64Slice(name string, value []int64, usage string) *[]int64 { - return CommandLine.Int64SliceP(name, "", value, usage) -} - -// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash. -func Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 { - return CommandLine.Int64SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int8.go b/vendor/github.com/spf13/pflag/int8.go deleted file mode 100644 index 4da92228..00000000 --- a/vendor/github.com/spf13/pflag/int8.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- int8 Value -type int8Value int8 - -func newInt8Value(val int8, p *int8) *int8Value { - *p = val - return (*int8Value)(p) -} - -func (i *int8Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 8) - *i = int8Value(v) - return err -} - -func (i *int8Value) Type() string { - return "int8" -} - -func (i *int8Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int8Conv(sval string) (interface{}, error) { - v, err := strconv.ParseInt(sval, 0, 8) - if err != nil { - return 0, err - } - return int8(v), nil -} - -// GetInt8 return the int8 value of a flag with the given name -func (f *FlagSet) GetInt8(name string) (int8, error) { - val, err := f.getFlagType(name, "int8", int8Conv) - if err != nil { - return 0, err - } - return val.(int8), nil -} - -// Int8Var defines an int8 flag with specified name, default value, and usage string. -// The argument p points to an int8 variable in which to store the value of the flag. -func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string) { - f.VarP(newInt8Value(value, p), name, "", usage) -} - -// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string) { - f.VarP(newInt8Value(value, p), name, shorthand, usage) -} - -// Int8Var defines an int8 flag with specified name, default value, and usage string. -// The argument p points to an int8 variable in which to store the value of the flag. -func Int8Var(p *int8, name string, value int8, usage string) { - CommandLine.VarP(newInt8Value(value, p), name, "", usage) -} - -// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash. -func Int8VarP(p *int8, name, shorthand string, value int8, usage string) { - CommandLine.VarP(newInt8Value(value, p), name, shorthand, usage) -} - -// Int8 defines an int8 flag with specified name, default value, and usage string. -// The return value is the address of an int8 variable that stores the value of the flag. -func (f *FlagSet) Int8(name string, value int8, usage string) *int8 { - p := new(int8) - f.Int8VarP(p, name, "", value, usage) - return p -} - -// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8 { - p := new(int8) - f.Int8VarP(p, name, shorthand, value, usage) - return p -} - -// Int8 defines an int8 flag with specified name, default value, and usage string. -// The return value is the address of an int8 variable that stores the value of the flag. -func Int8(name string, value int8, usage string) *int8 { - return CommandLine.Int8P(name, "", value, usage) -} - -// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash. -func Int8P(name, shorthand string, value int8, usage string) *int8 { - return CommandLine.Int8P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int_slice.go b/vendor/github.com/spf13/pflag/int_slice.go deleted file mode 100644 index e71c39d9..00000000 --- a/vendor/github.com/spf13/pflag/int_slice.go +++ /dev/null @@ -1,158 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- intSlice Value -type intSliceValue struct { - value *[]int - changed bool -} - -func newIntSliceValue(val []int, p *[]int) *intSliceValue { - isv := new(intSliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *intSliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]int, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.Atoi(d) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *intSliceValue) Type() string { - return "intSlice" -} - -func (s *intSliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *intSliceValue) Append(val string) error { - i, err := strconv.Atoi(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *intSliceValue) Replace(val []string) error { - out := make([]int, len(val)) - for i, d := range val { - var err error - out[i], err = strconv.Atoi(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *intSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = strconv.Itoa(d) - } - return out -} - -func intSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []int{}, nil - } - ss := strings.Split(val, ",") - out := make([]int, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.Atoi(d) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetIntSlice return the []int value of a flag with the given name -func (f *FlagSet) GetIntSlice(name string) ([]int, error) { - val, err := f.getFlagType(name, "intSlice", intSliceConv) - if err != nil { - return []int{}, err - } - return val.([]int), nil -} - -// IntSliceVar defines a intSlice flag with specified name, default value, and usage string. -// The argument p points to a []int variable in which to store the value of the flag. -func (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string) { - f.VarP(newIntSliceValue(value, p), name, "", usage) -} - -// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) { - f.VarP(newIntSliceValue(value, p), name, shorthand, usage) -} - -// IntSliceVar defines a int[] flag with specified name, default value, and usage string. -// The argument p points to a int[] variable in which to store the value of the flag. -func IntSliceVar(p *[]int, name string, value []int, usage string) { - CommandLine.VarP(newIntSliceValue(value, p), name, "", usage) -} - -// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash. -func IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) { - CommandLine.VarP(newIntSliceValue(value, p), name, shorthand, usage) -} - -// IntSlice defines a []int flag with specified name, default value, and usage string. -// The return value is the address of a []int variable that stores the value of the flag. -func (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int { - p := []int{} - f.IntSliceVarP(&p, name, "", value, usage) - return &p -} - -// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int { - p := []int{} - f.IntSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// IntSlice defines a []int flag with specified name, default value, and usage string. -// The return value is the address of a []int variable that stores the value of the flag. -func IntSlice(name string, value []int, usage string) *[]int { - return CommandLine.IntSliceP(name, "", value, usage) -} - -// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash. -func IntSliceP(name, shorthand string, value []int, usage string) *[]int { - return CommandLine.IntSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ip.go b/vendor/github.com/spf13/pflag/ip.go deleted file mode 100644 index 3d414ba6..00000000 --- a/vendor/github.com/spf13/pflag/ip.go +++ /dev/null @@ -1,94 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strings" -) - -// -- net.IP value -type ipValue net.IP - -func newIPValue(val net.IP, p *net.IP) *ipValue { - *p = val - return (*ipValue)(p) -} - -func (i *ipValue) String() string { return net.IP(*i).String() } -func (i *ipValue) Set(s string) error { - ip := net.ParseIP(strings.TrimSpace(s)) - if ip == nil { - return fmt.Errorf("failed to parse IP: %q", s) - } - *i = ipValue(ip) - return nil -} - -func (i *ipValue) Type() string { - return "ip" -} - -func ipConv(sval string) (interface{}, error) { - ip := net.ParseIP(sval) - if ip != nil { - return ip, nil - } - return nil, fmt.Errorf("invalid string being converted to IP address: %s", sval) -} - -// GetIP return the net.IP value of a flag with the given name -func (f *FlagSet) GetIP(name string) (net.IP, error) { - val, err := f.getFlagType(name, "ip", ipConv) - if err != nil { - return nil, err - } - return val.(net.IP), nil -} - -// IPVar defines an net.IP flag with specified name, default value, and usage string. -// The argument p points to an net.IP variable in which to store the value of the flag. -func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) { - f.VarP(newIPValue(value, p), name, "", usage) -} - -// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) { - f.VarP(newIPValue(value, p), name, shorthand, usage) -} - -// IPVar defines an net.IP flag with specified name, default value, and usage string. -// The argument p points to an net.IP variable in which to store the value of the flag. -func IPVar(p *net.IP, name string, value net.IP, usage string) { - CommandLine.VarP(newIPValue(value, p), name, "", usage) -} - -// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash. -func IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) { - CommandLine.VarP(newIPValue(value, p), name, shorthand, usage) -} - -// IP defines an net.IP flag with specified name, default value, and usage string. -// The return value is the address of an net.IP variable that stores the value of the flag. -func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP { - p := new(net.IP) - f.IPVarP(p, name, "", value, usage) - return p -} - -// IPP is like IP, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP { - p := new(net.IP) - f.IPVarP(p, name, shorthand, value, usage) - return p -} - -// IP defines an net.IP flag with specified name, default value, and usage string. -// The return value is the address of an net.IP variable that stores the value of the flag. -func IP(name string, value net.IP, usage string) *net.IP { - return CommandLine.IPP(name, "", value, usage) -} - -// IPP is like IP, but accepts a shorthand letter that can be used after a single dash. -func IPP(name, shorthand string, value net.IP, usage string) *net.IP { - return CommandLine.IPP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ip_slice.go b/vendor/github.com/spf13/pflag/ip_slice.go deleted file mode 100644 index 775faae4..00000000 --- a/vendor/github.com/spf13/pflag/ip_slice.go +++ /dev/null @@ -1,186 +0,0 @@ -package pflag - -import ( - "fmt" - "io" - "net" - "strings" -) - -// -- ipSlice Value -type ipSliceValue struct { - value *[]net.IP - changed bool -} - -func newIPSliceValue(val []net.IP, p *[]net.IP) *ipSliceValue { - ipsv := new(ipSliceValue) - ipsv.value = p - *ipsv.value = val - return ipsv -} - -// Set converts, and assigns, the comma-separated IP argument string representation as the []net.IP value of this flag. -// If Set is called on a flag that already has a []net.IP assigned, the newly converted values will be appended. -func (s *ipSliceValue) Set(val string) error { - - // remove all quote characters - rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "") - - // read flag arguments with CSV parser - ipStrSlice, err := readAsCSV(rmQuote.Replace(val)) - if err != nil && err != io.EOF { - return err - } - - // parse ip values into slice - out := make([]net.IP, 0, len(ipStrSlice)) - for _, ipStr := range ipStrSlice { - ip := net.ParseIP(strings.TrimSpace(ipStr)) - if ip == nil { - return fmt.Errorf("invalid string being converted to IP address: %s", ipStr) - } - out = append(out, ip) - } - - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - - s.changed = true - - return nil -} - -// Type returns a string that uniquely represents this flag's type. -func (s *ipSliceValue) Type() string { - return "ipSlice" -} - -// String defines a "native" format for this net.IP slice flag value. -func (s *ipSliceValue) String() string { - - ipStrSlice := make([]string, len(*s.value)) - for i, ip := range *s.value { - ipStrSlice[i] = ip.String() - } - - out, _ := writeAsCSV(ipStrSlice) - - return "[" + out + "]" -} - -func (s *ipSliceValue) fromString(val string) (net.IP, error) { - return net.ParseIP(strings.TrimSpace(val)), nil -} - -func (s *ipSliceValue) toString(val net.IP) string { - return val.String() -} - -func (s *ipSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *ipSliceValue) Replace(val []string) error { - out := make([]net.IP, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *ipSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func ipSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []net.IP{}, nil - } - ss := strings.Split(val, ",") - out := make([]net.IP, len(ss)) - for i, sval := range ss { - ip := net.ParseIP(strings.TrimSpace(sval)) - if ip == nil { - return nil, fmt.Errorf("invalid string being converted to IP address: %s", sval) - } - out[i] = ip - } - return out, nil -} - -// GetIPSlice returns the []net.IP value of a flag with the given name -func (f *FlagSet) GetIPSlice(name string) ([]net.IP, error) { - val, err := f.getFlagType(name, "ipSlice", ipSliceConv) - if err != nil { - return []net.IP{}, err - } - return val.([]net.IP), nil -} - -// IPSliceVar defines a ipSlice flag with specified name, default value, and usage string. -// The argument p points to a []net.IP variable in which to store the value of the flag. -func (f *FlagSet) IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) { - f.VarP(newIPSliceValue(value, p), name, "", usage) -} - -// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) { - f.VarP(newIPSliceValue(value, p), name, shorthand, usage) -} - -// IPSliceVar defines a []net.IP flag with specified name, default value, and usage string. -// The argument p points to a []net.IP variable in which to store the value of the flag. -func IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) { - CommandLine.VarP(newIPSliceValue(value, p), name, "", usage) -} - -// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash. -func IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) { - CommandLine.VarP(newIPSliceValue(value, p), name, shorthand, usage) -} - -// IPSlice defines a []net.IP flag with specified name, default value, and usage string. -// The return value is the address of a []net.IP variable that stores the value of that flag. -func (f *FlagSet) IPSlice(name string, value []net.IP, usage string) *[]net.IP { - p := []net.IP{} - f.IPSliceVarP(&p, name, "", value, usage) - return &p -} - -// IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP { - p := []net.IP{} - f.IPSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// IPSlice defines a []net.IP flag with specified name, default value, and usage string. -// The return value is the address of a []net.IP variable that stores the value of the flag. -func IPSlice(name string, value []net.IP, usage string) *[]net.IP { - return CommandLine.IPSliceP(name, "", value, usage) -} - -// IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash. -func IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP { - return CommandLine.IPSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ipmask.go b/vendor/github.com/spf13/pflag/ipmask.go deleted file mode 100644 index 5bd44bd2..00000000 --- a/vendor/github.com/spf13/pflag/ipmask.go +++ /dev/null @@ -1,122 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strconv" -) - -// -- net.IPMask value -type ipMaskValue net.IPMask - -func newIPMaskValue(val net.IPMask, p *net.IPMask) *ipMaskValue { - *p = val - return (*ipMaskValue)(p) -} - -func (i *ipMaskValue) String() string { return net.IPMask(*i).String() } -func (i *ipMaskValue) Set(s string) error { - ip := ParseIPv4Mask(s) - if ip == nil { - return fmt.Errorf("failed to parse IP mask: %q", s) - } - *i = ipMaskValue(ip) - return nil -} - -func (i *ipMaskValue) Type() string { - return "ipMask" -} - -// ParseIPv4Mask written in IP form (e.g. 255.255.255.0). -// This function should really belong to the net package. -func ParseIPv4Mask(s string) net.IPMask { - mask := net.ParseIP(s) - if mask == nil { - if len(s) != 8 { - return nil - } - // net.IPMask.String() actually outputs things like ffffff00 - // so write a horrible parser for that as well :-( - m := []int{} - for i := 0; i < 4; i++ { - b := "0x" + s[2*i:2*i+2] - d, err := strconv.ParseInt(b, 0, 0) - if err != nil { - return nil - } - m = append(m, int(d)) - } - s := fmt.Sprintf("%d.%d.%d.%d", m[0], m[1], m[2], m[3]) - mask = net.ParseIP(s) - if mask == nil { - return nil - } - } - return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15]) -} - -func parseIPv4Mask(sval string) (interface{}, error) { - mask := ParseIPv4Mask(sval) - if mask == nil { - return nil, fmt.Errorf("unable to parse %s as net.IPMask", sval) - } - return mask, nil -} - -// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name -func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) { - val, err := f.getFlagType(name, "ipMask", parseIPv4Mask) - if err != nil { - return nil, err - } - return val.(net.IPMask), nil -} - -// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. -// The argument p points to an net.IPMask variable in which to store the value of the flag. -func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) { - f.VarP(newIPMaskValue(value, p), name, "", usage) -} - -// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) { - f.VarP(newIPMaskValue(value, p), name, shorthand, usage) -} - -// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. -// The argument p points to an net.IPMask variable in which to store the value of the flag. -func IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) { - CommandLine.VarP(newIPMaskValue(value, p), name, "", usage) -} - -// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash. -func IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) { - CommandLine.VarP(newIPMaskValue(value, p), name, shorthand, usage) -} - -// IPMask defines an net.IPMask flag with specified name, default value, and usage string. -// The return value is the address of an net.IPMask variable that stores the value of the flag. -func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask { - p := new(net.IPMask) - f.IPMaskVarP(p, name, "", value, usage) - return p -} - -// IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask { - p := new(net.IPMask) - f.IPMaskVarP(p, name, shorthand, value, usage) - return p -} - -// IPMask defines an net.IPMask flag with specified name, default value, and usage string. -// The return value is the address of an net.IPMask variable that stores the value of the flag. -func IPMask(name string, value net.IPMask, usage string) *net.IPMask { - return CommandLine.IPMaskP(name, "", value, usage) -} - -// IPMaskP is like IP, but accepts a shorthand letter that can be used after a single dash. -func IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask { - return CommandLine.IPMaskP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ipnet.go b/vendor/github.com/spf13/pflag/ipnet.go deleted file mode 100644 index e2c1b8bc..00000000 --- a/vendor/github.com/spf13/pflag/ipnet.go +++ /dev/null @@ -1,98 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strings" -) - -// IPNet adapts net.IPNet for use as a flag. -type ipNetValue net.IPNet - -func (ipnet ipNetValue) String() string { - n := net.IPNet(ipnet) - return n.String() -} - -func (ipnet *ipNetValue) Set(value string) error { - _, n, err := net.ParseCIDR(strings.TrimSpace(value)) - if err != nil { - return err - } - *ipnet = ipNetValue(*n) - return nil -} - -func (*ipNetValue) Type() string { - return "ipNet" -} - -func newIPNetValue(val net.IPNet, p *net.IPNet) *ipNetValue { - *p = val - return (*ipNetValue)(p) -} - -func ipNetConv(sval string) (interface{}, error) { - _, n, err := net.ParseCIDR(strings.TrimSpace(sval)) - if err == nil { - return *n, nil - } - return nil, fmt.Errorf("invalid string being converted to IPNet: %s", sval) -} - -// GetIPNet return the net.IPNet value of a flag with the given name -func (f *FlagSet) GetIPNet(name string) (net.IPNet, error) { - val, err := f.getFlagType(name, "ipNet", ipNetConv) - if err != nil { - return net.IPNet{}, err - } - return val.(net.IPNet), nil -} - -// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. -// The argument p points to an net.IPNet variable in which to store the value of the flag. -func (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) { - f.VarP(newIPNetValue(value, p), name, "", usage) -} - -// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) { - f.VarP(newIPNetValue(value, p), name, shorthand, usage) -} - -// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. -// The argument p points to an net.IPNet variable in which to store the value of the flag. -func IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) { - CommandLine.VarP(newIPNetValue(value, p), name, "", usage) -} - -// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash. -func IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) { - CommandLine.VarP(newIPNetValue(value, p), name, shorthand, usage) -} - -// IPNet defines an net.IPNet flag with specified name, default value, and usage string. -// The return value is the address of an net.IPNet variable that stores the value of the flag. -func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet { - p := new(net.IPNet) - f.IPNetVarP(p, name, "", value, usage) - return p -} - -// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet { - p := new(net.IPNet) - f.IPNetVarP(p, name, shorthand, value, usage) - return p -} - -// IPNet defines an net.IPNet flag with specified name, default value, and usage string. -// The return value is the address of an net.IPNet variable that stores the value of the flag. -func IPNet(name string, value net.IPNet, usage string) *net.IPNet { - return CommandLine.IPNetP(name, "", value, usage) -} - -// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash. -func IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet { - return CommandLine.IPNetP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string.go b/vendor/github.com/spf13/pflag/string.go deleted file mode 100644 index 04e0a26f..00000000 --- a/vendor/github.com/spf13/pflag/string.go +++ /dev/null @@ -1,80 +0,0 @@ -package pflag - -// -- string Value -type stringValue string - -func newStringValue(val string, p *string) *stringValue { - *p = val - return (*stringValue)(p) -} - -func (s *stringValue) Set(val string) error { - *s = stringValue(val) - return nil -} -func (s *stringValue) Type() string { - return "string" -} - -func (s *stringValue) String() string { return string(*s) } - -func stringConv(sval string) (interface{}, error) { - return sval, nil -} - -// GetString return the string value of a flag with the given name -func (f *FlagSet) GetString(name string) (string, error) { - val, err := f.getFlagType(name, "string", stringConv) - if err != nil { - return "", err - } - return val.(string), nil -} - -// StringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a string variable in which to store the value of the flag. -func (f *FlagSet) StringVar(p *string, name string, value string, usage string) { - f.VarP(newStringValue(value, p), name, "", usage) -} - -// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) { - f.VarP(newStringValue(value, p), name, shorthand, usage) -} - -// StringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a string variable in which to store the value of the flag. -func StringVar(p *string, name string, value string, usage string) { - CommandLine.VarP(newStringValue(value, p), name, "", usage) -} - -// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash. -func StringVarP(p *string, name, shorthand string, value string, usage string) { - CommandLine.VarP(newStringValue(value, p), name, shorthand, usage) -} - -// String defines a string flag with specified name, default value, and usage string. -// The return value is the address of a string variable that stores the value of the flag. -func (f *FlagSet) String(name string, value string, usage string) *string { - p := new(string) - f.StringVarP(p, name, "", value, usage) - return p -} - -// StringP is like String, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string { - p := new(string) - f.StringVarP(p, name, shorthand, value, usage) - return p -} - -// String defines a string flag with specified name, default value, and usage string. -// The return value is the address of a string variable that stores the value of the flag. -func String(name string, value string, usage string) *string { - return CommandLine.StringP(name, "", value, usage) -} - -// StringP is like String, but accepts a shorthand letter that can be used after a single dash. -func StringP(name, shorthand string, value string, usage string) *string { - return CommandLine.StringP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go deleted file mode 100644 index 4894af81..00000000 --- a/vendor/github.com/spf13/pflag/string_array.go +++ /dev/null @@ -1,129 +0,0 @@ -package pflag - -// -- stringArray Value -type stringArrayValue struct { - value *[]string - changed bool -} - -func newStringArrayValue(val []string, p *[]string) *stringArrayValue { - ssv := new(stringArrayValue) - ssv.value = p - *ssv.value = val - return ssv -} - -func (s *stringArrayValue) Set(val string) error { - if !s.changed { - *s.value = []string{val} - s.changed = true - } else { - *s.value = append(*s.value, val) - } - return nil -} - -func (s *stringArrayValue) Append(val string) error { - *s.value = append(*s.value, val) - return nil -} - -func (s *stringArrayValue) Replace(val []string) error { - out := make([]string, len(val)) - for i, d := range val { - var err error - out[i] = d - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *stringArrayValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = d - } - return out -} - -func (s *stringArrayValue) Type() string { - return "stringArray" -} - -func (s *stringArrayValue) String() string { - str, _ := writeAsCSV(*s.value) - return "[" + str + "]" -} - -func stringArrayConv(sval string) (interface{}, error) { - sval = sval[1 : len(sval)-1] - // An empty string would cause a array with one (empty) string - if len(sval) == 0 { - return []string{}, nil - } - return readAsCSV(sval) -} - -// GetStringArray return the []string value of a flag with the given name -func (f *FlagSet) GetStringArray(name string) ([]string, error) { - val, err := f.getFlagType(name, "stringArray", stringArrayConv) - if err != nil { - return []string{}, err - } - return val.([]string), nil -} - -// StringArrayVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string) { - f.VarP(newStringArrayValue(value, p), name, "", usage) -} - -// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) { - f.VarP(newStringArrayValue(value, p), name, shorthand, usage) -} - -// StringArrayVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func StringArrayVar(p *[]string, name string, value []string, usage string) { - CommandLine.VarP(newStringArrayValue(value, p), name, "", usage) -} - -// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash. -func StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) { - CommandLine.VarP(newStringArrayValue(value, p), name, shorthand, usage) -} - -// StringArray defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func (f *FlagSet) StringArray(name string, value []string, usage string) *[]string { - p := []string{} - f.StringArrayVarP(&p, name, "", value, usage) - return &p -} - -// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string { - p := []string{} - f.StringArrayVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringArray defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func StringArray(name string, value []string, usage string) *[]string { - return CommandLine.StringArrayP(name, "", value, usage) -} - -// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash. -func StringArrayP(name, shorthand string, value []string, usage string) *[]string { - return CommandLine.StringArrayP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go deleted file mode 100644 index 3cb2e69d..00000000 --- a/vendor/github.com/spf13/pflag/string_slice.go +++ /dev/null @@ -1,163 +0,0 @@ -package pflag - -import ( - "bytes" - "encoding/csv" - "strings" -) - -// -- stringSlice Value -type stringSliceValue struct { - value *[]string - changed bool -} - -func newStringSliceValue(val []string, p *[]string) *stringSliceValue { - ssv := new(stringSliceValue) - ssv.value = p - *ssv.value = val - return ssv -} - -func readAsCSV(val string) ([]string, error) { - if val == "" { - return []string{}, nil - } - stringReader := strings.NewReader(val) - csvReader := csv.NewReader(stringReader) - return csvReader.Read() -} - -func writeAsCSV(vals []string) (string, error) { - b := &bytes.Buffer{} - w := csv.NewWriter(b) - err := w.Write(vals) - if err != nil { - return "", err - } - w.Flush() - return strings.TrimSuffix(b.String(), "\n"), nil -} - -func (s *stringSliceValue) Set(val string) error { - v, err := readAsCSV(val) - if err != nil { - return err - } - if !s.changed { - *s.value = v - } else { - *s.value = append(*s.value, v...) - } - s.changed = true - return nil -} - -func (s *stringSliceValue) Type() string { - return "stringSlice" -} - -func (s *stringSliceValue) String() string { - str, _ := writeAsCSV(*s.value) - return "[" + str + "]" -} - -func (s *stringSliceValue) Append(val string) error { - *s.value = append(*s.value, val) - return nil -} - -func (s *stringSliceValue) Replace(val []string) error { - *s.value = val - return nil -} - -func (s *stringSliceValue) GetSlice() []string { - return *s.value -} - -func stringSliceConv(sval string) (interface{}, error) { - sval = sval[1 : len(sval)-1] - // An empty string would cause a slice with one (empty) string - if len(sval) == 0 { - return []string{}, nil - } - return readAsCSV(sval) -} - -// GetStringSlice return the []string value of a flag with the given name -func (f *FlagSet) GetStringSlice(name string) ([]string, error) { - val, err := f.getFlagType(name, "stringSlice", stringSliceConv) - if err != nil { - return []string{}, err - } - return val.([]string), nil -} - -// StringSliceVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { - f.VarP(newStringSliceValue(value, p), name, "", usage) -} - -// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) { - f.VarP(newStringSliceValue(value, p), name, shorthand, usage) -} - -// StringSliceVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func StringSliceVar(p *[]string, name string, value []string, usage string) { - CommandLine.VarP(newStringSliceValue(value, p), name, "", usage) -} - -// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash. -func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) { - CommandLine.VarP(newStringSliceValue(value, p), name, shorthand, usage) -} - -// StringSlice defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { - p := []string{} - f.StringSliceVarP(&p, name, "", value, usage) - return &p -} - -// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string { - p := []string{} - f.StringSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringSlice defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func StringSlice(name string, value []string, usage string) *[]string { - return CommandLine.StringSliceP(name, "", value, usage) -} - -// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash. -func StringSliceP(name, shorthand string, value []string, usage string) *[]string { - return CommandLine.StringSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_to_int.go b/vendor/github.com/spf13/pflag/string_to_int.go deleted file mode 100644 index 5ceda396..00000000 --- a/vendor/github.com/spf13/pflag/string_to_int.go +++ /dev/null @@ -1,149 +0,0 @@ -package pflag - -import ( - "bytes" - "fmt" - "strconv" - "strings" -) - -// -- stringToInt Value -type stringToIntValue struct { - value *map[string]int - changed bool -} - -func newStringToIntValue(val map[string]int, p *map[string]int) *stringToIntValue { - ssv := new(stringToIntValue) - ssv.value = p - *ssv.value = val - return ssv -} - -// Format: a=1,b=2 -func (s *stringToIntValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make(map[string]int, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.Atoi(kv[1]) - if err != nil { - return err - } - } - if !s.changed { - *s.value = out - } else { - for k, v := range out { - (*s.value)[k] = v - } - } - s.changed = true - return nil -} - -func (s *stringToIntValue) Type() string { - return "stringToInt" -} - -func (s *stringToIntValue) String() string { - var buf bytes.Buffer - i := 0 - for k, v := range *s.value { - if i > 0 { - buf.WriteRune(',') - } - buf.WriteString(k) - buf.WriteRune('=') - buf.WriteString(strconv.Itoa(v)) - i++ - } - return "[" + buf.String() + "]" -} - -func stringToIntConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if len(val) == 0 { - return map[string]int{}, nil - } - ss := strings.Split(val, ",") - out := make(map[string]int, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return nil, fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.Atoi(kv[1]) - if err != nil { - return nil, err - } - } - return out, nil -} - -// GetStringToInt return the map[string]int value of a flag with the given name -func (f *FlagSet) GetStringToInt(name string) (map[string]int, error) { - val, err := f.getFlagType(name, "stringToInt", stringToIntConv) - if err != nil { - return map[string]int{}, err - } - return val.(map[string]int), nil -} - -// StringToIntVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]int variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) { - f.VarP(newStringToIntValue(value, p), name, "", usage) -} - -// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) { - f.VarP(newStringToIntValue(value, p), name, shorthand, usage) -} - -// StringToIntVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]int variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) { - CommandLine.VarP(newStringToIntValue(value, p), name, "", usage) -} - -// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash. -func StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) { - CommandLine.VarP(newStringToIntValue(value, p), name, shorthand, usage) -} - -// StringToInt defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToInt(name string, value map[string]int, usage string) *map[string]int { - p := map[string]int{} - f.StringToIntVarP(&p, name, "", value, usage) - return &p -} - -// StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int { - p := map[string]int{} - f.StringToIntVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringToInt defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToInt(name string, value map[string]int, usage string) *map[string]int { - return CommandLine.StringToIntP(name, "", value, usage) -} - -// StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash. -func StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int { - return CommandLine.StringToIntP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_to_int64.go b/vendor/github.com/spf13/pflag/string_to_int64.go deleted file mode 100644 index a807a04a..00000000 --- a/vendor/github.com/spf13/pflag/string_to_int64.go +++ /dev/null @@ -1,149 +0,0 @@ -package pflag - -import ( - "bytes" - "fmt" - "strconv" - "strings" -) - -// -- stringToInt64 Value -type stringToInt64Value struct { - value *map[string]int64 - changed bool -} - -func newStringToInt64Value(val map[string]int64, p *map[string]int64) *stringToInt64Value { - ssv := new(stringToInt64Value) - ssv.value = p - *ssv.value = val - return ssv -} - -// Format: a=1,b=2 -func (s *stringToInt64Value) Set(val string) error { - ss := strings.Split(val, ",") - out := make(map[string]int64, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.ParseInt(kv[1], 10, 64) - if err != nil { - return err - } - } - if !s.changed { - *s.value = out - } else { - for k, v := range out { - (*s.value)[k] = v - } - } - s.changed = true - return nil -} - -func (s *stringToInt64Value) Type() string { - return "stringToInt64" -} - -func (s *stringToInt64Value) String() string { - var buf bytes.Buffer - i := 0 - for k, v := range *s.value { - if i > 0 { - buf.WriteRune(',') - } - buf.WriteString(k) - buf.WriteRune('=') - buf.WriteString(strconv.FormatInt(v, 10)) - i++ - } - return "[" + buf.String() + "]" -} - -func stringToInt64Conv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if len(val) == 0 { - return map[string]int64{}, nil - } - ss := strings.Split(val, ",") - out := make(map[string]int64, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return nil, fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.ParseInt(kv[1], 10, 64) - if err != nil { - return nil, err - } - } - return out, nil -} - -// GetStringToInt64 return the map[string]int64 value of a flag with the given name -func (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error) { - val, err := f.getFlagType(name, "stringToInt64", stringToInt64Conv) - if err != nil { - return map[string]int64{}, err - } - return val.(map[string]int64), nil -} - -// StringToInt64Var defines a string flag with specified name, default value, and usage string. -// The argument p point64s to a map[string]int64 variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) { - f.VarP(newStringToInt64Value(value, p), name, "", usage) -} - -// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) { - f.VarP(newStringToInt64Value(value, p), name, shorthand, usage) -} - -// StringToInt64Var defines a string flag with specified name, default value, and usage string. -// The argument p point64s to a map[string]int64 variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) { - CommandLine.VarP(newStringToInt64Value(value, p), name, "", usage) -} - -// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash. -func StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) { - CommandLine.VarP(newStringToInt64Value(value, p), name, shorthand, usage) -} - -// StringToInt64 defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int64 variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 { - p := map[string]int64{} - f.StringToInt64VarP(&p, name, "", value, usage) - return &p -} - -// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 { - p := map[string]int64{} - f.StringToInt64VarP(&p, name, shorthand, value, usage) - return &p -} - -// StringToInt64 defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int64 variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 { - return CommandLine.StringToInt64P(name, "", value, usage) -} - -// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash. -func StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 { - return CommandLine.StringToInt64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_to_string.go b/vendor/github.com/spf13/pflag/string_to_string.go deleted file mode 100644 index 890a01af..00000000 --- a/vendor/github.com/spf13/pflag/string_to_string.go +++ /dev/null @@ -1,160 +0,0 @@ -package pflag - -import ( - "bytes" - "encoding/csv" - "fmt" - "strings" -) - -// -- stringToString Value -type stringToStringValue struct { - value *map[string]string - changed bool -} - -func newStringToStringValue(val map[string]string, p *map[string]string) *stringToStringValue { - ssv := new(stringToStringValue) - ssv.value = p - *ssv.value = val - return ssv -} - -// Format: a=1,b=2 -func (s *stringToStringValue) Set(val string) error { - var ss []string - n := strings.Count(val, "=") - switch n { - case 0: - return fmt.Errorf("%s must be formatted as key=value", val) - case 1: - ss = append(ss, strings.Trim(val, `"`)) - default: - r := csv.NewReader(strings.NewReader(val)) - var err error - ss, err = r.Read() - if err != nil { - return err - } - } - - out := make(map[string]string, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return fmt.Errorf("%s must be formatted as key=value", pair) - } - out[kv[0]] = kv[1] - } - if !s.changed { - *s.value = out - } else { - for k, v := range out { - (*s.value)[k] = v - } - } - s.changed = true - return nil -} - -func (s *stringToStringValue) Type() string { - return "stringToString" -} - -func (s *stringToStringValue) String() string { - records := make([]string, 0, len(*s.value)>>1) - for k, v := range *s.value { - records = append(records, k+"="+v) - } - - var buf bytes.Buffer - w := csv.NewWriter(&buf) - if err := w.Write(records); err != nil { - panic(err) - } - w.Flush() - return "[" + strings.TrimSpace(buf.String()) + "]" -} - -func stringToStringConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if len(val) == 0 { - return map[string]string{}, nil - } - r := csv.NewReader(strings.NewReader(val)) - ss, err := r.Read() - if err != nil { - return nil, err - } - out := make(map[string]string, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return nil, fmt.Errorf("%s must be formatted as key=value", pair) - } - out[kv[0]] = kv[1] - } - return out, nil -} - -// GetStringToString return the map[string]string value of a flag with the given name -func (f *FlagSet) GetStringToString(name string) (map[string]string, error) { - val, err := f.getFlagType(name, "stringToString", stringToStringConv) - if err != nil { - return map[string]string{}, err - } - return val.(map[string]string), nil -} - -// StringToStringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]string variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) { - f.VarP(newStringToStringValue(value, p), name, "", usage) -} - -// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) { - f.VarP(newStringToStringValue(value, p), name, shorthand, usage) -} - -// StringToStringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]string variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) { - CommandLine.VarP(newStringToStringValue(value, p), name, "", usage) -} - -// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash. -func StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) { - CommandLine.VarP(newStringToStringValue(value, p), name, shorthand, usage) -} - -// StringToString defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToString(name string, value map[string]string, usage string) *map[string]string { - p := map[string]string{} - f.StringToStringVarP(&p, name, "", value, usage) - return &p -} - -// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string { - p := map[string]string{} - f.StringToStringVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringToString defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToString(name string, value map[string]string, usage string) *map[string]string { - return CommandLine.StringToStringP(name, "", value, usage) -} - -// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash. -func StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string { - return CommandLine.StringToStringP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint.go b/vendor/github.com/spf13/pflag/uint.go deleted file mode 100644 index dcbc2b75..00000000 --- a/vendor/github.com/spf13/pflag/uint.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint Value -type uintValue uint - -func newUintValue(val uint, p *uint) *uintValue { - *p = val - return (*uintValue)(p) -} - -func (i *uintValue) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 64) - *i = uintValue(v) - return err -} - -func (i *uintValue) Type() string { - return "uint" -} - -func (i *uintValue) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uintConv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 0) - if err != nil { - return 0, err - } - return uint(v), nil -} - -// GetUint return the uint value of a flag with the given name -func (f *FlagSet) GetUint(name string) (uint, error) { - val, err := f.getFlagType(name, "uint", uintConv) - if err != nil { - return 0, err - } - return val.(uint), nil -} - -// UintVar defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) { - f.VarP(newUintValue(value, p), name, "", usage) -} - -// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) { - f.VarP(newUintValue(value, p), name, shorthand, usage) -} - -// UintVar defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func UintVar(p *uint, name string, value uint, usage string) { - CommandLine.VarP(newUintValue(value, p), name, "", usage) -} - -// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. -func UintVarP(p *uint, name, shorthand string, value uint, usage string) { - CommandLine.VarP(newUintValue(value, p), name, shorthand, usage) -} - -// Uint defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func (f *FlagSet) Uint(name string, value uint, usage string) *uint { - p := new(uint) - f.UintVarP(p, name, "", value, usage) - return p -} - -// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint { - p := new(uint) - f.UintVarP(p, name, shorthand, value, usage) - return p -} - -// Uint defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func Uint(name string, value uint, usage string) *uint { - return CommandLine.UintP(name, "", value, usage) -} - -// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. -func UintP(name, shorthand string, value uint, usage string) *uint { - return CommandLine.UintP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint16.go b/vendor/github.com/spf13/pflag/uint16.go deleted file mode 100644 index 7e9914ed..00000000 --- a/vendor/github.com/spf13/pflag/uint16.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint16 value -type uint16Value uint16 - -func newUint16Value(val uint16, p *uint16) *uint16Value { - *p = val - return (*uint16Value)(p) -} - -func (i *uint16Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 16) - *i = uint16Value(v) - return err -} - -func (i *uint16Value) Type() string { - return "uint16" -} - -func (i *uint16Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint16Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 16) - if err != nil { - return 0, err - } - return uint16(v), nil -} - -// GetUint16 return the uint16 value of a flag with the given name -func (f *FlagSet) GetUint16(name string) (uint16, error) { - val, err := f.getFlagType(name, "uint16", uint16Conv) - if err != nil { - return 0, err - } - return val.(uint16), nil -} - -// Uint16Var defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) { - f.VarP(newUint16Value(value, p), name, "", usage) -} - -// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) { - f.VarP(newUint16Value(value, p), name, shorthand, usage) -} - -// Uint16Var defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func Uint16Var(p *uint16, name string, value uint16, usage string) { - CommandLine.VarP(newUint16Value(value, p), name, "", usage) -} - -// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash. -func Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) { - CommandLine.VarP(newUint16Value(value, p), name, shorthand, usage) -} - -// Uint16 defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16 { - p := new(uint16) - f.Uint16VarP(p, name, "", value, usage) - return p -} - -// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16 { - p := new(uint16) - f.Uint16VarP(p, name, shorthand, value, usage) - return p -} - -// Uint16 defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func Uint16(name string, value uint16, usage string) *uint16 { - return CommandLine.Uint16P(name, "", value, usage) -} - -// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash. -func Uint16P(name, shorthand string, value uint16, usage string) *uint16 { - return CommandLine.Uint16P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint32.go b/vendor/github.com/spf13/pflag/uint32.go deleted file mode 100644 index d8024539..00000000 --- a/vendor/github.com/spf13/pflag/uint32.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint32 value -type uint32Value uint32 - -func newUint32Value(val uint32, p *uint32) *uint32Value { - *p = val - return (*uint32Value)(p) -} - -func (i *uint32Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 32) - *i = uint32Value(v) - return err -} - -func (i *uint32Value) Type() string { - return "uint32" -} - -func (i *uint32Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint32Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 32) - if err != nil { - return 0, err - } - return uint32(v), nil -} - -// GetUint32 return the uint32 value of a flag with the given name -func (f *FlagSet) GetUint32(name string) (uint32, error) { - val, err := f.getFlagType(name, "uint32", uint32Conv) - if err != nil { - return 0, err - } - return val.(uint32), nil -} - -// Uint32Var defines a uint32 flag with specified name, default value, and usage string. -// The argument p points to a uint32 variable in which to store the value of the flag. -func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string) { - f.VarP(newUint32Value(value, p), name, "", usage) -} - -// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) { - f.VarP(newUint32Value(value, p), name, shorthand, usage) -} - -// Uint32Var defines a uint32 flag with specified name, default value, and usage string. -// The argument p points to a uint32 variable in which to store the value of the flag. -func Uint32Var(p *uint32, name string, value uint32, usage string) { - CommandLine.VarP(newUint32Value(value, p), name, "", usage) -} - -// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash. -func Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) { - CommandLine.VarP(newUint32Value(value, p), name, shorthand, usage) -} - -// Uint32 defines a uint32 flag with specified name, default value, and usage string. -// The return value is the address of a uint32 variable that stores the value of the flag. -func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32 { - p := new(uint32) - f.Uint32VarP(p, name, "", value, usage) - return p -} - -// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32 { - p := new(uint32) - f.Uint32VarP(p, name, shorthand, value, usage) - return p -} - -// Uint32 defines a uint32 flag with specified name, default value, and usage string. -// The return value is the address of a uint32 variable that stores the value of the flag. -func Uint32(name string, value uint32, usage string) *uint32 { - return CommandLine.Uint32P(name, "", value, usage) -} - -// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash. -func Uint32P(name, shorthand string, value uint32, usage string) *uint32 { - return CommandLine.Uint32P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint64.go b/vendor/github.com/spf13/pflag/uint64.go deleted file mode 100644 index f62240f2..00000000 --- a/vendor/github.com/spf13/pflag/uint64.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint64 Value -type uint64Value uint64 - -func newUint64Value(val uint64, p *uint64) *uint64Value { - *p = val - return (*uint64Value)(p) -} - -func (i *uint64Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 64) - *i = uint64Value(v) - return err -} - -func (i *uint64Value) Type() string { - return "uint64" -} - -func (i *uint64Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint64Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 64) - if err != nil { - return 0, err - } - return uint64(v), nil -} - -// GetUint64 return the uint64 value of a flag with the given name -func (f *FlagSet) GetUint64(name string) (uint64, error) { - val, err := f.getFlagType(name, "uint64", uint64Conv) - if err != nil { - return 0, err - } - return val.(uint64), nil -} - -// Uint64Var defines a uint64 flag with specified name, default value, and usage string. -// The argument p points to a uint64 variable in which to store the value of the flag. -func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) { - f.VarP(newUint64Value(value, p), name, "", usage) -} - -// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { - f.VarP(newUint64Value(value, p), name, shorthand, usage) -} - -// Uint64Var defines a uint64 flag with specified name, default value, and usage string. -// The argument p points to a uint64 variable in which to store the value of the flag. -func Uint64Var(p *uint64, name string, value uint64, usage string) { - CommandLine.VarP(newUint64Value(value, p), name, "", usage) -} - -// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash. -func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { - CommandLine.VarP(newUint64Value(value, p), name, shorthand, usage) -} - -// Uint64 defines a uint64 flag with specified name, default value, and usage string. -// The return value is the address of a uint64 variable that stores the value of the flag. -func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 { - p := new(uint64) - f.Uint64VarP(p, name, "", value, usage) - return p -} - -// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 { - p := new(uint64) - f.Uint64VarP(p, name, shorthand, value, usage) - return p -} - -// Uint64 defines a uint64 flag with specified name, default value, and usage string. -// The return value is the address of a uint64 variable that stores the value of the flag. -func Uint64(name string, value uint64, usage string) *uint64 { - return CommandLine.Uint64P(name, "", value, usage) -} - -// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash. -func Uint64P(name, shorthand string, value uint64, usage string) *uint64 { - return CommandLine.Uint64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint8.go b/vendor/github.com/spf13/pflag/uint8.go deleted file mode 100644 index bb0e83c1..00000000 --- a/vendor/github.com/spf13/pflag/uint8.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint8 Value -type uint8Value uint8 - -func newUint8Value(val uint8, p *uint8) *uint8Value { - *p = val - return (*uint8Value)(p) -} - -func (i *uint8Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 8) - *i = uint8Value(v) - return err -} - -func (i *uint8Value) Type() string { - return "uint8" -} - -func (i *uint8Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint8Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 8) - if err != nil { - return 0, err - } - return uint8(v), nil -} - -// GetUint8 return the uint8 value of a flag with the given name -func (f *FlagSet) GetUint8(name string) (uint8, error) { - val, err := f.getFlagType(name, "uint8", uint8Conv) - if err != nil { - return 0, err - } - return val.(uint8), nil -} - -// Uint8Var defines a uint8 flag with specified name, default value, and usage string. -// The argument p points to a uint8 variable in which to store the value of the flag. -func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string) { - f.VarP(newUint8Value(value, p), name, "", usage) -} - -// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) { - f.VarP(newUint8Value(value, p), name, shorthand, usage) -} - -// Uint8Var defines a uint8 flag with specified name, default value, and usage string. -// The argument p points to a uint8 variable in which to store the value of the flag. -func Uint8Var(p *uint8, name string, value uint8, usage string) { - CommandLine.VarP(newUint8Value(value, p), name, "", usage) -} - -// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash. -func Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) { - CommandLine.VarP(newUint8Value(value, p), name, shorthand, usage) -} - -// Uint8 defines a uint8 flag with specified name, default value, and usage string. -// The return value is the address of a uint8 variable that stores the value of the flag. -func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8 { - p := new(uint8) - f.Uint8VarP(p, name, "", value, usage) - return p -} - -// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8 { - p := new(uint8) - f.Uint8VarP(p, name, shorthand, value, usage) - return p -} - -// Uint8 defines a uint8 flag with specified name, default value, and usage string. -// The return value is the address of a uint8 variable that stores the value of the flag. -func Uint8(name string, value uint8, usage string) *uint8 { - return CommandLine.Uint8P(name, "", value, usage) -} - -// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash. -func Uint8P(name, shorthand string, value uint8, usage string) *uint8 { - return CommandLine.Uint8P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint_slice.go b/vendor/github.com/spf13/pflag/uint_slice.go deleted file mode 100644 index 5fa92483..00000000 --- a/vendor/github.com/spf13/pflag/uint_slice.go +++ /dev/null @@ -1,168 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- uintSlice Value -type uintSliceValue struct { - value *[]uint - changed bool -} - -func newUintSliceValue(val []uint, p *[]uint) *uintSliceValue { - uisv := new(uintSliceValue) - uisv.value = p - *uisv.value = val - return uisv -} - -func (s *uintSliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]uint, len(ss)) - for i, d := range ss { - u, err := strconv.ParseUint(d, 10, 0) - if err != nil { - return err - } - out[i] = uint(u) - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *uintSliceValue) Type() string { - return "uintSlice" -} - -func (s *uintSliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *uintSliceValue) fromString(val string) (uint, error) { - t, err := strconv.ParseUint(val, 10, 0) - if err != nil { - return 0, err - } - return uint(t), nil -} - -func (s *uintSliceValue) toString(val uint) string { - return fmt.Sprintf("%d", val) -} - -func (s *uintSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *uintSliceValue) Replace(val []string) error { - out := make([]uint, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *uintSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func uintSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []uint{}, nil - } - ss := strings.Split(val, ",") - out := make([]uint, len(ss)) - for i, d := range ss { - u, err := strconv.ParseUint(d, 10, 0) - if err != nil { - return nil, err - } - out[i] = uint(u) - } - return out, nil -} - -// GetUintSlice returns the []uint value of a flag with the given name. -func (f *FlagSet) GetUintSlice(name string) ([]uint, error) { - val, err := f.getFlagType(name, "uintSlice", uintSliceConv) - if err != nil { - return []uint{}, err - } - return val.([]uint), nil -} - -// UintSliceVar defines a uintSlice flag with specified name, default value, and usage string. -// The argument p points to a []uint variable in which to store the value of the flag. -func (f *FlagSet) UintSliceVar(p *[]uint, name string, value []uint, usage string) { - f.VarP(newUintSliceValue(value, p), name, "", usage) -} - -// UintSliceVarP is like UintSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string) { - f.VarP(newUintSliceValue(value, p), name, shorthand, usage) -} - -// UintSliceVar defines a uint[] flag with specified name, default value, and usage string. -// The argument p points to a uint[] variable in which to store the value of the flag. -func UintSliceVar(p *[]uint, name string, value []uint, usage string) { - CommandLine.VarP(newUintSliceValue(value, p), name, "", usage) -} - -// UintSliceVarP is like the UintSliceVar, but accepts a shorthand letter that can be used after a single dash. -func UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string) { - CommandLine.VarP(newUintSliceValue(value, p), name, shorthand, usage) -} - -// UintSlice defines a []uint flag with specified name, default value, and usage string. -// The return value is the address of a []uint variable that stores the value of the flag. -func (f *FlagSet) UintSlice(name string, value []uint, usage string) *[]uint { - p := []uint{} - f.UintSliceVarP(&p, name, "", value, usage) - return &p -} - -// UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintSliceP(name, shorthand string, value []uint, usage string) *[]uint { - p := []uint{} - f.UintSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// UintSlice defines a []uint flag with specified name, default value, and usage string. -// The return value is the address of a []uint variable that stores the value of the flag. -func UintSlice(name string, value []uint, usage string) *[]uint { - return CommandLine.UintSliceP(name, "", value, usage) -} - -// UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash. -func UintSliceP(name, shorthand string, value []uint, usage string) *[]uint { - return CommandLine.UintSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/testify/LICENSE deleted file mode 100644 index 4b0421cf..00000000 --- a/vendor/github.com/stretchr/testify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. - -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/stretchr/testify/assert/assertion_compare.go b/vendor/github.com/stretchr/testify/assert/assertion_compare.go deleted file mode 100644 index 95d8e59d..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare.go +++ /dev/null @@ -1,458 +0,0 @@ -package assert - -import ( - "bytes" - "fmt" - "reflect" - "time" -) - -type CompareType int - -const ( - compareLess CompareType = iota - 1 - compareEqual - compareGreater -) - -var ( - intType = reflect.TypeOf(int(1)) - int8Type = reflect.TypeOf(int8(1)) - int16Type = reflect.TypeOf(int16(1)) - int32Type = reflect.TypeOf(int32(1)) - int64Type = reflect.TypeOf(int64(1)) - - uintType = reflect.TypeOf(uint(1)) - uint8Type = reflect.TypeOf(uint8(1)) - uint16Type = reflect.TypeOf(uint16(1)) - uint32Type = reflect.TypeOf(uint32(1)) - uint64Type = reflect.TypeOf(uint64(1)) - - float32Type = reflect.TypeOf(float32(1)) - float64Type = reflect.TypeOf(float64(1)) - - stringType = reflect.TypeOf("") - - timeType = reflect.TypeOf(time.Time{}) - bytesType = reflect.TypeOf([]byte{}) -) - -func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { - obj1Value := reflect.ValueOf(obj1) - obj2Value := reflect.ValueOf(obj2) - - // throughout this switch we try and avoid calling .Convert() if possible, - // as this has a pretty big performance impact - switch kind { - case reflect.Int: - { - intobj1, ok := obj1.(int) - if !ok { - intobj1 = obj1Value.Convert(intType).Interface().(int) - } - intobj2, ok := obj2.(int) - if !ok { - intobj2 = obj2Value.Convert(intType).Interface().(int) - } - if intobj1 > intobj2 { - return compareGreater, true - } - if intobj1 == intobj2 { - return compareEqual, true - } - if intobj1 < intobj2 { - return compareLess, true - } - } - case reflect.Int8: - { - int8obj1, ok := obj1.(int8) - if !ok { - int8obj1 = obj1Value.Convert(int8Type).Interface().(int8) - } - int8obj2, ok := obj2.(int8) - if !ok { - int8obj2 = obj2Value.Convert(int8Type).Interface().(int8) - } - if int8obj1 > int8obj2 { - return compareGreater, true - } - if int8obj1 == int8obj2 { - return compareEqual, true - } - if int8obj1 < int8obj2 { - return compareLess, true - } - } - case reflect.Int16: - { - int16obj1, ok := obj1.(int16) - if !ok { - int16obj1 = obj1Value.Convert(int16Type).Interface().(int16) - } - int16obj2, ok := obj2.(int16) - if !ok { - int16obj2 = obj2Value.Convert(int16Type).Interface().(int16) - } - if int16obj1 > int16obj2 { - return compareGreater, true - } - if int16obj1 == int16obj2 { - return compareEqual, true - } - if int16obj1 < int16obj2 { - return compareLess, true - } - } - case reflect.Int32: - { - int32obj1, ok := obj1.(int32) - if !ok { - int32obj1 = obj1Value.Convert(int32Type).Interface().(int32) - } - int32obj2, ok := obj2.(int32) - if !ok { - int32obj2 = obj2Value.Convert(int32Type).Interface().(int32) - } - if int32obj1 > int32obj2 { - return compareGreater, true - } - if int32obj1 == int32obj2 { - return compareEqual, true - } - if int32obj1 < int32obj2 { - return compareLess, true - } - } - case reflect.Int64: - { - int64obj1, ok := obj1.(int64) - if !ok { - int64obj1 = obj1Value.Convert(int64Type).Interface().(int64) - } - int64obj2, ok := obj2.(int64) - if !ok { - int64obj2 = obj2Value.Convert(int64Type).Interface().(int64) - } - if int64obj1 > int64obj2 { - return compareGreater, true - } - if int64obj1 == int64obj2 { - return compareEqual, true - } - if int64obj1 < int64obj2 { - return compareLess, true - } - } - case reflect.Uint: - { - uintobj1, ok := obj1.(uint) - if !ok { - uintobj1 = obj1Value.Convert(uintType).Interface().(uint) - } - uintobj2, ok := obj2.(uint) - if !ok { - uintobj2 = obj2Value.Convert(uintType).Interface().(uint) - } - if uintobj1 > uintobj2 { - return compareGreater, true - } - if uintobj1 == uintobj2 { - return compareEqual, true - } - if uintobj1 < uintobj2 { - return compareLess, true - } - } - case reflect.Uint8: - { - uint8obj1, ok := obj1.(uint8) - if !ok { - uint8obj1 = obj1Value.Convert(uint8Type).Interface().(uint8) - } - uint8obj2, ok := obj2.(uint8) - if !ok { - uint8obj2 = obj2Value.Convert(uint8Type).Interface().(uint8) - } - if uint8obj1 > uint8obj2 { - return compareGreater, true - } - if uint8obj1 == uint8obj2 { - return compareEqual, true - } - if uint8obj1 < uint8obj2 { - return compareLess, true - } - } - case reflect.Uint16: - { - uint16obj1, ok := obj1.(uint16) - if !ok { - uint16obj1 = obj1Value.Convert(uint16Type).Interface().(uint16) - } - uint16obj2, ok := obj2.(uint16) - if !ok { - uint16obj2 = obj2Value.Convert(uint16Type).Interface().(uint16) - } - if uint16obj1 > uint16obj2 { - return compareGreater, true - } - if uint16obj1 == uint16obj2 { - return compareEqual, true - } - if uint16obj1 < uint16obj2 { - return compareLess, true - } - } - case reflect.Uint32: - { - uint32obj1, ok := obj1.(uint32) - if !ok { - uint32obj1 = obj1Value.Convert(uint32Type).Interface().(uint32) - } - uint32obj2, ok := obj2.(uint32) - if !ok { - uint32obj2 = obj2Value.Convert(uint32Type).Interface().(uint32) - } - if uint32obj1 > uint32obj2 { - return compareGreater, true - } - if uint32obj1 == uint32obj2 { - return compareEqual, true - } - if uint32obj1 < uint32obj2 { - return compareLess, true - } - } - case reflect.Uint64: - { - uint64obj1, ok := obj1.(uint64) - if !ok { - uint64obj1 = obj1Value.Convert(uint64Type).Interface().(uint64) - } - uint64obj2, ok := obj2.(uint64) - if !ok { - uint64obj2 = obj2Value.Convert(uint64Type).Interface().(uint64) - } - if uint64obj1 > uint64obj2 { - return compareGreater, true - } - if uint64obj1 == uint64obj2 { - return compareEqual, true - } - if uint64obj1 < uint64obj2 { - return compareLess, true - } - } - case reflect.Float32: - { - float32obj1, ok := obj1.(float32) - if !ok { - float32obj1 = obj1Value.Convert(float32Type).Interface().(float32) - } - float32obj2, ok := obj2.(float32) - if !ok { - float32obj2 = obj2Value.Convert(float32Type).Interface().(float32) - } - if float32obj1 > float32obj2 { - return compareGreater, true - } - if float32obj1 == float32obj2 { - return compareEqual, true - } - if float32obj1 < float32obj2 { - return compareLess, true - } - } - case reflect.Float64: - { - float64obj1, ok := obj1.(float64) - if !ok { - float64obj1 = obj1Value.Convert(float64Type).Interface().(float64) - } - float64obj2, ok := obj2.(float64) - if !ok { - float64obj2 = obj2Value.Convert(float64Type).Interface().(float64) - } - if float64obj1 > float64obj2 { - return compareGreater, true - } - if float64obj1 == float64obj2 { - return compareEqual, true - } - if float64obj1 < float64obj2 { - return compareLess, true - } - } - case reflect.String: - { - stringobj1, ok := obj1.(string) - if !ok { - stringobj1 = obj1Value.Convert(stringType).Interface().(string) - } - stringobj2, ok := obj2.(string) - if !ok { - stringobj2 = obj2Value.Convert(stringType).Interface().(string) - } - if stringobj1 > stringobj2 { - return compareGreater, true - } - if stringobj1 == stringobj2 { - return compareEqual, true - } - if stringobj1 < stringobj2 { - return compareLess, true - } - } - // Check for known struct types we can check for compare results. - case reflect.Struct: - { - // All structs enter here. We're not interested in most types. - if !canConvert(obj1Value, timeType) { - break - } - - // time.Time can compared! - timeObj1, ok := obj1.(time.Time) - if !ok { - timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time) - } - - timeObj2, ok := obj2.(time.Time) - if !ok { - timeObj2 = obj2Value.Convert(timeType).Interface().(time.Time) - } - - return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64) - } - case reflect.Slice: - { - // We only care about the []byte type. - if !canConvert(obj1Value, bytesType) { - break - } - - // []byte can be compared! - bytesObj1, ok := obj1.([]byte) - if !ok { - bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte) - - } - bytesObj2, ok := obj2.([]byte) - if !ok { - bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte) - } - - return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true - } - } - - return compareEqual, false -} - -// Greater asserts that the first element is greater than the second -// -// assert.Greater(t, 2, 1) -// assert.Greater(t, float64(2), float64(1)) -// assert.Greater(t, "b", "a") -func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// assert.GreaterOrEqual(t, 2, 1) -// assert.GreaterOrEqual(t, 2, 2) -// assert.GreaterOrEqual(t, "b", "a") -// assert.GreaterOrEqual(t, "b", "b") -func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) -} - -// Less asserts that the first element is less than the second -// -// assert.Less(t, 1, 2) -// assert.Less(t, float64(1), float64(2)) -// assert.Less(t, "a", "b") -func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// assert.LessOrEqual(t, 1, 2) -// assert.LessOrEqual(t, 2, 2) -// assert.LessOrEqual(t, "a", "b") -// assert.LessOrEqual(t, "b", "b") -func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) -} - -// Positive asserts that the specified element is positive -// -// assert.Positive(t, 1) -// assert.Positive(t, 1.23) -func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - zero := reflect.Zero(reflect.TypeOf(e)) - return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs...) -} - -// Negative asserts that the specified element is negative -// -// assert.Negative(t, -1) -// assert.Negative(t, -1.23) -func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - zero := reflect.Zero(reflect.TypeOf(e)) - return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs...) -} - -func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - e1Kind := reflect.ValueOf(e1).Kind() - e2Kind := reflect.ValueOf(e2).Kind() - if e1Kind != e2Kind { - return Fail(t, "Elements should be the same type", msgAndArgs...) - } - - compareResult, isComparable := compare(e1, e2, e1Kind) - if !isComparable { - return Fail(t, fmt.Sprintf("Can not compare type \"%s\"", reflect.TypeOf(e1)), msgAndArgs...) - } - - if !containsValue(allowedComparesResults, compareResult) { - return Fail(t, fmt.Sprintf(failMessage, e1, e2), msgAndArgs...) - } - - return true -} - -func containsValue(values []CompareType, value CompareType) bool { - for _, v := range values { - if v == value { - return true - } - } - - return false -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go deleted file mode 100644 index da867903..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build go1.17 -// +build go1.17 - -// TODO: once support for Go 1.16 is dropped, this file can be -// merged/removed with assertion_compare_go1.17_test.go and -// assertion_compare_legacy.go - -package assert - -import "reflect" - -// Wrapper around reflect.Value.CanConvert, for compatibility -// reasons. -func canConvert(value reflect.Value, to reflect.Type) bool { - return value.CanConvert(to) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go deleted file mode 100644 index 1701af2a..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !go1.17 -// +build !go1.17 - -// TODO: once support for Go 1.16 is dropped, this file can be -// merged/removed with assertion_compare_go1.17_test.go and -// assertion_compare_can_convert.go - -package assert - -import "reflect" - -// Older versions of Go does not have the reflect.Value.CanConvert -// method. -func canConvert(value reflect.Value, to reflect.Type) bool { - return false -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go deleted file mode 100644 index 7880b8f9..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ /dev/null @@ -1,763 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package assert - -import ( - http "net/http" - url "net/url" - time "time" -) - -// Conditionf uses a Comparison to assert a complex condition. -func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Condition(t, comp, append([]interface{}{msg}, args...)...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") -func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Contains(t, s, contains, append([]interface{}{msg}, args...)...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return DirExists(t, path, append([]interface{}{msg}, args...)...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Emptyf(t, obj, "error message %s", "formatted") -func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Empty(t, object, append([]interface{}{msg}, args...)...) -} - -// Equalf asserts that two objects are equal. -// -// assert.Equalf(t, 123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Equal(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") -func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") -func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Errorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Error(t, err, append([]interface{}{msg}, args...)...) -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ErrorAs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") -func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ErrorContains(t, theError, contains, append([]interface{}{msg}, args...)...) -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ErrorIs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Eventually(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") -func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Exactly(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Failf reports a failure through -func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, failureMessage, append([]interface{}{msg}, args...)...) -} - -// FailNowf fails test -func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return FailNow(t, failureMessage, append([]interface{}{msg}, args...)...) -} - -// Falsef asserts that the specified value is false. -// -// assert.Falsef(t, myBool, "error message %s", "formatted") -func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return False(t, value, append([]interface{}{msg}, args...)...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return FileExists(t, path, append([]interface{}{msg}, args...)...) -} - -// Greaterf asserts that the first element is greater than the second -// -// assert.Greaterf(t, 2, 1, "error message %s", "formatted") -// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") -// assert.Greaterf(t, "b", "a", "error message %s", "formatted") -func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Greater(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") -func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return GreaterOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) -} - -// IsDecreasingf asserts that the collection is decreasing -// -// assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsDecreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsIncreasingf asserts that the collection is increasing -// -// assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsIncreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsNonDecreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsNonIncreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsTypef asserts that the specified objects are of the same type. -func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsType(t, expectedType, object, append([]interface{}{msg}, args...)...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") -func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Len(t, object, length, append([]interface{}{msg}, args...)...) -} - -// Lessf asserts that the first element is less than the second -// -// assert.Lessf(t, 1, 2, "error message %s", "formatted") -// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") -// assert.Lessf(t, "a", "b", "error message %s", "formatted") -func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Less(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") -// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") -func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return LessOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// Negativef asserts that the specified element is negative -// -// assert.Negativef(t, -1, "error message %s", "formatted") -// assert.Negativef(t, -1.23, "error message %s", "formatted") -func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Negative(t, e, append([]interface{}{msg}, args...)...) -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Never(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) -} - -// Nilf asserts that the specified object is nil. -// -// assert.Nilf(t, err, "error message %s", "formatted") -func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Nil(t, object, append([]interface{}{msg}, args...)...) -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NoDirExists(t, path, append([]interface{}{msg}, args...)...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoErrorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NoError(t, err, append([]interface{}{msg}, args...)...) -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NoFileExists(t, path, append([]interface{}{msg}, args...)...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") -func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotContains(t, s, contains, append([]interface{}{msg}, args...)...) -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotEmpty(t, object, append([]interface{}{msg}, args...)...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") -func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotEqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotErrorIsf asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotErrorIs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// NotNilf asserts that the specified object is not nil. -// -// assert.NotNilf(t, err, "error message %s", "formatted") -func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotNil(t, object, append([]interface{}{msg}, args...)...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") -func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotPanics(t, f, append([]interface{}{msg}, args...)...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") -func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...) -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotSubset(t, list, subset, append([]interface{}{msg}, args...)...) -} - -// NotZerof asserts that i is not the zero value for its type. -func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotZero(t, i, append([]interface{}{msg}, args...)...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") -func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Panics(t, f, append([]interface{}{msg}, args...)...) -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...) -} - -// Positivef asserts that the specified element is positive -// -// assert.Positivef(t, 1, "error message %s", "formatted") -// assert.Positivef(t, 1.23, "error message %s", "formatted") -func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Positive(t, e, append([]interface{}{msg}, args...)...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") -func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Regexp(t, rx, str, append([]interface{}{msg}, args...)...) -} - -// Samef asserts that two pointers reference the same object. -// -// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Same(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Subset(t, list, subset, append([]interface{}{msg}, args...)...) -} - -// Truef asserts that the specified value is true. -// -// assert.Truef(t, myBool, "error message %s", "formatted") -func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return True(t, value, append([]interface{}{msg}, args...)...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return WithinRange(t, actual, start, end, append([]interface{}{msg}, args...)...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Zerof asserts that i is the zero value for its type. -func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Zero(t, i, append([]interface{}{msg}, args...)...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl deleted file mode 100644 index d2bb0b81..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{.CommentFormat}} -func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { - if h, ok := t.(tHelper); ok { h.Helper() } - return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go deleted file mode 100644 index 339515b8..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ /dev/null @@ -1,1514 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package assert - -import ( - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Condition(a.t, comp, msgAndArgs...) -} - -// Conditionf uses a Comparison to assert a complex condition. -func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Conditionf(a.t, comp, msg, args...) -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") -func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Contains(a.t, s, contains, msgAndArgs...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") -func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Containsf(a.t, s, contains, msg, args...) -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return DirExists(a.t, path, msgAndArgs...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return DirExistsf(a.t, path, msg, args...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) -func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ElementsMatchf(a.t, listA, listB, msg, args...) -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Empty(obj) -func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Empty(a.t, object, msgAndArgs...) -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Emptyf(obj, "error message %s", "formatted") -func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Emptyf(a.t, object, msg, args...) -} - -// Equal asserts that two objects are equal. -// -// a.Equal(123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Equal(a.t, expected, actual, msgAndArgs...) -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) -func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualError(a.t, theError, errString, msgAndArgs...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") -func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualErrorf(a.t, theError, errString, msg, args...) -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValues(uint32(123), int32(123)) -func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") -func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualValuesf(a.t, expected, actual, msg, args...) -} - -// Equalf asserts that two objects are equal. -// -// a.Equalf(123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Equalf(a.t, expected, actual, msg, args...) -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Error(err) { -// assert.Equal(t, expectedError, err) -// } -func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Error(a.t, err, msgAndArgs...) -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorAs(a.t, err, target, msgAndArgs...) -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorAsf(a.t, err, target, msg, args...) -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContains(err, expectedErrorSubString) -func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorContains(a.t, theError, contains, msgAndArgs...) -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") -func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorContainsf(a.t, theError, contains, msg, args...) -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorIs(a.t, err, target, msgAndArgs...) -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorIsf(a.t, err, target, msg, args...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Errorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Errorf(a.t, err, msg, args...) -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Eventually(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Eventuallyf(a.t, condition, waitFor, tick, msg, args...) -} - -// Exactly asserts that two objects are equal in value and type. -// -// a.Exactly(int32(123), int64(123)) -func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Exactly(a.t, expected, actual, msgAndArgs...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") -func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Exactlyf(a.t, expected, actual, msg, args...) -} - -// Fail reports a failure through -func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Fail(a.t, failureMessage, msgAndArgs...) -} - -// FailNow fails test -func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FailNow(a.t, failureMessage, msgAndArgs...) -} - -// FailNowf fails test -func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FailNowf(a.t, failureMessage, msg, args...) -} - -// Failf reports a failure through -func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Failf(a.t, failureMessage, msg, args...) -} - -// False asserts that the specified value is false. -// -// a.False(myBool) -func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return False(a.t, value, msgAndArgs...) -} - -// Falsef asserts that the specified value is false. -// -// a.Falsef(myBool, "error message %s", "formatted") -func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Falsef(a.t, value, msg, args...) -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FileExists(a.t, path, msgAndArgs...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FileExistsf(a.t, path, msg, args...) -} - -// Greater asserts that the first element is greater than the second -// -// a.Greater(2, 1) -// a.Greater(float64(2), float64(1)) -// a.Greater("b", "a") -func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Greater(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqual(2, 1) -// a.GreaterOrEqual(2, 2) -// a.GreaterOrEqual("b", "a") -// a.GreaterOrEqual("b", "b") -func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return GreaterOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqualf(2, 1, "error message %s", "formatted") -// a.GreaterOrEqualf(2, 2, "error message %s", "formatted") -// a.GreaterOrEqualf("b", "a", "error message %s", "formatted") -// a.GreaterOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return GreaterOrEqualf(a.t, e1, e2, msg, args...) -} - -// Greaterf asserts that the first element is greater than the second -// -// a.Greaterf(2, 1, "error message %s", "formatted") -// a.Greaterf(float64(2), float64(1), "error message %s", "formatted") -// a.Greaterf("b", "a", "error message %s", "formatted") -func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Greaterf(a.t, e1, e2, msg, args...) -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPError(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPErrorf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPRedirectf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...) -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...) -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPSuccessf(a.t, handler, method, url, values, msg, args...) -} - -// Implements asserts that an object is implemented by the specified interface. -// -// a.Implements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Implements(a.t, interfaceObject, object, msgAndArgs...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Implementsf(a.t, interfaceObject, object, msg, args...) -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// a.InDelta(math.Pi, 22/7.0, 0.01) -func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDelta(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaSlicef(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaf(a.t, expected, actual, delta, msg, args...) -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilonf(a.t, expected, actual, epsilon, msg, args...) -} - -// IsDecreasing asserts that the collection is decreasing -// -// a.IsDecreasing([]int{2, 1, 0}) -// a.IsDecreasing([]float{2, 1}) -// a.IsDecreasing([]string{"b", "a"}) -func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsDecreasing(a.t, object, msgAndArgs...) -} - -// IsDecreasingf asserts that the collection is decreasing -// -// a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") -// a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsDecreasingf(a.t, object, msg, args...) -} - -// IsIncreasing asserts that the collection is increasing -// -// a.IsIncreasing([]int{1, 2, 3}) -// a.IsIncreasing([]float{1, 2}) -// a.IsIncreasing([]string{"a", "b"}) -func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsIncreasing(a.t, object, msgAndArgs...) -} - -// IsIncreasingf asserts that the collection is increasing -// -// a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") -// a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsIncreasingf(a.t, object, msg, args...) -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// a.IsNonDecreasing([]int{1, 1, 2}) -// a.IsNonDecreasing([]float{1, 2}) -// a.IsNonDecreasing([]string{"a", "b"}) -func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonDecreasing(a.t, object, msgAndArgs...) -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonDecreasingf(a.t, object, msg, args...) -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// a.IsNonIncreasing([]int{2, 1, 1}) -// a.IsNonIncreasing([]float{2, 1}) -// a.IsNonIncreasing([]string{"b", "a"}) -func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonIncreasing(a.t, object, msgAndArgs...) -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonIncreasingf(a.t, object, msg, args...) -} - -// IsType asserts that the specified objects are of the same type. -func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsType(a.t, expectedType, object, msgAndArgs...) -} - -// IsTypef asserts that the specified objects are of the same type. -func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsTypef(a.t, expectedType, object, msg, args...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return JSONEq(a.t, expected, actual, msgAndArgs...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return JSONEqf(a.t, expected, actual, msg, args...) -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// a.Len(mySlice, 3) -func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Len(a.t, object, length, msgAndArgs...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// a.Lenf(mySlice, 3, "error message %s", "formatted") -func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Lenf(a.t, object, length, msg, args...) -} - -// Less asserts that the first element is less than the second -// -// a.Less(1, 2) -// a.Less(float64(1), float64(2)) -// a.Less("a", "b") -func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Less(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// a.LessOrEqual(1, 2) -// a.LessOrEqual(2, 2) -// a.LessOrEqual("a", "b") -// a.LessOrEqual("b", "b") -func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return LessOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// a.LessOrEqualf(1, 2, "error message %s", "formatted") -// a.LessOrEqualf(2, 2, "error message %s", "formatted") -// a.LessOrEqualf("a", "b", "error message %s", "formatted") -// a.LessOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return LessOrEqualf(a.t, e1, e2, msg, args...) -} - -// Lessf asserts that the first element is less than the second -// -// a.Lessf(1, 2, "error message %s", "formatted") -// a.Lessf(float64(1), float64(2), "error message %s", "formatted") -// a.Lessf("a", "b", "error message %s", "formatted") -func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Lessf(a.t, e1, e2, msg, args...) -} - -// Negative asserts that the specified element is negative -// -// a.Negative(-1) -// a.Negative(-1.23) -func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Negative(a.t, e, msgAndArgs...) -} - -// Negativef asserts that the specified element is negative -// -// a.Negativef(-1, "error message %s", "formatted") -// a.Negativef(-1.23, "error message %s", "formatted") -func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Negativef(a.t, e, msg, args...) -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Never(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Neverf(a.t, condition, waitFor, tick, msg, args...) -} - -// Nil asserts that the specified object is nil. -// -// a.Nil(err) -func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Nil(a.t, object, msgAndArgs...) -} - -// Nilf asserts that the specified object is nil. -// -// a.Nilf(err, "error message %s", "formatted") -func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Nilf(a.t, object, msg, args...) -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoDirExists(a.t, path, msgAndArgs...) -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoDirExistsf(a.t, path, msg, args...) -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoError(a.t, err, msgAndArgs...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoErrorf(a.t, err, msg, args...) -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoFileExists(a.t, path, msgAndArgs...) -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoFileExistsf(a.t, path, msg, args...) -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") -func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotContains(a.t, s, contains, msgAndArgs...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") -func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotContainsf(a.t, s, contains, msg, args...) -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEmpty(a.t, object, msgAndArgs...) -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEmptyf(a.t, object, msg, args...) -} - -// NotEqual asserts that the specified values are NOT equal. -// -// a.NotEqual(obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqual(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValues(obj1, obj2) -func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqualValues(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") -func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqualValuesf(a.t, expected, actual, msg, args...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqualf(a.t, expected, actual, msg, args...) -} - -// NotErrorIs asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorIs(a.t, err, target, msgAndArgs...) -} - -// NotErrorIsf asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorIsf(a.t, err, target, msg, args...) -} - -// NotNil asserts that the specified object is not nil. -// -// a.NotNil(err) -func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotNil(a.t, object, msgAndArgs...) -} - -// NotNilf asserts that the specified object is not nil. -// -// a.NotNilf(err, "error message %s", "formatted") -func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotNilf(a.t, object, msg, args...) -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanics(func(){ RemainCalm() }) -func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotPanics(a.t, f, msgAndArgs...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") -func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotPanicsf(a.t, f, msg, args...) -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") -func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotRegexp(a.t, rx, str, msgAndArgs...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") -func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotRegexpf(a.t, rx, str, msg, args...) -} - -// NotSame asserts that two pointers do not reference the same object. -// -// a.NotSame(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSame(a.t, expected, actual, msgAndArgs...) -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSamef(a.t, expected, actual, msg, args...) -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSubset(a.t, list, subset, msgAndArgs...) -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSubsetf(a.t, list, subset, msg, args...) -} - -// NotZero asserts that i is not the zero value for its type. -func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotZero(a.t, i, msgAndArgs...) -} - -// NotZerof asserts that i is not the zero value for its type. -func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotZerof(a.t, i, msg, args...) -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panics(func(){ GoCrazy() }) -func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Panics(a.t, f, msgAndArgs...) -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithError("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithError(a.t, errString, f, msgAndArgs...) -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithErrorf(a.t, errString, f, msg, args...) -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithValue(a.t, expected, f, msgAndArgs...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithValuef(a.t, expected, f, msg, args...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Panicsf(a.t, f, msg, args...) -} - -// Positive asserts that the specified element is positive -// -// a.Positive(1) -// a.Positive(1.23) -func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Positive(a.t, e, msgAndArgs...) -} - -// Positivef asserts that the specified element is positive -// -// a.Positivef(1, "error message %s", "formatted") -// a.Positivef(1.23, "error message %s", "formatted") -func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Positivef(a.t, e, msg, args...) -} - -// Regexp asserts that a specified regexp matches a string. -// -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") -func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Regexp(a.t, rx, str, msgAndArgs...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") -func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Regexpf(a.t, rx, str, msg, args...) -} - -// Same asserts that two pointers reference the same object. -// -// a.Same(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Same(a.t, expected, actual, msgAndArgs...) -} - -// Samef asserts that two pointers reference the same object. -// -// a.Samef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Samef(a.t, expected, actual, msg, args...) -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Subset(a.t, list, subset, msgAndArgs...) -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Subsetf(a.t, list, subset, msg, args...) -} - -// True asserts that the specified value is true. -// -// a.True(myBool) -func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return True(a.t, value, msgAndArgs...) -} - -// Truef asserts that the specified value is true. -// -// a.Truef(myBool, "error message %s", "formatted") -func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Truef(a.t, value, msg, args...) -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) -func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinDuration(a.t, expected, actual, delta, msgAndArgs...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinDurationf(a.t, expected, actual, delta, msg, args...) -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinRange(a.t, actual, start, end, msgAndArgs...) -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinRangef(a.t, actual, start, end, msg, args...) -} - -// YAMLEq asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return YAMLEq(a.t, expected, actual, msgAndArgs...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return YAMLEqf(a.t, expected, actual, msg, args...) -} - -// Zero asserts that i is the zero value for its type. -func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Zero(a.t, i, msgAndArgs...) -} - -// Zerof asserts that i is the zero value for its type. -func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Zerof(a.t, i, msg, args...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl deleted file mode 100644 index 188bb9e1..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { - if h, ok := a.t.(tHelper); ok { h.Helper() } - return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_order.go b/vendor/github.com/stretchr/testify/assert/assertion_order.go deleted file mode 100644 index 75944878..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_order.go +++ /dev/null @@ -1,81 +0,0 @@ -package assert - -import ( - "fmt" - "reflect" -) - -// isOrdered checks that collection contains orderable elements. -func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { - objKind := reflect.TypeOf(object).Kind() - if objKind != reflect.Slice && objKind != reflect.Array { - return false - } - - objValue := reflect.ValueOf(object) - objLen := objValue.Len() - - if objLen <= 1 { - return true - } - - value := objValue.Index(0) - valueInterface := value.Interface() - firstValueKind := value.Kind() - - for i := 1; i < objLen; i++ { - prevValue := value - prevValueInterface := valueInterface - - value = objValue.Index(i) - valueInterface = value.Interface() - - compareResult, isComparable := compare(prevValueInterface, valueInterface, firstValueKind) - - if !isComparable { - return Fail(t, fmt.Sprintf("Can not compare type \"%s\" and \"%s\"", reflect.TypeOf(value), reflect.TypeOf(prevValue)), msgAndArgs...) - } - - if !containsValue(allowedComparesResults, compareResult) { - return Fail(t, fmt.Sprintf(failMessage, prevValue, value), msgAndArgs...) - } - } - - return true -} - -// IsIncreasing asserts that the collection is increasing -// -// assert.IsIncreasing(t, []int{1, 2, 3}) -// assert.IsIncreasing(t, []float{1, 2}) -// assert.IsIncreasing(t, []string{"a", "b"}) -func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// assert.IsNonIncreasing(t, []int{2, 1, 1}) -// assert.IsNonIncreasing(t, []float{2, 1}) -// assert.IsNonIncreasing(t, []string{"b", "a"}) -func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) -} - -// IsDecreasing asserts that the collection is decreasing -// -// assert.IsDecreasing(t, []int{2, 1, 0}) -// assert.IsDecreasing(t, []float{2, 1}) -// assert.IsDecreasing(t, []string{"b", "a"}) -func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// assert.IsNonDecreasing(t, []int{1, 1, 2}) -// assert.IsNonDecreasing(t, []float{1, 2}) -// assert.IsNonDecreasing(t, []string{"a", "b"}) -func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go deleted file mode 100644 index 2924cf3a..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ /dev/null @@ -1,1856 +0,0 @@ -package assert - -import ( - "bufio" - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "os" - "reflect" - "regexp" - "runtime" - "runtime/debug" - "strings" - "time" - "unicode" - "unicode/utf8" - - "github.com/davecgh/go-spew/spew" - "github.com/pmezard/go-difflib/difflib" - yaml "gopkg.in/yaml.v3" -) - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl" - -// TestingT is an interface wrapper around *testing.T -type TestingT interface { - Errorf(format string, args ...interface{}) -} - -// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful -// for table driven tests. -type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) bool - -// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful -// for table driven tests. -type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) bool - -// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful -// for table driven tests. -type BoolAssertionFunc func(TestingT, bool, ...interface{}) bool - -// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful -// for table driven tests. -type ErrorAssertionFunc func(TestingT, error, ...interface{}) bool - -// Comparison is a custom function that returns true on success and false on failure -type Comparison func() (success bool) - -/* - Helper functions -*/ - -// ObjectsAreEqual determines if two objects are considered equal. -// -// This function does no assertion of any kind. -func ObjectsAreEqual(expected, actual interface{}) bool { - if expected == nil || actual == nil { - return expected == actual - } - - exp, ok := expected.([]byte) - if !ok { - return reflect.DeepEqual(expected, actual) - } - - act, ok := actual.([]byte) - if !ok { - return false - } - if exp == nil || act == nil { - return exp == nil && act == nil - } - return bytes.Equal(exp, act) -} - -// ObjectsAreEqualValues gets whether two objects are equal, or if their -// values are equal. -func ObjectsAreEqualValues(expected, actual interface{}) bool { - if ObjectsAreEqual(expected, actual) { - return true - } - - actualType := reflect.TypeOf(actual) - if actualType == nil { - return false - } - expectedValue := reflect.ValueOf(expected) - if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { - // Attempt comparison after type conversion - return reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual) - } - - return false -} - -/* CallerInfo is necessary because the assert functions use the testing object -internally, causing it to print the file:line of the assert method, rather than where -the problem actually occurred in calling code.*/ - -// CallerInfo returns an array of strings containing the file and line number -// of each stack frame leading from the current test to the assert call that -// failed. -func CallerInfo() []string { - - var pc uintptr - var ok bool - var file string - var line int - var name string - - callers := []string{} - for i := 0; ; i++ { - pc, file, line, ok = runtime.Caller(i) - if !ok { - // The breaks below failed to terminate the loop, and we ran off the - // end of the call stack. - break - } - - // This is a huge edge case, but it will panic if this is the case, see #180 - if file == "" { - break - } - - f := runtime.FuncForPC(pc) - if f == nil { - break - } - name = f.Name() - - // testing.tRunner is the standard library function that calls - // tests. Subtests are called directly by tRunner, without going through - // the Test/Benchmark/Example function that contains the t.Run calls, so - // with subtests we should break when we hit tRunner, without adding it - // to the list of callers. - if name == "testing.tRunner" { - break - } - - parts := strings.Split(file, "/") - if len(parts) > 1 { - filename := parts[len(parts)-1] - dir := parts[len(parts)-2] - if (dir != "assert" && dir != "mock" && dir != "require") || filename == "mock_test.go" { - callers = append(callers, fmt.Sprintf("%s:%d", file, line)) - } - } - - // Drop the package - segments := strings.Split(name, ".") - name = segments[len(segments)-1] - if isTest(name, "Test") || - isTest(name, "Benchmark") || - isTest(name, "Example") { - break - } - } - - return callers -} - -// Stolen from the `go test` tool. -// isTest tells whether name looks like a test (or benchmark, according to prefix). -// It is a Test (say) if there is a character after Test that is not a lower-case letter. -// We don't want TesticularCancer. -func isTest(name, prefix string) bool { - if !strings.HasPrefix(name, prefix) { - return false - } - if len(name) == len(prefix) { // "Test" is ok - return true - } - r, _ := utf8.DecodeRuneInString(name[len(prefix):]) - return !unicode.IsLower(r) -} - -func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { - if len(msgAndArgs) == 0 || msgAndArgs == nil { - return "" - } - if len(msgAndArgs) == 1 { - msg := msgAndArgs[0] - if msgAsStr, ok := msg.(string); ok { - return msgAsStr - } - return fmt.Sprintf("%+v", msg) - } - if len(msgAndArgs) > 1 { - return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) - } - return "" -} - -// Aligns the provided message so that all lines after the first line start at the same location as the first line. -// Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab). -// The longestLabelLen parameter specifies the length of the longest label in the output (required becaues this is the -// basis on which the alignment occurs). -func indentMessageLines(message string, longestLabelLen int) string { - outBuf := new(bytes.Buffer) - - for i, scanner := 0, bufio.NewScanner(strings.NewReader(message)); scanner.Scan(); i++ { - // no need to align first line because it starts at the correct location (after the label) - if i != 0 { - // append alignLen+1 spaces to align with "{{longestLabel}}:" before adding tab - outBuf.WriteString("\n\t" + strings.Repeat(" ", longestLabelLen+1) + "\t") - } - outBuf.WriteString(scanner.Text()) - } - - return outBuf.String() -} - -type failNower interface { - FailNow() -} - -// FailNow fails test -func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - Fail(t, failureMessage, msgAndArgs...) - - // We cannot extend TestingT with FailNow() and - // maintain backwards compatibility, so we fallback - // to panicking when FailNow is not available in - // TestingT. - // See issue #263 - - if t, ok := t.(failNower); ok { - t.FailNow() - } else { - panic("test failed and t is missing `FailNow()`") - } - return false -} - -// Fail reports a failure through -func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - content := []labeledContent{ - {"Error Trace", strings.Join(CallerInfo(), "\n\t\t\t")}, - {"Error", failureMessage}, - } - - // Add test name if the Go version supports it - if n, ok := t.(interface { - Name() string - }); ok { - content = append(content, labeledContent{"Test", n.Name()}) - } - - message := messageFromMsgAndArgs(msgAndArgs...) - if len(message) > 0 { - content = append(content, labeledContent{"Messages", message}) - } - - t.Errorf("\n%s", ""+labeledOutput(content...)) - - return false -} - -type labeledContent struct { - label string - content string -} - -// labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner: -// -// \t{{label}}:{{align_spaces}}\t{{content}}\n -// -// The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label. -// If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this -// alignment is achieved, "\t{{content}}\n" is added for the output. -// -// If the content of the labeledOutput contains line breaks, the subsequent lines are aligned so that they start at the same location as the first line. -func labeledOutput(content ...labeledContent) string { - longestLabel := 0 - for _, v := range content { - if len(v.label) > longestLabel { - longestLabel = len(v.label) - } - } - var output string - for _, v := range content { - output += "\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n" - } - return output -} - -// Implements asserts that an object is implemented by the specified interface. -// -// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) -func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - interfaceType := reflect.TypeOf(interfaceObject).Elem() - - if object == nil { - return Fail(t, fmt.Sprintf("Cannot check if nil implements %v", interfaceType), msgAndArgs...) - } - if !reflect.TypeOf(object).Implements(interfaceType) { - return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...) - } - - return true -} - -// IsType asserts that the specified objects are of the same type. -func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if !ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType)) { - return Fail(t, fmt.Sprintf("Object expected to be of type %v, but was %v", reflect.TypeOf(expectedType), reflect.TypeOf(object)), msgAndArgs...) - } - - return true -} - -// Equal asserts that two objects are equal. -// -// assert.Equal(t, 123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if err := validateEqualArgs(expected, actual); err != nil { - return Fail(t, fmt.Sprintf("Invalid operation: %#v == %#v (%s)", - expected, actual, err), msgAndArgs...) - } - - if !ObjectsAreEqual(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal: \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true - -} - -// validateEqualArgs checks whether provided arguments can be safely used in the -// Equal/NotEqual functions. -func validateEqualArgs(expected, actual interface{}) error { - if expected == nil && actual == nil { - return nil - } - - if isFunction(expected) || isFunction(actual) { - return errors.New("cannot take func type as argument") - } - return nil -} - -// Same asserts that two pointers reference the same object. -// -// assert.Same(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if !samePointers(expected, actual) { - return Fail(t, fmt.Sprintf("Not same: \n"+ - "expected: %p %#v\n"+ - "actual : %p %#v", expected, expected, actual, actual), msgAndArgs...) - } - - return true -} - -// NotSame asserts that two pointers do not reference the same object. -// -// assert.NotSame(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if samePointers(expected, actual) { - return Fail(t, fmt.Sprintf( - "Expected and actual point to the same object: %p %#v", - expected, expected), msgAndArgs...) - } - return true -} - -// samePointers compares two generic interface objects and returns whether -// they point to the same object -func samePointers(first, second interface{}) bool { - firstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second) - if firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr { - return false - } - - firstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second) - if firstType != secondType { - return false - } - - // compare pointer addresses - return first == second -} - -// formatUnequalValues takes two values of arbitrary types and returns string -// representations appropriate to be presented to the user. -// -// If the values are not of like type, the returned strings will be prefixed -// with the type name, and the value will be enclosed in parenthesis similar -// to a type conversion in the Go grammar. -func formatUnequalValues(expected, actual interface{}) (e string, a string) { - if reflect.TypeOf(expected) != reflect.TypeOf(actual) { - return fmt.Sprintf("%T(%s)", expected, truncatingFormat(expected)), - fmt.Sprintf("%T(%s)", actual, truncatingFormat(actual)) - } - switch expected.(type) { - case time.Duration: - return fmt.Sprintf("%v", expected), fmt.Sprintf("%v", actual) - } - return truncatingFormat(expected), truncatingFormat(actual) -} - -// truncatingFormat formats the data and truncates it if it's too long. -// -// This helps keep formatted error messages lines from exceeding the -// bufio.MaxScanTokenSize max line length that the go testing framework imposes. -func truncatingFormat(data interface{}) string { - value := fmt.Sprintf("%#v", data) - max := bufio.MaxScanTokenSize - 100 // Give us some space the type info too if needed. - if len(value) > max { - value = value[0:max] + "<... truncated>" - } - return value -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValues(t, uint32(123), int32(123)) -func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if !ObjectsAreEqualValues(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal: \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true - -} - -// Exactly asserts that two objects are equal in value and type. -// -// assert.Exactly(t, int32(123), int64(123)) -func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - aType := reflect.TypeOf(expected) - bType := reflect.TypeOf(actual) - - if aType != bType { - return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) - } - - return Equal(t, expected, actual, msgAndArgs...) - -} - -// NotNil asserts that the specified object is not nil. -// -// assert.NotNil(t, err) -func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - if !isNil(object) { - return true - } - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "Expected value not to be nil.", msgAndArgs...) -} - -// containsKind checks if a specified kind in the slice of kinds. -func containsKind(kinds []reflect.Kind, kind reflect.Kind) bool { - for i := 0; i < len(kinds); i++ { - if kind == kinds[i] { - return true - } - } - - return false -} - -// isNil checks if a specified object is nil or not, without Failing. -func isNil(object interface{}) bool { - if object == nil { - return true - } - - value := reflect.ValueOf(object) - kind := value.Kind() - isNilableKind := containsKind( - []reflect.Kind{ - reflect.Chan, reflect.Func, - reflect.Interface, reflect.Map, - reflect.Ptr, reflect.Slice, reflect.UnsafePointer}, - kind) - - if isNilableKind && value.IsNil() { - return true - } - - return false -} - -// Nil asserts that the specified object is nil. -// -// assert.Nil(t, err) -func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - if isNil(object) { - return true - } - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) -} - -// isEmpty gets whether the specified object is considered empty or not. -func isEmpty(object interface{}) bool { - - // get nil case out of the way - if object == nil { - return true - } - - objValue := reflect.ValueOf(object) - - switch objValue.Kind() { - // collection types are empty when they have no element - case reflect.Chan, reflect.Map, reflect.Slice: - return objValue.Len() == 0 - // pointers are empty if nil or if the value they point to is empty - case reflect.Ptr: - if objValue.IsNil() { - return true - } - deref := objValue.Elem().Interface() - return isEmpty(deref) - // for all other types, compare against the zero value - // array types are empty when they match their zero-initialized state - default: - zero := reflect.Zero(objValue.Type()) - return reflect.DeepEqual(object, zero.Interface()) - } -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Empty(t, obj) -func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - pass := isEmpty(object) - if !pass { - if h, ok := t.(tHelper); ok { - h.Helper() - } - Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...) - } - - return pass - -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } -func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - pass := !isEmpty(object) - if !pass { - if h, ok := t.(tHelper); ok { - h.Helper() - } - Fail(t, fmt.Sprintf("Should NOT be empty, but was %v", object), msgAndArgs...) - } - - return pass - -} - -// getLen try to get length of object. -// return (false, 0) if impossible. -func getLen(x interface{}) (ok bool, length int) { - v := reflect.ValueOf(x) - defer func() { - if e := recover(); e != nil { - ok = false - } - }() - return true, v.Len() -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// assert.Len(t, mySlice, 3) -func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - ok, l := getLen(object) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", object), msgAndArgs...) - } - - if l != length { - return Fail(t, fmt.Sprintf("\"%s\" should have %d item(s), but has %d", object, length, l), msgAndArgs...) - } - return true -} - -// True asserts that the specified value is true. -// -// assert.True(t, myBool) -func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { - if !value { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "Should be true", msgAndArgs...) - } - - return true - -} - -// False asserts that the specified value is false. -// -// assert.False(t, myBool) -func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { - if value { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "Should be false", msgAndArgs...) - } - - return true - -} - -// NotEqual asserts that the specified values are NOT equal. -// -// assert.NotEqual(t, obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if err := validateEqualArgs(expected, actual); err != nil { - return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)", - expected, actual, err), msgAndArgs...) - } - - if ObjectsAreEqual(expected, actual) { - return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) - } - - return true - -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// assert.NotEqualValues(t, obj1, obj2) -func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if ObjectsAreEqualValues(expected, actual) { - return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) - } - - return true -} - -// containsElement try loop over the list check if the list includes the element. -// return (false, false) if impossible. -// return (true, false) if element was not found. -// return (true, true) if element was found. -func containsElement(list interface{}, element interface{}) (ok, found bool) { - - listValue := reflect.ValueOf(list) - listType := reflect.TypeOf(list) - if listType == nil { - return false, false - } - listKind := listType.Kind() - defer func() { - if e := recover(); e != nil { - ok = false - found = false - } - }() - - if listKind == reflect.String { - elementValue := reflect.ValueOf(element) - return true, strings.Contains(listValue.String(), elementValue.String()) - } - - if listKind == reflect.Map { - mapKeys := listValue.MapKeys() - for i := 0; i < len(mapKeys); i++ { - if ObjectsAreEqual(mapKeys[i].Interface(), element) { - return true, true - } - } - return true, false - } - - for i := 0; i < listValue.Len(); i++ { - if ObjectsAreEqual(listValue.Index(i).Interface(), element) { - return true, true - } - } - return true, false - -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Contains(t, "Hello World", "World") -// assert.Contains(t, ["Hello", "World"], "World") -// assert.Contains(t, {"Hello": "World"}, "Hello") -func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ok, found := containsElement(s, contains) - if !ok { - return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) - } - if !found { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", s, contains), msgAndArgs...) - } - - return true - -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContains(t, "Hello World", "Earth") -// assert.NotContains(t, ["Hello", "World"], "Earth") -// assert.NotContains(t, {"Hello": "World"}, "Earth") -func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ok, found := containsElement(s, contains) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...) - } - if found { - return Fail(t, fmt.Sprintf("\"%s\" should not contain \"%s\"", s, contains), msgAndArgs...) - } - - return true - -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if subset == nil { - return true // we consider nil to be equal to the nil set - } - - listKind := reflect.TypeOf(list).Kind() - if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) - } - - subsetKind := reflect.TypeOf(subset).Kind() - if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) - } - - if subsetKind == reflect.Map && listKind == reflect.Map { - subsetMap := reflect.ValueOf(subset) - actualMap := reflect.ValueOf(list) - - for _, k := range subsetMap.MapKeys() { - ev := subsetMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !av.IsValid() { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) - } - if !ObjectsAreEqual(ev.Interface(), av.Interface()) { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) - } - } - - return true - } - - subsetList := reflect.ValueOf(subset) - for i := 0; i < subsetList.Len(); i++ { - element := subsetList.Index(i).Interface() - ok, found := containsElement(list, element) - if !ok { - return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", list), msgAndArgs...) - } - if !found { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, element), msgAndArgs...) - } - } - - return true -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if subset == nil { - return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...) - } - - listKind := reflect.TypeOf(list).Kind() - if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) - } - - subsetKind := reflect.TypeOf(subset).Kind() - if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) - } - - if subsetKind == reflect.Map && listKind == reflect.Map { - subsetMap := reflect.ValueOf(subset) - actualMap := reflect.ValueOf(list) - - for _, k := range subsetMap.MapKeys() { - ev := subsetMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !av.IsValid() { - return true - } - if !ObjectsAreEqual(ev.Interface(), av.Interface()) { - return true - } - } - - return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) - } - - subsetList := reflect.ValueOf(subset) - for i := 0; i < subsetList.Len(); i++ { - element := subsetList.Index(i).Interface() - ok, found := containsElement(list, element) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) - } - if !found { - return true - } - } - - return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) -func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if isEmpty(listA) && isEmpty(listB) { - return true - } - - if !isList(t, listA, msgAndArgs...) || !isList(t, listB, msgAndArgs...) { - return false - } - - extraA, extraB := diffLists(listA, listB) - - if len(extraA) == 0 && len(extraB) == 0 { - return true - } - - return Fail(t, formatListDiff(listA, listB, extraA, extraB), msgAndArgs...) -} - -// isList checks that the provided value is array or slice. -func isList(t TestingT, list interface{}, msgAndArgs ...interface{}) (ok bool) { - kind := reflect.TypeOf(list).Kind() - if kind != reflect.Array && kind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s, expecting array or slice", list, kind), - msgAndArgs...) - } - return true -} - -// diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B. -// If some element is present multiple times, each instance is counted separately (e.g. if something is 2x in A and -// 5x in B, it will be 0x in extraA and 3x in extraB). The order of items in both lists is ignored. -func diffLists(listA, listB interface{}) (extraA, extraB []interface{}) { - aValue := reflect.ValueOf(listA) - bValue := reflect.ValueOf(listB) - - aLen := aValue.Len() - bLen := bValue.Len() - - // Mark indexes in bValue that we already used - visited := make([]bool, bLen) - for i := 0; i < aLen; i++ { - element := aValue.Index(i).Interface() - found := false - for j := 0; j < bLen; j++ { - if visited[j] { - continue - } - if ObjectsAreEqual(bValue.Index(j).Interface(), element) { - visited[j] = true - found = true - break - } - } - if !found { - extraA = append(extraA, element) - } - } - - for j := 0; j < bLen; j++ { - if visited[j] { - continue - } - extraB = append(extraB, bValue.Index(j).Interface()) - } - - return -} - -func formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) string { - var msg bytes.Buffer - - msg.WriteString("elements differ") - if len(extraA) > 0 { - msg.WriteString("\n\nextra elements in list A:\n") - msg.WriteString(spewConfig.Sdump(extraA)) - } - if len(extraB) > 0 { - msg.WriteString("\n\nextra elements in list B:\n") - msg.WriteString(spewConfig.Sdump(extraB)) - } - msg.WriteString("\n\nlistA:\n") - msg.WriteString(spewConfig.Sdump(listA)) - msg.WriteString("\n\nlistB:\n") - msg.WriteString(spewConfig.Sdump(listB)) - - return msg.String() -} - -// Condition uses a Comparison to assert a complex condition. -func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - result := comp() - if !result { - Fail(t, "Condition failed!", msgAndArgs...) - } - return result -} - -// PanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics -// methods, and represents a simple func that takes no arguments, and returns nothing. -type PanicTestFunc func() - -// didPanic returns true if the function passed to it panics. Otherwise, it returns false. -func didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string) { - didPanic = true - - defer func() { - message = recover() - if didPanic { - stack = string(debug.Stack()) - } - }() - - // call the target function - f() - didPanic = false - - return -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panics(t, func(){ GoCrazy() }) -func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if funcDidPanic, panicValue, _ := didPanic(f); !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) - } - - return true -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - funcDidPanic, panicValue, panickedStack := didPanic(f) - if !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) - } - if panicValue != expected { - return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, expected, panicValue, panickedStack), msgAndArgs...) - } - - return true -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - funcDidPanic, panicValue, panickedStack := didPanic(f) - if !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) - } - panicErr, ok := panicValue.(error) - if !ok || panicErr.Error() != errString { - return Fail(t, fmt.Sprintf("func %#v should panic with error message:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, errString, panicValue, panickedStack), msgAndArgs...) - } - - return true -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanics(t, func(){ RemainCalm() }) -func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if funcDidPanic, panicValue, panickedStack := didPanic(f); funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v\n\tPanic stack:\t%s", f, panicValue, panickedStack), msgAndArgs...) - } - - return true -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) -func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - dt := expected.Sub(actual) - if dt < -delta || dt > delta { - return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) - } - - return true -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if end.Before(start) { - return Fail(t, "Start should be before end", msgAndArgs...) - } - - if actual.Before(start) { - return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is before the range", actual, start, end), msgAndArgs...) - } else if actual.After(end) { - return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is after the range", actual, start, end), msgAndArgs...) - } - - return true -} - -func toFloat(x interface{}) (float64, bool) { - var xf float64 - xok := true - - switch xn := x.(type) { - case uint: - xf = float64(xn) - case uint8: - xf = float64(xn) - case uint16: - xf = float64(xn) - case uint32: - xf = float64(xn) - case uint64: - xf = float64(xn) - case int: - xf = float64(xn) - case int8: - xf = float64(xn) - case int16: - xf = float64(xn) - case int32: - xf = float64(xn) - case int64: - xf = float64(xn) - case float32: - xf = float64(xn) - case float64: - xf = xn - case time.Duration: - xf = float64(xn) - default: - xok = false - } - - return xf, xok -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// assert.InDelta(t, math.Pi, 22/7.0, 0.01) -func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - af, aok := toFloat(expected) - bf, bok := toFloat(actual) - - if !aok || !bok { - return Fail(t, "Parameters must be numerical", msgAndArgs...) - } - - if math.IsNaN(af) && math.IsNaN(bf) { - return true - } - - if math.IsNaN(af) { - return Fail(t, "Expected must not be NaN", msgAndArgs...) - } - - if math.IsNaN(bf) { - return Fail(t, fmt.Sprintf("Expected %v with delta %v, but was NaN", expected, delta), msgAndArgs...) - } - - dt := af - bf - if dt < -delta || dt > delta { - return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) - } - - return true -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Slice || - reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, "Parameters must be slice", msgAndArgs...) - } - - actualSlice := reflect.ValueOf(actual) - expectedSlice := reflect.ValueOf(expected) - - for i := 0; i < actualSlice.Len(); i++ { - result := InDelta(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), delta, msgAndArgs...) - if !result { - return result - } - } - - return true -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Map || - reflect.TypeOf(expected).Kind() != reflect.Map { - return Fail(t, "Arguments must be maps", msgAndArgs...) - } - - expectedMap := reflect.ValueOf(expected) - actualMap := reflect.ValueOf(actual) - - if expectedMap.Len() != actualMap.Len() { - return Fail(t, "Arguments must have the same number of keys", msgAndArgs...) - } - - for _, k := range expectedMap.MapKeys() { - ev := expectedMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !ev.IsValid() { - return Fail(t, fmt.Sprintf("missing key %q in expected map", k), msgAndArgs...) - } - - if !av.IsValid() { - return Fail(t, fmt.Sprintf("missing key %q in actual map", k), msgAndArgs...) - } - - if !InDelta( - t, - ev.Interface(), - av.Interface(), - delta, - msgAndArgs..., - ) { - return false - } - } - - return true -} - -func calcRelativeError(expected, actual interface{}) (float64, error) { - af, aok := toFloat(expected) - bf, bok := toFloat(actual) - if !aok || !bok { - return 0, fmt.Errorf("Parameters must be numerical") - } - if math.IsNaN(af) && math.IsNaN(bf) { - return 0, nil - } - if math.IsNaN(af) { - return 0, errors.New("expected value must not be NaN") - } - if af == 0 { - return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error") - } - if math.IsNaN(bf) { - return 0, errors.New("actual value must not be NaN") - } - - return math.Abs(af-bf) / math.Abs(af), nil -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if math.IsNaN(epsilon) { - return Fail(t, "epsilon must not be NaN") - } - actualEpsilon, err := calcRelativeError(expected, actual) - if err != nil { - return Fail(t, err.Error(), msgAndArgs...) - } - if actualEpsilon > epsilon { - return Fail(t, fmt.Sprintf("Relative error is too high: %#v (expected)\n"+ - " < %#v (actual)", epsilon, actualEpsilon), msgAndArgs...) - } - - return true -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Slice || - reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, "Parameters must be slice", msgAndArgs...) - } - - actualSlice := reflect.ValueOf(actual) - expectedSlice := reflect.ValueOf(expected) - - for i := 0; i < actualSlice.Len(); i++ { - result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon) - if !result { - return result - } - } - - return true -} - -/* - Errors -*/ - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoError(t, err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { - if err != nil { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...) - } - - return true -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Error(t, err) { -// assert.Equal(t, expectedError, err) -// } -func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { - if err == nil { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "An error is expected but got nil.", msgAndArgs...) - } - - return true -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualError(t, err, expectedErrorString) -func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !Error(t, theError, msgAndArgs...) { - return false - } - expected := errString - actual := theError.Error() - // don't need to use deep equals here, we know they are both strings - if expected != actual { - return Fail(t, fmt.Sprintf("Error message not equal:\n"+ - "expected: %q\n"+ - "actual : %q", expected, actual), msgAndArgs...) - } - return true -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// assert.ErrorContains(t, err, expectedErrorSubString) -func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !Error(t, theError, msgAndArgs...) { - return false - } - - actual := theError.Error() - if !strings.Contains(actual, contains) { - return Fail(t, fmt.Sprintf("Error %#v does not contain %#v", actual, contains), msgAndArgs...) - } - - return true -} - -// matchRegexp return true if a specified regexp matches a string. -func matchRegexp(rx interface{}, str interface{}) bool { - - var r *regexp.Regexp - if rr, ok := rx.(*regexp.Regexp); ok { - r = rr - } else { - r = regexp.MustCompile(fmt.Sprint(rx)) - } - - return (r.FindStringIndex(fmt.Sprint(str)) != nil) - -} - -// Regexp asserts that a specified regexp matches a string. -// -// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") -// assert.Regexp(t, "start...$", "it's not starting") -func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - match := matchRegexp(rx, str) - - if !match { - Fail(t, fmt.Sprintf("Expect \"%v\" to match \"%v\"", str, rx), msgAndArgs...) - } - - return match -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// assert.NotRegexp(t, "^start", "it's not starting") -func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - match := matchRegexp(rx, str) - - if match { - Fail(t, fmt.Sprintf("Expect \"%v\" to NOT match \"%v\"", str, rx), msgAndArgs...) - } - - return !match - -} - -// Zero asserts that i is the zero value for its type. -func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { - return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...) - } - return true -} - -// NotZero asserts that i is not the zero value for its type. -func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { - return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...) - } - return true -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) - } - return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) - } - if info.IsDir() { - return Fail(t, fmt.Sprintf("%q is a directory", path), msgAndArgs...) - } - return true -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - return true - } - if info.IsDir() { - return true - } - return Fail(t, fmt.Sprintf("file %q exists", path), msgAndArgs...) -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) - } - return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) - } - if !info.IsDir() { - return Fail(t, fmt.Sprintf("%q is a file", path), msgAndArgs...) - } - return true -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return true - } - return true - } - if !info.IsDir() { - return true - } - return Fail(t, fmt.Sprintf("directory %q exists", path), msgAndArgs...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - var expectedJSONAsInterface, actualJSONAsInterface interface{} - - if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid json.\nJSON parsing error: '%s'", expected, err.Error()), msgAndArgs...) - } - - if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid json.\nJSON parsing error: '%s'", actual, err.Error()), msgAndArgs...) - } - - return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...) -} - -// YAMLEq asserts that two YAML strings are equivalent. -func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - var expectedYAMLAsInterface, actualYAMLAsInterface interface{} - - if err := yaml.Unmarshal([]byte(expected), &expectedYAMLAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid yaml.\nYAML parsing error: '%s'", expected, err.Error()), msgAndArgs...) - } - - if err := yaml.Unmarshal([]byte(actual), &actualYAMLAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid yaml.\nYAML error: '%s'", actual, err.Error()), msgAndArgs...) - } - - return Equal(t, expectedYAMLAsInterface, actualYAMLAsInterface, msgAndArgs...) -} - -func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { - t := reflect.TypeOf(v) - k := t.Kind() - - if k == reflect.Ptr { - t = t.Elem() - k = t.Kind() - } - return t, k -} - -// diff returns a diff of both values as long as both are of the same type and -// are a struct, map, slice, array or string. Otherwise it returns an empty string. -func diff(expected interface{}, actual interface{}) string { - if expected == nil || actual == nil { - return "" - } - - et, ek := typeAndKind(expected) - at, _ := typeAndKind(actual) - - if et != at { - return "" - } - - if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array && ek != reflect.String { - return "" - } - - var e, a string - - switch et { - case reflect.TypeOf(""): - e = reflect.ValueOf(expected).String() - a = reflect.ValueOf(actual).String() - case reflect.TypeOf(time.Time{}): - e = spewConfigStringerEnabled.Sdump(expected) - a = spewConfigStringerEnabled.Sdump(actual) - default: - e = spewConfig.Sdump(expected) - a = spewConfig.Sdump(actual) - } - - diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ - A: difflib.SplitLines(e), - B: difflib.SplitLines(a), - FromFile: "Expected", - FromDate: "", - ToFile: "Actual", - ToDate: "", - Context: 1, - }) - - return "\n\nDiff:\n" + diff -} - -func isFunction(arg interface{}) bool { - if arg == nil { - return false - } - return reflect.TypeOf(arg).Kind() == reflect.Func -} - -var spewConfig = spew.ConfigState{ - Indent: " ", - DisablePointerAddresses: true, - DisableCapacities: true, - SortKeys: true, - DisableMethods: true, - MaxDepth: 10, -} - -var spewConfigStringerEnabled = spew.ConfigState{ - Indent: " ", - DisablePointerAddresses: true, - DisableCapacities: true, - SortKeys: true, - MaxDepth: 10, -} - -type tHelper interface { - Helper() -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) -func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ch := make(chan bool, 1) - - timer := time.NewTimer(waitFor) - defer timer.Stop() - - ticker := time.NewTicker(tick) - defer ticker.Stop() - - for tick := ticker.C; ; { - select { - case <-timer.C: - return Fail(t, "Condition never satisfied", msgAndArgs...) - case <-tick: - tick = nil - go func() { ch <- condition() }() - case v := <-ch: - if v { - return true - } - tick = ticker.C - } - } -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) -func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ch := make(chan bool, 1) - - timer := time.NewTimer(waitFor) - defer timer.Stop() - - ticker := time.NewTicker(tick) - defer ticker.Stop() - - for tick := ticker.C; ; { - select { - case <-timer.C: - return true - case <-tick: - tick = nil - go func() { ch <- condition() }() - case v := <-ch: - if v { - return Fail(t, "Condition satisfied", msgAndArgs...) - } - tick = ticker.C - } - } -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if errors.Is(err, target) { - return true - } - - var expectedText string - if target != nil { - expectedText = target.Error() - } - - chain := buildErrorChainString(err) - - return Fail(t, fmt.Sprintf("Target error should be in err chain:\n"+ - "expected: %q\n"+ - "in chain: %s", expectedText, chain, - ), msgAndArgs...) -} - -// NotErrorIs asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !errors.Is(err, target) { - return true - } - - var expectedText string - if target != nil { - expectedText = target.Error() - } - - chain := buildErrorChainString(err) - - return Fail(t, fmt.Sprintf("Target error should not be in err chain:\n"+ - "found: %q\n"+ - "in chain: %s", expectedText, chain, - ), msgAndArgs...) -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if errors.As(err, target) { - return true - } - - chain := buildErrorChainString(err) - - return Fail(t, fmt.Sprintf("Should be in error chain:\n"+ - "expected: %q\n"+ - "in chain: %s", target, chain, - ), msgAndArgs...) -} - -func buildErrorChainString(err error) string { - if err == nil { - return "" - } - - e := errors.Unwrap(err) - chain := fmt.Sprintf("%q", err.Error()) - for e != nil { - chain += fmt.Sprintf("\n\t%q", e.Error()) - e = errors.Unwrap(e) - } - return chain -} diff --git a/vendor/github.com/stretchr/testify/assert/doc.go b/vendor/github.com/stretchr/testify/assert/doc.go deleted file mode 100644 index c9dccc4d..00000000 --- a/vendor/github.com/stretchr/testify/assert/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. -// -// Example Usage -// -// The following is a complete example using assert in a standard test function: -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) -// -// func TestSomething(t *testing.T) { -// -// var a string = "Hello" -// var b string = "Hello" -// -// assert.Equal(t, a, b, "The two words should be the same.") -// -// } -// -// if you assert many times, use the format below: -// -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) -// -// func TestSomething(t *testing.T) { -// assert := assert.New(t) -// -// var a string = "Hello" -// var b string = "Hello" -// -// assert.Equal(a, b, "The two words should be the same.") -// } -// -// Assertions -// -// Assertions allow you to easily write test code, and are global funcs in the `assert` package. -// All assertion functions take, as the first argument, the `*testing.T` object provided by the -// testing framework. This allows the assertion funcs to write the failings and other details to -// the correct place. -// -// Every assertion function also takes an optional string message as the final argument, -// allowing custom error messages to be appended to the message the assertion method outputs. -package assert diff --git a/vendor/github.com/stretchr/testify/assert/errors.go b/vendor/github.com/stretchr/testify/assert/errors.go deleted file mode 100644 index ac9dc9d1..00000000 --- a/vendor/github.com/stretchr/testify/assert/errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package assert - -import ( - "errors" -) - -// AnError is an error instance useful for testing. If the code does not care -// about error specifics, and only needs to return the error for example, this -// error should be used to make the test code more readable. -var AnError = errors.New("assert.AnError general error for testing") diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/testify/assert/forward_assertions.go deleted file mode 100644 index df189d23..00000000 --- a/vendor/github.com/stretchr/testify/assert/forward_assertions.go +++ /dev/null @@ -1,16 +0,0 @@ -package assert - -// Assertions provides assertion methods around the -// TestingT interface. -type Assertions struct { - t TestingT -} - -// New makes a new Assertions object for the specified TestingT. -func New(t TestingT) *Assertions { - return &Assertions{ - t: t, - } -} - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go deleted file mode 100644 index 4ed341dd..00000000 --- a/vendor/github.com/stretchr/testify/assert/http_assertions.go +++ /dev/null @@ -1,162 +0,0 @@ -package assert - -import ( - "fmt" - "net/http" - "net/http/httptest" - "net/url" - "strings" -) - -// httpCode is a helper that returns HTTP code of the response. It returns -1 and -// an error if building a new request fails. -func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) { - w := httptest.NewRecorder() - req, err := http.NewRequest(method, url, nil) - if err != nil { - return -1, err - } - req.URL.RawQuery = values.Encode() - handler(w, req) - return w.Code, nil -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - } - - isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent - if !isSuccessCode { - Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code)) - } - - return isSuccessCode -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - } - - isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect - if !isRedirectCode { - Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code)) - } - - return isRedirectCode -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - } - - isErrorCode := code >= http.StatusBadRequest - if !isErrorCode { - Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code)) - } - - return isErrorCode -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - } - - successful := code == statuscode - if !successful { - Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code)) - } - - return successful -} - -// HTTPBody is a helper that returns HTTP body of the response. It returns -// empty string if building a new request fails. -func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { - w := httptest.NewRecorder() - req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) - if err != nil { - return "" - } - handler(w, req) - return w.Body.String() -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - body := HTTPBody(handler, method, url, values) - - contains := strings.Contains(body, fmt.Sprint(str)) - if !contains { - Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) - } - - return contains -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - body := HTTPBody(handler, method, url, values) - - contains := strings.Contains(body, fmt.Sprint(str)) - if contains { - Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) - } - - return !contains -} diff --git a/vendor/github.com/stretchr/testify/require/doc.go b/vendor/github.com/stretchr/testify/require/doc.go deleted file mode 100644 index 169de392..00000000 --- a/vendor/github.com/stretchr/testify/require/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Package require implements the same assertions as the `assert` package but -// stops test execution when a test fails. -// -// Example Usage -// -// The following is a complete example using require in a standard test function: -// import ( -// "testing" -// "github.com/stretchr/testify/require" -// ) -// -// func TestSomething(t *testing.T) { -// -// var a string = "Hello" -// var b string = "Hello" -// -// require.Equal(t, a, b, "The two words should be the same.") -// -// } -// -// Assertions -// -// The `require` package have same global functions as in the `assert` package, -// but instead of returning a boolean result they call `t.FailNow()`. -// -// Every assertion function also takes an optional string message as the final argument, -// allowing custom error messages to be appended to the message the assertion method outputs. -package require diff --git a/vendor/github.com/stretchr/testify/require/forward_requirements.go b/vendor/github.com/stretchr/testify/require/forward_requirements.go deleted file mode 100644 index 1dcb2338..00000000 --- a/vendor/github.com/stretchr/testify/require/forward_requirements.go +++ /dev/null @@ -1,16 +0,0 @@ -package require - -// Assertions provides assertion methods around the -// TestingT interface. -type Assertions struct { - t TestingT -} - -// New makes a new Assertions object for the specified TestingT. -func New(t TestingT) *Assertions { - return &Assertions{ - t: t, - } -} - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require_forward.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/stretchr/testify/require/require.go b/vendor/github.com/stretchr/testify/require/require.go deleted file mode 100644 index 880853f5..00000000 --- a/vendor/github.com/stretchr/testify/require/require.go +++ /dev/null @@ -1,1935 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package require - -import ( - assert "github.com/stretchr/testify/assert" - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Condition(t, comp, msgAndArgs...) { - return - } - t.FailNow() -} - -// Conditionf uses a Comparison to assert a complex condition. -func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Conditionf(t, comp, msg, args...) { - return - } - t.FailNow() -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Contains(t, "Hello World", "World") -// assert.Contains(t, ["Hello", "World"], "World") -// assert.Contains(t, {"Hello": "World"}, "Hello") -func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Contains(t, s, contains, msgAndArgs...) { - return - } - t.FailNow() -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") -func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Containsf(t, s, contains, msg, args...) { - return - } - t.FailNow() -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.DirExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.DirExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) -func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ElementsMatch(t, listA, listB, msgAndArgs...) { - return - } - t.FailNow() -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ElementsMatchf(t, listA, listB, msg, args...) { - return - } - t.FailNow() -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Empty(t, obj) -func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Empty(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Emptyf(t, obj, "error message %s", "formatted") -func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Emptyf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// Equal asserts that two objects are equal. -// -// assert.Equal(t, 123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Equal(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualError(t, err, expectedErrorString) -func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualError(t, theError, errString, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") -func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualErrorf(t, theError, errString, msg, args...) { - return - } - t.FailNow() -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValues(t, uint32(123), int32(123)) -func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualValues(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") -func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualValuesf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Equalf asserts that two objects are equal. -// -// assert.Equalf(t, 123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Equalf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Error(t, err) { -// assert.Equal(t, expectedError, err) -// } -func Error(t TestingT, err error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Error(t, err, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorAs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorAsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// assert.ErrorContains(t, err, expectedErrorSubString) -func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorContains(t, theError, contains, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") -func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorContainsf(t, theError, contains, msg, args...) { - return - } - t.FailNow() -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorIs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorIsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Errorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -func Errorf(t TestingT, err error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Errorf(t, err, msg, args...) { - return - } - t.FailNow() -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) -func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Eventually(t, condition, waitFor, tick, msgAndArgs...) { - return - } - t.FailNow() -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Eventuallyf(t, condition, waitFor, tick, msg, args...) { - return - } - t.FailNow() -} - -// Exactly asserts that two objects are equal in value and type. -// -// assert.Exactly(t, int32(123), int64(123)) -func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Exactly(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") -func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Exactlyf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Fail reports a failure through -func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Fail(t, failureMessage, msgAndArgs...) { - return - } - t.FailNow() -} - -// FailNow fails test -func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FailNow(t, failureMessage, msgAndArgs...) { - return - } - t.FailNow() -} - -// FailNowf fails test -func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FailNowf(t, failureMessage, msg, args...) { - return - } - t.FailNow() -} - -// Failf reports a failure through -func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Failf(t, failureMessage, msg, args...) { - return - } - t.FailNow() -} - -// False asserts that the specified value is false. -// -// assert.False(t, myBool) -func False(t TestingT, value bool, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.False(t, value, msgAndArgs...) { - return - } - t.FailNow() -} - -// Falsef asserts that the specified value is false. -// -// assert.Falsef(t, myBool, "error message %s", "formatted") -func Falsef(t TestingT, value bool, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Falsef(t, value, msg, args...) { - return - } - t.FailNow() -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FileExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FileExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// Greater asserts that the first element is greater than the second -// -// assert.Greater(t, 2, 1) -// assert.Greater(t, float64(2), float64(1)) -// assert.Greater(t, "b", "a") -func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Greater(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// assert.GreaterOrEqual(t, 2, 1) -// assert.GreaterOrEqual(t, 2, 2) -// assert.GreaterOrEqual(t, "b", "a") -// assert.GreaterOrEqual(t, "b", "b") -func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.GreaterOrEqual(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") -func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.GreaterOrEqualf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// Greaterf asserts that the first element is greater than the second -// -// assert.Greaterf(t, 2, 1, "error message %s", "formatted") -// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") -// assert.Greaterf(t, "b", "a", "error message %s", "formatted") -func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Greaterf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyContains(t, handler, method, url, values, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) { - return - } - t.FailNow() -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) { - return - } - t.FailNow() -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPError(t, handler, method, url, values, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPErrorf(t, handler, method, url, values, msg, args...) { - return - } - t.FailNow() -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPRedirect(t, handler, method, url, values, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) { - return - } - t.FailNow() -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPStatusCode(t, handler, method, url, values, statuscode, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPStatusCodef(t, handler, method, url, values, statuscode, msg, args...) { - return - } - t.FailNow() -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPSuccessf(t, handler, method, url, values, msg, args...) { - return - } - t.FailNow() -} - -// Implements asserts that an object is implemented by the specified interface. -// -// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) -func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Implements(t, interfaceObject, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Implementsf(t, interfaceObject, object, msg, args...) { - return - } - t.FailNow() -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// assert.InDelta(t, math.Pi, 22/7.0, 0.01) -func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDelta(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaMapValues(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaMapValuesf(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaSlicef(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaf(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) { - return - } - t.FailNow() -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) { - return - } - t.FailNow() -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilonSlicef(t, expected, actual, epsilon, msg, args...) { - return - } - t.FailNow() -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilonf(t, expected, actual, epsilon, msg, args...) { - return - } - t.FailNow() -} - -// IsDecreasing asserts that the collection is decreasing -// -// assert.IsDecreasing(t, []int{2, 1, 0}) -// assert.IsDecreasing(t, []float{2, 1}) -// assert.IsDecreasing(t, []string{"b", "a"}) -func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsDecreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsDecreasingf asserts that the collection is decreasing -// -// assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsDecreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsIncreasing asserts that the collection is increasing -// -// assert.IsIncreasing(t, []int{1, 2, 3}) -// assert.IsIncreasing(t, []float{1, 2}) -// assert.IsIncreasing(t, []string{"a", "b"}) -func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsIncreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsIncreasingf asserts that the collection is increasing -// -// assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsIncreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// assert.IsNonDecreasing(t, []int{1, 1, 2}) -// assert.IsNonDecreasing(t, []float{1, 2}) -// assert.IsNonDecreasing(t, []string{"a", "b"}) -func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonDecreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonDecreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// assert.IsNonIncreasing(t, []int{2, 1, 1}) -// assert.IsNonIncreasing(t, []float{2, 1}) -// assert.IsNonIncreasing(t, []string{"b", "a"}) -func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonIncreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonIncreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsType asserts that the specified objects are of the same type. -func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsType(t, expectedType, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsTypef asserts that the specified objects are of the same type. -func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsTypef(t, expectedType, object, msg, args...) { - return - } - t.FailNow() -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.JSONEq(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.JSONEqf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// assert.Len(t, mySlice, 3) -func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Len(t, object, length, msgAndArgs...) { - return - } - t.FailNow() -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") -func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Lenf(t, object, length, msg, args...) { - return - } - t.FailNow() -} - -// Less asserts that the first element is less than the second -// -// assert.Less(t, 1, 2) -// assert.Less(t, float64(1), float64(2)) -// assert.Less(t, "a", "b") -func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Less(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// assert.LessOrEqual(t, 1, 2) -// assert.LessOrEqual(t, 2, 2) -// assert.LessOrEqual(t, "a", "b") -// assert.LessOrEqual(t, "b", "b") -func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.LessOrEqual(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") -// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") -func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.LessOrEqualf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// Lessf asserts that the first element is less than the second -// -// assert.Lessf(t, 1, 2, "error message %s", "formatted") -// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") -// assert.Lessf(t, "a", "b", "error message %s", "formatted") -func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Lessf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// Negative asserts that the specified element is negative -// -// assert.Negative(t, -1) -// assert.Negative(t, -1.23) -func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Negative(t, e, msgAndArgs...) { - return - } - t.FailNow() -} - -// Negativef asserts that the specified element is negative -// -// assert.Negativef(t, -1, "error message %s", "formatted") -// assert.Negativef(t, -1.23, "error message %s", "formatted") -func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Negativef(t, e, msg, args...) { - return - } - t.FailNow() -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) -func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Never(t, condition, waitFor, tick, msgAndArgs...) { - return - } - t.FailNow() -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Neverf(t, condition, waitFor, tick, msg, args...) { - return - } - t.FailNow() -} - -// Nil asserts that the specified object is nil. -// -// assert.Nil(t, err) -func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Nil(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// Nilf asserts that the specified object is nil. -// -// assert.Nilf(t, err, "error message %s", "formatted") -func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Nilf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoDirExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoDirExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoError(t, err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func NoError(t TestingT, err error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoError(t, err, msgAndArgs...) { - return - } - t.FailNow() -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoErrorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func NoErrorf(t TestingT, err error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoErrorf(t, err, msg, args...) { - return - } - t.FailNow() -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoFileExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoFileExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContains(t, "Hello World", "Earth") -// assert.NotContains(t, ["Hello", "World"], "Earth") -// assert.NotContains(t, {"Hello": "World"}, "Earth") -func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotContains(t, s, contains, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") -func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotContainsf(t, s, contains, msg, args...) { - return - } - t.FailNow() -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } -func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEmpty(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEmptyf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// NotEqual asserts that the specified values are NOT equal. -// -// assert.NotEqual(t, obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqual(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// assert.NotEqualValues(t, obj1, obj2) -func NotEqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqualValues(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") -func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqualValuesf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqualf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// NotErrorIs asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorIs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotErrorIsf asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorIsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// NotNil asserts that the specified object is not nil. -// -// assert.NotNil(t, err) -func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotNil(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotNilf asserts that the specified object is not nil. -// -// assert.NotNilf(t, err, "error message %s", "formatted") -func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotNilf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanics(t, func(){ RemainCalm() }) -func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotPanics(t, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") -func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotPanicsf(t, f, msg, args...) { - return - } - t.FailNow() -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// assert.NotRegexp(t, "^start", "it's not starting") -func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotRegexp(t, rx, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") -func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotRegexpf(t, rx, str, msg, args...) { - return - } - t.FailNow() -} - -// NotSame asserts that two pointers do not reference the same object. -// -// assert.NotSame(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSame(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSame(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSamef(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSubset(t, list, subset, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSubsetf(t, list, subset, msg, args...) { - return - } - t.FailNow() -} - -// NotZero asserts that i is not the zero value for its type. -func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotZero(t, i, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotZerof asserts that i is not the zero value for its type. -func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotZerof(t, i, msg, args...) { - return - } - t.FailNow() -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panics(t, func(){ GoCrazy() }) -func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Panics(t, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithError(t, errString, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithErrorf(t, errString, f, msg, args...) { - return - } - t.FailNow() -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithValue(t, expected, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithValuef(t, expected, f, msg, args...) { - return - } - t.FailNow() -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") -func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Panicsf(t, f, msg, args...) { - return - } - t.FailNow() -} - -// Positive asserts that the specified element is positive -// -// assert.Positive(t, 1) -// assert.Positive(t, 1.23) -func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Positive(t, e, msgAndArgs...) { - return - } - t.FailNow() -} - -// Positivef asserts that the specified element is positive -// -// assert.Positivef(t, 1, "error message %s", "formatted") -// assert.Positivef(t, 1.23, "error message %s", "formatted") -func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Positivef(t, e, msg, args...) { - return - } - t.FailNow() -} - -// Regexp asserts that a specified regexp matches a string. -// -// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") -// assert.Regexp(t, "start...$", "it's not starting") -func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Regexp(t, rx, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// Regexpf asserts that a specified regexp matches a string. -// -// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") -func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Regexpf(t, rx, str, msg, args...) { - return - } - t.FailNow() -} - -// Same asserts that two pointers reference the same object. -// -// assert.Same(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Same(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Same(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// Samef asserts that two pointers reference the same object. -// -// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Samef(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Subset(t, list, subset, msgAndArgs...) { - return - } - t.FailNow() -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Subsetf(t, list, subset, msg, args...) { - return - } - t.FailNow() -} - -// True asserts that the specified value is true. -// -// assert.True(t, myBool) -func True(t TestingT, value bool, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.True(t, value, msgAndArgs...) { - return - } - t.FailNow() -} - -// Truef asserts that the specified value is true. -// -// assert.Truef(t, myBool, "error message %s", "formatted") -func Truef(t TestingT, value bool, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Truef(t, value, msg, args...) { - return - } - t.FailNow() -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) -func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinDurationf(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinRange(t, actual, start, end, msgAndArgs...) { - return - } - t.FailNow() -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinRangef(t, actual, start, end, msg, args...) { - return - } - t.FailNow() -} - -// YAMLEq asserts that two YAML strings are equivalent. -func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.YAMLEq(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.YAMLEqf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Zero asserts that i is the zero value for its type. -func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Zero(t, i, msgAndArgs...) { - return - } - t.FailNow() -} - -// Zerof asserts that i is the zero value for its type. -func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Zerof(t, i, msg, args...) { - return - } - t.FailNow() -} diff --git a/vendor/github.com/stretchr/testify/require/require.go.tmpl b/vendor/github.com/stretchr/testify/require/require.go.tmpl deleted file mode 100644 index 55e42dde..00000000 --- a/vendor/github.com/stretchr/testify/require/require.go.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{.Comment}} -func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { - if h, ok := t.(tHelper); ok { h.Helper() } - if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return } - t.FailNow() -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go b/vendor/github.com/stretchr/testify/require/require_forward.go deleted file mode 100644 index 960bf6f2..00000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go +++ /dev/null @@ -1,1515 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package require - -import ( - assert "github.com/stretchr/testify/assert" - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Condition(a.t, comp, msgAndArgs...) -} - -// Conditionf uses a Comparison to assert a complex condition. -func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Conditionf(a.t, comp, msg, args...) -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") -func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Contains(a.t, s, contains, msgAndArgs...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") -func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Containsf(a.t, s, contains, msg, args...) -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - DirExists(a.t, path, msgAndArgs...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - DirExistsf(a.t, path, msg, args...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) -func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ElementsMatchf(a.t, listA, listB, msg, args...) -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Empty(obj) -func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Empty(a.t, object, msgAndArgs...) -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Emptyf(obj, "error message %s", "formatted") -func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Emptyf(a.t, object, msg, args...) -} - -// Equal asserts that two objects are equal. -// -// a.Equal(123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Equal(a.t, expected, actual, msgAndArgs...) -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) -func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualError(a.t, theError, errString, msgAndArgs...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") -func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualErrorf(a.t, theError, errString, msg, args...) -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValues(uint32(123), int32(123)) -func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") -func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualValuesf(a.t, expected, actual, msg, args...) -} - -// Equalf asserts that two objects are equal. -// -// a.Equalf(123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Equalf(a.t, expected, actual, msg, args...) -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Error(err) { -// assert.Equal(t, expectedError, err) -// } -func (a *Assertions) Error(err error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Error(a.t, err, msgAndArgs...) -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorAs(a.t, err, target, msgAndArgs...) -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorAsf(a.t, err, target, msg, args...) -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContains(err, expectedErrorSubString) -func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorContains(a.t, theError, contains, msgAndArgs...) -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") -func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorContainsf(a.t, theError, contains, msg, args...) -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorIs(a.t, err, target, msgAndArgs...) -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorIsf(a.t, err, target, msg, args...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Errorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -func (a *Assertions) Errorf(err error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Errorf(a.t, err, msg, args...) -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Eventually(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Eventuallyf(a.t, condition, waitFor, tick, msg, args...) -} - -// Exactly asserts that two objects are equal in value and type. -// -// a.Exactly(int32(123), int64(123)) -func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Exactly(a.t, expected, actual, msgAndArgs...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") -func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Exactlyf(a.t, expected, actual, msg, args...) -} - -// Fail reports a failure through -func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Fail(a.t, failureMessage, msgAndArgs...) -} - -// FailNow fails test -func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FailNow(a.t, failureMessage, msgAndArgs...) -} - -// FailNowf fails test -func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FailNowf(a.t, failureMessage, msg, args...) -} - -// Failf reports a failure through -func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Failf(a.t, failureMessage, msg, args...) -} - -// False asserts that the specified value is false. -// -// a.False(myBool) -func (a *Assertions) False(value bool, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - False(a.t, value, msgAndArgs...) -} - -// Falsef asserts that the specified value is false. -// -// a.Falsef(myBool, "error message %s", "formatted") -func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Falsef(a.t, value, msg, args...) -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FileExists(a.t, path, msgAndArgs...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FileExistsf(a.t, path, msg, args...) -} - -// Greater asserts that the first element is greater than the second -// -// a.Greater(2, 1) -// a.Greater(float64(2), float64(1)) -// a.Greater("b", "a") -func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Greater(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqual(2, 1) -// a.GreaterOrEqual(2, 2) -// a.GreaterOrEqual("b", "a") -// a.GreaterOrEqual("b", "b") -func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - GreaterOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqualf(2, 1, "error message %s", "formatted") -// a.GreaterOrEqualf(2, 2, "error message %s", "formatted") -// a.GreaterOrEqualf("b", "a", "error message %s", "formatted") -// a.GreaterOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - GreaterOrEqualf(a.t, e1, e2, msg, args...) -} - -// Greaterf asserts that the first element is greater than the second -// -// a.Greaterf(2, 1, "error message %s", "formatted") -// a.Greaterf(float64(2), float64(1), "error message %s", "formatted") -// a.Greaterf("b", "a", "error message %s", "formatted") -func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Greaterf(a.t, e1, e2, msg, args...) -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPError(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPErrorf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPRedirectf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...) -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...) -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPSuccessf(a.t, handler, method, url, values, msg, args...) -} - -// Implements asserts that an object is implemented by the specified interface. -// -// a.Implements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Implements(a.t, interfaceObject, object, msgAndArgs...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Implementsf(a.t, interfaceObject, object, msg, args...) -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// a.InDelta(math.Pi, 22/7.0, 0.01) -func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDelta(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaSlicef(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaf(a.t, expected, actual, delta, msg, args...) -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilonf(a.t, expected, actual, epsilon, msg, args...) -} - -// IsDecreasing asserts that the collection is decreasing -// -// a.IsDecreasing([]int{2, 1, 0}) -// a.IsDecreasing([]float{2, 1}) -// a.IsDecreasing([]string{"b", "a"}) -func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsDecreasing(a.t, object, msgAndArgs...) -} - -// IsDecreasingf asserts that the collection is decreasing -// -// a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") -// a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsDecreasingf(a.t, object, msg, args...) -} - -// IsIncreasing asserts that the collection is increasing -// -// a.IsIncreasing([]int{1, 2, 3}) -// a.IsIncreasing([]float{1, 2}) -// a.IsIncreasing([]string{"a", "b"}) -func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsIncreasing(a.t, object, msgAndArgs...) -} - -// IsIncreasingf asserts that the collection is increasing -// -// a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") -// a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsIncreasingf(a.t, object, msg, args...) -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// a.IsNonDecreasing([]int{1, 1, 2}) -// a.IsNonDecreasing([]float{1, 2}) -// a.IsNonDecreasing([]string{"a", "b"}) -func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonDecreasing(a.t, object, msgAndArgs...) -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonDecreasingf(a.t, object, msg, args...) -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// a.IsNonIncreasing([]int{2, 1, 1}) -// a.IsNonIncreasing([]float{2, 1}) -// a.IsNonIncreasing([]string{"b", "a"}) -func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonIncreasing(a.t, object, msgAndArgs...) -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonIncreasingf(a.t, object, msg, args...) -} - -// IsType asserts that the specified objects are of the same type. -func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsType(a.t, expectedType, object, msgAndArgs...) -} - -// IsTypef asserts that the specified objects are of the same type. -func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsTypef(a.t, expectedType, object, msg, args...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - JSONEq(a.t, expected, actual, msgAndArgs...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - JSONEqf(a.t, expected, actual, msg, args...) -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// a.Len(mySlice, 3) -func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Len(a.t, object, length, msgAndArgs...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// a.Lenf(mySlice, 3, "error message %s", "formatted") -func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Lenf(a.t, object, length, msg, args...) -} - -// Less asserts that the first element is less than the second -// -// a.Less(1, 2) -// a.Less(float64(1), float64(2)) -// a.Less("a", "b") -func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Less(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// a.LessOrEqual(1, 2) -// a.LessOrEqual(2, 2) -// a.LessOrEqual("a", "b") -// a.LessOrEqual("b", "b") -func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - LessOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// a.LessOrEqualf(1, 2, "error message %s", "formatted") -// a.LessOrEqualf(2, 2, "error message %s", "formatted") -// a.LessOrEqualf("a", "b", "error message %s", "formatted") -// a.LessOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - LessOrEqualf(a.t, e1, e2, msg, args...) -} - -// Lessf asserts that the first element is less than the second -// -// a.Lessf(1, 2, "error message %s", "formatted") -// a.Lessf(float64(1), float64(2), "error message %s", "formatted") -// a.Lessf("a", "b", "error message %s", "formatted") -func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Lessf(a.t, e1, e2, msg, args...) -} - -// Negative asserts that the specified element is negative -// -// a.Negative(-1) -// a.Negative(-1.23) -func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Negative(a.t, e, msgAndArgs...) -} - -// Negativef asserts that the specified element is negative -// -// a.Negativef(-1, "error message %s", "formatted") -// a.Negativef(-1.23, "error message %s", "formatted") -func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Negativef(a.t, e, msg, args...) -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Never(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Neverf(a.t, condition, waitFor, tick, msg, args...) -} - -// Nil asserts that the specified object is nil. -// -// a.Nil(err) -func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Nil(a.t, object, msgAndArgs...) -} - -// Nilf asserts that the specified object is nil. -// -// a.Nilf(err, "error message %s", "formatted") -func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Nilf(a.t, object, msg, args...) -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoDirExists(a.t, path, msgAndArgs...) -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoDirExistsf(a.t, path, msg, args...) -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoError(a.t, err, msgAndArgs...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoErrorf(a.t, err, msg, args...) -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoFileExists(a.t, path, msgAndArgs...) -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoFileExistsf(a.t, path, msg, args...) -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") -func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotContains(a.t, s, contains, msgAndArgs...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") -func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotContainsf(a.t, s, contains, msg, args...) -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEmpty(a.t, object, msgAndArgs...) -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEmptyf(a.t, object, msg, args...) -} - -// NotEqual asserts that the specified values are NOT equal. -// -// a.NotEqual(obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqual(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValues(obj1, obj2) -func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqualValues(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") -func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqualValuesf(a.t, expected, actual, msg, args...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqualf(a.t, expected, actual, msg, args...) -} - -// NotErrorIs asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorIs(a.t, err, target, msgAndArgs...) -} - -// NotErrorIsf asserts that at none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorIsf(a.t, err, target, msg, args...) -} - -// NotNil asserts that the specified object is not nil. -// -// a.NotNil(err) -func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotNil(a.t, object, msgAndArgs...) -} - -// NotNilf asserts that the specified object is not nil. -// -// a.NotNilf(err, "error message %s", "formatted") -func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotNilf(a.t, object, msg, args...) -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanics(func(){ RemainCalm() }) -func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotPanics(a.t, f, msgAndArgs...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") -func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotPanicsf(a.t, f, msg, args...) -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") -func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotRegexp(a.t, rx, str, msgAndArgs...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") -func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotRegexpf(a.t, rx, str, msg, args...) -} - -// NotSame asserts that two pointers do not reference the same object. -// -// a.NotSame(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSame(a.t, expected, actual, msgAndArgs...) -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSamef(a.t, expected, actual, msg, args...) -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSubset(a.t, list, subset, msgAndArgs...) -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSubsetf(a.t, list, subset, msg, args...) -} - -// NotZero asserts that i is not the zero value for its type. -func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotZero(a.t, i, msgAndArgs...) -} - -// NotZerof asserts that i is not the zero value for its type. -func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotZerof(a.t, i, msg, args...) -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panics(func(){ GoCrazy() }) -func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Panics(a.t, f, msgAndArgs...) -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithError("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithError(a.t, errString, f, msgAndArgs...) -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithErrorf(a.t, errString, f, msg, args...) -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithValue(a.t, expected, f, msgAndArgs...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithValuef(a.t, expected, f, msg, args...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Panicsf(a.t, f, msg, args...) -} - -// Positive asserts that the specified element is positive -// -// a.Positive(1) -// a.Positive(1.23) -func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Positive(a.t, e, msgAndArgs...) -} - -// Positivef asserts that the specified element is positive -// -// a.Positivef(1, "error message %s", "formatted") -// a.Positivef(1.23, "error message %s", "formatted") -func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Positivef(a.t, e, msg, args...) -} - -// Regexp asserts that a specified regexp matches a string. -// -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") -func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Regexp(a.t, rx, str, msgAndArgs...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") -func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Regexpf(a.t, rx, str, msg, args...) -} - -// Same asserts that two pointers reference the same object. -// -// a.Same(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Same(a.t, expected, actual, msgAndArgs...) -} - -// Samef asserts that two pointers reference the same object. -// -// a.Samef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Samef(a.t, expected, actual, msg, args...) -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Subset(a.t, list, subset, msgAndArgs...) -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Subsetf(a.t, list, subset, msg, args...) -} - -// True asserts that the specified value is true. -// -// a.True(myBool) -func (a *Assertions) True(value bool, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - True(a.t, value, msgAndArgs...) -} - -// Truef asserts that the specified value is true. -// -// a.Truef(myBool, "error message %s", "formatted") -func (a *Assertions) Truef(value bool, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Truef(a.t, value, msg, args...) -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) -func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinDuration(a.t, expected, actual, delta, msgAndArgs...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinDurationf(a.t, expected, actual, delta, msg, args...) -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinRange(a.t, actual, start, end, msgAndArgs...) -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinRangef(a.t, actual, start, end, msg, args...) -} - -// YAMLEq asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - YAMLEq(a.t, expected, actual, msgAndArgs...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - YAMLEqf(a.t, expected, actual, msg, args...) -} - -// Zero asserts that i is the zero value for its type. -func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Zero(a.t, i, msgAndArgs...) -} - -// Zerof asserts that i is the zero value for its type. -func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Zerof(a.t, i, msg, args...) -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl b/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl deleted file mode 100644 index 54124df1..00000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { - if h, ok := a.t.(tHelper); ok { h.Helper() } - {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/require/requirements.go b/vendor/github.com/stretchr/testify/require/requirements.go deleted file mode 100644 index 91772dfe..00000000 --- a/vendor/github.com/stretchr/testify/require/requirements.go +++ /dev/null @@ -1,29 +0,0 @@ -package require - -// TestingT is an interface wrapper around *testing.T -type TestingT interface { - Errorf(format string, args ...interface{}) - FailNow() -} - -type tHelper interface { - Helper() -} - -// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful -// for table driven tests. -type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) - -// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful -// for table driven tests. -type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) - -// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful -// for table driven tests. -type BoolAssertionFunc func(TestingT, bool, ...interface{}) - -// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful -// for table driven tests. -type ErrorAssertionFunc func(TestingT, error, ...interface{}) - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/tcnksm/go-gitconfig/.gitignore b/vendor/github.com/tcnksm/go-gitconfig/.gitignore deleted file mode 100644 index 9ed3b07c..00000000 --- a/vendor/github.com/tcnksm/go-gitconfig/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.test diff --git a/vendor/github.com/tcnksm/go-gitconfig/CHANGELOG.md b/vendor/github.com/tcnksm/go-gitconfig/CHANGELOG.md deleted file mode 100644 index cb2fff5c..00000000 --- a/vendor/github.com/tcnksm/go-gitconfig/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -## 0.1.2 (2015-03-28) - -Add new functions - -### Added - -- `GithubUser()` extracts `github.user` ([**dstokes**](https://github.com/dstokes)), [#5](https://github.com/tcnksm/go-gitconfig/pull/5/commits) - -### Deprecated - -- Nothing - -### Removed - -- Nothing - -### Fixed - -- Nothing - - -## 0.1.1 (2014-10-28) - -Add new functions - -### Added - -- `GithubToken()` extracts `github.token` ([**@sona-tar**](https://github.com/sona-tar), [#3](https://github.com/tcnksm/go-gitconfig/pull/3)) -- `Entire()` try to extract value from entire git config. It's able to extract values from included config ([**@sona-tar**](https://github.com/sona-tar), [#3](https://github.com/tcnksm/go-gitconfig/pull/3)) - -### Deprecated - -- Nothing - -### Removed - -- Nothing - -### Fixed - -- Nothing - - -## 0.1.0 (2014-09-08) - -Initial release - -### Added - -- Fundamental features - -### Deprecated - -- Nothing - -### Removed - -- Nothing - -### Fixed - -- Nothing - - diff --git a/vendor/github.com/tcnksm/go-gitconfig/LICENSE b/vendor/github.com/tcnksm/go-gitconfig/LICENSE deleted file mode 100644 index 3457f256..00000000 --- a/vendor/github.com/tcnksm/go-gitconfig/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 tcnksm - -MIT License - -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. \ No newline at end of file diff --git a/vendor/github.com/tcnksm/go-gitconfig/README.md b/vendor/github.com/tcnksm/go-gitconfig/README.md deleted file mode 100644 index 70f1e72e..00000000 --- a/vendor/github.com/tcnksm/go-gitconfig/README.md +++ /dev/null @@ -1,84 +0,0 @@ -go-gitconfig -==== - -[![GitHub release](http://img.shields.io/github/release/tcnksm/go-gitconfig.svg?style=flat-square)][release] -[![Wercker](http://img.shields.io/wercker/ci/544ee33aea87f6374f001483.svg?style=flat-square)][wercker] -[![Coveralls](http://img.shields.io/coveralls/tcnksm/go-gitconfig.svg?style=flat-square)][coveralls] -[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license] -[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] - -[release]: https://github.com/tcnksm/go-gitconfig/releases -[wercker]: https://app.wercker.com/project/bykey/89c5a6e50a0daceec971ff5ce210164a -[coveralls]: https://coveralls.io/r/tcnksm/go-gitconfig -[license]: https://github.com/tcnksm/go-gitconfig/blob/master/LICENSE -[godocs]: http://godoc.org/github.com/tcnksm/go-gitconfig - - -`go-gitconfig` is a pacakge to use `gitconfig` values in Golang. - -Sometimes you want to extract username or its email address **implicitly** in your tool. -Now most of developer use `git`, so we can use its configuration variables. `go-gitconfig` is for that. - -`go-gitconfig` is very small, so it may not be included what you want to use. -If you want to use more git specific variable, check [Other](##VS). - -## Usage - -If you want to use git user name defined in `~/.gitconfig`: - -```go -username, err := gitconfig.Username() -``` - -Or git user email defined in `~/.gitconfig`: - -```go -email, err := gitconfig.Email() -``` - -Or, if you want to extract origin url of current project (from `.git/config`): - -```go -url, err := gitconfig.OriginURL() -``` - -You can also extract value by key: - -```go -editor, err := gitconfig.Global("core.editor") -``` - -```go -remote, err := gitconfig.Local("branch.master.remote") -``` - -See more details in document at [https://godoc.org/github.com/tcnksm/go-gitconfig](https://godoc.org/github.com/tcnksm/go-gitconfig). - -## Install - -To install, use `go get`: - -```bash -$ go get -d github.com/tcnksm/go-gitconfig -``` - -## VS. - -- [speedata/gogit](https://github.com/speedata/gogit) -- [libgit2/git2go](https://github.com/libgit2/git2go) - -These packages have many features to use git from golang. `go-gitconfig` is very simple alternative and focus to extract information from gitconfig. `go-gitconfig` is used in [tcnksm/ghr](https://github.com/tcnksm/ghr). - -## Contribution - -1. Fork ([https://github.com/tcnksm/go-gitconfig/fork](https://github.com/tcnksm/go-gitconfig/fork)) -1. Create a feature branch -1. Commit your changes -1. Rebase your local changes against the master branch -1. Run test suite with the `go test ./...` command and confirm that it passes -1. Run `gofmt -s` -1. Create new Pull Request - -## Author - -[tcnksm](https://github.com/tcnksm) diff --git a/vendor/github.com/tcnksm/go-gitconfig/gitconfig.go b/vendor/github.com/tcnksm/go-gitconfig/gitconfig.go deleted file mode 100644 index 46c6a10f..00000000 --- a/vendor/github.com/tcnksm/go-gitconfig/gitconfig.go +++ /dev/null @@ -1,113 +0,0 @@ -// Package gitconfig enables you to use `~/.gitconfig` values in Golang. -// -// For a full guide visit http://github.com/tcnksm/go-gitconfig -// -// package main -// -// import ( -// "github.com/tcnksm/go-gitconfig" -// "fmt" -// ) -// -// func main() { -// user, err := gitconfig.Global("user.name") -// if err == nil { -// fmt.Println(user) -// } -// } -// -package gitconfig - -import ( - "bytes" - "fmt" - "io/ioutil" - "os/exec" - "regexp" - "strings" - "syscall" -) - -// Entire extracts configuration value from `$HOME/.gitconfig` file , -// `$GIT_CONFIG`, /etc/gitconfig or include.path files. -func Entire(key string) (string, error) { - return execGitConfig(key) -} - -// Global extracts configuration value from `$HOME/.gitconfig` file or `$GIT_CONFIG`. -func Global(key string) (string, error) { - return execGitConfig("--global", key) -} - -// Local extracts configuration value from current project repository. -func Local(key string) (string, error) { - return execGitConfig("--local", key) -} - -// GithubUser extracts github.user name from `Entire gitconfig` -// This is same as Entire("github.user") -func GithubUser() (string, error) { - return Entire("github.user") -} - -// Username extracts git user name from `Entire gitconfig`. -// This is same as Entire("user.name") -func Username() (string, error) { - return Entire("user.name") -} - -// Email extracts git user email from `$HOME/.gitconfig` file or `$GIT_CONFIG`. -// This is same as Global("user.email") -func Email() (string, error) { - return Entire("user.email") -} - -// OriginURL extract remote origin url from current project repository. -// This is same as Local("remote.origin.url") -func OriginURL() (string, error) { - return Local("remote.origin.url") -} - -// Repository extract repository name of current project repository. -func Repository() (string, error) { - url, err := OriginURL() - if err != nil { - return "", err - } - - repo := retrieveRepoName(url) - return repo, nil -} - -// Github extracts github token from `Entire gitconfig`. -// This is same as Entire("github.token") -func GithubToken() (string, error) { - return Entire("github.token") -} - -func execGitConfig(args ...string) (string, error) { - gitArgs := append([]string{"config", "--get", "--null"}, args...) - var stdout bytes.Buffer - cmd := exec.Command("git", gitArgs...) - cmd.Stdout = &stdout - cmd.Stderr = ioutil.Discard - - err := cmd.Run() - if exitError, ok := err.(*exec.ExitError); ok { - if waitStatus, ok := exitError.Sys().(syscall.WaitStatus); ok { - if waitStatus.ExitStatus() == 1 { - return "", fmt.Errorf("the key `%s` is not found", args[len(args)-1]) - } - } - return "", err - } - - return strings.TrimRight(stdout.String(), "\000"), nil -} - -var RepoNameRegexp = regexp.MustCompile(`.+/([^/]+)(\.git)?$`) - -func retrieveRepoName(url string) string { - matched := RepoNameRegexp.FindStringSubmatch(url) - return strings.TrimSuffix(matched[1], ".git") -} diff --git a/vendor/github.com/tcnksm/go-gitconfig/wercker.yml b/vendor/github.com/tcnksm/go-gitconfig/wercker.yml deleted file mode 100644 index d5950686..00000000 --- a/vendor/github.com/tcnksm/go-gitconfig/wercker.yml +++ /dev/null @@ -1,20 +0,0 @@ -box: tcnksm/gox -build: - steps: - - setup-go-workspace - - script: - name: install latest git - code: | - sudo add-apt-repository -y ppa:git-core/ppa - sudo apt-get -y update - sudo apt-get -y install git - - script: - name: git version - code: | - git version - - script: - name: go get - code: | - go get -t ./... - - tcnksm/goveralls: - token: $COVERALLS_REPO_TOKEN \ No newline at end of file diff --git a/vendor/github.com/ulikunitz/xz/.gitignore b/vendor/github.com/ulikunitz/xz/.gitignore deleted file mode 100644 index eb3d5f51..00000000 --- a/vendor/github.com/ulikunitz/xz/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# .gitignore - -TODO.html -README.html - -lzma/writer.txt -lzma/reader.txt - -cmd/gxz/gxz -cmd/xb/xb - -# test executables -*.test - -# profile files -*.out - -# vim swap file -.*.swp - -# executables on windows -*.exe - -# default compression test file -enwik8* - -# file generated by example -example.xz \ No newline at end of file diff --git a/vendor/github.com/ulikunitz/xz/LICENSE b/vendor/github.com/ulikunitz/xz/LICENSE deleted file mode 100644 index 8a7f0877..00000000 --- a/vendor/github.com/ulikunitz/xz/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2014-2022 Ulrich Kunitz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* My name, Ulrich Kunitz, may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ulikunitz/xz/README.md b/vendor/github.com/ulikunitz/xz/README.md deleted file mode 100644 index 55471852..00000000 --- a/vendor/github.com/ulikunitz/xz/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Package xz - -This Go language package supports the reading and writing of xz -compressed streams. It includes also a gxz command for compressing and -decompressing data. The package is completely written in Go and doesn't -have any dependency on any C code. - -The package is currently under development. There might be bugs and APIs -are not considered stable. At this time the package cannot compete with -the xz tool regarding compression speed and size. The algorithms there -have been developed over a long time and are highly optimized. However -there are a number of improvements planned and I'm very optimistic about -parallel compression and decompression. Stay tuned! - -## Using the API - -The following example program shows how to use the API. - -```go -package main - -import ( - "bytes" - "io" - "log" - "os" - - "github.com/ulikunitz/xz" -) - -func main() { - const text = "The quick brown fox jumps over the lazy dog.\n" - var buf bytes.Buffer - // compress text - w, err := xz.NewWriter(&buf) - if err != nil { - log.Fatalf("xz.NewWriter error %s", err) - } - if _, err := io.WriteString(w, text); err != nil { - log.Fatalf("WriteString error %s", err) - } - if err := w.Close(); err != nil { - log.Fatalf("w.Close error %s", err) - } - // decompress buffer and write output to stdout - r, err := xz.NewReader(&buf) - if err != nil { - log.Fatalf("NewReader error %s", err) - } - if _, err = io.Copy(os.Stdout, r); err != nil { - log.Fatalf("io.Copy error %s", err) - } -} -``` - -## Documentation - -You can find the full documentation at [pkg.go.dev](https://pkg.go.dev/github.com/ulikunitz/xz). - -## Using the gxz compression tool - -The package includes a gxz command line utility for compression and -decompression. - -Use following command for installation: - - $ go get github.com/ulikunitz/xz/cmd/gxz - -To test it call the following command. - - $ gxz bigfile - -After some time a much smaller file bigfile.xz will replace bigfile. -To decompress it use the following command. - - $ gxz -d bigfile.xz - diff --git a/vendor/github.com/ulikunitz/xz/SECURITY.md b/vendor/github.com/ulikunitz/xz/SECURITY.md deleted file mode 100644 index 5f7ec01b..00000000 --- a/vendor/github.com/ulikunitz/xz/SECURITY.md +++ /dev/null @@ -1,10 +0,0 @@ -# Security Policy - -## Supported Versions - -Currently the last minor version v0.5.x is supported. - -## Reporting a Vulnerability - -Report a vulnerability by creating a Github issue at -. Expect a response in a week. diff --git a/vendor/github.com/ulikunitz/xz/TODO.md b/vendor/github.com/ulikunitz/xz/TODO.md deleted file mode 100644 index a3d6f192..00000000 --- a/vendor/github.com/ulikunitz/xz/TODO.md +++ /dev/null @@ -1,372 +0,0 @@ -# TODO list - -## Release v0.5.x - -1. Support check flag in gxz command. - -## Release v0.6 - -1. Review encoder and check for lzma improvements under xz. -2. Fix binary tree matcher. -3. Compare compression ratio with xz tool using comparable parameters and optimize parameters -4. rename operation action and make it a simple type of size 8 -5. make maxMatches, wordSize parameters -6. stop searching after a certain length is found (parameter sweetLen) - -## Release v0.7 - -1. Optimize code -2. Do statistical analysis to get linear presets. -3. Test sync.Pool compatability for xz and lzma Writer and Reader -4. Fuzz optimized code. - -## Release v0.8 - -1. Support parallel go routines for writing and reading xz files. -2. Support a ReaderAt interface for xz files with small block sizes. -3. Improve compatibility between gxz and xz -4. Provide manual page for gxz - -## Release v0.9 - -1. Improve documentation -2. Fuzz again - -## Release v1.0 - -1. Full functioning gxz -2. Add godoc URL to README.md (godoc.org) -3. Resolve all issues. -4. Define release candidates. -5. Public announcement. - -## Package lzma - -### v0.6 - -* Rewrite Encoder into a simple greedy one-op-at-a-time encoder including - * simple scan at the dictionary head for the same byte - * use the killer byte (requiring matches to get longer, the first test should be the byte that would make the match longer) - -## Optimizations - -* There may be a lot of false sharing in lzma. State; check whether this can be improved by reorganizing the internal structure of it. - -* Check whether batching encoding and decoding improves speed. - -### DAG optimizations - -* Use full buffer to create minimal bit-length above range encoder. -* Might be too slow (see v0.4) - -### Different match finders - -* hashes with 2, 3 characters additional to 4 characters -* binary trees with 2-7 characters (uint64 as key, use uint32 as - - pointers into a an array) - -* rb-trees with 2-7 characters (uint64 as key, use uint32 as pointers - - into an array with bit-steeling for the colors) - -## Release Procedure - -* execute goch -l for all packages; probably with lower param like 0.5. -* check orthography with gospell -* Write release notes in doc/relnotes. -* Update README.md -* xb copyright . in xz directory to ensure all new files have Copyright header -* `VERSION= go generate github.com/ulikunitz/xz/...` to update version files -* Execute test for Linux/amd64, Linux/x86 and Windows/amd64. -* Update TODO.md - write short log entry -* `git checkout master && git merge dev` -* `git tag -a ` -* `git push` - -## Log - -### 2022-12-12 - -Matt Dantay (@bodgit) reported an issue with the LZMA reader. The implementation -returned an error if the dictionary size was less than 4096 byte, but the -recommendation stated the actual used window size should be set to 4096 byte in -that case. It actually was the pull request -[#52](https://github.com/ulikunitz/xz/pull/52). The new patch v0.5.11 will fix -it. - -### 2021-02-02 - -Mituo Heijo has fuzzed xz and found a bug in the function readIndexBody. The -function allocated a slice of records immediately after reading the value -without further checks. Sincex the number has been too large the make function -did panic. The fix is to check the number against the expected number of records -before allocating the records. - -### 2020-12-17 - -Release v0.5.9 fixes warnings, a typo and adds SECURITY.md. - -One fix is interesting. - -```go -const ( - a byte = 0x1 - b = 0x2 -) -``` - -The constants a and b don't have the same type. Correct is - -```go -const ( - a byte = 0x1 - b byte = 0x2 -) -``` - -### 2020-08-19 - -Release v0.5.8 fixes issue -[issue #35](https://github.com/ulikunitz/xz/issues/35). - -### 2020-02-24 - -Release v0.5.7 supports the check-ID None and fixes -[issue #27](https://github.com/ulikunitz/xz/issues/27). - -### 2019-02-20 - -Release v0.5.6 supports the go.mod file. - -### 2018-10-28 - -Release v0.5.5 fixes issues #19 observing ErrLimit outputs. - -### 2017-06-05 - -Release v0.5.4 fixes issues #15 of another problem with the padding size -check for the xz block header. I removed the check completely. - -### 2017-02-15 - -Release v0.5.3 fixes issue #12 regarding the decompression of an empty -XZ stream. Many thanks to Tomasz Kłak, who reported the issue. - -### 2016-12-02 - -Release v0.5.2 became necessary to allow the decoding of xz files with -4-byte padding in the block header. Many thanks to Greg, who reported -the issue. - -### 2016-07-23 - -Release v0.5.1 became necessary to fix problems with 32-bit platforms. -Many thanks to Bruno Brigas, who reported the issue. - -### 2016-07-04 - -Release v0.5 provides improvements to the compressor and provides support for -the decompression of xz files with multiple xz streams. - -### 2016-01-31 - -Another compression rate increase by checking the byte at length of the -best match first, before checking the whole prefix. This makes the -compressor even faster. We have now a large time budget to beat the -compression ratio of the xz tool. For enwik8 we have now over 40 seconds -to reduce the compressed file size for another 7 MiB. - -### 2016-01-30 - -I simplified the encoder. Speed and compression rate increased -dramatically. A high compression rate affects also the decompression -speed. The approach with the buffer and optimizing for operation -compression rate has not been successful. Going for the maximum length -appears to be the best approach. - -### 2016-01-28 - -The release v0.4 is ready. It provides a working xz implementation, -which is rather slow, but works and is interoperable with the xz tool. -It is an important milestone. - -### 2016-01-10 - -I have the first working implementation of an xz reader and writer. I'm -happy about reaching this milestone. - -### 2015-12-02 - -I'm now ready to implement xz because, I have a working LZMA2 -implementation. I decided today that v0.4 will use the slow encoder -using the operations buffer to be able to go back, if I intend to do so. - -### 2015-10-21 - -I have restarted the work on the library. While trying to implement -LZMA2, I discovered that I need to resimplify the encoder and decoder -functions. The option approach is too complicated. Using a limited byte -writer and not caring for written bytes at all and not to try to handle -uncompressed data simplifies the LZMA encoder and decoder much. -Processing uncompressed data and handling limits is a feature of the -LZMA2 format not of LZMA. - -I learned an interesting method from the LZO format. If the last copy is -too far away they are moving the head one 2 bytes and not 1 byte to -reduce processing times. - -### 2015-08-26 - -I have now reimplemented the lzma package. The code is reasonably fast, -but can still be optimized. The next step is to implement LZMA2 and then -xz. - -### 2015-07-05 - -Created release v0.3. The version is the foundation for a full xz -implementation that is the target of v0.4. - -### 2015-06-11 - -The gflag package has been developed because I couldn't use flag and -pflag for a fully compatible support of gzip's and lzma's options. It -seems to work now quite nicely. - -### 2015-06-05 - -The overflow issue was interesting to research, however Henry S. Warren -Jr. Hacker's Delight book was very helpful as usual and had the issue -explained perfectly. Fefe's information on his website was based on the -C FAQ and quite bad, because it didn't address the issue of -MININT == -MININT. - -### 2015-06-04 - -It has been a productive day. I improved the interface of lzma. Reader -and lzma. Writer and fixed the error handling. - -### 2015-06-01 - -By computing the bit length of the LZMA operations I was able to -improve the greedy algorithm implementation. By using an 8 MByte buffer -the compression rate was not as good as for xz but already better then -gzip default. - -Compression is currently slow, but this is something we will be able to -improve over time. - -### 2015-05-26 - -Checked the license of ogier/pflag. The binary lzmago binary should -include the license terms for the pflag library. - -I added the endorsement clause as used by Google for the Go sources the -LICENSE file. - -### 2015-05-22 - -The package lzb contains now the basic implementation for creating or -reading LZMA byte streams. It allows the support for the implementation -of the DAG-shortest-path algorithm for the compression function. - -### 2015-04-23 - -Completed yesterday the lzbase classes. I'm a little bit concerned that -using the components may require too much code, but on the other hand -there is a lot of flexibility. - -### 2015-04-22 - -Implemented Reader and Writer during the Bayern game against Porto. The -second half gave me enough time. - -### 2015-04-21 - -While showering today morning I discovered that the design for OpEncoder -and OpDecoder doesn't work, because encoding/decoding might depend on -the current status of the dictionary. This is not exactly the right way -to start the day. - -Therefore we need to keep the Reader and Writer design. This time around -we simplify it by ignoring size limits. These can be added by wrappers -around the Reader and Writer interfaces. The Parameters type isn't -needed anymore. - -However I will implement a ReaderState and WriterState type to use -static typing to ensure the right State object is combined with the -right lzbase. Reader and lzbase. Writer. - -As a start I have implemented ReaderState and WriterState to ensure -that the state for reading is only used by readers and WriterState only -used by Writers. - -### 2015-04-20 - -Today I implemented the OpDecoder and tested OpEncoder and OpDecoder. - -### 2015-04-08 - -Came up with a new simplified design for lzbase. I implemented already -the type State that replaces OpCodec. - -### 2015-04-06 - -The new lzma package is now fully usable and lzmago is using it now. The -old lzma package has been completely removed. - -### 2015-04-05 - -Implemented lzma. Reader and tested it. - -### 2015-04-04 - -Implemented baseReader by adapting code form lzma. Reader. - -### 2015-04-03 - -The opCodec has been copied yesterday to lzma2. opCodec has a high -number of dependencies on other files in lzma2. Therefore I had to copy -almost all files from lzma. - -### 2015-03-31 - -Removed only a TODO item. - -However in Francesco Campoy's presentation "Go for Javaneros -(Javaïstes?)" is the the idea that using an embedded field E, all the -methods of E will be defined on T. If E is an interface T satisfies E. - - - -I have never used this, but it seems to be a cool idea. - -### 2015-03-30 - -Finished the type writerDict and wrote a simple test. - -### 2015-03-25 - -I started to implement the writerDict. - -### 2015-03-24 - -After thinking long about the LZMA2 code and several false starts, I -have now a plan to create a self-sufficient lzma2 package that supports -the classic LZMA format as well as LZMA2. The core idea is to support a -baseReader and baseWriter type that support the basic LZMA stream -without any headers. Both types must support the reuse of dictionaries -and the opCodec. - -### 2015-01-10 - -1. Implemented simple lzmago tool -2. Tested tool against large 4.4G file - * compression worked correctly; tested decompression with lzma - * decompression hits a full buffer condition -3. Fixed a bug in the compressor and wrote a test for it -4. Executed full cycle for 4.4 GB file; performance can be improved ;-) - -### 2015-01-11 - -* Release v0.2 because of the working LZMA encoder and decoder diff --git a/vendor/github.com/ulikunitz/xz/bits.go b/vendor/github.com/ulikunitz/xz/bits.go deleted file mode 100644 index b30f1ec9..00000000 --- a/vendor/github.com/ulikunitz/xz/bits.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xz - -import ( - "errors" - "io" -) - -// putUint32LE puts the little-endian representation of x into the first -// four bytes of p. -func putUint32LE(p []byte, x uint32) { - p[0] = byte(x) - p[1] = byte(x >> 8) - p[2] = byte(x >> 16) - p[3] = byte(x >> 24) -} - -// putUint64LE puts the little-endian representation of x into the first -// eight bytes of p. -func putUint64LE(p []byte, x uint64) { - p[0] = byte(x) - p[1] = byte(x >> 8) - p[2] = byte(x >> 16) - p[3] = byte(x >> 24) - p[4] = byte(x >> 32) - p[5] = byte(x >> 40) - p[6] = byte(x >> 48) - p[7] = byte(x >> 56) -} - -// uint32LE converts a little endian representation to an uint32 value. -func uint32LE(p []byte) uint32 { - return uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 | - uint32(p[3])<<24 -} - -// putUvarint puts a uvarint representation of x into the byte slice. -func putUvarint(p []byte, x uint64) int { - i := 0 - for x >= 0x80 { - p[i] = byte(x) | 0x80 - x >>= 7 - i++ - } - p[i] = byte(x) - return i + 1 -} - -// errOverflow indicates an overflow of the 64-bit unsigned integer. -var errOverflowU64 = errors.New("xz: uvarint overflows 64-bit unsigned integer") - -// readUvarint reads a uvarint from the given byte reader. -func readUvarint(r io.ByteReader) (x uint64, n int, err error) { - const maxUvarintLen = 10 - - var s uint - i := 0 - for { - b, err := r.ReadByte() - if err != nil { - return x, i, err - } - i++ - if i > maxUvarintLen { - return x, i, errOverflowU64 - } - if b < 0x80 { - if i == maxUvarintLen && b > 1 { - return x, i, errOverflowU64 - } - return x | uint64(b)< 0 { - k = 4 - k - } - return k -} - -/*** Header ***/ - -// headerMagic stores the magic bytes for the header -var headerMagic = []byte{0xfd, '7', 'z', 'X', 'Z', 0x00} - -// HeaderLen provides the length of the xz file header. -const HeaderLen = 12 - -// Constants for the checksum methods supported by xz. -const ( - None byte = 0x0 - CRC32 byte = 0x1 - CRC64 byte = 0x4 - SHA256 byte = 0xa -) - -// errInvalidFlags indicates that flags are invalid. -var errInvalidFlags = errors.New("xz: invalid flags") - -// verifyFlags returns the error errInvalidFlags if the value is -// invalid. -func verifyFlags(flags byte) error { - switch flags { - case None, CRC32, CRC64, SHA256: - return nil - default: - return errInvalidFlags - } -} - -// flagstrings maps flag values to strings. -var flagstrings = map[byte]string{ - None: "None", - CRC32: "CRC-32", - CRC64: "CRC-64", - SHA256: "SHA-256", -} - -// flagString returns the string representation for the given flags. -func flagString(flags byte) string { - s, ok := flagstrings[flags] - if !ok { - return "invalid" - } - return s -} - -// newHashFunc returns a function that creates hash instances for the -// hash method encoded in flags. -func newHashFunc(flags byte) (newHash func() hash.Hash, err error) { - switch flags { - case None: - newHash = newNoneHash - case CRC32: - newHash = newCRC32 - case CRC64: - newHash = newCRC64 - case SHA256: - newHash = sha256.New - default: - err = errInvalidFlags - } - return -} - -// header provides the actual content of the xz file header: the flags. -type header struct { - flags byte -} - -// Errors returned by readHeader. -var errHeaderMagic = errors.New("xz: invalid header magic bytes") - -// ValidHeader checks whether data is a correct xz file header. The -// length of data must be HeaderLen. -func ValidHeader(data []byte) bool { - var h header - err := h.UnmarshalBinary(data) - return err == nil -} - -// String returns a string representation of the flags. -func (h header) String() string { - return flagString(h.flags) -} - -// UnmarshalBinary reads header from the provided data slice. -func (h *header) UnmarshalBinary(data []byte) error { - // header length - if len(data) != HeaderLen { - return errors.New("xz: wrong file header length") - } - - // magic header - if !bytes.Equal(headerMagic, data[:6]) { - return errHeaderMagic - } - - // checksum - crc := crc32.NewIEEE() - crc.Write(data[6:8]) - if uint32LE(data[8:]) != crc.Sum32() { - return errors.New("xz: invalid checksum for file header") - } - - // stream flags - if data[6] != 0 { - return errInvalidFlags - } - flags := data[7] - if err := verifyFlags(flags); err != nil { - return err - } - - h.flags = flags - return nil -} - -// MarshalBinary generates the xz file header. -func (h *header) MarshalBinary() (data []byte, err error) { - if err = verifyFlags(h.flags); err != nil { - return nil, err - } - - data = make([]byte, 12) - copy(data, headerMagic) - data[7] = h.flags - - crc := crc32.NewIEEE() - crc.Write(data[6:8]) - putUint32LE(data[8:], crc.Sum32()) - - return data, nil -} - -/*** Footer ***/ - -// footerLen defines the length of the footer. -const footerLen = 12 - -// footerMagic contains the footer magic bytes. -var footerMagic = []byte{'Y', 'Z'} - -// footer represents the content of the xz file footer. -type footer struct { - indexSize int64 - flags byte -} - -// String prints a string representation of the footer structure. -func (f footer) String() string { - return fmt.Sprintf("%s index size %d", flagString(f.flags), f.indexSize) -} - -// Minimum and maximum for the size of the index (backward size). -const ( - minIndexSize = 4 - maxIndexSize = (1 << 32) * 4 -) - -// MarshalBinary converts footer values into an xz file footer. Note -// that the footer value is checked for correctness. -func (f *footer) MarshalBinary() (data []byte, err error) { - if err = verifyFlags(f.flags); err != nil { - return nil, err - } - if !(minIndexSize <= f.indexSize && f.indexSize <= maxIndexSize) { - return nil, errors.New("xz: index size out of range") - } - if f.indexSize%4 != 0 { - return nil, errors.New( - "xz: index size not aligned to four bytes") - } - - data = make([]byte, footerLen) - - // backward size (index size) - s := (f.indexSize / 4) - 1 - putUint32LE(data[4:], uint32(s)) - // flags - data[9] = f.flags - // footer magic - copy(data[10:], footerMagic) - - // CRC-32 - crc := crc32.NewIEEE() - crc.Write(data[4:10]) - putUint32LE(data, crc.Sum32()) - - return data, nil -} - -// UnmarshalBinary sets the footer value by unmarshalling an xz file -// footer. -func (f *footer) UnmarshalBinary(data []byte) error { - if len(data) != footerLen { - return errors.New("xz: wrong footer length") - } - - // magic bytes - if !bytes.Equal(data[10:], footerMagic) { - return errors.New("xz: footer magic invalid") - } - - // CRC-32 - crc := crc32.NewIEEE() - crc.Write(data[4:10]) - if uint32LE(data) != crc.Sum32() { - return errors.New("xz: footer checksum error") - } - - var g footer - // backward size (index size) - g.indexSize = (int64(uint32LE(data[4:])) + 1) * 4 - - // flags - if data[8] != 0 { - return errInvalidFlags - } - g.flags = data[9] - if err := verifyFlags(g.flags); err != nil { - return err - } - - *f = g - return nil -} - -/*** Block Header ***/ - -// blockHeader represents the content of an xz block header. -type blockHeader struct { - compressedSize int64 - uncompressedSize int64 - filters []filter -} - -// String converts the block header into a string. -func (h blockHeader) String() string { - var buf bytes.Buffer - first := true - if h.compressedSize >= 0 { - fmt.Fprintf(&buf, "compressed size %d", h.compressedSize) - first = false - } - if h.uncompressedSize >= 0 { - if !first { - buf.WriteString(" ") - } - fmt.Fprintf(&buf, "uncompressed size %d", h.uncompressedSize) - first = false - } - for _, f := range h.filters { - if !first { - buf.WriteString(" ") - } - fmt.Fprintf(&buf, "filter %s", f) - first = false - } - return buf.String() -} - -// Masks for the block flags. -const ( - filterCountMask = 0x03 - compressedSizePresent = 0x40 - uncompressedSizePresent = 0x80 - reservedBlockFlags = 0x3C -) - -// errIndexIndicator signals that an index indicator (0x00) has been found -// instead of an expected block header indicator. -var errIndexIndicator = errors.New("xz: found index indicator") - -// readBlockHeader reads the block header. -func readBlockHeader(r io.Reader) (h *blockHeader, n int, err error) { - var buf bytes.Buffer - buf.Grow(20) - - // block header size - z, err := io.CopyN(&buf, r, 1) - n = int(z) - if err != nil { - return nil, n, err - } - s := buf.Bytes()[0] - if s == 0 { - return nil, n, errIndexIndicator - } - - // read complete header - headerLen := (int(s) + 1) * 4 - buf.Grow(headerLen - 1) - z, err = io.CopyN(&buf, r, int64(headerLen-1)) - n += int(z) - if err != nil { - return nil, n, err - } - - // unmarshal block header - h = new(blockHeader) - if err = h.UnmarshalBinary(buf.Bytes()); err != nil { - return nil, n, err - } - - return h, n, nil -} - -// readSizeInBlockHeader reads the uncompressed or compressed size -// fields in the block header. The present value informs the function -// whether the respective field is actually present in the header. -func readSizeInBlockHeader(r io.ByteReader, present bool) (n int64, err error) { - if !present { - return -1, nil - } - x, _, err := readUvarint(r) - if err != nil { - return 0, err - } - if x >= 1<<63 { - return 0, errors.New("xz: size overflow in block header") - } - return int64(x), nil -} - -// UnmarshalBinary unmarshals the block header. -func (h *blockHeader) UnmarshalBinary(data []byte) error { - // Check header length - s := data[0] - if data[0] == 0 { - return errIndexIndicator - } - headerLen := (int(s) + 1) * 4 - if len(data) != headerLen { - return fmt.Errorf("xz: data length %d; want %d", len(data), - headerLen) - } - n := headerLen - 4 - - // Check CRC-32 - crc := crc32.NewIEEE() - crc.Write(data[:n]) - if crc.Sum32() != uint32LE(data[n:]) { - return errors.New("xz: checksum error for block header") - } - - // Block header flags - flags := data[1] - if flags&reservedBlockFlags != 0 { - return errors.New("xz: reserved block header flags set") - } - - r := bytes.NewReader(data[2:n]) - - // Compressed size - var err error - h.compressedSize, err = readSizeInBlockHeader( - r, flags&compressedSizePresent != 0) - if err != nil { - return err - } - - // Uncompressed size - h.uncompressedSize, err = readSizeInBlockHeader( - r, flags&uncompressedSizePresent != 0) - if err != nil { - return err - } - - h.filters, err = readFilters(r, int(flags&filterCountMask)+1) - if err != nil { - return err - } - - // Check padding - // Since headerLen is a multiple of 4 we don't need to check - // alignment. - k := r.Len() - // The standard spec says that the padding should have not more - // than 3 bytes. However we found paddings of 4 or 5 in the - // wild. See https://github.com/ulikunitz/xz/pull/11 and - // https://github.com/ulikunitz/xz/issues/15 - // - // The only reasonable approach seems to be to ignore the - // padding size. We still check that all padding bytes are zero. - if !allZeros(data[n-k : n]) { - return errPadding - } - return nil -} - -// MarshalBinary marshals the binary header. -func (h *blockHeader) MarshalBinary() (data []byte, err error) { - if !(minFilters <= len(h.filters) && len(h.filters) <= maxFilters) { - return nil, errors.New("xz: filter count wrong") - } - for i, f := range h.filters { - if i < len(h.filters)-1 { - if f.id() == lzmaFilterID { - return nil, errors.New( - "xz: LZMA2 filter is not the last") - } - } else { - // last filter - if f.id() != lzmaFilterID { - return nil, errors.New("xz: " + - "last filter must be the LZMA2 filter") - } - } - } - - var buf bytes.Buffer - // header size must set at the end - buf.WriteByte(0) - - // flags - flags := byte(len(h.filters) - 1) - if h.compressedSize >= 0 { - flags |= compressedSizePresent - } - if h.uncompressedSize >= 0 { - flags |= uncompressedSizePresent - } - buf.WriteByte(flags) - - p := make([]byte, 10) - if h.compressedSize >= 0 { - k := putUvarint(p, uint64(h.compressedSize)) - buf.Write(p[:k]) - } - if h.uncompressedSize >= 0 { - k := putUvarint(p, uint64(h.uncompressedSize)) - buf.Write(p[:k]) - } - - for _, f := range h.filters { - fp, err := f.MarshalBinary() - if err != nil { - return nil, err - } - buf.Write(fp) - } - - // padding - for i := padLen(int64(buf.Len())); i > 0; i-- { - buf.WriteByte(0) - } - - // crc place holder - buf.Write(p[:4]) - - data = buf.Bytes() - if len(data)%4 != 0 { - panic("data length not aligned") - } - s := len(data)/4 - 1 - if !(1 < s && s <= 255) { - panic("wrong block header size") - } - data[0] = byte(s) - - crc := crc32.NewIEEE() - crc.Write(data[:len(data)-4]) - putUint32LE(data[len(data)-4:], crc.Sum32()) - - return data, nil -} - -// Constants used for marshalling and unmarshalling filters in the xz -// block header. -const ( - minFilters = 1 - maxFilters = 4 - minReservedID = 1 << 62 -) - -// filter represents a filter in the block header. -type filter interface { - id() uint64 - UnmarshalBinary(data []byte) error - MarshalBinary() (data []byte, err error) - reader(r io.Reader, c *ReaderConfig) (fr io.Reader, err error) - writeCloser(w io.WriteCloser, c *WriterConfig) (fw io.WriteCloser, err error) - // filter must be last filter - last() bool -} - -// readFilter reads a block filter from the block header. At this point -// in time only the LZMA2 filter is supported. -func readFilter(r io.Reader) (f filter, err error) { - br := lzma.ByteReader(r) - - // index - id, _, err := readUvarint(br) - if err != nil { - return nil, err - } - - var data []byte - switch id { - case lzmaFilterID: - data = make([]byte, lzmaFilterLen) - data[0] = lzmaFilterID - if _, err = io.ReadFull(r, data[1:]); err != nil { - return nil, err - } - f = new(lzmaFilter) - default: - if id >= minReservedID { - return nil, errors.New( - "xz: reserved filter id in block stream header") - } - return nil, errors.New("xz: invalid filter id") - } - if err = f.UnmarshalBinary(data); err != nil { - return nil, err - } - return f, err -} - -// readFilters reads count filters. At this point in time only the count -// 1 is supported. -func readFilters(r io.Reader, count int) (filters []filter, err error) { - if count != 1 { - return nil, errors.New("xz: unsupported filter count") - } - f, err := readFilter(r) - if err != nil { - return nil, err - } - return []filter{f}, err -} - -/*** Index ***/ - -// record describes a block in the xz file index. -type record struct { - unpaddedSize int64 - uncompressedSize int64 -} - -// readRecord reads an index record. -func readRecord(r io.ByteReader) (rec record, n int, err error) { - u, k, err := readUvarint(r) - n += k - if err != nil { - return rec, n, err - } - rec.unpaddedSize = int64(u) - if rec.unpaddedSize < 0 { - return rec, n, errors.New("xz: unpadded size negative") - } - - u, k, err = readUvarint(r) - n += k - if err != nil { - return rec, n, err - } - rec.uncompressedSize = int64(u) - if rec.uncompressedSize < 0 { - return rec, n, errors.New("xz: uncompressed size negative") - } - - return rec, n, nil -} - -// MarshalBinary converts an index record in its binary encoding. -func (rec *record) MarshalBinary() (data []byte, err error) { - // maximum length of a uvarint is 10 - p := make([]byte, 20) - n := putUvarint(p, uint64(rec.unpaddedSize)) - n += putUvarint(p[n:], uint64(rec.uncompressedSize)) - return p[:n], nil -} - -// writeIndex writes the index, a sequence of records. -func writeIndex(w io.Writer, index []record) (n int64, err error) { - crc := crc32.NewIEEE() - mw := io.MultiWriter(w, crc) - - // index indicator - k, err := mw.Write([]byte{0}) - n += int64(k) - if err != nil { - return n, err - } - - // number of records - p := make([]byte, 10) - k = putUvarint(p, uint64(len(index))) - k, err = mw.Write(p[:k]) - n += int64(k) - if err != nil { - return n, err - } - - // list of records - for _, rec := range index { - p, err := rec.MarshalBinary() - if err != nil { - return n, err - } - k, err = mw.Write(p) - n += int64(k) - if err != nil { - return n, err - } - } - - // index padding - k, err = mw.Write(make([]byte, padLen(int64(n)))) - n += int64(k) - if err != nil { - return n, err - } - - // crc32 checksum - putUint32LE(p, crc.Sum32()) - k, err = w.Write(p[:4]) - n += int64(k) - - return n, err -} - -// readIndexBody reads the index from the reader. It assumes that the -// index indicator has already been read. -func readIndexBody(r io.Reader, expectedRecordLen int) (records []record, n int64, err error) { - crc := crc32.NewIEEE() - // index indicator - crc.Write([]byte{0}) - - br := lzma.ByteReader(io.TeeReader(r, crc)) - - // number of records - u, k, err := readUvarint(br) - n += int64(k) - if err != nil { - return nil, n, err - } - recLen := int(u) - if recLen < 0 || uint64(recLen) != u { - return nil, n, errors.New("xz: record number overflow") - } - if recLen != expectedRecordLen { - return nil, n, fmt.Errorf( - "xz: index length is %d; want %d", - recLen, expectedRecordLen) - } - - // list of records - records = make([]record, recLen) - for i := range records { - records[i], k, err = readRecord(br) - n += int64(k) - if err != nil { - return nil, n, err - } - } - - p := make([]byte, padLen(int64(n+1)), 4) - k, err = io.ReadFull(br.(io.Reader), p) - n += int64(k) - if err != nil { - return nil, n, err - } - if !allZeros(p) { - return nil, n, errors.New("xz: non-zero byte in index padding") - } - - // crc32 - s := crc.Sum32() - p = p[:4] - k, err = io.ReadFull(br.(io.Reader), p) - n += int64(k) - if err != nil { - return records, n, err - } - if uint32LE(p) != s { - return nil, n, errors.New("xz: wrong checksum for index") - } - - return records, n, nil -} diff --git a/vendor/github.com/ulikunitz/xz/fox-check-none.xz b/vendor/github.com/ulikunitz/xz/fox-check-none.xz deleted file mode 100644 index 46043f7d..00000000 Binary files a/vendor/github.com/ulikunitz/xz/fox-check-none.xz and /dev/null differ diff --git a/vendor/github.com/ulikunitz/xz/fox.xz b/vendor/github.com/ulikunitz/xz/fox.xz deleted file mode 100644 index 4b820bd5..00000000 Binary files a/vendor/github.com/ulikunitz/xz/fox.xz and /dev/null differ diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go b/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go deleted file mode 100644 index dae159db..00000000 --- a/vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package hash - -// CyclicPoly provides a cyclic polynomial rolling hash. -type CyclicPoly struct { - h uint64 - p []uint64 - i int -} - -// ror rotates the unsigned 64-bit integer to right. The argument s must be -// less than 64. -func ror(x uint64, s uint) uint64 { - return (x >> s) | (x << (64 - s)) -} - -// NewCyclicPoly creates a new instance of the CyclicPoly structure. The -// argument n gives the number of bytes for which a hash will be executed. -// This number must be positive; the method panics if this isn't the case. -func NewCyclicPoly(n int) *CyclicPoly { - if n < 1 { - panic("argument n must be positive") - } - return &CyclicPoly{p: make([]uint64, 0, n)} -} - -// Len returns the length of the byte sequence for which a hash is generated. -func (r *CyclicPoly) Len() int { - return cap(r.p) -} - -// RollByte hashes the next byte and returns a hash value. The complete becomes -// available after at least Len() bytes have been hashed. -func (r *CyclicPoly) RollByte(x byte) uint64 { - y := hash[x] - if len(r.p) < cap(r.p) { - r.h = ror(r.h, 1) ^ y - r.p = append(r.p, y) - } else { - r.h ^= ror(r.p[r.i], uint(cap(r.p)-1)) - r.h = ror(r.h, 1) ^ y - r.p[r.i] = y - r.i = (r.i + 1) % cap(r.p) - } - return r.h -} - -// Stores the hash for the individual bytes. -var hash = [256]uint64{ - 0x2e4fc3f904065142, 0xc790984cfbc99527, - 0x879f95eb8c62f187, 0x3b61be86b5021ef2, - 0x65a896a04196f0a5, 0xc5b307b80470b59e, - 0xd3bff376a70df14b, 0xc332f04f0b3f1701, - 0x753b5f0e9abf3e0d, 0xb41538fdfe66ef53, - 0x1906a10c2c1c0208, 0xfb0c712a03421c0d, - 0x38be311a65c9552b, 0xfee7ee4ca6445c7e, - 0x71aadeded184f21e, 0xd73426fccda23b2d, - 0x29773fb5fb9600b5, 0xce410261cd32981a, - 0xfe2848b3c62dbc2d, 0x459eaaff6e43e11c, - 0xc13e35fc9c73a887, 0xf30ed5c201e76dbc, - 0xa5f10b3910482cea, 0x2945d59be02dfaad, - 0x06ee334ff70571b5, 0xbabf9d8070f44380, - 0xee3e2e9912ffd27c, 0x2a7118d1ea6b8ea7, - 0x26183cb9f7b1664c, 0xea71dac7da068f21, - 0xea92eca5bd1d0bb7, 0x415595862defcd75, - 0x248a386023c60648, 0x9cf021ab284b3c8a, - 0xfc9372df02870f6c, 0x2b92d693eeb3b3fc, - 0x73e799d139dc6975, 0x7b15ae312486363c, - 0xb70e5454a2239c80, 0x208e3fb31d3b2263, - 0x01f563cabb930f44, 0x2ac4533d2a3240d8, - 0x84231ed1064f6f7c, 0xa9f020977c2a6d19, - 0x213c227271c20122, 0x09fe8a9a0a03d07a, - 0x4236dc75bcaf910c, 0x460a8b2bead8f17e, - 0xd9b27be1aa07055f, 0xd202d5dc4b11c33e, - 0x70adb010543bea12, 0xcdae938f7ea6f579, - 0x3f3d870208672f4d, 0x8e6ccbce9d349536, - 0xe4c0871a389095ae, 0xf5f2a49152bca080, - 0x9a43f9b97269934e, 0xc17b3753cb6f475c, - 0xd56d941e8e206bd4, 0xac0a4f3e525eda00, - 0xa06d5a011912a550, 0x5537ed19537ad1df, - 0xa32fe713d611449d, 0x2a1d05b47c3b579f, - 0x991d02dbd30a2a52, 0x39e91e7e28f93eb0, - 0x40d06adb3e92c9ac, 0x9b9d3afde1c77c97, - 0x9a3f3f41c02c616f, 0x22ecd4ba00f60c44, - 0x0b63d5d801708420, 0x8f227ca8f37ffaec, - 0x0256278670887c24, 0x107e14877dbf540b, - 0x32c19f2786ac1c05, 0x1df5b12bb4bc9c61, - 0xc0cac129d0d4c4e2, 0x9fdb52ee9800b001, - 0x31f601d5d31c48c4, 0x72ff3c0928bcaec7, - 0xd99264421147eb03, 0x535a2d6d38aefcfe, - 0x6ba8b4454a916237, 0xfa39366eaae4719c, - 0x10f00fd7bbb24b6f, 0x5bd23185c76c84d4, - 0xb22c3d7e1b00d33f, 0x3efc20aa6bc830a8, - 0xd61c2503fe639144, 0x30ce625441eb92d3, - 0xe5d34cf359e93100, 0xa8e5aa13f2b9f7a5, - 0x5c2b8d851ca254a6, 0x68fb6c5e8b0d5fdf, - 0xc7ea4872c96b83ae, 0x6dd5d376f4392382, - 0x1be88681aaa9792f, 0xfef465ee1b6c10d9, - 0x1f98b65ed43fcb2e, 0x4d1ca11eb6e9a9c9, - 0x7808e902b3857d0b, 0x171c9c4ea4607972, - 0x58d66274850146df, 0x42b311c10d3981d1, - 0x647fa8c621c41a4c, 0xf472771c66ddfedc, - 0x338d27e3f847b46b, 0x6402ce3da97545ce, - 0x5162db616fc38638, 0x9c83be97bc22a50e, - 0x2d3d7478a78d5e72, 0xe621a9b938fd5397, - 0x9454614eb0f81c45, 0x395fb6e742ed39b6, - 0x77dd9179d06037bf, 0xc478d0fee4d2656d, - 0x35d9d6cb772007af, 0x83a56e92c883f0f6, - 0x27937453250c00a1, 0x27bd6ebc3a46a97d, - 0x9f543bf784342d51, 0xd158f38c48b0ed52, - 0x8dd8537c045f66b4, 0x846a57230226f6d5, - 0x6b13939e0c4e7cdf, 0xfca25425d8176758, - 0x92e5fc6cd52788e6, 0x9992e13d7a739170, - 0x518246f7a199e8ea, 0xf104c2a71b9979c7, - 0x86b3ffaabea4768f, 0x6388061cf3e351ad, - 0x09d9b5295de5bbb5, 0x38bf1638c2599e92, - 0x1d759846499e148d, 0x4c0ff015e5f96ef4, - 0xa41a94cfa270f565, 0x42d76f9cb2326c0b, - 0x0cf385dd3c9c23ba, 0x0508a6c7508d6e7a, - 0x337523aabbe6cf8d, 0x646bb14001d42b12, - 0xc178729d138adc74, 0xf900ef4491f24086, - 0xee1a90d334bb5ac4, 0x9755c92247301a50, - 0xb999bf7c4ff1b610, 0x6aeeb2f3b21e8fc9, - 0x0fa8084cf91ac6ff, 0x10d226cf136e6189, - 0xd302057a07d4fb21, 0x5f03800e20a0fcc3, - 0x80118d4ae46bd210, 0x58ab61a522843733, - 0x51edd575c5432a4b, 0x94ee6ff67f9197f7, - 0x765669e0e5e8157b, 0xa5347830737132f0, - 0x3ba485a69f01510c, 0x0b247d7b957a01c3, - 0x1b3d63449fd807dc, 0x0fdc4721c30ad743, - 0x8b535ed3829b2b14, 0xee41d0cad65d232c, - 0xe6a99ed97a6a982f, 0x65ac6194c202003d, - 0x692accf3a70573eb, 0xcc3c02c3e200d5af, - 0x0d419e8b325914a3, 0x320f160f42c25e40, - 0x00710d647a51fe7a, 0x3c947692330aed60, - 0x9288aa280d355a7a, 0xa1806a9b791d1696, - 0x5d60e38496763da1, 0x6c69e22e613fd0f4, - 0x977fc2a5aadffb17, 0xfb7bd063fc5a94ba, - 0x460c17992cbaece1, 0xf7822c5444d3297f, - 0x344a9790c69b74aa, 0xb80a42e6cae09dce, - 0x1b1361eaf2b1e757, 0xd84c1e758e236f01, - 0x88e0b7be347627cc, 0x45246009b7a99490, - 0x8011c6dd3fe50472, 0xc341d682bffb99d7, - 0x2511be93808e2d15, 0xd5bc13d7fd739840, - 0x2a3cd030679ae1ec, 0x8ad9898a4b9ee157, - 0x3245fef0a8eaf521, 0x3d6d8dbbb427d2b0, - 0x1ed146d8968b3981, 0x0c6a28bf7d45f3fc, - 0x4a1fd3dbcee3c561, 0x4210ff6a476bf67e, - 0xa559cce0d9199aac, 0xde39d47ef3723380, - 0xe5b69d848ce42e35, 0xefa24296f8e79f52, - 0x70190b59db9a5afc, 0x26f166cdb211e7bf, - 0x4deaf2df3c6b8ef5, 0xf171dbdd670f1017, - 0xb9059b05e9420d90, 0x2f0da855c9388754, - 0x611d5e9ab77949cc, 0x2912038ac01163f4, - 0x0231df50402b2fba, 0x45660fc4f3245f58, - 0xb91cc97c7c8dac50, 0xb72d2aafe4953427, - 0xfa6463f87e813d6b, 0x4515f7ee95d5c6a2, - 0x1310e1c1a48d21c3, 0xad48a7810cdd8544, - 0x4d5bdfefd5c9e631, 0xa43ed43f1fdcb7de, - 0xe70cfc8fe1ee9626, 0xef4711b0d8dda442, - 0xb80dd9bd4dab6c93, 0xa23be08d31ba4d93, - 0x9b37db9d0335a39c, 0x494b6f870f5cfebc, - 0x6d1b3c1149dda943, 0x372c943a518c1093, - 0xad27af45e77c09c4, 0x3b6f92b646044604, - 0xac2917909f5fcf4f, 0x2069a60e977e5557, - 0x353a469e71014de5, 0x24be356281f55c15, - 0x2b6d710ba8e9adea, 0x404ad1751c749c29, - 0xed7311bf23d7f185, 0xba4f6976b4acc43e, - 0x32d7198d2bc39000, 0xee667019014d6e01, - 0x494ef3e128d14c83, 0x1f95a152baecd6be, - 0x201648dff1f483a5, 0x68c28550c8384af6, - 0x5fc834a6824a7f48, 0x7cd06cb7365eaf28, - 0xd82bbd95e9b30909, 0x234f0d1694c53f6d, - 0xd2fb7f4a96d83f4a, 0xff0d5da83acac05e, - 0xf8f6b97f5585080a, 0x74236084be57b95b, - 0xa25e40c03bbc36ad, 0x6b6e5c14ce88465b, - 0x4378ffe93e1528c5, 0x94ca92a17118e2d2, -} diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/doc.go b/vendor/github.com/ulikunitz/xz/internal/hash/doc.go deleted file mode 100644 index b4cf8b75..00000000 --- a/vendor/github.com/ulikunitz/xz/internal/hash/doc.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package hash provides rolling hashes. - -Rolling hashes have to be used for maintaining the positions of n-byte -sequences in the dictionary buffer. - -The package provides currently the Rabin-Karp rolling hash and a Cyclic -Polynomial hash. Both support the Hashes method to be used with an interface. -*/ -package hash diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go b/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go deleted file mode 100644 index 5322342e..00000000 --- a/vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package hash - -// A is the default constant for Robin-Karp rolling hash. This is a random -// prime. -const A = 0x97b548add41d5da1 - -// RabinKarp supports the computation of a rolling hash. -type RabinKarp struct { - A uint64 - // a^n - aOldest uint64 - h uint64 - p []byte - i int -} - -// NewRabinKarp creates a new RabinKarp value. The argument n defines the -// length of the byte sequence to be hashed. The default constant will will be -// used. -func NewRabinKarp(n int) *RabinKarp { - return NewRabinKarpConst(n, A) -} - -// NewRabinKarpConst creates a new RabinKarp value. The argument n defines the -// length of the byte sequence to be hashed. The argument a provides the -// constant used to compute the hash. -func NewRabinKarpConst(n int, a uint64) *RabinKarp { - if n <= 0 { - panic("number of bytes n must be positive") - } - aOldest := uint64(1) - // There are faster methods. For the small n required by the LZMA - // compressor O(n) is sufficient. - for i := 0; i < n; i++ { - aOldest *= a - } - return &RabinKarp{ - A: a, aOldest: aOldest, - p: make([]byte, 0, n), - } -} - -// Len returns the length of the byte sequence. -func (r *RabinKarp) Len() int { - return cap(r.p) -} - -// RollByte computes the hash after x has been added. -func (r *RabinKarp) RollByte(x byte) uint64 { - if len(r.p) < cap(r.p) { - r.h += uint64(x) - r.h *= r.A - r.p = append(r.p, x) - } else { - r.h -= uint64(r.p[r.i]) * r.aOldest - r.h += uint64(x) - r.h *= r.A - r.p[r.i] = x - r.i = (r.i + 1) % cap(r.p) - } - return r.h -} diff --git a/vendor/github.com/ulikunitz/xz/internal/hash/roller.go b/vendor/github.com/ulikunitz/xz/internal/hash/roller.go deleted file mode 100644 index a9898335..00000000 --- a/vendor/github.com/ulikunitz/xz/internal/hash/roller.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package hash - -// Roller provides an interface for rolling hashes. The hash value will become -// valid after hash has been called Len times. -type Roller interface { - Len() int - RollByte(x byte) uint64 -} - -// Hashes computes all hash values for the array p. Note that the state of the -// roller is changed. -func Hashes(r Roller, p []byte) []uint64 { - n := r.Len() - if len(p) < n { - return nil - } - h := make([]uint64, len(p)-n+1) - for i := 0; i < n-1; i++ { - r.RollByte(p[i]) - } - for i := range h { - h[i] = r.RollByte(p[i+n-1]) - } - return h -} diff --git a/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go b/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go deleted file mode 100644 index f4627ea1..00000000 --- a/vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package xlog provides a simple logging package that allows to disable -// certain message categories. It defines a type, Logger, with multiple -// methods for formatting output. The package has also a predefined -// 'standard' Logger accessible through helper function Print[f|ln], -// Fatal[f|ln], Panic[f|ln], Warn[f|ln], Print[f|ln] and Debug[f|ln] -// that are easier to use then creating a Logger manually. That logger -// writes to standard error and prints the date and time of each logged -// message, which can be configured using the function SetFlags. -// -// The Fatal functions call os.Exit(1) after the message is output -// unless not suppressed by the flags. The Panic functions call panic -// after the writing the log message unless suppressed. -package xlog - -import ( - "fmt" - "io" - "os" - "runtime" - "sync" - "time" -) - -// The flags define what information is prefixed to each log entry -// generated by the Logger. The Lno* versions allow the suppression of -// specific output. The bits are or'ed together to control what will be -// printed. There is no control over the order of the items printed and -// the format. The full format is: -// -// 2009-01-23 01:23:23.123123 /a/b/c/d.go:23: message -const ( - Ldate = 1 << iota // the date: 2009-01-23 - Ltime // the time: 01:23:23 - Lmicroseconds // microsecond resolution: 01:23:23.123123 - Llongfile // full file name and line number: /a/b/c/d.go:23 - Lshortfile // final file name element and line number: d.go:23 - Lnopanic // suppresses output from Panic[f|ln] but not the panic call - Lnofatal // suppresses output from Fatal[f|ln] but not the exit - Lnowarn // suppresses output from Warn[f|ln] - Lnoprint // suppresses output from Print[f|ln] - Lnodebug // suppresses output from Debug[f|ln] - // initial values for the standard logger - Lstdflags = Ldate | Ltime | Lnodebug -) - -// A Logger represents an active logging object that generates lines of -// output to an io.Writer. Each logging operation if not suppressed -// makes a single call to the Writer's Write method. A Logger can be -// used simultaneously from multiple goroutines; it guarantees to -// serialize access to the Writer. -type Logger struct { - mu sync.Mutex // ensures atomic writes; and protects the following - // fields - prefix string // prefix to write at beginning of each line - flag int // properties - out io.Writer // destination for output - buf []byte // for accumulating text to write -} - -// New creates a new Logger. The out argument sets the destination to -// which the log output will be written. The prefix appears at the -// beginning of each log line. The flag argument defines the logging -// properties. -func New(out io.Writer, prefix string, flag int) *Logger { - return &Logger{out: out, prefix: prefix, flag: flag} -} - -// std is the standard logger used by the package scope functions. -var std = New(os.Stderr, "", Lstdflags) - -// itoa converts the integer to ASCII. A negative widths will avoid -// zero-padding. The function supports only non-negative integers. -func itoa(buf *[]byte, i int, wid int) { - var u = uint(i) - if u == 0 && wid <= 1 { - *buf = append(*buf, '0') - return - } - var b [32]byte - bp := len(b) - for ; u > 0 || wid > 0; u /= 10 { - bp-- - wid-- - b[bp] = byte(u%10) + '0' - } - *buf = append(*buf, b[bp:]...) -} - -// formatHeader puts the header into the buf field of the buffer. -func (l *Logger) formatHeader(t time.Time, file string, line int) { - l.buf = append(l.buf, l.prefix...) - if l.flag&(Ldate|Ltime|Lmicroseconds) != 0 { - if l.flag&Ldate != 0 { - year, month, day := t.Date() - itoa(&l.buf, year, 4) - l.buf = append(l.buf, '-') - itoa(&l.buf, int(month), 2) - l.buf = append(l.buf, '-') - itoa(&l.buf, day, 2) - l.buf = append(l.buf, ' ') - } - if l.flag&(Ltime|Lmicroseconds) != 0 { - hour, min, sec := t.Clock() - itoa(&l.buf, hour, 2) - l.buf = append(l.buf, ':') - itoa(&l.buf, min, 2) - l.buf = append(l.buf, ':') - itoa(&l.buf, sec, 2) - if l.flag&Lmicroseconds != 0 { - l.buf = append(l.buf, '.') - itoa(&l.buf, t.Nanosecond()/1e3, 6) - } - l.buf = append(l.buf, ' ') - } - } - if l.flag&(Lshortfile|Llongfile) != 0 { - if l.flag&Lshortfile != 0 { - short := file - for i := len(file) - 1; i > 0; i-- { - if file[i] == '/' { - short = file[i+1:] - break - } - } - file = short - } - l.buf = append(l.buf, file...) - l.buf = append(l.buf, ':') - itoa(&l.buf, line, -1) - l.buf = append(l.buf, ": "...) - } -} - -func (l *Logger) output(calldepth int, now time.Time, s string) error { - var file string - var line int - if l.flag&(Lshortfile|Llongfile) != 0 { - l.mu.Unlock() - var ok bool - _, file, line, ok = runtime.Caller(calldepth) - if !ok { - file = "???" - line = 0 - } - l.mu.Lock() - } - l.buf = l.buf[:0] - l.formatHeader(now, file, line) - l.buf = append(l.buf, s...) - if len(s) == 0 || s[len(s)-1] != '\n' { - l.buf = append(l.buf, '\n') - } - _, err := l.out.Write(l.buf) - return err -} - -// Output writes the string s with the header controlled by the flags to -// the l.out writer. A newline will be appended if s doesn't end in a -// newline. Calldepth is used to recover the PC, although all current -// calls of Output use the call depth 2. Access to the function is serialized. -func (l *Logger) Output(calldepth, noflag int, v ...interface{}) error { - now := time.Now() - l.mu.Lock() - defer l.mu.Unlock() - if l.flag&noflag != 0 { - return nil - } - s := fmt.Sprint(v...) - return l.output(calldepth+1, now, s) -} - -// Outputf works like output but formats the output like Printf. -func (l *Logger) Outputf(calldepth int, noflag int, format string, v ...interface{}) error { - now := time.Now() - l.mu.Lock() - defer l.mu.Unlock() - if l.flag&noflag != 0 { - return nil - } - s := fmt.Sprintf(format, v...) - return l.output(calldepth+1, now, s) -} - -// Outputln works like output but formats the output like Println. -func (l *Logger) Outputln(calldepth int, noflag int, v ...interface{}) error { - now := time.Now() - l.mu.Lock() - defer l.mu.Unlock() - if l.flag&noflag != 0 { - return nil - } - s := fmt.Sprintln(v...) - return l.output(calldepth+1, now, s) -} - -// Panic prints the message like Print and calls panic. The printing -// might be suppressed by the flag Lnopanic. -func (l *Logger) Panic(v ...interface{}) { - l.Output(2, Lnopanic, v...) - s := fmt.Sprint(v...) - panic(s) -} - -// Panic prints the message like Print and calls panic. The printing -// might be suppressed by the flag Lnopanic. -func Panic(v ...interface{}) { - std.Output(2, Lnopanic, v...) - s := fmt.Sprint(v...) - panic(s) -} - -// Panicf prints the message like Printf and calls panic. The printing -// might be suppressed by the flag Lnopanic. -func (l *Logger) Panicf(format string, v ...interface{}) { - l.Outputf(2, Lnopanic, format, v...) - s := fmt.Sprintf(format, v...) - panic(s) -} - -// Panicf prints the message like Printf and calls panic. The printing -// might be suppressed by the flag Lnopanic. -func Panicf(format string, v ...interface{}) { - std.Outputf(2, Lnopanic, format, v...) - s := fmt.Sprintf(format, v...) - panic(s) -} - -// Panicln prints the message like Println and calls panic. The printing -// might be suppressed by the flag Lnopanic. -func (l *Logger) Panicln(v ...interface{}) { - l.Outputln(2, Lnopanic, v...) - s := fmt.Sprintln(v...) - panic(s) -} - -// Panicln prints the message like Println and calls panic. The printing -// might be suppressed by the flag Lnopanic. -func Panicln(v ...interface{}) { - std.Outputln(2, Lnopanic, v...) - s := fmt.Sprintln(v...) - panic(s) -} - -// Fatal prints the message like Print and calls os.Exit(1). The -// printing might be suppressed by the flag Lnofatal. -func (l *Logger) Fatal(v ...interface{}) { - l.Output(2, Lnofatal, v...) - os.Exit(1) -} - -// Fatal prints the message like Print and calls os.Exit(1). The -// printing might be suppressed by the flag Lnofatal. -func Fatal(v ...interface{}) { - std.Output(2, Lnofatal, v...) - os.Exit(1) -} - -// Fatalf prints the message like Printf and calls os.Exit(1). The -// printing might be suppressed by the flag Lnofatal. -func (l *Logger) Fatalf(format string, v ...interface{}) { - l.Outputf(2, Lnofatal, format, v...) - os.Exit(1) -} - -// Fatalf prints the message like Printf and calls os.Exit(1). The -// printing might be suppressed by the flag Lnofatal. -func Fatalf(format string, v ...interface{}) { - std.Outputf(2, Lnofatal, format, v...) - os.Exit(1) -} - -// Fatalln prints the message like Println and calls os.Exit(1). The -// printing might be suppressed by the flag Lnofatal. -func (l *Logger) Fatalln(format string, v ...interface{}) { - l.Outputln(2, Lnofatal, v...) - os.Exit(1) -} - -// Fatalln prints the message like Println and calls os.Exit(1). The -// printing might be suppressed by the flag Lnofatal. -func Fatalln(format string, v ...interface{}) { - std.Outputln(2, Lnofatal, v...) - os.Exit(1) -} - -// Warn prints the message like Print. The printing might be suppressed -// by the flag Lnowarn. -func (l *Logger) Warn(v ...interface{}) { - l.Output(2, Lnowarn, v...) -} - -// Warn prints the message like Print. The printing might be suppressed -// by the flag Lnowarn. -func Warn(v ...interface{}) { - std.Output(2, Lnowarn, v...) -} - -// Warnf prints the message like Printf. The printing might be suppressed -// by the flag Lnowarn. -func (l *Logger) Warnf(format string, v ...interface{}) { - l.Outputf(2, Lnowarn, format, v...) -} - -// Warnf prints the message like Printf. The printing might be suppressed -// by the flag Lnowarn. -func Warnf(format string, v ...interface{}) { - std.Outputf(2, Lnowarn, format, v...) -} - -// Warnln prints the message like Println. The printing might be suppressed -// by the flag Lnowarn. -func (l *Logger) Warnln(v ...interface{}) { - l.Outputln(2, Lnowarn, v...) -} - -// Warnln prints the message like Println. The printing might be suppressed -// by the flag Lnowarn. -func Warnln(v ...interface{}) { - std.Outputln(2, Lnowarn, v...) -} - -// Print prints the message like fmt.Print. The printing might be suppressed -// by the flag Lnoprint. -func (l *Logger) Print(v ...interface{}) { - l.Output(2, Lnoprint, v...) -} - -// Print prints the message like fmt.Print. The printing might be suppressed -// by the flag Lnoprint. -func Print(v ...interface{}) { - std.Output(2, Lnoprint, v...) -} - -// Printf prints the message like fmt.Printf. The printing might be suppressed -// by the flag Lnoprint. -func (l *Logger) Printf(format string, v ...interface{}) { - l.Outputf(2, Lnoprint, format, v...) -} - -// Printf prints the message like fmt.Printf. The printing might be suppressed -// by the flag Lnoprint. -func Printf(format string, v ...interface{}) { - std.Outputf(2, Lnoprint, format, v...) -} - -// Println prints the message like fmt.Println. The printing might be -// suppressed by the flag Lnoprint. -func (l *Logger) Println(v ...interface{}) { - l.Outputln(2, Lnoprint, v...) -} - -// Println prints the message like fmt.Println. The printing might be -// suppressed by the flag Lnoprint. -func Println(v ...interface{}) { - std.Outputln(2, Lnoprint, v...) -} - -// Debug prints the message like Print. The printing might be suppressed -// by the flag Lnodebug. -func (l *Logger) Debug(v ...interface{}) { - l.Output(2, Lnodebug, v...) -} - -// Debug prints the message like Print. The printing might be suppressed -// by the flag Lnodebug. -func Debug(v ...interface{}) { - std.Output(2, Lnodebug, v...) -} - -// Debugf prints the message like Printf. The printing might be suppressed -// by the flag Lnodebug. -func (l *Logger) Debugf(format string, v ...interface{}) { - l.Outputf(2, Lnodebug, format, v...) -} - -// Debugf prints the message like Printf. The printing might be suppressed -// by the flag Lnodebug. -func Debugf(format string, v ...interface{}) { - std.Outputf(2, Lnodebug, format, v...) -} - -// Debugln prints the message like Println. The printing might be suppressed -// by the flag Lnodebug. -func (l *Logger) Debugln(v ...interface{}) { - l.Outputln(2, Lnodebug, v...) -} - -// Debugln prints the message like Println. The printing might be suppressed -// by the flag Lnodebug. -func Debugln(v ...interface{}) { - std.Outputln(2, Lnodebug, v...) -} - -// Flags returns the current flags used by the logger. -func (l *Logger) Flags() int { - l.mu.Lock() - defer l.mu.Unlock() - return l.flag -} - -// Flags returns the current flags used by the standard logger. -func Flags() int { - return std.Flags() -} - -// SetFlags sets the flags of the logger. -func (l *Logger) SetFlags(flag int) { - l.mu.Lock() - defer l.mu.Unlock() - l.flag = flag -} - -// SetFlags sets the flags for the standard logger. -func SetFlags(flag int) { - std.SetFlags(flag) -} - -// Prefix returns the prefix used by the logger. -func (l *Logger) Prefix() string { - l.mu.Lock() - defer l.mu.Unlock() - return l.prefix -} - -// Prefix returns the prefix used by the standard logger of the package. -func Prefix() string { - return std.Prefix() -} - -// SetPrefix sets the prefix for the logger. -func (l *Logger) SetPrefix(prefix string) { - l.mu.Lock() - defer l.mu.Unlock() - l.prefix = prefix -} - -// SetPrefix sets the prefix of the standard logger of the package. -func SetPrefix(prefix string) { - std.SetPrefix(prefix) -} - -// SetOutput sets the output of the logger. -func (l *Logger) SetOutput(w io.Writer) { - l.mu.Lock() - defer l.mu.Unlock() - l.out = w -} - -// SetOutput sets the output for the standard logger of the package. -func SetOutput(w io.Writer) { - std.SetOutput(w) -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/bintree.go b/vendor/github.com/ulikunitz/xz/lzma/bintree.go deleted file mode 100644 index 2b39da6f..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/bintree.go +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "unicode" -) - -// node represents a node in the binary tree. -type node struct { - // x is the search value - x uint32 - // p parent node - p uint32 - // l left child - l uint32 - // r right child - r uint32 -} - -// wordLen is the number of bytes represented by the v field of a node. -const wordLen = 4 - -// binTree supports the identification of the next operation based on a -// binary tree. -// -// Nodes will be identified by their index into the ring buffer. -type binTree struct { - dict *encoderDict - // ring buffer of nodes - node []node - // absolute offset of the entry for the next node. Position 4 - // byte larger. - hoff int64 - // front position in the node ring buffer - front uint32 - // index of the root node - root uint32 - // current x value - x uint32 - // preallocated array - data []byte -} - -// null represents the nonexistent index. We can't use zero because it -// would always exist or we would need to decrease the index for each -// reference. -const null uint32 = 1<<32 - 1 - -// newBinTree initializes the binTree structure. The capacity defines -// the size of the buffer and defines the maximum distance for which -// matches will be found. -func newBinTree(capacity int) (t *binTree, err error) { - if capacity < 1 { - return nil, errors.New( - "newBinTree: capacity must be larger than zero") - } - if int64(capacity) >= int64(null) { - return nil, errors.New( - "newBinTree: capacity must less 2^{32}-1") - } - t = &binTree{ - node: make([]node, capacity), - hoff: -int64(wordLen), - root: null, - data: make([]byte, maxMatchLen), - } - return t, nil -} - -func (t *binTree) SetDict(d *encoderDict) { t.dict = d } - -// WriteByte writes a single byte into the binary tree. -func (t *binTree) WriteByte(c byte) error { - t.x = (t.x << 8) | uint32(c) - t.hoff++ - if t.hoff < 0 { - return nil - } - v := t.front - if int64(v) < t.hoff { - // We are overwriting old nodes stored in the tree. - t.remove(v) - } - t.node[v].x = t.x - t.add(v) - t.front++ - if int64(t.front) >= int64(len(t.node)) { - t.front = 0 - } - return nil -} - -// Writes writes a sequence of bytes into the binTree structure. -func (t *binTree) Write(p []byte) (n int, err error) { - for _, c := range p { - t.WriteByte(c) - } - return len(p), nil -} - -// add puts the node v into the tree. The node must not be part of the -// tree before. -func (t *binTree) add(v uint32) { - vn := &t.node[v] - // Set left and right to null indices. - vn.l, vn.r = null, null - // If the binary tree is empty make v the root. - if t.root == null { - t.root = v - vn.p = null - return - } - x := vn.x - p := t.root - // Search for the right leave link and add the new node. - for { - pn := &t.node[p] - if x <= pn.x { - if pn.l == null { - pn.l = v - vn.p = p - return - } - p = pn.l - } else { - if pn.r == null { - pn.r = v - vn.p = p - return - } - p = pn.r - } - } -} - -// parent returns the parent node index of v and the pointer to v value -// in the parent. -func (t *binTree) parent(v uint32) (p uint32, ptr *uint32) { - if t.root == v { - return null, &t.root - } - p = t.node[v].p - if t.node[p].l == v { - ptr = &t.node[p].l - } else { - ptr = &t.node[p].r - } - return -} - -// Remove node v. -func (t *binTree) remove(v uint32) { - vn := &t.node[v] - p, ptr := t.parent(v) - l, r := vn.l, vn.r - if l == null { - // Move the right child up. - *ptr = r - if r != null { - t.node[r].p = p - } - return - } - if r == null { - // Move the left child up. - *ptr = l - t.node[l].p = p - return - } - - // Search the in-order predecessor u. - un := &t.node[l] - ur := un.r - if ur == null { - // In order predecessor is l. Move it up. - un.r = r - t.node[r].p = l - un.p = p - *ptr = l - return - } - var u uint32 - for { - // Look for the max value in the tree where l is root. - u = ur - ur = t.node[u].r - if ur == null { - break - } - } - // replace u with ul - un = &t.node[u] - ul := un.l - up := un.p - t.node[up].r = ul - if ul != null { - t.node[ul].p = up - } - - // replace v by u - un.l, un.r = l, r - t.node[l].p = u - t.node[r].p = u - *ptr = u - un.p = p -} - -// search looks for the node that have the value x or for the nodes that -// brace it. The node highest in the tree with the value x will be -// returned. All other nodes with the same value live in left subtree of -// the returned node. -func (t *binTree) search(v uint32, x uint32) (a, b uint32) { - a, b = null, null - if v == null { - return - } - for { - vn := &t.node[v] - if x <= vn.x { - if x == vn.x { - return v, v - } - b = v - if vn.l == null { - return - } - v = vn.l - } else { - a = v - if vn.r == null { - return - } - v = vn.r - } - } -} - -// max returns the node with maximum value in the subtree with v as -// root. -func (t *binTree) max(v uint32) uint32 { - if v == null { - return null - } - for { - r := t.node[v].r - if r == null { - return v - } - v = r - } -} - -// min returns the node with the minimum value in the subtree with v as -// root. -func (t *binTree) min(v uint32) uint32 { - if v == null { - return null - } - for { - l := t.node[v].l - if l == null { - return v - } - v = l - } -} - -// pred returns the in-order predecessor of node v. -func (t *binTree) pred(v uint32) uint32 { - if v == null { - return null - } - u := t.max(t.node[v].l) - if u != null { - return u - } - for { - p := t.node[v].p - if p == null { - return null - } - if t.node[p].r == v { - return p - } - v = p - } -} - -// succ returns the in-order successor of node v. -func (t *binTree) succ(v uint32) uint32 { - if v == null { - return null - } - u := t.min(t.node[v].r) - if u != null { - return u - } - for { - p := t.node[v].p - if p == null { - return null - } - if t.node[p].l == v { - return p - } - v = p - } -} - -// xval converts the first four bytes of a into an 32-bit unsigned -// integer in big-endian order. -func xval(a []byte) uint32 { - var x uint32 - switch len(a) { - default: - x |= uint32(a[3]) - fallthrough - case 3: - x |= uint32(a[2]) << 8 - fallthrough - case 2: - x |= uint32(a[1]) << 16 - fallthrough - case 1: - x |= uint32(a[0]) << 24 - case 0: - } - return x -} - -// dumpX converts value x into a four-letter string. -func dumpX(x uint32) string { - a := make([]byte, 4) - for i := 0; i < 4; i++ { - c := byte(x >> uint((3-i)*8)) - if unicode.IsGraphic(rune(c)) { - a[i] = c - } else { - a[i] = '.' - } - } - return string(a) -} - -/* -// dumpNode writes a representation of the node v into the io.Writer. -func (t *binTree) dumpNode(w io.Writer, v uint32, indent int) { - if v == null { - return - } - - vn := &t.node[v] - - t.dumpNode(w, vn.r, indent+2) - - for i := 0; i < indent; i++ { - fmt.Fprint(w, " ") - } - if vn.p == null { - fmt.Fprintf(w, "node %d %q parent null\n", v, dumpX(vn.x)) - } else { - fmt.Fprintf(w, "node %d %q parent %d\n", v, dumpX(vn.x), vn.p) - } - - t.dumpNode(w, vn.l, indent+2) -} - -// dump prints a representation of the binary tree into the writer. -func (t *binTree) dump(w io.Writer) error { - bw := bufio.NewWriter(w) - t.dumpNode(bw, t.root, 0) - return bw.Flush() -} -*/ - -func (t *binTree) distance(v uint32) int { - dist := int(t.front) - int(v) - if dist <= 0 { - dist += len(t.node) - } - return dist -} - -type matchParams struct { - rep [4]uint32 - // length when match will be accepted - nAccept int - // nodes to check - check int - // finish if length get shorter - stopShorter bool -} - -func (t *binTree) match(m match, distIter func() (int, bool), p matchParams, -) (r match, checked int, accepted bool) { - buf := &t.dict.buf - for { - if checked >= p.check { - return m, checked, true - } - dist, ok := distIter() - if !ok { - return m, checked, false - } - checked++ - if m.n > 0 { - i := buf.rear - dist + m.n - 1 - if i < 0 { - i += len(buf.data) - } else if i >= len(buf.data) { - i -= len(buf.data) - } - if buf.data[i] != t.data[m.n-1] { - if p.stopShorter { - return m, checked, false - } - continue - } - } - n := buf.matchLen(dist, t.data) - switch n { - case 0: - if p.stopShorter { - return m, checked, false - } - continue - case 1: - if uint32(dist-minDistance) != p.rep[0] { - continue - } - } - if n < m.n || (n == m.n && int64(dist) >= m.distance) { - continue - } - m = match{int64(dist), n} - if n >= p.nAccept { - return m, checked, true - } - } -} - -func (t *binTree) NextOp(rep [4]uint32) operation { - // retrieve maxMatchLen data - n, _ := t.dict.buf.Peek(t.data[:maxMatchLen]) - if n == 0 { - panic("no data in buffer") - } - t.data = t.data[:n] - - var ( - m match - x, u, v uint32 - iterPred, iterSucc func() (int, bool) - ) - p := matchParams{ - rep: rep, - nAccept: maxMatchLen, - check: 32, - } - i := 4 - iterSmall := func() (dist int, ok bool) { - i-- - if i <= 0 { - return 0, false - } - return i, true - } - m, checked, accepted := t.match(m, iterSmall, p) - if accepted { - goto end - } - p.check -= checked - x = xval(t.data) - u, v = t.search(t.root, x) - if u == v && len(t.data) == 4 { - iter := func() (dist int, ok bool) { - if u == null { - return 0, false - } - dist = t.distance(u) - u, v = t.search(t.node[u].l, x) - if u != v { - u = null - } - return dist, true - } - m, _, _ = t.match(m, iter, p) - goto end - } - p.stopShorter = true - iterSucc = func() (dist int, ok bool) { - if v == null { - return 0, false - } - dist = t.distance(v) - v = t.succ(v) - return dist, true - } - m, checked, accepted = t.match(m, iterSucc, p) - if accepted { - goto end - } - p.check -= checked - iterPred = func() (dist int, ok bool) { - if u == null { - return 0, false - } - dist = t.distance(u) - u = t.pred(u) - return dist, true - } - m, _, _ = t.match(m, iterPred, p) -end: - if m.n == 0 { - return lit{t.data[0]} - } - return m -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/bitops.go b/vendor/github.com/ulikunitz/xz/lzma/bitops.go deleted file mode 100644 index 20109170..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/bitops.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -/* Naming conventions follows the CodeReviewComments in the Go Wiki. */ - -// ntz32Const is used by the functions NTZ and NLZ. -const ntz32Const = 0x04d7651f - -// ntz32Table is a helper table for de Bruijn algorithm by Danny Dubé. -// See Henry S. Warren, Jr. "Hacker's Delight" section 5-1 figure 5-26. -var ntz32Table = [32]int8{ - 0, 1, 2, 24, 3, 19, 6, 25, - 22, 4, 20, 10, 16, 7, 12, 26, - 31, 23, 18, 5, 21, 9, 15, 11, - 30, 17, 8, 14, 29, 13, 28, 27, -} - -/* -// ntz32 computes the number of trailing zeros for an unsigned 32-bit integer. -func ntz32(x uint32) int { - if x == 0 { - return 32 - } - x = (x & -x) * ntz32Const - return int(ntz32Table[x>>27]) -} -*/ - -// nlz32 computes the number of leading zeros for an unsigned 32-bit integer. -func nlz32(x uint32) int { - // Smear left most bit to the right - x |= x >> 1 - x |= x >> 2 - x |= x >> 4 - x |= x >> 8 - x |= x >> 16 - // Use ntz mechanism to calculate nlz. - x++ - if x == 0 { - return 0 - } - x *= ntz32Const - return 32 - int(ntz32Table[x>>27]) -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/breader.go b/vendor/github.com/ulikunitz/xz/lzma/breader.go deleted file mode 100644 index 9dfdf28b..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/breader.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "io" -) - -// breader provides the ReadByte function for a Reader. It doesn't read -// more data from the reader than absolutely necessary. -type breader struct { - io.Reader - // helper slice to save allocations - p []byte -} - -// ByteReader converts an io.Reader into an io.ByteReader. -func ByteReader(r io.Reader) io.ByteReader { - br, ok := r.(io.ByteReader) - if !ok { - return &breader{r, make([]byte, 1)} - } - return br -} - -// ReadByte read byte function. -func (r *breader) ReadByte() (c byte, err error) { - n, err := r.Reader.Read(r.p) - if n < 1 { - if err == nil { - err = errors.New("breader.ReadByte: no data") - } - return 0, err - } - return r.p[0], nil -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/buffer.go b/vendor/github.com/ulikunitz/xz/lzma/buffer.go deleted file mode 100644 index af41d5b2..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/buffer.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" -) - -// buffer provides a circular buffer of bytes. If the front index equals -// the rear index the buffer is empty. As a consequence front cannot be -// equal rear for a full buffer. So a full buffer has a length that is -// one byte less the the length of the data slice. -type buffer struct { - data []byte - front int - rear int -} - -// newBuffer creates a buffer with the given size. -func newBuffer(size int) *buffer { - return &buffer{data: make([]byte, size+1)} -} - -// Cap returns the capacity of the buffer. -func (b *buffer) Cap() int { - return len(b.data) - 1 -} - -// Resets the buffer. The front and rear index are set to zero. -func (b *buffer) Reset() { - b.front = 0 - b.rear = 0 -} - -// Buffered returns the number of bytes buffered. -func (b *buffer) Buffered() int { - delta := b.front - b.rear - if delta < 0 { - delta += len(b.data) - } - return delta -} - -// Available returns the number of bytes available for writing. -func (b *buffer) Available() int { - delta := b.rear - 1 - b.front - if delta < 0 { - delta += len(b.data) - } - return delta -} - -// addIndex adds a non-negative integer to the index i and returns the -// resulting index. The function takes care of wrapping the index as -// well as potential overflow situations. -func (b *buffer) addIndex(i int, n int) int { - // subtraction of len(b.data) prevents overflow - i += n - len(b.data) - if i < 0 { - i += len(b.data) - } - return i -} - -// Read reads bytes from the buffer into p and returns the number of -// bytes read. The function never returns an error but might return less -// data than requested. -func (b *buffer) Read(p []byte) (n int, err error) { - n, err = b.Peek(p) - b.rear = b.addIndex(b.rear, n) - return n, err -} - -// Peek reads bytes from the buffer into p without changing the buffer. -// Peek will never return an error but might return less data than -// requested. -func (b *buffer) Peek(p []byte) (n int, err error) { - m := b.Buffered() - n = len(p) - if m < n { - n = m - p = p[:n] - } - k := copy(p, b.data[b.rear:]) - if k < n { - copy(p[k:], b.data) - } - return n, nil -} - -// Discard skips the n next bytes to read from the buffer, returning the -// bytes discarded. -// -// If Discards skips fewer than n bytes, it returns an error. -func (b *buffer) Discard(n int) (discarded int, err error) { - if n < 0 { - return 0, errors.New("buffer.Discard: negative argument") - } - m := b.Buffered() - if m < n { - n = m - err = errors.New( - "buffer.Discard: discarded less bytes then requested") - } - b.rear = b.addIndex(b.rear, n) - return n, err -} - -// ErrNoSpace indicates that there is insufficient space for the Write -// operation. -var ErrNoSpace = errors.New("insufficient space") - -// Write puts data into the buffer. If less bytes are written than -// requested ErrNoSpace is returned. -func (b *buffer) Write(p []byte) (n int, err error) { - m := b.Available() - n = len(p) - if m < n { - n = m - p = p[:m] - err = ErrNoSpace - } - k := copy(b.data[b.front:], p) - if k < n { - copy(b.data, p[k:]) - } - b.front = b.addIndex(b.front, n) - return n, err -} - -// WriteByte writes a single byte into the buffer. The error ErrNoSpace -// is returned if no single byte is available in the buffer for writing. -func (b *buffer) WriteByte(c byte) error { - if b.Available() < 1 { - return ErrNoSpace - } - b.data[b.front] = c - b.front = b.addIndex(b.front, 1) - return nil -} - -// prefixLen returns the length of the common prefix of a and b. -func prefixLen(a, b []byte) int { - if len(a) > len(b) { - a, b = b, a - } - for i, c := range a { - if b[i] != c { - return i - } - } - return len(a) -} - -// matchLen returns the length of the common prefix for the given -// distance from the rear and the byte slice p. -func (b *buffer) matchLen(distance int, p []byte) int { - var n int - i := b.rear - distance - if i < 0 { - if n = prefixLen(p, b.data[len(b.data)+i:]); n < -i { - return n - } - p = p[n:] - i = 0 - } - n += prefixLen(p, b.data[i:]) - return n -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go b/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go deleted file mode 100644 index f27e31a4..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/bytewriter.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "io" -) - -// ErrLimit indicates that the limit of the LimitedByteWriter has been -// reached. -var ErrLimit = errors.New("limit reached") - -// LimitedByteWriter provides a byte writer that can be written until a -// limit is reached. The field N provides the number of remaining -// bytes. -type LimitedByteWriter struct { - BW io.ByteWriter - N int64 -} - -// WriteByte writes a single byte to the limited byte writer. It returns -// ErrLimit if the limit has been reached. If the byte is successfully -// written the field N of the LimitedByteWriter will be decremented by -// one. -func (l *LimitedByteWriter) WriteByte(c byte) error { - if l.N <= 0 { - return ErrLimit - } - if err := l.BW.WriteByte(c); err != nil { - return err - } - l.N-- - return nil -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/decoder.go b/vendor/github.com/ulikunitz/xz/lzma/decoder.go deleted file mode 100644 index 3765484e..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/decoder.go +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" - "io" -) - -// decoder decodes a raw LZMA stream without any header. -type decoder struct { - // dictionary; the rear pointer of the buffer will be used for - // reading the data. - Dict *decoderDict - // decoder state - State *state - // range decoder - rd *rangeDecoder - // start stores the head value of the dictionary for the LZMA - // stream - start int64 - // size of uncompressed data - size int64 - // end-of-stream encountered - eos bool - // EOS marker found - eosMarker bool -} - -// newDecoder creates a new decoder instance. The parameter size provides -// the expected byte size of the decompressed data. If the size is -// unknown use a negative value. In that case the decoder will look for -// a terminating end-of-stream marker. -func newDecoder(br io.ByteReader, state *state, dict *decoderDict, size int64) (d *decoder, err error) { - rd, err := newRangeDecoder(br) - if err != nil { - return nil, err - } - d = &decoder{ - State: state, - Dict: dict, - rd: rd, - size: size, - start: dict.pos(), - } - return d, nil -} - -// Reopen restarts the decoder with a new byte reader and a new size. Reopen -// resets the Decompressed counter to zero. -func (d *decoder) Reopen(br io.ByteReader, size int64) error { - var err error - if d.rd, err = newRangeDecoder(br); err != nil { - return err - } - d.start = d.Dict.pos() - d.size = size - d.eos = false - return nil -} - -// decodeLiteral decodes a single literal from the LZMA stream. -func (d *decoder) decodeLiteral() (op operation, err error) { - litState := d.State.litState(d.Dict.byteAt(1), d.Dict.head) - match := d.Dict.byteAt(int(d.State.rep[0]) + 1) - s, err := d.State.litCodec.Decode(d.rd, d.State.state, match, litState) - if err != nil { - return nil, err - } - return lit{s}, nil -} - -// errEOS indicates that an EOS marker has been found. -var errEOS = errors.New("EOS marker found") - -// readOp decodes the next operation from the compressed stream. It -// returns the operation. If an explicit end of stream marker is -// identified the eos error is returned. -func (d *decoder) readOp() (op operation, err error) { - // Value of the end of stream (EOS) marker - const eosDist = 1<<32 - 1 - - state, state2, posState := d.State.states(d.Dict.head) - - b, err := d.State.isMatch[state2].Decode(d.rd) - if err != nil { - return nil, err - } - if b == 0 { - // literal - op, err := d.decodeLiteral() - if err != nil { - return nil, err - } - d.State.updateStateLiteral() - return op, nil - } - b, err = d.State.isRep[state].Decode(d.rd) - if err != nil { - return nil, err - } - if b == 0 { - // simple match - d.State.rep[3], d.State.rep[2], d.State.rep[1] = - d.State.rep[2], d.State.rep[1], d.State.rep[0] - - d.State.updateStateMatch() - // The length decoder returns the length offset. - n, err := d.State.lenCodec.Decode(d.rd, posState) - if err != nil { - return nil, err - } - // The dist decoder returns the distance offset. The actual - // distance is 1 higher. - d.State.rep[0], err = d.State.distCodec.Decode(d.rd, n) - if err != nil { - return nil, err - } - if d.State.rep[0] == eosDist { - d.eosMarker = true - return nil, errEOS - } - op = match{n: int(n) + minMatchLen, - distance: int64(d.State.rep[0]) + minDistance} - return op, nil - } - b, err = d.State.isRepG0[state].Decode(d.rd) - if err != nil { - return nil, err - } - dist := d.State.rep[0] - if b == 0 { - // rep match 0 - b, err = d.State.isRepG0Long[state2].Decode(d.rd) - if err != nil { - return nil, err - } - if b == 0 { - d.State.updateStateShortRep() - op = match{n: 1, distance: int64(dist) + minDistance} - return op, nil - } - } else { - b, err = d.State.isRepG1[state].Decode(d.rd) - if err != nil { - return nil, err - } - if b == 0 { - dist = d.State.rep[1] - } else { - b, err = d.State.isRepG2[state].Decode(d.rd) - if err != nil { - return nil, err - } - if b == 0 { - dist = d.State.rep[2] - } else { - dist = d.State.rep[3] - d.State.rep[3] = d.State.rep[2] - } - d.State.rep[2] = d.State.rep[1] - } - d.State.rep[1] = d.State.rep[0] - d.State.rep[0] = dist - } - n, err := d.State.repLenCodec.Decode(d.rd, posState) - if err != nil { - return nil, err - } - d.State.updateStateRep() - op = match{n: int(n) + minMatchLen, distance: int64(dist) + minDistance} - return op, nil -} - -// apply takes the operation and transforms the decoder dictionary accordingly. -func (d *decoder) apply(op operation) error { - var err error - switch x := op.(type) { - case match: - err = d.Dict.writeMatch(x.distance, x.n) - case lit: - err = d.Dict.WriteByte(x.b) - default: - panic("op is neither a match nor a literal") - } - return err -} - -// decompress fills the dictionary unless no space for new data is -// available. If the end of the LZMA stream has been reached io.EOF will -// be returned. -func (d *decoder) decompress() error { - if d.eos { - return io.EOF - } - for d.Dict.Available() >= maxMatchLen { - op, err := d.readOp() - switch err { - case nil: - // break - case errEOS: - d.eos = true - if !d.rd.possiblyAtEnd() { - return errDataAfterEOS - } - if d.size >= 0 && d.size != d.Decompressed() { - return errSize - } - return io.EOF - case io.EOF: - d.eos = true - return io.ErrUnexpectedEOF - default: - return err - } - if err = d.apply(op); err != nil { - return err - } - if d.size >= 0 && d.Decompressed() >= d.size { - d.eos = true - if d.Decompressed() > d.size { - return errSize - } - if !d.rd.possiblyAtEnd() { - switch _, err = d.readOp(); err { - case nil: - return errSize - case io.EOF: - return io.ErrUnexpectedEOF - case errEOS: - break - default: - return err - } - } - return io.EOF - } - } - return nil -} - -// Errors that may be returned while decoding data. -var ( - errDataAfterEOS = errors.New("lzma: data after end of stream marker") - errSize = errors.New("lzma: wrong uncompressed data size") -) - -// Read reads data from the buffer. If no more data is available io.EOF is -// returned. -func (d *decoder) Read(p []byte) (n int, err error) { - var k int - for { - // Read of decoder dict never returns an error. - k, err = d.Dict.Read(p[n:]) - if err != nil { - panic(fmt.Errorf("dictionary read error %s", err)) - } - if k == 0 && d.eos { - return n, io.EOF - } - n += k - if n >= len(p) { - return n, nil - } - if err = d.decompress(); err != nil && err != io.EOF { - return n, err - } - } -} - -// Decompressed returns the number of bytes decompressed by the decoder. -func (d *decoder) Decompressed() int64 { - return d.Dict.pos() - d.start -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go b/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go deleted file mode 100644 index d5b814f0..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/decoderdict.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" -) - -// decoderDict provides the dictionary for the decoder. The whole -// dictionary is used as reader buffer. -type decoderDict struct { - buf buffer - head int64 -} - -// newDecoderDict creates a new decoder dictionary. The whole dictionary -// will be used as reader buffer. -func newDecoderDict(dictCap int) (d *decoderDict, err error) { - // lower limit supports easy test cases - if !(1 <= dictCap && int64(dictCap) <= MaxDictCap) { - return nil, errors.New("lzma: dictCap out of range") - } - d = &decoderDict{buf: *newBuffer(dictCap)} - return d, nil -} - -// Reset clears the dictionary. The read buffer is not changed, so the -// buffered data can still be read. -func (d *decoderDict) Reset() { - d.head = 0 -} - -// WriteByte writes a single byte into the dictionary. It is used to -// write literals into the dictionary. -func (d *decoderDict) WriteByte(c byte) error { - if err := d.buf.WriteByte(c); err != nil { - return err - } - d.head++ - return nil -} - -// pos returns the position of the dictionary head. -func (d *decoderDict) pos() int64 { return d.head } - -// dictLen returns the actual length of the dictionary. -func (d *decoderDict) dictLen() int { - capacity := d.buf.Cap() - if d.head >= int64(capacity) { - return capacity - } - return int(d.head) -} - -// byteAt returns a byte stored in the dictionary. If the distance is -// non-positive or exceeds the current length of the dictionary the zero -// byte is returned. -func (d *decoderDict) byteAt(dist int) byte { - if !(0 < dist && dist <= d.dictLen()) { - return 0 - } - i := d.buf.front - dist - if i < 0 { - i += len(d.buf.data) - } - return d.buf.data[i] -} - -// writeMatch writes the match at the top of the dictionary. The given -// distance must point in the current dictionary and the length must not -// exceed the maximum length 273 supported in LZMA. -// -// The error value ErrNoSpace indicates that no space is available in -// the dictionary for writing. You need to read from the dictionary -// first. -func (d *decoderDict) writeMatch(dist int64, length int) error { - if !(0 < dist && dist <= int64(d.dictLen())) { - return errors.New("writeMatch: distance out of range") - } - if !(0 < length && length <= maxMatchLen) { - return errors.New("writeMatch: length out of range") - } - if length > d.buf.Available() { - return ErrNoSpace - } - d.head += int64(length) - - i := d.buf.front - int(dist) - if i < 0 { - i += len(d.buf.data) - } - for length > 0 { - var p []byte - if i >= d.buf.front { - p = d.buf.data[i:] - i = 0 - } else { - p = d.buf.data[i:d.buf.front] - i = d.buf.front - } - if len(p) > length { - p = p[:length] - } - if _, err := d.buf.Write(p); err != nil { - panic(fmt.Errorf("d.buf.Write returned error %s", err)) - } - length -= len(p) - } - return nil -} - -// Write writes the given bytes into the dictionary and advances the -// head. -func (d *decoderDict) Write(p []byte) (n int, err error) { - n, err = d.buf.Write(p) - d.head += int64(n) - return n, err -} - -// Available returns the number of available bytes for writing into the -// decoder dictionary. -func (d *decoderDict) Available() int { return d.buf.Available() } - -// Read reads data from the buffer contained in the decoder dictionary. -func (d *decoderDict) Read(p []byte) (n int, err error) { return d.buf.Read(p) } diff --git a/vendor/github.com/ulikunitz/xz/lzma/directcodec.go b/vendor/github.com/ulikunitz/xz/lzma/directcodec.go deleted file mode 100644 index 76b71310..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/directcodec.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -// directCodec allows the encoding and decoding of values with a fixed number -// of bits. The number of bits must be in the range [1,32]. -type directCodec byte - -// Bits returns the number of bits supported by this codec. -func (dc directCodec) Bits() int { - return int(dc) -} - -// Encode uses the range encoder to encode a value with the fixed number of -// bits. The most-significant bit is encoded first. -func (dc directCodec) Encode(e *rangeEncoder, v uint32) error { - for i := int(dc) - 1; i >= 0; i-- { - if err := e.DirectEncodeBit(v >> uint(i)); err != nil { - return err - } - } - return nil -} - -// Decode uses the range decoder to decode a value with the given number of -// given bits. The most-significant bit is decoded first. -func (dc directCodec) Decode(d *rangeDecoder) (v uint32, err error) { - for i := int(dc) - 1; i >= 0; i-- { - x, err := d.DirectDecodeBit() - if err != nil { - return 0, err - } - v = (v << 1) | x - } - return v, nil -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/distcodec.go b/vendor/github.com/ulikunitz/xz/lzma/distcodec.go deleted file mode 100644 index b447d8ec..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/distcodec.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -// Constants used by the distance codec. -const ( - // minimum supported distance - minDistance = 1 - // maximum supported distance, value is used for the eos marker. - maxDistance = 1 << 32 - // number of the supported len states - lenStates = 4 - // start for the position models - startPosModel = 4 - // first index with align bits support - endPosModel = 14 - // bits for the position slots - posSlotBits = 6 - // number of align bits - alignBits = 4 -) - -// distCodec provides encoding and decoding of distance values. -type distCodec struct { - posSlotCodecs [lenStates]treeCodec - posModel [endPosModel - startPosModel]treeReverseCodec - alignCodec treeReverseCodec -} - -// deepcopy initializes dc as deep copy of the source. -func (dc *distCodec) deepcopy(src *distCodec) { - if dc == src { - return - } - for i := range dc.posSlotCodecs { - dc.posSlotCodecs[i].deepcopy(&src.posSlotCodecs[i]) - } - for i := range dc.posModel { - dc.posModel[i].deepcopy(&src.posModel[i]) - } - dc.alignCodec.deepcopy(&src.alignCodec) -} - -// newDistCodec creates a new distance codec. -func (dc *distCodec) init() { - for i := range dc.posSlotCodecs { - dc.posSlotCodecs[i] = makeTreeCodec(posSlotBits) - } - for i := range dc.posModel { - posSlot := startPosModel + i - bits := (posSlot >> 1) - 1 - dc.posModel[i] = makeTreeReverseCodec(bits) - } - dc.alignCodec = makeTreeReverseCodec(alignBits) -} - -// lenState converts the value l to a supported lenState value. -func lenState(l uint32) uint32 { - if l >= lenStates { - l = lenStates - 1 - } - return l -} - -// Encode encodes the distance using the parameter l. Dist can have values from -// the full range of uint32 values. To get the distance offset the actual match -// distance has to be decreased by 1. A distance offset of 0xffffffff (eos) -// indicates the end of the stream. -func (dc *distCodec) Encode(e *rangeEncoder, dist uint32, l uint32) (err error) { - // Compute the posSlot using nlz32 - var posSlot uint32 - var bits uint32 - if dist < startPosModel { - posSlot = dist - } else { - bits = uint32(30 - nlz32(dist)) - posSlot = startPosModel - 2 + (bits << 1) - posSlot += (dist >> uint(bits)) & 1 - } - - if err = dc.posSlotCodecs[lenState(l)].Encode(e, posSlot); err != nil { - return - } - - switch { - case posSlot < startPosModel: - return nil - case posSlot < endPosModel: - tc := &dc.posModel[posSlot-startPosModel] - return tc.Encode(dist, e) - } - dic := directCodec(bits - alignBits) - if err = dic.Encode(e, dist>>alignBits); err != nil { - return - } - return dc.alignCodec.Encode(dist, e) -} - -// Decode decodes the distance offset using the parameter l. The dist value -// 0xffffffff (eos) indicates the end of the stream. Add one to the distance -// offset to get the actual match distance. -func (dc *distCodec) Decode(d *rangeDecoder, l uint32) (dist uint32, err error) { - posSlot, err := dc.posSlotCodecs[lenState(l)].Decode(d) - if err != nil { - return - } - - // posSlot equals distance - if posSlot < startPosModel { - return posSlot, nil - } - - // posSlot uses the individual models - bits := (posSlot >> 1) - 1 - dist = (2 | (posSlot & 1)) << bits - var u uint32 - if posSlot < endPosModel { - tc := &dc.posModel[posSlot-startPosModel] - if u, err = tc.Decode(d); err != nil { - return 0, err - } - dist += u - return dist, nil - } - - // posSlots use direct encoding and a single model for the four align - // bits. - dic := directCodec(bits - alignBits) - if u, err = dic.Decode(d); err != nil { - return 0, err - } - dist += u << alignBits - if u, err = dc.alignCodec.Decode(d); err != nil { - return 0, err - } - dist += u - return dist, nil -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/encoder.go b/vendor/github.com/ulikunitz/xz/lzma/encoder.go deleted file mode 100644 index e4093831..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/encoder.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "fmt" - "io" -) - -// opLenMargin provides the upper limit of the number of bytes required -// to encode a single operation. -const opLenMargin = 16 - -// compressFlags control the compression process. -type compressFlags uint32 - -// Values for compressFlags. -const ( - // all data should be compressed, even if compression is not - // optimal. - all compressFlags = 1 << iota -) - -// encoderFlags provide the flags for an encoder. -type encoderFlags uint32 - -// Flags for the encoder. -const ( - // eosMarker requests an EOS marker to be written. - eosMarker encoderFlags = 1 << iota -) - -// Encoder compresses data buffered in the encoder dictionary and writes -// it into a byte writer. -type encoder struct { - dict *encoderDict - state *state - re *rangeEncoder - start int64 - // generate eos marker - marker bool - limit bool - margin int -} - -// newEncoder creates a new encoder. If the byte writer must be -// limited use LimitedByteWriter provided by this package. The flags -// argument supports the eosMarker flag, controlling whether a -// terminating end-of-stream marker must be written. -func newEncoder(bw io.ByteWriter, state *state, dict *encoderDict, - flags encoderFlags) (e *encoder, err error) { - - re, err := newRangeEncoder(bw) - if err != nil { - return nil, err - } - e = &encoder{ - dict: dict, - state: state, - re: re, - marker: flags&eosMarker != 0, - start: dict.Pos(), - margin: opLenMargin, - } - if e.marker { - e.margin += 5 - } - return e, nil -} - -// Write writes the bytes from p into the dictionary. If not enough -// space is available the data in the dictionary buffer will be -// compressed to make additional space available. If the limit of the -// underlying writer has been reached ErrLimit will be returned. -func (e *encoder) Write(p []byte) (n int, err error) { - for { - k, err := e.dict.Write(p[n:]) - n += k - if err == ErrNoSpace { - if err = e.compress(0); err != nil { - return n, err - } - continue - } - return n, err - } -} - -// Reopen reopens the encoder with a new byte writer. -func (e *encoder) Reopen(bw io.ByteWriter) error { - var err error - if e.re, err = newRangeEncoder(bw); err != nil { - return err - } - e.start = e.dict.Pos() - e.limit = false - return nil -} - -// writeLiteral writes a literal into the LZMA stream -func (e *encoder) writeLiteral(l lit) error { - var err error - state, state2, _ := e.state.states(e.dict.Pos()) - if err = e.state.isMatch[state2].Encode(e.re, 0); err != nil { - return err - } - litState := e.state.litState(e.dict.ByteAt(1), e.dict.Pos()) - match := e.dict.ByteAt(int(e.state.rep[0]) + 1) - err = e.state.litCodec.Encode(e.re, l.b, state, match, litState) - if err != nil { - return err - } - e.state.updateStateLiteral() - return nil -} - -// iverson implements the Iverson operator as proposed by Donald Knuth in his -// book Concrete Mathematics. -func iverson(ok bool) uint32 { - if ok { - return 1 - } - return 0 -} - -// writeMatch writes a repetition operation into the operation stream -func (e *encoder) writeMatch(m match) error { - var err error - if !(minDistance <= m.distance && m.distance <= maxDistance) { - panic(fmt.Errorf("match distance %d out of range", m.distance)) - } - dist := uint32(m.distance - minDistance) - if !(minMatchLen <= m.n && m.n <= maxMatchLen) && - !(dist == e.state.rep[0] && m.n == 1) { - panic(fmt.Errorf( - "match length %d out of range; dist %d rep[0] %d", - m.n, dist, e.state.rep[0])) - } - state, state2, posState := e.state.states(e.dict.Pos()) - if err = e.state.isMatch[state2].Encode(e.re, 1); err != nil { - return err - } - g := 0 - for ; g < 4; g++ { - if e.state.rep[g] == dist { - break - } - } - b := iverson(g < 4) - if err = e.state.isRep[state].Encode(e.re, b); err != nil { - return err - } - n := uint32(m.n - minMatchLen) - if b == 0 { - // simple match - e.state.rep[3], e.state.rep[2], e.state.rep[1], e.state.rep[0] = - e.state.rep[2], e.state.rep[1], e.state.rep[0], dist - e.state.updateStateMatch() - if err = e.state.lenCodec.Encode(e.re, n, posState); err != nil { - return err - } - return e.state.distCodec.Encode(e.re, dist, n) - } - b = iverson(g != 0) - if err = e.state.isRepG0[state].Encode(e.re, b); err != nil { - return err - } - if b == 0 { - // g == 0 - b = iverson(m.n != 1) - if err = e.state.isRepG0Long[state2].Encode(e.re, b); err != nil { - return err - } - if b == 0 { - e.state.updateStateShortRep() - return nil - } - } else { - // g in {1,2,3} - b = iverson(g != 1) - if err = e.state.isRepG1[state].Encode(e.re, b); err != nil { - return err - } - if b == 1 { - // g in {2,3} - b = iverson(g != 2) - err = e.state.isRepG2[state].Encode(e.re, b) - if err != nil { - return err - } - if b == 1 { - e.state.rep[3] = e.state.rep[2] - } - e.state.rep[2] = e.state.rep[1] - } - e.state.rep[1] = e.state.rep[0] - e.state.rep[0] = dist - } - e.state.updateStateRep() - return e.state.repLenCodec.Encode(e.re, n, posState) -} - -// writeOp writes a single operation to the range encoder. The function -// checks whether there is enough space available to close the LZMA -// stream. -func (e *encoder) writeOp(op operation) error { - if e.re.Available() < int64(e.margin) { - return ErrLimit - } - switch x := op.(type) { - case lit: - return e.writeLiteral(x) - case match: - return e.writeMatch(x) - default: - panic("unexpected operation") - } -} - -// compress compressed data from the dictionary buffer. If the flag all -// is set, all data in the dictionary buffer will be compressed. The -// function returns ErrLimit if the underlying writer has reached its -// limit. -func (e *encoder) compress(flags compressFlags) error { - n := 0 - if flags&all == 0 { - n = maxMatchLen - 1 - } - d := e.dict - m := d.m - for d.Buffered() > n { - op := m.NextOp(e.state.rep) - if err := e.writeOp(op); err != nil { - return err - } - d.Discard(op.Len()) - } - return nil -} - -// eosMatch is a pseudo operation that indicates the end of the stream. -var eosMatch = match{distance: maxDistance, n: minMatchLen} - -// Close terminates the LZMA stream. If requested the end-of-stream -// marker will be written. If the byte writer limit has been or will be -// reached during compression of the remaining data in the buffer the -// LZMA stream will be closed and data will remain in the buffer. -func (e *encoder) Close() error { - err := e.compress(all) - if err != nil && err != ErrLimit { - return err - } - if e.marker { - if err := e.writeMatch(eosMatch); err != nil { - return err - } - } - err = e.re.Close() - return err -} - -// Compressed returns the number bytes of the input data that been -// compressed. -func (e *encoder) Compressed() int64 { - return e.dict.Pos() - e.start -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go b/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go deleted file mode 100644 index 4b3916ea..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/encoderdict.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" - "io" -) - -// matcher is an interface that supports the identification of the next -// operation. -type matcher interface { - io.Writer - SetDict(d *encoderDict) - NextOp(rep [4]uint32) operation -} - -// encoderDict provides the dictionary of the encoder. It includes an -// additional buffer atop of the actual dictionary. -type encoderDict struct { - buf buffer - m matcher - head int64 - capacity int - // preallocated array - data [maxMatchLen]byte -} - -// newEncoderDict creates the encoder dictionary. The argument bufSize -// defines the size of the additional buffer. -func newEncoderDict(dictCap, bufSize int, m matcher) (d *encoderDict, err error) { - if !(1 <= dictCap && int64(dictCap) <= MaxDictCap) { - return nil, errors.New( - "lzma: dictionary capacity out of range") - } - if bufSize < 1 { - return nil, errors.New( - "lzma: buffer size must be larger than zero") - } - d = &encoderDict{ - buf: *newBuffer(dictCap + bufSize), - capacity: dictCap, - m: m, - } - m.SetDict(d) - return d, nil -} - -// Discard discards n bytes. Note that n must not be larger than -// MaxMatchLen. -func (d *encoderDict) Discard(n int) { - p := d.data[:n] - k, _ := d.buf.Read(p) - if k < n { - panic(fmt.Errorf("lzma: can't discard %d bytes", n)) - } - d.head += int64(n) - d.m.Write(p) -} - -// Len returns the data available in the encoder dictionary. -func (d *encoderDict) Len() int { - n := d.buf.Available() - if int64(n) > d.head { - return int(d.head) - } - return n -} - -// DictLen returns the actual length of data in the dictionary. -func (d *encoderDict) DictLen() int { - if d.head < int64(d.capacity) { - return int(d.head) - } - return d.capacity -} - -// Available returns the number of bytes that can be written by a -// following Write call. -func (d *encoderDict) Available() int { - return d.buf.Available() - d.DictLen() -} - -// Write writes data into the dictionary buffer. Note that the position -// of the dictionary head will not be moved. If there is not enough -// space in the buffer ErrNoSpace will be returned. -func (d *encoderDict) Write(p []byte) (n int, err error) { - m := d.Available() - if len(p) > m { - p = p[:m] - err = ErrNoSpace - } - var e error - if n, e = d.buf.Write(p); e != nil { - err = e - } - return n, err -} - -// Pos returns the position of the head. -func (d *encoderDict) Pos() int64 { return d.head } - -// ByteAt returns the byte at the given distance. -func (d *encoderDict) ByteAt(distance int) byte { - if !(0 < distance && distance <= d.Len()) { - return 0 - } - i := d.buf.rear - distance - if i < 0 { - i += len(d.buf.data) - } - return d.buf.data[i] -} - -// CopyN copies the last n bytes from the dictionary into the provided -// writer. This is used for copying uncompressed data into an -// uncompressed segment. -func (d *encoderDict) CopyN(w io.Writer, n int) (written int, err error) { - if n <= 0 { - return 0, nil - } - m := d.Len() - if n > m { - n = m - err = ErrNoSpace - } - i := d.buf.rear - n - var e error - if i < 0 { - i += len(d.buf.data) - if written, e = w.Write(d.buf.data[i:]); e != nil { - return written, e - } - i = 0 - } - var k int - k, e = w.Write(d.buf.data[i:d.buf.rear]) - written += k - if e != nil { - err = e - } - return written, err -} - -// Buffered returns the number of bytes in the buffer. -func (d *encoderDict) Buffered() int { return d.buf.Buffered() } diff --git a/vendor/github.com/ulikunitz/xz/lzma/fox.lzma b/vendor/github.com/ulikunitz/xz/lzma/fox.lzma deleted file mode 100644 index 5edad633..00000000 Binary files a/vendor/github.com/ulikunitz/xz/lzma/fox.lzma and /dev/null differ diff --git a/vendor/github.com/ulikunitz/xz/lzma/hashtable.go b/vendor/github.com/ulikunitz/xz/lzma/hashtable.go deleted file mode 100644 index f66e9cdd..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/hashtable.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" - - "github.com/ulikunitz/xz/internal/hash" -) - -/* For compression we need to find byte sequences that match the byte - * sequence at the dictionary head. A hash table is a simple method to - * provide this capability. - */ - -// maxMatches limits the number of matches requested from the Matches -// function. This controls the speed of the overall encoding. -const maxMatches = 16 - -// shortDists defines the number of short distances supported by the -// implementation. -const shortDists = 8 - -// The minimum is somehow arbitrary but the maximum is limited by the -// memory requirements of the hash table. -const ( - minTableExponent = 9 - maxTableExponent = 20 -) - -// newRoller contains the function used to create an instance of the -// hash.Roller. -var newRoller = func(n int) hash.Roller { return hash.NewCyclicPoly(n) } - -// hashTable stores the hash table including the rolling hash method. -// -// We implement chained hashing into a circular buffer. Each entry in -// the circular buffer stores the delta distance to the next position with a -// word that has the same hash value. -type hashTable struct { - dict *encoderDict - // actual hash table - t []int64 - // circular list data with the offset to the next word - data []uint32 - front int - // mask for computing the index for the hash table - mask uint64 - // hash offset; initial value is -int64(wordLen) - hoff int64 - // length of the hashed word - wordLen int - // hash roller for computing the hash values for the Write - // method - wr hash.Roller - // hash roller for computing arbitrary hashes - hr hash.Roller - // preallocated slices - p [maxMatches]int64 - distances [maxMatches + shortDists]int -} - -// hashTableExponent derives the hash table exponent from the dictionary -// capacity. -func hashTableExponent(n uint32) int { - e := 30 - nlz32(n) - switch { - case e < minTableExponent: - e = minTableExponent - case e > maxTableExponent: - e = maxTableExponent - } - return e -} - -// newHashTable creates a new hash table for words of length wordLen -func newHashTable(capacity int, wordLen int) (t *hashTable, err error) { - if !(0 < capacity) { - return nil, errors.New( - "newHashTable: capacity must not be negative") - } - exp := hashTableExponent(uint32(capacity)) - if !(1 <= wordLen && wordLen <= 4) { - return nil, errors.New("newHashTable: " + - "argument wordLen out of range") - } - n := 1 << uint(exp) - if n <= 0 { - panic("newHashTable: exponent is too large") - } - t = &hashTable{ - t: make([]int64, n), - data: make([]uint32, capacity), - mask: (uint64(1) << uint(exp)) - 1, - hoff: -int64(wordLen), - wordLen: wordLen, - wr: newRoller(wordLen), - hr: newRoller(wordLen), - } - return t, nil -} - -func (t *hashTable) SetDict(d *encoderDict) { t.dict = d } - -// buffered returns the number of bytes that are currently hashed. -func (t *hashTable) buffered() int { - n := t.hoff + 1 - switch { - case n <= 0: - return 0 - case n >= int64(len(t.data)): - return len(t.data) - } - return int(n) -} - -// addIndex adds n to an index ensuring that is stays inside the -// circular buffer for the hash chain. -func (t *hashTable) addIndex(i, n int) int { - i += n - len(t.data) - if i < 0 { - i += len(t.data) - } - return i -} - -// putDelta puts the delta instance at the current front of the circular -// chain buffer. -func (t *hashTable) putDelta(delta uint32) { - t.data[t.front] = delta - t.front = t.addIndex(t.front, 1) -} - -// putEntry puts a new entry into the hash table. If there is already a -// value stored it is moved into the circular chain buffer. -func (t *hashTable) putEntry(h uint64, pos int64) { - if pos < 0 { - return - } - i := h & t.mask - old := t.t[i] - 1 - t.t[i] = pos + 1 - var delta int64 - if old >= 0 { - delta = pos - old - if delta > 1<<32-1 || delta > int64(t.buffered()) { - delta = 0 - } - } - t.putDelta(uint32(delta)) -} - -// WriteByte converts a single byte into a hash and puts them into the hash -// table. -func (t *hashTable) WriteByte(b byte) error { - h := t.wr.RollByte(b) - t.hoff++ - t.putEntry(h, t.hoff) - return nil -} - -// Write converts the bytes provided into hash tables and stores the -// abbreviated offsets into the hash table. The method will never return an -// error. -func (t *hashTable) Write(p []byte) (n int, err error) { - for _, b := range p { - // WriteByte doesn't generate an error. - t.WriteByte(b) - } - return len(p), nil -} - -// getMatches the matches for a specific hash. The functions returns the -// number of positions found. -// -// TODO: Make a getDistances because that we are actually interested in. -func (t *hashTable) getMatches(h uint64, positions []int64) (n int) { - if t.hoff < 0 || len(positions) == 0 { - return 0 - } - buffered := t.buffered() - tailPos := t.hoff + 1 - int64(buffered) - rear := t.front - buffered - if rear >= 0 { - rear -= len(t.data) - } - // get the slot for the hash - pos := t.t[h&t.mask] - 1 - delta := pos - tailPos - for { - if delta < 0 { - return n - } - positions[n] = tailPos + delta - n++ - if n >= len(positions) { - return n - } - i := rear + int(delta) - if i < 0 { - i += len(t.data) - } - u := t.data[i] - if u == 0 { - return n - } - delta -= int64(u) - } -} - -// hash computes the rolling hash for the word stored in p. For correct -// results its length must be equal to t.wordLen. -func (t *hashTable) hash(p []byte) uint64 { - var h uint64 - for _, b := range p { - h = t.hr.RollByte(b) - } - return h -} - -// Matches fills the positions slice with potential matches. The -// functions returns the number of positions filled into positions. The -// byte slice p must have word length of the hash table. -func (t *hashTable) Matches(p []byte, positions []int64) int { - if len(p) != t.wordLen { - panic(fmt.Errorf( - "byte slice must have length %d", t.wordLen)) - } - h := t.hash(p) - return t.getMatches(h, positions) -} - -// NextOp identifies the next operation using the hash table. -// -// TODO: Use all repetitions to find matches. -func (t *hashTable) NextOp(rep [4]uint32) operation { - // get positions - data := t.dict.data[:maxMatchLen] - n, _ := t.dict.buf.Peek(data) - data = data[:n] - var p []int64 - if n < t.wordLen { - p = t.p[:0] - } else { - p = t.p[:maxMatches] - n = t.Matches(data[:t.wordLen], p) - p = p[:n] - } - - // convert positions in potential distances - head := t.dict.head - dists := append(t.distances[:0], 1, 2, 3, 4, 5, 6, 7, 8) - for _, pos := range p { - dis := int(head - pos) - if dis > shortDists { - dists = append(dists, dis) - } - } - - // check distances - var m match - dictLen := t.dict.DictLen() - for _, dist := range dists { - if dist > dictLen { - continue - } - - // Here comes a trick. We are only interested in matches - // that are longer than the matches we have been found - // before. So before we test the whole byte sequence at - // the given distance, we test the first byte that would - // make the match longer. If it doesn't match the byte - // to match, we don't to care any longer. - i := t.dict.buf.rear - dist + m.n - if i < 0 { - i += len(t.dict.buf.data) - } - if t.dict.buf.data[i] != data[m.n] { - // We can't get a longer match. Jump to the next - // distance. - continue - } - - n := t.dict.buf.matchLen(dist, data) - switch n { - case 0: - continue - case 1: - if uint32(dist-minDistance) != rep[0] { - continue - } - } - if n > m.n { - m = match{int64(dist), n} - if n == len(data) { - // No better match will be found. - break - } - } - } - - if m.n == 0 { - return lit{data[0]} - } - return m -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/header.go b/vendor/github.com/ulikunitz/xz/lzma/header.go deleted file mode 100644 index 1ae7d80c..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/header.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" -) - -// uint32LE reads an uint32 integer from a byte slice -func uint32LE(b []byte) uint32 { - x := uint32(b[3]) << 24 - x |= uint32(b[2]) << 16 - x |= uint32(b[1]) << 8 - x |= uint32(b[0]) - return x -} - -// uint64LE converts the uint64 value stored as little endian to an uint64 -// value. -func uint64LE(b []byte) uint64 { - x := uint64(b[7]) << 56 - x |= uint64(b[6]) << 48 - x |= uint64(b[5]) << 40 - x |= uint64(b[4]) << 32 - x |= uint64(b[3]) << 24 - x |= uint64(b[2]) << 16 - x |= uint64(b[1]) << 8 - x |= uint64(b[0]) - return x -} - -// putUint32LE puts an uint32 integer into a byte slice that must have at least -// a length of 4 bytes. -func putUint32LE(b []byte, x uint32) { - b[0] = byte(x) - b[1] = byte(x >> 8) - b[2] = byte(x >> 16) - b[3] = byte(x >> 24) -} - -// putUint64LE puts the uint64 value into the byte slice as little endian -// value. The byte slice b must have at least place for 8 bytes. -func putUint64LE(b []byte, x uint64) { - b[0] = byte(x) - b[1] = byte(x >> 8) - b[2] = byte(x >> 16) - b[3] = byte(x >> 24) - b[4] = byte(x >> 32) - b[5] = byte(x >> 40) - b[6] = byte(x >> 48) - b[7] = byte(x >> 56) -} - -// noHeaderSize defines the value of the length field in the LZMA header. -const noHeaderSize uint64 = 1<<64 - 1 - -// HeaderLen provides the length of the LZMA file header. -const HeaderLen = 13 - -// header represents the header of an LZMA file. -type header struct { - properties Properties - dictCap int - // uncompressed size; negative value if no size is given - size int64 -} - -// marshalBinary marshals the header. -func (h *header) marshalBinary() (data []byte, err error) { - if err = h.properties.verify(); err != nil { - return nil, err - } - if !(0 <= h.dictCap && int64(h.dictCap) <= MaxDictCap) { - return nil, fmt.Errorf("lzma: DictCap %d out of range", - h.dictCap) - } - - data = make([]byte, 13) - - // property byte - data[0] = h.properties.Code() - - // dictionary capacity - putUint32LE(data[1:5], uint32(h.dictCap)) - - // uncompressed size - var s uint64 - if h.size > 0 { - s = uint64(h.size) - } else { - s = noHeaderSize - } - putUint64LE(data[5:], s) - - return data, nil -} - -// unmarshalBinary unmarshals the header. -func (h *header) unmarshalBinary(data []byte) error { - if len(data) != HeaderLen { - return errors.New("lzma.unmarshalBinary: data has wrong length") - } - - // properties - var err error - if h.properties, err = PropertiesForCode(data[0]); err != nil { - return err - } - - // dictionary capacity - h.dictCap = int(uint32LE(data[1:])) - if h.dictCap < 0 { - return errors.New( - "LZMA header: dictionary capacity exceeds maximum " + - "integer") - } - - // uncompressed size - s := uint64LE(data[5:]) - if s == noHeaderSize { - h.size = -1 - } else { - h.size = int64(s) - if h.size < 0 { - return errors.New( - "LZMA header: uncompressed size " + - "out of int64 range") - } - } - - return nil -} - -// validDictCap checks whether the dictionary capacity is correct. This -// is used to weed out wrong file headers. -func validDictCap(dictcap int) bool { - if int64(dictcap) == MaxDictCap { - return true - } - for n := uint(10); n < 32; n++ { - if dictcap == 1<= 10 or 2^32-1. If -// there is an explicit size it must not exceed 256 GiB. The length of -// the data argument must be HeaderLen. -func ValidHeader(data []byte) bool { - var h header - if err := h.unmarshalBinary(data); err != nil { - return false - } - if !validDictCap(h.dictCap) { - return false - } - return h.size < 0 || h.size <= 1<<38 -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/header2.go b/vendor/github.com/ulikunitz/xz/lzma/header2.go deleted file mode 100644 index 081fc840..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/header2.go +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" - "io" -) - -const ( - // maximum size of compressed data in a chunk - maxCompressed = 1 << 16 - // maximum size of uncompressed data in a chunk - maxUncompressed = 1 << 21 -) - -// chunkType represents the type of an LZMA2 chunk. Note that this -// value is an internal representation and no actual encoding of a LZMA2 -// chunk header. -type chunkType byte - -// Possible values for the chunk type. -const ( - // end of stream - cEOS chunkType = iota - // uncompressed; reset dictionary - cUD - // uncompressed; no reset of dictionary - cU - // LZMA compressed; no reset - cL - // LZMA compressed; reset state - cLR - // LZMA compressed; reset state; new property value - cLRN - // LZMA compressed; reset state; new property value; reset dictionary - cLRND -) - -// chunkTypeStrings provide a string representation for the chunk types. -var chunkTypeStrings = [...]string{ - cEOS: "EOS", - cU: "U", - cUD: "UD", - cL: "L", - cLR: "LR", - cLRN: "LRN", - cLRND: "LRND", -} - -// String returns a string representation of the chunk type. -func (c chunkType) String() string { - if !(cEOS <= c && c <= cLRND) { - return "unknown" - } - return chunkTypeStrings[c] -} - -// Actual encodings for the chunk types in the value. Note that the high -// uncompressed size bits are stored in the header byte additionally. -const ( - hEOS = 0 - hUD = 1 - hU = 2 - hL = 1 << 7 - hLR = 1<<7 | 1<<5 - hLRN = 1<<7 | 1<<6 - hLRND = 1<<7 | 1<<6 | 1<<5 -) - -// errHeaderByte indicates an unsupported value for the chunk header -// byte. These bytes starts the variable-length chunk header. -var errHeaderByte = errors.New("lzma: unsupported chunk header byte") - -// headerChunkType converts the header byte into a chunk type. It -// ignores the uncompressed size bits in the chunk header byte. -func headerChunkType(h byte) (c chunkType, err error) { - if h&hL == 0 { - // no compression - switch h { - case hEOS: - c = cEOS - case hUD: - c = cUD - case hU: - c = cU - default: - return 0, errHeaderByte - } - return - } - switch h & hLRND { - case hL: - c = cL - case hLR: - c = cLR - case hLRN: - c = cLRN - case hLRND: - c = cLRND - default: - return 0, errHeaderByte - } - return -} - -// uncompressedHeaderLen provides the length of an uncompressed header -const uncompressedHeaderLen = 3 - -// headerLen returns the length of the LZMA2 header for a given chunk -// type. -func headerLen(c chunkType) int { - switch c { - case cEOS: - return 1 - case cU, cUD: - return uncompressedHeaderLen - case cL, cLR: - return 5 - case cLRN, cLRND: - return 6 - } - panic(fmt.Errorf("unsupported chunk type %d", c)) -} - -// chunkHeader represents the contents of a chunk header. -type chunkHeader struct { - ctype chunkType - uncompressed uint32 - compressed uint16 - props Properties -} - -// String returns a string representation of the chunk header. -func (h *chunkHeader) String() string { - return fmt.Sprintf("%s %d %d %s", h.ctype, h.uncompressed, - h.compressed, &h.props) -} - -// UnmarshalBinary reads the content of the chunk header from the data -// slice. The slice must have the correct length. -func (h *chunkHeader) UnmarshalBinary(data []byte) error { - if len(data) == 0 { - return errors.New("no data") - } - c, err := headerChunkType(data[0]) - if err != nil { - return err - } - - n := headerLen(c) - if len(data) < n { - return errors.New("incomplete data") - } - if len(data) > n { - return errors.New("invalid data length") - } - - *h = chunkHeader{ctype: c} - if c == cEOS { - return nil - } - - h.uncompressed = uint32(uint16BE(data[1:3])) - if c <= cU { - return nil - } - h.uncompressed |= uint32(data[0]&^hLRND) << 16 - - h.compressed = uint16BE(data[3:5]) - if c <= cLR { - return nil - } - - h.props, err = PropertiesForCode(data[5]) - return err -} - -// MarshalBinary encodes the chunk header value. The function checks -// whether the content of the chunk header is correct. -func (h *chunkHeader) MarshalBinary() (data []byte, err error) { - if h.ctype > cLRND { - return nil, errors.New("invalid chunk type") - } - if err = h.props.verify(); err != nil { - return nil, err - } - - data = make([]byte, headerLen(h.ctype)) - - switch h.ctype { - case cEOS: - return data, nil - case cUD: - data[0] = hUD - case cU: - data[0] = hU - case cL: - data[0] = hL - case cLR: - data[0] = hLR - case cLRN: - data[0] = hLRN - case cLRND: - data[0] = hLRND - } - - putUint16BE(data[1:3], uint16(h.uncompressed)) - if h.ctype <= cU { - return data, nil - } - data[0] |= byte(h.uncompressed>>16) &^ hLRND - - putUint16BE(data[3:5], h.compressed) - if h.ctype <= cLR { - return data, nil - } - - data[5] = h.props.Code() - return data, nil -} - -// readChunkHeader reads the chunk header from the IO reader. -func readChunkHeader(r io.Reader) (h *chunkHeader, err error) { - p := make([]byte, 1, 6) - if _, err = io.ReadFull(r, p); err != nil { - return - } - c, err := headerChunkType(p[0]) - if err != nil { - return - } - p = p[:headerLen(c)] - if _, err = io.ReadFull(r, p[1:]); err != nil { - return - } - h = new(chunkHeader) - if err = h.UnmarshalBinary(p); err != nil { - return nil, err - } - return h, nil -} - -// uint16BE converts a big-endian uint16 representation to an uint16 -// value. -func uint16BE(p []byte) uint16 { - return uint16(p[0])<<8 | uint16(p[1]) -} - -// putUint16BE puts the big-endian uint16 presentation into the given -// slice. -func putUint16BE(p []byte, x uint16) { - p[0] = byte(x >> 8) - p[1] = byte(x) -} - -// chunkState is used to manage the state of the chunks -type chunkState byte - -// start and stop define the initial and terminating state of the chunk -// state -const ( - start chunkState = 'S' - stop chunkState = 'T' -) - -// errors for the chunk state handling -var ( - errChunkType = errors.New("lzma: unexpected chunk type") - errState = errors.New("lzma: wrong chunk state") -) - -// next transitions state based on chunk type input -func (c *chunkState) next(ctype chunkType) error { - switch *c { - // start state - case 'S': - switch ctype { - case cEOS: - *c = 'T' - case cUD: - *c = 'R' - case cLRND: - *c = 'L' - default: - return errChunkType - } - // normal LZMA mode - case 'L': - switch ctype { - case cEOS: - *c = 'T' - case cUD: - *c = 'R' - case cU: - *c = 'U' - case cL, cLR, cLRN, cLRND: - break - default: - return errChunkType - } - // reset required - case 'R': - switch ctype { - case cEOS: - *c = 'T' - case cUD, cU: - break - case cLRN, cLRND: - *c = 'L' - default: - return errChunkType - } - // uncompressed - case 'U': - switch ctype { - case cEOS: - *c = 'T' - case cUD: - *c = 'R' - case cU: - break - case cL, cLR, cLRN, cLRND: - *c = 'L' - default: - return errChunkType - } - // terminal state - case 'T': - return errChunkType - default: - return errState - } - return nil -} - -// defaultChunkType returns the default chunk type for each chunk state. -func (c chunkState) defaultChunkType() chunkType { - switch c { - case 'S': - return cLRND - case 'L', 'U': - return cL - case 'R': - return cLRN - default: - // no error - return cEOS - } -} - -// maxDictCap defines the maximum dictionary capacity supported by the -// LZMA2 dictionary capacity encoding. -const maxDictCap = 1<<32 - 1 - -// maxDictCapCode defines the maximum dictionary capacity code. -const maxDictCapCode = 40 - -// The function decodes the dictionary capacity byte, but doesn't change -// for the correct range of the given byte. -func decodeDictCap(c byte) int64 { - return (2 | int64(c)&1) << (11 + (c>>1)&0x1f) -} - -// DecodeDictCap decodes the encoded dictionary capacity. The function -// returns an error if the code is out of range. -func DecodeDictCap(c byte) (n int64, err error) { - if c >= maxDictCapCode { - if c == maxDictCapCode { - return maxDictCap, nil - } - return 0, errors.New("lzma: invalid dictionary size code") - } - return decodeDictCap(c), nil -} - -// EncodeDictCap encodes a dictionary capacity. The function returns the -// code for the capacity that is greater or equal n. If n exceeds the -// maximum support dictionary capacity, the maximum value is returned. -func EncodeDictCap(n int64) byte { - a, b := byte(0), byte(40) - for a < b { - c := a + (b-a)>>1 - m := decodeDictCap(c) - if n <= m { - if n == m { - return c - } - b = c - } else { - a = c + 1 - } - } - return a -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go b/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go deleted file mode 100644 index 1ea5320a..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import "errors" - -// maxPosBits defines the number of bits of the position value that are used to -// to compute the posState value. The value is used to select the tree codec -// for length encoding and decoding. -const maxPosBits = 4 - -// minMatchLen and maxMatchLen give the minimum and maximum values for -// encoding and decoding length values. minMatchLen is also used as base -// for the encoded length values. -const ( - minMatchLen = 2 - maxMatchLen = minMatchLen + 16 + 256 - 1 -) - -// lengthCodec support the encoding of the length value. -type lengthCodec struct { - choice [2]prob - low [1 << maxPosBits]treeCodec - mid [1 << maxPosBits]treeCodec - high treeCodec -} - -// deepcopy initializes the lc value as deep copy of the source value. -func (lc *lengthCodec) deepcopy(src *lengthCodec) { - if lc == src { - return - } - lc.choice = src.choice - for i := range lc.low { - lc.low[i].deepcopy(&src.low[i]) - } - for i := range lc.mid { - lc.mid[i].deepcopy(&src.mid[i]) - } - lc.high.deepcopy(&src.high) -} - -// init initializes a new length codec. -func (lc *lengthCodec) init() { - for i := range lc.choice { - lc.choice[i] = probInit - } - for i := range lc.low { - lc.low[i] = makeTreeCodec(3) - } - for i := range lc.mid { - lc.mid[i] = makeTreeCodec(3) - } - lc.high = makeTreeCodec(8) -} - -// Encode encodes the length offset. The length offset l can be compute by -// subtracting minMatchLen (2) from the actual length. -// -// l = length - minMatchLen -func (lc *lengthCodec) Encode(e *rangeEncoder, l uint32, posState uint32, -) (err error) { - if l > maxMatchLen-minMatchLen { - return errors.New("lengthCodec.Encode: l out of range") - } - if l < 8 { - if err = lc.choice[0].Encode(e, 0); err != nil { - return - } - return lc.low[posState].Encode(e, l) - } - if err = lc.choice[0].Encode(e, 1); err != nil { - return - } - if l < 16 { - if err = lc.choice[1].Encode(e, 0); err != nil { - return - } - return lc.mid[posState].Encode(e, l-8) - } - if err = lc.choice[1].Encode(e, 1); err != nil { - return - } - if err = lc.high.Encode(e, l-16); err != nil { - return - } - return nil -} - -// Decode reads the length offset. Add minMatchLen to compute the actual length -// to the length offset l. -func (lc *lengthCodec) Decode(d *rangeDecoder, posState uint32, -) (l uint32, err error) { - var b uint32 - if b, err = lc.choice[0].Decode(d); err != nil { - return - } - if b == 0 { - l, err = lc.low[posState].Decode(d) - return - } - if b, err = lc.choice[1].Decode(d); err != nil { - return - } - if b == 0 { - l, err = lc.mid[posState].Decode(d) - l += 8 - return - } - l, err = lc.high.Decode(d) - l += 16 - return -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go b/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go deleted file mode 100644 index e4ef5fc5..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/literalcodec.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -// literalCodec supports the encoding of literal. It provides 768 probability -// values per literal state. The upper 512 probabilities are used with the -// context of a match bit. -type literalCodec struct { - probs []prob -} - -// deepcopy initializes literal codec c as a deep copy of the source. -func (c *literalCodec) deepcopy(src *literalCodec) { - if c == src { - return - } - c.probs = make([]prob, len(src.probs)) - copy(c.probs, src.probs) -} - -// init initializes the literal codec. -func (c *literalCodec) init(lc, lp int) { - switch { - case !(minLC <= lc && lc <= maxLC): - panic("lc out of range") - case !(minLP <= lp && lp <= maxLP): - panic("lp out of range") - } - c.probs = make([]prob, 0x300<= 7 { - m := uint32(match) - for { - matchBit := (m >> 7) & 1 - m <<= 1 - bit := (r >> 7) & 1 - r <<= 1 - i := ((1 + matchBit) << 8) | symbol - if err = probs[i].Encode(e, bit); err != nil { - return - } - symbol = (symbol << 1) | bit - if matchBit != bit { - break - } - if symbol >= 0x100 { - break - } - } - } - for symbol < 0x100 { - bit := (r >> 7) & 1 - r <<= 1 - if err = probs[symbol].Encode(e, bit); err != nil { - return - } - symbol = (symbol << 1) | bit - } - return nil -} - -// Decode decodes a literal byte using the range decoder as well as the LZMA -// state, a match byte, and the literal state. -func (c *literalCodec) Decode(d *rangeDecoder, - state uint32, match byte, litState uint32, -) (s byte, err error) { - k := litState * 0x300 - probs := c.probs[k : k+0x300] - symbol := uint32(1) - if state >= 7 { - m := uint32(match) - for { - matchBit := (m >> 7) & 1 - m <<= 1 - i := ((1 + matchBit) << 8) | symbol - bit, err := d.DecodeBit(&probs[i]) - if err != nil { - return 0, err - } - symbol = (symbol << 1) | bit - if matchBit != bit { - break - } - if symbol >= 0x100 { - break - } - } - } - for symbol < 0x100 { - bit, err := d.DecodeBit(&probs[symbol]) - if err != nil { - return 0, err - } - symbol = (symbol << 1) | bit - } - s = byte(symbol - 0x100) - return s, nil -} - -// minLC and maxLC define the range for LC values. -const ( - minLC = 0 - maxLC = 8 -) - -// minLC and maxLC define the range for LP values. -const ( - minLP = 0 - maxLP = 4 -) diff --git a/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go b/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go deleted file mode 100644 index 02dfb8bf..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import "errors" - -// MatchAlgorithm identifies an algorithm to find matches in the -// dictionary. -type MatchAlgorithm byte - -// Supported matcher algorithms. -const ( - HashTable4 MatchAlgorithm = iota - BinaryTree -) - -// maStrings are used by the String method. -var maStrings = map[MatchAlgorithm]string{ - HashTable4: "HashTable4", - BinaryTree: "BinaryTree", -} - -// String returns a string representation of the Matcher. -func (a MatchAlgorithm) String() string { - if s, ok := maStrings[a]; ok { - return s - } - return "unknown" -} - -var errUnsupportedMatchAlgorithm = errors.New( - "lzma: unsupported match algorithm value") - -// verify checks whether the matcher value is supported. -func (a MatchAlgorithm) verify() error { - if _, ok := maStrings[a]; !ok { - return errUnsupportedMatchAlgorithm - } - return nil -} - -func (a MatchAlgorithm) new(dictCap int) (m matcher, err error) { - switch a { - case HashTable4: - return newHashTable(dictCap, 4) - case BinaryTree: - return newBinTree(dictCap) - } - return nil, errUnsupportedMatchAlgorithm -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/operation.go b/vendor/github.com/ulikunitz/xz/lzma/operation.go deleted file mode 100644 index 7b7eddc3..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/operation.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "fmt" - "unicode" -) - -// operation represents an operation on the dictionary during encoding or -// decoding. -type operation interface { - Len() int -} - -// rep represents a repetition at the given distance and the given length -type match struct { - // supports all possible distance values, including the eos marker - distance int64 - // length - n int -} - -// Len returns the number of bytes matched. -func (m match) Len() int { - return m.n -} - -// String returns a string representation for the repetition. -func (m match) String() string { - return fmt.Sprintf("M{%d,%d}", m.distance, m.n) -} - -// lit represents a single byte literal. -type lit struct { - b byte -} - -// Len returns 1 for the single byte literal. -func (l lit) Len() int { - return 1 -} - -// String returns a string representation for the literal. -func (l lit) String() string { - var c byte - if unicode.IsPrint(rune(l.b)) { - c = l.b - } else { - c = '.' - } - return fmt.Sprintf("L{%c/%02x}", c, l.b) -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/prob.go b/vendor/github.com/ulikunitz/xz/lzma/prob.go deleted file mode 100644 index 2feccba1..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/prob.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -// movebits defines the number of bits used for the updates of probability -// values. -const movebits = 5 - -// probbits defines the number of bits of a probability value. -const probbits = 11 - -// probInit defines 0.5 as initial value for prob values. -const probInit prob = 1 << (probbits - 1) - -// Type prob represents probabilities. The type can also be used to encode and -// decode single bits. -type prob uint16 - -// Dec decreases the probability. The decrease is proportional to the -// probability value. -func (p *prob) dec() { - *p -= *p >> movebits -} - -// Inc increases the probability. The Increase is proportional to the -// difference of 1 and the probability value. -func (p *prob) inc() { - *p += ((1 << probbits) - *p) >> movebits -} - -// Computes the new bound for a given range using the probability value. -func (p prob) bound(r uint32) uint32 { - return (r >> probbits) * uint32(p) -} - -// Bits returns 1. One is the number of bits that can be encoded or decoded -// with a single prob value. -func (p prob) Bits() int { - return 1 -} - -// Encode encodes the least-significant bit of v. Note that the p value will be -// changed. -func (p *prob) Encode(e *rangeEncoder, v uint32) error { - return e.EncodeBit(v, p) -} - -// Decode decodes a single bit. Note that the p value will change. -func (p *prob) Decode(d *rangeDecoder) (v uint32, err error) { - return d.DecodeBit(p) -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/properties.go b/vendor/github.com/ulikunitz/xz/lzma/properties.go deleted file mode 100644 index 15b754cc..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/properties.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "fmt" -) - -// maximum and minimum values for the LZMA properties. -const ( - minPB = 0 - maxPB = 4 -) - -// maxPropertyCode is the possible maximum of a properties code byte. -const maxPropertyCode = (maxPB+1)*(maxLP+1)*(maxLC+1) - 1 - -// Properties contains the parameters LC, LP and PB. The parameter LC -// defines the number of literal context bits; parameter LP the number -// of literal position bits and PB the number of position bits. -type Properties struct { - LC int - LP int - PB int -} - -// String returns the properties in a string representation. -func (p *Properties) String() string { - return fmt.Sprintf("LC %d LP %d PB %d", p.LC, p.LP, p.PB) -} - -// PropertiesForCode converts a properties code byte into a Properties value. -func PropertiesForCode(code byte) (p Properties, err error) { - if code > maxPropertyCode { - return p, errors.New("lzma: invalid properties code") - } - p.LC = int(code % 9) - code /= 9 - p.LP = int(code % 5) - code /= 5 - p.PB = int(code % 5) - return p, err -} - -// verify checks the properties for correctness. -func (p *Properties) verify() error { - if p == nil { - return errors.New("lzma: properties are nil") - } - if !(minLC <= p.LC && p.LC <= maxLC) { - return errors.New("lzma: lc out of range") - } - if !(minLP <= p.LP && p.LP <= maxLP) { - return errors.New("lzma: lp out of range") - } - if !(minPB <= p.PB && p.PB <= maxPB) { - return errors.New("lzma: pb out of range") - } - return nil -} - -// Code converts the properties to a byte. The function assumes that -// the properties components are all in range. -func (p Properties) Code() byte { - return byte((p.PB*5+p.LP)*9 + p.LC) -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go b/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go deleted file mode 100644 index 4b0fee3f..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/rangecodec.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "io" -) - -// rangeEncoder implements range encoding of single bits. The low value can -// overflow therefore we need uint64. The cache value is used to handle -// overflows. -type rangeEncoder struct { - lbw *LimitedByteWriter - nrange uint32 - low uint64 - cacheLen int64 - cache byte -} - -// maxInt64 provides the maximal value of the int64 type -const maxInt64 = 1<<63 - 1 - -// newRangeEncoder creates a new range encoder. -func newRangeEncoder(bw io.ByteWriter) (re *rangeEncoder, err error) { - lbw, ok := bw.(*LimitedByteWriter) - if !ok { - lbw = &LimitedByteWriter{BW: bw, N: maxInt64} - } - return &rangeEncoder{ - lbw: lbw, - nrange: 0xffffffff, - cacheLen: 1}, nil -} - -// Available returns the number of bytes that still can be written. The -// method takes the bytes that will be currently written by Close into -// account. -func (e *rangeEncoder) Available() int64 { - return e.lbw.N - (e.cacheLen + 4) -} - -// writeByte writes a single byte to the underlying writer. An error is -// returned if the limit is reached. The written byte will be counted if -// the underlying writer doesn't return an error. -func (e *rangeEncoder) writeByte(c byte) error { - if e.Available() < 1 { - return ErrLimit - } - return e.lbw.WriteByte(c) -} - -// DirectEncodeBit encodes the least-significant bit of b with probability 1/2. -func (e *rangeEncoder) DirectEncodeBit(b uint32) error { - e.nrange >>= 1 - e.low += uint64(e.nrange) & (0 - (uint64(b) & 1)) - - // normalize - const top = 1 << 24 - if e.nrange >= top { - return nil - } - e.nrange <<= 8 - return e.shiftLow() -} - -// EncodeBit encodes the least significant bit of b. The p value will be -// updated by the function depending on the bit encoded. -func (e *rangeEncoder) EncodeBit(b uint32, p *prob) error { - bound := p.bound(e.nrange) - if b&1 == 0 { - e.nrange = bound - p.inc() - } else { - e.low += uint64(bound) - e.nrange -= bound - p.dec() - } - - // normalize - const top = 1 << 24 - if e.nrange >= top { - return nil - } - e.nrange <<= 8 - return e.shiftLow() -} - -// Close writes a complete copy of the low value. -func (e *rangeEncoder) Close() error { - for i := 0; i < 5; i++ { - if err := e.shiftLow(); err != nil { - return err - } - } - return nil -} - -// shiftLow shifts the low value for 8 bit. The shifted byte is written into -// the byte writer. The cache value is used to handle overflows. -func (e *rangeEncoder) shiftLow() error { - if uint32(e.low) < 0xff000000 || (e.low>>32) != 0 { - tmp := e.cache - for { - err := e.writeByte(tmp + byte(e.low>>32)) - if err != nil { - return err - } - tmp = 0xff - e.cacheLen-- - if e.cacheLen <= 0 { - if e.cacheLen < 0 { - panic("negative cacheLen") - } - break - } - } - e.cache = byte(uint32(e.low) >> 24) - } - e.cacheLen++ - e.low = uint64(uint32(e.low) << 8) - return nil -} - -// rangeDecoder decodes single bits of the range encoding stream. -type rangeDecoder struct { - br io.ByteReader - nrange uint32 - code uint32 -} - -// newRangeDecoder initializes a range decoder. It reads five bytes from the -// reader and therefore may return an error. -func newRangeDecoder(br io.ByteReader) (d *rangeDecoder, err error) { - d = &rangeDecoder{br: br, nrange: 0xffffffff} - - b, err := d.br.ReadByte() - if err != nil { - return nil, err - } - if b != 0 { - return nil, errors.New("newRangeDecoder: first byte not zero") - } - - for i := 0; i < 4; i++ { - if err = d.updateCode(); err != nil { - return nil, err - } - } - - if d.code >= d.nrange { - return nil, errors.New("newRangeDecoder: d.code >= d.nrange") - } - - return d, nil -} - -// possiblyAtEnd checks whether the decoder may be at the end of the stream. -func (d *rangeDecoder) possiblyAtEnd() bool { - return d.code == 0 -} - -// DirectDecodeBit decodes a bit with probability 1/2. The return value b will -// contain the bit at the least-significant position. All other bits will be -// zero. -func (d *rangeDecoder) DirectDecodeBit() (b uint32, err error) { - d.nrange >>= 1 - d.code -= d.nrange - t := 0 - (d.code >> 31) - d.code += d.nrange & t - b = (t + 1) & 1 - - // d.code will stay less then d.nrange - - // normalize - // assume d.code < d.nrange - const top = 1 << 24 - if d.nrange >= top { - return b, nil - } - d.nrange <<= 8 - // d.code < d.nrange will be maintained - return b, d.updateCode() -} - -// decodeBit decodes a single bit. The bit will be returned at the -// least-significant position. All other bits will be zero. The probability -// value will be updated. -func (d *rangeDecoder) DecodeBit(p *prob) (b uint32, err error) { - bound := p.bound(d.nrange) - if d.code < bound { - d.nrange = bound - p.inc() - b = 0 - } else { - d.code -= bound - d.nrange -= bound - p.dec() - b = 1 - } - // normalize - // assume d.code < d.nrange - const top = 1 << 24 - if d.nrange >= top { - return b, nil - } - d.nrange <<= 8 - // d.code < d.nrange will be maintained - return b, d.updateCode() -} - -// updateCode reads a new byte into the code. -func (d *rangeDecoder) updateCode() error { - b, err := d.br.ReadByte() - if err != nil { - return err - } - d.code = (d.code << 8) | uint32(b) - return nil -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/reader.go b/vendor/github.com/ulikunitz/xz/lzma/reader.go deleted file mode 100644 index ae911c38..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/reader.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package lzma supports the decoding and encoding of LZMA streams. -// Reader and Writer support the classic LZMA format. Reader2 and -// Writer2 support the decoding and encoding of LZMA2 streams. -// -// The package is written completely in Go and doesn't rely on any external -// library. -package lzma - -import ( - "errors" - "io" -) - -// ReaderConfig stores the parameters for the reader of the classic LZMA -// format. -type ReaderConfig struct { - DictCap int -} - -// fill converts the zero values of the configuration to the default values. -func (c *ReaderConfig) fill() { - if c.DictCap == 0 { - c.DictCap = 8 * 1024 * 1024 - } -} - -// Verify checks the reader configuration for errors. Zero values will -// be replaced by default values. -func (c *ReaderConfig) Verify() error { - c.fill() - if !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) { - return errors.New("lzma: dictionary capacity is out of range") - } - return nil -} - -// Reader provides a reader for LZMA files or streams. -type Reader struct { - lzma io.Reader - h header - d *decoder -} - -// NewReader creates a new reader for an LZMA stream using the classic -// format. NewReader reads and checks the header of the LZMA stream. -func NewReader(lzma io.Reader) (r *Reader, err error) { - return ReaderConfig{}.NewReader(lzma) -} - -// NewReader creates a new reader for an LZMA stream in the classic -// format. The function reads and verifies the the header of the LZMA -// stream. -func (c ReaderConfig) NewReader(lzma io.Reader) (r *Reader, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - data := make([]byte, HeaderLen) - if _, err := io.ReadFull(lzma, data); err != nil { - if err == io.EOF { - return nil, errors.New("lzma: unexpected EOF") - } - return nil, err - } - r = &Reader{lzma: lzma} - if err = r.h.unmarshalBinary(data); err != nil { - return nil, err - } - if r.h.dictCap < MinDictCap { - r.h.dictCap = MinDictCap - } - dictCap := r.h.dictCap - if c.DictCap > dictCap { - dictCap = c.DictCap - } - - state := newState(r.h.properties) - dict, err := newDecoderDict(dictCap) - if err != nil { - return nil, err - } - r.d, err = newDecoder(ByteReader(lzma), state, dict, r.h.size) - if err != nil { - return nil, err - } - return r, nil -} - -// EOSMarker indicates that an EOS marker has been encountered. -func (r *Reader) EOSMarker() bool { - return r.d.eosMarker -} - -// Read returns uncompressed data. -func (r *Reader) Read(p []byte) (n int, err error) { - return r.d.Read(p) -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/reader2.go b/vendor/github.com/ulikunitz/xz/lzma/reader2.go deleted file mode 100644 index f36e2650..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/reader2.go +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "errors" - "io" - - "github.com/ulikunitz/xz/internal/xlog" -) - -// Reader2Config stores the parameters for the LZMA2 reader. -// format. -type Reader2Config struct { - DictCap int -} - -// fill converts the zero values of the configuration to the default values. -func (c *Reader2Config) fill() { - if c.DictCap == 0 { - c.DictCap = 8 * 1024 * 1024 - } -} - -// Verify checks the reader configuration for errors. Zero configuration values -// will be replaced by default values. -func (c *Reader2Config) Verify() error { - c.fill() - if !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) { - return errors.New("lzma: dictionary capacity is out of range") - } - return nil -} - -// Reader2 supports the reading of LZMA2 chunk sequences. Note that the -// first chunk should have a dictionary reset and the first compressed -// chunk a properties reset. The chunk sequence may not be terminated by -// an end-of-stream chunk. -type Reader2 struct { - r io.Reader - err error - - dict *decoderDict - ur *uncompressedReader - decoder *decoder - chunkReader io.Reader - - cstate chunkState -} - -// NewReader2 creates a reader for an LZMA2 chunk sequence. -func NewReader2(lzma2 io.Reader) (r *Reader2, err error) { - return Reader2Config{}.NewReader2(lzma2) -} - -// NewReader2 creates an LZMA2 reader using the given configuration. -func (c Reader2Config) NewReader2(lzma2 io.Reader) (r *Reader2, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - r = &Reader2{r: lzma2, cstate: start} - r.dict, err = newDecoderDict(c.DictCap) - if err != nil { - return nil, err - } - if err = r.startChunk(); err != nil { - r.err = err - } - return r, nil -} - -// uncompressed tests whether the chunk type specifies an uncompressed -// chunk. -func uncompressed(ctype chunkType) bool { - return ctype == cU || ctype == cUD -} - -// startChunk parses a new chunk. -func (r *Reader2) startChunk() error { - r.chunkReader = nil - header, err := readChunkHeader(r.r) - if err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return err - } - xlog.Debugf("chunk header %v", header) - if err = r.cstate.next(header.ctype); err != nil { - return err - } - if r.cstate == stop { - return io.EOF - } - if header.ctype == cUD || header.ctype == cLRND { - r.dict.Reset() - } - size := int64(header.uncompressed) + 1 - if uncompressed(header.ctype) { - if r.ur != nil { - r.ur.Reopen(r.r, size) - } else { - r.ur = newUncompressedReader(r.r, r.dict, size) - } - r.chunkReader = r.ur - return nil - } - br := ByteReader(io.LimitReader(r.r, int64(header.compressed)+1)) - if r.decoder == nil { - state := newState(header.props) - r.decoder, err = newDecoder(br, state, r.dict, size) - if err != nil { - return err - } - r.chunkReader = r.decoder - return nil - } - switch header.ctype { - case cLR: - r.decoder.State.Reset() - case cLRN, cLRND: - r.decoder.State = newState(header.props) - } - err = r.decoder.Reopen(br, size) - if err != nil { - return err - } - r.chunkReader = r.decoder - return nil -} - -// Read reads data from the LZMA2 chunk sequence. -func (r *Reader2) Read(p []byte) (n int, err error) { - if r.err != nil { - return 0, r.err - } - for n < len(p) { - var k int - k, err = r.chunkReader.Read(p[n:]) - n += k - if err != nil { - if err == io.EOF { - err = r.startChunk() - if err == nil { - continue - } - } - r.err = err - return n, err - } - if k == 0 { - r.err = errors.New("lzma: Reader2 doesn't get data") - return n, r.err - } - } - return n, nil -} - -// EOS returns whether the LZMA2 stream has been terminated by an -// end-of-stream chunk. -func (r *Reader2) EOS() bool { - return r.cstate == stop -} - -// uncompressedReader is used to read uncompressed chunks. -type uncompressedReader struct { - lr io.LimitedReader - Dict *decoderDict - eof bool - err error -} - -// newUncompressedReader initializes a new uncompressedReader. -func newUncompressedReader(r io.Reader, dict *decoderDict, size int64) *uncompressedReader { - ur := &uncompressedReader{ - lr: io.LimitedReader{R: r, N: size}, - Dict: dict, - } - return ur -} - -// Reopen reinitializes an uncompressed reader. -func (ur *uncompressedReader) Reopen(r io.Reader, size int64) { - ur.err = nil - ur.eof = false - ur.lr = io.LimitedReader{R: r, N: size} -} - -// fill reads uncompressed data into the dictionary. -func (ur *uncompressedReader) fill() error { - if !ur.eof { - n, err := io.CopyN(ur.Dict, &ur.lr, int64(ur.Dict.Available())) - if err != io.EOF { - return err - } - ur.eof = true - if n > 0 { - return nil - } - } - if ur.lr.N != 0 { - return io.ErrUnexpectedEOF - } - return io.EOF -} - -// Read reads uncompressed data from the limited reader. -func (ur *uncompressedReader) Read(p []byte) (n int, err error) { - if ur.err != nil { - return 0, ur.err - } - for { - var k int - k, err = ur.Dict.Read(p[n:]) - n += k - if n >= len(p) { - return n, nil - } - if err != nil { - break - } - err = ur.fill() - if err != nil { - break - } - } - ur.err = err - return n, err -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/state.go b/vendor/github.com/ulikunitz/xz/lzma/state.go deleted file mode 100644 index 34779c51..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/state.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -// states defines the overall state count -const states = 12 - -// State maintains the full state of the operation encoding or decoding -// process. -type state struct { - rep [4]uint32 - isMatch [states << maxPosBits]prob - isRepG0Long [states << maxPosBits]prob - isRep [states]prob - isRepG0 [states]prob - isRepG1 [states]prob - isRepG2 [states]prob - litCodec literalCodec - lenCodec lengthCodec - repLenCodec lengthCodec - distCodec distCodec - state uint32 - posBitMask uint32 - Properties Properties -} - -// initProbSlice initializes a slice of probabilities. -func initProbSlice(p []prob) { - for i := range p { - p[i] = probInit - } -} - -// Reset sets all state information to the original values. -func (s *state) Reset() { - p := s.Properties - *s = state{ - Properties: p, - // dict: s.dict, - posBitMask: (uint32(1) << uint(p.PB)) - 1, - } - initProbSlice(s.isMatch[:]) - initProbSlice(s.isRep[:]) - initProbSlice(s.isRepG0[:]) - initProbSlice(s.isRepG1[:]) - initProbSlice(s.isRepG2[:]) - initProbSlice(s.isRepG0Long[:]) - s.litCodec.init(p.LC, p.LP) - s.lenCodec.init() - s.repLenCodec.init() - s.distCodec.init() -} - -// newState creates a new state from the give Properties. -func newState(p Properties) *state { - s := &state{Properties: p} - s.Reset() - return s -} - -// deepcopy initializes s as a deep copy of the source. -func (s *state) deepcopy(src *state) { - if s == src { - return - } - s.rep = src.rep - s.isMatch = src.isMatch - s.isRepG0Long = src.isRepG0Long - s.isRep = src.isRep - s.isRepG0 = src.isRepG0 - s.isRepG1 = src.isRepG1 - s.isRepG2 = src.isRepG2 - s.litCodec.deepcopy(&src.litCodec) - s.lenCodec.deepcopy(&src.lenCodec) - s.repLenCodec.deepcopy(&src.repLenCodec) - s.distCodec.deepcopy(&src.distCodec) - s.state = src.state - s.posBitMask = src.posBitMask - s.Properties = src.Properties -} - -// cloneState creates a new clone of the give state. -func cloneState(src *state) *state { - s := new(state) - s.deepcopy(src) - return s -} - -// updateStateLiteral updates the state for a literal. -func (s *state) updateStateLiteral() { - switch { - case s.state < 4: - s.state = 0 - return - case s.state < 10: - s.state -= 3 - return - } - s.state -= 6 -} - -// updateStateMatch updates the state for a match. -func (s *state) updateStateMatch() { - if s.state < 7 { - s.state = 7 - } else { - s.state = 10 - } -} - -// updateStateRep updates the state for a repetition. -func (s *state) updateStateRep() { - if s.state < 7 { - s.state = 8 - } else { - s.state = 11 - } -} - -// updateStateShortRep updates the state for a short repetition. -func (s *state) updateStateShortRep() { - if s.state < 7 { - s.state = 9 - } else { - s.state = 11 - } -} - -// states computes the states of the operation codec. -func (s *state) states(dictHead int64) (state1, state2, posState uint32) { - state1 = s.state - posState = uint32(dictHead) & s.posBitMask - state2 = (s.state << maxPosBits) | posState - return -} - -// litState computes the literal state. -func (s *state) litState(prev byte, dictHead int64) uint32 { - lp, lc := uint(s.Properties.LP), uint(s.Properties.LC) - litState := ((uint32(dictHead) & ((1 << lp) - 1)) << lc) | - (uint32(prev) >> (8 - lc)) - return litState -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go b/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go deleted file mode 100644 index 36b29b59..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/treecodecs.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -// treeCodec encodes or decodes values with a fixed bit size. It is using a -// tree of probability value. The root of the tree is the most-significant bit. -type treeCodec struct { - probTree -} - -// makeTreeCodec makes a tree codec. The bits value must be inside the range -// [1,32]. -func makeTreeCodec(bits int) treeCodec { - return treeCodec{makeProbTree(bits)} -} - -// deepcopy initializes tc as a deep copy of the source. -func (tc *treeCodec) deepcopy(src *treeCodec) { - tc.probTree.deepcopy(&src.probTree) -} - -// Encode uses the range encoder to encode a fixed-bit-size value. -func (tc *treeCodec) Encode(e *rangeEncoder, v uint32) (err error) { - m := uint32(1) - for i := int(tc.bits) - 1; i >= 0; i-- { - b := (v >> uint(i)) & 1 - if err := e.EncodeBit(b, &tc.probs[m]); err != nil { - return err - } - m = (m << 1) | b - } - return nil -} - -// Decodes uses the range decoder to decode a fixed-bit-size value. Errors may -// be caused by the range decoder. -func (tc *treeCodec) Decode(d *rangeDecoder) (v uint32, err error) { - m := uint32(1) - for j := 0; j < int(tc.bits); j++ { - b, err := d.DecodeBit(&tc.probs[m]) - if err != nil { - return 0, err - } - m = (m << 1) | b - } - return m - (1 << uint(tc.bits)), nil -} - -// treeReverseCodec is another tree codec, where the least-significant bit is -// the start of the probability tree. -type treeReverseCodec struct { - probTree -} - -// deepcopy initializes the treeReverseCodec as a deep copy of the -// source. -func (tc *treeReverseCodec) deepcopy(src *treeReverseCodec) { - tc.probTree.deepcopy(&src.probTree) -} - -// makeTreeReverseCodec creates treeReverseCodec value. The bits argument must -// be in the range [1,32]. -func makeTreeReverseCodec(bits int) treeReverseCodec { - return treeReverseCodec{makeProbTree(bits)} -} - -// Encode uses range encoder to encode a fixed-bit-size value. The range -// encoder may cause errors. -func (tc *treeReverseCodec) Encode(v uint32, e *rangeEncoder) (err error) { - m := uint32(1) - for i := uint(0); i < uint(tc.bits); i++ { - b := (v >> i) & 1 - if err := e.EncodeBit(b, &tc.probs[m]); err != nil { - return err - } - m = (m << 1) | b - } - return nil -} - -// Decodes uses the range decoder to decode a fixed-bit-size value. Errors -// returned by the range decoder will be returned. -func (tc *treeReverseCodec) Decode(d *rangeDecoder) (v uint32, err error) { - m := uint32(1) - for j := uint(0); j < uint(tc.bits); j++ { - b, err := d.DecodeBit(&tc.probs[m]) - if err != nil { - return 0, err - } - m = (m << 1) | b - v |= b << j - } - return v, nil -} - -// probTree stores enough probability values to be used by the treeEncode and -// treeDecode methods of the range coder types. -type probTree struct { - probs []prob - bits byte -} - -// deepcopy initializes the probTree value as a deep copy of the source. -func (t *probTree) deepcopy(src *probTree) { - if t == src { - return - } - t.probs = make([]prob, len(src.probs)) - copy(t.probs, src.probs) - t.bits = src.bits -} - -// makeProbTree initializes a probTree structure. -func makeProbTree(bits int) probTree { - if !(1 <= bits && bits <= 32) { - panic("bits outside of range [1,32]") - } - t := probTree{ - bits: byte(bits), - probs: make([]prob, 1< 0 { - c.SizeInHeader = true - } - if !c.SizeInHeader { - c.EOSMarker = true - } -} - -// Verify checks WriterConfig for errors. Verify will replace zero -// values with default values. -func (c *WriterConfig) Verify() error { - c.fill() - var err error - if c == nil { - return errors.New("lzma: WriterConfig is nil") - } - if c.Properties == nil { - return errors.New("lzma: WriterConfig has no Properties set") - } - if err = c.Properties.verify(); err != nil { - return err - } - if !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) { - return errors.New("lzma: dictionary capacity is out of range") - } - if !(maxMatchLen <= c.BufSize) { - return errors.New("lzma: lookahead buffer size too small") - } - if c.SizeInHeader { - if c.Size < 0 { - return errors.New("lzma: negative size not supported") - } - } else if !c.EOSMarker { - return errors.New("lzma: EOS marker is required") - } - if err = c.Matcher.verify(); err != nil { - return err - } - - return nil -} - -// header returns the header structure for this configuration. -func (c *WriterConfig) header() header { - h := header{ - properties: *c.Properties, - dictCap: c.DictCap, - size: -1, - } - if c.SizeInHeader { - h.size = c.Size - } - return h -} - -// Writer writes an LZMA stream in the classic format. -type Writer struct { - h header - bw io.ByteWriter - buf *bufio.Writer - e *encoder -} - -// NewWriter creates a new LZMA writer for the classic format. The -// method will write the header to the underlying stream. -func (c WriterConfig) NewWriter(lzma io.Writer) (w *Writer, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - w = &Writer{h: c.header()} - - var ok bool - w.bw, ok = lzma.(io.ByteWriter) - if !ok { - w.buf = bufio.NewWriter(lzma) - w.bw = w.buf - } - state := newState(w.h.properties) - m, err := c.Matcher.new(w.h.dictCap) - if err != nil { - return nil, err - } - dict, err := newEncoderDict(w.h.dictCap, c.BufSize, m) - if err != nil { - return nil, err - } - var flags encoderFlags - if c.EOSMarker { - flags = eosMarker - } - if w.e, err = newEncoder(w.bw, state, dict, flags); err != nil { - return nil, err - } - - if err = w.writeHeader(); err != nil { - return nil, err - } - return w, nil -} - -// NewWriter creates a new LZMA writer using the classic format. The -// function writes the header to the underlying stream. -func NewWriter(lzma io.Writer) (w *Writer, err error) { - return WriterConfig{}.NewWriter(lzma) -} - -// writeHeader writes the LZMA header into the stream. -func (w *Writer) writeHeader() error { - data, err := w.h.marshalBinary() - if err != nil { - return err - } - _, err = w.bw.(io.Writer).Write(data) - return err -} - -// Write puts data into the Writer. -func (w *Writer) Write(p []byte) (n int, err error) { - if w.h.size >= 0 { - m := w.h.size - m -= w.e.Compressed() + int64(w.e.dict.Buffered()) - if m < 0 { - m = 0 - } - if m < int64(len(p)) { - p = p[:m] - err = ErrNoSpace - } - } - var werr error - if n, werr = w.e.Write(p); werr != nil { - err = werr - } - return n, err -} - -// Close closes the writer stream. It ensures that all data from the -// buffer will be compressed and the LZMA stream will be finished. -func (w *Writer) Close() error { - if w.h.size >= 0 { - n := w.e.Compressed() + int64(w.e.dict.Buffered()) - if n != w.h.size { - return errSize - } - } - err := w.e.Close() - if w.buf != nil { - ferr := w.buf.Flush() - if err == nil { - err = ferr - } - } - return err -} diff --git a/vendor/github.com/ulikunitz/xz/lzma/writer2.go b/vendor/github.com/ulikunitz/xz/lzma/writer2.go deleted file mode 100644 index 97bbafa1..00000000 --- a/vendor/github.com/ulikunitz/xz/lzma/writer2.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lzma - -import ( - "bytes" - "errors" - "io" -) - -// Writer2Config is used to create a Writer2 using parameters. -type Writer2Config struct { - // The properties for the encoding. If the it is nil the value - // {LC: 3, LP: 0, PB: 2} will be chosen. - Properties *Properties - // The capacity of the dictionary. If DictCap is zero, the value - // 8 MiB will be chosen. - DictCap int - // Size of the lookahead buffer; value 0 indicates default size - // 4096 - BufSize int - // Match algorithm - Matcher MatchAlgorithm -} - -// fill replaces zero values with default values. -func (c *Writer2Config) fill() { - if c.Properties == nil { - c.Properties = &Properties{LC: 3, LP: 0, PB: 2} - } - if c.DictCap == 0 { - c.DictCap = 8 * 1024 * 1024 - } - if c.BufSize == 0 { - c.BufSize = 4096 - } -} - -// Verify checks the Writer2Config for correctness. Zero values will be -// replaced by default values. -func (c *Writer2Config) Verify() error { - c.fill() - var err error - if c == nil { - return errors.New("lzma: WriterConfig is nil") - } - if c.Properties == nil { - return errors.New("lzma: WriterConfig has no Properties set") - } - if err = c.Properties.verify(); err != nil { - return err - } - if !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) { - return errors.New("lzma: dictionary capacity is out of range") - } - if !(maxMatchLen <= c.BufSize) { - return errors.New("lzma: lookahead buffer size too small") - } - if c.Properties.LC+c.Properties.LP > 4 { - return errors.New("lzma: sum of lc and lp exceeds 4") - } - if err = c.Matcher.verify(); err != nil { - return err - } - return nil -} - -// Writer2 supports the creation of an LZMA2 stream. But note that -// written data is buffered, so call Flush or Close to write data to the -// underlying writer. The Close method writes the end-of-stream marker -// to the stream. So you may be able to concatenate the output of two -// writers as long the output of the first writer has only been flushed -// but not closed. -// -// Any change to the fields Properties, DictCap must be done before the -// first call to Write, Flush or Close. -type Writer2 struct { - w io.Writer - - start *state - encoder *encoder - - cstate chunkState - ctype chunkType - - buf bytes.Buffer - lbw LimitedByteWriter -} - -// NewWriter2 creates an LZMA2 chunk sequence writer with the default -// parameters and options. -func NewWriter2(lzma2 io.Writer) (w *Writer2, err error) { - return Writer2Config{}.NewWriter2(lzma2) -} - -// NewWriter2 creates a new LZMA2 writer using the given configuration. -func (c Writer2Config) NewWriter2(lzma2 io.Writer) (w *Writer2, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - w = &Writer2{ - w: lzma2, - start: newState(*c.Properties), - cstate: start, - ctype: start.defaultChunkType(), - } - w.buf.Grow(maxCompressed) - w.lbw = LimitedByteWriter{BW: &w.buf, N: maxCompressed} - m, err := c.Matcher.new(c.DictCap) - if err != nil { - return nil, err - } - d, err := newEncoderDict(c.DictCap, c.BufSize, m) - if err != nil { - return nil, err - } - w.encoder, err = newEncoder(&w.lbw, cloneState(w.start), d, 0) - if err != nil { - return nil, err - } - return w, nil -} - -// written returns the number of bytes written to the current chunk -func (w *Writer2) written() int { - if w.encoder == nil { - return 0 - } - return int(w.encoder.Compressed()) + w.encoder.dict.Buffered() -} - -// errClosed indicates that the writer is closed. -var errClosed = errors.New("lzma: writer closed") - -// Writes data to LZMA2 stream. Note that written data will be buffered. -// Use Flush or Close to ensure that data is written to the underlying -// writer. -func (w *Writer2) Write(p []byte) (n int, err error) { - if w.cstate == stop { - return 0, errClosed - } - for n < len(p) { - m := maxUncompressed - w.written() - if m <= 0 { - panic("lzma: maxUncompressed reached") - } - var q []byte - if n+m < len(p) { - q = p[n : n+m] - } else { - q = p[n:] - } - k, err := w.encoder.Write(q) - n += k - if err != nil && err != ErrLimit { - return n, err - } - if err == ErrLimit || k == m { - if err = w.flushChunk(); err != nil { - return n, err - } - } - } - return n, nil -} - -// writeUncompressedChunk writes an uncompressed chunk to the LZMA2 -// stream. -func (w *Writer2) writeUncompressedChunk() error { - u := w.encoder.Compressed() - if u <= 0 { - return errors.New("lzma: can't write empty uncompressed chunk") - } - if u > maxUncompressed { - panic("overrun of uncompressed data limit") - } - switch w.ctype { - case cLRND: - w.ctype = cUD - default: - w.ctype = cU - } - w.encoder.state = w.start - - header := chunkHeader{ - ctype: w.ctype, - uncompressed: uint32(u - 1), - } - hdata, err := header.MarshalBinary() - if err != nil { - return err - } - if _, err = w.w.Write(hdata); err != nil { - return err - } - _, err = w.encoder.dict.CopyN(w.w, int(u)) - return err -} - -// writeCompressedChunk writes a compressed chunk to the underlying -// writer. -func (w *Writer2) writeCompressedChunk() error { - if w.ctype == cU || w.ctype == cUD { - panic("chunk type uncompressed") - } - - u := w.encoder.Compressed() - if u <= 0 { - return errors.New("writeCompressedChunk: empty chunk") - } - if u > maxUncompressed { - panic("overrun of uncompressed data limit") - } - c := w.buf.Len() - if c <= 0 { - panic("no compressed data") - } - if c > maxCompressed { - panic("overrun of compressed data limit") - } - header := chunkHeader{ - ctype: w.ctype, - uncompressed: uint32(u - 1), - compressed: uint16(c - 1), - props: w.encoder.state.Properties, - } - hdata, err := header.MarshalBinary() - if err != nil { - return err - } - if _, err = w.w.Write(hdata); err != nil { - return err - } - _, err = io.Copy(w.w, &w.buf) - return err -} - -// writes a single chunk to the underlying writer. -func (w *Writer2) writeChunk() error { - u := int(uncompressedHeaderLen + w.encoder.Compressed()) - c := headerLen(w.ctype) + w.buf.Len() - if u < c { - return w.writeUncompressedChunk() - } - return w.writeCompressedChunk() -} - -// flushChunk terminates the current chunk. The encoder will be reset -// to support the next chunk. -func (w *Writer2) flushChunk() error { - if w.written() == 0 { - return nil - } - var err error - if err = w.encoder.Close(); err != nil { - return err - } - if err = w.writeChunk(); err != nil { - return err - } - w.buf.Reset() - w.lbw.N = maxCompressed - if err = w.encoder.Reopen(&w.lbw); err != nil { - return err - } - if err = w.cstate.next(w.ctype); err != nil { - return err - } - w.ctype = w.cstate.defaultChunkType() - w.start = cloneState(w.encoder.state) - return nil -} - -// Flush writes all buffered data out to the underlying stream. This -// could result in multiple chunks to be created. -func (w *Writer2) Flush() error { - if w.cstate == stop { - return errClosed - } - for w.written() > 0 { - if err := w.flushChunk(); err != nil { - return err - } - } - return nil -} - -// Close terminates the LZMA2 stream with an EOS chunk. -func (w *Writer2) Close() error { - if w.cstate == stop { - return errClosed - } - if err := w.Flush(); err != nil { - return nil - } - // write zero byte EOS chunk - _, err := w.w.Write([]byte{0}) - if err != nil { - return err - } - w.cstate = stop - return nil -} diff --git a/vendor/github.com/ulikunitz/xz/lzmafilter.go b/vendor/github.com/ulikunitz/xz/lzmafilter.go deleted file mode 100644 index bd5f42ee..00000000 --- a/vendor/github.com/ulikunitz/xz/lzmafilter.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xz - -import ( - "errors" - "fmt" - "io" - - "github.com/ulikunitz/xz/lzma" -) - -// LZMA filter constants. -const ( - lzmaFilterID = 0x21 - lzmaFilterLen = 3 -) - -// lzmaFilter declares the LZMA2 filter information stored in an xz -// block header. -type lzmaFilter struct { - dictCap int64 -} - -// String returns a representation of the LZMA filter. -func (f lzmaFilter) String() string { - return fmt.Sprintf("LZMA dict cap %#x", f.dictCap) -} - -// id returns the ID for the LZMA2 filter. -func (f lzmaFilter) id() uint64 { return lzmaFilterID } - -// MarshalBinary converts the lzmaFilter in its encoded representation. -func (f lzmaFilter) MarshalBinary() (data []byte, err error) { - c := lzma.EncodeDictCap(f.dictCap) - return []byte{lzmaFilterID, 1, c}, nil -} - -// UnmarshalBinary unmarshals the given data representation of the LZMA2 -// filter. -func (f *lzmaFilter) UnmarshalBinary(data []byte) error { - if len(data) != lzmaFilterLen { - return errors.New("xz: data for LZMA2 filter has wrong length") - } - if data[0] != lzmaFilterID { - return errors.New("xz: wrong LZMA2 filter id") - } - if data[1] != 1 { - return errors.New("xz: wrong LZMA2 filter size") - } - dc, err := lzma.DecodeDictCap(data[2]) - if err != nil { - return errors.New("xz: wrong LZMA2 dictionary size property") - } - - f.dictCap = dc - return nil -} - -// reader creates a new reader for the LZMA2 filter. -func (f lzmaFilter) reader(r io.Reader, c *ReaderConfig) (fr io.Reader, - err error) { - - config := new(lzma.Reader2Config) - if c != nil { - config.DictCap = c.DictCap - } - dc := int(f.dictCap) - if dc < 1 { - return nil, errors.New("xz: LZMA2 filter parameter " + - "dictionary capacity overflow") - } - if dc > config.DictCap { - config.DictCap = dc - } - - fr, err = config.NewReader2(r) - if err != nil { - return nil, err - } - return fr, nil -} - -// writeCloser creates a io.WriteCloser for the LZMA2 filter. -func (f lzmaFilter) writeCloser(w io.WriteCloser, c *WriterConfig, -) (fw io.WriteCloser, err error) { - config := new(lzma.Writer2Config) - if c != nil { - *config = lzma.Writer2Config{ - Properties: c.Properties, - DictCap: c.DictCap, - BufSize: c.BufSize, - Matcher: c.Matcher, - } - } - - dc := int(f.dictCap) - if dc < 1 { - return nil, errors.New("xz: LZMA2 filter parameter " + - "dictionary capacity overflow") - } - if dc > config.DictCap { - config.DictCap = dc - } - - fw, err = config.NewWriter2(w) - if err != nil { - return nil, err - } - return fw, nil -} - -// last returns true, because an LZMA2 filter must be the last filter in -// the filter list. -func (f lzmaFilter) last() bool { return true } diff --git a/vendor/github.com/ulikunitz/xz/make-docs b/vendor/github.com/ulikunitz/xz/make-docs deleted file mode 100644 index a8c612ce..00000000 --- a/vendor/github.com/ulikunitz/xz/make-docs +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -x -pandoc -t html5 -f markdown -s --css=doc/md.css -o README.html README.md -pandoc -t html5 -f markdown -s --css=doc/md.css -o TODO.html TODO.md diff --git a/vendor/github.com/ulikunitz/xz/none-check.go b/vendor/github.com/ulikunitz/xz/none-check.go deleted file mode 100644 index 6a56a261..00000000 --- a/vendor/github.com/ulikunitz/xz/none-check.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xz - -import "hash" - -type noneHash struct{} - -func (h noneHash) Write(p []byte) (n int, err error) { return len(p), nil } - -func (h noneHash) Sum(b []byte) []byte { return b } - -func (h noneHash) Reset() {} - -func (h noneHash) Size() int { return 0 } - -func (h noneHash) BlockSize() int { return 0 } - -func newNoneHash() hash.Hash { - return &noneHash{} -} diff --git a/vendor/github.com/ulikunitz/xz/reader.go b/vendor/github.com/ulikunitz/xz/reader.go deleted file mode 100644 index bde1412c..00000000 --- a/vendor/github.com/ulikunitz/xz/reader.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package xz supports the compression and decompression of xz files. It -// supports version 1.0.4 of the specification without the non-LZMA2 -// filters. See http://tukaani.org/xz/xz-file-format-1.0.4.txt -package xz - -import ( - "bytes" - "errors" - "fmt" - "hash" - "io" - - "github.com/ulikunitz/xz/internal/xlog" - "github.com/ulikunitz/xz/lzma" -) - -// ReaderConfig defines the parameters for the xz reader. The -// SingleStream parameter requests the reader to assume that the -// underlying stream contains only a single stream. -type ReaderConfig struct { - DictCap int - SingleStream bool -} - -// Verify checks the reader parameters for Validity. Zero values will be -// replaced by default values. -func (c *ReaderConfig) Verify() error { - if c == nil { - return errors.New("xz: reader parameters are nil") - } - lc := lzma.Reader2Config{DictCap: c.DictCap} - if err := lc.Verify(); err != nil { - return err - } - return nil -} - -// Reader supports the reading of one or multiple xz streams. -type Reader struct { - ReaderConfig - - xz io.Reader - sr *streamReader -} - -// streamReader decodes a single xz stream -type streamReader struct { - ReaderConfig - - xz io.Reader - br *blockReader - newHash func() hash.Hash - h header - index []record -} - -// NewReader creates a new xz reader using the default parameters. -// The function reads and checks the header of the first XZ stream. The -// reader will process multiple streams including padding. -func NewReader(xz io.Reader) (r *Reader, err error) { - return ReaderConfig{}.NewReader(xz) -} - -// NewReader creates an xz stream reader. The created reader will be -// able to process multiple streams and padding unless a SingleStream -// has been set in the reader configuration c. -func (c ReaderConfig) NewReader(xz io.Reader) (r *Reader, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - r = &Reader{ - ReaderConfig: c, - xz: xz, - } - if r.sr, err = c.newStreamReader(xz); err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return nil, err - } - return r, nil -} - -var errUnexpectedData = errors.New("xz: unexpected data after stream") - -// Read reads uncompressed data from the stream. -func (r *Reader) Read(p []byte) (n int, err error) { - for n < len(p) { - if r.sr == nil { - if r.SingleStream { - data := make([]byte, 1) - _, err = io.ReadFull(r.xz, data) - if err != io.EOF { - return n, errUnexpectedData - } - return n, io.EOF - } - for { - r.sr, err = r.ReaderConfig.newStreamReader(r.xz) - if err != errPadding { - break - } - } - if err != nil { - return n, err - } - } - k, err := r.sr.Read(p[n:]) - n += k - if err != nil { - if err == io.EOF { - r.sr = nil - continue - } - return n, err - } - } - return n, nil -} - -var errPadding = errors.New("xz: padding (4 zero bytes) encountered") - -// newStreamReader creates a new xz stream reader using the given configuration -// parameters. NewReader reads and checks the header of the xz stream. -func (c ReaderConfig) newStreamReader(xz io.Reader) (r *streamReader, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - data := make([]byte, HeaderLen) - if _, err := io.ReadFull(xz, data[:4]); err != nil { - return nil, err - } - if bytes.Equal(data[:4], []byte{0, 0, 0, 0}) { - return nil, errPadding - } - if _, err = io.ReadFull(xz, data[4:]); err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return nil, err - } - r = &streamReader{ - ReaderConfig: c, - xz: xz, - index: make([]record, 0, 4), - } - if err = r.h.UnmarshalBinary(data); err != nil { - return nil, err - } - xlog.Debugf("xz header %s", r.h) - if r.newHash, err = newHashFunc(r.h.flags); err != nil { - return nil, err - } - return r, nil -} - -// readTail reads the index body and the xz footer. -func (r *streamReader) readTail() error { - index, n, err := readIndexBody(r.xz, len(r.index)) - if err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return err - } - - for i, rec := range r.index { - if rec != index[i] { - return fmt.Errorf("xz: record %d is %v; want %v", - i, rec, index[i]) - } - } - - p := make([]byte, footerLen) - if _, err = io.ReadFull(r.xz, p); err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return err - } - var f footer - if err = f.UnmarshalBinary(p); err != nil { - return err - } - xlog.Debugf("xz footer %s", f) - if f.flags != r.h.flags { - return errors.New("xz: footer flags incorrect") - } - if f.indexSize != int64(n)+1 { - return errors.New("xz: index size in footer wrong") - } - return nil -} - -// Read reads actual data from the xz stream. -func (r *streamReader) Read(p []byte) (n int, err error) { - for n < len(p) { - if r.br == nil { - bh, hlen, err := readBlockHeader(r.xz) - if err != nil { - if err == errIndexIndicator { - if err = r.readTail(); err != nil { - return n, err - } - return n, io.EOF - } - return n, err - } - xlog.Debugf("block %v", *bh) - r.br, err = r.ReaderConfig.newBlockReader(r.xz, bh, - hlen, r.newHash()) - if err != nil { - return n, err - } - } - k, err := r.br.Read(p[n:]) - n += k - if err != nil { - if err == io.EOF { - r.index = append(r.index, r.br.record()) - r.br = nil - } else { - return n, err - } - } - } - return n, nil -} - -// countingReader is a reader that counts the bytes read. -type countingReader struct { - r io.Reader - n int64 -} - -// Read reads data from the wrapped reader and adds it to the n field. -func (lr *countingReader) Read(p []byte) (n int, err error) { - n, err = lr.r.Read(p) - lr.n += int64(n) - return n, err -} - -// blockReader supports the reading of a block. -type blockReader struct { - lxz countingReader - header *blockHeader - headerLen int - n int64 - hash hash.Hash - r io.Reader -} - -// newBlockReader creates a new block reader. -func (c *ReaderConfig) newBlockReader(xz io.Reader, h *blockHeader, - hlen int, hash hash.Hash) (br *blockReader, err error) { - - br = &blockReader{ - lxz: countingReader{r: xz}, - header: h, - headerLen: hlen, - hash: hash, - } - - fr, err := c.newFilterReader(&br.lxz, h.filters) - if err != nil { - return nil, err - } - if br.hash.Size() != 0 { - br.r = io.TeeReader(fr, br.hash) - } else { - br.r = fr - } - - return br, nil -} - -// uncompressedSize returns the uncompressed size of the block. -func (br *blockReader) uncompressedSize() int64 { - return br.n -} - -// compressedSize returns the compressed size of the block. -func (br *blockReader) compressedSize() int64 { - return br.lxz.n -} - -// unpaddedSize computes the unpadded size for the block. -func (br *blockReader) unpaddedSize() int64 { - n := int64(br.headerLen) - n += br.compressedSize() - n += int64(br.hash.Size()) - return n -} - -// record returns the index record for the current block. -func (br *blockReader) record() record { - return record{br.unpaddedSize(), br.uncompressedSize()} -} - -// Read reads data from the block. -func (br *blockReader) Read(p []byte) (n int, err error) { - n, err = br.r.Read(p) - br.n += int64(n) - - u := br.header.uncompressedSize - if u >= 0 && br.uncompressedSize() > u { - return n, errors.New("xz: wrong uncompressed size for block") - } - c := br.header.compressedSize - if c >= 0 && br.compressedSize() > c { - return n, errors.New("xz: wrong compressed size for block") - } - if err != io.EOF { - return n, err - } - if br.uncompressedSize() < u || br.compressedSize() < c { - return n, io.ErrUnexpectedEOF - } - - s := br.hash.Size() - k := padLen(br.lxz.n) - q := make([]byte, k+s, k+2*s) - if _, err = io.ReadFull(br.lxz.r, q); err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return n, err - } - if !allZeros(q[:k]) { - return n, errors.New("xz: non-zero block padding") - } - checkSum := q[k:] - computedSum := br.hash.Sum(checkSum[s:]) - if !bytes.Equal(checkSum, computedSum) { - return n, errors.New("xz: checksum error for block") - } - return n, io.EOF -} - -func (c *ReaderConfig) newFilterReader(r io.Reader, f []filter) (fr io.Reader, - err error) { - - if err = verifyFilters(f); err != nil { - return nil, err - } - - fr = r - for i := len(f) - 1; i >= 0; i-- { - fr, err = f[i].reader(fr, c) - if err != nil { - return nil, err - } - } - return fr, nil -} diff --git a/vendor/github.com/ulikunitz/xz/writer.go b/vendor/github.com/ulikunitz/xz/writer.go deleted file mode 100644 index f693e0ae..00000000 --- a/vendor/github.com/ulikunitz/xz/writer.go +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright 2014-2022 Ulrich Kunitz. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xz - -import ( - "errors" - "fmt" - "hash" - "io" - - "github.com/ulikunitz/xz/lzma" -) - -// WriterConfig describe the parameters for an xz writer. -type WriterConfig struct { - Properties *lzma.Properties - DictCap int - BufSize int - BlockSize int64 - // checksum method: CRC32, CRC64 or SHA256 (default: CRC64) - CheckSum byte - // Forces NoChecksum (default: false) - NoCheckSum bool - // match algorithm - Matcher lzma.MatchAlgorithm -} - -// fill replaces zero values with default values. -func (c *WriterConfig) fill() { - if c.Properties == nil { - c.Properties = &lzma.Properties{LC: 3, LP: 0, PB: 2} - } - if c.DictCap == 0 { - c.DictCap = 8 * 1024 * 1024 - } - if c.BufSize == 0 { - c.BufSize = 4096 - } - if c.BlockSize == 0 { - c.BlockSize = maxInt64 - } - if c.CheckSum == 0 { - c.CheckSum = CRC64 - } - if c.NoCheckSum { - c.CheckSum = None - } -} - -// Verify checks the configuration for errors. Zero values will be -// replaced by default values. -func (c *WriterConfig) Verify() error { - if c == nil { - return errors.New("xz: writer configuration is nil") - } - c.fill() - lc := lzma.Writer2Config{ - Properties: c.Properties, - DictCap: c.DictCap, - BufSize: c.BufSize, - Matcher: c.Matcher, - } - if err := lc.Verify(); err != nil { - return err - } - if c.BlockSize <= 0 { - return errors.New("xz: block size out of range") - } - if err := verifyFlags(c.CheckSum); err != nil { - return err - } - return nil -} - -// filters creates the filter list for the given parameters. -func (c *WriterConfig) filters() []filter { - return []filter{&lzmaFilter{int64(c.DictCap)}} -} - -// maxInt64 defines the maximum 64-bit signed integer. -const maxInt64 = 1<<63 - 1 - -// verifyFilters checks the filter list for the length and the right -// sequence of filters. -func verifyFilters(f []filter) error { - if len(f) == 0 { - return errors.New("xz: no filters") - } - if len(f) > 4 { - return errors.New("xz: more than four filters") - } - for _, g := range f[:len(f)-1] { - if g.last() { - return errors.New("xz: last filter is not last") - } - } - if !f[len(f)-1].last() { - return errors.New("xz: wrong last filter") - } - return nil -} - -// newFilterWriteCloser converts a filter list into a WriteCloser that -// can be used by a blockWriter. -func (c *WriterConfig) newFilterWriteCloser(w io.Writer, f []filter) (fw io.WriteCloser, err error) { - if err = verifyFilters(f); err != nil { - return nil, err - } - fw = nopWriteCloser(w) - for i := len(f) - 1; i >= 0; i-- { - fw, err = f[i].writeCloser(fw, c) - if err != nil { - return nil, err - } - } - return fw, nil -} - -// nopWCloser implements a WriteCloser with a Close method not doing -// anything. -type nopWCloser struct { - io.Writer -} - -// Close returns nil and doesn't do anything else. -func (c nopWCloser) Close() error { - return nil -} - -// nopWriteCloser converts the Writer into a WriteCloser with a Close -// function that does nothing beside returning nil. -func nopWriteCloser(w io.Writer) io.WriteCloser { - return nopWCloser{w} -} - -// Writer compresses data written to it. It is an io.WriteCloser. -type Writer struct { - WriterConfig - - xz io.Writer - bw *blockWriter - newHash func() hash.Hash - h header - index []record - closed bool -} - -// newBlockWriter creates a new block writer writes the header out. -func (w *Writer) newBlockWriter() error { - var err error - w.bw, err = w.WriterConfig.newBlockWriter(w.xz, w.newHash()) - if err != nil { - return err - } - if err = w.bw.writeHeader(w.xz); err != nil { - return err - } - return nil -} - -// closeBlockWriter closes a block writer and records the sizes in the -// index. -func (w *Writer) closeBlockWriter() error { - var err error - if err = w.bw.Close(); err != nil { - return err - } - w.index = append(w.index, w.bw.record()) - return nil -} - -// NewWriter creates a new xz writer using default parameters. -func NewWriter(xz io.Writer) (w *Writer, err error) { - return WriterConfig{}.NewWriter(xz) -} - -// NewWriter creates a new Writer using the given configuration parameters. -func (c WriterConfig) NewWriter(xz io.Writer) (w *Writer, err error) { - if err = c.Verify(); err != nil { - return nil, err - } - w = &Writer{ - WriterConfig: c, - xz: xz, - h: header{c.CheckSum}, - index: make([]record, 0, 4), - } - if w.newHash, err = newHashFunc(c.CheckSum); err != nil { - return nil, err - } - data, err := w.h.MarshalBinary() - if err != nil { - return nil, fmt.Errorf("w.h.MarshalBinary(): error %w", err) - } - if _, err = xz.Write(data); err != nil { - return nil, err - } - if err = w.newBlockWriter(); err != nil { - return nil, err - } - return w, nil - -} - -// Write compresses the uncompressed data provided. -func (w *Writer) Write(p []byte) (n int, err error) { - if w.closed { - return 0, errClosed - } - for { - k, err := w.bw.Write(p[n:]) - n += k - if err != errNoSpace { - return n, err - } - if err = w.closeBlockWriter(); err != nil { - return n, err - } - if err = w.newBlockWriter(); err != nil { - return n, err - } - } -} - -// Close closes the writer and adds the footer to the Writer. Close -// doesn't close the underlying writer. -func (w *Writer) Close() error { - if w.closed { - return errClosed - } - w.closed = true - var err error - if err = w.closeBlockWriter(); err != nil { - return err - } - - f := footer{flags: w.h.flags} - if f.indexSize, err = writeIndex(w.xz, w.index); err != nil { - return err - } - data, err := f.MarshalBinary() - if err != nil { - return err - } - if _, err = w.xz.Write(data); err != nil { - return err - } - return nil -} - -// countingWriter is a writer that counts all data written to it. -type countingWriter struct { - w io.Writer - n int64 -} - -// Write writes data to the countingWriter. -func (cw *countingWriter) Write(p []byte) (n int, err error) { - n, err = cw.w.Write(p) - cw.n += int64(n) - if err == nil && cw.n < 0 { - return n, errors.New("xz: counter overflow") - } - return -} - -// blockWriter is writes a single block. -type blockWriter struct { - cxz countingWriter - // mw combines io.WriteCloser w and the hash. - mw io.Writer - w io.WriteCloser - n int64 - blockSize int64 - closed bool - headerLen int - - filters []filter - hash hash.Hash -} - -// newBlockWriter creates a new block writer. -func (c *WriterConfig) newBlockWriter(xz io.Writer, hash hash.Hash) (bw *blockWriter, err error) { - bw = &blockWriter{ - cxz: countingWriter{w: xz}, - blockSize: c.BlockSize, - filters: c.filters(), - hash: hash, - } - bw.w, err = c.newFilterWriteCloser(&bw.cxz, bw.filters) - if err != nil { - return nil, err - } - if bw.hash.Size() != 0 { - bw.mw = io.MultiWriter(bw.w, bw.hash) - } else { - bw.mw = bw.w - } - return bw, nil -} - -// writeHeader writes the header. If the function is called after Close -// the commpressedSize and uncompressedSize fields will be filled. -func (bw *blockWriter) writeHeader(w io.Writer) error { - h := blockHeader{ - compressedSize: -1, - uncompressedSize: -1, - filters: bw.filters, - } - if bw.closed { - h.compressedSize = bw.compressedSize() - h.uncompressedSize = bw.uncompressedSize() - } - data, err := h.MarshalBinary() - if err != nil { - return err - } - if _, err = w.Write(data); err != nil { - return err - } - bw.headerLen = len(data) - return nil -} - -// compressed size returns the amount of data written to the underlying -// stream. -func (bw *blockWriter) compressedSize() int64 { - return bw.cxz.n -} - -// uncompressedSize returns the number of data written to the -// blockWriter -func (bw *blockWriter) uncompressedSize() int64 { - return bw.n -} - -// unpaddedSize returns the sum of the header length, the uncompressed -// size of the block and the hash size. -func (bw *blockWriter) unpaddedSize() int64 { - if bw.headerLen <= 0 { - panic("xz: block header not written") - } - n := int64(bw.headerLen) - n += bw.compressedSize() - n += int64(bw.hash.Size()) - return n -} - -// record returns the record for the current stream. Call Close before -// calling this method. -func (bw *blockWriter) record() record { - return record{bw.unpaddedSize(), bw.uncompressedSize()} -} - -var errClosed = errors.New("xz: writer already closed") - -var errNoSpace = errors.New("xz: no space") - -// Write writes uncompressed data to the block writer. -func (bw *blockWriter) Write(p []byte) (n int, err error) { - if bw.closed { - return 0, errClosed - } - - t := bw.blockSize - bw.n - if int64(len(p)) > t { - err = errNoSpace - p = p[:t] - } - - var werr error - n, werr = bw.mw.Write(p) - bw.n += int64(n) - if werr != nil { - return n, werr - } - return n, err -} - -// Close closes the writer. -func (bw *blockWriter) Close() error { - if bw.closed { - return errClosed - } - bw.closed = true - if err := bw.w.Close(); err != nil { - return err - } - s := bw.hash.Size() - k := padLen(bw.cxz.n) - p := make([]byte, k+s) - bw.hash.Sum(p[k:k]) - if _, err := bw.cxz.w.Write(p); err != nil { - return err - } - return nil -} diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/crypto/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/crypto/PATENTS b/vendor/golang.org/x/crypto/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/crypto/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google 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, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go deleted file mode 100644 index 425e8eec..00000000 --- a/vendor/golang.org/x/crypto/cast5/cast5.go +++ /dev/null @@ -1,536 +0,0 @@ -// Copyright 2010 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 cast5 implements CAST5, as defined in RFC 2144. -// -// CAST5 is a legacy cipher and its short block size makes it vulnerable to -// birthday bound attacks (see https://sweet32.info). It should only be used -// where compatibility with legacy systems, not security, is the goal. -// -// Deprecated: any new system should use AES (from crypto/aes, if necessary in -// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from -// golang.org/x/crypto/chacha20poly1305). -package cast5 // import "golang.org/x/crypto/cast5" - -import ( - "errors" - "math/bits" -) - -const BlockSize = 8 -const KeySize = 16 - -type Cipher struct { - masking [16]uint32 - rotate [16]uint8 -} - -func NewCipher(key []byte) (c *Cipher, err error) { - if len(key) != KeySize { - return nil, errors.New("CAST5: keys must be 16 bytes") - } - - c = new(Cipher) - c.keySchedule(key) - return -} - -func (c *Cipher) BlockSize() int { - return BlockSize -} - -func (c *Cipher) Encrypt(dst, src []byte) { - l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) - r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) - - l, r = r, l^f1(r, c.masking[0], c.rotate[0]) - l, r = r, l^f2(r, c.masking[1], c.rotate[1]) - l, r = r, l^f3(r, c.masking[2], c.rotate[2]) - l, r = r, l^f1(r, c.masking[3], c.rotate[3]) - - l, r = r, l^f2(r, c.masking[4], c.rotate[4]) - l, r = r, l^f3(r, c.masking[5], c.rotate[5]) - l, r = r, l^f1(r, c.masking[6], c.rotate[6]) - l, r = r, l^f2(r, c.masking[7], c.rotate[7]) - - l, r = r, l^f3(r, c.masking[8], c.rotate[8]) - l, r = r, l^f1(r, c.masking[9], c.rotate[9]) - l, r = r, l^f2(r, c.masking[10], c.rotate[10]) - l, r = r, l^f3(r, c.masking[11], c.rotate[11]) - - l, r = r, l^f1(r, c.masking[12], c.rotate[12]) - l, r = r, l^f2(r, c.masking[13], c.rotate[13]) - l, r = r, l^f3(r, c.masking[14], c.rotate[14]) - l, r = r, l^f1(r, c.masking[15], c.rotate[15]) - - dst[0] = uint8(r >> 24) - dst[1] = uint8(r >> 16) - dst[2] = uint8(r >> 8) - dst[3] = uint8(r) - dst[4] = uint8(l >> 24) - dst[5] = uint8(l >> 16) - dst[6] = uint8(l >> 8) - dst[7] = uint8(l) -} - -func (c *Cipher) Decrypt(dst, src []byte) { - l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) - r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) - - l, r = r, l^f1(r, c.masking[15], c.rotate[15]) - l, r = r, l^f3(r, c.masking[14], c.rotate[14]) - l, r = r, l^f2(r, c.masking[13], c.rotate[13]) - l, r = r, l^f1(r, c.masking[12], c.rotate[12]) - - l, r = r, l^f3(r, c.masking[11], c.rotate[11]) - l, r = r, l^f2(r, c.masking[10], c.rotate[10]) - l, r = r, l^f1(r, c.masking[9], c.rotate[9]) - l, r = r, l^f3(r, c.masking[8], c.rotate[8]) - - l, r = r, l^f2(r, c.masking[7], c.rotate[7]) - l, r = r, l^f1(r, c.masking[6], c.rotate[6]) - l, r = r, l^f3(r, c.masking[5], c.rotate[5]) - l, r = r, l^f2(r, c.masking[4], c.rotate[4]) - - l, r = r, l^f1(r, c.masking[3], c.rotate[3]) - l, r = r, l^f3(r, c.masking[2], c.rotate[2]) - l, r = r, l^f2(r, c.masking[1], c.rotate[1]) - l, r = r, l^f1(r, c.masking[0], c.rotate[0]) - - dst[0] = uint8(r >> 24) - dst[1] = uint8(r >> 16) - dst[2] = uint8(r >> 8) - dst[3] = uint8(r) - dst[4] = uint8(l >> 24) - dst[5] = uint8(l >> 16) - dst[6] = uint8(l >> 8) - dst[7] = uint8(l) -} - -type keyScheduleA [4][7]uint8 -type keyScheduleB [4][5]uint8 - -// keyScheduleRound contains the magic values for a round of the key schedule. -// The keyScheduleA deals with the lines like: -// z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8] -// Conceptually, both x and z are in the same array, x first. The first -// element describes which word of this array gets written to and the -// second, which word gets read. So, for the line above, it's "4, 0", because -// it's writing to the first word of z, which, being after x, is word 4, and -// reading from the first word of x: word 0. -// -// Next are the indexes into the S-boxes. Now the array is treated as bytes. So -// "xD" is 0xd. The first byte of z is written as "16 + 0", just to be clear -// that it's z that we're indexing. -// -// keyScheduleB deals with lines like: -// K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2] -// "K1" is ignored because key words are always written in order. So the five -// elements are the S-box indexes. They use the same form as in keyScheduleA, -// above. - -type keyScheduleRound struct{} -type keySchedule []keyScheduleRound - -var schedule = []struct { - a keyScheduleA - b keyScheduleB -}{ - { - keyScheduleA{ - {4, 0, 0xd, 0xf, 0xc, 0xe, 0x8}, - {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, - {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, - {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, - }, - keyScheduleB{ - {16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2}, - {16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6}, - {16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9}, - {16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc}, - }, - }, - { - keyScheduleA{ - {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, - {1, 4, 0, 2, 1, 3, 16 + 2}, - {2, 5, 7, 6, 5, 4, 16 + 1}, - {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, - }, - keyScheduleB{ - {3, 2, 0xc, 0xd, 8}, - {1, 0, 0xe, 0xf, 0xd}, - {7, 6, 8, 9, 3}, - {5, 4, 0xa, 0xb, 7}, - }, - }, - { - keyScheduleA{ - {4, 0, 0xd, 0xf, 0xc, 0xe, 8}, - {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, - {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, - {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, - }, - keyScheduleB{ - {16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9}, - {16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc}, - {16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2}, - {16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6}, - }, - }, - { - keyScheduleA{ - {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, - {1, 4, 0, 2, 1, 3, 16 + 2}, - {2, 5, 7, 6, 5, 4, 16 + 1}, - {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, - }, - keyScheduleB{ - {8, 9, 7, 6, 3}, - {0xa, 0xb, 5, 4, 7}, - {0xc, 0xd, 3, 2, 8}, - {0xe, 0xf, 1, 0, 0xd}, - }, - }, -} - -func (c *Cipher) keySchedule(in []byte) { - var t [8]uint32 - var k [32]uint32 - - for i := 0; i < 4; i++ { - j := i * 4 - t[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3]) - } - - x := []byte{6, 7, 4, 5} - ki := 0 - - for half := 0; half < 2; half++ { - for _, round := range schedule { - for j := 0; j < 4; j++ { - var a [7]uint8 - copy(a[:], round.a[j][:]) - w := t[a[1]] - w ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff] - w ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff] - w ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff] - w ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff] - w ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff] - t[a[0]] = w - } - - for j := 0; j < 4; j++ { - var b [5]uint8 - copy(b[:], round.b[j][:]) - w := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff] - w ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff] - w ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff] - w ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff] - w ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff] - k[ki] = w - ki++ - } - } - } - - for i := 0; i < 16; i++ { - c.masking[i] = k[i] - c.rotate[i] = uint8(k[16+i] & 0x1f) - } -} - -// These are the three 'f' functions. See RFC 2144, section 2.2. -func f1(d, m uint32, r uint8) uint32 { - t := m + d - I := bits.RotateLeft32(t, int(r)) - return ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff] -} - -func f2(d, m uint32, r uint8) uint32 { - t := m ^ d - I := bits.RotateLeft32(t, int(r)) - return ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff] -} - -func f3(d, m uint32, r uint8) uint32 { - t := m - d - I := bits.RotateLeft32(t, int(r)) - return ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff] -} - -var sBox = [8][256]uint32{ - { - 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949, - 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e, - 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d, - 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0, - 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7, - 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935, - 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d, - 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50, - 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe, - 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3, - 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167, - 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291, - 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779, - 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2, - 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511, - 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d, - 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5, - 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324, - 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c, - 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc, - 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d, - 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96, - 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a, - 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d, - 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd, - 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6, - 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9, - 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872, - 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c, - 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e, - 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9, - 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf, - }, - { - 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651, - 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3, - 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb, - 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806, - 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b, - 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359, - 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b, - 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c, - 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34, - 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb, - 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd, - 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860, - 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b, - 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304, - 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b, - 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf, - 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c, - 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13, - 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f, - 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6, - 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6, - 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58, - 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906, - 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d, - 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6, - 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4, - 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6, - 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f, - 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249, - 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa, - 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9, - 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1, - }, - { - 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90, - 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5, - 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e, - 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240, - 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5, - 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b, - 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71, - 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04, - 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82, - 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15, - 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2, - 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176, - 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148, - 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc, - 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341, - 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e, - 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51, - 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f, - 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a, - 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b, - 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b, - 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5, - 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45, - 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536, - 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc, - 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0, - 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69, - 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2, - 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49, - 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d, - 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a, - 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783, - }, - { - 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1, - 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf, - 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15, - 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121, - 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25, - 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5, - 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb, - 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5, - 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d, - 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6, - 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23, - 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003, - 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6, - 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119, - 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24, - 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a, - 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79, - 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df, - 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26, - 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab, - 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7, - 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417, - 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2, - 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2, - 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a, - 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919, - 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef, - 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876, - 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab, - 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04, - 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282, - 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2, - }, - { - 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f, - 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a, - 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff, - 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02, - 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a, - 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7, - 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9, - 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981, - 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774, - 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655, - 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2, - 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910, - 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1, - 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da, - 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049, - 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f, - 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba, - 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be, - 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3, - 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840, - 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4, - 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2, - 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7, - 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5, - 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e, - 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e, - 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801, - 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad, - 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0, - 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20, - 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8, - 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4, - }, - { - 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac, - 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138, - 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367, - 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98, - 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072, - 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3, - 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd, - 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8, - 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9, - 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54, - 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387, - 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc, - 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf, - 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf, - 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f, - 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289, - 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950, - 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f, - 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b, - 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be, - 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13, - 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976, - 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0, - 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891, - 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da, - 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc, - 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084, - 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25, - 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121, - 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5, - 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd, - 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f, - }, - { - 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f, - 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de, - 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43, - 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19, - 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2, - 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516, - 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88, - 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816, - 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756, - 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a, - 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264, - 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688, - 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28, - 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3, - 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7, - 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06, - 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033, - 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a, - 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566, - 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509, - 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962, - 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e, - 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c, - 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c, - 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285, - 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301, - 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be, - 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767, - 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647, - 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914, - 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c, - 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3, - }, - { - 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5, - 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc, - 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd, - 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d, - 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2, - 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862, - 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc, - 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c, - 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e, - 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039, - 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8, - 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42, - 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5, - 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472, - 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225, - 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c, - 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb, - 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054, - 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70, - 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc, - 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c, - 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3, - 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4, - 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101, - 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f, - 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e, - 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a, - 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c, - 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384, - 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c, - 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82, - 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e, - }, -} diff --git a/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/golang.org/x/crypto/openpgp/armor/armor.go deleted file mode 100644 index 8907183e..00000000 --- a/vendor/golang.org/x/crypto/openpgp/armor/armor.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2010 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 armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is -// very similar to PEM except that it has an additional CRC checksum. -// -// Deprecated: this package is unmaintained except for security fixes. New -// applications should consider a more focused, modern alternative to OpenPGP -// for their specific task. If you are required to interoperate with OpenPGP -// systems and need a maintained package, consider a community fork. -// See https://golang.org/issue/44226. -package armor // import "golang.org/x/crypto/openpgp/armor" - -import ( - "bufio" - "bytes" - "encoding/base64" - "golang.org/x/crypto/openpgp/errors" - "io" -) - -// A Block represents an OpenPGP armored structure. -// -// The encoded form is: -// -// -----BEGIN Type----- -// Headers -// -// base64-encoded Bytes -// '=' base64 encoded checksum -// -----END Type----- -// -// where Headers is a possibly empty sequence of Key: Value lines. -// -// Since the armored data can be very large, this package presents a streaming -// interface. -type Block struct { - Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE"). - Header map[string]string // Optional headers. - Body io.Reader // A Reader from which the contents can be read - lReader lineReader - oReader openpgpReader -} - -var ArmorCorrupt error = errors.StructuralError("armor invalid") - -const crc24Init = 0xb704ce -const crc24Poly = 0x1864cfb -const crc24Mask = 0xffffff - -// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1 -func crc24(crc uint32, d []byte) uint32 { - for _, b := range d { - crc ^= uint32(b) << 16 - for i := 0; i < 8; i++ { - crc <<= 1 - if crc&0x1000000 != 0 { - crc ^= crc24Poly - } - } - } - return crc -} - -var armorStart = []byte("-----BEGIN ") -var armorEnd = []byte("-----END ") -var armorEndOfLine = []byte("-----") - -// lineReader wraps a line based reader. It watches for the end of an armor -// block and records the expected CRC value. -type lineReader struct { - in *bufio.Reader - buf []byte - eof bool - crc uint32 - crcSet bool -} - -func (l *lineReader) Read(p []byte) (n int, err error) { - if l.eof { - return 0, io.EOF - } - - if len(l.buf) > 0 { - n = copy(p, l.buf) - l.buf = l.buf[n:] - return - } - - line, isPrefix, err := l.in.ReadLine() - if err != nil { - return - } - if isPrefix { - return 0, ArmorCorrupt - } - - if bytes.HasPrefix(line, armorEnd) { - l.eof = true - return 0, io.EOF - } - - if len(line) == 5 && line[0] == '=' { - // This is the checksum line - var expectedBytes [3]byte - var m int - m, err = base64.StdEncoding.Decode(expectedBytes[0:], line[1:]) - if m != 3 || err != nil { - return - } - l.crc = uint32(expectedBytes[0])<<16 | - uint32(expectedBytes[1])<<8 | - uint32(expectedBytes[2]) - - line, _, err = l.in.ReadLine() - if err != nil && err != io.EOF { - return - } - if !bytes.HasPrefix(line, armorEnd) { - return 0, ArmorCorrupt - } - - l.eof = true - l.crcSet = true - return 0, io.EOF - } - - if len(line) > 96 { - return 0, ArmorCorrupt - } - - n = copy(p, line) - bytesToSave := len(line) - n - if bytesToSave > 0 { - if cap(l.buf) < bytesToSave { - l.buf = make([]byte, 0, bytesToSave) - } - l.buf = l.buf[0:bytesToSave] - copy(l.buf, line[n:]) - } - - return -} - -// openpgpReader passes Read calls to the underlying base64 decoder, but keeps -// a running CRC of the resulting data and checks the CRC against the value -// found by the lineReader at EOF. -type openpgpReader struct { - lReader *lineReader - b64Reader io.Reader - currentCRC uint32 -} - -func (r *openpgpReader) Read(p []byte) (n int, err error) { - n, err = r.b64Reader.Read(p) - r.currentCRC = crc24(r.currentCRC, p[:n]) - - if err == io.EOF && r.lReader.crcSet && r.lReader.crc != r.currentCRC&crc24Mask { - return 0, ArmorCorrupt - } - - return -} - -// Decode reads a PGP armored block from the given Reader. It will ignore -// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The -// given Reader is not usable after calling this function: an arbitrary amount -// of data may have been read past the end of the block. -func Decode(in io.Reader) (p *Block, err error) { - r := bufio.NewReaderSize(in, 100) - var line []byte - ignoreNext := false - -TryNextBlock: - p = nil - - // Skip leading garbage - for { - ignoreThis := ignoreNext - line, ignoreNext, err = r.ReadLine() - if err != nil { - return - } - if ignoreNext || ignoreThis { - continue - } - line = bytes.TrimSpace(line) - if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) { - break - } - } - - p = new(Block) - p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)]) - p.Header = make(map[string]string) - nextIsContinuation := false - var lastKey string - - // Read headers - for { - isContinuation := nextIsContinuation - line, nextIsContinuation, err = r.ReadLine() - if err != nil { - p = nil - return - } - if isContinuation { - p.Header[lastKey] += string(line) - continue - } - line = bytes.TrimSpace(line) - if len(line) == 0 { - break - } - - i := bytes.Index(line, []byte(": ")) - if i == -1 { - goto TryNextBlock - } - lastKey = string(line[:i]) - p.Header[lastKey] = string(line[i+2:]) - } - - p.lReader.in = r - p.oReader.currentCRC = crc24Init - p.oReader.lReader = &p.lReader - p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader) - p.Body = &p.oReader - - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/armor/encode.go b/vendor/golang.org/x/crypto/openpgp/armor/encode.go deleted file mode 100644 index 5b6e16c1..00000000 --- a/vendor/golang.org/x/crypto/openpgp/armor/encode.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2010 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 armor - -import ( - "encoding/base64" - "io" -) - -var armorHeaderSep = []byte(": ") -var blockEnd = []byte("\n=") -var newline = []byte("\n") -var armorEndOfLineOut = []byte("-----\n") - -// writeSlices writes its arguments to the given Writer. -func writeSlices(out io.Writer, slices ...[]byte) (err error) { - for _, s := range slices { - _, err = out.Write(s) - if err != nil { - return err - } - } - return -} - -// lineBreaker breaks data across several lines, all of the same byte length -// (except possibly the last). Lines are broken with a single '\n'. -type lineBreaker struct { - lineLength int - line []byte - used int - out io.Writer - haveWritten bool -} - -func newLineBreaker(out io.Writer, lineLength int) *lineBreaker { - return &lineBreaker{ - lineLength: lineLength, - line: make([]byte, lineLength), - used: 0, - out: out, - } -} - -func (l *lineBreaker) Write(b []byte) (n int, err error) { - n = len(b) - - if n == 0 { - return - } - - if l.used == 0 && l.haveWritten { - _, err = l.out.Write([]byte{'\n'}) - if err != nil { - return - } - } - - if l.used+len(b) < l.lineLength { - l.used += copy(l.line[l.used:], b) - return - } - - l.haveWritten = true - _, err = l.out.Write(l.line[0:l.used]) - if err != nil { - return - } - excess := l.lineLength - l.used - l.used = 0 - - _, err = l.out.Write(b[0:excess]) - if err != nil { - return - } - - _, err = l.Write(b[excess:]) - return -} - -func (l *lineBreaker) Close() (err error) { - if l.used > 0 { - _, err = l.out.Write(l.line[0:l.used]) - if err != nil { - return - } - } - - return -} - -// encoding keeps track of a running CRC24 over the data which has been written -// to it and outputs a OpenPGP checksum when closed, followed by an armor -// trailer. -// -// It's built into a stack of io.Writers: -// -// encoding -> base64 encoder -> lineBreaker -> out -type encoding struct { - out io.Writer - breaker *lineBreaker - b64 io.WriteCloser - crc uint32 - blockType []byte -} - -func (e *encoding) Write(data []byte) (n int, err error) { - e.crc = crc24(e.crc, data) - return e.b64.Write(data) -} - -func (e *encoding) Close() (err error) { - err = e.b64.Close() - if err != nil { - return - } - e.breaker.Close() - - var checksumBytes [3]byte - checksumBytes[0] = byte(e.crc >> 16) - checksumBytes[1] = byte(e.crc >> 8) - checksumBytes[2] = byte(e.crc) - - var b64ChecksumBytes [4]byte - base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:]) - - return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine) -} - -// Encode returns a WriteCloser which will encode the data written to it in -// OpenPGP armor. -func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) { - bType := []byte(blockType) - err = writeSlices(out, armorStart, bType, armorEndOfLineOut) - if err != nil { - return - } - - for k, v := range headers { - err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline) - if err != nil { - return - } - } - - _, err = out.Write(newline) - if err != nil { - return - } - - e := &encoding{ - out: out, - breaker: newLineBreaker(out, 64), - crc: crc24Init, - blockType: bType, - } - e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker) - return e, nil -} diff --git a/vendor/golang.org/x/crypto/openpgp/canonical_text.go b/vendor/golang.org/x/crypto/openpgp/canonical_text.go deleted file mode 100644 index e601e389..00000000 --- a/vendor/golang.org/x/crypto/openpgp/canonical_text.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2011 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 openpgp - -import "hash" - -// NewCanonicalTextHash reformats text written to it into the canonical -// form and then applies the hash h. See RFC 4880, section 5.2.1. -func NewCanonicalTextHash(h hash.Hash) hash.Hash { - return &canonicalTextHash{h, 0} -} - -type canonicalTextHash struct { - h hash.Hash - s int -} - -var newline = []byte{'\r', '\n'} - -func (cth *canonicalTextHash) Write(buf []byte) (int, error) { - start := 0 - - for i, c := range buf { - switch cth.s { - case 0: - if c == '\r' { - cth.s = 1 - } else if c == '\n' { - cth.h.Write(buf[start:i]) - cth.h.Write(newline) - start = i + 1 - } - case 1: - cth.s = 0 - } - } - - cth.h.Write(buf[start:]) - return len(buf), nil -} - -func (cth *canonicalTextHash) Sum(in []byte) []byte { - return cth.h.Sum(in) -} - -func (cth *canonicalTextHash) Reset() { - cth.h.Reset() - cth.s = 0 -} - -func (cth *canonicalTextHash) Size() int { - return cth.h.Size() -} - -func (cth *canonicalTextHash) BlockSize() int { - return cth.h.BlockSize() -} diff --git a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go deleted file mode 100644 index 743b35a1..00000000 --- a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2011 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 elgamal implements ElGamal encryption, suitable for OpenPGP, -// as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on -// Discrete Logarithms," IEEE Transactions on Information Theory, v. IT-31, -// n. 4, 1985, pp. 469-472. -// -// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it -// unsuitable for other protocols. RSA should be used in preference in any -// case. -// -// Deprecated: this package was only provided to support ElGamal encryption in -// OpenPGP. The golang.org/x/crypto/openpgp package is now deprecated (see -// https://golang.org/issue/44226), and ElGamal in the OpenPGP ecosystem has -// compatibility and security issues (see https://eprint.iacr.org/2021/923). -// Moreover, this package doesn't protect against side-channel attacks. -package elgamal // import "golang.org/x/crypto/openpgp/elgamal" - -import ( - "crypto/rand" - "crypto/subtle" - "errors" - "io" - "math/big" -) - -// PublicKey represents an ElGamal public key. -type PublicKey struct { - G, P, Y *big.Int -} - -// PrivateKey represents an ElGamal private key. -type PrivateKey struct { - PublicKey - X *big.Int -} - -// Encrypt encrypts the given message to the given public key. The result is a -// pair of integers. Errors can result from reading random, or because msg is -// too large to be encrypted to the public key. -func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) { - pLen := (pub.P.BitLen() + 7) / 8 - if len(msg) > pLen-11 { - err = errors.New("elgamal: message too long") - return - } - - // EM = 0x02 || PS || 0x00 || M - em := make([]byte, pLen-1) - em[0] = 2 - ps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):] - err = nonZeroRandomBytes(ps, random) - if err != nil { - return - } - em[len(em)-len(msg)-1] = 0 - copy(mm, msg) - - m := new(big.Int).SetBytes(em) - - k, err := rand.Int(random, pub.P) - if err != nil { - return - } - - c1 = new(big.Int).Exp(pub.G, k, pub.P) - s := new(big.Int).Exp(pub.Y, k, pub.P) - c2 = s.Mul(s, m) - c2.Mod(c2, pub.P) - - return -} - -// Decrypt takes two integers, resulting from an ElGamal encryption, and -// returns the plaintext of the message. An error can result only if the -// ciphertext is invalid. Users should keep in mind that this is a padding -// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can -// be used to break the cryptosystem. See “Chosen Ciphertext Attacks -// Against Protocols Based on the RSA Encryption Standard PKCS #1”, Daniel -// Bleichenbacher, Advances in Cryptology (Crypto '98), -func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) { - s := new(big.Int).Exp(c1, priv.X, priv.P) - if s.ModInverse(s, priv.P) == nil { - return nil, errors.New("elgamal: invalid private key") - } - s.Mul(s, c2) - s.Mod(s, priv.P) - em := s.Bytes() - - firstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2) - - // The remainder of the plaintext must be a string of non-zero random - // octets, followed by a 0, followed by the message. - // lookingForIndex: 1 iff we are still looking for the zero. - // index: the offset of the first zero byte. - var lookingForIndex, index int - lookingForIndex = 1 - - for i := 1; i < len(em); i++ { - equals0 := subtle.ConstantTimeByteEq(em[i], 0) - index = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index) - lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex) - } - - if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 { - return nil, errors.New("elgamal: decryption error") - } - return em[index+1:], nil -} - -// nonZeroRandomBytes fills the given slice with non-zero random octets. -func nonZeroRandomBytes(s []byte, rand io.Reader) (err error) { - _, err = io.ReadFull(rand, s) - if err != nil { - return - } - - for i := 0; i < len(s); i++ { - for s[i] == 0 { - _, err = io.ReadFull(rand, s[i:i+1]) - if err != nil { - return - } - } - } - - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/errors/errors.go b/vendor/golang.org/x/crypto/openpgp/errors/errors.go deleted file mode 100644 index 1d7a0ea0..00000000 --- a/vendor/golang.org/x/crypto/openpgp/errors/errors.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2010 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 errors contains common error types for the OpenPGP packages. -// -// Deprecated: this package is unmaintained except for security fixes. New -// applications should consider a more focused, modern alternative to OpenPGP -// for their specific task. If you are required to interoperate with OpenPGP -// systems and need a maintained package, consider a community fork. -// See https://golang.org/issue/44226. -package errors // import "golang.org/x/crypto/openpgp/errors" - -import ( - "strconv" -) - -// A StructuralError is returned when OpenPGP data is found to be syntactically -// invalid. -type StructuralError string - -func (s StructuralError) Error() string { - return "openpgp: invalid data: " + string(s) -} - -// UnsupportedError indicates that, although the OpenPGP data is valid, it -// makes use of currently unimplemented features. -type UnsupportedError string - -func (s UnsupportedError) Error() string { - return "openpgp: unsupported feature: " + string(s) -} - -// InvalidArgumentError indicates that the caller is in error and passed an -// incorrect value. -type InvalidArgumentError string - -func (i InvalidArgumentError) Error() string { - return "openpgp: invalid argument: " + string(i) -} - -// SignatureError indicates that a syntactically valid signature failed to -// validate. -type SignatureError string - -func (b SignatureError) Error() string { - return "openpgp: invalid signature: " + string(b) -} - -type keyIncorrectError int - -func (ki keyIncorrectError) Error() string { - return "openpgp: incorrect key" -} - -var ErrKeyIncorrect error = keyIncorrectError(0) - -type unknownIssuerError int - -func (unknownIssuerError) Error() string { - return "openpgp: signature made by unknown entity" -} - -var ErrUnknownIssuer error = unknownIssuerError(0) - -type keyRevokedError int - -func (keyRevokedError) Error() string { - return "openpgp: signature made by revoked key" -} - -var ErrKeyRevoked error = keyRevokedError(0) - -type UnknownPacketTypeError uint8 - -func (upte UnknownPacketTypeError) Error() string { - return "openpgp: unknown packet type: " + strconv.Itoa(int(upte)) -} diff --git a/vendor/golang.org/x/crypto/openpgp/keys.go b/vendor/golang.org/x/crypto/openpgp/keys.go deleted file mode 100644 index d62f787e..00000000 --- a/vendor/golang.org/x/crypto/openpgp/keys.go +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "crypto/rsa" - "io" - "time" - - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" -) - -// PublicKeyType is the armor type for a PGP public key. -var PublicKeyType = "PGP PUBLIC KEY BLOCK" - -// PrivateKeyType is the armor type for a PGP private key. -var PrivateKeyType = "PGP PRIVATE KEY BLOCK" - -// An Entity represents the components of an OpenPGP key: a primary public key -// (which must be a signing key), one or more identities claimed by that key, -// and zero or more subkeys, which may be encryption keys. -type Entity struct { - PrimaryKey *packet.PublicKey - PrivateKey *packet.PrivateKey - Identities map[string]*Identity // indexed by Identity.Name - Revocations []*packet.Signature - Subkeys []Subkey -} - -// An Identity represents an identity claimed by an Entity and zero or more -// assertions by other entities about that claim. -type Identity struct { - Name string // by convention, has the form "Full Name (comment) " - UserId *packet.UserId - SelfSignature *packet.Signature - Signatures []*packet.Signature -} - -// A Subkey is an additional public key in an Entity. Subkeys can be used for -// encryption. -type Subkey struct { - PublicKey *packet.PublicKey - PrivateKey *packet.PrivateKey - Sig *packet.Signature -} - -// A Key identifies a specific public key in an Entity. This is either the -// Entity's primary key or a subkey. -type Key struct { - Entity *Entity - PublicKey *packet.PublicKey - PrivateKey *packet.PrivateKey - SelfSignature *packet.Signature -} - -// A KeyRing provides access to public and private keys. -type KeyRing interface { - // KeysById returns the set of keys that have the given key id. - KeysById(id uint64) []Key - // KeysByIdUsage returns the set of keys with the given id - // that also meet the key usage given by requiredUsage. - // The requiredUsage is expressed as the bitwise-OR of - // packet.KeyFlag* values. - KeysByIdUsage(id uint64, requiredUsage byte) []Key - // DecryptionKeys returns all private keys that are valid for - // decryption. - DecryptionKeys() []Key -} - -// primaryIdentity returns the Identity marked as primary or the first identity -// if none are so marked. -func (e *Entity) primaryIdentity() *Identity { - var firstIdentity *Identity - for _, ident := range e.Identities { - if firstIdentity == nil { - firstIdentity = ident - } - if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { - return ident - } - } - return firstIdentity -} - -// encryptionKey returns the best candidate Key for encrypting a message to the -// given Entity. -func (e *Entity) encryptionKey(now time.Time) (Key, bool) { - candidateSubkey := -1 - - // Iterate the keys to find the newest key - var maxTime time.Time - for i, subkey := range e.Subkeys { - if subkey.Sig.FlagsValid && - subkey.Sig.FlagEncryptCommunications && - subkey.PublicKey.PubKeyAlgo.CanEncrypt() && - !subkey.Sig.KeyExpired(now) && - (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) { - candidateSubkey = i - maxTime = subkey.Sig.CreationTime - } - } - - if candidateSubkey != -1 { - subkey := e.Subkeys[candidateSubkey] - return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true - } - - // If we don't have any candidate subkeys for encryption and - // the primary key doesn't have any usage metadata then we - // assume that the primary key is ok. Or, if the primary key is - // marked as ok to encrypt to, then we can obviously use it. - i := e.primaryIdentity() - if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagEncryptCommunications && - e.PrimaryKey.PubKeyAlgo.CanEncrypt() && - !i.SelfSignature.KeyExpired(now) { - return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true - } - - // This Entity appears to be signing only. - return Key{}, false -} - -// signingKey return the best candidate Key for signing a message with this -// Entity. -func (e *Entity) signingKey(now time.Time) (Key, bool) { - candidateSubkey := -1 - - for i, subkey := range e.Subkeys { - if subkey.Sig.FlagsValid && - subkey.Sig.FlagSign && - subkey.PublicKey.PubKeyAlgo.CanSign() && - !subkey.Sig.KeyExpired(now) { - candidateSubkey = i - break - } - } - - if candidateSubkey != -1 { - subkey := e.Subkeys[candidateSubkey] - return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true - } - - // If we have no candidate subkey then we assume that it's ok to sign - // with the primary key. - i := e.primaryIdentity() - if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagSign && - !i.SelfSignature.KeyExpired(now) { - return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true - } - - return Key{}, false -} - -// An EntityList contains one or more Entities. -type EntityList []*Entity - -// KeysById returns the set of keys that have the given key id. -func (el EntityList) KeysById(id uint64) (keys []Key) { - for _, e := range el { - if e.PrimaryKey.KeyId == id { - var selfSig *packet.Signature - for _, ident := range e.Identities { - if selfSig == nil { - selfSig = ident.SelfSignature - } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { - selfSig = ident.SelfSignature - break - } - } - keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig}) - } - - for _, subKey := range e.Subkeys { - if subKey.PublicKey.KeyId == id { - keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) - } - } - } - return -} - -// KeysByIdUsage returns the set of keys with the given id that also meet -// the key usage given by requiredUsage. The requiredUsage is expressed as -// the bitwise-OR of packet.KeyFlag* values. -func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) { - for _, key := range el.KeysById(id) { - if len(key.Entity.Revocations) > 0 { - continue - } - - if key.SelfSignature.RevocationReason != nil { - continue - } - - if key.SelfSignature.FlagsValid && requiredUsage != 0 { - var usage byte - if key.SelfSignature.FlagCertify { - usage |= packet.KeyFlagCertify - } - if key.SelfSignature.FlagSign { - usage |= packet.KeyFlagSign - } - if key.SelfSignature.FlagEncryptCommunications { - usage |= packet.KeyFlagEncryptCommunications - } - if key.SelfSignature.FlagEncryptStorage { - usage |= packet.KeyFlagEncryptStorage - } - if usage&requiredUsage != requiredUsage { - continue - } - } - - keys = append(keys, key) - } - return -} - -// DecryptionKeys returns all private keys that are valid for decryption. -func (el EntityList) DecryptionKeys() (keys []Key) { - for _, e := range el { - for _, subKey := range e.Subkeys { - if subKey.PrivateKey != nil && (!subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) { - keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) - } - } - } - return -} - -// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file. -func ReadArmoredKeyRing(r io.Reader) (EntityList, error) { - block, err := armor.Decode(r) - if err == io.EOF { - return nil, errors.InvalidArgumentError("no armored data found") - } - if err != nil { - return nil, err - } - if block.Type != PublicKeyType && block.Type != PrivateKeyType { - return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type) - } - - return ReadKeyRing(block.Body) -} - -// ReadKeyRing reads one or more public/private keys. Unsupported keys are -// ignored as long as at least a single valid key is found. -func ReadKeyRing(r io.Reader) (el EntityList, err error) { - packets := packet.NewReader(r) - var lastUnsupportedError error - - for { - var e *Entity - e, err = ReadEntity(packets) - if err != nil { - // TODO: warn about skipped unsupported/unreadable keys - if _, ok := err.(errors.UnsupportedError); ok { - lastUnsupportedError = err - err = readToNextPublicKey(packets) - } else if _, ok := err.(errors.StructuralError); ok { - // Skip unreadable, badly-formatted keys - lastUnsupportedError = err - err = readToNextPublicKey(packets) - } - if err == io.EOF { - err = nil - break - } - if err != nil { - el = nil - break - } - } else { - el = append(el, e) - } - } - - if len(el) == 0 && err == nil { - err = lastUnsupportedError - } - return -} - -// readToNextPublicKey reads packets until the start of the entity and leaves -// the first packet of the new entity in the Reader. -func readToNextPublicKey(packets *packet.Reader) (err error) { - var p packet.Packet - for { - p, err = packets.Next() - if err == io.EOF { - return - } else if err != nil { - if _, ok := err.(errors.UnsupportedError); ok { - err = nil - continue - } - return - } - - if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey { - packets.Unread(p) - return - } - } -} - -// ReadEntity reads an entity (public key, identities, subkeys etc) from the -// given Reader. -func ReadEntity(packets *packet.Reader) (*Entity, error) { - e := new(Entity) - e.Identities = make(map[string]*Identity) - - p, err := packets.Next() - if err != nil { - return nil, err - } - - var ok bool - if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok { - if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok { - packets.Unread(p) - return nil, errors.StructuralError("first packet was not a public/private key") - } - e.PrimaryKey = &e.PrivateKey.PublicKey - } - - if !e.PrimaryKey.PubKeyAlgo.CanSign() { - return nil, errors.StructuralError("primary key cannot be used for signatures") - } - - var revocations []*packet.Signature -EachPacket: - for { - p, err := packets.Next() - if err == io.EOF { - break - } else if err != nil { - return nil, err - } - - switch pkt := p.(type) { - case *packet.UserId: - if err := addUserID(e, packets, pkt); err != nil { - return nil, err - } - case *packet.Signature: - if pkt.SigType == packet.SigTypeKeyRevocation { - revocations = append(revocations, pkt) - } else if pkt.SigType == packet.SigTypeDirectSignature { - // TODO: RFC4880 5.2.1 permits signatures - // directly on keys (eg. to bind additional - // revocation keys). - } - // Else, ignoring the signature as it does not follow anything - // we would know to attach it to. - case *packet.PrivateKey: - if pkt.IsSubkey == false { - packets.Unread(p) - break EachPacket - } - err = addSubkey(e, packets, &pkt.PublicKey, pkt) - if err != nil { - return nil, err - } - case *packet.PublicKey: - if pkt.IsSubkey == false { - packets.Unread(p) - break EachPacket - } - err = addSubkey(e, packets, pkt, nil) - if err != nil { - return nil, err - } - default: - // we ignore unknown packets - } - } - - if len(e.Identities) == 0 { - return nil, errors.StructuralError("entity without any identities") - } - - for _, revocation := range revocations { - err = e.PrimaryKey.VerifyRevocationSignature(revocation) - if err == nil { - e.Revocations = append(e.Revocations, revocation) - } else { - // TODO: RFC 4880 5.2.3.15 defines revocation keys. - return nil, errors.StructuralError("revocation signature signed by alternate key") - } - } - - return e, nil -} - -func addUserID(e *Entity, packets *packet.Reader, pkt *packet.UserId) error { - // Make a new Identity object, that we might wind up throwing away. - // We'll only add it if we get a valid self-signature over this - // userID. - identity := new(Identity) - identity.Name = pkt.Id - identity.UserId = pkt - - for { - p, err := packets.Next() - if err == io.EOF { - break - } else if err != nil { - return err - } - - sig, ok := p.(*packet.Signature) - if !ok { - packets.Unread(p) - break - } - - if (sig.SigType == packet.SigTypePositiveCert || sig.SigType == packet.SigTypeGenericCert) && sig.IssuerKeyId != nil && *sig.IssuerKeyId == e.PrimaryKey.KeyId { - if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil { - return errors.StructuralError("user ID self-signature invalid: " + err.Error()) - } - identity.SelfSignature = sig - e.Identities[pkt.Id] = identity - } else { - identity.Signatures = append(identity.Signatures, sig) - } - } - - return nil -} - -func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error { - var subKey Subkey - subKey.PublicKey = pub - subKey.PrivateKey = priv - - for { - p, err := packets.Next() - if err == io.EOF { - break - } else if err != nil { - return errors.StructuralError("subkey signature invalid: " + err.Error()) - } - - sig, ok := p.(*packet.Signature) - if !ok { - packets.Unread(p) - break - } - - if sig.SigType != packet.SigTypeSubkeyBinding && sig.SigType != packet.SigTypeSubkeyRevocation { - return errors.StructuralError("subkey signature with wrong type") - } - - if err := e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, sig); err != nil { - return errors.StructuralError("subkey signature invalid: " + err.Error()) - } - - switch sig.SigType { - case packet.SigTypeSubkeyRevocation: - subKey.Sig = sig - case packet.SigTypeSubkeyBinding: - - if shouldReplaceSubkeySig(subKey.Sig, sig) { - subKey.Sig = sig - } - } - } - - if subKey.Sig == nil { - return errors.StructuralError("subkey packet not followed by signature") - } - - e.Subkeys = append(e.Subkeys, subKey) - - return nil -} - -func shouldReplaceSubkeySig(existingSig, potentialNewSig *packet.Signature) bool { - if potentialNewSig == nil { - return false - } - - if existingSig == nil { - return true - } - - if existingSig.SigType == packet.SigTypeSubkeyRevocation { - return false // never override a revocation signature - } - - return potentialNewSig.CreationTime.After(existingSig.CreationTime) -} - -const defaultRSAKeyBits = 2048 - -// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a -// single identity composed of the given full name, comment and email, any of -// which may be empty but must not contain any of "()<>\x00". -// If config is nil, sensible defaults will be used. -func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) { - creationTime := config.Now() - - bits := defaultRSAKeyBits - if config != nil && config.RSABits != 0 { - bits = config.RSABits - } - - uid := packet.NewUserId(name, comment, email) - if uid == nil { - return nil, errors.InvalidArgumentError("user id field contained invalid characters") - } - signingPriv, err := rsa.GenerateKey(config.Random(), bits) - if err != nil { - return nil, err - } - encryptingPriv, err := rsa.GenerateKey(config.Random(), bits) - if err != nil { - return nil, err - } - - e := &Entity{ - PrimaryKey: packet.NewRSAPublicKey(creationTime, &signingPriv.PublicKey), - PrivateKey: packet.NewRSAPrivateKey(creationTime, signingPriv), - Identities: make(map[string]*Identity), - } - isPrimaryId := true - e.Identities[uid.Id] = &Identity{ - Name: uid.Id, - UserId: uid, - SelfSignature: &packet.Signature{ - CreationTime: creationTime, - SigType: packet.SigTypePositiveCert, - PubKeyAlgo: packet.PubKeyAlgoRSA, - Hash: config.Hash(), - IsPrimaryId: &isPrimaryId, - FlagsValid: true, - FlagSign: true, - FlagCertify: true, - IssuerKeyId: &e.PrimaryKey.KeyId, - }, - } - err = e.Identities[uid.Id].SelfSignature.SignUserId(uid.Id, e.PrimaryKey, e.PrivateKey, config) - if err != nil { - return nil, err - } - - // If the user passes in a DefaultHash via packet.Config, - // set the PreferredHash for the SelfSignature. - if config != nil && config.DefaultHash != 0 { - e.Identities[uid.Id].SelfSignature.PreferredHash = []uint8{hashToHashId(config.DefaultHash)} - } - - // Likewise for DefaultCipher. - if config != nil && config.DefaultCipher != 0 { - e.Identities[uid.Id].SelfSignature.PreferredSymmetric = []uint8{uint8(config.DefaultCipher)} - } - - e.Subkeys = make([]Subkey, 1) - e.Subkeys[0] = Subkey{ - PublicKey: packet.NewRSAPublicKey(creationTime, &encryptingPriv.PublicKey), - PrivateKey: packet.NewRSAPrivateKey(creationTime, encryptingPriv), - Sig: &packet.Signature{ - CreationTime: creationTime, - SigType: packet.SigTypeSubkeyBinding, - PubKeyAlgo: packet.PubKeyAlgoRSA, - Hash: config.Hash(), - FlagsValid: true, - FlagEncryptStorage: true, - FlagEncryptCommunications: true, - IssuerKeyId: &e.PrimaryKey.KeyId, - }, - } - e.Subkeys[0].PublicKey.IsSubkey = true - e.Subkeys[0].PrivateKey.IsSubkey = true - err = e.Subkeys[0].Sig.SignKey(e.Subkeys[0].PublicKey, e.PrivateKey, config) - if err != nil { - return nil, err - } - return e, nil -} - -// SerializePrivate serializes an Entity, including private key material, but -// excluding signatures from other entities, to the given Writer. -// Identities and subkeys are re-signed in case they changed since NewEntry. -// If config is nil, sensible defaults will be used. -func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) { - err = e.PrivateKey.Serialize(w) - if err != nil { - return - } - for _, ident := range e.Identities { - err = ident.UserId.Serialize(w) - if err != nil { - return - } - err = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config) - if err != nil { - return - } - err = ident.SelfSignature.Serialize(w) - if err != nil { - return - } - } - for _, subkey := range e.Subkeys { - err = subkey.PrivateKey.Serialize(w) - if err != nil { - return - } - err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config) - if err != nil { - return - } - err = subkey.Sig.Serialize(w) - if err != nil { - return - } - } - return nil -} - -// Serialize writes the public part of the given Entity to w, including -// signatures from other entities. No private key material will be output. -func (e *Entity) Serialize(w io.Writer) error { - err := e.PrimaryKey.Serialize(w) - if err != nil { - return err - } - for _, ident := range e.Identities { - err = ident.UserId.Serialize(w) - if err != nil { - return err - } - err = ident.SelfSignature.Serialize(w) - if err != nil { - return err - } - for _, sig := range ident.Signatures { - err = sig.Serialize(w) - if err != nil { - return err - } - } - } - for _, subkey := range e.Subkeys { - err = subkey.PublicKey.Serialize(w) - if err != nil { - return err - } - err = subkey.Sig.Serialize(w) - if err != nil { - return err - } - } - return nil -} - -// SignIdentity adds a signature to e, from signer, attesting that identity is -// associated with e. The provided identity must already be an element of -// e.Identities and the private key of signer must have been decrypted if -// necessary. -// If config is nil, sensible defaults will be used. -func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error { - if signer.PrivateKey == nil { - return errors.InvalidArgumentError("signing Entity must have a private key") - } - if signer.PrivateKey.Encrypted { - return errors.InvalidArgumentError("signing Entity's private key must be decrypted") - } - ident, ok := e.Identities[identity] - if !ok { - return errors.InvalidArgumentError("given identity string not found in Entity") - } - - sig := &packet.Signature{ - SigType: packet.SigTypeGenericCert, - PubKeyAlgo: signer.PrivateKey.PubKeyAlgo, - Hash: config.Hash(), - CreationTime: config.Now(), - IssuerKeyId: &signer.PrivateKey.KeyId, - } - if err := sig.SignUserId(identity, e.PrimaryKey, signer.PrivateKey, config); err != nil { - return err - } - ident.Signatures = append(ident.Signatures, sig) - return nil -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/compressed.go b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go deleted file mode 100644 index 353f9452..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/compressed.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "compress/bzip2" - "compress/flate" - "compress/zlib" - "golang.org/x/crypto/openpgp/errors" - "io" - "strconv" -) - -// Compressed represents a compressed OpenPGP packet. The decompressed contents -// will contain more OpenPGP packets. See RFC 4880, section 5.6. -type Compressed struct { - Body io.Reader -} - -const ( - NoCompression = flate.NoCompression - BestSpeed = flate.BestSpeed - BestCompression = flate.BestCompression - DefaultCompression = flate.DefaultCompression -) - -// CompressionConfig contains compressor configuration settings. -type CompressionConfig struct { - // Level is the compression level to use. It must be set to - // between -1 and 9, with -1 causing the compressor to use the - // default compression level, 0 causing the compressor to use - // no compression and 1 to 9 representing increasing (better, - // slower) compression levels. If Level is less than -1 or - // more then 9, a non-nil error will be returned during - // encryption. See the constants above for convenient common - // settings for Level. - Level int -} - -func (c *Compressed) parse(r io.Reader) error { - var buf [1]byte - _, err := readFull(r, buf[:]) - if err != nil { - return err - } - - switch buf[0] { - case 1: - c.Body = flate.NewReader(r) - case 2: - c.Body, err = zlib.NewReader(r) - case 3: - c.Body = bzip2.NewReader(r) - default: - err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0]))) - } - - return err -} - -// compressedWriteCloser represents the serialized compression stream -// header and the compressor. Its Close() method ensures that both the -// compressor and serialized stream header are closed. Its Write() -// method writes to the compressor. -type compressedWriteCloser struct { - sh io.Closer // Stream Header - c io.WriteCloser // Compressor -} - -func (cwc compressedWriteCloser) Write(p []byte) (int, error) { - return cwc.c.Write(p) -} - -func (cwc compressedWriteCloser) Close() (err error) { - err = cwc.c.Close() - if err != nil { - return err - } - - return cwc.sh.Close() -} - -// SerializeCompressed serializes a compressed data packet to w and -// returns a WriteCloser to which the literal data packets themselves -// can be written and which MUST be closed on completion. If cc is -// nil, sensible defaults will be used to configure the compression -// algorithm. -func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) { - compressed, err := serializeStreamHeader(w, packetTypeCompressed) - if err != nil { - return - } - - _, err = compressed.Write([]byte{uint8(algo)}) - if err != nil { - return - } - - level := DefaultCompression - if cc != nil { - level = cc.Level - } - - var compressor io.WriteCloser - switch algo { - case CompressionZIP: - compressor, err = flate.NewWriter(compressed, level) - case CompressionZLIB: - compressor, err = zlib.NewWriterLevel(compressed, level) - default: - s := strconv.Itoa(int(algo)) - err = errors.UnsupportedError("Unsupported compression algorithm: " + s) - } - if err != nil { - return - } - - literaldata = compressedWriteCloser{compressed, compressor} - - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/config.go b/vendor/golang.org/x/crypto/openpgp/packet/config.go deleted file mode 100644 index c76eecc9..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/config.go +++ /dev/null @@ -1,91 +0,0 @@ -// 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. - -package packet - -import ( - "crypto" - "crypto/rand" - "io" - "time" -) - -// Config collects a number of parameters along with sensible defaults. -// A nil *Config is valid and results in all default values. -type Config struct { - // Rand provides the source of entropy. - // If nil, the crypto/rand Reader is used. - Rand io.Reader - // DefaultHash is the default hash function to be used. - // If zero, SHA-256 is used. - DefaultHash crypto.Hash - // DefaultCipher is the cipher to be used. - // If zero, AES-128 is used. - DefaultCipher CipherFunction - // Time returns the current time as the number of seconds since the - // epoch. If Time is nil, time.Now is used. - Time func() time.Time - // DefaultCompressionAlgo is the compression algorithm to be - // applied to the plaintext before encryption. If zero, no - // compression is done. - DefaultCompressionAlgo CompressionAlgo - // CompressionConfig configures the compression settings. - CompressionConfig *CompressionConfig - // S2KCount is only used for symmetric encryption. It - // determines the strength of the passphrase stretching when - // the said passphrase is hashed to produce a key. S2KCount - // should be between 1024 and 65011712, inclusive. If Config - // is nil or S2KCount is 0, the value 65536 used. Not all - // values in the above range can be represented. S2KCount will - // be rounded up to the next representable value if it cannot - // be encoded exactly. When set, it is strongly encrouraged to - // use a value that is at least 65536. See RFC 4880 Section - // 3.7.1.3. - S2KCount int - // RSABits is the number of bits in new RSA keys made with NewEntity. - // If zero, then 2048 bit keys are created. - RSABits int -} - -func (c *Config) Random() io.Reader { - if c == nil || c.Rand == nil { - return rand.Reader - } - return c.Rand -} - -func (c *Config) Hash() crypto.Hash { - if c == nil || uint(c.DefaultHash) == 0 { - return crypto.SHA256 - } - return c.DefaultHash -} - -func (c *Config) Cipher() CipherFunction { - if c == nil || uint8(c.DefaultCipher) == 0 { - return CipherAES128 - } - return c.DefaultCipher -} - -func (c *Config) Now() time.Time { - if c == nil || c.Time == nil { - return time.Now() - } - return c.Time() -} - -func (c *Config) Compression() CompressionAlgo { - if c == nil { - return CompressionNone - } - return c.DefaultCompressionAlgo -} - -func (c *Config) PasswordHashIterations() int { - if c == nil || c.S2KCount == 0 { - return 0 - } - return c.S2KCount -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go b/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go deleted file mode 100644 index 6d763972..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "crypto" - "crypto/rsa" - "encoding/binary" - "io" - "math/big" - "strconv" - - "golang.org/x/crypto/openpgp/elgamal" - "golang.org/x/crypto/openpgp/errors" -) - -const encryptedKeyVersion = 3 - -// EncryptedKey represents a public-key encrypted session key. See RFC 4880, -// section 5.1. -type EncryptedKey struct { - KeyId uint64 - Algo PublicKeyAlgorithm - CipherFunc CipherFunction // only valid after a successful Decrypt - Key []byte // only valid after a successful Decrypt - - encryptedMPI1, encryptedMPI2 parsedMPI -} - -func (e *EncryptedKey) parse(r io.Reader) (err error) { - var buf [10]byte - _, err = readFull(r, buf[:]) - if err != nil { - return - } - if buf[0] != encryptedKeyVersion { - return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0]))) - } - e.KeyId = binary.BigEndian.Uint64(buf[1:9]) - e.Algo = PublicKeyAlgorithm(buf[9]) - switch e.Algo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) - if err != nil { - return - } - case PubKeyAlgoElGamal: - e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) - if err != nil { - return - } - e.encryptedMPI2.bytes, e.encryptedMPI2.bitLength, err = readMPI(r) - if err != nil { - return - } - } - _, err = consumeAll(r) - return -} - -func checksumKeyMaterial(key []byte) uint16 { - var checksum uint16 - for _, v := range key { - checksum += uint16(v) - } - return checksum -} - -// Decrypt decrypts an encrypted session key with the given private key. The -// private key must have been decrypted first. -// If config is nil, sensible defaults will be used. -func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error { - var err error - var b []byte - - // TODO(agl): use session key decryption routines here to avoid - // padding oracle attacks. - switch priv.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - // Supports both *rsa.PrivateKey and crypto.Decrypter - k := priv.PrivateKey.(crypto.Decrypter) - b, err = k.Decrypt(config.Random(), padToKeySize(k.Public().(*rsa.PublicKey), e.encryptedMPI1.bytes), nil) - case PubKeyAlgoElGamal: - c1 := new(big.Int).SetBytes(e.encryptedMPI1.bytes) - c2 := new(big.Int).SetBytes(e.encryptedMPI2.bytes) - b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2) - default: - err = errors.InvalidArgumentError("cannot decrypted encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo))) - } - - if err != nil { - return err - } - - e.CipherFunc = CipherFunction(b[0]) - e.Key = b[1 : len(b)-2] - expectedChecksum := uint16(b[len(b)-2])<<8 | uint16(b[len(b)-1]) - checksum := checksumKeyMaterial(e.Key) - if checksum != expectedChecksum { - return errors.StructuralError("EncryptedKey checksum incorrect") - } - - return nil -} - -// Serialize writes the encrypted key packet, e, to w. -func (e *EncryptedKey) Serialize(w io.Writer) error { - var mpiLen int - switch e.Algo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - mpiLen = 2 + len(e.encryptedMPI1.bytes) - case PubKeyAlgoElGamal: - mpiLen = 2 + len(e.encryptedMPI1.bytes) + 2 + len(e.encryptedMPI2.bytes) - default: - return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo))) - } - - serializeHeader(w, packetTypeEncryptedKey, 1 /* version */ +8 /* key id */ +1 /* algo */ +mpiLen) - - w.Write([]byte{encryptedKeyVersion}) - binary.Write(w, binary.BigEndian, e.KeyId) - w.Write([]byte{byte(e.Algo)}) - - switch e.Algo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - writeMPIs(w, e.encryptedMPI1) - case PubKeyAlgoElGamal: - writeMPIs(w, e.encryptedMPI1, e.encryptedMPI2) - default: - panic("internal error") - } - - return nil -} - -// SerializeEncryptedKey serializes an encrypted key packet to w that contains -// key, encrypted to pub. -// If config is nil, sensible defaults will be used. -func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error { - var buf [10]byte - buf[0] = encryptedKeyVersion - binary.BigEndian.PutUint64(buf[1:9], pub.KeyId) - buf[9] = byte(pub.PubKeyAlgo) - - keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */) - keyBlock[0] = byte(cipherFunc) - copy(keyBlock[1:], key) - checksum := checksumKeyMaterial(key) - keyBlock[1+len(key)] = byte(checksum >> 8) - keyBlock[1+len(key)+1] = byte(checksum) - - switch pub.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: - return serializeEncryptedKeyRSA(w, config.Random(), buf, pub.PublicKey.(*rsa.PublicKey), keyBlock) - case PubKeyAlgoElGamal: - return serializeEncryptedKeyElGamal(w, config.Random(), buf, pub.PublicKey.(*elgamal.PublicKey), keyBlock) - case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly: - return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) - } - - return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) -} - -func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header [10]byte, pub *rsa.PublicKey, keyBlock []byte) error { - cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock) - if err != nil { - return errors.InvalidArgumentError("RSA encryption failed: " + err.Error()) - } - - packetLen := 10 /* header length */ + 2 /* mpi size */ + len(cipherText) - - err = serializeHeader(w, packetTypeEncryptedKey, packetLen) - if err != nil { - return err - } - _, err = w.Write(header[:]) - if err != nil { - return err - } - return writeMPI(w, 8*uint16(len(cipherText)), cipherText) -} - -func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header [10]byte, pub *elgamal.PublicKey, keyBlock []byte) error { - c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock) - if err != nil { - return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error()) - } - - packetLen := 10 /* header length */ - packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8 - packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8 - - err = serializeHeader(w, packetTypeEncryptedKey, packetLen) - if err != nil { - return err - } - _, err = w.Write(header[:]) - if err != nil { - return err - } - err = writeBig(w, c1) - if err != nil { - return err - } - return writeBig(w, c2) -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/literal.go b/vendor/golang.org/x/crypto/openpgp/packet/literal.go deleted file mode 100644 index 1a9ec6e5..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/literal.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "encoding/binary" - "io" -) - -// LiteralData represents an encrypted file. See RFC 4880, section 5.9. -type LiteralData struct { - IsBinary bool - FileName string - Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined. - Body io.Reader -} - -// ForEyesOnly returns whether the contents of the LiteralData have been marked -// as especially sensitive. -func (l *LiteralData) ForEyesOnly() bool { - return l.FileName == "_CONSOLE" -} - -func (l *LiteralData) parse(r io.Reader) (err error) { - var buf [256]byte - - _, err = readFull(r, buf[:2]) - if err != nil { - return - } - - l.IsBinary = buf[0] == 'b' - fileNameLen := int(buf[1]) - - _, err = readFull(r, buf[:fileNameLen]) - if err != nil { - return - } - - l.FileName = string(buf[:fileNameLen]) - - _, err = readFull(r, buf[:4]) - if err != nil { - return - } - - l.Time = binary.BigEndian.Uint32(buf[:4]) - l.Body = r - return -} - -// SerializeLiteral serializes a literal data packet to w and returns a -// WriteCloser to which the data itself can be written and which MUST be closed -// on completion. The fileName is truncated to 255 bytes. -func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) { - var buf [4]byte - buf[0] = 't' - if isBinary { - buf[0] = 'b' - } - if len(fileName) > 255 { - fileName = fileName[:255] - } - buf[1] = byte(len(fileName)) - - inner, err := serializeStreamHeader(w, packetTypeLiteralData) - if err != nil { - return - } - - _, err = inner.Write(buf[:2]) - if err != nil { - return - } - _, err = inner.Write([]byte(fileName)) - if err != nil { - return - } - binary.BigEndian.PutUint32(buf[:], time) - _, err = inner.Write(buf[:]) - if err != nil { - return - } - - plaintext = inner - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go b/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go deleted file mode 100644 index ce2a33a5..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2010 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. - -// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9 - -package packet - -import ( - "crypto/cipher" -) - -type ocfbEncrypter struct { - b cipher.Block - fre []byte - outUsed int -} - -// An OCFBResyncOption determines if the "resynchronization step" of OCFB is -// performed. -type OCFBResyncOption bool - -const ( - OCFBResync OCFBResyncOption = true - OCFBNoResync OCFBResyncOption = false -) - -// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's -// cipher feedback mode using the given cipher.Block, and an initial amount of -// ciphertext. randData must be random bytes and be the same length as the -// cipher.Block's block size. Resync determines if the "resynchronization step" -// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on -// this point. -func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) { - blockSize := block.BlockSize() - if len(randData) != blockSize { - return nil, nil - } - - x := &ocfbEncrypter{ - b: block, - fre: make([]byte, blockSize), - outUsed: 0, - } - prefix := make([]byte, blockSize+2) - - block.Encrypt(x.fre, x.fre) - for i := 0; i < blockSize; i++ { - prefix[i] = randData[i] ^ x.fre[i] - } - - block.Encrypt(x.fre, prefix[:blockSize]) - prefix[blockSize] = x.fre[0] ^ randData[blockSize-2] - prefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1] - - if resync { - block.Encrypt(x.fre, prefix[2:]) - } else { - x.fre[0] = prefix[blockSize] - x.fre[1] = prefix[blockSize+1] - x.outUsed = 2 - } - return x, prefix -} - -func (x *ocfbEncrypter) XORKeyStream(dst, src []byte) { - for i := 0; i < len(src); i++ { - if x.outUsed == len(x.fre) { - x.b.Encrypt(x.fre, x.fre) - x.outUsed = 0 - } - - x.fre[x.outUsed] ^= src[i] - dst[i] = x.fre[x.outUsed] - x.outUsed++ - } -} - -type ocfbDecrypter struct { - b cipher.Block - fre []byte - outUsed int -} - -// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's -// cipher feedback mode using the given cipher.Block. Prefix must be the first -// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's -// block size. If an incorrect key is detected then nil is returned. On -// successful exit, blockSize+2 bytes of decrypted data are written into -// prefix. Resync determines if the "resynchronization step" from RFC 4880, -// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point. -func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream { - blockSize := block.BlockSize() - if len(prefix) != blockSize+2 { - return nil - } - - x := &ocfbDecrypter{ - b: block, - fre: make([]byte, blockSize), - outUsed: 0, - } - prefixCopy := make([]byte, len(prefix)) - copy(prefixCopy, prefix) - - block.Encrypt(x.fre, x.fre) - for i := 0; i < blockSize; i++ { - prefixCopy[i] ^= x.fre[i] - } - - block.Encrypt(x.fre, prefix[:blockSize]) - prefixCopy[blockSize] ^= x.fre[0] - prefixCopy[blockSize+1] ^= x.fre[1] - - if prefixCopy[blockSize-2] != prefixCopy[blockSize] || - prefixCopy[blockSize-1] != prefixCopy[blockSize+1] { - return nil - } - - if resync { - block.Encrypt(x.fre, prefix[2:]) - } else { - x.fre[0] = prefix[blockSize] - x.fre[1] = prefix[blockSize+1] - x.outUsed = 2 - } - copy(prefix, prefixCopy) - return x -} - -func (x *ocfbDecrypter) XORKeyStream(dst, src []byte) { - for i := 0; i < len(src); i++ { - if x.outUsed == len(x.fre) { - x.b.Encrypt(x.fre, x.fre) - x.outUsed = 0 - } - - c := src[i] - dst[i] = x.fre[x.outUsed] ^ src[i] - x.fre[x.outUsed] = c - x.outUsed++ - } -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go deleted file mode 100644 index 17135033..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "crypto" - "encoding/binary" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" - "io" - "strconv" -) - -// OnePassSignature represents a one-pass signature packet. See RFC 4880, -// section 5.4. -type OnePassSignature struct { - SigType SignatureType - Hash crypto.Hash - PubKeyAlgo PublicKeyAlgorithm - KeyId uint64 - IsLast bool -} - -const onePassSignatureVersion = 3 - -func (ops *OnePassSignature) parse(r io.Reader) (err error) { - var buf [13]byte - - _, err = readFull(r, buf[:]) - if err != nil { - return - } - if buf[0] != onePassSignatureVersion { - err = errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0]))) - } - - var ok bool - ops.Hash, ok = s2k.HashIdToHash(buf[2]) - if !ok { - return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2]))) - } - - ops.SigType = SignatureType(buf[1]) - ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3]) - ops.KeyId = binary.BigEndian.Uint64(buf[4:12]) - ops.IsLast = buf[12] != 0 - return -} - -// Serialize marshals the given OnePassSignature to w. -func (ops *OnePassSignature) Serialize(w io.Writer) error { - var buf [13]byte - buf[0] = onePassSignatureVersion - buf[1] = uint8(ops.SigType) - var ok bool - buf[2], ok = s2k.HashToHashId(ops.Hash) - if !ok { - return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash))) - } - buf[3] = uint8(ops.PubKeyAlgo) - binary.BigEndian.PutUint64(buf[4:12], ops.KeyId) - if ops.IsLast { - buf[12] = 1 - } - - if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err != nil { - return err - } - _, err := w.Write(buf[:]) - return err -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/opaque.go b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go deleted file mode 100644 index 39844773..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/opaque.go +++ /dev/null @@ -1,161 +0,0 @@ -// 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. - -package packet - -import ( - "bytes" - "io" - - "golang.org/x/crypto/openpgp/errors" -) - -// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is -// useful for splitting and storing the original packet contents separately, -// handling unsupported packet types or accessing parts of the packet not yet -// implemented by this package. -type OpaquePacket struct { - // Packet type - Tag uint8 - // Reason why the packet was parsed opaquely - Reason error - // Binary contents of the packet data - Contents []byte -} - -func (op *OpaquePacket) parse(r io.Reader) (err error) { - op.Contents, err = io.ReadAll(r) - return -} - -// Serialize marshals the packet to a writer in its original form, including -// the packet header. -func (op *OpaquePacket) Serialize(w io.Writer) (err error) { - err = serializeHeader(w, packetType(op.Tag), len(op.Contents)) - if err == nil { - _, err = w.Write(op.Contents) - } - return -} - -// Parse attempts to parse the opaque contents into a structure supported by -// this package. If the packet is not known then the result will be another -// OpaquePacket. -func (op *OpaquePacket) Parse() (p Packet, err error) { - hdr := bytes.NewBuffer(nil) - err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents)) - if err != nil { - op.Reason = err - return op, err - } - p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents))) - if err != nil { - op.Reason = err - p = op - } - return -} - -// OpaqueReader reads OpaquePackets from an io.Reader. -type OpaqueReader struct { - r io.Reader -} - -func NewOpaqueReader(r io.Reader) *OpaqueReader { - return &OpaqueReader{r: r} -} - -// Read the next OpaquePacket. -func (or *OpaqueReader) Next() (op *OpaquePacket, err error) { - tag, _, contents, err := readHeader(or.r) - if err != nil { - return - } - op = &OpaquePacket{Tag: uint8(tag), Reason: err} - err = op.parse(contents) - if err != nil { - consumeAll(contents) - } - return -} - -// OpaqueSubpacket represents an unparsed OpenPGP subpacket, -// as found in signature and user attribute packets. -type OpaqueSubpacket struct { - SubType uint8 - Contents []byte -} - -// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from -// their byte representation. -func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) { - var ( - subHeaderLen int - subPacket *OpaqueSubpacket - ) - for len(contents) > 0 { - subHeaderLen, subPacket, err = nextSubpacket(contents) - if err != nil { - break - } - result = append(result, subPacket) - contents = contents[subHeaderLen+len(subPacket.Contents):] - } - return -} - -func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) { - // RFC 4880, section 5.2.3.1 - var subLen uint32 - if len(contents) < 1 { - goto Truncated - } - subPacket = &OpaqueSubpacket{} - switch { - case contents[0] < 192: - subHeaderLen = 2 // 1 length byte, 1 subtype byte - if len(contents) < subHeaderLen { - goto Truncated - } - subLen = uint32(contents[0]) - contents = contents[1:] - case contents[0] < 255: - subHeaderLen = 3 // 2 length bytes, 1 subtype - if len(contents) < subHeaderLen { - goto Truncated - } - subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192 - contents = contents[2:] - default: - subHeaderLen = 6 // 5 length bytes, 1 subtype - if len(contents) < subHeaderLen { - goto Truncated - } - subLen = uint32(contents[1])<<24 | - uint32(contents[2])<<16 | - uint32(contents[3])<<8 | - uint32(contents[4]) - contents = contents[5:] - } - if subLen > uint32(len(contents)) || subLen == 0 { - goto Truncated - } - subPacket.SubType = contents[0] - subPacket.Contents = contents[1:subLen] - return -Truncated: - err = errors.StructuralError("subpacket truncated") - return -} - -func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) { - buf := make([]byte, 6) - n := serializeSubpacketLength(buf, len(osp.Contents)+1) - buf[n] = osp.SubType - if _, err = w.Write(buf[:n+1]); err != nil { - return - } - _, err = w.Write(osp.Contents) - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go deleted file mode 100644 index 0a19794a..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/packet.go +++ /dev/null @@ -1,590 +0,0 @@ -// Copyright 2011 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 packet implements parsing and serialization of OpenPGP packets, as -// specified in RFC 4880. -// -// Deprecated: this package is unmaintained except for security fixes. New -// applications should consider a more focused, modern alternative to OpenPGP -// for their specific task. If you are required to interoperate with OpenPGP -// systems and need a maintained package, consider a community fork. -// See https://golang.org/issue/44226. -package packet // import "golang.org/x/crypto/openpgp/packet" - -import ( - "bufio" - "crypto/aes" - "crypto/cipher" - "crypto/des" - "crypto/rsa" - "io" - "math/big" - "math/bits" - - "golang.org/x/crypto/cast5" - "golang.org/x/crypto/openpgp/errors" -) - -// readFull is the same as io.ReadFull except that reading zero bytes returns -// ErrUnexpectedEOF rather than EOF. -func readFull(r io.Reader, buf []byte) (n int, err error) { - n, err = io.ReadFull(r, buf) - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return -} - -// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2. -func readLength(r io.Reader) (length int64, isPartial bool, err error) { - var buf [4]byte - _, err = readFull(r, buf[:1]) - if err != nil { - return - } - switch { - case buf[0] < 192: - length = int64(buf[0]) - case buf[0] < 224: - length = int64(buf[0]-192) << 8 - _, err = readFull(r, buf[0:1]) - if err != nil { - return - } - length += int64(buf[0]) + 192 - case buf[0] < 255: - length = int64(1) << (buf[0] & 0x1f) - isPartial = true - default: - _, err = readFull(r, buf[0:4]) - if err != nil { - return - } - length = int64(buf[0])<<24 | - int64(buf[1])<<16 | - int64(buf[2])<<8 | - int64(buf[3]) - } - return -} - -// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths. -// The continuation lengths are parsed and removed from the stream and EOF is -// returned at the end of the packet. See RFC 4880, section 4.2.2.4. -type partialLengthReader struct { - r io.Reader - remaining int64 - isPartial bool -} - -func (r *partialLengthReader) Read(p []byte) (n int, err error) { - for r.remaining == 0 { - if !r.isPartial { - return 0, io.EOF - } - r.remaining, r.isPartial, err = readLength(r.r) - if err != nil { - return 0, err - } - } - - toRead := int64(len(p)) - if toRead > r.remaining { - toRead = r.remaining - } - - n, err = r.r.Read(p[:int(toRead)]) - r.remaining -= int64(n) - if n < int(toRead) && err == io.EOF { - err = io.ErrUnexpectedEOF - } - return -} - -// partialLengthWriter writes a stream of data using OpenPGP partial lengths. -// See RFC 4880, section 4.2.2.4. -type partialLengthWriter struct { - w io.WriteCloser - lengthByte [1]byte - sentFirst bool - buf []byte -} - -// RFC 4880 4.2.2.4: the first partial length MUST be at least 512 octets long. -const minFirstPartialWrite = 512 - -func (w *partialLengthWriter) Write(p []byte) (n int, err error) { - off := 0 - if !w.sentFirst { - if len(w.buf) > 0 || len(p) < minFirstPartialWrite { - off = len(w.buf) - w.buf = append(w.buf, p...) - if len(w.buf) < minFirstPartialWrite { - return len(p), nil - } - p = w.buf - w.buf = nil - } - w.sentFirst = true - } - - power := uint8(30) - for len(p) > 0 { - l := 1 << power - if len(p) < l { - power = uint8(bits.Len32(uint32(len(p)))) - 1 - l = 1 << power - } - w.lengthByte[0] = 224 + power - _, err = w.w.Write(w.lengthByte[:]) - if err == nil { - var m int - m, err = w.w.Write(p[:l]) - n += m - } - if err != nil { - if n < off { - return 0, err - } - return n - off, err - } - p = p[l:] - } - return n - off, nil -} - -func (w *partialLengthWriter) Close() error { - if len(w.buf) > 0 { - // In this case we can't send a 512 byte packet. - // Just send what we have. - p := w.buf - w.sentFirst = true - w.buf = nil - if _, err := w.Write(p); err != nil { - return err - } - } - - w.lengthByte[0] = 0 - _, err := w.w.Write(w.lengthByte[:]) - if err != nil { - return err - } - return w.w.Close() -} - -// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the -// underlying Reader returns EOF before the limit has been reached. -type spanReader struct { - r io.Reader - n int64 -} - -func (l *spanReader) Read(p []byte) (n int, err error) { - if l.n <= 0 { - return 0, io.EOF - } - if int64(len(p)) > l.n { - p = p[0:l.n] - } - n, err = l.r.Read(p) - l.n -= int64(n) - if l.n > 0 && err == io.EOF { - err = io.ErrUnexpectedEOF - } - return -} - -// readHeader parses a packet header and returns an io.Reader which will return -// the contents of the packet. See RFC 4880, section 4.2. -func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) { - var buf [4]byte - _, err = io.ReadFull(r, buf[:1]) - if err != nil { - return - } - if buf[0]&0x80 == 0 { - err = errors.StructuralError("tag byte does not have MSB set") - return - } - if buf[0]&0x40 == 0 { - // Old format packet - tag = packetType((buf[0] & 0x3f) >> 2) - lengthType := buf[0] & 3 - if lengthType == 3 { - length = -1 - contents = r - return - } - lengthBytes := 1 << lengthType - _, err = readFull(r, buf[0:lengthBytes]) - if err != nil { - return - } - for i := 0; i < lengthBytes; i++ { - length <<= 8 - length |= int64(buf[i]) - } - contents = &spanReader{r, length} - return - } - - // New format packet - tag = packetType(buf[0] & 0x3f) - length, isPartial, err := readLength(r) - if err != nil { - return - } - if isPartial { - contents = &partialLengthReader{ - remaining: length, - isPartial: true, - r: r, - } - length = -1 - } else { - contents = &spanReader{r, length} - } - return -} - -// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section -// 4.2. -func serializeHeader(w io.Writer, ptype packetType, length int) (err error) { - var buf [6]byte - var n int - - buf[0] = 0x80 | 0x40 | byte(ptype) - if length < 192 { - buf[1] = byte(length) - n = 2 - } else if length < 8384 { - length -= 192 - buf[1] = 192 + byte(length>>8) - buf[2] = byte(length) - n = 3 - } else { - buf[1] = 255 - buf[2] = byte(length >> 24) - buf[3] = byte(length >> 16) - buf[4] = byte(length >> 8) - buf[5] = byte(length) - n = 6 - } - - _, err = w.Write(buf[:n]) - return -} - -// serializeStreamHeader writes an OpenPGP packet header to w where the -// length of the packet is unknown. It returns a io.WriteCloser which can be -// used to write the contents of the packet. See RFC 4880, section 4.2. -func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) { - var buf [1]byte - buf[0] = 0x80 | 0x40 | byte(ptype) - _, err = w.Write(buf[:]) - if err != nil { - return - } - out = &partialLengthWriter{w: w} - return -} - -// Packet represents an OpenPGP packet. Users are expected to try casting -// instances of this interface to specific packet types. -type Packet interface { - parse(io.Reader) error -} - -// consumeAll reads from the given Reader until error, returning the number of -// bytes read. -func consumeAll(r io.Reader) (n int64, err error) { - var m int - var buf [1024]byte - - for { - m, err = r.Read(buf[:]) - n += int64(m) - if err == io.EOF { - err = nil - return - } - if err != nil { - return - } - } -} - -// packetType represents the numeric ids of the different OpenPGP packet types. See -// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2 -type packetType uint8 - -const ( - packetTypeEncryptedKey packetType = 1 - packetTypeSignature packetType = 2 - packetTypeSymmetricKeyEncrypted packetType = 3 - packetTypeOnePassSignature packetType = 4 - packetTypePrivateKey packetType = 5 - packetTypePublicKey packetType = 6 - packetTypePrivateSubkey packetType = 7 - packetTypeCompressed packetType = 8 - packetTypeSymmetricallyEncrypted packetType = 9 - packetTypeLiteralData packetType = 11 - packetTypeUserId packetType = 13 - packetTypePublicSubkey packetType = 14 - packetTypeUserAttribute packetType = 17 - packetTypeSymmetricallyEncryptedMDC packetType = 18 -) - -// peekVersion detects the version of a public key packet about to -// be read. A bufio.Reader at the original position of the io.Reader -// is returned. -func peekVersion(r io.Reader) (bufr *bufio.Reader, ver byte, err error) { - bufr = bufio.NewReader(r) - var verBuf []byte - if verBuf, err = bufr.Peek(1); err != nil { - return - } - ver = verBuf[0] - return -} - -// Read reads a single OpenPGP packet from the given io.Reader. If there is an -// error parsing a packet, the whole packet is consumed from the input. -func Read(r io.Reader) (p Packet, err error) { - tag, _, contents, err := readHeader(r) - if err != nil { - return - } - - switch tag { - case packetTypeEncryptedKey: - p = new(EncryptedKey) - case packetTypeSignature: - var version byte - // Detect signature version - if contents, version, err = peekVersion(contents); err != nil { - return - } - if version < 4 { - p = new(SignatureV3) - } else { - p = new(Signature) - } - case packetTypeSymmetricKeyEncrypted: - p = new(SymmetricKeyEncrypted) - case packetTypeOnePassSignature: - p = new(OnePassSignature) - case packetTypePrivateKey, packetTypePrivateSubkey: - pk := new(PrivateKey) - if tag == packetTypePrivateSubkey { - pk.IsSubkey = true - } - p = pk - case packetTypePublicKey, packetTypePublicSubkey: - var version byte - if contents, version, err = peekVersion(contents); err != nil { - return - } - isSubkey := tag == packetTypePublicSubkey - if version < 4 { - p = &PublicKeyV3{IsSubkey: isSubkey} - } else { - p = &PublicKey{IsSubkey: isSubkey} - } - case packetTypeCompressed: - p = new(Compressed) - case packetTypeSymmetricallyEncrypted: - p = new(SymmetricallyEncrypted) - case packetTypeLiteralData: - p = new(LiteralData) - case packetTypeUserId: - p = new(UserId) - case packetTypeUserAttribute: - p = new(UserAttribute) - case packetTypeSymmetricallyEncryptedMDC: - se := new(SymmetricallyEncrypted) - se.MDC = true - p = se - default: - err = errors.UnknownPacketTypeError(tag) - } - if p != nil { - err = p.parse(contents) - } - if err != nil { - consumeAll(contents) - } - return -} - -// SignatureType represents the different semantic meanings of an OpenPGP -// signature. See RFC 4880, section 5.2.1. -type SignatureType uint8 - -const ( - SigTypeBinary SignatureType = 0 - SigTypeText = 1 - SigTypeGenericCert = 0x10 - SigTypePersonaCert = 0x11 - SigTypeCasualCert = 0x12 - SigTypePositiveCert = 0x13 - SigTypeSubkeyBinding = 0x18 - SigTypePrimaryKeyBinding = 0x19 - SigTypeDirectSignature = 0x1F - SigTypeKeyRevocation = 0x20 - SigTypeSubkeyRevocation = 0x28 -) - -// PublicKeyAlgorithm represents the different public key system specified for -// OpenPGP. See -// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12 -type PublicKeyAlgorithm uint8 - -const ( - PubKeyAlgoRSA PublicKeyAlgorithm = 1 - PubKeyAlgoElGamal PublicKeyAlgorithm = 16 - PubKeyAlgoDSA PublicKeyAlgorithm = 17 - // RFC 6637, Section 5. - PubKeyAlgoECDH PublicKeyAlgorithm = 18 - PubKeyAlgoECDSA PublicKeyAlgorithm = 19 - - // Deprecated in RFC 4880, Section 13.5. Use key flags instead. - PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2 - PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3 -) - -// CanEncrypt returns true if it's possible to encrypt a message to a public -// key of the given type. -func (pka PublicKeyAlgorithm) CanEncrypt() bool { - switch pka { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal: - return true - } - return false -} - -// CanSign returns true if it's possible for a public key of the given type to -// sign a message. -func (pka PublicKeyAlgorithm) CanSign() bool { - switch pka { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: - return true - } - return false -} - -// CipherFunction represents the different block ciphers specified for OpenPGP. See -// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13 -type CipherFunction uint8 - -const ( - Cipher3DES CipherFunction = 2 - CipherCAST5 CipherFunction = 3 - CipherAES128 CipherFunction = 7 - CipherAES192 CipherFunction = 8 - CipherAES256 CipherFunction = 9 -) - -// KeySize returns the key size, in bytes, of cipher. -func (cipher CipherFunction) KeySize() int { - switch cipher { - case Cipher3DES: - return 24 - case CipherCAST5: - return cast5.KeySize - case CipherAES128: - return 16 - case CipherAES192: - return 24 - case CipherAES256: - return 32 - } - return 0 -} - -// blockSize returns the block size, in bytes, of cipher. -func (cipher CipherFunction) blockSize() int { - switch cipher { - case Cipher3DES: - return des.BlockSize - case CipherCAST5: - return 8 - case CipherAES128, CipherAES192, CipherAES256: - return 16 - } - return 0 -} - -// new returns a fresh instance of the given cipher. -func (cipher CipherFunction) new(key []byte) (block cipher.Block) { - switch cipher { - case Cipher3DES: - block, _ = des.NewTripleDESCipher(key) - case CipherCAST5: - block, _ = cast5.NewCipher(key) - case CipherAES128, CipherAES192, CipherAES256: - block, _ = aes.NewCipher(key) - } - return -} - -// readMPI reads a big integer from r. The bit length returned is the bit -// length that was specified in r. This is preserved so that the integer can be -// reserialized exactly. -func readMPI(r io.Reader) (mpi []byte, bitLength uint16, err error) { - var buf [2]byte - _, err = readFull(r, buf[0:]) - if err != nil { - return - } - bitLength = uint16(buf[0])<<8 | uint16(buf[1]) - numBytes := (int(bitLength) + 7) / 8 - mpi = make([]byte, numBytes) - _, err = readFull(r, mpi) - // According to RFC 4880 3.2. we should check that the MPI has no leading - // zeroes (at least when not an encrypted MPI?), but this implementation - // does generate leading zeroes, so we keep accepting them. - return -} - -// writeMPI serializes a big integer to w. -func writeMPI(w io.Writer, bitLength uint16, mpiBytes []byte) (err error) { - // Note that we can produce leading zeroes, in violation of RFC 4880 3.2. - // Implementations seem to be tolerant of them, and stripping them would - // make it complex to guarantee matching re-serialization. - _, err = w.Write([]byte{byte(bitLength >> 8), byte(bitLength)}) - if err == nil { - _, err = w.Write(mpiBytes) - } - return -} - -// writeBig serializes a *big.Int to w. -func writeBig(w io.Writer, i *big.Int) error { - return writeMPI(w, uint16(i.BitLen()), i.Bytes()) -} - -// padToKeySize left-pads a MPI with zeroes to match the length of the -// specified RSA public. -func padToKeySize(pub *rsa.PublicKey, b []byte) []byte { - k := (pub.N.BitLen() + 7) / 8 - if len(b) >= k { - return b - } - bb := make([]byte, k) - copy(bb[len(bb)-len(b):], b) - return bb -} - -// CompressionAlgo Represents the different compression algorithms -// supported by OpenPGP (except for BZIP2, which is not currently -// supported). See Section 9.3 of RFC 4880. -type CompressionAlgo uint8 - -const ( - CompressionNone CompressionAlgo = 0 - CompressionZIP CompressionAlgo = 1 - CompressionZLIB CompressionAlgo = 2 -) diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go deleted file mode 100644 index 192aac37..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/cipher" - "crypto/dsa" - "crypto/ecdsa" - "crypto/rsa" - "crypto/sha1" - "io" - "math/big" - "strconv" - "time" - - "golang.org/x/crypto/openpgp/elgamal" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" -) - -// PrivateKey represents a possibly encrypted private key. See RFC 4880, -// section 5.5.3. -type PrivateKey struct { - PublicKey - Encrypted bool // if true then the private key is unavailable until Decrypt has been called. - encryptedData []byte - cipher CipherFunction - s2k func(out, in []byte) - PrivateKey interface{} // An *{rsa|dsa|ecdsa}.PrivateKey or crypto.Signer/crypto.Decrypter (Decryptor RSA only). - sha1Checksum bool - iv []byte -} - -func NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -func NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -func NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -func NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey { - pk := new(PrivateKey) - pk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey) - pk.PrivateKey = priv - return pk -} - -// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that -// implements RSA or ECDSA. -func NewSignerPrivateKey(creationTime time.Time, signer crypto.Signer) *PrivateKey { - pk := new(PrivateKey) - // In general, the public Keys should be used as pointers. We still - // type-switch on the values, for backwards-compatibility. - switch pubkey := signer.Public().(type) { - case *rsa.PublicKey: - pk.PublicKey = *NewRSAPublicKey(creationTime, pubkey) - case rsa.PublicKey: - pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey) - case *ecdsa.PublicKey: - pk.PublicKey = *NewECDSAPublicKey(creationTime, pubkey) - case ecdsa.PublicKey: - pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey) - default: - panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey") - } - pk.PrivateKey = signer - return pk -} - -func (pk *PrivateKey) parse(r io.Reader) (err error) { - err = (&pk.PublicKey).parse(r) - if err != nil { - return - } - var buf [1]byte - _, err = readFull(r, buf[:]) - if err != nil { - return - } - - s2kType := buf[0] - - switch s2kType { - case 0: - pk.s2k = nil - pk.Encrypted = false - case 254, 255: - _, err = readFull(r, buf[:]) - if err != nil { - return - } - pk.cipher = CipherFunction(buf[0]) - pk.Encrypted = true - pk.s2k, err = s2k.Parse(r) - if err != nil { - return - } - if s2kType == 254 { - pk.sha1Checksum = true - } - default: - return errors.UnsupportedError("deprecated s2k function in private key") - } - - if pk.Encrypted { - blockSize := pk.cipher.blockSize() - if blockSize == 0 { - return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher))) - } - pk.iv = make([]byte, blockSize) - _, err = readFull(r, pk.iv) - if err != nil { - return - } - } - - pk.encryptedData, err = io.ReadAll(r) - if err != nil { - return - } - - if !pk.Encrypted { - return pk.parsePrivateKey(pk.encryptedData) - } - - return -} - -func mod64kHash(d []byte) uint16 { - var h uint16 - for _, b := range d { - h += uint16(b) - } - return h -} - -func (pk *PrivateKey) Serialize(w io.Writer) (err error) { - // TODO(agl): support encrypted private keys - buf := bytes.NewBuffer(nil) - err = pk.PublicKey.serializeWithoutHeaders(buf) - if err != nil { - return - } - buf.WriteByte(0 /* no encryption */) - - privateKeyBuf := bytes.NewBuffer(nil) - - switch priv := pk.PrivateKey.(type) { - case *rsa.PrivateKey: - err = serializeRSAPrivateKey(privateKeyBuf, priv) - case *dsa.PrivateKey: - err = serializeDSAPrivateKey(privateKeyBuf, priv) - case *elgamal.PrivateKey: - err = serializeElGamalPrivateKey(privateKeyBuf, priv) - case *ecdsa.PrivateKey: - err = serializeECDSAPrivateKey(privateKeyBuf, priv) - default: - err = errors.InvalidArgumentError("unknown private key type") - } - if err != nil { - return - } - - ptype := packetTypePrivateKey - contents := buf.Bytes() - privateKeyBytes := privateKeyBuf.Bytes() - if pk.IsSubkey { - ptype = packetTypePrivateSubkey - } - err = serializeHeader(w, ptype, len(contents)+len(privateKeyBytes)+2) - if err != nil { - return - } - _, err = w.Write(contents) - if err != nil { - return - } - _, err = w.Write(privateKeyBytes) - if err != nil { - return - } - - checksum := mod64kHash(privateKeyBytes) - var checksumBytes [2]byte - checksumBytes[0] = byte(checksum >> 8) - checksumBytes[1] = byte(checksum) - _, err = w.Write(checksumBytes[:]) - - return -} - -func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error { - err := writeBig(w, priv.D) - if err != nil { - return err - } - err = writeBig(w, priv.Primes[1]) - if err != nil { - return err - } - err = writeBig(w, priv.Primes[0]) - if err != nil { - return err - } - return writeBig(w, priv.Precomputed.Qinv) -} - -func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error { - return writeBig(w, priv.X) -} - -func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error { - return writeBig(w, priv.X) -} - -func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error { - return writeBig(w, priv.D) -} - -// Decrypt decrypts an encrypted private key using a passphrase. -func (pk *PrivateKey) Decrypt(passphrase []byte) error { - if !pk.Encrypted { - return nil - } - - key := make([]byte, pk.cipher.KeySize()) - pk.s2k(key, passphrase) - block := pk.cipher.new(key) - cfb := cipher.NewCFBDecrypter(block, pk.iv) - - data := make([]byte, len(pk.encryptedData)) - cfb.XORKeyStream(data, pk.encryptedData) - - if pk.sha1Checksum { - if len(data) < sha1.Size { - return errors.StructuralError("truncated private key data") - } - h := sha1.New() - h.Write(data[:len(data)-sha1.Size]) - sum := h.Sum(nil) - if !bytes.Equal(sum, data[len(data)-sha1.Size:]) { - return errors.StructuralError("private key checksum failure") - } - data = data[:len(data)-sha1.Size] - } else { - if len(data) < 2 { - return errors.StructuralError("truncated private key data") - } - var sum uint16 - for i := 0; i < len(data)-2; i++ { - sum += uint16(data[i]) - } - if data[len(data)-2] != uint8(sum>>8) || - data[len(data)-1] != uint8(sum) { - return errors.StructuralError("private key checksum failure") - } - data = data[:len(data)-2] - } - - return pk.parsePrivateKey(data) -} - -func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) { - switch pk.PublicKey.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly: - return pk.parseRSAPrivateKey(data) - case PubKeyAlgoDSA: - return pk.parseDSAPrivateKey(data) - case PubKeyAlgoElGamal: - return pk.parseElGamalPrivateKey(data) - case PubKeyAlgoECDSA: - return pk.parseECDSAPrivateKey(data) - } - panic("impossible") -} - -func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) { - rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey) - rsaPriv := new(rsa.PrivateKey) - rsaPriv.PublicKey = *rsaPub - - buf := bytes.NewBuffer(data) - d, _, err := readMPI(buf) - if err != nil { - return - } - p, _, err := readMPI(buf) - if err != nil { - return - } - q, _, err := readMPI(buf) - if err != nil { - return - } - - rsaPriv.D = new(big.Int).SetBytes(d) - rsaPriv.Primes = make([]*big.Int, 2) - rsaPriv.Primes[0] = new(big.Int).SetBytes(p) - rsaPriv.Primes[1] = new(big.Int).SetBytes(q) - if err := rsaPriv.Validate(); err != nil { - return err - } - rsaPriv.Precompute() - pk.PrivateKey = rsaPriv - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} - -func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) { - dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey) - dsaPriv := new(dsa.PrivateKey) - dsaPriv.PublicKey = *dsaPub - - buf := bytes.NewBuffer(data) - x, _, err := readMPI(buf) - if err != nil { - return - } - - dsaPriv.X = new(big.Int).SetBytes(x) - pk.PrivateKey = dsaPriv - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} - -func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) { - pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey) - priv := new(elgamal.PrivateKey) - priv.PublicKey = *pub - - buf := bytes.NewBuffer(data) - x, _, err := readMPI(buf) - if err != nil { - return - } - - priv.X = new(big.Int).SetBytes(x) - pk.PrivateKey = priv - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} - -func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) { - ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey) - - buf := bytes.NewBuffer(data) - d, _, err := readMPI(buf) - if err != nil { - return - } - - pk.PrivateKey = &ecdsa.PrivateKey{ - PublicKey: *ecdsaPub, - D: new(big.Int).SetBytes(d), - } - pk.Encrypted = false - pk.encryptedData = nil - - return nil -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/public_key.go b/vendor/golang.org/x/crypto/openpgp/packet/public_key.go deleted file mode 100644 index fcd5f525..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/public_key.go +++ /dev/null @@ -1,753 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rsa" - "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" - "encoding/binary" - "fmt" - "hash" - "io" - "math/big" - "strconv" - "time" - - "golang.org/x/crypto/openpgp/elgamal" - "golang.org/x/crypto/openpgp/errors" -) - -var ( - // NIST curve P-256 - oidCurveP256 []byte = []byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07} - // NIST curve P-384 - oidCurveP384 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x22} - // NIST curve P-521 - oidCurveP521 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x23} -) - -const maxOIDLength = 8 - -// ecdsaKey stores the algorithm-specific fields for ECDSA keys. -// as defined in RFC 6637, Section 9. -type ecdsaKey struct { - // oid contains the OID byte sequence identifying the elliptic curve used - oid []byte - // p contains the elliptic curve point that represents the public key - p parsedMPI -} - -// parseOID reads the OID for the curve as defined in RFC 6637, Section 9. -func parseOID(r io.Reader) (oid []byte, err error) { - buf := make([]byte, maxOIDLength) - if _, err = readFull(r, buf[:1]); err != nil { - return - } - oidLen := buf[0] - if int(oidLen) > len(buf) { - err = errors.UnsupportedError("invalid oid length: " + strconv.Itoa(int(oidLen))) - return - } - oid = buf[:oidLen] - _, err = readFull(r, oid) - return -} - -func (f *ecdsaKey) parse(r io.Reader) (err error) { - if f.oid, err = parseOID(r); err != nil { - return err - } - f.p.bytes, f.p.bitLength, err = readMPI(r) - return -} - -func (f *ecdsaKey) serialize(w io.Writer) (err error) { - buf := make([]byte, maxOIDLength+1) - buf[0] = byte(len(f.oid)) - copy(buf[1:], f.oid) - if _, err = w.Write(buf[:len(f.oid)+1]); err != nil { - return - } - return writeMPIs(w, f.p) -} - -func (f *ecdsaKey) newECDSA() (*ecdsa.PublicKey, error) { - var c elliptic.Curve - if bytes.Equal(f.oid, oidCurveP256) { - c = elliptic.P256() - } else if bytes.Equal(f.oid, oidCurveP384) { - c = elliptic.P384() - } else if bytes.Equal(f.oid, oidCurveP521) { - c = elliptic.P521() - } else { - return nil, errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", f.oid)) - } - x, y := elliptic.Unmarshal(c, f.p.bytes) - if x == nil { - return nil, errors.UnsupportedError("failed to parse EC point") - } - return &ecdsa.PublicKey{Curve: c, X: x, Y: y}, nil -} - -func (f *ecdsaKey) byteLen() int { - return 1 + len(f.oid) + 2 + len(f.p.bytes) -} - -type kdfHashFunction byte -type kdfAlgorithm byte - -// ecdhKdf stores key derivation function parameters -// used for ECDH encryption. See RFC 6637, Section 9. -type ecdhKdf struct { - KdfHash kdfHashFunction - KdfAlgo kdfAlgorithm -} - -func (f *ecdhKdf) parse(r io.Reader) (err error) { - buf := make([]byte, 1) - if _, err = readFull(r, buf); err != nil { - return - } - kdfLen := int(buf[0]) - if kdfLen < 3 { - return errors.UnsupportedError("Unsupported ECDH KDF length: " + strconv.Itoa(kdfLen)) - } - buf = make([]byte, kdfLen) - if _, err = readFull(r, buf); err != nil { - return - } - reserved := int(buf[0]) - f.KdfHash = kdfHashFunction(buf[1]) - f.KdfAlgo = kdfAlgorithm(buf[2]) - if reserved != 0x01 { - return errors.UnsupportedError("Unsupported KDF reserved field: " + strconv.Itoa(reserved)) - } - return -} - -func (f *ecdhKdf) serialize(w io.Writer) (err error) { - buf := make([]byte, 4) - // See RFC 6637, Section 9, Algorithm-Specific Fields for ECDH keys. - buf[0] = byte(0x03) // Length of the following fields - buf[1] = byte(0x01) // Reserved for future extensions, must be 1 for now - buf[2] = byte(f.KdfHash) - buf[3] = byte(f.KdfAlgo) - _, err = w.Write(buf[:]) - return -} - -func (f *ecdhKdf) byteLen() int { - return 4 -} - -// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2. -type PublicKey struct { - CreationTime time.Time - PubKeyAlgo PublicKeyAlgorithm - PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey or *ecdsa.PublicKey - Fingerprint [20]byte - KeyId uint64 - IsSubkey bool - - n, e, p, q, g, y parsedMPI - - // RFC 6637 fields - ec *ecdsaKey - ecdh *ecdhKdf -} - -// signingKey provides a convenient abstraction over signature verification -// for v3 and v4 public keys. -type signingKey interface { - SerializeSignaturePrefix(io.Writer) - serializeWithoutHeaders(io.Writer) error -} - -func fromBig(n *big.Int) parsedMPI { - return parsedMPI{ - bytes: n.Bytes(), - bitLength: uint16(n.BitLen()), - } -} - -// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey. -func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoRSA, - PublicKey: pub, - n: fromBig(pub.N), - e: fromBig(big.NewInt(int64(pub.E))), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey. -func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoDSA, - PublicKey: pub, - p: fromBig(pub.P), - q: fromBig(pub.Q), - g: fromBig(pub.G), - y: fromBig(pub.Y), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey. -func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoElGamal, - PublicKey: pub, - p: fromBig(pub.P), - g: fromBig(pub.G), - y: fromBig(pub.Y), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey { - pk := &PublicKey{ - CreationTime: creationTime, - PubKeyAlgo: PubKeyAlgoECDSA, - PublicKey: pub, - ec: new(ecdsaKey), - } - - switch pub.Curve { - case elliptic.P256(): - pk.ec.oid = oidCurveP256 - case elliptic.P384(): - pk.ec.oid = oidCurveP384 - case elliptic.P521(): - pk.ec.oid = oidCurveP521 - default: - panic("unknown elliptic curve") - } - - pk.ec.p.bytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y) - - // The bit length is 3 (for the 0x04 specifying an uncompressed key) - // plus two field elements (for x and y), which are rounded up to the - // nearest byte. See https://tools.ietf.org/html/rfc6637#section-6 - fieldBytes := (pub.Curve.Params().BitSize + 7) & ^7 - pk.ec.p.bitLength = uint16(3 + fieldBytes + fieldBytes) - - pk.setFingerPrintAndKeyId() - return pk -} - -func (pk *PublicKey) parse(r io.Reader) (err error) { - // RFC 4880, section 5.5.2 - var buf [6]byte - _, err = readFull(r, buf[:]) - if err != nil { - return - } - if buf[0] != 4 { - return errors.UnsupportedError("public key version") - } - pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) - pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5]) - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - err = pk.parseRSA(r) - case PubKeyAlgoDSA: - err = pk.parseDSA(r) - case PubKeyAlgoElGamal: - err = pk.parseElGamal(r) - case PubKeyAlgoECDSA: - pk.ec = new(ecdsaKey) - if err = pk.ec.parse(r); err != nil { - return err - } - pk.PublicKey, err = pk.ec.newECDSA() - case PubKeyAlgoECDH: - pk.ec = new(ecdsaKey) - if err = pk.ec.parse(r); err != nil { - return - } - pk.ecdh = new(ecdhKdf) - if err = pk.ecdh.parse(r); err != nil { - return - } - // The ECDH key is stored in an ecdsa.PublicKey for convenience. - pk.PublicKey, err = pk.ec.newECDSA() - default: - err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) - } - if err != nil { - return - } - - pk.setFingerPrintAndKeyId() - return -} - -func (pk *PublicKey) setFingerPrintAndKeyId() { - // RFC 4880, section 12.2 - fingerPrint := sha1.New() - pk.SerializeSignaturePrefix(fingerPrint) - pk.serializeWithoutHeaders(fingerPrint) - copy(pk.Fingerprint[:], fingerPrint.Sum(nil)) - pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20]) -} - -// parseRSA parses RSA public key material from the given Reader. See RFC 4880, -// section 5.5.2. -func (pk *PublicKey) parseRSA(r io.Reader) (err error) { - pk.n.bytes, pk.n.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.e.bytes, pk.e.bitLength, err = readMPI(r) - if err != nil { - return - } - - if len(pk.e.bytes) > 3 { - err = errors.UnsupportedError("large public exponent") - return - } - rsa := &rsa.PublicKey{ - N: new(big.Int).SetBytes(pk.n.bytes), - E: 0, - } - for i := 0; i < len(pk.e.bytes); i++ { - rsa.E <<= 8 - rsa.E |= int(pk.e.bytes[i]) - } - pk.PublicKey = rsa - return -} - -// parseDSA parses DSA public key material from the given Reader. See RFC 4880, -// section 5.5.2. -func (pk *PublicKey) parseDSA(r io.Reader) (err error) { - pk.p.bytes, pk.p.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.q.bytes, pk.q.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.g.bytes, pk.g.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.y.bytes, pk.y.bitLength, err = readMPI(r) - if err != nil { - return - } - - dsa := new(dsa.PublicKey) - dsa.P = new(big.Int).SetBytes(pk.p.bytes) - dsa.Q = new(big.Int).SetBytes(pk.q.bytes) - dsa.G = new(big.Int).SetBytes(pk.g.bytes) - dsa.Y = new(big.Int).SetBytes(pk.y.bytes) - pk.PublicKey = dsa - return -} - -// parseElGamal parses ElGamal public key material from the given Reader. See -// RFC 4880, section 5.5.2. -func (pk *PublicKey) parseElGamal(r io.Reader) (err error) { - pk.p.bytes, pk.p.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.g.bytes, pk.g.bitLength, err = readMPI(r) - if err != nil { - return - } - pk.y.bytes, pk.y.bitLength, err = readMPI(r) - if err != nil { - return - } - - elgamal := new(elgamal.PublicKey) - elgamal.P = new(big.Int).SetBytes(pk.p.bytes) - elgamal.G = new(big.Int).SetBytes(pk.g.bytes) - elgamal.Y = new(big.Int).SetBytes(pk.y.bytes) - pk.PublicKey = elgamal - return -} - -// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. -// The prefix is used when calculating a signature over this public key. See -// RFC 4880, section 5.2.4. -func (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) { - var pLength uint16 - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - pLength += 2 + uint16(len(pk.n.bytes)) - pLength += 2 + uint16(len(pk.e.bytes)) - case PubKeyAlgoDSA: - pLength += 2 + uint16(len(pk.p.bytes)) - pLength += 2 + uint16(len(pk.q.bytes)) - pLength += 2 + uint16(len(pk.g.bytes)) - pLength += 2 + uint16(len(pk.y.bytes)) - case PubKeyAlgoElGamal: - pLength += 2 + uint16(len(pk.p.bytes)) - pLength += 2 + uint16(len(pk.g.bytes)) - pLength += 2 + uint16(len(pk.y.bytes)) - case PubKeyAlgoECDSA: - pLength += uint16(pk.ec.byteLen()) - case PubKeyAlgoECDH: - pLength += uint16(pk.ec.byteLen()) - pLength += uint16(pk.ecdh.byteLen()) - default: - panic("unknown public key algorithm") - } - pLength += 6 - h.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) - return -} - -func (pk *PublicKey) Serialize(w io.Writer) (err error) { - length := 6 // 6 byte header - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - length += 2 + len(pk.n.bytes) - length += 2 + len(pk.e.bytes) - case PubKeyAlgoDSA: - length += 2 + len(pk.p.bytes) - length += 2 + len(pk.q.bytes) - length += 2 + len(pk.g.bytes) - length += 2 + len(pk.y.bytes) - case PubKeyAlgoElGamal: - length += 2 + len(pk.p.bytes) - length += 2 + len(pk.g.bytes) - length += 2 + len(pk.y.bytes) - case PubKeyAlgoECDSA: - length += pk.ec.byteLen() - case PubKeyAlgoECDH: - length += pk.ec.byteLen() - length += pk.ecdh.byteLen() - default: - panic("unknown public key algorithm") - } - - packetType := packetTypePublicKey - if pk.IsSubkey { - packetType = packetTypePublicSubkey - } - err = serializeHeader(w, packetType, length) - if err != nil { - return - } - return pk.serializeWithoutHeaders(w) -} - -// serializeWithoutHeaders marshals the PublicKey to w in the form of an -// OpenPGP public key packet, not including the packet header. -func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) { - var buf [6]byte - buf[0] = 4 - t := uint32(pk.CreationTime.Unix()) - buf[1] = byte(t >> 24) - buf[2] = byte(t >> 16) - buf[3] = byte(t >> 8) - buf[4] = byte(t) - buf[5] = byte(pk.PubKeyAlgo) - - _, err = w.Write(buf[:]) - if err != nil { - return - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - return writeMPIs(w, pk.n, pk.e) - case PubKeyAlgoDSA: - return writeMPIs(w, pk.p, pk.q, pk.g, pk.y) - case PubKeyAlgoElGamal: - return writeMPIs(w, pk.p, pk.g, pk.y) - case PubKeyAlgoECDSA: - return pk.ec.serialize(w) - case PubKeyAlgoECDH: - if err = pk.ec.serialize(w); err != nil { - return - } - return pk.ecdh.serialize(w) - } - return errors.InvalidArgumentError("bad public-key algorithm") -} - -// CanSign returns true iff this public key can generate signatures -func (pk *PublicKey) CanSign() bool { - return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal -} - -// VerifySignature returns nil iff sig is a valid signature, made by this -// public key, of the data hashed into signed. signed is mutated by this call. -func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) { - if !pk.CanSign() { - return errors.InvalidArgumentError("public key cannot generate signatures") - } - - signed.Write(sig.HashSuffix) - hashBytes := signed.Sum(nil) - - if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { - return errors.SignatureError("hash tag doesn't match") - } - - if pk.PubKeyAlgo != sig.PubKeyAlgo { - return errors.InvalidArgumentError("public key and signature use different algorithms") - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey) - err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)) - if err != nil { - return errors.SignatureError("RSA verification failure") - } - return nil - case PubKeyAlgoDSA: - dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey) - // Need to truncate hashBytes to match FIPS 186-3 section 4.6. - subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 - if len(hashBytes) > subgroupSize { - hashBytes = hashBytes[:subgroupSize] - } - if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { - return errors.SignatureError("DSA verification failure") - } - return nil - case PubKeyAlgoECDSA: - ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey) - if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.bytes), new(big.Int).SetBytes(sig.ECDSASigS.bytes)) { - return errors.SignatureError("ECDSA verification failure") - } - return nil - default: - return errors.SignatureError("Unsupported public key algorithm used in signature") - } -} - -// VerifySignatureV3 returns nil iff sig is a valid signature, made by this -// public key, of the data hashed into signed. signed is mutated by this call. -func (pk *PublicKey) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { - if !pk.CanSign() { - return errors.InvalidArgumentError("public key cannot generate signatures") - } - - suffix := make([]byte, 5) - suffix[0] = byte(sig.SigType) - binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) - signed.Write(suffix) - hashBytes := signed.Sum(nil) - - if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { - return errors.SignatureError("hash tag doesn't match") - } - - if pk.PubKeyAlgo != sig.PubKeyAlgo { - return errors.InvalidArgumentError("public key and signature use different algorithms") - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - rsaPublicKey := pk.PublicKey.(*rsa.PublicKey) - if err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)); err != nil { - return errors.SignatureError("RSA verification failure") - } - return - case PubKeyAlgoDSA: - dsaPublicKey := pk.PublicKey.(*dsa.PublicKey) - // Need to truncate hashBytes to match FIPS 186-3 section 4.6. - subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 - if len(hashBytes) > subgroupSize { - hashBytes = hashBytes[:subgroupSize] - } - if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { - return errors.SignatureError("DSA verification failure") - } - return nil - default: - panic("shouldn't happen") - } -} - -// keySignatureHash returns a Hash of the message that needs to be signed for -// pk to assert a subkey relationship to signed. -func keySignatureHash(pk, signed signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { - if !hashFunc.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hashFunc.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - signed.SerializeSignaturePrefix(h) - signed.serializeWithoutHeaders(h) - return -} - -// VerifyKeySignature returns nil iff sig is a valid signature, made by this -// public key, of signed. -func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error { - h, err := keySignatureHash(pk, signed, sig.Hash) - if err != nil { - return err - } - if err = pk.VerifySignature(h, sig); err != nil { - return err - } - - if sig.FlagSign { - // Signing subkeys must be cross-signed. See - // https://www.gnupg.org/faq/subkey-cross-certify.html. - if sig.EmbeddedSignature == nil { - return errors.StructuralError("signing subkey is missing cross-signature") - } - // Verify the cross-signature. This is calculated over the same - // data as the main signature, so we cannot just recursively - // call signed.VerifyKeySignature(...) - if h, err = keySignatureHash(pk, signed, sig.EmbeddedSignature.Hash); err != nil { - return errors.StructuralError("error while hashing for cross-signature: " + err.Error()) - } - if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil { - return errors.StructuralError("error while verifying cross-signature: " + err.Error()) - } - } - - return nil -} - -func keyRevocationHash(pk signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { - if !hashFunc.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hashFunc.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - - return -} - -// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this -// public key. -func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) { - h, err := keyRevocationHash(pk, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignature(h, sig) -} - -// userIdSignatureHash returns a Hash of the message that needs to be signed -// to assert that pk is a valid key for id. -func userIdSignatureHash(id string, pk *PublicKey, hashFunc crypto.Hash) (h hash.Hash, err error) { - if !hashFunc.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hashFunc.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - - var buf [5]byte - buf[0] = 0xb4 - buf[1] = byte(len(id) >> 24) - buf[2] = byte(len(id) >> 16) - buf[3] = byte(len(id) >> 8) - buf[4] = byte(len(id)) - h.Write(buf[:]) - h.Write([]byte(id)) - - return -} - -// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this -// public key, that id is the identity of pub. -func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) { - h, err := userIdSignatureHash(id, pub, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignature(h, sig) -} - -// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this -// public key, that id is the identity of pub. -func (pk *PublicKey) VerifyUserIdSignatureV3(id string, pub *PublicKey, sig *SignatureV3) (err error) { - h, err := userIdSignatureV3Hash(id, pub, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignatureV3(h, sig) -} - -// KeyIdString returns the public key's fingerprint in capital hex -// (e.g. "6C7EE1B8621CC013"). -func (pk *PublicKey) KeyIdString() string { - return fmt.Sprintf("%X", pk.Fingerprint[12:20]) -} - -// KeyIdShortString returns the short form of public key's fingerprint -// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). -func (pk *PublicKey) KeyIdShortString() string { - return fmt.Sprintf("%X", pk.Fingerprint[16:20]) -} - -// A parsedMPI is used to store the contents of a big integer, along with the -// bit length that was specified in the original input. This allows the MPI to -// be reserialized exactly. -type parsedMPI struct { - bytes []byte - bitLength uint16 -} - -// writeMPIs is a utility function for serializing several big integers to the -// given Writer. -func writeMPIs(w io.Writer, mpis ...parsedMPI) (err error) { - for _, mpi := range mpis { - err = writeMPI(w, mpi.bitLength, mpi.bytes) - if err != nil { - return - } - } - return -} - -// BitLength returns the bit length for the given public key. -func (pk *PublicKey) BitLength() (bitLength uint16, err error) { - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - bitLength = pk.n.bitLength - case PubKeyAlgoDSA: - bitLength = pk.p.bitLength - case PubKeyAlgoElGamal: - bitLength = pk.p.bitLength - default: - err = errors.InvalidArgumentError("bad public-key algorithm") - } - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go b/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go deleted file mode 100644 index 5daf7b6c..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "crypto" - "crypto/md5" - "crypto/rsa" - "encoding/binary" - "fmt" - "hash" - "io" - "math/big" - "strconv" - "time" - - "golang.org/x/crypto/openpgp/errors" -) - -// PublicKeyV3 represents older, version 3 public keys. These keys are less secure and -// should not be used for signing or encrypting. They are supported here only for -// parsing version 3 key material and validating signatures. -// See RFC 4880, section 5.5.2. -type PublicKeyV3 struct { - CreationTime time.Time - DaysToExpire uint16 - PubKeyAlgo PublicKeyAlgorithm - PublicKey *rsa.PublicKey - Fingerprint [16]byte - KeyId uint64 - IsSubkey bool - - n, e parsedMPI -} - -// newRSAPublicKeyV3 returns a PublicKey that wraps the given rsa.PublicKey. -// Included here for testing purposes only. RFC 4880, section 5.5.2: -// "an implementation MUST NOT generate a V3 key, but MAY accept it." -func newRSAPublicKeyV3(creationTime time.Time, pub *rsa.PublicKey) *PublicKeyV3 { - pk := &PublicKeyV3{ - CreationTime: creationTime, - PublicKey: pub, - n: fromBig(pub.N), - e: fromBig(big.NewInt(int64(pub.E))), - } - - pk.setFingerPrintAndKeyId() - return pk -} - -func (pk *PublicKeyV3) parse(r io.Reader) (err error) { - // RFC 4880, section 5.5.2 - var buf [8]byte - if _, err = readFull(r, buf[:]); err != nil { - return - } - if buf[0] < 2 || buf[0] > 3 { - return errors.UnsupportedError("public key version") - } - pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) - pk.DaysToExpire = binary.BigEndian.Uint16(buf[5:7]) - pk.PubKeyAlgo = PublicKeyAlgorithm(buf[7]) - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - err = pk.parseRSA(r) - default: - err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) - } - if err != nil { - return - } - - pk.setFingerPrintAndKeyId() - return -} - -func (pk *PublicKeyV3) setFingerPrintAndKeyId() { - // RFC 4880, section 12.2 - fingerPrint := md5.New() - fingerPrint.Write(pk.n.bytes) - fingerPrint.Write(pk.e.bytes) - fingerPrint.Sum(pk.Fingerprint[:0]) - pk.KeyId = binary.BigEndian.Uint64(pk.n.bytes[len(pk.n.bytes)-8:]) -} - -// parseRSA parses RSA public key material from the given Reader. See RFC 4880, -// section 5.5.2. -func (pk *PublicKeyV3) parseRSA(r io.Reader) (err error) { - if pk.n.bytes, pk.n.bitLength, err = readMPI(r); err != nil { - return - } - if pk.e.bytes, pk.e.bitLength, err = readMPI(r); err != nil { - return - } - - // RFC 4880 Section 12.2 requires the low 8 bytes of the - // modulus to form the key id. - if len(pk.n.bytes) < 8 { - return errors.StructuralError("v3 public key modulus is too short") - } - if len(pk.e.bytes) > 3 { - err = errors.UnsupportedError("large public exponent") - return - } - rsa := &rsa.PublicKey{N: new(big.Int).SetBytes(pk.n.bytes)} - for i := 0; i < len(pk.e.bytes); i++ { - rsa.E <<= 8 - rsa.E |= int(pk.e.bytes[i]) - } - pk.PublicKey = rsa - return -} - -// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. -// The prefix is used when calculating a signature over this public key. See -// RFC 4880, section 5.2.4. -func (pk *PublicKeyV3) SerializeSignaturePrefix(w io.Writer) { - var pLength uint16 - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - pLength += 2 + uint16(len(pk.n.bytes)) - pLength += 2 + uint16(len(pk.e.bytes)) - default: - panic("unknown public key algorithm") - } - pLength += 6 - w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) - return -} - -func (pk *PublicKeyV3) Serialize(w io.Writer) (err error) { - length := 8 // 8 byte header - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - length += 2 + len(pk.n.bytes) - length += 2 + len(pk.e.bytes) - default: - panic("unknown public key algorithm") - } - - packetType := packetTypePublicKey - if pk.IsSubkey { - packetType = packetTypePublicSubkey - } - if err = serializeHeader(w, packetType, length); err != nil { - return - } - return pk.serializeWithoutHeaders(w) -} - -// serializeWithoutHeaders marshals the PublicKey to w in the form of an -// OpenPGP public key packet, not including the packet header. -func (pk *PublicKeyV3) serializeWithoutHeaders(w io.Writer) (err error) { - var buf [8]byte - // Version 3 - buf[0] = 3 - // Creation time - t := uint32(pk.CreationTime.Unix()) - buf[1] = byte(t >> 24) - buf[2] = byte(t >> 16) - buf[3] = byte(t >> 8) - buf[4] = byte(t) - // Days to expire - buf[5] = byte(pk.DaysToExpire >> 8) - buf[6] = byte(pk.DaysToExpire) - // Public key algorithm - buf[7] = byte(pk.PubKeyAlgo) - - if _, err = w.Write(buf[:]); err != nil { - return - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - return writeMPIs(w, pk.n, pk.e) - } - return errors.InvalidArgumentError("bad public-key algorithm") -} - -// CanSign returns true iff this public key can generate signatures -func (pk *PublicKeyV3) CanSign() bool { - return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly -} - -// VerifySignatureV3 returns nil iff sig is a valid signature, made by this -// public key, of the data hashed into signed. signed is mutated by this call. -func (pk *PublicKeyV3) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { - if !pk.CanSign() { - return errors.InvalidArgumentError("public key cannot generate signatures") - } - - suffix := make([]byte, 5) - suffix[0] = byte(sig.SigType) - binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) - signed.Write(suffix) - hashBytes := signed.Sum(nil) - - if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { - return errors.SignatureError("hash tag doesn't match") - } - - if pk.PubKeyAlgo != sig.PubKeyAlgo { - return errors.InvalidArgumentError("public key and signature use different algorithms") - } - - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - if err = rsa.VerifyPKCS1v15(pk.PublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil { - return errors.SignatureError("RSA verification failure") - } - return - default: - // V3 public keys only support RSA. - panic("shouldn't happen") - } -} - -// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this -// public key, that id is the identity of pub. -func (pk *PublicKeyV3) VerifyUserIdSignatureV3(id string, pub *PublicKeyV3, sig *SignatureV3) (err error) { - h, err := userIdSignatureV3Hash(id, pk, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignatureV3(h, sig) -} - -// VerifyKeySignatureV3 returns nil iff sig is a valid signature, made by this -// public key, of signed. -func (pk *PublicKeyV3) VerifyKeySignatureV3(signed *PublicKeyV3, sig *SignatureV3) (err error) { - h, err := keySignatureHash(pk, signed, sig.Hash) - if err != nil { - return err - } - return pk.VerifySignatureV3(h, sig) -} - -// userIdSignatureV3Hash returns a Hash of the message that needs to be signed -// to assert that pk is a valid key for id. -func userIdSignatureV3Hash(id string, pk signingKey, hfn crypto.Hash) (h hash.Hash, err error) { - if !hfn.Available() { - return nil, errors.UnsupportedError("hash function") - } - h = hfn.New() - - // RFC 4880, section 5.2.4 - pk.SerializeSignaturePrefix(h) - pk.serializeWithoutHeaders(h) - - h.Write([]byte(id)) - - return -} - -// KeyIdString returns the public key's fingerprint in capital hex -// (e.g. "6C7EE1B8621CC013"). -func (pk *PublicKeyV3) KeyIdString() string { - return fmt.Sprintf("%X", pk.KeyId) -} - -// KeyIdShortString returns the short form of public key's fingerprint -// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). -func (pk *PublicKeyV3) KeyIdShortString() string { - return fmt.Sprintf("%X", pk.KeyId&0xFFFFFFFF) -} - -// BitLength returns the bit length for the given public key. -func (pk *PublicKeyV3) BitLength() (bitLength uint16, err error) { - switch pk.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: - bitLength = pk.n.bitLength - default: - err = errors.InvalidArgumentError("bad public-key algorithm") - } - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/reader.go b/vendor/golang.org/x/crypto/openpgp/packet/reader.go deleted file mode 100644 index 34bc7c61..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/reader.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "golang.org/x/crypto/openpgp/errors" - "io" -) - -// Reader reads packets from an io.Reader and allows packets to be 'unread' so -// that they result from the next call to Next. -type Reader struct { - q []Packet - readers []io.Reader -} - -// New io.Readers are pushed when a compressed or encrypted packet is processed -// and recursively treated as a new source of packets. However, a carefully -// crafted packet can trigger an infinite recursive sequence of packets. See -// http://mumble.net/~campbell/misc/pgp-quine -// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402 -// This constant limits the number of recursive packets that may be pushed. -const maxReaders = 32 - -// Next returns the most recently unread Packet, or reads another packet from -// the top-most io.Reader. Unknown packet types are skipped. -func (r *Reader) Next() (p Packet, err error) { - if len(r.q) > 0 { - p = r.q[len(r.q)-1] - r.q = r.q[:len(r.q)-1] - return - } - - for len(r.readers) > 0 { - p, err = Read(r.readers[len(r.readers)-1]) - if err == nil { - return - } - if err == io.EOF { - r.readers = r.readers[:len(r.readers)-1] - continue - } - if _, ok := err.(errors.UnknownPacketTypeError); !ok { - return nil, err - } - } - - return nil, io.EOF -} - -// Push causes the Reader to start reading from a new io.Reader. When an EOF -// error is seen from the new io.Reader, it is popped and the Reader continues -// to read from the next most recent io.Reader. Push returns a StructuralError -// if pushing the reader would exceed the maximum recursion level, otherwise it -// returns nil. -func (r *Reader) Push(reader io.Reader) (err error) { - if len(r.readers) >= maxReaders { - return errors.StructuralError("too many layers of packets") - } - r.readers = append(r.readers, reader) - return nil -} - -// Unread causes the given Packet to be returned from the next call to Next. -func (r *Reader) Unread(p Packet) { - r.q = append(r.q, p) -} - -func NewReader(r io.Reader) *Reader { - return &Reader{ - q: nil, - readers: []io.Reader{r}, - } -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature.go b/vendor/golang.org/x/crypto/openpgp/packet/signature.go deleted file mode 100644 index b2a24a53..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/signature.go +++ /dev/null @@ -1,731 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "encoding/asn1" - "encoding/binary" - "hash" - "io" - "math/big" - "strconv" - "time" - - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" -) - -const ( - // See RFC 4880, section 5.2.3.21 for details. - KeyFlagCertify = 1 << iota - KeyFlagSign - KeyFlagEncryptCommunications - KeyFlagEncryptStorage -) - -// Signature represents a signature. See RFC 4880, section 5.2. -type Signature struct { - SigType SignatureType - PubKeyAlgo PublicKeyAlgorithm - Hash crypto.Hash - - // HashSuffix is extra data that is hashed in after the signed data. - HashSuffix []byte - // HashTag contains the first two bytes of the hash for fast rejection - // of bad signed data. - HashTag [2]byte - CreationTime time.Time - - RSASignature parsedMPI - DSASigR, DSASigS parsedMPI - ECDSASigR, ECDSASigS parsedMPI - - // rawSubpackets contains the unparsed subpackets, in order. - rawSubpackets []outputSubpacket - - // The following are optional so are nil when not included in the - // signature. - - SigLifetimeSecs, KeyLifetimeSecs *uint32 - PreferredSymmetric, PreferredHash, PreferredCompression []uint8 - IssuerKeyId *uint64 - IsPrimaryId *bool - - // FlagsValid is set if any flags were given. See RFC 4880, section - // 5.2.3.21 for details. - FlagsValid bool - FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage bool - - // RevocationReason is set if this signature has been revoked. - // See RFC 4880, section 5.2.3.23 for details. - RevocationReason *uint8 - RevocationReasonText string - - // MDC is set if this signature has a feature packet that indicates - // support for MDC subpackets. - MDC bool - - // EmbeddedSignature, if non-nil, is a signature of the parent key, by - // this key. This prevents an attacker from claiming another's signing - // subkey as their own. - EmbeddedSignature *Signature - - outSubpackets []outputSubpacket -} - -func (sig *Signature) parse(r io.Reader) (err error) { - // RFC 4880, section 5.2.3 - var buf [5]byte - _, err = readFull(r, buf[:1]) - if err != nil { - return - } - if buf[0] != 4 { - err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) - return - } - - _, err = readFull(r, buf[:5]) - if err != nil { - return - } - sig.SigType = SignatureType(buf[0]) - sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1]) - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: - default: - err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) - return - } - - var ok bool - sig.Hash, ok = s2k.HashIdToHash(buf[2]) - if !ok { - return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) - } - - hashedSubpacketsLength := int(buf[3])<<8 | int(buf[4]) - l := 6 + hashedSubpacketsLength - sig.HashSuffix = make([]byte, l+6) - sig.HashSuffix[0] = 4 - copy(sig.HashSuffix[1:], buf[:5]) - hashedSubpackets := sig.HashSuffix[6:l] - _, err = readFull(r, hashedSubpackets) - if err != nil { - return - } - // See RFC 4880, section 5.2.4 - trailer := sig.HashSuffix[l:] - trailer[0] = 4 - trailer[1] = 0xff - trailer[2] = uint8(l >> 24) - trailer[3] = uint8(l >> 16) - trailer[4] = uint8(l >> 8) - trailer[5] = uint8(l) - - err = parseSignatureSubpackets(sig, hashedSubpackets, true) - if err != nil { - return - } - - _, err = readFull(r, buf[:2]) - if err != nil { - return - } - unhashedSubpacketsLength := int(buf[0])<<8 | int(buf[1]) - unhashedSubpackets := make([]byte, unhashedSubpacketsLength) - _, err = readFull(r, unhashedSubpackets) - if err != nil { - return - } - err = parseSignatureSubpackets(sig, unhashedSubpackets, false) - if err != nil { - return - } - - _, err = readFull(r, sig.HashTag[:2]) - if err != nil { - return - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) - case PubKeyAlgoDSA: - sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r) - if err == nil { - sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) - } - case PubKeyAlgoECDSA: - sig.ECDSASigR.bytes, sig.ECDSASigR.bitLength, err = readMPI(r) - if err == nil { - sig.ECDSASigS.bytes, sig.ECDSASigS.bitLength, err = readMPI(r) - } - default: - panic("unreachable") - } - return -} - -// parseSignatureSubpackets parses subpackets of the main signature packet. See -// RFC 4880, section 5.2.3.1. -func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) { - for len(subpackets) > 0 { - subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed) - if err != nil { - return - } - } - - if sig.CreationTime.IsZero() { - err = errors.StructuralError("no creation time in signature") - } - - return -} - -type signatureSubpacketType uint8 - -const ( - creationTimeSubpacket signatureSubpacketType = 2 - signatureExpirationSubpacket signatureSubpacketType = 3 - keyExpirationSubpacket signatureSubpacketType = 9 - prefSymmetricAlgosSubpacket signatureSubpacketType = 11 - issuerSubpacket signatureSubpacketType = 16 - prefHashAlgosSubpacket signatureSubpacketType = 21 - prefCompressionSubpacket signatureSubpacketType = 22 - primaryUserIdSubpacket signatureSubpacketType = 25 - keyFlagsSubpacket signatureSubpacketType = 27 - reasonForRevocationSubpacket signatureSubpacketType = 29 - featuresSubpacket signatureSubpacketType = 30 - embeddedSignatureSubpacket signatureSubpacketType = 32 -) - -// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1. -func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) { - // RFC 4880, section 5.2.3.1 - var ( - length uint32 - packetType signatureSubpacketType - isCritical bool - ) - switch { - case subpacket[0] < 192: - length = uint32(subpacket[0]) - subpacket = subpacket[1:] - case subpacket[0] < 255: - if len(subpacket) < 2 { - goto Truncated - } - length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192 - subpacket = subpacket[2:] - default: - if len(subpacket) < 5 { - goto Truncated - } - length = uint32(subpacket[1])<<24 | - uint32(subpacket[2])<<16 | - uint32(subpacket[3])<<8 | - uint32(subpacket[4]) - subpacket = subpacket[5:] - } - if length > uint32(len(subpacket)) { - goto Truncated - } - rest = subpacket[length:] - subpacket = subpacket[:length] - if len(subpacket) == 0 { - err = errors.StructuralError("zero length signature subpacket") - return - } - packetType = signatureSubpacketType(subpacket[0] & 0x7f) - isCritical = subpacket[0]&0x80 == 0x80 - subpacket = subpacket[1:] - sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket}) - switch packetType { - case creationTimeSubpacket: - if !isHashed { - err = errors.StructuralError("signature creation time in non-hashed area") - return - } - if len(subpacket) != 4 { - err = errors.StructuralError("signature creation time not four bytes") - return - } - t := binary.BigEndian.Uint32(subpacket) - sig.CreationTime = time.Unix(int64(t), 0) - case signatureExpirationSubpacket: - // Signature expiration time, section 5.2.3.10 - if !isHashed { - return - } - if len(subpacket) != 4 { - err = errors.StructuralError("expiration subpacket with bad length") - return - } - sig.SigLifetimeSecs = new(uint32) - *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket) - case keyExpirationSubpacket: - // Key expiration time, section 5.2.3.6 - if !isHashed { - return - } - if len(subpacket) != 4 { - err = errors.StructuralError("key expiration subpacket with bad length") - return - } - sig.KeyLifetimeSecs = new(uint32) - *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket) - case prefSymmetricAlgosSubpacket: - // Preferred symmetric algorithms, section 5.2.3.7 - if !isHashed { - return - } - sig.PreferredSymmetric = make([]byte, len(subpacket)) - copy(sig.PreferredSymmetric, subpacket) - case issuerSubpacket: - // Issuer, section 5.2.3.5 - if len(subpacket) != 8 { - err = errors.StructuralError("issuer subpacket with bad length") - return - } - sig.IssuerKeyId = new(uint64) - *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket) - case prefHashAlgosSubpacket: - // Preferred hash algorithms, section 5.2.3.8 - if !isHashed { - return - } - sig.PreferredHash = make([]byte, len(subpacket)) - copy(sig.PreferredHash, subpacket) - case prefCompressionSubpacket: - // Preferred compression algorithms, section 5.2.3.9 - if !isHashed { - return - } - sig.PreferredCompression = make([]byte, len(subpacket)) - copy(sig.PreferredCompression, subpacket) - case primaryUserIdSubpacket: - // Primary User ID, section 5.2.3.19 - if !isHashed { - return - } - if len(subpacket) != 1 { - err = errors.StructuralError("primary user id subpacket with bad length") - return - } - sig.IsPrimaryId = new(bool) - if subpacket[0] > 0 { - *sig.IsPrimaryId = true - } - case keyFlagsSubpacket: - // Key flags, section 5.2.3.21 - if !isHashed { - return - } - if len(subpacket) == 0 { - err = errors.StructuralError("empty key flags subpacket") - return - } - sig.FlagsValid = true - if subpacket[0]&KeyFlagCertify != 0 { - sig.FlagCertify = true - } - if subpacket[0]&KeyFlagSign != 0 { - sig.FlagSign = true - } - if subpacket[0]&KeyFlagEncryptCommunications != 0 { - sig.FlagEncryptCommunications = true - } - if subpacket[0]&KeyFlagEncryptStorage != 0 { - sig.FlagEncryptStorage = true - } - case reasonForRevocationSubpacket: - // Reason For Revocation, section 5.2.3.23 - if !isHashed { - return - } - if len(subpacket) == 0 { - err = errors.StructuralError("empty revocation reason subpacket") - return - } - sig.RevocationReason = new(uint8) - *sig.RevocationReason = subpacket[0] - sig.RevocationReasonText = string(subpacket[1:]) - case featuresSubpacket: - // Features subpacket, section 5.2.3.24 specifies a very general - // mechanism for OpenPGP implementations to signal support for new - // features. In practice, the subpacket is used exclusively to - // indicate support for MDC-protected encryption. - sig.MDC = len(subpacket) >= 1 && subpacket[0]&1 == 1 - case embeddedSignatureSubpacket: - // Only usage is in signatures that cross-certify - // signing subkeys. section 5.2.3.26 describes the - // format, with its usage described in section 11.1 - if sig.EmbeddedSignature != nil { - err = errors.StructuralError("Cannot have multiple embedded signatures") - return - } - sig.EmbeddedSignature = new(Signature) - // Embedded signatures are required to be v4 signatures see - // section 12.1. However, we only parse v4 signatures in this - // file anyway. - if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil { - return nil, err - } - if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding { - return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType))) - } - default: - if isCritical { - err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType))) - return - } - } - return - -Truncated: - err = errors.StructuralError("signature subpacket truncated") - return -} - -// subpacketLengthLength returns the length, in bytes, of an encoded length value. -func subpacketLengthLength(length int) int { - if length < 192 { - return 1 - } - if length < 16320 { - return 2 - } - return 5 -} - -// serializeSubpacketLength marshals the given length into to. -func serializeSubpacketLength(to []byte, length int) int { - // RFC 4880, Section 4.2.2. - if length < 192 { - to[0] = byte(length) - return 1 - } - if length < 16320 { - length -= 192 - to[0] = byte((length >> 8) + 192) - to[1] = byte(length) - return 2 - } - to[0] = 255 - to[1] = byte(length >> 24) - to[2] = byte(length >> 16) - to[3] = byte(length >> 8) - to[4] = byte(length) - return 5 -} - -// subpacketsLength returns the serialized length, in bytes, of the given -// subpackets. -func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) { - for _, subpacket := range subpackets { - if subpacket.hashed == hashed { - length += subpacketLengthLength(len(subpacket.contents) + 1) - length += 1 // type byte - length += len(subpacket.contents) - } - } - return -} - -// serializeSubpackets marshals the given subpackets into to. -func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) { - for _, subpacket := range subpackets { - if subpacket.hashed == hashed { - n := serializeSubpacketLength(to, len(subpacket.contents)+1) - to[n] = byte(subpacket.subpacketType) - to = to[1+n:] - n = copy(to, subpacket.contents) - to = to[n:] - } - } - return -} - -// KeyExpired returns whether sig is a self-signature of a key that has -// expired. -func (sig *Signature) KeyExpired(currentTime time.Time) bool { - if sig.KeyLifetimeSecs == nil { - return false - } - expiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second) - return currentTime.After(expiry) -} - -// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing. -func (sig *Signature) buildHashSuffix() (err error) { - hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true) - - var ok bool - l := 6 + hashedSubpacketsLen - sig.HashSuffix = make([]byte, l+6) - sig.HashSuffix[0] = 4 - sig.HashSuffix[1] = uint8(sig.SigType) - sig.HashSuffix[2] = uint8(sig.PubKeyAlgo) - sig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash) - if !ok { - sig.HashSuffix = nil - return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash))) - } - sig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8) - sig.HashSuffix[5] = byte(hashedSubpacketsLen) - serializeSubpackets(sig.HashSuffix[6:l], sig.outSubpackets, true) - trailer := sig.HashSuffix[l:] - trailer[0] = 4 - trailer[1] = 0xff - trailer[2] = byte(l >> 24) - trailer[3] = byte(l >> 16) - trailer[4] = byte(l >> 8) - trailer[5] = byte(l) - return -} - -func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) { - err = sig.buildHashSuffix() - if err != nil { - return - } - - h.Write(sig.HashSuffix) - digest = h.Sum(nil) - copy(sig.HashTag[:], digest) - return -} - -// Sign signs a message with a private key. The hash, h, must contain -// the hash of the message to be signed and will be mutated by this function. -// On success, the signature is stored in sig. Call Serialize to write it out. -// If config is nil, sensible defaults will be used. -func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) { - sig.outSubpackets = sig.buildSubpackets() - digest, err := sig.signPrepareHash(h) - if err != nil { - return - } - - switch priv.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - // supports both *rsa.PrivateKey and crypto.Signer - sig.RSASignature.bytes, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) - sig.RSASignature.bitLength = uint16(8 * len(sig.RSASignature.bytes)) - case PubKeyAlgoDSA: - dsaPriv := priv.PrivateKey.(*dsa.PrivateKey) - - // Need to truncate hashBytes to match FIPS 186-3 section 4.6. - subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8 - if len(digest) > subgroupSize { - digest = digest[:subgroupSize] - } - r, s, err := dsa.Sign(config.Random(), dsaPriv, digest) - if err == nil { - sig.DSASigR.bytes = r.Bytes() - sig.DSASigR.bitLength = uint16(8 * len(sig.DSASigR.bytes)) - sig.DSASigS.bytes = s.Bytes() - sig.DSASigS.bitLength = uint16(8 * len(sig.DSASigS.bytes)) - } - case PubKeyAlgoECDSA: - var r, s *big.Int - if pk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok { - // direct support, avoid asn1 wrapping/unwrapping - r, s, err = ecdsa.Sign(config.Random(), pk, digest) - } else { - var b []byte - b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) - if err == nil { - r, s, err = unwrapECDSASig(b) - } - } - if err == nil { - sig.ECDSASigR = fromBig(r) - sig.ECDSASigS = fromBig(s) - } - default: - err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo))) - } - - return -} - -// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA -// signature. -func unwrapECDSASig(b []byte) (r, s *big.Int, err error) { - var ecsdaSig struct { - R, S *big.Int - } - _, err = asn1.Unmarshal(b, &ecsdaSig) - if err != nil { - return - } - return ecsdaSig.R, ecsdaSig.S, nil -} - -// SignUserId computes a signature from priv, asserting that pub is a valid -// key for the identity id. On success, the signature is stored in sig. Call -// Serialize to write it out. -// If config is nil, sensible defaults will be used. -func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error { - h, err := userIdSignatureHash(id, pub, sig.Hash) - if err != nil { - return err - } - return sig.Sign(h, priv, config) -} - -// SignKey computes a signature from priv, asserting that pub is a subkey. On -// success, the signature is stored in sig. Call Serialize to write it out. -// If config is nil, sensible defaults will be used. -func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error { - h, err := keySignatureHash(&priv.PublicKey, pub, sig.Hash) - if err != nil { - return err - } - return sig.Sign(h, priv, config) -} - -// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been -// called first. -func (sig *Signature) Serialize(w io.Writer) (err error) { - if len(sig.outSubpackets) == 0 { - sig.outSubpackets = sig.rawSubpackets - } - if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil && sig.ECDSASigR.bytes == nil { - return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") - } - - sigLength := 0 - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - sigLength = 2 + len(sig.RSASignature.bytes) - case PubKeyAlgoDSA: - sigLength = 2 + len(sig.DSASigR.bytes) - sigLength += 2 + len(sig.DSASigS.bytes) - case PubKeyAlgoECDSA: - sigLength = 2 + len(sig.ECDSASigR.bytes) - sigLength += 2 + len(sig.ECDSASigS.bytes) - default: - panic("impossible") - } - - unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false) - length := len(sig.HashSuffix) - 6 /* trailer not included */ + - 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen + - 2 /* hash tag */ + sigLength - err = serializeHeader(w, packetTypeSignature, length) - if err != nil { - return - } - - _, err = w.Write(sig.HashSuffix[:len(sig.HashSuffix)-6]) - if err != nil { - return - } - - unhashedSubpackets := make([]byte, 2+unhashedSubpacketsLen) - unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8) - unhashedSubpackets[1] = byte(unhashedSubpacketsLen) - serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false) - - _, err = w.Write(unhashedSubpackets) - if err != nil { - return - } - _, err = w.Write(sig.HashTag[:]) - if err != nil { - return - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - err = writeMPIs(w, sig.RSASignature) - case PubKeyAlgoDSA: - err = writeMPIs(w, sig.DSASigR, sig.DSASigS) - case PubKeyAlgoECDSA: - err = writeMPIs(w, sig.ECDSASigR, sig.ECDSASigS) - default: - panic("impossible") - } - return -} - -// outputSubpacket represents a subpacket to be marshaled. -type outputSubpacket struct { - hashed bool // true if this subpacket is in the hashed area. - subpacketType signatureSubpacketType - isCritical bool - contents []byte -} - -func (sig *Signature) buildSubpackets() (subpackets []outputSubpacket) { - creationTime := make([]byte, 4) - binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix())) - subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime}) - - if sig.IssuerKeyId != nil { - keyId := make([]byte, 8) - binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId) - subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId}) - } - - if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 { - sigLifetime := make([]byte, 4) - binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs) - subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime}) - } - - // Key flags may only appear in self-signatures or certification signatures. - - if sig.FlagsValid { - var flags byte - if sig.FlagCertify { - flags |= KeyFlagCertify - } - if sig.FlagSign { - flags |= KeyFlagSign - } - if sig.FlagEncryptCommunications { - flags |= KeyFlagEncryptCommunications - } - if sig.FlagEncryptStorage { - flags |= KeyFlagEncryptStorage - } - subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}}) - } - - // The following subpackets may only appear in self-signatures - - if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 { - keyLifetime := make([]byte, 4) - binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs) - subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime}) - } - - if sig.IsPrimaryId != nil && *sig.IsPrimaryId { - subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}}) - } - - if len(sig.PreferredSymmetric) > 0 { - subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric}) - } - - if len(sig.PreferredHash) > 0 { - subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash}) - } - - if len(sig.PreferredCompression) > 0 { - subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression}) - } - - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go b/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go deleted file mode 100644 index 6edff889..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "crypto" - "encoding/binary" - "fmt" - "io" - "strconv" - "time" - - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" -) - -// SignatureV3 represents older version 3 signatures. These signatures are less secure -// than version 4 and should not be used to create new signatures. They are included -// here for backwards compatibility to read and validate with older key material. -// See RFC 4880, section 5.2.2. -type SignatureV3 struct { - SigType SignatureType - CreationTime time.Time - IssuerKeyId uint64 - PubKeyAlgo PublicKeyAlgorithm - Hash crypto.Hash - HashTag [2]byte - - RSASignature parsedMPI - DSASigR, DSASigS parsedMPI -} - -func (sig *SignatureV3) parse(r io.Reader) (err error) { - // RFC 4880, section 5.2.2 - var buf [8]byte - if _, err = readFull(r, buf[:1]); err != nil { - return - } - if buf[0] < 2 || buf[0] > 3 { - err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) - return - } - if _, err = readFull(r, buf[:1]); err != nil { - return - } - if buf[0] != 5 { - err = errors.UnsupportedError( - "invalid hashed material length " + strconv.Itoa(int(buf[0]))) - return - } - - // Read hashed material: signature type + creation time - if _, err = readFull(r, buf[:5]); err != nil { - return - } - sig.SigType = SignatureType(buf[0]) - t := binary.BigEndian.Uint32(buf[1:5]) - sig.CreationTime = time.Unix(int64(t), 0) - - // Eight-octet Key ID of signer. - if _, err = readFull(r, buf[:8]); err != nil { - return - } - sig.IssuerKeyId = binary.BigEndian.Uint64(buf[:]) - - // Public-key and hash algorithm - if _, err = readFull(r, buf[:2]); err != nil { - return - } - sig.PubKeyAlgo = PublicKeyAlgorithm(buf[0]) - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA: - default: - err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) - return - } - var ok bool - if sig.Hash, ok = s2k.HashIdToHash(buf[1]); !ok { - return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) - } - - // Two-octet field holding left 16 bits of signed hash value. - if _, err = readFull(r, sig.HashTag[:2]); err != nil { - return - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) - case PubKeyAlgoDSA: - if sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r); err != nil { - return - } - sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) - default: - panic("unreachable") - } - return -} - -// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been -// called first. -func (sig *SignatureV3) Serialize(w io.Writer) (err error) { - buf := make([]byte, 8) - - // Write the sig type and creation time - buf[0] = byte(sig.SigType) - binary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix())) - if _, err = w.Write(buf[:5]); err != nil { - return - } - - // Write the issuer long key ID - binary.BigEndian.PutUint64(buf[:8], sig.IssuerKeyId) - if _, err = w.Write(buf[:8]); err != nil { - return - } - - // Write public key algorithm, hash ID, and hash value - buf[0] = byte(sig.PubKeyAlgo) - hashId, ok := s2k.HashToHashId(sig.Hash) - if !ok { - return errors.UnsupportedError(fmt.Sprintf("hash function %v", sig.Hash)) - } - buf[1] = hashId - copy(buf[2:4], sig.HashTag[:]) - if _, err = w.Write(buf[:4]); err != nil { - return - } - - if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil { - return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") - } - - switch sig.PubKeyAlgo { - case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: - err = writeMPIs(w, sig.RSASignature) - case PubKeyAlgoDSA: - err = writeMPIs(w, sig.DSASigR, sig.DSASigS) - default: - panic("impossible") - } - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go deleted file mode 100644 index 744c2d2c..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "bytes" - "crypto/cipher" - "io" - "strconv" - - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" -) - -// This is the largest session key that we'll support. Since no 512-bit cipher -// has even been seriously used, this is comfortably large. -const maxSessionKeySizeInBytes = 64 - -// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC -// 4880, section 5.3. -type SymmetricKeyEncrypted struct { - CipherFunc CipherFunction - s2k func(out, in []byte) - encryptedKey []byte -} - -const symmetricKeyEncryptedVersion = 4 - -func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error { - // RFC 4880, section 5.3. - var buf [2]byte - if _, err := readFull(r, buf[:]); err != nil { - return err - } - if buf[0] != symmetricKeyEncryptedVersion { - return errors.UnsupportedError("SymmetricKeyEncrypted version") - } - ske.CipherFunc = CipherFunction(buf[1]) - - if ske.CipherFunc.KeySize() == 0 { - return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[1]))) - } - - var err error - ske.s2k, err = s2k.Parse(r) - if err != nil { - return err - } - - encryptedKey := make([]byte, maxSessionKeySizeInBytes) - // The session key may follow. We just have to try and read to find - // out. If it exists then we limit it to maxSessionKeySizeInBytes. - n, err := readFull(r, encryptedKey) - if err != nil && err != io.ErrUnexpectedEOF { - return err - } - - if n != 0 { - if n == maxSessionKeySizeInBytes { - return errors.UnsupportedError("oversized encrypted session key") - } - ske.encryptedKey = encryptedKey[:n] - } - - return nil -} - -// Decrypt attempts to decrypt an encrypted session key and returns the key and -// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data -// packet. -func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) { - key := make([]byte, ske.CipherFunc.KeySize()) - ske.s2k(key, passphrase) - - if len(ske.encryptedKey) == 0 { - return key, ske.CipherFunc, nil - } - - // the IV is all zeros - iv := make([]byte, ske.CipherFunc.blockSize()) - c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv) - plaintextKey := make([]byte, len(ske.encryptedKey)) - c.XORKeyStream(plaintextKey, ske.encryptedKey) - cipherFunc := CipherFunction(plaintextKey[0]) - if cipherFunc.blockSize() == 0 { - return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) - } - plaintextKey = plaintextKey[1:] - if l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() { - return nil, cipherFunc, errors.StructuralError("length of decrypted key (" + strconv.Itoa(l) + ") " + - "not equal to cipher keysize (" + strconv.Itoa(cipherKeySize) + ")") - } - return plaintextKey, cipherFunc, nil -} - -// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. The -// packet contains a random session key, encrypted by a key derived from the -// given passphrase. The session key is returned and must be passed to -// SerializeSymmetricallyEncrypted. -// If config is nil, sensible defaults will be used. -func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) { - cipherFunc := config.Cipher() - keySize := cipherFunc.KeySize() - if keySize == 0 { - return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) - } - - s2kBuf := new(bytes.Buffer) - keyEncryptingKey := make([]byte, keySize) - // s2k.Serialize salts and stretches the passphrase, and writes the - // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf. - err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, &s2k.Config{Hash: config.Hash(), S2KCount: config.PasswordHashIterations()}) - if err != nil { - return - } - s2kBytes := s2kBuf.Bytes() - - packetLength := 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize - err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength) - if err != nil { - return - } - - var buf [2]byte - buf[0] = symmetricKeyEncryptedVersion - buf[1] = byte(cipherFunc) - _, err = w.Write(buf[:]) - if err != nil { - return - } - _, err = w.Write(s2kBytes) - if err != nil { - return - } - - sessionKey := make([]byte, keySize) - _, err = io.ReadFull(config.Random(), sessionKey) - if err != nil { - return - } - iv := make([]byte, cipherFunc.blockSize()) - c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv) - encryptedCipherAndKey := make([]byte, keySize+1) - c.XORKeyStream(encryptedCipherAndKey, buf[1:]) - c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey) - _, err = w.Write(encryptedCipherAndKey) - if err != nil { - return - } - - key = sessionKey - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go deleted file mode 100644 index 1a1a6296..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "crypto/cipher" - "crypto/sha1" - "crypto/subtle" - "golang.org/x/crypto/openpgp/errors" - "hash" - "io" - "strconv" -) - -// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The -// encrypted contents will consist of more OpenPGP packets. See RFC 4880, -// sections 5.7 and 5.13. -type SymmetricallyEncrypted struct { - MDC bool // true iff this is a type 18 packet and thus has an embedded MAC. - contents io.Reader - prefix []byte -} - -const symmetricallyEncryptedVersion = 1 - -func (se *SymmetricallyEncrypted) parse(r io.Reader) error { - if se.MDC { - // See RFC 4880, section 5.13. - var buf [1]byte - _, err := readFull(r, buf[:]) - if err != nil { - return err - } - if buf[0] != symmetricallyEncryptedVersion { - return errors.UnsupportedError("unknown SymmetricallyEncrypted version") - } - } - se.contents = r - return nil -} - -// Decrypt returns a ReadCloser, from which the decrypted contents of the -// packet can be read. An incorrect key can, with high probability, be detected -// immediately and this will result in a KeyIncorrect error being returned. -func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) { - keySize := c.KeySize() - if keySize == 0 { - return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(c))) - } - if len(key) != keySize { - return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length") - } - - if se.prefix == nil { - se.prefix = make([]byte, c.blockSize()+2) - _, err := readFull(se.contents, se.prefix) - if err != nil { - return nil, err - } - } else if len(se.prefix) != c.blockSize()+2 { - return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths") - } - - ocfbResync := OCFBResync - if se.MDC { - // MDC packets use a different form of OCFB mode. - ocfbResync = OCFBNoResync - } - - s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync) - if s == nil { - return nil, errors.ErrKeyIncorrect - } - - plaintext := cipher.StreamReader{S: s, R: se.contents} - - if se.MDC { - // MDC packets have an embedded hash that we need to check. - h := sha1.New() - h.Write(se.prefix) - return &seMDCReader{in: plaintext, h: h}, nil - } - - // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser. - return seReader{plaintext}, nil -} - -// seReader wraps an io.Reader with a no-op Close method. -type seReader struct { - in io.Reader -} - -func (ser seReader) Read(buf []byte) (int, error) { - return ser.in.Read(buf) -} - -func (ser seReader) Close() error { - return nil -} - -const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size - -// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold -// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an -// MDC packet containing a hash of the previous contents which is checked -// against the running hash. See RFC 4880, section 5.13. -type seMDCReader struct { - in io.Reader - h hash.Hash - trailer [mdcTrailerSize]byte - scratch [mdcTrailerSize]byte - trailerUsed int - error bool - eof bool -} - -func (ser *seMDCReader) Read(buf []byte) (n int, err error) { - if ser.error { - err = io.ErrUnexpectedEOF - return - } - if ser.eof { - err = io.EOF - return - } - - // If we haven't yet filled the trailer buffer then we must do that - // first. - for ser.trailerUsed < mdcTrailerSize { - n, err = ser.in.Read(ser.trailer[ser.trailerUsed:]) - ser.trailerUsed += n - if err == io.EOF { - if ser.trailerUsed != mdcTrailerSize { - n = 0 - err = io.ErrUnexpectedEOF - ser.error = true - return - } - ser.eof = true - n = 0 - return - } - - if err != nil { - n = 0 - return - } - } - - // If it's a short read then we read into a temporary buffer and shift - // the data into the caller's buffer. - if len(buf) <= mdcTrailerSize { - n, err = readFull(ser.in, ser.scratch[:len(buf)]) - copy(buf, ser.trailer[:n]) - ser.h.Write(buf[:n]) - copy(ser.trailer[:], ser.trailer[n:]) - copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:]) - if n < len(buf) { - ser.eof = true - err = io.EOF - } - return - } - - n, err = ser.in.Read(buf[mdcTrailerSize:]) - copy(buf, ser.trailer[:]) - ser.h.Write(buf[:n]) - copy(ser.trailer[:], buf[n:]) - - if err == io.EOF { - ser.eof = true - } - return -} - -// This is a new-format packet tag byte for a type 19 (MDC) packet. -const mdcPacketTagByte = byte(0x80) | 0x40 | 19 - -func (ser *seMDCReader) Close() error { - if ser.error { - return errors.SignatureError("error during reading") - } - - for !ser.eof { - // We haven't seen EOF so we need to read to the end - var buf [1024]byte - _, err := ser.Read(buf[:]) - if err == io.EOF { - break - } - if err != nil { - return errors.SignatureError("error during reading") - } - } - - if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size { - return errors.SignatureError("MDC packet not found") - } - ser.h.Write(ser.trailer[:2]) - - final := ser.h.Sum(nil) - if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 { - return errors.SignatureError("hash mismatch") - } - return nil -} - -// An seMDCWriter writes through to an io.WriteCloser while maintains a running -// hash of the data written. On close, it emits an MDC packet containing the -// running hash. -type seMDCWriter struct { - w io.WriteCloser - h hash.Hash -} - -func (w *seMDCWriter) Write(buf []byte) (n int, err error) { - w.h.Write(buf) - return w.w.Write(buf) -} - -func (w *seMDCWriter) Close() (err error) { - var buf [mdcTrailerSize]byte - - buf[0] = mdcPacketTagByte - buf[1] = sha1.Size - w.h.Write(buf[:2]) - digest := w.h.Sum(nil) - copy(buf[2:], digest) - - _, err = w.w.Write(buf[:]) - if err != nil { - return - } - return w.w.Close() -} - -// noOpCloser is like an io.NopCloser, but for an io.Writer. -type noOpCloser struct { - w io.Writer -} - -func (c noOpCloser) Write(data []byte) (n int, err error) { - return c.w.Write(data) -} - -func (c noOpCloser) Close() error { - return nil -} - -// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet -// to w and returns a WriteCloser to which the to-be-encrypted packets can be -// written. -// If config is nil, sensible defaults will be used. -func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte, config *Config) (contents io.WriteCloser, err error) { - if c.KeySize() != len(key) { - return nil, errors.InvalidArgumentError("SymmetricallyEncrypted.Serialize: bad key length") - } - writeCloser := noOpCloser{w} - ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedMDC) - if err != nil { - return - } - - _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersion}) - if err != nil { - return - } - - block := c.new(key) - blockSize := block.BlockSize() - iv := make([]byte, blockSize) - _, err = config.Random().Read(iv) - if err != nil { - return - } - s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync) - _, err = ciphertext.Write(prefix) - if err != nil { - return - } - plaintext := cipher.StreamWriter{S: s, W: ciphertext} - - h := sha1.New() - h.Write(iv) - h.Write(iv[blockSize-2:]) - contents = &seMDCWriter{w: plaintext, h: h} - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go deleted file mode 100644 index ff7ef530..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2013 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 packet - -import ( - "bytes" - "image" - "image/jpeg" - "io" -) - -const UserAttrImageSubpacket = 1 - -// UserAttribute is capable of storing other types of data about a user -// beyond name, email and a text comment. In practice, user attributes are typically used -// to store a signed thumbnail photo JPEG image of the user. -// See RFC 4880, section 5.12. -type UserAttribute struct { - Contents []*OpaqueSubpacket -} - -// NewUserAttributePhoto creates a user attribute packet -// containing the given images. -func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) { - uat = new(UserAttribute) - for _, photo := range photos { - var buf bytes.Buffer - // RFC 4880, Section 5.12.1. - data := []byte{ - 0x10, 0x00, // Little-endian image header length (16 bytes) - 0x01, // Image header version 1 - 0x01, // JPEG - 0, 0, 0, 0, // 12 reserved octets, must be all zero. - 0, 0, 0, 0, - 0, 0, 0, 0} - if _, err = buf.Write(data); err != nil { - return - } - if err = jpeg.Encode(&buf, photo, nil); err != nil { - return - } - uat.Contents = append(uat.Contents, &OpaqueSubpacket{ - SubType: UserAttrImageSubpacket, - Contents: buf.Bytes()}) - } - return -} - -// NewUserAttribute creates a new user attribute packet containing the given subpackets. -func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute { - return &UserAttribute{Contents: contents} -} - -func (uat *UserAttribute) parse(r io.Reader) (err error) { - // RFC 4880, section 5.13 - b, err := io.ReadAll(r) - if err != nil { - return - } - uat.Contents, err = OpaqueSubpackets(b) - return -} - -// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including -// header. -func (uat *UserAttribute) Serialize(w io.Writer) (err error) { - var buf bytes.Buffer - for _, sp := range uat.Contents { - sp.Serialize(&buf) - } - if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil { - return err - } - _, err = w.Write(buf.Bytes()) - return -} - -// ImageData returns zero or more byte slices, each containing -// JPEG File Interchange Format (JFIF), for each photo in the -// user attribute packet. -func (uat *UserAttribute) ImageData() (imageData [][]byte) { - for _, sp := range uat.Contents { - if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 { - imageData = append(imageData, sp.Contents[16:]) - } - } - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userid.go b/vendor/golang.org/x/crypto/openpgp/packet/userid.go deleted file mode 100644 index 359a462e..00000000 --- a/vendor/golang.org/x/crypto/openpgp/packet/userid.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2011 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 packet - -import ( - "io" - "strings" -) - -// UserId contains text that is intended to represent the name and email -// address of the key holder. See RFC 4880, section 5.11. By convention, this -// takes the form "Full Name (Comment) " -type UserId struct { - Id string // By convention, this takes the form "Full Name (Comment) " which is split out in the fields below. - - Name, Comment, Email string -} - -func hasInvalidCharacters(s string) bool { - for _, c := range s { - switch c { - case '(', ')', '<', '>', 0: - return true - } - } - return false -} - -// NewUserId returns a UserId or nil if any of the arguments contain invalid -// characters. The invalid characters are '\x00', '(', ')', '<' and '>' -func NewUserId(name, comment, email string) *UserId { - // RFC 4880 doesn't deal with the structure of userid strings; the - // name, comment and email form is just a convention. However, there's - // no convention about escaping the metacharacters and GPG just refuses - // to create user ids where, say, the name contains a '('. We mirror - // this behaviour. - - if hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) { - return nil - } - - uid := new(UserId) - uid.Name, uid.Comment, uid.Email = name, comment, email - uid.Id = name - if len(comment) > 0 { - if len(uid.Id) > 0 { - uid.Id += " " - } - uid.Id += "(" - uid.Id += comment - uid.Id += ")" - } - if len(email) > 0 { - if len(uid.Id) > 0 { - uid.Id += " " - } - uid.Id += "<" - uid.Id += email - uid.Id += ">" - } - return uid -} - -func (uid *UserId) parse(r io.Reader) (err error) { - // RFC 4880, section 5.11 - b, err := io.ReadAll(r) - if err != nil { - return - } - uid.Id = string(b) - uid.Name, uid.Comment, uid.Email = parseUserId(uid.Id) - return -} - -// Serialize marshals uid to w in the form of an OpenPGP packet, including -// header. -func (uid *UserId) Serialize(w io.Writer) error { - err := serializeHeader(w, packetTypeUserId, len(uid.Id)) - if err != nil { - return err - } - _, err = w.Write([]byte(uid.Id)) - return err -} - -// parseUserId extracts the name, comment and email from a user id string that -// is formatted as "Full Name (Comment) ". -func parseUserId(id string) (name, comment, email string) { - var n, c, e struct { - start, end int - } - var state int - - for offset, rune := range id { - switch state { - case 0: - // Entering name - n.start = offset - state = 1 - fallthrough - case 1: - // In name - if rune == '(' { - state = 2 - n.end = offset - } else if rune == '<' { - state = 5 - n.end = offset - } - case 2: - // Entering comment - c.start = offset - state = 3 - fallthrough - case 3: - // In comment - if rune == ')' { - state = 4 - c.end = offset - } - case 4: - // Between comment and email - if rune == '<' { - state = 5 - } - case 5: - // Entering email - e.start = offset - state = 6 - fallthrough - case 6: - // In email - if rune == '>' { - state = 7 - e.end = offset - } - default: - // After email - } - } - switch state { - case 1: - // ended in the name - n.end = len(id) - case 3: - // ended in comment - c.end = len(id) - case 6: - // ended in email - e.end = len(id) - } - - name = strings.TrimSpace(id[n.start:n.end]) - comment = strings.TrimSpace(id[c.start:c.end]) - email = strings.TrimSpace(id[e.start:e.end]) - return -} diff --git a/vendor/golang.org/x/crypto/openpgp/read.go b/vendor/golang.org/x/crypto/openpgp/read.go deleted file mode 100644 index 48a89314..00000000 --- a/vendor/golang.org/x/crypto/openpgp/read.go +++ /dev/null @@ -1,448 +0,0 @@ -// Copyright 2011 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 openpgp implements high level operations on OpenPGP messages. -// -// Deprecated: this package is unmaintained except for security fixes. New -// applications should consider a more focused, modern alternative to OpenPGP -// for their specific task. If you are required to interoperate with OpenPGP -// systems and need a maintained package, consider a community fork. -// See https://golang.org/issue/44226. -package openpgp // import "golang.org/x/crypto/openpgp" - -import ( - "crypto" - _ "crypto/sha256" - "hash" - "io" - "strconv" - - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" -) - -// SignatureType is the armor type for a PGP signature. -var SignatureType = "PGP SIGNATURE" - -// readArmored reads an armored block with the given type. -func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) { - block, err := armor.Decode(r) - if err != nil { - return - } - - if block.Type != expectedType { - return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type) - } - - return block.Body, nil -} - -// MessageDetails contains the result of parsing an OpenPGP encrypted and/or -// signed message. -type MessageDetails struct { - IsEncrypted bool // true if the message was encrypted. - EncryptedToKeyIds []uint64 // the list of recipient key ids. - IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message. - DecryptedWith Key // the private key used to decrypt the message, if any. - IsSigned bool // true if the message is signed. - SignedByKeyId uint64 // the key id of the signer, if any. - SignedBy *Key // the key of the signer, if available. - LiteralData *packet.LiteralData // the metadata of the contents - UnverifiedBody io.Reader // the contents of the message. - - // If IsSigned is true and SignedBy is non-zero then the signature will - // be verified as UnverifiedBody is read. The signature cannot be - // checked until the whole of UnverifiedBody is read so UnverifiedBody - // must be consumed until EOF before the data can be trusted. Even if a - // message isn't signed (or the signer is unknown) the data may contain - // an authentication code that is only checked once UnverifiedBody has - // been consumed. Once EOF has been seen, the following fields are - // valid. (An authentication code failure is reported as a - // SignatureError error when reading from UnverifiedBody.) - SignatureError error // nil if the signature is good. - Signature *packet.Signature // the signature packet itself, if v4 (default) - SignatureV3 *packet.SignatureV3 // the signature packet if it is a v2 or v3 signature - - decrypted io.ReadCloser -} - -// A PromptFunction is used as a callback by functions that may need to decrypt -// a private key, or prompt for a passphrase. It is called with a list of -// acceptable, encrypted private keys and a boolean that indicates whether a -// passphrase is usable. It should either decrypt a private key or return a -// passphrase to try. If the decrypted private key or given passphrase isn't -// correct, the function will be called again, forever. Any error returned will -// be passed up. -type PromptFunction func(keys []Key, symmetric bool) ([]byte, error) - -// A keyEnvelopePair is used to store a private key with the envelope that -// contains a symmetric key, encrypted with that key. -type keyEnvelopePair struct { - key Key - encryptedKey *packet.EncryptedKey -} - -// ReadMessage parses an OpenPGP message that may be signed and/or encrypted. -// The given KeyRing should contain both public keys (for signature -// verification) and, possibly encrypted, private keys for decrypting. -// If config is nil, sensible defaults will be used. -func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) { - var p packet.Packet - - var symKeys []*packet.SymmetricKeyEncrypted - var pubKeys []keyEnvelopePair - var se *packet.SymmetricallyEncrypted - - packets := packet.NewReader(r) - md = new(MessageDetails) - md.IsEncrypted = true - - // The message, if encrypted, starts with a number of packets - // containing an encrypted decryption key. The decryption key is either - // encrypted to a public key, or with a passphrase. This loop - // collects these packets. -ParsePackets: - for { - p, err = packets.Next() - if err != nil { - return nil, err - } - switch p := p.(type) { - case *packet.SymmetricKeyEncrypted: - // This packet contains the decryption key encrypted with a passphrase. - md.IsSymmetricallyEncrypted = true - symKeys = append(symKeys, p) - case *packet.EncryptedKey: - // This packet contains the decryption key encrypted to a public key. - md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId) - switch p.Algo { - case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal: - break - default: - continue - } - var keys []Key - if p.KeyId == 0 { - keys = keyring.DecryptionKeys() - } else { - keys = keyring.KeysById(p.KeyId) - } - for _, k := range keys { - pubKeys = append(pubKeys, keyEnvelopePair{k, p}) - } - case *packet.SymmetricallyEncrypted: - se = p - break ParsePackets - case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature: - // This message isn't encrypted. - if len(symKeys) != 0 || len(pubKeys) != 0 { - return nil, errors.StructuralError("key material not followed by encrypted message") - } - packets.Unread(p) - return readSignedMessage(packets, nil, keyring) - } - } - - var candidates []Key - var decrypted io.ReadCloser - - // Now that we have the list of encrypted keys we need to decrypt at - // least one of them or, if we cannot, we need to call the prompt - // function so that it can decrypt a key or give us a passphrase. -FindKey: - for { - // See if any of the keys already have a private key available - candidates = candidates[:0] - candidateFingerprints := make(map[string]bool) - - for _, pk := range pubKeys { - if pk.key.PrivateKey == nil { - continue - } - if !pk.key.PrivateKey.Encrypted { - if len(pk.encryptedKey.Key) == 0 { - pk.encryptedKey.Decrypt(pk.key.PrivateKey, config) - } - if len(pk.encryptedKey.Key) == 0 { - continue - } - decrypted, err = se.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key) - if err != nil && err != errors.ErrKeyIncorrect { - return nil, err - } - if decrypted != nil { - md.DecryptedWith = pk.key - break FindKey - } - } else { - fpr := string(pk.key.PublicKey.Fingerprint[:]) - if v := candidateFingerprints[fpr]; v { - continue - } - candidates = append(candidates, pk.key) - candidateFingerprints[fpr] = true - } - } - - if len(candidates) == 0 && len(symKeys) == 0 { - return nil, errors.ErrKeyIncorrect - } - - if prompt == nil { - return nil, errors.ErrKeyIncorrect - } - - passphrase, err := prompt(candidates, len(symKeys) != 0) - if err != nil { - return nil, err - } - - // Try the symmetric passphrase first - if len(symKeys) != 0 && passphrase != nil { - for _, s := range symKeys { - key, cipherFunc, err := s.Decrypt(passphrase) - if err == nil { - decrypted, err = se.Decrypt(cipherFunc, key) - if err != nil && err != errors.ErrKeyIncorrect { - return nil, err - } - if decrypted != nil { - break FindKey - } - } - - } - } - } - - md.decrypted = decrypted - if err := packets.Push(decrypted); err != nil { - return nil, err - } - return readSignedMessage(packets, md, keyring) -} - -// readSignedMessage reads a possibly signed message if mdin is non-zero then -// that structure is updated and returned. Otherwise a fresh MessageDetails is -// used. -func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err error) { - if mdin == nil { - mdin = new(MessageDetails) - } - md = mdin - - var p packet.Packet - var h hash.Hash - var wrappedHash hash.Hash -FindLiteralData: - for { - p, err = packets.Next() - if err != nil { - return nil, err - } - switch p := p.(type) { - case *packet.Compressed: - if err := packets.Push(p.Body); err != nil { - return nil, err - } - case *packet.OnePassSignature: - if !p.IsLast { - return nil, errors.UnsupportedError("nested signatures") - } - - h, wrappedHash, err = hashForSignature(p.Hash, p.SigType) - if err != nil { - md = nil - return - } - - md.IsSigned = true - md.SignedByKeyId = p.KeyId - keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign) - if len(keys) > 0 { - md.SignedBy = &keys[0] - } - case *packet.LiteralData: - md.LiteralData = p - break FindLiteralData - } - } - - if md.SignedBy != nil { - md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md} - } else if md.decrypted != nil { - md.UnverifiedBody = checkReader{md} - } else { - md.UnverifiedBody = md.LiteralData.Body - } - - return md, nil -} - -// hashForSignature returns a pair of hashes that can be used to verify a -// signature. The signature may specify that the contents of the signed message -// should be preprocessed (i.e. to normalize line endings). Thus this function -// returns two hashes. The second should be used to hash the message itself and -// performs any needed preprocessing. -func hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, error) { - if !hashId.Available() { - return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashId))) - } - h := hashId.New() - - switch sigType { - case packet.SigTypeBinary: - return h, h, nil - case packet.SigTypeText: - return h, NewCanonicalTextHash(h), nil - } - - return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType))) -} - -// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF -// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger -// MDC checks. -type checkReader struct { - md *MessageDetails -} - -func (cr checkReader) Read(buf []byte) (n int, err error) { - n, err = cr.md.LiteralData.Body.Read(buf) - if err == io.EOF { - mdcErr := cr.md.decrypted.Close() - if mdcErr != nil { - err = mdcErr - } - } - return -} - -// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes -// the data as it is read. When it sees an EOF from the underlying io.Reader -// it parses and checks a trailing Signature packet and triggers any MDC checks. -type signatureCheckReader struct { - packets *packet.Reader - h, wrappedHash hash.Hash - md *MessageDetails -} - -func (scr *signatureCheckReader) Read(buf []byte) (n int, err error) { - n, err = scr.md.LiteralData.Body.Read(buf) - scr.wrappedHash.Write(buf[:n]) - if err == io.EOF { - var p packet.Packet - p, scr.md.SignatureError = scr.packets.Next() - if scr.md.SignatureError != nil { - return - } - - var ok bool - if scr.md.Signature, ok = p.(*packet.Signature); ok { - scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignature(scr.h, scr.md.Signature) - } else if scr.md.SignatureV3, ok = p.(*packet.SignatureV3); ok { - scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignatureV3(scr.h, scr.md.SignatureV3) - } else { - scr.md.SignatureError = errors.StructuralError("LiteralData not followed by Signature") - return - } - - // The SymmetricallyEncrypted packet, if any, might have an - // unsigned hash of its own. In order to check this we need to - // close that Reader. - if scr.md.decrypted != nil { - mdcErr := scr.md.decrypted.Close() - if mdcErr != nil { - err = mdcErr - } - } - } - return -} - -// CheckDetachedSignature takes a signed file and a detached signature and -// returns the signer if the signature is valid. If the signer isn't known, -// ErrUnknownIssuer is returned. -func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { - var issuerKeyId uint64 - var hashFunc crypto.Hash - var sigType packet.SignatureType - var keys []Key - var p packet.Packet - - packets := packet.NewReader(signature) - for { - p, err = packets.Next() - if err == io.EOF { - return nil, errors.ErrUnknownIssuer - } - if err != nil { - return nil, err - } - - switch sig := p.(type) { - case *packet.Signature: - if sig.IssuerKeyId == nil { - return nil, errors.StructuralError("signature doesn't have an issuer") - } - issuerKeyId = *sig.IssuerKeyId - hashFunc = sig.Hash - sigType = sig.SigType - case *packet.SignatureV3: - issuerKeyId = sig.IssuerKeyId - hashFunc = sig.Hash - sigType = sig.SigType - default: - return nil, errors.StructuralError("non signature packet found") - } - - keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign) - if len(keys) > 0 { - break - } - } - - if len(keys) == 0 { - panic("unreachable") - } - - h, wrappedHash, err := hashForSignature(hashFunc, sigType) - if err != nil { - return nil, err - } - - if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF { - return nil, err - } - - for _, key := range keys { - switch sig := p.(type) { - case *packet.Signature: - err = key.PublicKey.VerifySignature(h, sig) - case *packet.SignatureV3: - err = key.PublicKey.VerifySignatureV3(h, sig) - default: - panic("unreachable") - } - - if err == nil { - return key.Entity, nil - } - } - - return nil, err -} - -// CheckArmoredDetachedSignature performs the same actions as -// CheckDetachedSignature but expects the signature to be armored. -func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { - body, err := readArmored(signature, SignatureType) - if err != nil { - return - } - - return CheckDetachedSignature(keyring, signed, body) -} diff --git a/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go deleted file mode 100644 index f53244a1..00000000 --- a/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2011 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 s2k implements the various OpenPGP string-to-key transforms as -// specified in RFC 4800 section 3.7.1. -// -// Deprecated: this package is unmaintained except for security fixes. New -// applications should consider a more focused, modern alternative to OpenPGP -// for their specific task. If you are required to interoperate with OpenPGP -// systems and need a maintained package, consider a community fork. -// See https://golang.org/issue/44226. -package s2k // import "golang.org/x/crypto/openpgp/s2k" - -import ( - "crypto" - "hash" - "io" - "strconv" - - "golang.org/x/crypto/openpgp/errors" -) - -// Config collects configuration parameters for s2k key-stretching -// transformatioms. A nil *Config is valid and results in all default -// values. Currently, Config is used only by the Serialize function in -// this package. -type Config struct { - // Hash is the default hash function to be used. If - // nil, SHA1 is used. - Hash crypto.Hash - // S2KCount is only used for symmetric encryption. It - // determines the strength of the passphrase stretching when - // the said passphrase is hashed to produce a key. S2KCount - // should be between 1024 and 65011712, inclusive. If Config - // is nil or S2KCount is 0, the value 65536 used. Not all - // values in the above range can be represented. S2KCount will - // be rounded up to the next representable value if it cannot - // be encoded exactly. When set, it is strongly encrouraged to - // use a value that is at least 65536. See RFC 4880 Section - // 3.7.1.3. - S2KCount int -} - -func (c *Config) hash() crypto.Hash { - if c == nil || uint(c.Hash) == 0 { - // SHA1 is the historical default in this package. - return crypto.SHA1 - } - - return c.Hash -} - -func (c *Config) encodedCount() uint8 { - if c == nil || c.S2KCount == 0 { - return 96 // The common case. Correspoding to 65536 - } - - i := c.S2KCount - switch { - // Behave like GPG. Should we make 65536 the lowest value used? - case i < 1024: - i = 1024 - case i > 65011712: - i = 65011712 - } - - return encodeCount(i) -} - -// encodeCount converts an iterative "count" in the range 1024 to -// 65011712, inclusive, to an encoded count. The return value is the -// octet that is actually stored in the GPG file. encodeCount panics -// if i is not in the above range (encodedCount above takes care to -// pass i in the correct range). See RFC 4880 Section 3.7.7.1. -func encodeCount(i int) uint8 { - if i < 1024 || i > 65011712 { - panic("count arg i outside the required range") - } - - for encoded := 0; encoded < 256; encoded++ { - count := decodeCount(uint8(encoded)) - if count >= i { - return uint8(encoded) - } - } - - return 255 -} - -// decodeCount returns the s2k mode 3 iterative "count" corresponding to -// the encoded octet c. -func decodeCount(c uint8) int { - return (16 + int(c&15)) << (uint32(c>>4) + 6) -} - -// Simple writes to out the result of computing the Simple S2K function (RFC -// 4880, section 3.7.1.1) using the given hash and input passphrase. -func Simple(out []byte, h hash.Hash, in []byte) { - Salted(out, h, in, nil) -} - -var zero [1]byte - -// Salted writes to out the result of computing the Salted S2K function (RFC -// 4880, section 3.7.1.2) using the given hash, input passphrase and salt. -func Salted(out []byte, h hash.Hash, in []byte, salt []byte) { - done := 0 - var digest []byte - - for i := 0; done < len(out); i++ { - h.Reset() - for j := 0; j < i; j++ { - h.Write(zero[:]) - } - h.Write(salt) - h.Write(in) - digest = h.Sum(digest[:0]) - n := copy(out[done:], digest) - done += n - } -} - -// Iterated writes to out the result of computing the Iterated and Salted S2K -// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase, -// salt and iteration count. -func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) { - combined := make([]byte, len(in)+len(salt)) - copy(combined, salt) - copy(combined[len(salt):], in) - - if count < len(combined) { - count = len(combined) - } - - done := 0 - var digest []byte - for i := 0; done < len(out); i++ { - h.Reset() - for j := 0; j < i; j++ { - h.Write(zero[:]) - } - written := 0 - for written < count { - if written+len(combined) > count { - todo := count - written - h.Write(combined[:todo]) - written = count - } else { - h.Write(combined) - written += len(combined) - } - } - digest = h.Sum(digest[:0]) - n := copy(out[done:], digest) - done += n - } -} - -// Parse reads a binary specification for a string-to-key transformation from r -// and returns a function which performs that transform. -func Parse(r io.Reader) (f func(out, in []byte), err error) { - var buf [9]byte - - _, err = io.ReadFull(r, buf[:2]) - if err != nil { - return - } - - hash, ok := HashIdToHash(buf[1]) - if !ok { - return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(buf[1]))) - } - if !hash.Available() { - return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hash))) - } - h := hash.New() - - switch buf[0] { - case 0: - f := func(out, in []byte) { - Simple(out, h, in) - } - return f, nil - case 1: - _, err = io.ReadFull(r, buf[:8]) - if err != nil { - return - } - f := func(out, in []byte) { - Salted(out, h, in, buf[:8]) - } - return f, nil - case 3: - _, err = io.ReadFull(r, buf[:9]) - if err != nil { - return - } - count := decodeCount(buf[8]) - f := func(out, in []byte) { - Iterated(out, h, in, buf[:8], count) - } - return f, nil - } - - return nil, errors.UnsupportedError("S2K function") -} - -// Serialize salts and stretches the given passphrase and writes the -// resulting key into key. It also serializes an S2K descriptor to -// w. The key stretching can be configured with c, which may be -// nil. In that case, sensible defaults will be used. -func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error { - var buf [11]byte - buf[0] = 3 /* iterated and salted */ - buf[1], _ = HashToHashId(c.hash()) - salt := buf[2:10] - if _, err := io.ReadFull(rand, salt); err != nil { - return err - } - encodedCount := c.encodedCount() - count := decodeCount(encodedCount) - buf[10] = encodedCount - if _, err := w.Write(buf[:]); err != nil { - return err - } - - Iterated(key, c.hash().New(), passphrase, salt, count) - return nil -} - -// hashToHashIdMapping contains pairs relating OpenPGP's hash identifier with -// Go's crypto.Hash type. See RFC 4880, section 9.4. -var hashToHashIdMapping = []struct { - id byte - hash crypto.Hash - name string -}{ - {1, crypto.MD5, "MD5"}, - {2, crypto.SHA1, "SHA1"}, - {3, crypto.RIPEMD160, "RIPEMD160"}, - {8, crypto.SHA256, "SHA256"}, - {9, crypto.SHA384, "SHA384"}, - {10, crypto.SHA512, "SHA512"}, - {11, crypto.SHA224, "SHA224"}, -} - -// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP -// hash id. -func HashIdToHash(id byte) (h crypto.Hash, ok bool) { - for _, m := range hashToHashIdMapping { - if m.id == id { - return m.hash, true - } - } - return 0, false -} - -// HashIdToString returns the name of the hash function corresponding to the -// given OpenPGP hash id. -func HashIdToString(id byte) (name string, ok bool) { - for _, m := range hashToHashIdMapping { - if m.id == id { - return m.name, true - } - } - - return "", false -} - -// HashToHashId returns an OpenPGP hash id which corresponds the given Hash. -func HashToHashId(h crypto.Hash) (id byte, ok bool) { - for _, m := range hashToHashIdMapping { - if m.hash == h { - return m.id, true - } - } - return 0, false -} diff --git a/vendor/golang.org/x/crypto/openpgp/write.go b/vendor/golang.org/x/crypto/openpgp/write.go deleted file mode 100644 index b89d48b8..00000000 --- a/vendor/golang.org/x/crypto/openpgp/write.go +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright 2011 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 openpgp - -import ( - "crypto" - "hash" - "io" - "strconv" - "time" - - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" - "golang.org/x/crypto/openpgp/s2k" -) - -// DetachSign signs message with the private key from signer (which must -// already have been decrypted) and writes the signature to w. -// If config is nil, sensible defaults will be used. -func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { - return detachSign(w, signer, message, packet.SigTypeBinary, config) -} - -// ArmoredDetachSign signs message with the private key from signer (which -// must already have been decrypted) and writes an armored signature to w. -// If config is nil, sensible defaults will be used. -func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) { - return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config) -} - -// DetachSignText signs message (after canonicalising the line endings) with -// the private key from signer (which must already have been decrypted) and -// writes the signature to w. -// If config is nil, sensible defaults will be used. -func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { - return detachSign(w, signer, message, packet.SigTypeText, config) -} - -// ArmoredDetachSignText signs message (after canonicalising the line endings) -// with the private key from signer (which must already have been decrypted) -// and writes an armored signature to w. -// If config is nil, sensible defaults will be used. -func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { - return armoredDetachSign(w, signer, message, packet.SigTypeText, config) -} - -func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { - out, err := armor.Encode(w, SignatureType, nil) - if err != nil { - return - } - err = detachSign(out, signer, message, sigType, config) - if err != nil { - return - } - return out.Close() -} - -func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { - if signer.PrivateKey == nil { - return errors.InvalidArgumentError("signing key doesn't have a private key") - } - if signer.PrivateKey.Encrypted { - return errors.InvalidArgumentError("signing key is encrypted") - } - - sig := new(packet.Signature) - sig.SigType = sigType - sig.PubKeyAlgo = signer.PrivateKey.PubKeyAlgo - sig.Hash = config.Hash() - sig.CreationTime = config.Now() - sig.IssuerKeyId = &signer.PrivateKey.KeyId - - h, wrappedHash, err := hashForSignature(sig.Hash, sig.SigType) - if err != nil { - return - } - io.Copy(wrappedHash, message) - - err = sig.Sign(h, signer.PrivateKey, config) - if err != nil { - return - } - - return sig.Serialize(w) -} - -// FileHints contains metadata about encrypted files. This metadata is, itself, -// encrypted. -type FileHints struct { - // IsBinary can be set to hint that the contents are binary data. - IsBinary bool - // FileName hints at the name of the file that should be written. It's - // truncated to 255 bytes if longer. It may be empty to suggest that the - // file should not be written to disk. It may be equal to "_CONSOLE" to - // suggest the data should not be written to disk. - FileName string - // ModTime contains the modification time of the file, or the zero time if not applicable. - ModTime time.Time -} - -// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase. -// The resulting WriteCloser must be closed after the contents of the file have -// been written. -// If config is nil, sensible defaults will be used. -func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { - if hints == nil { - hints = &FileHints{} - } - - key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config) - if err != nil { - return - } - w, err := packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), key, config) - if err != nil { - return - } - - literaldata := w - if algo := config.Compression(); algo != packet.CompressionNone { - var compConfig *packet.CompressionConfig - if config != nil { - compConfig = config.CompressionConfig - } - literaldata, err = packet.SerializeCompressed(w, algo, compConfig) - if err != nil { - return - } - } - - var epochSeconds uint32 - if !hints.ModTime.IsZero() { - epochSeconds = uint32(hints.ModTime.Unix()) - } - return packet.SerializeLiteral(literaldata, hints.IsBinary, hints.FileName, epochSeconds) -} - -// intersectPreferences mutates and returns a prefix of a that contains only -// the values in the intersection of a and b. The order of a is preserved. -func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) { - var j int - for _, v := range a { - for _, v2 := range b { - if v == v2 { - a[j] = v - j++ - break - } - } - } - - return a[:j] -} - -func hashToHashId(h crypto.Hash) uint8 { - v, ok := s2k.HashToHashId(h) - if !ok { - panic("tried to convert unknown hash") - } - return v -} - -// writeAndSign writes the data as a payload package and, optionally, signs -// it. hints contains optional information, that is also encrypted, -// that aids the recipients in processing the message. The resulting -// WriteCloser must be closed after the contents of the file have been -// written. If config is nil, sensible defaults will be used. -func writeAndSign(payload io.WriteCloser, candidateHashes []uint8, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { - var signer *packet.PrivateKey - if signed != nil { - signKey, ok := signed.signingKey(config.Now()) - if !ok { - return nil, errors.InvalidArgumentError("no valid signing keys") - } - signer = signKey.PrivateKey - if signer == nil { - return nil, errors.InvalidArgumentError("no private key in signing key") - } - if signer.Encrypted { - return nil, errors.InvalidArgumentError("signing key must be decrypted") - } - } - - var hash crypto.Hash - for _, hashId := range candidateHashes { - if h, ok := s2k.HashIdToHash(hashId); ok && h.Available() { - hash = h - break - } - } - - // If the hash specified by config is a candidate, we'll use that. - if configuredHash := config.Hash(); configuredHash.Available() { - for _, hashId := range candidateHashes { - if h, ok := s2k.HashIdToHash(hashId); ok && h == configuredHash { - hash = h - break - } - } - } - - if hash == 0 { - hashId := candidateHashes[0] - name, ok := s2k.HashIdToString(hashId) - if !ok { - name = "#" + strconv.Itoa(int(hashId)) - } - return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)") - } - - if signer != nil { - ops := &packet.OnePassSignature{ - SigType: packet.SigTypeBinary, - Hash: hash, - PubKeyAlgo: signer.PubKeyAlgo, - KeyId: signer.KeyId, - IsLast: true, - } - if err := ops.Serialize(payload); err != nil { - return nil, err - } - } - - if hints == nil { - hints = &FileHints{} - } - - w := payload - if signer != nil { - // If we need to write a signature packet after the literal - // data then we need to stop literalData from closing - // encryptedData. - w = noOpCloser{w} - - } - var epochSeconds uint32 - if !hints.ModTime.IsZero() { - epochSeconds = uint32(hints.ModTime.Unix()) - } - literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds) - if err != nil { - return nil, err - } - - if signer != nil { - return signatureWriter{payload, literalData, hash, hash.New(), signer, config}, nil - } - return literalData, nil -} - -// Encrypt encrypts a message to a number of recipients and, optionally, signs -// it. hints contains optional information, that is also encrypted, that aids -// the recipients in processing the message. The resulting WriteCloser must -// be closed after the contents of the file have been written. -// If config is nil, sensible defaults will be used. -func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { - if len(to) == 0 { - return nil, errors.InvalidArgumentError("no encryption recipient provided") - } - - // These are the possible ciphers that we'll use for the message. - candidateCiphers := []uint8{ - uint8(packet.CipherAES128), - uint8(packet.CipherAES256), - uint8(packet.CipherCAST5), - } - // These are the possible hash functions that we'll use for the signature. - candidateHashes := []uint8{ - hashToHashId(crypto.SHA256), - hashToHashId(crypto.SHA384), - hashToHashId(crypto.SHA512), - hashToHashId(crypto.SHA1), - hashToHashId(crypto.RIPEMD160), - } - // In the event that a recipient doesn't specify any supported ciphers - // or hash functions, these are the ones that we assume that every - // implementation supports. - defaultCiphers := candidateCiphers[len(candidateCiphers)-1:] - defaultHashes := candidateHashes[len(candidateHashes)-1:] - - encryptKeys := make([]Key, len(to)) - for i := range to { - var ok bool - encryptKeys[i], ok = to[i].encryptionKey(config.Now()) - if !ok { - return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no encryption keys") - } - - sig := to[i].primaryIdentity().SelfSignature - - preferredSymmetric := sig.PreferredSymmetric - if len(preferredSymmetric) == 0 { - preferredSymmetric = defaultCiphers - } - preferredHashes := sig.PreferredHash - if len(preferredHashes) == 0 { - preferredHashes = defaultHashes - } - candidateCiphers = intersectPreferences(candidateCiphers, preferredSymmetric) - candidateHashes = intersectPreferences(candidateHashes, preferredHashes) - } - - if len(candidateCiphers) == 0 || len(candidateHashes) == 0 { - return nil, errors.InvalidArgumentError("cannot encrypt because recipient set shares no common algorithms") - } - - cipher := packet.CipherFunction(candidateCiphers[0]) - // If the cipher specified by config is a candidate, we'll use that. - configuredCipher := config.Cipher() - for _, c := range candidateCiphers { - cipherFunc := packet.CipherFunction(c) - if cipherFunc == configuredCipher { - cipher = cipherFunc - break - } - } - - symKey := make([]byte, cipher.KeySize()) - if _, err := io.ReadFull(config.Random(), symKey); err != nil { - return nil, err - } - - for _, key := range encryptKeys { - if err := packet.SerializeEncryptedKey(ciphertext, key.PublicKey, cipher, symKey, config); err != nil { - return nil, err - } - } - - payload, err := packet.SerializeSymmetricallyEncrypted(ciphertext, cipher, symKey, config) - if err != nil { - return - } - - return writeAndSign(payload, candidateHashes, signed, hints, config) -} - -// Sign signs a message. The resulting WriteCloser must be closed after the -// contents of the file have been written. hints contains optional information -// that aids the recipients in processing the message. -// If config is nil, sensible defaults will be used. -func Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) { - if signed == nil { - return nil, errors.InvalidArgumentError("no signer provided") - } - - // These are the possible hash functions that we'll use for the signature. - candidateHashes := []uint8{ - hashToHashId(crypto.SHA256), - hashToHashId(crypto.SHA384), - hashToHashId(crypto.SHA512), - hashToHashId(crypto.SHA1), - hashToHashId(crypto.RIPEMD160), - } - defaultHashes := candidateHashes[len(candidateHashes)-1:] - preferredHashes := signed.primaryIdentity().SelfSignature.PreferredHash - if len(preferredHashes) == 0 { - preferredHashes = defaultHashes - } - candidateHashes = intersectPreferences(candidateHashes, preferredHashes) - return writeAndSign(noOpCloser{output}, candidateHashes, signed, hints, config) -} - -// signatureWriter hashes the contents of a message while passing it along to -// literalData. When closed, it closes literalData, writes a signature packet -// to encryptedData and then also closes encryptedData. -type signatureWriter struct { - encryptedData io.WriteCloser - literalData io.WriteCloser - hashType crypto.Hash - h hash.Hash - signer *packet.PrivateKey - config *packet.Config -} - -func (s signatureWriter) Write(data []byte) (int, error) { - s.h.Write(data) - return s.literalData.Write(data) -} - -func (s signatureWriter) Close() error { - sig := &packet.Signature{ - SigType: packet.SigTypeBinary, - PubKeyAlgo: s.signer.PubKeyAlgo, - Hash: s.hashType, - CreationTime: s.config.Now(), - IssuerKeyId: &s.signer.KeyId, - } - - if err := sig.Sign(s.h, s.signer, s.config); err != nil { - return err - } - if err := s.literalData.Close(); err != nil { - return err - } - if err := sig.Serialize(s.encryptedData); err != nil { - return err - } - return s.encryptedData.Close() -} - -// noOpCloser is like an io.NopCloser, but for an io.Writer. -// TODO: we have two of these in OpenPGP packages alone. This probably needs -// to be promoted somewhere more common. -type noOpCloser struct { - w io.Writer -} - -func (c noOpCloser) Write(data []byte) (n int, err error) { - return c.w.Write(data) -} - -func (c noOpCloser) Close() error { - return nil -} diff --git a/vendor/golang.org/x/oauth2/.travis.yml b/vendor/golang.org/x/oauth2/.travis.yml deleted file mode 100644 index fa139db2..00000000 --- a/vendor/golang.org/x/oauth2/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - tip - -install: - - export GOPATH="$HOME/gopath" - - mkdir -p "$GOPATH/src/golang.org/x" - - mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2" - - go get -v -t -d golang.org/x/oauth2/... - -script: - - go test -v golang.org/x/oauth2/... diff --git a/vendor/golang.org/x/oauth2/CONTRIBUTING.md b/vendor/golang.org/x/oauth2/CONTRIBUTING.md deleted file mode 100644 index dfbed62c..00000000 --- a/vendor/golang.org/x/oauth2/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -Go is an open source project. - -It is the work of hundreds of contributors. We appreciate your help! - -## Filing issues - -When [filing an issue](https://github.com/golang/oauth2/issues), make sure to answer these five questions: - -1. What version of Go are you using (`go version`)? -2. What operating system and processor architecture are you using? -3. What did you do? -4. What did you expect to see? -5. What did you see instead? - -General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. -The gophers there will answer or ask you to file an issue if you've tripped over a bug. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md deleted file mode 100644 index 781770c2..00000000 --- a/vendor/golang.org/x/oauth2/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# OAuth2 for Go - -[![Go Reference](https://pkg.go.dev/badge/golang.org/x/oauth2.svg)](https://pkg.go.dev/golang.org/x/oauth2) -[![Build Status](https://travis-ci.org/golang/oauth2.svg?branch=master)](https://travis-ci.org/golang/oauth2) - -oauth2 package contains a client implementation for OAuth 2.0 spec. - -## Installation - -~~~~ -go get golang.org/x/oauth2 -~~~~ - -Or you can manually git clone the repository to -`$(go env GOPATH)/src/golang.org/x/oauth2`. - -See pkg.go.dev for further documentation and examples. - -* [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) -* [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google) - -## Policy for new endpoints - -We no longer accept new provider-specific packages in this repo if all -they do is add a single endpoint variable. If you just want to add a -single endpoint, add it to the -[pkg.go.dev/golang.org/x/oauth2/endpoints](https://pkg.go.dev/golang.org/x/oauth2/endpoints) -package. - -## Report Issues / Send Patches - -The main issue tracker for the oauth2 repository is located at -https://github.com/golang/oauth2/issues. - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. In particular: - -* Excluding trivial changes, all contributions should be connected to an existing issue. -* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted. -* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2). diff --git a/vendor/golang.org/x/oauth2/deviceauth.go b/vendor/golang.org/x/oauth2/deviceauth.go deleted file mode 100644 index e99c92f3..00000000 --- a/vendor/golang.org/x/oauth2/deviceauth.go +++ /dev/null @@ -1,198 +0,0 @@ -package oauth2 - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "golang.org/x/oauth2/internal" -) - -// https://datatracker.ietf.org/doc/html/rfc8628#section-3.5 -const ( - errAuthorizationPending = "authorization_pending" - errSlowDown = "slow_down" - errAccessDenied = "access_denied" - errExpiredToken = "expired_token" -) - -// DeviceAuthResponse describes a successful RFC 8628 Device Authorization Response -// https://datatracker.ietf.org/doc/html/rfc8628#section-3.2 -type DeviceAuthResponse struct { - // DeviceCode - DeviceCode string `json:"device_code"` - // UserCode is the code the user should enter at the verification uri - UserCode string `json:"user_code"` - // VerificationURI is where user should enter the user code - VerificationURI string `json:"verification_uri"` - // VerificationURIComplete (if populated) includes the user code in the verification URI. This is typically shown to the user in non-textual form, such as a QR code. - VerificationURIComplete string `json:"verification_uri_complete,omitempty"` - // Expiry is when the device code and user code expire - Expiry time.Time `json:"expires_in,omitempty"` - // Interval is the duration in seconds that Poll should wait between requests - Interval int64 `json:"interval,omitempty"` -} - -func (d DeviceAuthResponse) MarshalJSON() ([]byte, error) { - type Alias DeviceAuthResponse - var expiresIn int64 - if !d.Expiry.IsZero() { - expiresIn = int64(time.Until(d.Expiry).Seconds()) - } - return json.Marshal(&struct { - ExpiresIn int64 `json:"expires_in,omitempty"` - *Alias - }{ - ExpiresIn: expiresIn, - Alias: (*Alias)(&d), - }) - -} - -func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error { - type Alias DeviceAuthResponse - aux := &struct { - ExpiresIn int64 `json:"expires_in"` - // workaround misspelling of verification_uri - VerificationURL string `json:"verification_url"` - *Alias - }{ - Alias: (*Alias)(c), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - if aux.ExpiresIn != 0 { - c.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn)) - } - if c.VerificationURI == "" { - c.VerificationURI = aux.VerificationURL - } - return nil -} - -// DeviceAuth returns a device auth struct which contains a device code -// and authorization information provided for users to enter on another device. -func (c *Config) DeviceAuth(ctx context.Context, opts ...AuthCodeOption) (*DeviceAuthResponse, error) { - // https://datatracker.ietf.org/doc/html/rfc8628#section-3.1 - v := url.Values{ - "client_id": {c.ClientID}, - } - if len(c.Scopes) > 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/internal/client_appengine.go b/vendor/golang.org/x/oauth2/internal/client_appengine.go deleted file mode 100644 index d28140f7..00000000 --- a/vendor/golang.org/x/oauth2/internal/client_appengine.go +++ /dev/null @@ -1,13 +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 - -package internal - -import "google.golang.org/appengine/urlfetch" - -func init() { - appengineClientHook = urlfetch.Client -} diff --git a/vendor/golang.org/x/oauth2/internal/doc.go b/vendor/golang.org/x/oauth2/internal/doc.go deleted file mode 100644 index 03265e88..00000000 --- a/vendor/golang.org/x/oauth2/internal/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017 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 internal contains support packages for oauth2 package. -package internal diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go deleted file mode 100644 index 14989bea..00000000 --- a/vendor/golang.org/x/oauth2/internal/oauth2.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2014 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 internal - -import ( - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" -) - -// ParseKey converts the binary contents of a private key file -// to an *rsa.PrivateKey. It detects whether the private key is in a -// PEM container or not. If so, it extracts the private key -// from PEM container before conversion. It only supports PEM -// containers with no passphrase. -func ParseKey(key []byte) (*rsa.PrivateKey, error) { - block, _ := pem.Decode(key) - if block != nil { - key = block.Bytes - } - parsedKey, err := x509.ParsePKCS8PrivateKey(key) - if err != nil { - parsedKey, err = x509.ParsePKCS1PrivateKey(key) - if err != nil { - return nil, fmt.Errorf("private key should be a PEM or plain PKCS1 or PKCS8; parse error: %v", err) - } - } - parsed, ok := parsedKey.(*rsa.PrivateKey) - if !ok { - return nil, errors.New("private key is invalid") - } - return parsed, nil -} diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go deleted file mode 100644 index e83ddeef..00000000 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ /dev/null @@ -1,352 +0,0 @@ -// Copyright 2014 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 internal - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "math" - "mime" - "net/http" - "net/url" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" -) - -// Token represents the credentials used to authorize -// the requests to access protected resources on the OAuth 2.0 -// provider's backend. -// -// This type is a mirror of oauth2.Token and exists to break -// an otherwise-circular dependency. Other internal packages -// should convert this Token into an oauth2.Token before use. -type Token struct { - // AccessToken is the token that authorizes and authenticates - // the requests. - AccessToken string - - // TokenType is the type of token. - // The Type method returns either this or "Bearer", the default. - TokenType string - - // RefreshToken is a token that's used by the application - // (as opposed to the user) to refresh the access token - // if it expires. - RefreshToken string - - // Expiry is the optional expiration time of the access token. - // - // If zero, TokenSource implementations will reuse the same - // token forever and RefreshToken or equivalent - // mechanisms for that TokenSource will not be used. - Expiry time.Time - - // Raw optionally contains extra metadata from the server - // when updating a token. - Raw interface{} -} - -// tokenJSON is the struct representing the HTTP response from OAuth2 -// providers returning a token or error in JSON form. -// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1 -type tokenJSON struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - RefreshToken string `json:"refresh_token"` - ExpiresIn expirationTime `json:"expires_in"` // at least PayPal returns string, while most return number - // error fields - // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - ErrorCode string `json:"error"` - ErrorDescription string `json:"error_description"` - ErrorURI string `json:"error_uri"` -} - -func (e *tokenJSON) expiry() (t time.Time) { - if v := e.ExpiresIn; v != 0 { - return time.Now().Add(time.Duration(v) * time.Second) - } - return -} - -type expirationTime int32 - -func (e *expirationTime) UnmarshalJSON(b []byte) error { - if len(b) == 0 || string(b) == "null" { - return nil - } - var n json.Number - err := json.Unmarshal(b, &n) - if err != nil { - return err - } - i, err := n.Int64() - if err != nil { - return err - } - if i > math.MaxInt32 { - i = math.MaxInt32 - } - *e = expirationTime(i) - return nil -} - -// RegisterBrokenAuthHeaderProvider previously did something. It is now a no-op. -// -// Deprecated: this function no longer does anything. Caller code that -// wants to avoid potential extra HTTP requests made during -// auto-probing of the provider's auth style should set -// Endpoint.AuthStyle. -func RegisterBrokenAuthHeaderProvider(tokenURL string) {} - -// AuthStyle is a copy of the golang.org/x/oauth2 package's AuthStyle type. -type AuthStyle int - -const ( - AuthStyleUnknown AuthStyle = 0 - AuthStyleInParams AuthStyle = 1 - AuthStyleInHeader AuthStyle = 2 -) - -// 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. -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 (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 (c *AuthStyleCache) setAuthStyle(tokenURL string, v AuthStyle) { - c.mu.Lock() - defer c.mu.Unlock() - if c.m == nil { - c.m = make(map[string]AuthStyle) - } - c.m[tokenURL] = v -} - -// newTokenRequest returns a new *http.Request to retrieve a new token -// from tokenURL using the provided clientID, clientSecret, and POST -// body parameters. -// -// inParams is whether the clientID & clientSecret should be encoded -// as the POST body. An 'inParams' value of true means to send it in -// the POST body (along with any values in v); false means to send it -// in the Authorization header. -func newTokenRequest(tokenURL, clientID, clientSecret string, v url.Values, authStyle AuthStyle) (*http.Request, error) { - if authStyle == AuthStyleInParams { - v = cloneURLValues(v) - if clientID != "" { - v.Set("client_id", clientID) - } - if clientSecret != "" { - v.Set("client_secret", clientSecret) - } - } - req, err := http.NewRequest("POST", tokenURL, strings.NewReader(v.Encode())) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - if authStyle == AuthStyleInHeader { - req.SetBasicAuth(url.QueryEscape(clientID), url.QueryEscape(clientSecret)) - } - return req, nil -} - -func cloneURLValues(v url.Values) url.Values { - v2 := make(url.Values, len(v)) - for k, vv := range v { - v2[k] = append([]string(nil), vv...) - } - return v2 -} - -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 := styleCache.lookupAuthStyle(tokenURL); ok { - authStyle = style - needsAuthStyleProbe = false - } else { - authStyle = AuthStyleInHeader // the first way we'll try - } - } - req, err := newTokenRequest(tokenURL, clientID, clientSecret, v, authStyle) - if err != nil { - return nil, err - } - token, err := doTokenRoundTrip(ctx, req) - if err != nil && needsAuthStyleProbe { - // If we get an error, assume the server wants the - // clientID & clientSecret in a different form. - // See https://code.google.com/p/goauth2/issues/detail?id=31 for background. - // In summary: - // - Reddit only accepts client secret in the Authorization header - // - Dropbox accepts either it in URL param or Auth header, but not both. - // - Google only accepts URL param (not spec compliant?), not Auth header - // - Stripe only accepts client secret in Auth header with Bearer method, not Basic - // - // We used to maintain a big table in this code of all the sites and which way - // they went, but maintaining it didn't scale & got annoying. - // So just try both ways. - authStyle = AuthStyleInParams // the second way we'll try - req, _ = newTokenRequest(tokenURL, clientID, clientSecret, v, authStyle) - token, err = doTokenRoundTrip(ctx, req) - } - if needsAuthStyleProbe && err == nil { - styleCache.setAuthStyle(tokenURL, authStyle) - } - // Don't overwrite `RefreshToken` with an empty value - // if this was a token refreshing request. - if token != nil && token.RefreshToken == "" { - token.RefreshToken = v.Get("refresh_token") - } - return token, err -} - -func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) { - r, err := ContextClient(ctx).Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - body, err := ioutil.ReadAll(io.LimitReader(r.Body, 1<<20)) - r.Body.Close() - if err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - - failureStatus := r.StatusCode < 200 || r.StatusCode > 299 - retrieveError := &RetrieveError{ - Response: r, - Body: body, - // attempt to populate error detail below - } - - var token *Token - content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")) - switch content { - case "application/x-www-form-urlencoded", "text/plain": - // some endpoints return a query string - vals, err := url.ParseQuery(string(body)) - if err != nil { - if failureStatus { - return nil, retrieveError - } - return nil, fmt.Errorf("oauth2: cannot parse response: %v", err) - } - retrieveError.ErrorCode = vals.Get("error") - retrieveError.ErrorDescription = vals.Get("error_description") - retrieveError.ErrorURI = vals.Get("error_uri") - token = &Token{ - AccessToken: vals.Get("access_token"), - TokenType: vals.Get("token_type"), - RefreshToken: vals.Get("refresh_token"), - Raw: vals, - } - e := vals.Get("expires_in") - expires, _ := strconv.Atoi(e) - if expires != 0 { - token.Expiry = time.Now().Add(time.Duration(expires) * time.Second) - } - default: - var tj tokenJSON - if err = json.Unmarshal(body, &tj); err != nil { - if failureStatus { - return nil, retrieveError - } - return nil, fmt.Errorf("oauth2: cannot parse json: %v", err) - } - retrieveError.ErrorCode = tj.ErrorCode - retrieveError.ErrorDescription = tj.ErrorDescription - retrieveError.ErrorURI = tj.ErrorURI - token = &Token{ - AccessToken: tj.AccessToken, - TokenType: tj.TokenType, - RefreshToken: tj.RefreshToken, - Expiry: tj.expiry(), - Raw: make(map[string]interface{}), - } - json.Unmarshal(body, &token.Raw) // no error checks for optional fields - } - // according to spec, servers should respond status 400 in error case - // https://www.rfc-editor.org/rfc/rfc6749#section-5.2 - // but some unorthodox servers respond 200 in error case - if failureStatus || retrieveError.ErrorCode != "" { - return nil, retrieveError - } - if token.AccessToken == "" { - return nil, errors.New("oauth2: server response missing access_token") - } - return token, nil -} - -// mirrors oauth2.RetrieveError -type RetrieveError struct { - Response *http.Response - Body []byte - ErrorCode string - ErrorDescription string - ErrorURI string -} - -func (r *RetrieveError) Error() string { - if r.ErrorCode != "" { - s := fmt.Sprintf("oauth2: %q", r.ErrorCode) - if r.ErrorDescription != "" { - s += fmt.Sprintf(" %q", r.ErrorDescription) - } - if r.ErrorURI != "" { - s += fmt.Sprintf(" %q", r.ErrorURI) - } - return s - } - return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body) -} diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go deleted file mode 100644 index 572074a6..00000000 --- a/vendor/golang.org/x/oauth2/internal/transport.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2014 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 internal - -import ( - "context" - "net/http" -) - -// HTTPClient is the context key to use with golang.org/x/net/context's -// WithValue function to associate an *http.Client value with a context. -var HTTPClient ContextKey - -// ContextKey is just an empty struct. It exists so HTTPClient can be -// an immutable public variable with a unique type. It's immutable -// 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 deleted file mode 100644 index 90a2c3d6..00000000 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright 2014 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 provides support for making -// OAuth2 authorized and authenticated HTTP requests, -// as specified in RFC 6749. -// It can additionally grant authorization with Bearer JWT. -package oauth2 // import "golang.org/x/oauth2" - -import ( - "bytes" - "context" - "errors" - "net/http" - "net/url" - "strings" - "sync" - "time" - - "golang.org/x/oauth2/internal" -) - -// NoContext is the default context you should supply if not using -// your own context.Context (see https://golang.org/x/net/context). -// -// Deprecated: Use context.Background() or context.TODO() instead. -var NoContext = context.TODO() - -// RegisterBrokenAuthHeaderProvider previously did something. It is now a no-op. -// -// Deprecated: this function no longer does anything. Caller code that -// wants to avoid potential extra HTTP requests made during -// auto-probing of the provider's auth style should set -// Endpoint.AuthStyle. -func RegisterBrokenAuthHeaderProvider(tokenURL string) {} - -// Config describes a typical 3-legged OAuth2 flow, with both the -// client application information and the server's endpoint URLs. -// For the client credentials 2-legged OAuth2 flow, see the clientcredentials -// package (https://golang.org/x/oauth2/clientcredentials). -type Config struct { - // ClientID is the application's ID. - ClientID string - - // ClientSecret is the application's secret. - ClientSecret string - - // Endpoint contains the resource server's token endpoint - // URLs. These are constants specific to each server and are - // often available via site-specific packages, such as - // google.Endpoint or github.Endpoint. - Endpoint Endpoint - - // RedirectURL is the URL to redirect users going through - // the OAuth flow, after the resource owner's URLs. - RedirectURL string - - // 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. -type TokenSource interface { - // Token returns a token or an error. - // Token must be safe for concurrent use by multiple goroutines. - // The returned Token must not be modified. - Token() (*Token, error) -} - -// Endpoint represents an OAuth 2.0 provider's authorization and token -// endpoint URLs. -type Endpoint struct { - AuthURL string - DeviceAuthURL string - TokenURL string - - // AuthStyle optionally specifies how the endpoint wants the - // client ID & client secret sent. The zero value means to - // auto-detect. - AuthStyle AuthStyle -} - -// AuthStyle represents how requests for tokens are authenticated -// to the server. -type AuthStyle int - -const ( - // AuthStyleAutoDetect means to auto-detect which authentication - // style the provider wants by trying both ways and caching - // the successful way for the future. - AuthStyleAutoDetect AuthStyle = 0 - - // AuthStyleInParams sends the "client_id" and "client_secret" - // in the POST body as application/x-www-form-urlencoded parameters. - AuthStyleInParams AuthStyle = 1 - - // AuthStyleInHeader sends the client_id and client_password - // using HTTP Basic Authorization. This is an optional style - // described in the OAuth2 RFC 6749 section 2.3.1. - AuthStyleInHeader AuthStyle = 2 -) - -var ( - // AccessTypeOnline and AccessTypeOffline are options passed - // to the Options.AuthCodeURL method. They modify the - // "access_type" field that gets sent in the URL returned by - // AuthCodeURL. - // - // Online is the default if neither is specified. If your - // application needs to refresh access tokens when the user - // is not present at the browser, then use offline. This will - // result in your application obtaining a refresh token the - // first time your application exchanges an authorization - // code for a user. - AccessTypeOnline AuthCodeOption = SetAuthURLParam("access_type", "online") - AccessTypeOffline AuthCodeOption = SetAuthURLParam("access_type", "offline") - - // ApprovalForce forces the users to view the consent dialog - // and confirm the permissions request at the URL returned - // from AuthCodeURL, even if they've already done so. - ApprovalForce AuthCodeOption = SetAuthURLParam("prompt", "consent") -) - -// An AuthCodeOption is passed to Config.AuthCodeURL. -type AuthCodeOption interface { - setValue(url.Values) -} - -type setParam struct{ k, v string } - -func (p setParam) setValue(m url.Values) { m.Set(p.k, p.v) } - -// SetAuthURLParam builds an AuthCodeOption which passes key/value parameters -// to a provider's authorization endpoint. -func SetAuthURLParam(key, value string) AuthCodeOption { - return setParam{key, value} -} - -// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page -// that asks for permissions for the required scopes explicitly. -// -// 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. -// -// 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) - v := url.Values{ - "response_type": {"code"}, - "client_id": {c.ClientID}, - } - if c.RedirectURL != "" { - v.Set("redirect_uri", c.RedirectURL) - } - if len(c.Scopes) > 0 { - v.Set("scope", strings.Join(c.Scopes, " ")) - } - if state != "" { - v.Set("state", state) - } - for _, opt := range opts { - opt.setValue(v) - } - if strings.Contains(c.Endpoint.AuthURL, "?") { - buf.WriteByte('&') - } else { - buf.WriteByte('?') - } - buf.WriteString(v.Encode()) - return buf.String() -} - -// PasswordCredentialsToken converts a resource owner username and password -// pair into a token. -// -// Per the RFC, this grant type should only be used "when there is a high -// degree of trust between the resource owner and the client (e.g., the client -// is part of the device operating system or a highly privileged application), -// and when other authorization grant types are not available." -// See https://tools.ietf.org/html/rfc6749#section-4.3 for more info. -// -// The provided context optionally controls which HTTP client is used. See the HTTPClient variable. -func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*Token, error) { - v := url.Values{ - "grant_type": {"password"}, - "username": {username}, - "password": {password}, - } - if len(c.Scopes) > 0 { - v.Set("scope", strings.Join(c.Scopes, " ")) - } - return retrieveToken(ctx, c, v) -} - -// Exchange converts an authorization code into a token. -// -// It is used after a resource provider redirects the user back -// to the Redirect URI (the URL obtained from AuthCodeURL). -// -// 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") if you are -// using it to protect against CSRF attacks. -// -// 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"}, - "code": {code}, - } - if c.RedirectURL != "" { - v.Set("redirect_uri", c.RedirectURL) - } - for _, opt := range opts { - opt.setValue(v) - } - return retrieveToken(ctx, c, v) -} - -// Client returns an HTTP client using the provided token. -// The token will auto-refresh as necessary. The underlying -// HTTP transport will be obtained using the provided context. -// The returned client and its Transport should not be modified. -func (c *Config) Client(ctx context.Context, t *Token) *http.Client { - return NewClient(ctx, c.TokenSource(ctx, t)) -} - -// TokenSource returns a TokenSource that returns t until t expires, -// automatically refreshing it as necessary using the provided context. -// -// Most users will use Config.Client instead. -func (c *Config) TokenSource(ctx context.Context, t *Token) TokenSource { - tkr := &tokenRefresher{ - ctx: ctx, - conf: c, - } - if t != nil { - tkr.refreshToken = t.RefreshToken - } - return &reuseTokenSource{ - t: t, - new: tkr, - } -} - -// tokenRefresher is a TokenSource that makes "grant_type"=="refresh_token" -// HTTP requests to renew a token using a RefreshToken. -type tokenRefresher struct { - ctx context.Context // used to get HTTP requests - conf *Config - refreshToken string -} - -// WARNING: Token is not safe for concurrent access, as it -// updates the tokenRefresher's refreshToken field. -// Within this package, it is used by reuseTokenSource which -// synchronizes calls to this method with its own mutex. -func (tf *tokenRefresher) Token() (*Token, error) { - if tf.refreshToken == "" { - return nil, errors.New("oauth2: token expired and refresh token is not set") - } - - tk, err := retrieveToken(tf.ctx, tf.conf, url.Values{ - "grant_type": {"refresh_token"}, - "refresh_token": {tf.refreshToken}, - }) - - if err != nil { - return nil, err - } - if tf.refreshToken != tk.RefreshToken { - tf.refreshToken = tk.RefreshToken - } - return tk, err -} - -// reuseTokenSource is a TokenSource that holds a single token in memory -// and validates its expiry before each call to retrieve it with -// Token. If it's expired, it will be auto-refreshed using the -// new TokenSource. -type reuseTokenSource struct { - new TokenSource // called when t is expired. - - mu sync.Mutex // guards t - t *Token - - expiryDelta time.Duration -} - -// Token returns the current token if it's still valid, else will -// refresh the current token (using r.Context for HTTP client -// information) and return the new one. -func (s *reuseTokenSource) Token() (*Token, error) { - s.mu.Lock() - defer s.mu.Unlock() - if s.t.Valid() { - return s.t, nil - } - t, err := s.new.Token() - if err != nil { - return nil, err - } - t.expiryDelta = s.expiryDelta - s.t = t - return t, nil -} - -// StaticTokenSource returns a TokenSource that always returns the same token. -// Because the provided token t is never refreshed, StaticTokenSource is only -// useful for tokens that never expire. -func StaticTokenSource(t *Token) TokenSource { - return staticTokenSource{t} -} - -// staticTokenSource is a TokenSource that always returns the same Token. -type staticTokenSource struct { - t *Token -} - -func (s staticTokenSource) Token() (*Token, error) { - return s.t, nil -} - -// HTTPClient is the context key to use with golang.org/x/net/context's -// WithValue function to associate an *http.Client value with a context. -var HTTPClient internal.ContextKey - -// NewClient creates an *http.Client from a Context and TokenSource. -// The returned client is not valid beyond the lifetime of the context. -// -// Note that if a custom *http.Client is provided via the Context it -// is used only for token acquisition and is not used to configure the -// *http.Client returned from NewClient. -// -// As a special case, if src is nil, a non-OAuth2 client is returned -// using the provided context. This exists to support related OAuth2 -// packages. -func NewClient(ctx context.Context, src TokenSource) *http.Client { - if src == nil { - return internal.ContextClient(ctx) - } - return &http.Client{ - Transport: &Transport{ - Base: internal.ContextClient(ctx).Transport, - Source: ReuseTokenSource(nil, src), - }, - } -} - -// ReuseTokenSource returns a TokenSource which repeatedly returns the -// same token as long as it's valid, starting with t. -// When its cached token is invalid, a new token is obtained from src. -// -// ReuseTokenSource is typically used to reuse tokens from a cache -// (such as a file on disk) between runs of a program, rather than -// obtaining new tokens unnecessarily. -// -// The initial token t may be nil, in which case the TokenSource is -// wrapped in a caching version if it isn't one already. This also -// means it's always safe to wrap ReuseTokenSource around any other -// TokenSource without adverse effects. -func ReuseTokenSource(t *Token, src TokenSource) TokenSource { - // Don't wrap a reuseTokenSource in itself. That would work, - // but cause an unnecessary number of mutex operations. - // Just build the equivalent one. - if rt, ok := src.(*reuseTokenSource); ok { - if t == nil { - // Just use it directly. - return rt - } - src = rt.new - } - return &reuseTokenSource{ - t: t, - new: src, - } -} - -// ReuseTokenSource 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). -func ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource { - // Don't wrap a reuseTokenSource in itself. That would work, - // but cause an unnecessary number of mutex operations. - // Just build the equivalent one. - if rt, ok := src.(*reuseTokenSource); ok { - if t == nil { - // Just use it directly, but set the expiryDelta to earlyExpiry, - // so the behavior matches what the user expects. - rt.expiryDelta = earlyExpiry - return rt - } - src = rt.new - } - if t != nil { - t.expiryDelta = earlyExpiry - } - return &reuseTokenSource{ - t: t, - new: src, - expiryDelta: earlyExpiry, - } -} diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go deleted file mode 100644 index 50593b6d..00000000 --- a/vendor/golang.org/x/oauth2/pkce.go +++ /dev/null @@ -1,68 +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 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 deleted file mode 100644 index 5bbb3321..00000000 --- a/vendor/golang.org/x/oauth2/token.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2014 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 ( - "context" - "fmt" - "net/http" - "net/url" - "strconv" - "strings" - "time" - - "golang.org/x/oauth2/internal" -) - -// defaultExpiryDelta determines how earlier a token should be considered -// expired than its actual expiration time. It is used to avoid late -// expirations due to client-server time mismatches. -const defaultExpiryDelta = 10 * time.Second - -// Token represents the credentials used to authorize -// the requests to access protected resources on the OAuth 2.0 -// provider's backend. -// -// Most users of this package should not access fields of Token -// directly. They're exported mostly for use by related packages -// implementing derivative OAuth2 flows. -type Token struct { - // AccessToken is the token that authorizes and authenticates - // the requests. - AccessToken string `json:"access_token"` - - // TokenType is the type of token. - // The Type method returns either this or "Bearer", the default. - TokenType string `json:"token_type,omitempty"` - - // RefreshToken is a token that's used by the application - // (as opposed to the user) to refresh the access token - // if it expires. - RefreshToken string `json:"refresh_token,omitempty"` - - // Expiry is the optional expiration time of the access token. - // - // If zero, TokenSource implementations will reuse the same - // token forever and RefreshToken or equivalent - // mechanisms for that TokenSource will not be used. - Expiry time.Time `json:"expiry,omitempty"` - - // raw optionally contains extra metadata from the server - // when updating a token. - raw interface{} - - // expiryDelta is used to calculate when a token is considered - // expired, by subtracting from Expiry. If zero, defaultExpiryDelta - // is used. - expiryDelta time.Duration -} - -// Type returns t.TokenType if non-empty, else "Bearer". -func (t *Token) Type() string { - if strings.EqualFold(t.TokenType, "bearer") { - return "Bearer" - } - if strings.EqualFold(t.TokenType, "mac") { - return "MAC" - } - if strings.EqualFold(t.TokenType, "basic") { - return "Basic" - } - if t.TokenType != "" { - return t.TokenType - } - return "Bearer" -} - -// SetAuthHeader sets the Authorization header to r using the access -// token in t. -// -// This method is unnecessary when using Transport or an HTTP Client -// returned by this package. -func (t *Token) SetAuthHeader(r *http.Request) { - r.Header.Set("Authorization", t.Type()+" "+t.AccessToken) -} - -// WithExtra returns a new Token that's a clone of t, but using the -// provided raw extra map. This is only intended for use by packages -// implementing derivative OAuth2 flows. -func (t *Token) WithExtra(extra interface{}) *Token { - t2 := new(Token) - *t2 = *t - t2.raw = extra - return t2 -} - -// Extra returns an extra field. -// Extra fields are key-value pairs returned by the server as a -// part of the token retrieval response. -func (t *Token) Extra(key string) interface{} { - if raw, ok := t.raw.(map[string]interface{}); ok { - return raw[key] - } - - vals, ok := t.raw.(url.Values) - if !ok { - return nil - } - - v := vals.Get(key) - switch s := strings.TrimSpace(v); strings.Count(s, ".") { - case 0: // Contains no "."; try to parse as int - if i, err := strconv.ParseInt(s, 10, 64); err == nil { - return i - } - case 1: // Contains a single "."; try to parse as float - if f, err := strconv.ParseFloat(s, 64); err == nil { - return f - } - } - - return v -} - -// timeNow is time.Now but pulled out as a variable for tests. -var timeNow = time.Now - -// expired reports whether the token is expired. -// t must be non-nil. -func (t *Token) expired() bool { - if t.Expiry.IsZero() { - return false - } - - expiryDelta := defaultExpiryDelta - if t.expiryDelta != 0 { - expiryDelta = t.expiryDelta - } - return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow()) -} - -// Valid reports whether t is non-nil, has an AccessToken, and is not expired. -func (t *Token) Valid() bool { - return t != nil && t.AccessToken != "" && !t.expired() -} - -// tokenFromInternal maps an *internal.Token struct into -// a *Token struct. -func tokenFromInternal(t *internal.Token) *Token { - if t == nil { - return nil - } - return &Token{ - AccessToken: t.AccessToken, - TokenType: t.TokenType, - RefreshToken: t.RefreshToken, - Expiry: t.Expiry, - raw: t.Raw, - } -} - -// retrieveToken takes a *Config and uses that to retrieve an *internal.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), c.authStyleCache.Get()) - if err != nil { - if rErr, ok := err.(*internal.RetrieveError); ok { - return nil, (*RetrieveError)(rErr) - } - return nil, err - } - return tokenFromInternal(tk), nil -} - -// RetrieveError is the error returned when the token endpoint returns a -// non-2XX HTTP status code or populates RFC 6749's 'error' parameter. -// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -type RetrieveError struct { - Response *http.Response - // Body is the body that was consumed by reading Response.Body. - // It may be truncated. - Body []byte - // ErrorCode is RFC 6749's 'error' parameter. - ErrorCode string - // ErrorDescription is RFC 6749's 'error_description' parameter. - ErrorDescription string - // ErrorURI is RFC 6749's 'error_uri' parameter. - ErrorURI string -} - -func (r *RetrieveError) Error() string { - if r.ErrorCode != "" { - s := fmt.Sprintf("oauth2: %q", r.ErrorCode) - if r.ErrorDescription != "" { - s += fmt.Sprintf(" %q", r.ErrorDescription) - } - if r.ErrorURI != "" { - s += fmt.Sprintf(" %q", r.ErrorURI) - } - return s - } - return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body) -} diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go deleted file mode 100644 index 90657915..00000000 --- a/vendor/golang.org/x/oauth2/transport.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2014 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 ( - "errors" - "log" - "net/http" - "sync" -) - -// Transport is an http.RoundTripper that makes OAuth 2.0 HTTP requests, -// wrapping a base RoundTripper and adding an Authorization header -// with a token from the supplied Sources. -// -// Transport is a low-level mechanism. Most code will use the -// higher-level Config.Client method instead. -type Transport struct { - // Source supplies the token to add to outgoing requests' - // Authorization headers. - Source TokenSource - - // Base is the base RoundTripper used to make HTTP requests. - // If nil, http.DefaultTransport is used. - Base http.RoundTripper -} - -// RoundTrip authorizes and authenticates the request with an -// access token from Transport's Source. -func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { - reqBodyClosed := false - if req.Body != nil { - defer func() { - if !reqBodyClosed { - req.Body.Close() - } - }() - } - - if t.Source == nil { - return nil, errors.New("oauth2: Transport's Source is nil") - } - token, err := t.Source.Token() - if err != nil { - return nil, err - } - - req2 := cloneRequest(req) // per RoundTripper contract - token.SetAuthHeader(req2) - - // req.Body is assumed to be closed by the base RoundTripper. - reqBodyClosed = true - return t.base().RoundTrip(req2) -} - -var cancelOnce sync.Once - -// CancelRequest does nothing. It used to be a legacy cancellation mechanism -// but now only it only logs on first use to warn that it's deprecated. -// -// Deprecated: use contexts for cancellation instead. -func (t *Transport) CancelRequest(req *http.Request) { - cancelOnce.Do(func() { - log.Printf("deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts") - }) -} - -func (t *Transport) base() http.RoundTripper { - if t.Base != nil { - return t.Base - } - return http.DefaultTransport -} - -// cloneRequest returns a clone of the provided *http.Request. -// The clone is a shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header, len(r.Header)) - for k, s := range r.Header { - r2.Header[k] = append([]string(nil), s...) - } - return r2 -} diff --git a/vendor/google.golang.org/appengine/LICENSE b/vendor/google.golang.org/appengine/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/vendor/google.golang.org/appengine/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/google.golang.org/appengine/internal/api.go b/vendor/google.golang.org/appengine/internal/api.go deleted file mode 100644 index 0569f5dd..00000000 --- a/vendor/google.golang.org/appengine/internal/api.go +++ /dev/null @@ -1,653 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package internal - -import ( - "bytes" - "context" - "errors" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "net/url" - "os" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/golang/protobuf/proto" - - basepb "google.golang.org/appengine/internal/base" - logpb "google.golang.org/appengine/internal/log" - remotepb "google.golang.org/appengine/internal/remote_api" -) - -const ( - apiPath = "/rpc_http" -) - -var ( - // Incoming headers. - ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket") - dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo") - traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context") - curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace") - userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP") - remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr") - devRequestIdHeader = http.CanonicalHeaderKey("X-Appengine-Dev-Request-Id") - - // Outgoing headers. - apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint") - apiEndpointHeaderValue = []string{"app-engine-apis"} - apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method") - apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"} - apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline") - apiContentType = http.CanonicalHeaderKey("Content-Type") - apiContentTypeValue = []string{"application/octet-stream"} - logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count") - - apiHTTPClient = &http.Client{ - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - Dial: limitDial, - MaxIdleConns: 1000, - MaxIdleConnsPerHost: 10000, - IdleConnTimeout: 90 * time.Second, - }, - } -) - -func apiURL(ctx context.Context) *url.URL { - host, port := "appengine.googleapis.internal", "10001" - if h := os.Getenv("API_HOST"); h != "" { - host = h - } - if hostOverride := ctx.Value(apiHostOverrideKey); hostOverride != nil { - host = hostOverride.(string) - } - if p := os.Getenv("API_PORT"); p != "" { - port = p - } - if portOverride := ctx.Value(apiPortOverrideKey); portOverride != nil { - port = portOverride.(string) - } - return &url.URL{ - Scheme: "http", - Host: host + ":" + port, - Path: apiPath, - } -} - -// Middleware wraps an http handler so that it can make GAE API calls -func Middleware(next http.Handler) http.Handler { - return handleHTTPMiddleware(executeRequestSafelyMiddleware(next)) -} - -func handleHTTPMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - c := &aeContext{ - req: r, - outHeader: w.Header(), - } - r = r.WithContext(withContext(r.Context(), c)) - c.req = r - - stopFlushing := make(chan int) - - // Patch up RemoteAddr so it looks reasonable. - if addr := r.Header.Get(userIPHeader); addr != "" { - r.RemoteAddr = addr - } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { - r.RemoteAddr = addr - } else { - // Should not normally reach here, but pick a sensible default anyway. - r.RemoteAddr = "127.0.0.1" - } - // The address in the headers will most likely be of these forms: - // 123.123.123.123 - // 2001:db8::1 - // net/http.Request.RemoteAddr is specified to be in "IP:port" form. - if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { - // Assume the remote address is only a host; add a default port. - r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") - } - - if logToLogservice() { - // Start goroutine responsible for flushing app logs. - // This is done after adding c to ctx.m (and stopped before removing it) - // because flushing logs requires making an API call. - go c.logFlusher(stopFlushing) - } - - next.ServeHTTP(c, r) - c.outHeader = nil // make sure header changes aren't respected any more - - flushed := make(chan struct{}) - if logToLogservice() { - stopFlushing <- 1 // any logging beyond this point will be dropped - - // Flush any pending logs asynchronously. - c.pendingLogs.Lock() - flushes := c.pendingLogs.flushes - if len(c.pendingLogs.lines) > 0 { - flushes++ - } - c.pendingLogs.Unlock() - go func() { - defer close(flushed) - // Force a log flush, because with very short requests we - // may not ever flush logs. - c.flushLog(true) - }() - w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) - } - - // Avoid nil Write call if c.Write is never called. - if c.outCode != 0 { - w.WriteHeader(c.outCode) - } - if c.outBody != nil { - w.Write(c.outBody) - } - if logToLogservice() { - // Wait for the last flush to complete before returning, - // otherwise the security ticket will not be valid. - <-flushed - } - }) -} - -func executeRequestSafelyMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer func() { - if x := recover(); x != nil { - c := w.(*aeContext) - logf(c, 4, "%s", renderPanic(x)) // 4 == critical - c.outCode = 500 - } - }() - - next.ServeHTTP(w, r) - }) -} - -func renderPanic(x interface{}) string { - buf := make([]byte, 16<<10) // 16 KB should be plenty - buf = buf[:runtime.Stack(buf, false)] - - // Remove the first few stack frames: - // this func - // the recover closure in the caller - // That will root the stack trace at the site of the panic. - const ( - skipStart = "internal.renderPanic" - skipFrames = 2 - ) - start := bytes.Index(buf, []byte(skipStart)) - p := start - for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ { - p = bytes.IndexByte(buf[p+1:], '\n') + p + 1 - if p < 0 { - break - } - } - if p >= 0 { - // buf[start:p+1] is the block to remove. - // Copy buf[p+1:] over buf[start:] and shrink buf. - copy(buf[start:], buf[p+1:]) - buf = buf[:len(buf)-(p+1-start)] - } - - // Add panic heading. - head := fmt.Sprintf("panic: %v\n\n", x) - if len(head) > len(buf) { - // Extremely unlikely to happen. - return head - } - copy(buf[len(head):], buf) - copy(buf, head) - - return string(buf) -} - -// aeContext represents the aeContext of an in-flight HTTP request. -// It implements the appengine.Context and http.ResponseWriter interfaces. -type aeContext struct { - req *http.Request - - outCode int - outHeader http.Header - outBody []byte - - pendingLogs struct { - sync.Mutex - lines []*logpb.UserAppLogLine - flushes int - } -} - -var contextKey = "holds a *context" - -// jointContext joins two contexts in a superficial way. -// It takes values and timeouts from a base context, and only values from another context. -type jointContext struct { - base context.Context - valuesOnly context.Context -} - -func (c jointContext) Deadline() (time.Time, bool) { - return c.base.Deadline() -} - -func (c jointContext) Done() <-chan struct{} { - return c.base.Done() -} - -func (c jointContext) Err() error { - return c.base.Err() -} - -func (c jointContext) Value(key interface{}) interface{} { - if val := c.base.Value(key); val != nil { - return val - } - return c.valuesOnly.Value(key) -} - -// fromContext returns the App Engine context or nil if ctx is not -// derived from an App Engine context. -func fromContext(ctx context.Context) *aeContext { - c, _ := ctx.Value(&contextKey).(*aeContext) - return c -} - -func withContext(parent context.Context, c *aeContext) context.Context { - ctx := context.WithValue(parent, &contextKey, c) - if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { - ctx = withNamespace(ctx, ns) - } - return ctx -} - -func toContext(c *aeContext) context.Context { - return withContext(context.Background(), c) -} - -func IncomingHeaders(ctx context.Context) http.Header { - if c := fromContext(ctx); c != nil { - return c.req.Header - } - return nil -} - -func ReqContext(req *http.Request) context.Context { - return req.Context() -} - -func WithContext(parent context.Context, req *http.Request) context.Context { - return jointContext{ - base: parent, - valuesOnly: req.Context(), - } -} - -// RegisterTestRequest registers the HTTP request req for testing, such that -// any API calls are sent to the provided URL. -// It should only be used by aetest package. -func RegisterTestRequest(req *http.Request, apiURL *url.URL, appID string) *http.Request { - ctx := req.Context() - ctx = withAPIHostOverride(ctx, apiURL.Hostname()) - ctx = withAPIPortOverride(ctx, apiURL.Port()) - ctx = WithAppIDOverride(ctx, appID) - - // use the unregistered request as a placeholder so that withContext can read the headers - c := &aeContext{req: req} - c.req = req.WithContext(withContext(ctx, c)) - return c.req -} - -var errTimeout = &CallError{ - Detail: "Deadline exceeded", - Code: int32(remotepb.RpcError_CANCELLED), - Timeout: true, -} - -func (c *aeContext) Header() http.Header { return c.outHeader } - -// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status -// codes do not permit a response body (nor response entity headers such as -// Content-Length, Content-Type, etc). -func bodyAllowedForStatus(status int) bool { - switch { - case status >= 100 && status <= 199: - return false - case status == 204: - return false - case status == 304: - return false - } - return true -} - -func (c *aeContext) Write(b []byte) (int, error) { - if c.outCode == 0 { - c.WriteHeader(http.StatusOK) - } - if len(b) > 0 && !bodyAllowedForStatus(c.outCode) { - return 0, http.ErrBodyNotAllowed - } - c.outBody = append(c.outBody, b...) - return len(b), nil -} - -func (c *aeContext) WriteHeader(code int) { - if c.outCode != 0 { - logf(c, 3, "WriteHeader called multiple times on request.") // error level - return - } - c.outCode = code -} - -func post(ctx context.Context, body []byte, timeout time.Duration) (b []byte, err error) { - apiURL := apiURL(ctx) - hreq := &http.Request{ - Method: "POST", - URL: apiURL, - Header: http.Header{ - apiEndpointHeader: apiEndpointHeaderValue, - apiMethodHeader: apiMethodHeaderValue, - apiContentType: apiContentTypeValue, - apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)}, - }, - Body: ioutil.NopCloser(bytes.NewReader(body)), - ContentLength: int64(len(body)), - Host: apiURL.Host, - } - c := fromContext(ctx) - if c != nil { - if info := c.req.Header.Get(dapperHeader); info != "" { - hreq.Header.Set(dapperHeader, info) - } - if info := c.req.Header.Get(traceHeader); info != "" { - hreq.Header.Set(traceHeader, info) - } - } - - tr := apiHTTPClient.Transport.(*http.Transport) - - var timedOut int32 // atomic; set to 1 if timed out - t := time.AfterFunc(timeout, func() { - atomic.StoreInt32(&timedOut, 1) - tr.CancelRequest(hreq) - }) - defer t.Stop() - defer func() { - // Check if timeout was exceeded. - if atomic.LoadInt32(&timedOut) != 0 { - err = errTimeout - } - }() - - hresp, err := apiHTTPClient.Do(hreq) - if err != nil { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge HTTP failed: %v", err), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - defer hresp.Body.Close() - hrespBody, err := ioutil.ReadAll(hresp.Body) - if hresp.StatusCode != 200 { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - if err != nil { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge response bad: %v", err), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - return hrespBody, nil -} - -func Call(ctx context.Context, service, method string, in, out proto.Message) error { - if ns := NamespaceFromContext(ctx); ns != "" { - if fn, ok := NamespaceMods[service]; ok { - fn(in, ns) - } - } - - if f, ctx, ok := callOverrideFromContext(ctx); ok { - return f(ctx, service, method, in, out) - } - - // Handle already-done contexts quickly. - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - c := fromContext(ctx) - - // Apply transaction modifications if we're in a transaction. - if t := transactionFromContext(ctx); t != nil { - if t.finished { - return errors.New("transaction aeContext has expired") - } - applyTransaction(in, &t.transaction) - } - - // Default RPC timeout is 60s. - timeout := 60 * time.Second - if deadline, ok := ctx.Deadline(); ok { - timeout = deadline.Sub(time.Now()) - } - - data, err := proto.Marshal(in) - if err != nil { - return err - } - - ticket := "" - if c != nil { - ticket = c.req.Header.Get(ticketHeader) - if dri := c.req.Header.Get(devRequestIdHeader); IsDevAppServer() && dri != "" { - ticket = dri - } - } - req := &remotepb.Request{ - ServiceName: &service, - Method: &method, - Request: data, - RequestId: &ticket, - } - hreqBody, err := proto.Marshal(req) - if err != nil { - return err - } - - hrespBody, err := post(ctx, hreqBody, timeout) - if err != nil { - return err - } - - res := &remotepb.Response{} - if err := proto.Unmarshal(hrespBody, res); err != nil { - return err - } - if res.RpcError != nil { - ce := &CallError{ - Detail: res.RpcError.GetDetail(), - Code: *res.RpcError.Code, - } - switch remotepb.RpcError_ErrorCode(ce.Code) { - case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED: - ce.Timeout = true - } - return ce - } - if res.ApplicationError != nil { - return &APIError{ - Service: *req.ServiceName, - Detail: res.ApplicationError.GetDetail(), - Code: *res.ApplicationError.Code, - } - } - if res.Exception != nil || res.JavaException != nil { - // This shouldn't happen, but let's be defensive. - return &CallError{ - Detail: "service bridge returned exception", - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - return proto.Unmarshal(res.Response, out) -} - -func (c *aeContext) Request() *http.Request { - return c.req -} - -func (c *aeContext) addLogLine(ll *logpb.UserAppLogLine) { - // Truncate long log lines. - // TODO(dsymonds): Check if this is still necessary. - const lim = 8 << 10 - if len(*ll.Message) > lim { - suffix := fmt.Sprintf("...(length %d)", len(*ll.Message)) - ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix) - } - - c.pendingLogs.Lock() - c.pendingLogs.lines = append(c.pendingLogs.lines, ll) - c.pendingLogs.Unlock() -} - -var logLevelName = map[int64]string{ - 0: "DEBUG", - 1: "INFO", - 2: "WARNING", - 3: "ERROR", - 4: "CRITICAL", -} - -func logf(c *aeContext, level int64, format string, args ...interface{}) { - if c == nil { - panic("not an App Engine aeContext") - } - s := fmt.Sprintf(format, args...) - s = strings.TrimRight(s, "\n") // Remove any trailing newline characters. - if logToLogservice() { - c.addLogLine(&logpb.UserAppLogLine{ - TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), - Level: &level, - Message: &s, - }) - } - // Log to stdout if not deployed - if !IsSecondGen() { - log.Print(logLevelName[level] + ": " + s) - } -} - -// flushLog attempts to flush any pending logs to the appserver. -// It should not be called concurrently. -func (c *aeContext) flushLog(force bool) (flushed bool) { - c.pendingLogs.Lock() - // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious. - n, rem := 0, 30<<20 - for ; n < len(c.pendingLogs.lines); n++ { - ll := c.pendingLogs.lines[n] - // Each log line will require about 3 bytes of overhead. - nb := proto.Size(ll) + 3 - if nb > rem { - break - } - rem -= nb - } - lines := c.pendingLogs.lines[:n] - c.pendingLogs.lines = c.pendingLogs.lines[n:] - c.pendingLogs.Unlock() - - if len(lines) == 0 && !force { - // Nothing to flush. - return false - } - - rescueLogs := false - defer func() { - if rescueLogs { - c.pendingLogs.Lock() - c.pendingLogs.lines = append(lines, c.pendingLogs.lines...) - c.pendingLogs.Unlock() - } - }() - - buf, err := proto.Marshal(&logpb.UserAppLogGroup{ - LogLine: lines, - }) - if err != nil { - log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err) - rescueLogs = true - return false - } - - req := &logpb.FlushRequest{ - Logs: buf, - } - res := &basepb.VoidProto{} - c.pendingLogs.Lock() - c.pendingLogs.flushes++ - c.pendingLogs.Unlock() - if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil { - log.Printf("internal.flushLog: Flush RPC: %v", err) - rescueLogs = true - return false - } - return true -} - -const ( - // Log flushing parameters. - flushInterval = 1 * time.Second - forceFlushInterval = 60 * time.Second -) - -func (c *aeContext) logFlusher(stop <-chan int) { - lastFlush := time.Now() - tick := time.NewTicker(flushInterval) - for { - select { - case <-stop: - // Request finished. - tick.Stop() - return - case <-tick.C: - force := time.Now().Sub(lastFlush) > forceFlushInterval - if c.flushLog(force) { - lastFlush = time.Now() - } - } - } -} - -func ContextForTesting(req *http.Request) context.Context { - return toContext(&aeContext{req: req}) -} - -func logToLogservice() bool { - // TODO: replace logservice with json structured logs to $LOG_DIR/app.log.json - // where $LOG_DIR is /var/log in prod and some tmpdir in dev - return os.Getenv("LOG_TO_LOGSERVICE") != "0" -} diff --git a/vendor/google.golang.org/appengine/internal/api_classic.go b/vendor/google.golang.org/appengine/internal/api_classic.go deleted file mode 100644 index 87c33c79..00000000 --- a/vendor/google.golang.org/appengine/internal/api_classic.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appengine -// +build appengine - -package internal - -import ( - "context" - "errors" - "fmt" - "net/http" - "time" - - "appengine" - "appengine_internal" - basepb "appengine_internal/base" - - "github.com/golang/protobuf/proto" -) - -var contextKey = "holds an appengine.Context" - -// fromContext returns the App Engine context or nil if ctx is not -// derived from an App Engine context. -func fromContext(ctx context.Context) appengine.Context { - c, _ := ctx.Value(&contextKey).(appengine.Context) - return c -} - -// This is only for classic App Engine adapters. -func ClassicContextFromContext(ctx context.Context) (appengine.Context, error) { - c := fromContext(ctx) - if c == nil { - return nil, errNotAppEngineContext - } - return c, nil -} - -func withContext(parent context.Context, c appengine.Context) context.Context { - ctx := context.WithValue(parent, &contextKey, c) - - s := &basepb.StringProto{} - c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil) - if ns := s.GetValue(); ns != "" { - ctx = NamespacedContext(ctx, ns) - } - - return ctx -} - -func IncomingHeaders(ctx context.Context) http.Header { - if c := fromContext(ctx); c != nil { - if req, ok := c.Request().(*http.Request); ok { - return req.Header - } - } - return nil -} - -func ReqContext(req *http.Request) context.Context { - return WithContext(context.Background(), req) -} - -func WithContext(parent context.Context, req *http.Request) context.Context { - c := appengine.NewContext(req) - return withContext(parent, c) -} - -type testingContext struct { - appengine.Context - - req *http.Request -} - -func (t *testingContext) FullyQualifiedAppID() string { return "dev~testcontext" } -func (t *testingContext) Call(service, method string, _, _ appengine_internal.ProtoMessage, _ *appengine_internal.CallOptions) error { - if service == "__go__" && method == "GetNamespace" { - return nil - } - return fmt.Errorf("testingContext: unsupported Call") -} -func (t *testingContext) Request() interface{} { return t.req } - -func ContextForTesting(req *http.Request) context.Context { - return withContext(context.Background(), &testingContext{req: req}) -} - -func Call(ctx context.Context, service, method string, in, out proto.Message) error { - if ns := NamespaceFromContext(ctx); ns != "" { - if fn, ok := NamespaceMods[service]; ok { - fn(in, ns) - } - } - - if f, ctx, ok := callOverrideFromContext(ctx); ok { - return f(ctx, service, method, in, out) - } - - // Handle already-done contexts quickly. - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - c := fromContext(ctx) - if c == nil { - // Give a good error message rather than a panic lower down. - return errNotAppEngineContext - } - - // Apply transaction modifications if we're in a transaction. - if t := transactionFromContext(ctx); t != nil { - if t.finished { - return errors.New("transaction context has expired") - } - applyTransaction(in, &t.transaction) - } - - var opts *appengine_internal.CallOptions - if d, ok := ctx.Deadline(); ok { - opts = &appengine_internal.CallOptions{ - Timeout: d.Sub(time.Now()), - } - } - - err := c.Call(service, method, in, out, opts) - switch v := err.(type) { - case *appengine_internal.APIError: - return &APIError{ - Service: v.Service, - Detail: v.Detail, - Code: v.Code, - } - case *appengine_internal.CallError: - return &CallError{ - Detail: v.Detail, - Code: v.Code, - Timeout: v.Timeout, - } - } - return err -} - -func Middleware(next http.Handler) http.Handler { - panic("Middleware called; this should be impossible") -} - -func logf(c appengine.Context, level int64, format string, args ...interface{}) { - var fn func(format string, args ...interface{}) - switch level { - case 0: - fn = c.Debugf - case 1: - fn = c.Infof - case 2: - fn = c.Warningf - case 3: - fn = c.Errorf - case 4: - fn = c.Criticalf - default: - // This shouldn't happen. - fn = c.Criticalf - } - fn(format, args...) -} diff --git a/vendor/google.golang.org/appengine/internal/api_common.go b/vendor/google.golang.org/appengine/internal/api_common.go deleted file mode 100644 index 5b95c13d..00000000 --- a/vendor/google.golang.org/appengine/internal/api_common.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -import ( - "context" - "errors" - "os" - - "github.com/golang/protobuf/proto" -) - -type ctxKey string - -func (c ctxKey) String() string { - return "appengine context key: " + string(c) -} - -var errNotAppEngineContext = errors.New("not an App Engine context") - -type CallOverrideFunc func(ctx context.Context, service, method string, in, out proto.Message) error - -var callOverrideKey = "holds []CallOverrideFunc" - -func WithCallOverride(ctx context.Context, f CallOverrideFunc) context.Context { - // We avoid appending to any existing call override - // so we don't risk overwriting a popped stack below. - var cofs []CallOverrideFunc - if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok { - cofs = append(cofs, uf...) - } - cofs = append(cofs, f) - return context.WithValue(ctx, &callOverrideKey, cofs) -} - -func callOverrideFromContext(ctx context.Context) (CallOverrideFunc, context.Context, bool) { - cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc) - if len(cofs) == 0 { - return nil, nil, false - } - // We found a list of overrides; grab the last, and reconstitute a - // context that will hide it. - f := cofs[len(cofs)-1] - ctx = context.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1]) - return f, ctx, true -} - -type logOverrideFunc func(level int64, format string, args ...interface{}) - -var logOverrideKey = "holds a logOverrideFunc" - -func WithLogOverride(ctx context.Context, f logOverrideFunc) context.Context { - return context.WithValue(ctx, &logOverrideKey, f) -} - -var appIDOverrideKey = "holds a string, being the full app ID" - -func WithAppIDOverride(ctx context.Context, appID string) context.Context { - return context.WithValue(ctx, &appIDOverrideKey, appID) -} - -var apiHostOverrideKey = ctxKey("holds a string, being the alternate API_HOST") - -func withAPIHostOverride(ctx context.Context, apiHost string) context.Context { - return context.WithValue(ctx, apiHostOverrideKey, apiHost) -} - -var apiPortOverrideKey = ctxKey("holds a string, being the alternate API_PORT") - -func withAPIPortOverride(ctx context.Context, apiPort string) context.Context { - return context.WithValue(ctx, apiPortOverrideKey, apiPort) -} - -var namespaceKey = "holds the namespace string" - -func withNamespace(ctx context.Context, ns string) context.Context { - return context.WithValue(ctx, &namespaceKey, ns) -} - -func NamespaceFromContext(ctx context.Context) string { - // If there's no namespace, return the empty string. - ns, _ := ctx.Value(&namespaceKey).(string) - return ns -} - -// FullyQualifiedAppID returns the fully-qualified application ID. -// This may contain a partition prefix (e.g. "s~" for High Replication apps), -// or a domain prefix (e.g. "example.com:"). -func FullyQualifiedAppID(ctx context.Context) string { - if id, ok := ctx.Value(&appIDOverrideKey).(string); ok { - return id - } - return fullyQualifiedAppID(ctx) -} - -func Logf(ctx context.Context, level int64, format string, args ...interface{}) { - if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok { - f(level, format, args...) - return - } - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - logf(c, level, format, args...) -} - -// NamespacedContext wraps a Context to support namespaces. -func NamespacedContext(ctx context.Context, namespace string) context.Context { - return withNamespace(ctx, namespace) -} - -// SetTestEnv sets the env variables for testing background ticket in Flex. -func SetTestEnv() func() { - var environ = []struct { - key, value string - }{ - {"GAE_LONG_APP_ID", "my-app-id"}, - {"GAE_MINOR_VERSION", "067924799508853122"}, - {"GAE_MODULE_INSTANCE", "0"}, - {"GAE_MODULE_NAME", "default"}, - {"GAE_MODULE_VERSION", "20150612t184001"}, - } - - for _, v := range environ { - old := os.Getenv(v.key) - os.Setenv(v.key, v.value) - v.value = old - } - return func() { // Restore old environment after the test completes. - for _, v := range environ { - if v.value == "" { - os.Unsetenv(v.key) - continue - } - os.Setenv(v.key, v.value) - } - } -} diff --git a/vendor/google.golang.org/appengine/internal/app_id.go b/vendor/google.golang.org/appengine/internal/app_id.go deleted file mode 100644 index 11df8c07..00000000 --- a/vendor/google.golang.org/appengine/internal/app_id.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -import ( - "strings" -) - -func parseFullAppID(appid string) (partition, domain, displayID string) { - if i := strings.Index(appid, "~"); i != -1 { - partition, appid = appid[:i], appid[i+1:] - } - if i := strings.Index(appid, ":"); i != -1 { - domain, appid = appid[:i], appid[i+1:] - } - return partition, domain, appid -} - -// appID returns "appid" or "domain.com:appid". -func appID(fullAppID string) string { - _, dom, dis := parseFullAppID(fullAppID) - if dom != "" { - return dom + ":" + dis - } - return dis -} diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go b/vendor/google.golang.org/appengine/internal/base/api_base.pb.go deleted file mode 100644 index db4777e6..00000000 --- a/vendor/google.golang.org/appengine/internal/base/api_base.pb.go +++ /dev/null @@ -1,308 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/base/api_base.proto - -package base - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type StringProto struct { - Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StringProto) Reset() { *m = StringProto{} } -func (m *StringProto) String() string { return proto.CompactTextString(m) } -func (*StringProto) ProtoMessage() {} -func (*StringProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{0} -} -func (m *StringProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringProto.Unmarshal(m, b) -} -func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringProto.Marshal(b, m, deterministic) -} -func (dst *StringProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringProto.Merge(dst, src) -} -func (m *StringProto) XXX_Size() int { - return xxx_messageInfo_StringProto.Size(m) -} -func (m *StringProto) XXX_DiscardUnknown() { - xxx_messageInfo_StringProto.DiscardUnknown(m) -} - -var xxx_messageInfo_StringProto proto.InternalMessageInfo - -func (m *StringProto) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -type Integer32Proto struct { - Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Integer32Proto) Reset() { *m = Integer32Proto{} } -func (m *Integer32Proto) String() string { return proto.CompactTextString(m) } -func (*Integer32Proto) ProtoMessage() {} -func (*Integer32Proto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{1} -} -func (m *Integer32Proto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Integer32Proto.Unmarshal(m, b) -} -func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic) -} -func (dst *Integer32Proto) XXX_Merge(src proto.Message) { - xxx_messageInfo_Integer32Proto.Merge(dst, src) -} -func (m *Integer32Proto) XXX_Size() int { - return xxx_messageInfo_Integer32Proto.Size(m) -} -func (m *Integer32Proto) XXX_DiscardUnknown() { - xxx_messageInfo_Integer32Proto.DiscardUnknown(m) -} - -var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo - -func (m *Integer32Proto) GetValue() int32 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type Integer64Proto struct { - Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Integer64Proto) Reset() { *m = Integer64Proto{} } -func (m *Integer64Proto) String() string { return proto.CompactTextString(m) } -func (*Integer64Proto) ProtoMessage() {} -func (*Integer64Proto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{2} -} -func (m *Integer64Proto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Integer64Proto.Unmarshal(m, b) -} -func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic) -} -func (dst *Integer64Proto) XXX_Merge(src proto.Message) { - xxx_messageInfo_Integer64Proto.Merge(dst, src) -} -func (m *Integer64Proto) XXX_Size() int { - return xxx_messageInfo_Integer64Proto.Size(m) -} -func (m *Integer64Proto) XXX_DiscardUnknown() { - xxx_messageInfo_Integer64Proto.DiscardUnknown(m) -} - -var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo - -func (m *Integer64Proto) GetValue() int64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type BoolProto struct { - Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BoolProto) Reset() { *m = BoolProto{} } -func (m *BoolProto) String() string { return proto.CompactTextString(m) } -func (*BoolProto) ProtoMessage() {} -func (*BoolProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{3} -} -func (m *BoolProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BoolProto.Unmarshal(m, b) -} -func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic) -} -func (dst *BoolProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_BoolProto.Merge(dst, src) -} -func (m *BoolProto) XXX_Size() int { - return xxx_messageInfo_BoolProto.Size(m) -} -func (m *BoolProto) XXX_DiscardUnknown() { - xxx_messageInfo_BoolProto.DiscardUnknown(m) -} - -var xxx_messageInfo_BoolProto proto.InternalMessageInfo - -func (m *BoolProto) GetValue() bool { - if m != nil && m.Value != nil { - return *m.Value - } - return false -} - -type DoubleProto struct { - Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleProto) Reset() { *m = DoubleProto{} } -func (m *DoubleProto) String() string { return proto.CompactTextString(m) } -func (*DoubleProto) ProtoMessage() {} -func (*DoubleProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{4} -} -func (m *DoubleProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DoubleProto.Unmarshal(m, b) -} -func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic) -} -func (dst *DoubleProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleProto.Merge(dst, src) -} -func (m *DoubleProto) XXX_Size() int { - return xxx_messageInfo_DoubleProto.Size(m) -} -func (m *DoubleProto) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleProto.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleProto proto.InternalMessageInfo - -func (m *DoubleProto) GetValue() float64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type BytesProto struct { - Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BytesProto) Reset() { *m = BytesProto{} } -func (m *BytesProto) String() string { return proto.CompactTextString(m) } -func (*BytesProto) ProtoMessage() {} -func (*BytesProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{5} -} -func (m *BytesProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BytesProto.Unmarshal(m, b) -} -func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic) -} -func (dst *BytesProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_BytesProto.Merge(dst, src) -} -func (m *BytesProto) XXX_Size() int { - return xxx_messageInfo_BytesProto.Size(m) -} -func (m *BytesProto) XXX_DiscardUnknown() { - xxx_messageInfo_BytesProto.DiscardUnknown(m) -} - -var xxx_messageInfo_BytesProto proto.InternalMessageInfo - -func (m *BytesProto) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -type VoidProto struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VoidProto) Reset() { *m = VoidProto{} } -func (m *VoidProto) String() string { return proto.CompactTextString(m) } -func (*VoidProto) ProtoMessage() {} -func (*VoidProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{6} -} -func (m *VoidProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VoidProto.Unmarshal(m, b) -} -func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic) -} -func (dst *VoidProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoidProto.Merge(dst, src) -} -func (m *VoidProto) XXX_Size() int { - return xxx_messageInfo_VoidProto.Size(m) -} -func (m *VoidProto) XXX_DiscardUnknown() { - xxx_messageInfo_VoidProto.DiscardUnknown(m) -} - -var xxx_messageInfo_VoidProto proto.InternalMessageInfo - -func init() { - proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto") - proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto") - proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto") - proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto") - proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto") - proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto") - proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140) -} - -var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{ - // 199 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30, - 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40, - 0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6, - 0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62, - 0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71, - 0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe, - 0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1, - 0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71, - 0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d, - 0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff, - 0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d, - 0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba, - 0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/base/api_base.proto b/vendor/google.golang.org/appengine/internal/base/api_base.proto deleted file mode 100644 index 56cd7a3c..00000000 --- a/vendor/google.golang.org/appengine/internal/base/api_base.proto +++ /dev/null @@ -1,33 +0,0 @@ -// Built-in base types for API calls. Primarily useful as return types. - -syntax = "proto2"; -option go_package = "base"; - -package appengine.base; - -message StringProto { - required string value = 1; -} - -message Integer32Proto { - required int32 value = 1; -} - -message Integer64Proto { - required int64 value = 1; -} - -message BoolProto { - required bool value = 1; -} - -message DoubleProto { - required double value = 1; -} - -message BytesProto { - required bytes value = 1 [ctype=CORD]; -} - -message VoidProto { -} diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go deleted file mode 100644 index 2fb74828..00000000 --- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +++ /dev/null @@ -1,4367 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/datastore/datastore_v3.proto - -package datastore - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type Property_Meaning int32 - -const ( - Property_NO_MEANING Property_Meaning = 0 - Property_BLOB Property_Meaning = 14 - Property_TEXT Property_Meaning = 15 - Property_BYTESTRING Property_Meaning = 16 - Property_ATOM_CATEGORY Property_Meaning = 1 - Property_ATOM_LINK Property_Meaning = 2 - Property_ATOM_TITLE Property_Meaning = 3 - Property_ATOM_CONTENT Property_Meaning = 4 - Property_ATOM_SUMMARY Property_Meaning = 5 - Property_ATOM_AUTHOR Property_Meaning = 6 - Property_GD_WHEN Property_Meaning = 7 - Property_GD_EMAIL Property_Meaning = 8 - Property_GEORSS_POINT Property_Meaning = 9 - Property_GD_IM Property_Meaning = 10 - Property_GD_PHONENUMBER Property_Meaning = 11 - Property_GD_POSTALADDRESS Property_Meaning = 12 - Property_GD_RATING Property_Meaning = 13 - Property_BLOBKEY Property_Meaning = 17 - Property_ENTITY_PROTO Property_Meaning = 19 - Property_INDEX_VALUE Property_Meaning = 18 -) - -var Property_Meaning_name = map[int32]string{ - 0: "NO_MEANING", - 14: "BLOB", - 15: "TEXT", - 16: "BYTESTRING", - 1: "ATOM_CATEGORY", - 2: "ATOM_LINK", - 3: "ATOM_TITLE", - 4: "ATOM_CONTENT", - 5: "ATOM_SUMMARY", - 6: "ATOM_AUTHOR", - 7: "GD_WHEN", - 8: "GD_EMAIL", - 9: "GEORSS_POINT", - 10: "GD_IM", - 11: "GD_PHONENUMBER", - 12: "GD_POSTALADDRESS", - 13: "GD_RATING", - 17: "BLOBKEY", - 19: "ENTITY_PROTO", - 18: "INDEX_VALUE", -} -var Property_Meaning_value = map[string]int32{ - "NO_MEANING": 0, - "BLOB": 14, - "TEXT": 15, - "BYTESTRING": 16, - "ATOM_CATEGORY": 1, - "ATOM_LINK": 2, - "ATOM_TITLE": 3, - "ATOM_CONTENT": 4, - "ATOM_SUMMARY": 5, - "ATOM_AUTHOR": 6, - "GD_WHEN": 7, - "GD_EMAIL": 8, - "GEORSS_POINT": 9, - "GD_IM": 10, - "GD_PHONENUMBER": 11, - "GD_POSTALADDRESS": 12, - "GD_RATING": 13, - "BLOBKEY": 17, - "ENTITY_PROTO": 19, - "INDEX_VALUE": 18, -} - -func (x Property_Meaning) Enum() *Property_Meaning { - p := new(Property_Meaning) - *p = x - return p -} -func (x Property_Meaning) String() string { - return proto.EnumName(Property_Meaning_name, int32(x)) -} -func (x *Property_Meaning) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Property_Meaning_value, data, "Property_Meaning") - if err != nil { - return err - } - *x = Property_Meaning(value) - return nil -} -func (Property_Meaning) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0} -} - -type Property_FtsTokenizationOption int32 - -const ( - Property_HTML Property_FtsTokenizationOption = 1 - Property_ATOM Property_FtsTokenizationOption = 2 -) - -var Property_FtsTokenizationOption_name = map[int32]string{ - 1: "HTML", - 2: "ATOM", -} -var Property_FtsTokenizationOption_value = map[string]int32{ - "HTML": 1, - "ATOM": 2, -} - -func (x Property_FtsTokenizationOption) Enum() *Property_FtsTokenizationOption { - p := new(Property_FtsTokenizationOption) - *p = x - return p -} -func (x Property_FtsTokenizationOption) String() string { - return proto.EnumName(Property_FtsTokenizationOption_name, int32(x)) -} -func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Property_FtsTokenizationOption_value, data, "Property_FtsTokenizationOption") - if err != nil { - return err - } - *x = Property_FtsTokenizationOption(value) - return nil -} -func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1} -} - -type EntityProto_Kind int32 - -const ( - EntityProto_GD_CONTACT EntityProto_Kind = 1 - EntityProto_GD_EVENT EntityProto_Kind = 2 - EntityProto_GD_MESSAGE EntityProto_Kind = 3 -) - -var EntityProto_Kind_name = map[int32]string{ - 1: "GD_CONTACT", - 2: "GD_EVENT", - 3: "GD_MESSAGE", -} -var EntityProto_Kind_value = map[string]int32{ - "GD_CONTACT": 1, - "GD_EVENT": 2, - "GD_MESSAGE": 3, -} - -func (x EntityProto_Kind) Enum() *EntityProto_Kind { - p := new(EntityProto_Kind) - *p = x - return p -} -func (x EntityProto_Kind) String() string { - return proto.EnumName(EntityProto_Kind_name, int32(x)) -} -func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(EntityProto_Kind_value, data, "EntityProto_Kind") - if err != nil { - return err - } - *x = EntityProto_Kind(value) - return nil -} -func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0} -} - -type Index_Property_Direction int32 - -const ( - Index_Property_ASCENDING Index_Property_Direction = 1 - Index_Property_DESCENDING Index_Property_Direction = 2 -) - -var Index_Property_Direction_name = map[int32]string{ - 1: "ASCENDING", - 2: "DESCENDING", -} -var Index_Property_Direction_value = map[string]int32{ - "ASCENDING": 1, - "DESCENDING": 2, -} - -func (x Index_Property_Direction) Enum() *Index_Property_Direction { - p := new(Index_Property_Direction) - *p = x - return p -} -func (x Index_Property_Direction) String() string { - return proto.EnumName(Index_Property_Direction_name, int32(x)) -} -func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Index_Property_Direction_value, data, "Index_Property_Direction") - if err != nil { - return err - } - *x = Index_Property_Direction(value) - return nil -} -func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0} -} - -type CompositeIndex_State int32 - -const ( - CompositeIndex_WRITE_ONLY CompositeIndex_State = 1 - CompositeIndex_READ_WRITE CompositeIndex_State = 2 - CompositeIndex_DELETED CompositeIndex_State = 3 - CompositeIndex_ERROR CompositeIndex_State = 4 -) - -var CompositeIndex_State_name = map[int32]string{ - 1: "WRITE_ONLY", - 2: "READ_WRITE", - 3: "DELETED", - 4: "ERROR", -} -var CompositeIndex_State_value = map[string]int32{ - "WRITE_ONLY": 1, - "READ_WRITE": 2, - "DELETED": 3, - "ERROR": 4, -} - -func (x CompositeIndex_State) Enum() *CompositeIndex_State { - p := new(CompositeIndex_State) - *p = x - return p -} -func (x CompositeIndex_State) String() string { - return proto.EnumName(CompositeIndex_State_name, int32(x)) -} -func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CompositeIndex_State_value, data, "CompositeIndex_State") - if err != nil { - return err - } - *x = CompositeIndex_State(value) - return nil -} -func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0} -} - -type Snapshot_Status int32 - -const ( - Snapshot_INACTIVE Snapshot_Status = 0 - Snapshot_ACTIVE Snapshot_Status = 1 -) - -var Snapshot_Status_name = map[int32]string{ - 0: "INACTIVE", - 1: "ACTIVE", -} -var Snapshot_Status_value = map[string]int32{ - "INACTIVE": 0, - "ACTIVE": 1, -} - -func (x Snapshot_Status) Enum() *Snapshot_Status { - p := new(Snapshot_Status) - *p = x - return p -} -func (x Snapshot_Status) String() string { - return proto.EnumName(Snapshot_Status_name, int32(x)) -} -func (x *Snapshot_Status) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Snapshot_Status_value, data, "Snapshot_Status") - if err != nil { - return err - } - *x = Snapshot_Status(value) - return nil -} -func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0} -} - -type Query_Hint int32 - -const ( - Query_ORDER_FIRST Query_Hint = 1 - Query_ANCESTOR_FIRST Query_Hint = 2 - Query_FILTER_FIRST Query_Hint = 3 -) - -var Query_Hint_name = map[int32]string{ - 1: "ORDER_FIRST", - 2: "ANCESTOR_FIRST", - 3: "FILTER_FIRST", -} -var Query_Hint_value = map[string]int32{ - "ORDER_FIRST": 1, - "ANCESTOR_FIRST": 2, - "FILTER_FIRST": 3, -} - -func (x Query_Hint) Enum() *Query_Hint { - p := new(Query_Hint) - *p = x - return p -} -func (x Query_Hint) String() string { - return proto.EnumName(Query_Hint_name, int32(x)) -} -func (x *Query_Hint) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Query_Hint_value, data, "Query_Hint") - if err != nil { - return err - } - *x = Query_Hint(value) - return nil -} -func (Query_Hint) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} -} - -type Query_Filter_Operator int32 - -const ( - Query_Filter_LESS_THAN Query_Filter_Operator = 1 - Query_Filter_LESS_THAN_OR_EQUAL Query_Filter_Operator = 2 - Query_Filter_GREATER_THAN Query_Filter_Operator = 3 - Query_Filter_GREATER_THAN_OR_EQUAL Query_Filter_Operator = 4 - Query_Filter_EQUAL Query_Filter_Operator = 5 - Query_Filter_IN Query_Filter_Operator = 6 - Query_Filter_EXISTS Query_Filter_Operator = 7 -) - -var Query_Filter_Operator_name = map[int32]string{ - 1: "LESS_THAN", - 2: "LESS_THAN_OR_EQUAL", - 3: "GREATER_THAN", - 4: "GREATER_THAN_OR_EQUAL", - 5: "EQUAL", - 6: "IN", - 7: "EXISTS", -} -var Query_Filter_Operator_value = map[string]int32{ - "LESS_THAN": 1, - "LESS_THAN_OR_EQUAL": 2, - "GREATER_THAN": 3, - "GREATER_THAN_OR_EQUAL": 4, - "EQUAL": 5, - "IN": 6, - "EXISTS": 7, -} - -func (x Query_Filter_Operator) Enum() *Query_Filter_Operator { - p := new(Query_Filter_Operator) - *p = x - return p -} -func (x Query_Filter_Operator) String() string { - return proto.EnumName(Query_Filter_Operator_name, int32(x)) -} -func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Query_Filter_Operator_value, data, "Query_Filter_Operator") - if err != nil { - return err - } - *x = Query_Filter_Operator(value) - return nil -} -func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0} -} - -type Query_Order_Direction int32 - -const ( - Query_Order_ASCENDING Query_Order_Direction = 1 - Query_Order_DESCENDING Query_Order_Direction = 2 -) - -var Query_Order_Direction_name = map[int32]string{ - 1: "ASCENDING", - 2: "DESCENDING", -} -var Query_Order_Direction_value = map[string]int32{ - "ASCENDING": 1, - "DESCENDING": 2, -} - -func (x Query_Order_Direction) Enum() *Query_Order_Direction { - p := new(Query_Order_Direction) - *p = x - return p -} -func (x Query_Order_Direction) String() string { - return proto.EnumName(Query_Order_Direction_name, int32(x)) -} -func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Query_Order_Direction_value, data, "Query_Order_Direction") - if err != nil { - return err - } - *x = Query_Order_Direction(value) - return nil -} -func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0} -} - -type Error_ErrorCode int32 - -const ( - Error_BAD_REQUEST Error_ErrorCode = 1 - Error_CONCURRENT_TRANSACTION Error_ErrorCode = 2 - Error_INTERNAL_ERROR Error_ErrorCode = 3 - Error_NEED_INDEX Error_ErrorCode = 4 - Error_TIMEOUT Error_ErrorCode = 5 - Error_PERMISSION_DENIED Error_ErrorCode = 6 - Error_BIGTABLE_ERROR Error_ErrorCode = 7 - Error_COMMITTED_BUT_STILL_APPLYING Error_ErrorCode = 8 - Error_CAPABILITY_DISABLED Error_ErrorCode = 9 - Error_TRY_ALTERNATE_BACKEND Error_ErrorCode = 10 - Error_SAFE_TIME_TOO_OLD Error_ErrorCode = 11 -) - -var Error_ErrorCode_name = map[int32]string{ - 1: "BAD_REQUEST", - 2: "CONCURRENT_TRANSACTION", - 3: "INTERNAL_ERROR", - 4: "NEED_INDEX", - 5: "TIMEOUT", - 6: "PERMISSION_DENIED", - 7: "BIGTABLE_ERROR", - 8: "COMMITTED_BUT_STILL_APPLYING", - 9: "CAPABILITY_DISABLED", - 10: "TRY_ALTERNATE_BACKEND", - 11: "SAFE_TIME_TOO_OLD", -} -var Error_ErrorCode_value = map[string]int32{ - "BAD_REQUEST": 1, - "CONCURRENT_TRANSACTION": 2, - "INTERNAL_ERROR": 3, - "NEED_INDEX": 4, - "TIMEOUT": 5, - "PERMISSION_DENIED": 6, - "BIGTABLE_ERROR": 7, - "COMMITTED_BUT_STILL_APPLYING": 8, - "CAPABILITY_DISABLED": 9, - "TRY_ALTERNATE_BACKEND": 10, - "SAFE_TIME_TOO_OLD": 11, -} - -func (x Error_ErrorCode) Enum() *Error_ErrorCode { - p := new(Error_ErrorCode) - *p = x - return p -} -func (x Error_ErrorCode) String() string { - return proto.EnumName(Error_ErrorCode_name, int32(x)) -} -func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Error_ErrorCode_value, data, "Error_ErrorCode") - if err != nil { - return err - } - *x = Error_ErrorCode(value) - return nil -} -func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0} -} - -type PutRequest_AutoIdPolicy int32 - -const ( - PutRequest_CURRENT PutRequest_AutoIdPolicy = 0 - PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1 -) - -var PutRequest_AutoIdPolicy_name = map[int32]string{ - 0: "CURRENT", - 1: "SEQUENTIAL", -} -var PutRequest_AutoIdPolicy_value = map[string]int32{ - "CURRENT": 0, - "SEQUENTIAL": 1, -} - -func (x PutRequest_AutoIdPolicy) Enum() *PutRequest_AutoIdPolicy { - p := new(PutRequest_AutoIdPolicy) - *p = x - return p -} -func (x PutRequest_AutoIdPolicy) String() string { - return proto.EnumName(PutRequest_AutoIdPolicy_name, int32(x)) -} -func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(PutRequest_AutoIdPolicy_value, data, "PutRequest_AutoIdPolicy") - if err != nil { - return err - } - *x = PutRequest_AutoIdPolicy(value) - return nil -} -func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0} -} - -type BeginTransactionRequest_TransactionMode int32 - -const ( - BeginTransactionRequest_UNKNOWN BeginTransactionRequest_TransactionMode = 0 - BeginTransactionRequest_READ_ONLY BeginTransactionRequest_TransactionMode = 1 - BeginTransactionRequest_READ_WRITE BeginTransactionRequest_TransactionMode = 2 -) - -var BeginTransactionRequest_TransactionMode_name = map[int32]string{ - 0: "UNKNOWN", - 1: "READ_ONLY", - 2: "READ_WRITE", -} -var BeginTransactionRequest_TransactionMode_value = map[string]int32{ - "UNKNOWN": 0, - "READ_ONLY": 1, - "READ_WRITE": 2, -} - -func (x BeginTransactionRequest_TransactionMode) Enum() *BeginTransactionRequest_TransactionMode { - p := new(BeginTransactionRequest_TransactionMode) - *p = x - return p -} -func (x BeginTransactionRequest_TransactionMode) String() string { - return proto.EnumName(BeginTransactionRequest_TransactionMode_name, int32(x)) -} -func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_TransactionMode_value, data, "BeginTransactionRequest_TransactionMode") - if err != nil { - return err - } - *x = BeginTransactionRequest_TransactionMode(value) - return nil -} -func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0} -} - -type Action struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Action) Reset() { *m = Action{} } -func (m *Action) String() string { return proto.CompactTextString(m) } -func (*Action) ProtoMessage() {} -func (*Action) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0} -} -func (m *Action) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Action.Unmarshal(m, b) -} -func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Action.Marshal(b, m, deterministic) -} -func (dst *Action) XXX_Merge(src proto.Message) { - xxx_messageInfo_Action.Merge(dst, src) -} -func (m *Action) XXX_Size() int { - return xxx_messageInfo_Action.Size(m) -} -func (m *Action) XXX_DiscardUnknown() { - xxx_messageInfo_Action.DiscardUnknown(m) -} - -var xxx_messageInfo_Action proto.InternalMessageInfo - -type PropertyValue struct { - Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"` - BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"` - StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"` - Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"` - Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"` - Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue) Reset() { *m = PropertyValue{} } -func (m *PropertyValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue) ProtoMessage() {} -func (*PropertyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1} -} -func (m *PropertyValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue.Unmarshal(m, b) -} -func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue.Merge(dst, src) -} -func (m *PropertyValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue.Size(m) -} -func (m *PropertyValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue proto.InternalMessageInfo - -func (m *PropertyValue) GetInt64Value() int64 { - if m != nil && m.Int64Value != nil { - return *m.Int64Value - } - return 0 -} - -func (m *PropertyValue) GetBooleanValue() bool { - if m != nil && m.BooleanValue != nil { - return *m.BooleanValue - } - return false -} - -func (m *PropertyValue) GetStringValue() string { - if m != nil && m.StringValue != nil { - return *m.StringValue - } - return "" -} - -func (m *PropertyValue) GetDoubleValue() float64 { - if m != nil && m.DoubleValue != nil { - return *m.DoubleValue - } - return 0 -} - -func (m *PropertyValue) GetPointvalue() *PropertyValue_PointValue { - if m != nil { - return m.Pointvalue - } - return nil -} - -func (m *PropertyValue) GetUservalue() *PropertyValue_UserValue { - if m != nil { - return m.Uservalue - } - return nil -} - -func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue { - if m != nil { - return m.Referencevalue - } - return nil -} - -type PropertyValue_PointValue struct { - X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` - Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} } -func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_PointValue) ProtoMessage() {} -func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0} -} -func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b) -} -func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src) -} -func (m *PropertyValue_PointValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue_PointValue.Size(m) -} -func (m *PropertyValue_PointValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo - -func (m *PropertyValue_PointValue) GetX() float64 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *PropertyValue_PointValue) GetY() float64 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -type PropertyValue_UserValue struct { - Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"` - AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` - Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"` - FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` - FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} } -func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_UserValue) ProtoMessage() {} -func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1} -} -func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b) -} -func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src) -} -func (m *PropertyValue_UserValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue_UserValue.Size(m) -} -func (m *PropertyValue_UserValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo - -func (m *PropertyValue_UserValue) GetEmail() string { - if m != nil && m.Email != nil { - return *m.Email - } - return "" -} - -func (m *PropertyValue_UserValue) GetAuthDomain() string { - if m != nil && m.AuthDomain != nil { - return *m.AuthDomain - } - return "" -} - -func (m *PropertyValue_UserValue) GetNickname() string { - if m != nil && m.Nickname != nil { - return *m.Nickname - } - return "" -} - -func (m *PropertyValue_UserValue) GetFederatedIdentity() string { - if m != nil && m.FederatedIdentity != nil { - return *m.FederatedIdentity - } - return "" -} - -func (m *PropertyValue_UserValue) GetFederatedProvider() string { - if m != nil && m.FederatedProvider != nil { - return *m.FederatedProvider - } - return "" -} - -type PropertyValue_ReferenceValue struct { - App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } -func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue) ProtoMessage() {} -func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2} -} -func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b) -} -func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src) -} -func (m *PropertyValue_ReferenceValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m) -} -func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo - -func (m *PropertyValue_ReferenceValue) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *PropertyValue_ReferenceValue) GetNameSpace() string { - if m != nil && m.NameSpace != nil { - return *m.NameSpace - } - return "" -} - -func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement { - if m != nil { - return m.Pathelement - } - return nil -} - -type PropertyValue_ReferenceValue_PathElement struct { - Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"` - Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"` - Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_ReferenceValue_PathElement) Reset() { - *m = PropertyValue_ReferenceValue_PathElement{} -} -func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {} -func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0} -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b) -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src) -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int { - return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m) -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo - -func (m *PropertyValue_ReferenceValue_PathElement) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -func (m *PropertyValue_ReferenceValue_PathElement) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *PropertyValue_ReferenceValue_PathElement) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type Property struct { - Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.Property_Meaning,def=0" json:"meaning,omitempty"` - MeaningUri *string `protobuf:"bytes,2,opt,name=meaning_uri,json=meaningUri" json:"meaning_uri,omitempty"` - Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` - Value *PropertyValue `protobuf:"bytes,5,req,name=value" json:"value,omitempty"` - Multiple *bool `protobuf:"varint,4,req,name=multiple" json:"multiple,omitempty"` - Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"` - FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"` - Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Property) Reset() { *m = Property{} } -func (m *Property) String() string { return proto.CompactTextString(m) } -func (*Property) ProtoMessage() {} -func (*Property) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2} -} -func (m *Property) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Property.Unmarshal(m, b) -} -func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Property.Marshal(b, m, deterministic) -} -func (dst *Property) XXX_Merge(src proto.Message) { - xxx_messageInfo_Property.Merge(dst, src) -} -func (m *Property) XXX_Size() int { - return xxx_messageInfo_Property.Size(m) -} -func (m *Property) XXX_DiscardUnknown() { - xxx_messageInfo_Property.DiscardUnknown(m) -} - -var xxx_messageInfo_Property proto.InternalMessageInfo - -const Default_Property_Meaning Property_Meaning = Property_NO_MEANING -const Default_Property_Searchable bool = false -const Default_Property_Locale string = "en" - -func (m *Property) GetMeaning() Property_Meaning { - if m != nil && m.Meaning != nil { - return *m.Meaning - } - return Default_Property_Meaning -} - -func (m *Property) GetMeaningUri() string { - if m != nil && m.MeaningUri != nil { - return *m.MeaningUri - } - return "" -} - -func (m *Property) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Property) GetValue() *PropertyValue { - if m != nil { - return m.Value - } - return nil -} - -func (m *Property) GetMultiple() bool { - if m != nil && m.Multiple != nil { - return *m.Multiple - } - return false -} - -func (m *Property) GetSearchable() bool { - if m != nil && m.Searchable != nil { - return *m.Searchable - } - return Default_Property_Searchable -} - -func (m *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption { - if m != nil && m.FtsTokenizationOption != nil { - return *m.FtsTokenizationOption - } - return Property_HTML -} - -func (m *Property) GetLocale() string { - if m != nil && m.Locale != nil { - return *m.Locale - } - return Default_Property_Locale -} - -type Path struct { - Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Path) Reset() { *m = Path{} } -func (m *Path) String() string { return proto.CompactTextString(m) } -func (*Path) ProtoMessage() {} -func (*Path) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3} -} -func (m *Path) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Path.Unmarshal(m, b) -} -func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Path.Marshal(b, m, deterministic) -} -func (dst *Path) XXX_Merge(src proto.Message) { - xxx_messageInfo_Path.Merge(dst, src) -} -func (m *Path) XXX_Size() int { - return xxx_messageInfo_Path.Size(m) -} -func (m *Path) XXX_DiscardUnknown() { - xxx_messageInfo_Path.DiscardUnknown(m) -} - -var xxx_messageInfo_Path proto.InternalMessageInfo - -func (m *Path) GetElement() []*Path_Element { - if m != nil { - return m.Element - } - return nil -} - -type Path_Element struct { - Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` - Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` - Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Path_Element) Reset() { *m = Path_Element{} } -func (m *Path_Element) String() string { return proto.CompactTextString(m) } -func (*Path_Element) ProtoMessage() {} -func (*Path_Element) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0} -} -func (m *Path_Element) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Path_Element.Unmarshal(m, b) -} -func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic) -} -func (dst *Path_Element) XXX_Merge(src proto.Message) { - xxx_messageInfo_Path_Element.Merge(dst, src) -} -func (m *Path_Element) XXX_Size() int { - return xxx_messageInfo_Path_Element.Size(m) -} -func (m *Path_Element) XXX_DiscardUnknown() { - xxx_messageInfo_Path_Element.DiscardUnknown(m) -} - -var xxx_messageInfo_Path_Element proto.InternalMessageInfo - -func (m *Path_Element) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -func (m *Path_Element) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *Path_Element) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type Reference struct { - App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Reference) Reset() { *m = Reference{} } -func (m *Reference) String() string { return proto.CompactTextString(m) } -func (*Reference) ProtoMessage() {} -func (*Reference) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4} -} -func (m *Reference) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Reference.Unmarshal(m, b) -} -func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Reference.Marshal(b, m, deterministic) -} -func (dst *Reference) XXX_Merge(src proto.Message) { - xxx_messageInfo_Reference.Merge(dst, src) -} -func (m *Reference) XXX_Size() int { - return xxx_messageInfo_Reference.Size(m) -} -func (m *Reference) XXX_DiscardUnknown() { - xxx_messageInfo_Reference.DiscardUnknown(m) -} - -var xxx_messageInfo_Reference proto.InternalMessageInfo - -func (m *Reference) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *Reference) GetNameSpace() string { - if m != nil && m.NameSpace != nil { - return *m.NameSpace - } - return "" -} - -func (m *Reference) GetPath() *Path { - if m != nil { - return m.Path - } - return nil -} - -type User struct { - Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` - AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` - Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` - FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` - FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5} -} -func (m *User) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_User.Unmarshal(m, b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_User.Marshal(b, m, deterministic) -} -func (dst *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(dst, src) -} -func (m *User) XXX_Size() int { - return xxx_messageInfo_User.Size(m) -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) -} - -var xxx_messageInfo_User proto.InternalMessageInfo - -func (m *User) GetEmail() string { - if m != nil && m.Email != nil { - return *m.Email - } - return "" -} - -func (m *User) GetAuthDomain() string { - if m != nil && m.AuthDomain != nil { - return *m.AuthDomain - } - return "" -} - -func (m *User) GetNickname() string { - if m != nil && m.Nickname != nil { - return *m.Nickname - } - return "" -} - -func (m *User) GetFederatedIdentity() string { - if m != nil && m.FederatedIdentity != nil { - return *m.FederatedIdentity - } - return "" -} - -func (m *User) GetFederatedProvider() string { - if m != nil && m.FederatedProvider != nil { - return *m.FederatedProvider - } - return "" -} - -type EntityProto struct { - Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"` - EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"` - Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"` - Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"` - KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"` - Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` - RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"` - Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EntityProto) Reset() { *m = EntityProto{} } -func (m *EntityProto) String() string { return proto.CompactTextString(m) } -func (*EntityProto) ProtoMessage() {} -func (*EntityProto) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6} -} -func (m *EntityProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntityProto.Unmarshal(m, b) -} -func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic) -} -func (dst *EntityProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityProto.Merge(dst, src) -} -func (m *EntityProto) XXX_Size() int { - return xxx_messageInfo_EntityProto.Size(m) -} -func (m *EntityProto) XXX_DiscardUnknown() { - xxx_messageInfo_EntityProto.DiscardUnknown(m) -} - -var xxx_messageInfo_EntityProto proto.InternalMessageInfo - -func (m *EntityProto) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *EntityProto) GetEntityGroup() *Path { - if m != nil { - return m.EntityGroup - } - return nil -} - -func (m *EntityProto) GetOwner() *User { - if m != nil { - return m.Owner - } - return nil -} - -func (m *EntityProto) GetKind() EntityProto_Kind { - if m != nil && m.Kind != nil { - return *m.Kind - } - return EntityProto_GD_CONTACT -} - -func (m *EntityProto) GetKindUri() string { - if m != nil && m.KindUri != nil { - return *m.KindUri - } - return "" -} - -func (m *EntityProto) GetProperty() []*Property { - if m != nil { - return m.Property - } - return nil -} - -func (m *EntityProto) GetRawProperty() []*Property { - if m != nil { - return m.RawProperty - } - return nil -} - -func (m *EntityProto) GetRank() int32 { - if m != nil && m.Rank != nil { - return *m.Rank - } - return 0 -} - -type CompositeProperty struct { - IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"` - Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompositeProperty) Reset() { *m = CompositeProperty{} } -func (m *CompositeProperty) String() string { return proto.CompactTextString(m) } -func (*CompositeProperty) ProtoMessage() {} -func (*CompositeProperty) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7} -} -func (m *CompositeProperty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompositeProperty.Unmarshal(m, b) -} -func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic) -} -func (dst *CompositeProperty) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompositeProperty.Merge(dst, src) -} -func (m *CompositeProperty) XXX_Size() int { - return xxx_messageInfo_CompositeProperty.Size(m) -} -func (m *CompositeProperty) XXX_DiscardUnknown() { - xxx_messageInfo_CompositeProperty.DiscardUnknown(m) -} - -var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo - -func (m *CompositeProperty) GetIndexId() int64 { - if m != nil && m.IndexId != nil { - return *m.IndexId - } - return 0 -} - -func (m *CompositeProperty) GetValue() []string { - if m != nil { - return m.Value - } - return nil -} - -type Index struct { - EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"` - Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"` - Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Index) Reset() { *m = Index{} } -func (m *Index) String() string { return proto.CompactTextString(m) } -func (*Index) ProtoMessage() {} -func (*Index) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8} -} -func (m *Index) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index.Unmarshal(m, b) -} -func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index.Marshal(b, m, deterministic) -} -func (dst *Index) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index.Merge(dst, src) -} -func (m *Index) XXX_Size() int { - return xxx_messageInfo_Index.Size(m) -} -func (m *Index) XXX_DiscardUnknown() { - xxx_messageInfo_Index.DiscardUnknown(m) -} - -var xxx_messageInfo_Index proto.InternalMessageInfo - -func (m *Index) GetEntityType() string { - if m != nil && m.EntityType != nil { - return *m.EntityType - } - return "" -} - -func (m *Index) GetAncestor() bool { - if m != nil && m.Ancestor != nil { - return *m.Ancestor - } - return false -} - -func (m *Index) GetProperty() []*Index_Property { - if m != nil { - return m.Property - } - return nil -} - -type Index_Property struct { - Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` - Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Index_Property) Reset() { *m = Index_Property{} } -func (m *Index_Property) String() string { return proto.CompactTextString(m) } -func (*Index_Property) ProtoMessage() {} -func (*Index_Property) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0} -} -func (m *Index_Property) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index_Property.Unmarshal(m, b) -} -func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic) -} -func (dst *Index_Property) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index_Property.Merge(dst, src) -} -func (m *Index_Property) XXX_Size() int { - return xxx_messageInfo_Index_Property.Size(m) -} -func (m *Index_Property) XXX_DiscardUnknown() { - xxx_messageInfo_Index_Property.DiscardUnknown(m) -} - -var xxx_messageInfo_Index_Property proto.InternalMessageInfo - -const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING - -func (m *Index_Property) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Index_Property) GetDirection() Index_Property_Direction { - if m != nil && m.Direction != nil { - return *m.Direction - } - return Default_Index_Property_Direction -} - -type CompositeIndex struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` - Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"` - State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"` - OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompositeIndex) Reset() { *m = CompositeIndex{} } -func (m *CompositeIndex) String() string { return proto.CompactTextString(m) } -func (*CompositeIndex) ProtoMessage() {} -func (*CompositeIndex) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9} -} -func (m *CompositeIndex) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompositeIndex.Unmarshal(m, b) -} -func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic) -} -func (dst *CompositeIndex) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompositeIndex.Merge(dst, src) -} -func (m *CompositeIndex) XXX_Size() int { - return xxx_messageInfo_CompositeIndex.Size(m) -} -func (m *CompositeIndex) XXX_DiscardUnknown() { - xxx_messageInfo_CompositeIndex.DiscardUnknown(m) -} - -var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo - -const Default_CompositeIndex_OnlyUseIfRequired bool = false - -func (m *CompositeIndex) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *CompositeIndex) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *CompositeIndex) GetDefinition() *Index { - if m != nil { - return m.Definition - } - return nil -} - -func (m *CompositeIndex) GetState() CompositeIndex_State { - if m != nil && m.State != nil { - return *m.State - } - return CompositeIndex_WRITE_ONLY -} - -func (m *CompositeIndex) GetOnlyUseIfRequired() bool { - if m != nil && m.OnlyUseIfRequired != nil { - return *m.OnlyUseIfRequired - } - return Default_CompositeIndex_OnlyUseIfRequired -} - -type IndexPostfix struct { - IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"` - Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` - Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexPostfix) Reset() { *m = IndexPostfix{} } -func (m *IndexPostfix) String() string { return proto.CompactTextString(m) } -func (*IndexPostfix) ProtoMessage() {} -func (*IndexPostfix) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10} -} -func (m *IndexPostfix) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexPostfix.Unmarshal(m, b) -} -func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic) -} -func (dst *IndexPostfix) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexPostfix.Merge(dst, src) -} -func (m *IndexPostfix) XXX_Size() int { - return xxx_messageInfo_IndexPostfix.Size(m) -} -func (m *IndexPostfix) XXX_DiscardUnknown() { - xxx_messageInfo_IndexPostfix.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo - -const Default_IndexPostfix_Before bool = true - -func (m *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue { - if m != nil { - return m.IndexValue - } - return nil -} - -func (m *IndexPostfix) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *IndexPostfix) GetBefore() bool { - if m != nil && m.Before != nil { - return *m.Before - } - return Default_IndexPostfix_Before -} - -type IndexPostfix_IndexValue struct { - PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"` - Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} } -func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) } -func (*IndexPostfix_IndexValue) ProtoMessage() {} -func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0} -} -func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b) -} -func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic) -} -func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src) -} -func (m *IndexPostfix_IndexValue) XXX_Size() int { - return xxx_messageInfo_IndexPostfix_IndexValue.Size(m) -} -func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() { - xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo - -func (m *IndexPostfix_IndexValue) GetPropertyName() string { - if m != nil && m.PropertyName != nil { - return *m.PropertyName - } - return "" -} - -func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue { - if m != nil { - return m.Value - } - return nil -} - -type IndexPosition struct { - Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexPosition) Reset() { *m = IndexPosition{} } -func (m *IndexPosition) String() string { return proto.CompactTextString(m) } -func (*IndexPosition) ProtoMessage() {} -func (*IndexPosition) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11} -} -func (m *IndexPosition) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexPosition.Unmarshal(m, b) -} -func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic) -} -func (dst *IndexPosition) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexPosition.Merge(dst, src) -} -func (m *IndexPosition) XXX_Size() int { - return xxx_messageInfo_IndexPosition.Size(m) -} -func (m *IndexPosition) XXX_DiscardUnknown() { - xxx_messageInfo_IndexPosition.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexPosition proto.InternalMessageInfo - -const Default_IndexPosition_Before bool = true - -func (m *IndexPosition) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *IndexPosition) GetBefore() bool { - if m != nil && m.Before != nil { - return *m.Before - } - return Default_IndexPosition_Before -} - -type Snapshot struct { - Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Snapshot.Unmarshal(m, b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) -} -func (dst *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(dst, src) -} -func (m *Snapshot) XXX_Size() int { - return xxx_messageInfo_Snapshot.Size(m) -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetTs() int64 { - if m != nil && m.Ts != nil { - return *m.Ts - } - return 0 -} - -type InternalHeader struct { - Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InternalHeader) Reset() { *m = InternalHeader{} } -func (m *InternalHeader) String() string { return proto.CompactTextString(m) } -func (*InternalHeader) ProtoMessage() {} -func (*InternalHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13} -} -func (m *InternalHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InternalHeader.Unmarshal(m, b) -} -func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic) -} -func (dst *InternalHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_InternalHeader.Merge(dst, src) -} -func (m *InternalHeader) XXX_Size() int { - return xxx_messageInfo_InternalHeader.Size(m) -} -func (m *InternalHeader) XXX_DiscardUnknown() { - xxx_messageInfo_InternalHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_InternalHeader proto.InternalMessageInfo - -func (m *InternalHeader) GetQos() string { - if m != nil && m.Qos != nil { - return *m.Qos - } - return "" -} - -type Transaction struct { - Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` - Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"` - App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"` - MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14} -} -func (m *Transaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction.Unmarshal(m, b) -} -func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) -} -func (dst *Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction.Merge(dst, src) -} -func (m *Transaction) XXX_Size() int { - return xxx_messageInfo_Transaction.Size(m) -} -func (m *Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction.DiscardUnknown(m) -} - -var xxx_messageInfo_Transaction proto.InternalMessageInfo - -const Default_Transaction_MarkChanges bool = false - -func (m *Transaction) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *Transaction) GetHandle() uint64 { - if m != nil && m.Handle != nil { - return *m.Handle - } - return 0 -} - -func (m *Transaction) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *Transaction) GetMarkChanges() bool { - if m != nil && m.MarkChanges != nil { - return *m.MarkChanges - } - return Default_Transaction_MarkChanges -} - -type Query struct { - Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"` - App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` - Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"` - Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"` - SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"` - Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"` - Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"` - Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"` - Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"` - Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"` - CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` - EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"` - KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"` - Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"` - Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"` - FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` - Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"` - PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` - GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"` - Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"` - MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"` - SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"` - PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Query) Reset() { *m = Query{} } -func (m *Query) String() string { return proto.CompactTextString(m) } -func (*Query) ProtoMessage() {} -func (*Query) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15} -} -func (m *Query) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Query.Unmarshal(m, b) -} -func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Query.Marshal(b, m, deterministic) -} -func (dst *Query) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query.Merge(dst, src) -} -func (m *Query) XXX_Size() int { - return xxx_messageInfo_Query.Size(m) -} -func (m *Query) XXX_DiscardUnknown() { - xxx_messageInfo_Query.DiscardUnknown(m) -} - -var xxx_messageInfo_Query proto.InternalMessageInfo - -const Default_Query_Offset int32 = 0 -const Default_Query_RequirePerfectPlan bool = false -const Default_Query_KeysOnly bool = false -const Default_Query_Compile bool = false -const Default_Query_PersistOffset bool = false - -func (m *Query) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *Query) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *Query) GetNameSpace() string { - if m != nil && m.NameSpace != nil { - return *m.NameSpace - } - return "" -} - -func (m *Query) GetKind() string { - if m != nil && m.Kind != nil { - return *m.Kind - } - return "" -} - -func (m *Query) GetAncestor() *Reference { - if m != nil { - return m.Ancestor - } - return nil -} - -func (m *Query) GetFilter() []*Query_Filter { - if m != nil { - return m.Filter - } - return nil -} - -func (m *Query) GetSearchQuery() string { - if m != nil && m.SearchQuery != nil { - return *m.SearchQuery - } - return "" -} - -func (m *Query) GetOrder() []*Query_Order { - if m != nil { - return m.Order - } - return nil -} - -func (m *Query) GetHint() Query_Hint { - if m != nil && m.Hint != nil { - return *m.Hint - } - return Query_ORDER_FIRST -} - -func (m *Query) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *Query) GetOffset() int32 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return Default_Query_Offset -} - -func (m *Query) GetLimit() int32 { - if m != nil && m.Limit != nil { - return *m.Limit - } - return 0 -} - -func (m *Query) GetCompiledCursor() *CompiledCursor { - if m != nil { - return m.CompiledCursor - } - return nil -} - -func (m *Query) GetEndCompiledCursor() *CompiledCursor { - if m != nil { - return m.EndCompiledCursor - } - return nil -} - -func (m *Query) GetCompositeIndex() []*CompositeIndex { - if m != nil { - return m.CompositeIndex - } - return nil -} - -func (m *Query) GetRequirePerfectPlan() bool { - if m != nil && m.RequirePerfectPlan != nil { - return *m.RequirePerfectPlan - } - return Default_Query_RequirePerfectPlan -} - -func (m *Query) GetKeysOnly() bool { - if m != nil && m.KeysOnly != nil { - return *m.KeysOnly - } - return Default_Query_KeysOnly -} - -func (m *Query) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *Query) GetCompile() bool { - if m != nil && m.Compile != nil { - return *m.Compile - } - return Default_Query_Compile -} - -func (m *Query) GetFailoverMs() int64 { - if m != nil && m.FailoverMs != nil { - return *m.FailoverMs - } - return 0 -} - -func (m *Query) GetStrong() bool { - if m != nil && m.Strong != nil { - return *m.Strong - } - return false -} - -func (m *Query) GetPropertyName() []string { - if m != nil { - return m.PropertyName - } - return nil -} - -func (m *Query) GetGroupByPropertyName() []string { - if m != nil { - return m.GroupByPropertyName - } - return nil -} - -func (m *Query) GetDistinct() bool { - if m != nil && m.Distinct != nil { - return *m.Distinct - } - return false -} - -func (m *Query) GetMinSafeTimeSeconds() int64 { - if m != nil && m.MinSafeTimeSeconds != nil { - return *m.MinSafeTimeSeconds - } - return 0 -} - -func (m *Query) GetSafeReplicaName() []string { - if m != nil { - return m.SafeReplicaName - } - return nil -} - -func (m *Query) GetPersistOffset() bool { - if m != nil && m.PersistOffset != nil { - return *m.PersistOffset - } - return Default_Query_PersistOffset -} - -type Query_Filter struct { - Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"` - Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Query_Filter) Reset() { *m = Query_Filter{} } -func (m *Query_Filter) String() string { return proto.CompactTextString(m) } -func (*Query_Filter) ProtoMessage() {} -func (*Query_Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} -} -func (m *Query_Filter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Query_Filter.Unmarshal(m, b) -} -func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic) -} -func (dst *Query_Filter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query_Filter.Merge(dst, src) -} -func (m *Query_Filter) XXX_Size() int { - return xxx_messageInfo_Query_Filter.Size(m) -} -func (m *Query_Filter) XXX_DiscardUnknown() { - xxx_messageInfo_Query_Filter.DiscardUnknown(m) -} - -var xxx_messageInfo_Query_Filter proto.InternalMessageInfo - -func (m *Query_Filter) GetOp() Query_Filter_Operator { - if m != nil && m.Op != nil { - return *m.Op - } - return Query_Filter_LESS_THAN -} - -func (m *Query_Filter) GetProperty() []*Property { - if m != nil { - return m.Property - } - return nil -} - -type Query_Order struct { - Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` - Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Query_Order) Reset() { *m = Query_Order{} } -func (m *Query_Order) String() string { return proto.CompactTextString(m) } -func (*Query_Order) ProtoMessage() {} -func (*Query_Order) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1} -} -func (m *Query_Order) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Query_Order.Unmarshal(m, b) -} -func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic) -} -func (dst *Query_Order) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query_Order.Merge(dst, src) -} -func (m *Query_Order) XXX_Size() int { - return xxx_messageInfo_Query_Order.Size(m) -} -func (m *Query_Order) XXX_DiscardUnknown() { - xxx_messageInfo_Query_Order.DiscardUnknown(m) -} - -var xxx_messageInfo_Query_Order proto.InternalMessageInfo - -const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING - -func (m *Query_Order) GetProperty() string { - if m != nil && m.Property != nil { - return *m.Property - } - return "" -} - -func (m *Query_Order) GetDirection() Query_Order_Direction { - if m != nil && m.Direction != nil { - return *m.Direction - } - return Default_Query_Order_Direction -} - -type CompiledQuery struct { - Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"` - Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"` - IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"` - Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` - Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` - KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` - PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` - DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"` - Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery) Reset() { *m = CompiledQuery{} } -func (m *CompiledQuery) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery) ProtoMessage() {} -func (*CompiledQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16} -} -func (m *CompiledQuery) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery.Unmarshal(m, b) -} -func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery.Merge(dst, src) -} -func (m *CompiledQuery) XXX_Size() int { - return xxx_messageInfo_CompiledQuery.Size(m) -} -func (m *CompiledQuery) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo - -const Default_CompiledQuery_Offset int32 = 0 - -func (m *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan { - if m != nil { - return m.Primaryscan - } - return nil -} - -func (m *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan { - if m != nil { - return m.Mergejoinscan - } - return nil -} - -func (m *CompiledQuery) GetIndexDef() *Index { - if m != nil { - return m.IndexDef - } - return nil -} - -func (m *CompiledQuery) GetOffset() int32 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return Default_CompiledQuery_Offset -} - -func (m *CompiledQuery) GetLimit() int32 { - if m != nil && m.Limit != nil { - return *m.Limit - } - return 0 -} - -func (m *CompiledQuery) GetKeysOnly() bool { - if m != nil && m.KeysOnly != nil { - return *m.KeysOnly - } - return false -} - -func (m *CompiledQuery) GetPropertyName() []string { - if m != nil { - return m.PropertyName - } - return nil -} - -func (m *CompiledQuery) GetDistinctInfixSize() int32 { - if m != nil && m.DistinctInfixSize != nil { - return *m.DistinctInfixSize - } - return 0 -} - -func (m *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter { - if m != nil { - return m.Entityfilter - } - return nil -} - -type CompiledQuery_PrimaryScan struct { - IndexName *string `protobuf:"bytes,2,opt,name=index_name,json=indexName" json:"index_name,omitempty"` - StartKey *string `protobuf:"bytes,3,opt,name=start_key,json=startKey" json:"start_key,omitempty"` - StartInclusive *bool `protobuf:"varint,4,opt,name=start_inclusive,json=startInclusive" json:"start_inclusive,omitempty"` - EndKey *string `protobuf:"bytes,5,opt,name=end_key,json=endKey" json:"end_key,omitempty"` - EndInclusive *bool `protobuf:"varint,6,opt,name=end_inclusive,json=endInclusive" json:"end_inclusive,omitempty"` - StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"` - EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"` - EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} } -func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_PrimaryScan) ProtoMessage() {} -func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0} -} -func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b) -} -func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src) -} -func (m *CompiledQuery_PrimaryScan) XXX_Size() int { - return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m) -} -func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo - -func (m *CompiledQuery_PrimaryScan) GetIndexName() string { - if m != nil && m.IndexName != nil { - return *m.IndexName - } - return "" -} - -func (m *CompiledQuery_PrimaryScan) GetStartKey() string { - if m != nil && m.StartKey != nil { - return *m.StartKey - } - return "" -} - -func (m *CompiledQuery_PrimaryScan) GetStartInclusive() bool { - if m != nil && m.StartInclusive != nil { - return *m.StartInclusive - } - return false -} - -func (m *CompiledQuery_PrimaryScan) GetEndKey() string { - if m != nil && m.EndKey != nil { - return *m.EndKey - } - return "" -} - -func (m *CompiledQuery_PrimaryScan) GetEndInclusive() bool { - if m != nil && m.EndInclusive != nil { - return *m.EndInclusive - } - return false -} - -func (m *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string { - if m != nil { - return m.StartPostfixValue - } - return nil -} - -func (m *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string { - if m != nil { - return m.EndPostfixValue - } - return nil -} - -func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 { - if m != nil && m.EndUnappliedLogTimestampUs != nil { - return *m.EndUnappliedLogTimestampUs - } - return 0 -} - -type CompiledQuery_MergeJoinScan struct { - IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"` - PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"` - ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } -func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} -func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1} -} -func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b) -} -func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src) -} -func (m *CompiledQuery_MergeJoinScan) XXX_Size() int { - return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m) -} -func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo - -const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false - -func (m *CompiledQuery_MergeJoinScan) GetIndexName() string { - if m != nil && m.IndexName != nil { - return *m.IndexName - } - return "" -} - -func (m *CompiledQuery_MergeJoinScan) GetPrefixValue() []string { - if m != nil { - return m.PrefixValue - } - return nil -} - -func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool { - if m != nil && m.ValuePrefix != nil { - return *m.ValuePrefix - } - return Default_CompiledQuery_MergeJoinScan_ValuePrefix -} - -type CompiledQuery_EntityFilter struct { - Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"` - Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"` - Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} } -func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_EntityFilter) ProtoMessage() {} -func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2} -} -func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b) -} -func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src) -} -func (m *CompiledQuery_EntityFilter) XXX_Size() int { - return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m) -} -func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo - -const Default_CompiledQuery_EntityFilter_Distinct bool = false - -func (m *CompiledQuery_EntityFilter) GetDistinct() bool { - if m != nil && m.Distinct != nil { - return *m.Distinct - } - return Default_CompiledQuery_EntityFilter_Distinct -} - -func (m *CompiledQuery_EntityFilter) GetKind() string { - if m != nil && m.Kind != nil { - return *m.Kind - } - return "" -} - -func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference { - if m != nil { - return m.Ancestor - } - return nil -} - -type CompiledCursor struct { - Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledCursor) Reset() { *m = CompiledCursor{} } -func (m *CompiledCursor) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor) ProtoMessage() {} -func (*CompiledCursor) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17} -} -func (m *CompiledCursor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledCursor.Unmarshal(m, b) -} -func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic) -} -func (dst *CompiledCursor) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledCursor.Merge(dst, src) -} -func (m *CompiledCursor) XXX_Size() int { - return xxx_messageInfo_CompiledCursor.Size(m) -} -func (m *CompiledCursor) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledCursor.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo - -func (m *CompiledCursor) GetPosition() *CompiledCursor_Position { - if m != nil { - return m.Position - } - return nil -} - -type CompiledCursor_Position struct { - StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"` - Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"` - Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"` - StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} } -func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor_Position) ProtoMessage() {} -func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0} -} -func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b) -} -func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic) -} -func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledCursor_Position.Merge(dst, src) -} -func (m *CompiledCursor_Position) XXX_Size() int { - return xxx_messageInfo_CompiledCursor_Position.Size(m) -} -func (m *CompiledCursor_Position) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo - -const Default_CompiledCursor_Position_StartInclusive bool = true - -func (m *CompiledCursor_Position) GetStartKey() string { - if m != nil && m.StartKey != nil { - return *m.StartKey - } - return "" -} - -func (m *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue { - if m != nil { - return m.Indexvalue - } - return nil -} - -func (m *CompiledCursor_Position) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *CompiledCursor_Position) GetStartInclusive() bool { - if m != nil && m.StartInclusive != nil { - return *m.StartInclusive - } - return Default_CompiledCursor_Position_StartInclusive -} - -type CompiledCursor_Position_IndexValue struct { - Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` - Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} } -func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor_Position_IndexValue) ProtoMessage() {} -func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0} -} -func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b) -} -func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic) -} -func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src) -} -func (m *CompiledCursor_Position_IndexValue) XXX_Size() int { - return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m) -} -func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo - -func (m *CompiledCursor_Position_IndexValue) GetProperty() string { - if m != nil && m.Property != nil { - return *m.Property - } - return "" -} - -func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue { - if m != nil { - return m.Value - } - return nil -} - -type Cursor struct { - Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` - App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cursor) Reset() { *m = Cursor{} } -func (m *Cursor) String() string { return proto.CompactTextString(m) } -func (*Cursor) ProtoMessage() {} -func (*Cursor) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18} -} -func (m *Cursor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cursor.Unmarshal(m, b) -} -func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cursor.Marshal(b, m, deterministic) -} -func (dst *Cursor) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cursor.Merge(dst, src) -} -func (m *Cursor) XXX_Size() int { - return xxx_messageInfo_Cursor.Size(m) -} -func (m *Cursor) XXX_DiscardUnknown() { - xxx_messageInfo_Cursor.DiscardUnknown(m) -} - -var xxx_messageInfo_Cursor proto.InternalMessageInfo - -func (m *Cursor) GetCursor() uint64 { - if m != nil && m.Cursor != nil { - return *m.Cursor - } - return 0 -} - -func (m *Cursor) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -type Error struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Error) Reset() { *m = Error{} } -func (m *Error) String() string { return proto.CompactTextString(m) } -func (*Error) ProtoMessage() {} -func (*Error) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19} -} -func (m *Error) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Error.Unmarshal(m, b) -} -func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Error.Marshal(b, m, deterministic) -} -func (dst *Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_Error.Merge(dst, src) -} -func (m *Error) XXX_Size() int { - return xxx_messageInfo_Error.Size(m) -} -func (m *Error) XXX_DiscardUnknown() { - xxx_messageInfo_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_Error proto.InternalMessageInfo - -type Cost struct { - IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"` - IndexWriteBytes *int32 `protobuf:"varint,2,opt,name=index_write_bytes,json=indexWriteBytes" json:"index_write_bytes,omitempty"` - EntityWrites *int32 `protobuf:"varint,3,opt,name=entity_writes,json=entityWrites" json:"entity_writes,omitempty"` - EntityWriteBytes *int32 `protobuf:"varint,4,opt,name=entity_write_bytes,json=entityWriteBytes" json:"entity_write_bytes,omitempty"` - Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"` - ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"` - IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cost) Reset() { *m = Cost{} } -func (m *Cost) String() string { return proto.CompactTextString(m) } -func (*Cost) ProtoMessage() {} -func (*Cost) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20} -} -func (m *Cost) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cost.Unmarshal(m, b) -} -func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cost.Marshal(b, m, deterministic) -} -func (dst *Cost) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cost.Merge(dst, src) -} -func (m *Cost) XXX_Size() int { - return xxx_messageInfo_Cost.Size(m) -} -func (m *Cost) XXX_DiscardUnknown() { - xxx_messageInfo_Cost.DiscardUnknown(m) -} - -var xxx_messageInfo_Cost proto.InternalMessageInfo - -func (m *Cost) GetIndexWrites() int32 { - if m != nil && m.IndexWrites != nil { - return *m.IndexWrites - } - return 0 -} - -func (m *Cost) GetIndexWriteBytes() int32 { - if m != nil && m.IndexWriteBytes != nil { - return *m.IndexWriteBytes - } - return 0 -} - -func (m *Cost) GetEntityWrites() int32 { - if m != nil && m.EntityWrites != nil { - return *m.EntityWrites - } - return 0 -} - -func (m *Cost) GetEntityWriteBytes() int32 { - if m != nil && m.EntityWriteBytes != nil { - return *m.EntityWriteBytes - } - return 0 -} - -func (m *Cost) GetCommitcost() *Cost_CommitCost { - if m != nil { - return m.Commitcost - } - return nil -} - -func (m *Cost) GetApproximateStorageDelta() int32 { - if m != nil && m.ApproximateStorageDelta != nil { - return *m.ApproximateStorageDelta - } - return 0 -} - -func (m *Cost) GetIdSequenceUpdates() int32 { - if m != nil && m.IdSequenceUpdates != nil { - return *m.IdSequenceUpdates - } - return 0 -} - -type Cost_CommitCost struct { - RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"` - RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} } -func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) } -func (*Cost_CommitCost) ProtoMessage() {} -func (*Cost_CommitCost) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0} -} -func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b) -} -func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic) -} -func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cost_CommitCost.Merge(dst, src) -} -func (m *Cost_CommitCost) XXX_Size() int { - return xxx_messageInfo_Cost_CommitCost.Size(m) -} -func (m *Cost_CommitCost) XXX_DiscardUnknown() { - xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m) -} - -var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo - -func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 { - if m != nil && m.RequestedEntityPuts != nil { - return *m.RequestedEntityPuts - } - return 0 -} - -func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 { - if m != nil && m.RequestedEntityDeletes != nil { - return *m.RequestedEntityDeletes - } - return 0 -} - -type GetRequest struct { - Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` - FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` - Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"` - AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (m *GetRequest) String() string { return proto.CompactTextString(m) } -func (*GetRequest) ProtoMessage() {} -func (*GetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21} -} -func (m *GetRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRequest.Unmarshal(m, b) -} -func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) -} -func (dst *GetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRequest.Merge(dst, src) -} -func (m *GetRequest) XXX_Size() int { - return xxx_messageInfo_GetRequest.Size(m) -} -func (m *GetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRequest proto.InternalMessageInfo - -const Default_GetRequest_AllowDeferred bool = false - -func (m *GetRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *GetRequest) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *GetRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *GetRequest) GetFailoverMs() int64 { - if m != nil && m.FailoverMs != nil { - return *m.FailoverMs - } - return 0 -} - -func (m *GetRequest) GetStrong() bool { - if m != nil && m.Strong != nil { - return *m.Strong - } - return false -} - -func (m *GetRequest) GetAllowDeferred() bool { - if m != nil && m.AllowDeferred != nil { - return *m.AllowDeferred - } - return Default_GetRequest_AllowDeferred -} - -type GetResponse struct { - Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"` - Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"` - InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetResponse) Reset() { *m = GetResponse{} } -func (m *GetResponse) String() string { return proto.CompactTextString(m) } -func (*GetResponse) ProtoMessage() {} -func (*GetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22} -} -func (m *GetResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetResponse.Unmarshal(m, b) -} -func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) -} -func (dst *GetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetResponse.Merge(dst, src) -} -func (m *GetResponse) XXX_Size() int { - return xxx_messageInfo_GetResponse.Size(m) -} -func (m *GetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetResponse proto.InternalMessageInfo - -const Default_GetResponse_InOrder bool = true - -func (m *GetResponse) GetEntity() []*GetResponse_Entity { - if m != nil { - return m.Entity - } - return nil -} - -func (m *GetResponse) GetDeferred() []*Reference { - if m != nil { - return m.Deferred - } - return nil -} - -func (m *GetResponse) GetInOrder() bool { - if m != nil && m.InOrder != nil { - return *m.InOrder - } - return Default_GetResponse_InOrder -} - -type GetResponse_Entity struct { - Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"` - Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"` - Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} } -func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) } -func (*GetResponse_Entity) ProtoMessage() {} -func (*GetResponse_Entity) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0} -} -func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b) -} -func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic) -} -func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetResponse_Entity.Merge(dst, src) -} -func (m *GetResponse_Entity) XXX_Size() int { - return xxx_messageInfo_GetResponse_Entity.Size(m) -} -func (m *GetResponse_Entity) XXX_DiscardUnknown() { - xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m) -} - -var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo - -func (m *GetResponse_Entity) GetEntity() *EntityProto { - if m != nil { - return m.Entity - } - return nil -} - -func (m *GetResponse_Entity) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *GetResponse_Entity) GetVersion() int64 { - if m != nil && m.Version != nil { - return *m.Version - } - return 0 -} - -type PutRequest struct { - Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"` - Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"` - Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` - Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` - MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PutRequest) Reset() { *m = PutRequest{} } -func (m *PutRequest) String() string { return proto.CompactTextString(m) } -func (*PutRequest) ProtoMessage() {} -func (*PutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23} -} -func (m *PutRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PutRequest.Unmarshal(m, b) -} -func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) -} -func (dst *PutRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutRequest.Merge(dst, src) -} -func (m *PutRequest) XXX_Size() int { - return xxx_messageInfo_PutRequest.Size(m) -} -func (m *PutRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PutRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PutRequest proto.InternalMessageInfo - -const Default_PutRequest_Trusted bool = false -const Default_PutRequest_Force bool = false -const Default_PutRequest_MarkChanges bool = false -const Default_PutRequest_AutoIdPolicy PutRequest_AutoIdPolicy = PutRequest_CURRENT - -func (m *PutRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *PutRequest) GetEntity() []*EntityProto { - if m != nil { - return m.Entity - } - return nil -} - -func (m *PutRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *PutRequest) GetCompositeIndex() []*CompositeIndex { - if m != nil { - return m.CompositeIndex - } - return nil -} - -func (m *PutRequest) GetTrusted() bool { - if m != nil && m.Trusted != nil { - return *m.Trusted - } - return Default_PutRequest_Trusted -} - -func (m *PutRequest) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force - } - return Default_PutRequest_Force -} - -func (m *PutRequest) GetMarkChanges() bool { - if m != nil && m.MarkChanges != nil { - return *m.MarkChanges - } - return Default_PutRequest_MarkChanges -} - -func (m *PutRequest) GetSnapshot() []*Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy { - if m != nil && m.AutoIdPolicy != nil { - return *m.AutoIdPolicy - } - return Default_PutRequest_AutoIdPolicy -} - -type PutResponse struct { - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"` - Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PutResponse) Reset() { *m = PutResponse{} } -func (m *PutResponse) String() string { return proto.CompactTextString(m) } -func (*PutResponse) ProtoMessage() {} -func (*PutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24} -} -func (m *PutResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PutResponse.Unmarshal(m, b) -} -func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) -} -func (dst *PutResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutResponse.Merge(dst, src) -} -func (m *PutResponse) XXX_Size() int { - return xxx_messageInfo_PutResponse.Size(m) -} -func (m *PutResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PutResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PutResponse proto.InternalMessageInfo - -func (m *PutResponse) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *PutResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -func (m *PutResponse) GetVersion() []int64 { - if m != nil { - return m.Version - } - return nil -} - -type TouchRequest struct { - Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TouchRequest) Reset() { *m = TouchRequest{} } -func (m *TouchRequest) String() string { return proto.CompactTextString(m) } -func (*TouchRequest) ProtoMessage() {} -func (*TouchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25} -} -func (m *TouchRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TouchRequest.Unmarshal(m, b) -} -func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic) -} -func (dst *TouchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TouchRequest.Merge(dst, src) -} -func (m *TouchRequest) XXX_Size() int { - return xxx_messageInfo_TouchRequest.Size(m) -} -func (m *TouchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TouchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TouchRequest proto.InternalMessageInfo - -const Default_TouchRequest_Force bool = false - -func (m *TouchRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *TouchRequest) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *TouchRequest) GetCompositeIndex() []*CompositeIndex { - if m != nil { - return m.CompositeIndex - } - return nil -} - -func (m *TouchRequest) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force - } - return Default_TouchRequest_Force -} - -func (m *TouchRequest) GetSnapshot() []*Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -type TouchResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TouchResponse) Reset() { *m = TouchResponse{} } -func (m *TouchResponse) String() string { return proto.CompactTextString(m) } -func (*TouchResponse) ProtoMessage() {} -func (*TouchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26} -} -func (m *TouchResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TouchResponse.Unmarshal(m, b) -} -func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic) -} -func (dst *TouchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TouchResponse.Merge(dst, src) -} -func (m *TouchResponse) XXX_Size() int { - return xxx_messageInfo_TouchResponse.Size(m) -} -func (m *TouchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TouchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TouchResponse proto.InternalMessageInfo - -func (m *TouchResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -type DeleteRequest struct { - Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"` - Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"` - Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` - Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` - MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27} -} -func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) -} -func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) -} -func (dst *DeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRequest.Merge(dst, src) -} -func (m *DeleteRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRequest.Size(m) -} -func (m *DeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo - -const Default_DeleteRequest_Trusted bool = false -const Default_DeleteRequest_Force bool = false -const Default_DeleteRequest_MarkChanges bool = false - -func (m *DeleteRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *DeleteRequest) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *DeleteRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *DeleteRequest) GetTrusted() bool { - if m != nil && m.Trusted != nil { - return *m.Trusted - } - return Default_DeleteRequest_Trusted -} - -func (m *DeleteRequest) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force - } - return Default_DeleteRequest_Force -} - -func (m *DeleteRequest) GetMarkChanges() bool { - if m != nil && m.MarkChanges != nil { - return *m.MarkChanges - } - return Default_DeleteRequest_MarkChanges -} - -func (m *DeleteRequest) GetSnapshot() []*Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -type DeleteResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } -func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteResponse) ProtoMessage() {} -func (*DeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28} -} -func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) -} -func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) -} -func (dst *DeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteResponse.Merge(dst, src) -} -func (m *DeleteResponse) XXX_Size() int { - return xxx_messageInfo_DeleteResponse.Size(m) -} -func (m *DeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo - -func (m *DeleteResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -func (m *DeleteResponse) GetVersion() []int64 { - if m != nil { - return m.Version - } - return nil -} - -type NextRequest struct { - Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"` - Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"` - Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` - Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"` - Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NextRequest) Reset() { *m = NextRequest{} } -func (m *NextRequest) String() string { return proto.CompactTextString(m) } -func (*NextRequest) ProtoMessage() {} -func (*NextRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29} -} -func (m *NextRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NextRequest.Unmarshal(m, b) -} -func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic) -} -func (dst *NextRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextRequest.Merge(dst, src) -} -func (m *NextRequest) XXX_Size() int { - return xxx_messageInfo_NextRequest.Size(m) -} -func (m *NextRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NextRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NextRequest proto.InternalMessageInfo - -const Default_NextRequest_Offset int32 = 0 -const Default_NextRequest_Compile bool = false - -func (m *NextRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *NextRequest) GetCursor() *Cursor { - if m != nil { - return m.Cursor - } - return nil -} - -func (m *NextRequest) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *NextRequest) GetOffset() int32 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return Default_NextRequest_Offset -} - -func (m *NextRequest) GetCompile() bool { - if m != nil && m.Compile != nil { - return *m.Compile - } - return Default_NextRequest_Compile -} - -type QueryResult struct { - Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"` - Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` - SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"` - MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"` - KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` - IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"` - SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"` - CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"` - CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` - Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"` - Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *QueryResult) Reset() { *m = QueryResult{} } -func (m *QueryResult) String() string { return proto.CompactTextString(m) } -func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30} -} -func (m *QueryResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryResult.Unmarshal(m, b) -} -func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) -} -func (dst *QueryResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResult.Merge(dst, src) -} -func (m *QueryResult) XXX_Size() int { - return xxx_messageInfo_QueryResult.Size(m) -} -func (m *QueryResult) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResult.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResult proto.InternalMessageInfo - -func (m *QueryResult) GetCursor() *Cursor { - if m != nil { - return m.Cursor - } - return nil -} - -func (m *QueryResult) GetResult() []*EntityProto { - if m != nil { - return m.Result - } - return nil -} - -func (m *QueryResult) GetSkippedResults() int32 { - if m != nil && m.SkippedResults != nil { - return *m.SkippedResults - } - return 0 -} - -func (m *QueryResult) GetMoreResults() bool { - if m != nil && m.MoreResults != nil { - return *m.MoreResults - } - return false -} - -func (m *QueryResult) GetKeysOnly() bool { - if m != nil && m.KeysOnly != nil { - return *m.KeysOnly - } - return false -} - -func (m *QueryResult) GetIndexOnly() bool { - if m != nil && m.IndexOnly != nil { - return *m.IndexOnly - } - return false -} - -func (m *QueryResult) GetSmallOps() bool { - if m != nil && m.SmallOps != nil { - return *m.SmallOps - } - return false -} - -func (m *QueryResult) GetCompiledQuery() *CompiledQuery { - if m != nil { - return m.CompiledQuery - } - return nil -} - -func (m *QueryResult) GetCompiledCursor() *CompiledCursor { - if m != nil { - return m.CompiledCursor - } - return nil -} - -func (m *QueryResult) GetIndex() []*CompositeIndex { - if m != nil { - return m.Index - } - return nil -} - -func (m *QueryResult) GetVersion() []int64 { - if m != nil { - return m.Version - } - return nil -} - -type AllocateIdsRequest struct { - Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` - ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"` - Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` - Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"` - Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } -func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } -func (*AllocateIdsRequest) ProtoMessage() {} -func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31} -} -func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b) -} -func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic) -} -func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocateIdsRequest.Merge(dst, src) -} -func (m *AllocateIdsRequest) XXX_Size() int { - return xxx_messageInfo_AllocateIdsRequest.Size(m) -} -func (m *AllocateIdsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo - -func (m *AllocateIdsRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AllocateIdsRequest) GetModelKey() *Reference { - if m != nil { - return m.ModelKey - } - return nil -} - -func (m *AllocateIdsRequest) GetSize() int64 { - if m != nil && m.Size != nil { - return *m.Size - } - return 0 -} - -func (m *AllocateIdsRequest) GetMax() int64 { - if m != nil && m.Max != nil { - return *m.Max - } - return 0 -} - -func (m *AllocateIdsRequest) GetReserve() []*Reference { - if m != nil { - return m.Reserve - } - return nil -} - -type AllocateIdsResponse struct { - Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"` - End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"` - Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } -func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } -func (*AllocateIdsResponse) ProtoMessage() {} -func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32} -} -func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b) -} -func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic) -} -func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocateIdsResponse.Merge(dst, src) -} -func (m *AllocateIdsResponse) XXX_Size() int { - return xxx_messageInfo_AllocateIdsResponse.Size(m) -} -func (m *AllocateIdsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo - -func (m *AllocateIdsResponse) GetStart() int64 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *AllocateIdsResponse) GetEnd() int64 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -func (m *AllocateIdsResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -type CompositeIndices struct { - Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompositeIndices) Reset() { *m = CompositeIndices{} } -func (m *CompositeIndices) String() string { return proto.CompactTextString(m) } -func (*CompositeIndices) ProtoMessage() {} -func (*CompositeIndices) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33} -} -func (m *CompositeIndices) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompositeIndices.Unmarshal(m, b) -} -func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic) -} -func (dst *CompositeIndices) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompositeIndices.Merge(dst, src) -} -func (m *CompositeIndices) XXX_Size() int { - return xxx_messageInfo_CompositeIndices.Size(m) -} -func (m *CompositeIndices) XXX_DiscardUnknown() { - xxx_messageInfo_CompositeIndices.DiscardUnknown(m) -} - -var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo - -func (m *CompositeIndices) GetIndex() []*CompositeIndex { - if m != nil { - return m.Index - } - return nil -} - -type AddActionsRequest struct { - Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` - Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` - Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} } -func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) } -func (*AddActionsRequest) ProtoMessage() {} -func (*AddActionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34} -} -func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b) -} -func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic) -} -func (dst *AddActionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddActionsRequest.Merge(dst, src) -} -func (m *AddActionsRequest) XXX_Size() int { - return xxx_messageInfo_AddActionsRequest.Size(m) -} -func (m *AddActionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddActionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo - -func (m *AddActionsRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AddActionsRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *AddActionsRequest) GetAction() []*Action { - if m != nil { - return m.Action - } - return nil -} - -type AddActionsResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} } -func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) } -func (*AddActionsResponse) ProtoMessage() {} -func (*AddActionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35} -} -func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b) -} -func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic) -} -func (dst *AddActionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddActionsResponse.Merge(dst, src) -} -func (m *AddActionsResponse) XXX_Size() int { - return xxx_messageInfo_AddActionsResponse.Size(m) -} -func (m *AddActionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddActionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo - -type BeginTransactionRequest struct { - Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` - App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` - AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"` - DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"` - Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` - PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } -func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } -func (*BeginTransactionRequest) ProtoMessage() {} -func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36} -} -func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b) -} -func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic) -} -func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginTransactionRequest.Merge(dst, src) -} -func (m *BeginTransactionRequest) XXX_Size() int { - return xxx_messageInfo_BeginTransactionRequest.Size(m) -} -func (m *BeginTransactionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo - -const Default_BeginTransactionRequest_AllowMultipleEg bool = false -const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN - -func (m *BeginTransactionRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *BeginTransactionRequest) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *BeginTransactionRequest) GetAllowMultipleEg() bool { - if m != nil && m.AllowMultipleEg != nil { - return *m.AllowMultipleEg - } - return Default_BeginTransactionRequest_AllowMultipleEg -} - -func (m *BeginTransactionRequest) GetDatabaseId() string { - if m != nil && m.DatabaseId != nil { - return *m.DatabaseId - } - return "" -} - -func (m *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode { - if m != nil && m.Mode != nil { - return *m.Mode - } - return Default_BeginTransactionRequest_Mode -} - -func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction { - if m != nil { - return m.PreviousTransaction - } - return nil -} - -type CommitResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CommitResponse) Reset() { *m = CommitResponse{} } -func (m *CommitResponse) String() string { return proto.CompactTextString(m) } -func (*CommitResponse) ProtoMessage() {} -func (*CommitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37} -} -func (m *CommitResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CommitResponse.Unmarshal(m, b) -} -func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic) -} -func (dst *CommitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitResponse.Merge(dst, src) -} -func (m *CommitResponse) XXX_Size() int { - return xxx_messageInfo_CommitResponse.Size(m) -} -func (m *CommitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CommitResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitResponse proto.InternalMessageInfo - -func (m *CommitResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -func (m *CommitResponse) GetVersion() []*CommitResponse_Version { - if m != nil { - return m.Version - } - return nil -} - -type CommitResponse_Version struct { - RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"` - Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} } -func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) } -func (*CommitResponse_Version) ProtoMessage() {} -func (*CommitResponse_Version) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0} -} -func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b) -} -func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic) -} -func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitResponse_Version.Merge(dst, src) -} -func (m *CommitResponse_Version) XXX_Size() int { - return xxx_messageInfo_CommitResponse_Version.Size(m) -} -func (m *CommitResponse_Version) XXX_DiscardUnknown() { - xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo - -func (m *CommitResponse_Version) GetRootEntityKey() *Reference { - if m != nil { - return m.RootEntityKey - } - return nil -} - -func (m *CommitResponse_Version) GetVersion() int64 { - if m != nil && m.Version != nil { - return *m.Version - } - return 0 -} - -func init() { - proto.RegisterType((*Action)(nil), "appengine.Action") - proto.RegisterType((*PropertyValue)(nil), "appengine.PropertyValue") - proto.RegisterType((*PropertyValue_PointValue)(nil), "appengine.PropertyValue.PointValue") - proto.RegisterType((*PropertyValue_UserValue)(nil), "appengine.PropertyValue.UserValue") - proto.RegisterType((*PropertyValue_ReferenceValue)(nil), "appengine.PropertyValue.ReferenceValue") - proto.RegisterType((*PropertyValue_ReferenceValue_PathElement)(nil), "appengine.PropertyValue.ReferenceValue.PathElement") - proto.RegisterType((*Property)(nil), "appengine.Property") - proto.RegisterType((*Path)(nil), "appengine.Path") - proto.RegisterType((*Path_Element)(nil), "appengine.Path.Element") - proto.RegisterType((*Reference)(nil), "appengine.Reference") - proto.RegisterType((*User)(nil), "appengine.User") - proto.RegisterType((*EntityProto)(nil), "appengine.EntityProto") - proto.RegisterType((*CompositeProperty)(nil), "appengine.CompositeProperty") - proto.RegisterType((*Index)(nil), "appengine.Index") - proto.RegisterType((*Index_Property)(nil), "appengine.Index.Property") - proto.RegisterType((*CompositeIndex)(nil), "appengine.CompositeIndex") - proto.RegisterType((*IndexPostfix)(nil), "appengine.IndexPostfix") - proto.RegisterType((*IndexPostfix_IndexValue)(nil), "appengine.IndexPostfix.IndexValue") - proto.RegisterType((*IndexPosition)(nil), "appengine.IndexPosition") - proto.RegisterType((*Snapshot)(nil), "appengine.Snapshot") - proto.RegisterType((*InternalHeader)(nil), "appengine.InternalHeader") - proto.RegisterType((*Transaction)(nil), "appengine.Transaction") - proto.RegisterType((*Query)(nil), "appengine.Query") - proto.RegisterType((*Query_Filter)(nil), "appengine.Query.Filter") - proto.RegisterType((*Query_Order)(nil), "appengine.Query.Order") - proto.RegisterType((*CompiledQuery)(nil), "appengine.CompiledQuery") - proto.RegisterType((*CompiledQuery_PrimaryScan)(nil), "appengine.CompiledQuery.PrimaryScan") - proto.RegisterType((*CompiledQuery_MergeJoinScan)(nil), "appengine.CompiledQuery.MergeJoinScan") - proto.RegisterType((*CompiledQuery_EntityFilter)(nil), "appengine.CompiledQuery.EntityFilter") - proto.RegisterType((*CompiledCursor)(nil), "appengine.CompiledCursor") - proto.RegisterType((*CompiledCursor_Position)(nil), "appengine.CompiledCursor.Position") - proto.RegisterType((*CompiledCursor_Position_IndexValue)(nil), "appengine.CompiledCursor.Position.IndexValue") - proto.RegisterType((*Cursor)(nil), "appengine.Cursor") - proto.RegisterType((*Error)(nil), "appengine.Error") - proto.RegisterType((*Cost)(nil), "appengine.Cost") - proto.RegisterType((*Cost_CommitCost)(nil), "appengine.Cost.CommitCost") - proto.RegisterType((*GetRequest)(nil), "appengine.GetRequest") - proto.RegisterType((*GetResponse)(nil), "appengine.GetResponse") - proto.RegisterType((*GetResponse_Entity)(nil), "appengine.GetResponse.Entity") - proto.RegisterType((*PutRequest)(nil), "appengine.PutRequest") - proto.RegisterType((*PutResponse)(nil), "appengine.PutResponse") - proto.RegisterType((*TouchRequest)(nil), "appengine.TouchRequest") - proto.RegisterType((*TouchResponse)(nil), "appengine.TouchResponse") - proto.RegisterType((*DeleteRequest)(nil), "appengine.DeleteRequest") - proto.RegisterType((*DeleteResponse)(nil), "appengine.DeleteResponse") - proto.RegisterType((*NextRequest)(nil), "appengine.NextRequest") - proto.RegisterType((*QueryResult)(nil), "appengine.QueryResult") - proto.RegisterType((*AllocateIdsRequest)(nil), "appengine.AllocateIdsRequest") - proto.RegisterType((*AllocateIdsResponse)(nil), "appengine.AllocateIdsResponse") - proto.RegisterType((*CompositeIndices)(nil), "appengine.CompositeIndices") - proto.RegisterType((*AddActionsRequest)(nil), "appengine.AddActionsRequest") - proto.RegisterType((*AddActionsResponse)(nil), "appengine.AddActionsResponse") - proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest") - proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse") - proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179) -} - -var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{ - // 4156 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46, - 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d, - 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4a, 0x76, 0x1d, 0x4a, 0xc4, 0x68, 0x90, 0xa1, 0x48, - 0xb9, 0x09, 0xd9, 0x9e, 0x5c, 0x50, 0x18, 0xa2, 0x29, 0x21, 0x43, 0x02, 0x30, 0x00, 0x6a, 0x46, - 0x93, 0xe4, 0x90, 0x4b, 0x2a, 0x55, 0x5b, 0xa9, 0x1c, 0x92, 0x4a, 0x25, 0xf9, 0x07, 0x72, 0xc8, - 0x39, 0x95, 0xaa, 0x54, 0xf6, 0x98, 0x5b, 0x0e, 0x7b, 0xc9, 0x31, 0x95, 0x73, 0xf2, 0x27, 0x24, - 0x39, 0xa4, 0xfa, 0x75, 0x03, 0x02, 0x28, 0x4a, 0x23, 0x6d, 0xf6, 0x90, 0x13, 0xd1, 0xef, 0xfd, - 0xba, 0xf1, 0xfa, 0xf5, 0xfb, 0x6c, 0x10, 0xba, 0xc7, 0xbe, 0x7f, 0x3c, 0x65, 0x9d, 0x63, 0x7f, - 0x6a, 0x7b, 0xc7, 0x1d, 0x3f, 0x3c, 0x7e, 0x68, 0x07, 0x01, 0xf3, 0x8e, 0x5d, 0x8f, 0x3d, 0x74, - 0xbd, 0x98, 0x85, 0x9e, 0x3d, 0x7d, 0xe8, 0xd8, 0xb1, 0x1d, 0xc5, 0x7e, 0xc8, 0xce, 0x9f, 0xac, - 0xd3, 0xcf, 0x3b, 0x41, 0xe8, 0xc7, 0x3e, 0xa9, 0xa7, 0x13, 0xb4, 0x1a, 0x54, 0xba, 0xe3, 0xd8, - 0xf5, 0x3d, 0xed, 0x1f, 0x2b, 0xb0, 0x7a, 0x18, 0xfa, 0x01, 0x0b, 0xe3, 0xb3, 0x6f, 0xed, 0xe9, - 0x9c, 0x91, 0x77, 0x00, 0x5c, 0x2f, 0xfe, 0xea, 0x0b, 0x1c, 0xb5, 0x0a, 0x9b, 0x85, 0xad, 0x22, - 0xcd, 0x50, 0x88, 0x06, 0x2b, 0xcf, 0x7c, 0x7f, 0xca, 0x6c, 0x4f, 0x20, 0x94, 0xcd, 0xc2, 0x56, - 0x8d, 0xe6, 0x68, 0x64, 0x13, 0x1a, 0x51, 0x1c, 0xba, 0xde, 0xb1, 0x80, 0x14, 0x37, 0x0b, 0x5b, - 0x75, 0x9a, 0x25, 0x71, 0x84, 0xe3, 0xcf, 0x9f, 0x4d, 0x99, 0x40, 0x94, 0x36, 0x0b, 0x5b, 0x05, - 0x9a, 0x25, 0x91, 0x3d, 0x80, 0xc0, 0x77, 0xbd, 0xf8, 0x14, 0x01, 0xe5, 0xcd, 0xc2, 0x16, 0x6c, - 0x3f, 0xe8, 0xa4, 0x7b, 0xe8, 0xe4, 0xa4, 0xee, 0x1c, 0x72, 0x28, 0x3e, 0xd2, 0xcc, 0x34, 0xf2, - 0xdb, 0x50, 0x9f, 0x47, 0x2c, 0x14, 0x6b, 0xd4, 0x70, 0x0d, 0xed, 0xd2, 0x35, 0x8e, 0x22, 0x16, - 0x8a, 0x25, 0xce, 0x27, 0x91, 0x21, 0x34, 0x43, 0x36, 0x61, 0x21, 0xf3, 0xc6, 0x4c, 0x2c, 0xb3, - 0x82, 0xcb, 0x7c, 0x70, 0xe9, 0x32, 0x34, 0x81, 0x8b, 0xb5, 0x16, 0xa6, 0xb7, 0xb7, 0x00, 0xce, - 0x85, 0x25, 0x2b, 0x50, 0x78, 0xd9, 0xaa, 0x6c, 0x2a, 0x5b, 0x05, 0x5a, 0x78, 0xc9, 0x47, 0x67, - 0xad, 0xaa, 0x18, 0x9d, 0xb5, 0xff, 0xa9, 0x00, 0xf5, 0x54, 0x26, 0x72, 0x0b, 0xca, 0x6c, 0x66, - 0xbb, 0xd3, 0x56, 0x7d, 0x53, 0xd9, 0xaa, 0x53, 0x31, 0x20, 0xf7, 0xa1, 0x61, 0xcf, 0xe3, 0x13, - 0xcb, 0xf1, 0x67, 0xb6, 0xeb, 0xb5, 0x00, 0x79, 0xc0, 0x49, 0x3d, 0xa4, 0x90, 0x36, 0xd4, 0x3c, - 0x77, 0xfc, 0xdc, 0xb3, 0x67, 0xac, 0xd5, 0xc0, 0x73, 0x48, 0xc7, 0xe4, 0x13, 0x20, 0x13, 0xe6, - 0xb0, 0xd0, 0x8e, 0x99, 0x63, 0xb9, 0x0e, 0xf3, 0x62, 0x37, 0x3e, 0x6b, 0xdd, 0x46, 0xd4, 0x7a, - 0xca, 0x31, 0x24, 0x23, 0x0f, 0x0f, 0x42, 0xff, 0xd4, 0x75, 0x58, 0xd8, 0xba, 0xb3, 0x00, 0x3f, - 0x94, 0x8c, 0xf6, 0xbf, 0x17, 0xa0, 0x99, 0xd7, 0x05, 0x51, 0xa1, 0x68, 0x07, 0x41, 0x6b, 0x15, - 0xa5, 0xe4, 0x8f, 0xe4, 0x6d, 0x00, 0x2e, 0x8a, 0x15, 0x05, 0xf6, 0x98, 0xb5, 0x6e, 0xe1, 0x5a, - 0x75, 0x4e, 0x19, 0x71, 0x02, 0x39, 0x82, 0x46, 0x60, 0xc7, 0x27, 0x6c, 0xca, 0x66, 0xcc, 0x8b, - 0x5b, 0xcd, 0xcd, 0xe2, 0x16, 0x6c, 0x7f, 0x7e, 0x4d, 0xd5, 0x77, 0x0e, 0xed, 0xf8, 0x44, 0x17, - 0x53, 0x69, 0x76, 0x9d, 0xb6, 0x0e, 0x8d, 0x0c, 0x8f, 0x10, 0x28, 0xc5, 0x67, 0x01, 0x6b, 0xad, - 0xa1, 0x5c, 0xf8, 0x4c, 0x9a, 0xa0, 0xb8, 0x4e, 0x4b, 0x45, 0xf3, 0x57, 0x5c, 0x87, 0x63, 0x50, - 0x87, 0xeb, 0x28, 0x22, 0x3e, 0x6b, 0xff, 0x51, 0x86, 0x5a, 0x22, 0x00, 0xe9, 0x42, 0x75, 0xc6, - 0x6c, 0xcf, 0xf5, 0x8e, 0xd1, 0x69, 0x9a, 0xdb, 0x6f, 0x2e, 0x11, 0xb3, 0x73, 0x20, 0x20, 0x3b, - 0x30, 0x18, 0x5a, 0x07, 0x7a, 0x77, 0x60, 0x0c, 0xf6, 0x69, 0x32, 0x8f, 0x1f, 0xa6, 0x7c, 0xb4, - 0xe6, 0xa1, 0x8b, 0x9e, 0x55, 0xa7, 0x20, 0x49, 0x47, 0xa1, 0x9b, 0x0a, 0x51, 0x14, 0x82, 0xe2, - 0x21, 0x76, 0xa0, 0x9c, 0xb8, 0x88, 0xb2, 0xd5, 0xd8, 0x6e, 0x5d, 0xa6, 0x1c, 0x2a, 0x60, 0xdc, - 0x20, 0x66, 0xf3, 0x69, 0xec, 0x06, 0x53, 0xee, 0x76, 0xca, 0x56, 0x8d, 0xa6, 0x63, 0xf2, 0x1e, - 0x40, 0xc4, 0xec, 0x70, 0x7c, 0x62, 0x3f, 0x9b, 0xb2, 0x56, 0x85, 0x7b, 0xf6, 0x4e, 0x79, 0x62, - 0x4f, 0x23, 0x46, 0x33, 0x0c, 0x62, 0xc3, 0xdd, 0x49, 0x1c, 0x59, 0xb1, 0xff, 0x9c, 0x79, 0xee, - 0x2b, 0x9b, 0x07, 0x12, 0xcb, 0x0f, 0xf8, 0x0f, 0xfa, 0x58, 0x73, 0xfb, 0xc3, 0x65, 0x5b, 0x7f, - 0x14, 0x47, 0x66, 0x66, 0xc6, 0x10, 0x27, 0xd0, 0xdb, 0x93, 0x65, 0x64, 0xd2, 0x86, 0xca, 0xd4, - 0x1f, 0xdb, 0x53, 0xd6, 0xaa, 0x73, 0x2d, 0xec, 0x28, 0xcc, 0xa3, 0x92, 0xa2, 0xfd, 0xb3, 0x02, - 0x55, 0xa9, 0x47, 0xd2, 0x84, 0x8c, 0x26, 0xd5, 0x37, 0x48, 0x0d, 0x4a, 0xbb, 0xfd, 0xe1, 0xae, - 0xda, 0xe4, 0x4f, 0xa6, 0xfe, 0xbd, 0xa9, 0xae, 0x71, 0xcc, 0xee, 0x53, 0x53, 0x1f, 0x99, 0x94, - 0x63, 0x54, 0xb2, 0x0e, 0xab, 0x5d, 0x73, 0x78, 0x60, 0xed, 0x75, 0x4d, 0x7d, 0x7f, 0x48, 0x9f, - 0xaa, 0x05, 0xb2, 0x0a, 0x75, 0x24, 0xf5, 0x8d, 0xc1, 0x13, 0x55, 0xe1, 0x33, 0x70, 0x68, 0x1a, - 0x66, 0x5f, 0x57, 0x8b, 0x44, 0x85, 0x15, 0x31, 0x63, 0x38, 0x30, 0xf5, 0x81, 0xa9, 0x96, 0x52, - 0xca, 0xe8, 0xe8, 0xe0, 0xa0, 0x4b, 0x9f, 0xaa, 0x65, 0xb2, 0x06, 0x0d, 0xa4, 0x74, 0x8f, 0xcc, - 0xc7, 0x43, 0xaa, 0x56, 0x48, 0x03, 0xaa, 0xfb, 0x3d, 0xeb, 0xbb, 0xc7, 0xfa, 0x40, 0xad, 0x92, - 0x15, 0xa8, 0xed, 0xf7, 0x2c, 0xfd, 0xa0, 0x6b, 0xf4, 0xd5, 0x1a, 0x9f, 0xbd, 0xaf, 0x0f, 0xe9, - 0x68, 0x64, 0x1d, 0x0e, 0x8d, 0x81, 0xa9, 0xd6, 0x49, 0x1d, 0xca, 0xfb, 0x3d, 0xcb, 0x38, 0x50, - 0x81, 0x10, 0x68, 0xee, 0xf7, 0xac, 0xc3, 0xc7, 0xc3, 0x81, 0x3e, 0x38, 0x3a, 0xd8, 0xd5, 0xa9, - 0xda, 0x20, 0xb7, 0x40, 0xe5, 0xb4, 0xe1, 0xc8, 0xec, 0xf6, 0xbb, 0xbd, 0x1e, 0xd5, 0x47, 0x23, - 0x75, 0x85, 0x4b, 0xbd, 0xdf, 0xb3, 0x68, 0xd7, 0xe4, 0xfb, 0x5a, 0xe5, 0x2f, 0xe4, 0x7b, 0x7f, - 0xa2, 0x3f, 0x55, 0xd7, 0xf9, 0x2b, 0xf4, 0x81, 0x69, 0x98, 0x4f, 0xad, 0x43, 0x3a, 0x34, 0x87, - 0xea, 0x06, 0x17, 0xd0, 0x18, 0xf4, 0xf4, 0xef, 0xad, 0x6f, 0xbb, 0xfd, 0x23, 0x5d, 0x25, 0xda, - 0x8f, 0xe1, 0xf6, 0xd2, 0x33, 0xe1, 0xaa, 0x7b, 0x6c, 0x1e, 0xf4, 0xd5, 0x02, 0x7f, 0xe2, 0x9b, - 0x52, 0x15, 0xed, 0x0f, 0xa0, 0xc4, 0x5d, 0x86, 0x7c, 0x06, 0xd5, 0xc4, 0x1b, 0x0b, 0xe8, 0x8d, - 0x77, 0xb3, 0x67, 0x6d, 0xc7, 0x27, 0x9d, 0xc4, 0xe3, 0x12, 0x5c, 0xbb, 0x0b, 0xd5, 0x45, 0x4f, - 0x53, 0x2e, 0x78, 0x5a, 0xf1, 0x82, 0xa7, 0x95, 0x32, 0x9e, 0x66, 0x43, 0x3d, 0xf5, 0xed, 0x9b, - 0x47, 0x91, 0x07, 0x50, 0xe2, 0xde, 0xdf, 0x6a, 0xa2, 0x87, 0xac, 0x2d, 0x08, 0x4c, 0x91, 0xa9, - 0xfd, 0x43, 0x01, 0x4a, 0x3c, 0xda, 0x9e, 0x07, 0xda, 0xc2, 0x15, 0x81, 0x56, 0xb9, 0x32, 0xd0, - 0x16, 0xaf, 0x15, 0x68, 0x2b, 0x37, 0x0b, 0xb4, 0xd5, 0x4b, 0x02, 0xad, 0xf6, 0x67, 0x45, 0x68, - 0xe8, 0x38, 0xf3, 0x10, 0x13, 0xfd, 0xfb, 0x50, 0x7c, 0xce, 0xce, 0x50, 0x3f, 0x8d, 0xed, 0x5b, - 0x99, 0xdd, 0xa6, 0x2a, 0xa4, 0x1c, 0x40, 0xb6, 0x61, 0x45, 0xbc, 0xd0, 0x3a, 0x0e, 0xfd, 0x79, - 0xd0, 0x52, 0x97, 0xab, 0xa7, 0x21, 0x40, 0xfb, 0x1c, 0x43, 0xde, 0x83, 0xb2, 0xff, 0xc2, 0x63, - 0x21, 0xc6, 0xc1, 0x3c, 0x98, 0x2b, 0x8f, 0x0a, 0x2e, 0x79, 0x08, 0xa5, 0xe7, 0xae, 0xe7, 0xe0, - 0x19, 0xe6, 0x23, 0x61, 0x46, 0xd0, 0xce, 0x13, 0xd7, 0x73, 0x28, 0x02, 0xc9, 0x3d, 0xa8, 0xf1, - 0x5f, 0x8c, 0x7b, 0x65, 0xdc, 0x68, 0x95, 0x8f, 0x79, 0xd0, 0x7b, 0x08, 0xb5, 0x40, 0xc6, 0x10, - 0x4c, 0x00, 0x8d, 0xed, 0x8d, 0x25, 0xe1, 0x85, 0xa6, 0x20, 0xf2, 0x15, 0xac, 0x84, 0xf6, 0x0b, - 0x2b, 0x9d, 0xb4, 0x76, 0xf9, 0xa4, 0x46, 0x68, 0xbf, 0x48, 0x23, 0x38, 0x81, 0x52, 0x68, 0x7b, - 0xcf, 0x5b, 0x64, 0xb3, 0xb0, 0x55, 0xa6, 0xf8, 0xac, 0x7d, 0x01, 0x25, 0x2e, 0x25, 0x8f, 0x08, - 0xfb, 0x3d, 0xf4, 0xff, 0xee, 0x9e, 0xa9, 0x16, 0x12, 0x7f, 0xfe, 0x96, 0x47, 0x03, 0x45, 0x72, - 0x0f, 0xf4, 0xd1, 0xa8, 0xbb, 0xaf, 0xab, 0x45, 0xad, 0x07, 0xeb, 0x7b, 0xfe, 0x2c, 0xf0, 0x23, - 0x37, 0x66, 0xe9, 0xf2, 0xf7, 0xa0, 0xe6, 0x7a, 0x0e, 0x7b, 0x69, 0xb9, 0x0e, 0x9a, 0x56, 0x91, - 0x56, 0x71, 0x6c, 0x38, 0xdc, 0xe4, 0x4e, 0x65, 0x31, 0x55, 0xe4, 0x26, 0x87, 0x03, 0xed, 0x2f, - 0x15, 0x28, 0x1b, 0x1c, 0xc1, 0x8d, 0x4f, 0x9e, 0x14, 0x7a, 0x8f, 0x30, 0x4c, 0x10, 0x24, 0x93, - 0xfb, 0x50, 0x1b, 0x6a, 0xb6, 0x37, 0x66, 0xbc, 0xe2, 0xc3, 0x3c, 0x50, 0xa3, 0xe9, 0x98, 0x7c, - 0x99, 0xd1, 0x9f, 0x82, 0x2e, 0x7b, 0x2f, 0xa3, 0x0a, 0x7c, 0xc1, 0x12, 0x2d, 0xb6, 0xff, 0xaa, - 0x90, 0x49, 0x6e, 0xcb, 0x12, 0x4f, 0x1f, 0xea, 0x8e, 0x1b, 0x32, 0xac, 0x23, 0xe5, 0x41, 0x3f, - 0xb8, 0x74, 0xe1, 0x4e, 0x2f, 0x81, 0xee, 0xd4, 0xbb, 0xa3, 0x3d, 0x7d, 0xd0, 0xe3, 0x99, 0xef, - 0x7c, 0x01, 0xed, 0x23, 0xa8, 0xa7, 0x10, 0x0c, 0xc7, 0x09, 0x48, 0x2d, 0x70, 0xf5, 0xf6, 0xf4, - 0x74, 0xac, 0x68, 0x7f, 0xad, 0x40, 0x33, 0xd5, 0xaf, 0xd0, 0xd0, 0x6d, 0xa8, 0xd8, 0x41, 0x90, - 0xa8, 0xb6, 0x4e, 0xcb, 0x76, 0x10, 0x18, 0x8e, 0x8c, 0x2d, 0x0a, 0x6a, 0x9b, 0xc7, 0x96, 0x4f, - 0x01, 0x1c, 0x36, 0x71, 0x3d, 0x17, 0x85, 0x2e, 0xa2, 0xc1, 0xab, 0x8b, 0x42, 0xd3, 0x0c, 0x86, - 0x7c, 0x09, 0xe5, 0x28, 0xb6, 0x63, 0x91, 0x2b, 0x9b, 0xdb, 0xf7, 0x33, 0xe0, 0xbc, 0x08, 0x9d, - 0x11, 0x87, 0x51, 0x81, 0x26, 0x5f, 0xc1, 0x2d, 0xdf, 0x9b, 0x9e, 0x59, 0xf3, 0x88, 0x59, 0xee, - 0xc4, 0x0a, 0xd9, 0x0f, 0x73, 0x37, 0x64, 0x4e, 0x3e, 0xa7, 0xae, 0x73, 0xc8, 0x51, 0xc4, 0x8c, - 0x09, 0x95, 0x7c, 0xed, 0x6b, 0x28, 0xe3, 0x3a, 0x7c, 0xcf, 0xdf, 0x51, 0xc3, 0xd4, 0xad, 0xe1, - 0xa0, 0xff, 0x54, 0xe8, 0x80, 0xea, 0xdd, 0x9e, 0x85, 0x44, 0x55, 0xe1, 0xc1, 0xbe, 0xa7, 0xf7, - 0x75, 0x53, 0xef, 0xa9, 0x45, 0x9e, 0x3d, 0x74, 0x4a, 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80, - 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c, - 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21, - 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6, - 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26, - 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba, - 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c, - 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2, - 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8, - 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90, - 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91, - 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58, - 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c, - 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b, - 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f, - 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02, - 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22, - 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b, - 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0, - 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18, - 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8, - 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b, - 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e, - 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 0xa7, 0x54, 0x12, 0xf8, 0x84, - 0xa9, 0x3b, 0x73, 0x63, 0xec, 0x43, 0xca, 0x54, 0x0c, 0xc8, 0x2e, 0xac, 0x8d, 0xfd, 0x59, 0xe0, - 0x4e, 0x99, 0x63, 0x8d, 0xe7, 0x61, 0xe4, 0x87, 0xad, 0x77, 0x2e, 0x1c, 0xd3, 0x9e, 0x44, 0xec, - 0x21, 0x80, 0x36, 0xc7, 0xb9, 0x31, 0x31, 0x60, 0x83, 0x79, 0x8e, 0xb5, 0xb8, 0xce, 0xfd, 0xd7, - 0xad, 0xb3, 0xce, 0x3c, 0x27, 0x4f, 0x4a, 0xc4, 0xc1, 0x48, 0x68, 0x61, 0xcc, 0x68, 0x6d, 0x60, - 0x90, 0xb9, 0x77, 0x69, 0xac, 0x14, 0xe2, 0x64, 0xc2, 0xf7, 0x6f, 0xc0, 0x2d, 0x19, 0x22, 0xad, - 0x80, 0x85, 0x13, 0x36, 0x8e, 0xad, 0x60, 0x6a, 0x7b, 0x58, 0xca, 0xa5, 0xc6, 0x4a, 0x24, 0xe4, - 0x50, 0x20, 0x0e, 0xa7, 0xb6, 0x47, 0x34, 0xa8, 0x3f, 0x67, 0x67, 0x91, 0xc5, 0x23, 0x29, 0x76, - 0xae, 0x29, 0xba, 0xc6, 0xe9, 0x43, 0x6f, 0x7a, 0x46, 0x7e, 0x02, 0x8d, 0xf8, 0xdc, 0xdb, 0xb0, - 0x61, 0x6d, 0xe4, 0x4e, 0x35, 0xe3, 0x8b, 0x34, 0x0b, 0x25, 0xf7, 0xa1, 0x2a, 0x35, 0xd4, 0xba, - 0x97, 0x5d, 0x3b, 0xa1, 0xf2, 0xc4, 0x3c, 0xb1, 0xdd, 0xa9, 0x7f, 0xca, 0x42, 0x6b, 0x16, 0xb5, - 0xda, 0xe2, 0xb6, 0x24, 0x21, 0x1d, 0x44, 0xdc, 0x4f, 0xa3, 0x38, 0xf4, 0xbd, 0xe3, 0xd6, 0x26, - 0xde, 0x93, 0xc8, 0xd1, 0xc5, 0xe0, 0xf7, 0x2e, 0x66, 0xfe, 0x7c, 0xf0, 0xfb, 0x1c, 0xee, 0x60, - 0x65, 0x66, 0x3d, 0x3b, 0xb3, 0xf2, 0x68, 0x0d, 0xd1, 0x1b, 0xc8, 0xdd, 0x3d, 0x3b, 0xcc, 0x4e, - 0x6a, 0x43, 0xcd, 0x71, 0xa3, 0xd8, 0xf5, 0xc6, 0x71, 0xab, 0x85, 0xef, 0x4c, 0xc7, 0xe4, 0x33, - 0xb8, 0x3d, 0x73, 0x3d, 0x2b, 0xb2, 0x27, 0xcc, 0x8a, 0x5d, 0xee, 0x9b, 0x6c, 0xec, 0x7b, 0x4e, - 0xd4, 0x7a, 0x80, 0x82, 0x93, 0x99, 0xeb, 0x8d, 0xec, 0x09, 0x33, 0xdd, 0x19, 0x1b, 0x09, 0x0e, - 0xf9, 0x08, 0xd6, 0x11, 0x1e, 0xb2, 0x60, 0xea, 0x8e, 0x6d, 0xf1, 0xfa, 0x1f, 0xe1, 0xeb, 0xd7, - 0x38, 0x83, 0x0a, 0x3a, 0xbe, 0xfa, 0x63, 0x68, 0x06, 0x2c, 0x8c, 0xdc, 0x28, 0xb6, 0xa4, 0x45, - 0xbf, 0x97, 0xd5, 0xda, 0xaa, 0x64, 0x0e, 0x91, 0xd7, 0xfe, 0xcf, 0x02, 0x54, 0x84, 0x73, 0x92, - 0x4f, 0x41, 0xf1, 0x03, 0xbc, 0x06, 0x69, 0x6e, 0x6f, 0x5e, 0xe2, 0xc1, 0x9d, 0x61, 0xc0, 0xeb, - 0x5e, 0x3f, 0xa4, 0x8a, 0x1f, 0xdc, 0xb8, 0x28, 0xd4, 0xfe, 0x10, 0x6a, 0xc9, 0x02, 0xbc, 0xbc, - 0xe8, 0xeb, 0xa3, 0x91, 0x65, 0x3e, 0xee, 0x0e, 0xd4, 0x02, 0xb9, 0x03, 0x24, 0x1d, 0x5a, 0x43, - 0x6a, 0xe9, 0xdf, 0x1c, 0x75, 0xfb, 0xaa, 0x82, 0x5d, 0x1a, 0xd5, 0xbb, 0xa6, 0x4e, 0x05, 0xb2, - 0x48, 0xee, 0xc1, 0xed, 0x2c, 0xe5, 0x1c, 0x5c, 0xc2, 0x14, 0x8c, 0x8f, 0x65, 0x52, 0x01, 0xc5, - 0x18, 0xa8, 0x15, 0x9e, 0x16, 0xf4, 0xef, 0x8d, 0x91, 0x39, 0x52, 0xab, 0xed, 0xbf, 0x29, 0x40, - 0x19, 0xc3, 0x06, 0x3f, 0x9f, 0x54, 0x72, 0x71, 0x5d, 0x73, 0x5e, 0xb9, 0x1a, 0xd9, 0x92, 0xaa, - 0x81, 0x01, 0x65, 0x73, 0x79, 0xf4, 0xf9, 0xb5, 0xd6, 0x53, 0x3f, 0x85, 0x12, 0x8f, 0x52, 0xbc, - 0x43, 0x1c, 0xd2, 0x9e, 0x4e, 0xad, 0x47, 0x06, 0x1d, 0xf1, 0x2a, 0x97, 0x40, 0xb3, 0x3b, 0xd8, - 0xd3, 0x47, 0xe6, 0x30, 0xa1, 0xa1, 0x56, 0x1e, 0x19, 0x7d, 0x33, 0x45, 0x15, 0xb5, 0x9f, 0xd7, - 0x60, 0x35, 0x89, 0x09, 0x22, 0x82, 0x3e, 0x82, 0x46, 0x10, 0xba, 0x33, 0x3b, 0x3c, 0x8b, 0xc6, - 0xb6, 0x87, 0x49, 0x01, 0xb6, 0x7f, 0xb4, 0x24, 0xaa, 0x88, 0x1d, 0x1d, 0x0a, 0xec, 0x68, 0x6c, - 0x7b, 0x34, 0x3b, 0x91, 0xf4, 0x61, 0x75, 0xc6, 0xc2, 0x63, 0xf6, 0x7b, 0xbe, 0xeb, 0xe1, 0x4a, - 0x55, 0x8c, 0xc8, 0xef, 0x5f, 0xba, 0xd2, 0x01, 0x47, 0xff, 0x8e, 0xef, 0x7a, 0xb8, 0x56, 0x7e, - 0x32, 0xf9, 0x04, 0xea, 0xa2, 0x12, 0x72, 0xd8, 0x04, 0x63, 0xc5, 0xb2, 0xda, 0x4f, 0xd4, 0xe8, - 0x3d, 0x36, 0xc9, 0xc4, 0x65, 0xb8, 0x34, 0x2e, 0x37, 0xb2, 0x71, 0xf9, 0xcd, 0x6c, 0x2c, 0x5a, - 0x11, 0x55, 0x78, 0x1a, 0x84, 0x2e, 0x38, 0x7c, 0x6b, 0x89, 0xc3, 0x77, 0x60, 0x23, 0xf1, 0x55, - 0xcb, 0xf5, 0x26, 0xee, 0x4b, 0x2b, 0x72, 0x5f, 0x89, 0xd8, 0x53, 0xa6, 0xeb, 0x09, 0xcb, 0xe0, - 0x9c, 0x91, 0xfb, 0x8a, 0x11, 0x23, 0xe9, 0xe0, 0x64, 0x0e, 0x5c, 0xc5, 0xab, 0xc9, 0xf7, 0x2e, - 0x55, 0x8f, 0x68, 0xbe, 0x64, 0x46, 0xcc, 0x4d, 0x6d, 0xff, 0x52, 0x81, 0x46, 0xe6, 0x1c, 0x78, - 0xf6, 0x16, 0xca, 0x42, 0x61, 0xc5, 0x55, 0x94, 0x50, 0x1f, 0x4a, 0xfa, 0x26, 0xd4, 0xa3, 0xd8, - 0x0e, 0x63, 0x8b, 0x17, 0x57, 0xb2, 0xdd, 0x45, 0xc2, 0x13, 0x76, 0x46, 0x3e, 0x80, 0x35, 0xc1, - 0x74, 0xbd, 0xf1, 0x74, 0x1e, 0xb9, 0xa7, 0xa2, 0x99, 0xaf, 0xd1, 0x26, 0x92, 0x8d, 0x84, 0x4a, - 0xee, 0x42, 0x95, 0x67, 0x21, 0xbe, 0x86, 0x68, 0xfa, 0x2a, 0xcc, 0x73, 0xf8, 0x0a, 0x0f, 0x60, - 0x95, 0x33, 0xce, 0xe7, 0x57, 0xc4, 0x2d, 0x33, 0xf3, 0x9c, 0xf3, 0xd9, 0x1d, 0xd8, 0x10, 0xaf, - 0x09, 0x44, 0xf1, 0x2a, 0x2b, 0xdc, 0x3b, 0xa8, 0xd8, 0x75, 0x64, 0xc9, 0xb2, 0x56, 0x14, 0x9c, - 0x1f, 0x01, 0xcf, 0x5e, 0x0b, 0xe8, 0xbb, 0x22, 0x94, 0x31, 0xcf, 0xc9, 0x61, 0x77, 0xe1, 0x1d, - 0x8e, 0x9d, 0x7b, 0x76, 0x10, 0x4c, 0x5d, 0xe6, 0x58, 0x53, 0xff, 0x18, 0x43, 0x66, 0x14, 0xdb, - 0xb3, 0xc0, 0x9a, 0x47, 0xad, 0x0d, 0x0c, 0x99, 0x6d, 0xe6, 0x39, 0x47, 0x09, 0xa8, 0xef, 0x1f, - 0x9b, 0x09, 0xe4, 0x28, 0x6a, 0xff, 0x3e, 0xac, 0xe6, 0xec, 0x71, 0x41, 0xa7, 0x35, 0x74, 0xfe, - 0x8c, 0x4e, 0xdf, 0x85, 0x95, 0x20, 0x64, 0xe7, 0xa2, 0xd5, 0x51, 0xb4, 0x86, 0xa0, 0x09, 0xb1, - 0xb6, 0x60, 0x05, 0x79, 0x96, 0x20, 0xe6, 0xf3, 0x63, 0x03, 0x59, 0x87, 0xc8, 0x69, 0xbf, 0x80, - 0x95, 0xec, 0x69, 0x93, 0x77, 0x33, 0x69, 0xa1, 0x99, 0xcb, 0x93, 0x69, 0x76, 0x48, 0x2a, 0xb2, - 0xf5, 0x4b, 0x2a, 0x32, 0x72, 0x9d, 0x8a, 0x4c, 0xfb, 0x2f, 0xd9, 0x9c, 0x65, 0x2a, 0x84, 0x9f, - 0x41, 0x2d, 0x90, 0xf5, 0x38, 0x5a, 0x52, 0xfe, 0x12, 0x3e, 0x0f, 0xee, 0x24, 0x95, 0x3b, 0x4d, - 0xe7, 0xb4, 0xff, 0x56, 0x81, 0x5a, 0x5a, 0xd0, 0xe7, 0x2c, 0xef, 0xcd, 0x05, 0xcb, 0x3b, 0x90, - 0x1a, 0x16, 0x0a, 0x7c, 0x1b, 0xa3, 0xc5, 0x27, 0xaf, 0x7f, 0xd7, 0xc5, 0xb6, 0xe7, 0x34, 0xdb, - 0xf6, 0x6c, 0xbe, 0xae, 0xed, 0xf9, 0xe4, 0xa2, 0xc1, 0xbf, 0x95, 0xe9, 0x2d, 0x16, 0xcc, 0xbe, - 0xfd, 0x7d, 0xae, 0x0f, 0xca, 0x26, 0x84, 0x77, 0xc4, 0x7e, 0xd2, 0x84, 0x90, 0xb6, 0x3f, 0xf7, - 0xaf, 0xd7, 0xfe, 0x6c, 0x43, 0x45, 0xea, 0xfc, 0x0e, 0x54, 0x64, 0x4d, 0x27, 0x1b, 0x04, 0x31, - 0x3a, 0x6f, 0x10, 0x0a, 0xb2, 0x4e, 0xd7, 0x7e, 0xae, 0x40, 0x59, 0x0f, 0x43, 0x3f, 0xd4, 0xfe, - 0x48, 0x81, 0x3a, 0x3e, 0xed, 0xf9, 0x0e, 0xe3, 0xd9, 0x60, 0xb7, 0xdb, 0xb3, 0xa8, 0xfe, 0xcd, - 0x91, 0x8e, 0xd9, 0xa0, 0x0d, 0x77, 0xf6, 0x86, 0x83, 0xbd, 0x23, 0x4a, 0xf5, 0x81, 0x69, 0x99, - 0xb4, 0x3b, 0x18, 0xf1, 0xb6, 0x67, 0x38, 0x50, 0x15, 0x9e, 0x29, 0x8c, 0x81, 0xa9, 0xd3, 0x41, - 0xb7, 0x6f, 0x89, 0x56, 0xb4, 0x88, 0x77, 0xb3, 0xba, 0xde, 0xb3, 0xf0, 0xd6, 0x51, 0x2d, 0xf1, - 0x96, 0xd5, 0x34, 0x0e, 0xf4, 0xe1, 0x91, 0xa9, 0x96, 0xc9, 0x6d, 0x58, 0x3f, 0xd4, 0xe9, 0x81, - 0x31, 0x1a, 0x19, 0xc3, 0x81, 0xd5, 0xd3, 0x07, 0x86, 0xde, 0x53, 0x2b, 0x7c, 0x9d, 0x5d, 0x63, - 0xdf, 0xec, 0xee, 0xf6, 0x75, 0xb9, 0x4e, 0x95, 0x6c, 0xc2, 0x5b, 0x7b, 0xc3, 0x83, 0x03, 0xc3, - 0x34, 0xf5, 0x9e, 0xb5, 0x7b, 0x64, 0x5a, 0x23, 0xd3, 0xe8, 0xf7, 0xad, 0xee, 0xe1, 0x61, 0xff, - 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f, - 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14, - 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2, - 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4, - 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1, - 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b, - 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9, - 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18, - 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e, - 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9, - 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95, - 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0xce, 0xe6, 0x71, 0xd7, 0x75, 0xac, 0x88, 0xfd, 0x30, - 0xe7, 0x1e, 0x60, 0xcd, 0x03, 0xc7, 0xe6, 0x62, 0xd6, 0x45, 0x96, 0x72, 0x9d, 0x91, 0xe4, 0x1c, - 0x09, 0x46, 0xfb, 0x15, 0xc0, 0xb9, 0x14, 0x64, 0x1b, 0x6e, 0xf3, 0x3a, 0x9e, 0x45, 0x31, 0x73, - 0x2c, 0xb9, 0xdb, 0x60, 0x1e, 0x47, 0x18, 0xe2, 0xcb, 0x74, 0x23, 0x65, 0xca, 0x9b, 0xc2, 0x79, - 0x1c, 0x91, 0x9f, 0x40, 0xeb, 0xc2, 0x1c, 0x87, 0x4d, 0x19, 0x7f, 0x6d, 0x15, 0xa7, 0xdd, 0x59, - 0x98, 0xd6, 0x13, 0x5c, 0xed, 0x4f, 0x14, 0x80, 0x7d, 0x16, 0x53, 0xc1, 0xcd, 0x34, 0xb6, 0x95, - 0xeb, 0x36, 0xb6, 0xef, 0x27, 0x17, 0x08, 0xc5, 0xab, 0x63, 0xc0, 0x42, 0x97, 0xa1, 0xdc, 0xa4, - 0xcb, 0xc8, 0x35, 0x11, 0xc5, 0x2b, 0x9a, 0x88, 0x52, 0xae, 0x89, 0xf8, 0x18, 0x9a, 0xf6, 0x74, - 0xea, 0xbf, 0xe0, 0x05, 0x0d, 0x0b, 0x43, 0xe6, 0xa0, 0x11, 0x9c, 0xd7, 0xdb, 0xc8, 0xec, 0x49, - 0x9e, 0xf6, 0xe7, 0x0a, 0x34, 0x50, 0x15, 0x51, 0xe0, 0x7b, 0x11, 0x23, 0x5f, 0x42, 0x45, 0x5e, - 0x44, 0x8b, 0x8b, 0xfc, 0xb7, 0x33, 0xb2, 0x66, 0x70, 0xb2, 0x68, 0xa0, 0x12, 0xcc, 0x33, 0x42, - 0xe6, 0x75, 0x97, 0x2b, 0x25, 0x45, 0x91, 0xfb, 0x50, 0x73, 0x3d, 0x4b, 0xb4, 0xd4, 0x95, 0x4c, - 0x58, 0xac, 0xba, 0x1e, 0xd6, 0xb2, 0xed, 0x57, 0x50, 0x11, 0x2f, 0x21, 0x9d, 0x54, 0xa6, 0x8b, - 0xfa, 0xcb, 0xdc, 0x1c, 0xa7, 0xc2, 0xc8, 0xc3, 0x29, 0xbd, 0x2e, 0x40, 0xb7, 0xa0, 0x7a, 0xca, - 0x9b, 0x0f, 0xbc, 0xf4, 0xe3, 0xea, 0x4d, 0x86, 0xda, 0x1f, 0x97, 0x00, 0x0e, 0xe7, 0x4b, 0x0c, - 0xa4, 0x71, 0x5d, 0x03, 0xe9, 0xe4, 0xf4, 0xf8, 0x7a, 0x99, 0x7f, 0x75, 0x43, 0x59, 0xd2, 0x69, - 0x17, 0x6f, 0xda, 0x69, 0xdf, 0x87, 0x6a, 0x1c, 0xce, 0xb9, 0xa3, 0x08, 0x63, 0x4a, 0x5b, 0x5a, - 0x49, 0x25, 0x6f, 0x42, 0x79, 0xe2, 0x87, 0x63, 0x86, 0x8e, 0x95, 0xb2, 0x05, 0xed, 0xc2, 0x65, - 0x52, 0xed, 0xb2, 0xcb, 0x24, 0xde, 0xa0, 0x45, 0xf2, 0x1e, 0x0d, 0x0b, 0x99, 0x7c, 0x83, 0x96, - 0x5c, 0xb1, 0xd1, 0x14, 0x44, 0xbe, 0x81, 0xa6, 0x3d, 0x8f, 0x7d, 0xcb, 0xe5, 0x15, 0xda, 0xd4, - 0x1d, 0x9f, 0x61, 0xd9, 0xdd, 0xcc, 0x7f, 0xaf, 0x4f, 0x0f, 0xaa, 0xd3, 0x9d, 0xc7, 0xbe, 0xe1, - 0x1c, 0x22, 0x72, 0xa7, 0x2a, 0x93, 0x12, 0x5d, 0xb1, 0x33, 0x64, 0xed, 0xc7, 0xb0, 0x92, 0x85, - 0xf1, 0x04, 0x24, 0x81, 0xea, 0x1b, 0x3c, 0x3b, 0x8d, 0x78, 0x6a, 0x1b, 0x98, 0x46, 0xb7, 0xaf, - 0x16, 0xb4, 0x18, 0x1a, 0xb8, 0xbc, 0xf4, 0x8e, 0xeb, 0xba, 0xfd, 0x03, 0x28, 0x61, 0xf8, 0x55, - 0x2e, 0x7c, 0x0f, 0xc1, 0x98, 0x8b, 0xcc, 0xbc, 0xf9, 0x15, 0xb3, 0xe6, 0xf7, 0xdf, 0x05, 0x58, - 0x31, 0xfd, 0xf9, 0xf8, 0xe4, 0xa2, 0x01, 0xc2, 0xaf, 0x3b, 0x42, 0x2d, 0x31, 0x1f, 0xe5, 0xa6, - 0xe6, 0x93, 0x5a, 0x47, 0x71, 0x89, 0x75, 0xdc, 0xf4, 0xcc, 0xb5, 0x2f, 0x60, 0x55, 0x6e, 0x5e, - 0x6a, 0x3d, 0xd1, 0x66, 0xe1, 0x0a, 0x6d, 0x6a, 0xbf, 0x50, 0x60, 0x55, 0xc4, 0xf7, 0xff, 0xbb, - 0xd2, 0x2a, 0x37, 0x0c, 0xeb, 0xe5, 0x1b, 0x5d, 0x1e, 0xfd, 0xbf, 0xf4, 0x34, 0x6d, 0x08, 0xcd, - 0x44, 0x7d, 0x37, 0x50, 0xfb, 0x15, 0x46, 0xfc, 0x8b, 0x02, 0x34, 0x06, 0xec, 0xe5, 0x92, 0x20, - 0x5a, 0xbe, 0xee, 0x71, 0x7c, 0x98, 0x2b, 0x57, 0x1b, 0xdb, 0xeb, 0x59, 0x19, 0xc4, 0xd5, 0x63, - 0x52, 0xc1, 0xa6, 0xb7, 0xa8, 0xca, 0xf2, 0x5b, 0xd4, 0xd2, 0x62, 0xb7, 0x9e, 0xb9, 0xc5, 0x2b, - 0x2e, 0xbb, 0xc5, 0xd3, 0xfe, 0xad, 0x08, 0x0d, 0x6c, 0x90, 0x29, 0x8b, 0xe6, 0xd3, 0x38, 0x27, - 0x4c, 0xe1, 0x6a, 0x61, 0x3a, 0x50, 0x09, 0x71, 0x92, 0x74, 0xa5, 0x4b, 0x83, 0xbf, 0x40, 0x61, - 0x6b, 0xfc, 0xdc, 0x0d, 0x02, 0xe6, 0x58, 0x82, 0x92, 0x14, 0x30, 0x4d, 0x49, 0x16, 0x22, 0x44, - 0xbc, 0xfc, 0x9c, 0xf9, 0x21, 0x4b, 0x51, 0x45, 0xbc, 0x4f, 0x68, 0x70, 0x5a, 0x02, 0xc9, 0xdd, - 0x37, 0x88, 0xca, 0xe0, 0xfc, 0xbe, 0x21, 0xed, 0x35, 0x91, 0x5b, 0x47, 0xae, 0xe8, 0x35, 0x91, - 0xcd, 0xbb, 0xa8, 0x99, 0x3d, 0x9d, 0x5a, 0x7e, 0x10, 0xa1, 0xd3, 0xd4, 0x68, 0x0d, 0x09, 0xc3, - 0x20, 0x22, 0x5f, 0x43, 0x7a, 0x5d, 0x2c, 0x6f, 0xc9, 0xc5, 0x39, 0xb6, 0x2e, 0xbb, 0x58, 0xa0, - 0xab, 0xe3, 0xdc, 0xfd, 0xcf, 0x92, 0x1b, 0xea, 0xca, 0x4d, 0x6f, 0xa8, 0x1f, 0x42, 0x59, 0xc4, - 0xa8, 0xda, 0xeb, 0x62, 0x94, 0xc0, 0x65, 0xed, 0xb3, 0x91, 0xb7, 0xcf, 0x5f, 0x16, 0x80, 0x74, - 0xa7, 0x53, 0x7f, 0x6c, 0xc7, 0xcc, 0x70, 0xa2, 0x8b, 0x66, 0x7a, 0xed, 0xcf, 0x2e, 0x9f, 0x41, - 0x7d, 0xe6, 0x3b, 0x6c, 0x6a, 0x25, 0xdf, 0x94, 0x2e, 0xad, 0x7e, 0x10, 0xc6, 0x5b, 0x52, 0x02, - 0x25, 0xbc, 0xc4, 0x51, 0xb0, 0xee, 0xc0, 0x67, 0xde, 0x84, 0xcd, 0xec, 0x97, 0xb2, 0x14, 0xe1, - 0x8f, 0xa4, 0x03, 0xd5, 0x90, 0x45, 0x2c, 0x3c, 0x65, 0x57, 0x16, 0x55, 0x09, 0x48, 0x7b, 0x06, - 0x1b, 0xb9, 0x1d, 0x49, 0x47, 0xbe, 0x85, 0x5f, 0x2b, 0xc3, 0x58, 0x7e, 0xb4, 0x12, 0x03, 0xfe, - 0x3a, 0xe6, 0x25, 0x9f, 0x41, 0xf9, 0x63, 0xea, 0xf0, 0xc5, 0xab, 0xe2, 0xec, 0x1e, 0xa8, 0x59, - 0x4d, 0xbb, 0x63, 0x0c, 0x36, 0xf2, 0x54, 0x0a, 0xd7, 0x3b, 0x15, 0xed, 0xef, 0x0a, 0xb0, 0xde, - 0x75, 0x1c, 0xf1, 0x77, 0xc3, 0x25, 0xaa, 0x2f, 0x5e, 0x57, 0xf5, 0x0b, 0x81, 0x58, 0x84, 0x89, - 0x6b, 0x05, 0xe2, 0x0f, 0xa1, 0x92, 0xd6, 0x5a, 0xc5, 0x05, 0x77, 0x16, 0x72, 0x51, 0x09, 0xd0, - 0x6e, 0x01, 0xc9, 0x0a, 0x2b, 0xb4, 0xaa, 0xfd, 0x69, 0x11, 0xee, 0xee, 0xb2, 0x63, 0xd7, 0xcb, - 0xbe, 0xe2, 0x57, 0xdf, 0xc9, 0xc5, 0x4f, 0x65, 0x9f, 0xc1, 0xba, 0x28, 0xe4, 0x93, 0x7f, 0x62, - 0x59, 0xec, 0x58, 0x7e, 0x9d, 0x94, 0xb1, 0x6a, 0x0d, 0xf9, 0x07, 0x92, 0xad, 0xe3, 0x7f, 0xc5, - 0x1c, 0x3b, 0xb6, 0x9f, 0xd9, 0x11, 0xb3, 0x5c, 0x47, 0xfe, 0x59, 0x06, 0x12, 0x92, 0xe1, 0x90, - 0x21, 0x94, 0xb8, 0x0d, 0xa2, 0xeb, 0x36, 0xb7, 0xb7, 0x33, 0x62, 0x5d, 0xb2, 0x95, 0xac, 0x02, - 0x0f, 0x7c, 0x87, 0xed, 0x54, 0x8f, 0x06, 0x4f, 0x06, 0xc3, 0xef, 0x06, 0x14, 0x17, 0x22, 0x06, - 0xdc, 0x0a, 0x42, 0x76, 0xea, 0xfa, 0xf3, 0xc8, 0xca, 0x9e, 0x44, 0xf5, 0xca, 0x94, 0xb8, 0x91, - 0xcc, 0xc9, 0x10, 0xb5, 0x9f, 0xc2, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41, - 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37, - 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3, - 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71, - 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd, - 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto b/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto deleted file mode 100644 index 497b4d9a..00000000 --- a/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto +++ /dev/null @@ -1,551 +0,0 @@ -syntax = "proto2"; -option go_package = "datastore"; - -package appengine; - -message Action{} - -message PropertyValue { - optional int64 int64Value = 1; - optional bool booleanValue = 2; - optional string stringValue = 3; - optional double doubleValue = 4; - - optional group PointValue = 5 { - required double x = 6; - required double y = 7; - } - - optional group UserValue = 8 { - required string email = 9; - required string auth_domain = 10; - optional string nickname = 11; - optional string federated_identity = 21; - optional string federated_provider = 22; - } - - optional group ReferenceValue = 12 { - required string app = 13; - optional string name_space = 20; - repeated group PathElement = 14 { - required string type = 15; - optional int64 id = 16; - optional string name = 17; - } - } -} - -message Property { - enum Meaning { - NO_MEANING = 0; - BLOB = 14; - TEXT = 15; - BYTESTRING = 16; - - ATOM_CATEGORY = 1; - ATOM_LINK = 2; - ATOM_TITLE = 3; - ATOM_CONTENT = 4; - ATOM_SUMMARY = 5; - ATOM_AUTHOR = 6; - - GD_WHEN = 7; - GD_EMAIL = 8; - GEORSS_POINT = 9; - GD_IM = 10; - - GD_PHONENUMBER = 11; - GD_POSTALADDRESS = 12; - - GD_RATING = 13; - - BLOBKEY = 17; - ENTITY_PROTO = 19; - - INDEX_VALUE = 18; - }; - - optional Meaning meaning = 1 [default = NO_MEANING]; - optional string meaning_uri = 2; - - required string name = 3; - - required PropertyValue value = 5; - - required bool multiple = 4; - - optional bool searchable = 6 [default=false]; - - enum FtsTokenizationOption { - HTML = 1; - ATOM = 2; - } - - optional FtsTokenizationOption fts_tokenization_option = 8; - - optional string locale = 9 [default = "en"]; -} - -message Path { - repeated group Element = 1 { - required string type = 2; - optional int64 id = 3; - optional string name = 4; - } -} - -message Reference { - required string app = 13; - optional string name_space = 20; - required Path path = 14; -} - -message User { - required string email = 1; - required string auth_domain = 2; - optional string nickname = 3; - optional string federated_identity = 6; - optional string federated_provider = 7; -} - -message EntityProto { - required Reference key = 13; - required Path entity_group = 16; - optional User owner = 17; - - enum Kind { - GD_CONTACT = 1; - GD_EVENT = 2; - GD_MESSAGE = 3; - } - optional Kind kind = 4; - optional string kind_uri = 5; - - repeated Property property = 14; - repeated Property raw_property = 15; - - optional int32 rank = 18; -} - -message CompositeProperty { - required int64 index_id = 1; - repeated string value = 2; -} - -message Index { - required string entity_type = 1; - required bool ancestor = 5; - repeated group Property = 2 { - required string name = 3; - enum Direction { - ASCENDING = 1; - DESCENDING = 2; - } - optional Direction direction = 4 [default = ASCENDING]; - } -} - -message CompositeIndex { - required string app_id = 1; - required int64 id = 2; - required Index definition = 3; - - enum State { - WRITE_ONLY = 1; - READ_WRITE = 2; - DELETED = 3; - ERROR = 4; - } - required State state = 4; - - optional bool only_use_if_required = 6 [default = false]; -} - -message IndexPostfix { - message IndexValue { - required string property_name = 1; - required PropertyValue value = 2; - } - - repeated IndexValue index_value = 1; - - optional Reference key = 2; - - optional bool before = 3 [default=true]; -} - -message IndexPosition { - optional string key = 1; - - optional bool before = 2 [default=true]; -} - -message Snapshot { - enum Status { - INACTIVE = 0; - ACTIVE = 1; - } - - required int64 ts = 1; -} - -message InternalHeader { - optional string qos = 1; -} - -message Transaction { - optional InternalHeader header = 4; - required fixed64 handle = 1; - required string app = 2; - optional bool mark_changes = 3 [default = false]; -} - -message Query { - optional InternalHeader header = 39; - - required string app = 1; - optional string name_space = 29; - - optional string kind = 3; - optional Reference ancestor = 17; - - repeated group Filter = 4 { - enum Operator { - LESS_THAN = 1; - LESS_THAN_OR_EQUAL = 2; - GREATER_THAN = 3; - GREATER_THAN_OR_EQUAL = 4; - EQUAL = 5; - IN = 6; - EXISTS = 7; - } - - required Operator op = 6; - repeated Property property = 14; - } - - optional string search_query = 8; - - repeated group Order = 9 { - enum Direction { - ASCENDING = 1; - DESCENDING = 2; - } - - required string property = 10; - optional Direction direction = 11 [default = ASCENDING]; - } - - enum Hint { - ORDER_FIRST = 1; - ANCESTOR_FIRST = 2; - FILTER_FIRST = 3; - } - optional Hint hint = 18; - - optional int32 count = 23; - - optional int32 offset = 12 [default = 0]; - - optional int32 limit = 16; - - optional CompiledCursor compiled_cursor = 30; - optional CompiledCursor end_compiled_cursor = 31; - - repeated CompositeIndex composite_index = 19; - - optional bool require_perfect_plan = 20 [default = false]; - - optional bool keys_only = 21 [default = false]; - - optional Transaction transaction = 22; - - optional bool compile = 25 [default = false]; - - optional int64 failover_ms = 26; - - optional bool strong = 32; - - repeated string property_name = 33; - - repeated string group_by_property_name = 34; - - optional bool distinct = 24; - - optional int64 min_safe_time_seconds = 35; - - repeated string safe_replica_name = 36; - - optional bool persist_offset = 37 [default=false]; -} - -message CompiledQuery { - required group PrimaryScan = 1 { - optional string index_name = 2; - - optional string start_key = 3; - optional bool start_inclusive = 4; - optional string end_key = 5; - optional bool end_inclusive = 6; - - repeated string start_postfix_value = 22; - repeated string end_postfix_value = 23; - - optional int64 end_unapplied_log_timestamp_us = 19; - } - - repeated group MergeJoinScan = 7 { - required string index_name = 8; - - repeated string prefix_value = 9; - - optional bool value_prefix = 20 [default=false]; - } - - optional Index index_def = 21; - - optional int32 offset = 10 [default = 0]; - - optional int32 limit = 11; - - required bool keys_only = 12; - - repeated string property_name = 24; - - optional int32 distinct_infix_size = 25; - - optional group EntityFilter = 13 { - optional bool distinct = 14 [default=false]; - - optional string kind = 17; - optional Reference ancestor = 18; - } -} - -message CompiledCursor { - optional group Position = 2 { - optional string start_key = 27; - - repeated group IndexValue = 29 { - optional string property = 30; - required PropertyValue value = 31; - } - - optional Reference key = 32; - - optional bool start_inclusive = 28 [default=true]; - } -} - -message Cursor { - required fixed64 cursor = 1; - - optional string app = 2; -} - -message Error { - enum ErrorCode { - BAD_REQUEST = 1; - CONCURRENT_TRANSACTION = 2; - INTERNAL_ERROR = 3; - NEED_INDEX = 4; - TIMEOUT = 5; - PERMISSION_DENIED = 6; - BIGTABLE_ERROR = 7; - COMMITTED_BUT_STILL_APPLYING = 8; - CAPABILITY_DISABLED = 9; - TRY_ALTERNATE_BACKEND = 10; - SAFE_TIME_TOO_OLD = 11; - } -} - -message Cost { - optional int32 index_writes = 1; - optional int32 index_write_bytes = 2; - optional int32 entity_writes = 3; - optional int32 entity_write_bytes = 4; - optional group CommitCost = 5 { - optional int32 requested_entity_puts = 6; - optional int32 requested_entity_deletes = 7; - }; - optional int32 approximate_storage_delta = 8; - optional int32 id_sequence_updates = 9; -} - -message GetRequest { - optional InternalHeader header = 6; - - repeated Reference key = 1; - optional Transaction transaction = 2; - - optional int64 failover_ms = 3; - - optional bool strong = 4; - - optional bool allow_deferred = 5 [default=false]; -} - -message GetResponse { - repeated group Entity = 1 { - optional EntityProto entity = 2; - optional Reference key = 4; - - optional int64 version = 3; - } - - repeated Reference deferred = 5; - - optional bool in_order = 6 [default=true]; -} - -message PutRequest { - optional InternalHeader header = 11; - - repeated EntityProto entity = 1; - optional Transaction transaction = 2; - repeated CompositeIndex composite_index = 3; - - optional bool trusted = 4 [default = false]; - - optional bool force = 7 [default = false]; - - optional bool mark_changes = 8 [default = false]; - repeated Snapshot snapshot = 9; - - enum AutoIdPolicy { - CURRENT = 0; - SEQUENTIAL = 1; - } - optional AutoIdPolicy auto_id_policy = 10 [default = CURRENT]; -} - -message PutResponse { - repeated Reference key = 1; - optional Cost cost = 2; - repeated int64 version = 3; -} - -message TouchRequest { - optional InternalHeader header = 10; - - repeated Reference key = 1; - repeated CompositeIndex composite_index = 2; - optional bool force = 3 [default = false]; - repeated Snapshot snapshot = 9; -} - -message TouchResponse { - optional Cost cost = 1; -} - -message DeleteRequest { - optional InternalHeader header = 10; - - repeated Reference key = 6; - optional Transaction transaction = 5; - - optional bool trusted = 4 [default = false]; - - optional bool force = 7 [default = false]; - - optional bool mark_changes = 8 [default = false]; - repeated Snapshot snapshot = 9; -} - -message DeleteResponse { - optional Cost cost = 1; - repeated int64 version = 3; -} - -message NextRequest { - optional InternalHeader header = 5; - - required Cursor cursor = 1; - optional int32 count = 2; - - optional int32 offset = 4 [default = 0]; - - optional bool compile = 3 [default = false]; -} - -message QueryResult { - optional Cursor cursor = 1; - - repeated EntityProto result = 2; - - optional int32 skipped_results = 7; - - required bool more_results = 3; - - optional bool keys_only = 4; - - optional bool index_only = 9; - - optional bool small_ops = 10; - - optional CompiledQuery compiled_query = 5; - - optional CompiledCursor compiled_cursor = 6; - - repeated CompositeIndex index = 8; - - repeated int64 version = 11; -} - -message AllocateIdsRequest { - optional InternalHeader header = 4; - - optional Reference model_key = 1; - - optional int64 size = 2; - - optional int64 max = 3; - - repeated Reference reserve = 5; -} - -message AllocateIdsResponse { - required int64 start = 1; - required int64 end = 2; - optional Cost cost = 3; -} - -message CompositeIndices { - repeated CompositeIndex index = 1; -} - -message AddActionsRequest { - optional InternalHeader header = 3; - - required Transaction transaction = 1; - repeated Action action = 2; -} - -message AddActionsResponse { -} - -message BeginTransactionRequest { - optional InternalHeader header = 3; - - required string app = 1; - optional bool allow_multiple_eg = 2 [default = false]; - optional string database_id = 4; - - enum TransactionMode { - UNKNOWN = 0; - READ_ONLY = 1; - READ_WRITE = 2; - } - optional TransactionMode mode = 5 [default = UNKNOWN]; - - optional Transaction previous_transaction = 7; -} - -message CommitResponse { - optional Cost cost = 1; - - repeated group Version = 3 { - required Reference root_entity_key = 4; - required int64 version = 5; - } -} diff --git a/vendor/google.golang.org/appengine/internal/identity.go b/vendor/google.golang.org/appengine/internal/identity.go deleted file mode 100644 index 0f95aa91..00000000 --- a/vendor/google.golang.org/appengine/internal/identity.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -import ( - "context" - "os" -) - -var ( - // This is set to true in identity_classic.go, which is behind the appengine build tag. - // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not - // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a - // first-gen runtime. See IsStandard below for the second-gen check. - appengineStandard bool - - // This is set to true in identity_flex.go, which is behind the appenginevm build tag. - appengineFlex bool -) - -// AppID is the implementation of the wrapper function of the same name in -// ../identity.go. See that file for commentary. -func AppID(c context.Context) string { - return appID(FullyQualifiedAppID(c)) -} - -// IsStandard is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsStandard() bool { - // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not - // second-gen (>= Go 1.11). - return appengineStandard || IsSecondGen() -} - -// IsSecondGen is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsSecondGen() bool { - // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime. - return os.Getenv("GAE_ENV") == "standard" -} - -// IsFlex is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsFlex() bool { - return appengineFlex -} - -// IsAppEngine is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsAppEngine() bool { - return IsStandard() || IsFlex() -} diff --git a/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/google.golang.org/appengine/internal/identity_classic.go deleted file mode 100644 index 5ad3548b..00000000 --- a/vendor/google.golang.org/appengine/internal/identity_classic.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appengine -// +build appengine - -package internal - -import ( - "context" - - "appengine" -) - -func init() { - appengineStandard = true -} - -func DefaultVersionHostname(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.DefaultVersionHostname(c) -} - -func Datacenter(_ context.Context) string { return appengine.Datacenter() } -func ServerSoftware() string { return appengine.ServerSoftware() } -func InstanceID() string { return appengine.InstanceID() } -func IsDevAppServer() bool { return appengine.IsDevAppServer() } - -func RequestID(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.RequestID(c) -} - -func ModuleName(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.ModuleName(c) -} -func VersionID(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.VersionID(c) -} - -func fullyQualifiedAppID(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return c.FullyQualifiedAppID() -} diff --git a/vendor/google.golang.org/appengine/internal/identity_flex.go b/vendor/google.golang.org/appengine/internal/identity_flex.go deleted file mode 100644 index 4201b6b5..00000000 --- a/vendor/google.golang.org/appengine/internal/identity_flex.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2018 Google LLC. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appenginevm -// +build appenginevm - -package internal - -func init() { - appengineFlex = true -} diff --git a/vendor/google.golang.org/appengine/internal/identity_vm.go b/vendor/google.golang.org/appengine/internal/identity_vm.go deleted file mode 100644 index 18ddda3a..00000000 --- a/vendor/google.golang.org/appengine/internal/identity_vm.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package internal - -import ( - "context" - "log" - "net/http" - "os" - "strings" -) - -// These functions are implementations of the wrapper functions -// in ../appengine/identity.go. See that file for commentary. - -const ( - hDefaultVersionHostname = "X-AppEngine-Default-Version-Hostname" - hRequestLogId = "X-AppEngine-Request-Log-Id" - hDatacenter = "X-AppEngine-Datacenter" -) - -func ctxHeaders(ctx context.Context) http.Header { - c := fromContext(ctx) - if c == nil { - return nil - } - return c.Request().Header -} - -func DefaultVersionHostname(ctx context.Context) string { - return ctxHeaders(ctx).Get(hDefaultVersionHostname) -} - -func RequestID(ctx context.Context) string { - return ctxHeaders(ctx).Get(hRequestLogId) -} - -func Datacenter(ctx context.Context) string { - if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" { - return dc - } - // If the header isn't set, read zone from the metadata service. - // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] - zone, err := getMetadata("instance/zone") - if err != nil { - log.Printf("Datacenter: %v", err) - return "" - } - parts := strings.Split(string(zone), "/") - if len(parts) == 0 { - return "" - } - return parts[len(parts)-1] -} - -func ServerSoftware() string { - // TODO(dsymonds): Remove fallback when we've verified this. - if s := os.Getenv("SERVER_SOFTWARE"); s != "" { - return s - } - if s := os.Getenv("GAE_ENV"); s != "" { - return s - } - return "Google App Engine/1.x.x" -} - -// TODO(dsymonds): Remove the metadata fetches. - -func ModuleName(_ context.Context) string { - if s := os.Getenv("GAE_MODULE_NAME"); s != "" { - return s - } - if s := os.Getenv("GAE_SERVICE"); s != "" { - return s - } - return string(mustGetMetadata("instance/attributes/gae_backend_name")) -} - -func VersionID(_ context.Context) string { - if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" { - return s1 + "." + s2 - } - if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" { - return s1 + "." + s2 - } - return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version")) -} - -func InstanceID() string { - if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" { - return s - } - if s := os.Getenv("GAE_INSTANCE"); s != "" { - return s - } - return string(mustGetMetadata("instance/attributes/gae_backend_instance")) -} - -func partitionlessAppID() string { - // gae_project has everything except the partition prefix. - if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" { - return appID - } - if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" { - return project - } - return string(mustGetMetadata("instance/attributes/gae_project")) -} - -func fullyQualifiedAppID(_ context.Context) string { - if s := os.Getenv("GAE_APPLICATION"); s != "" { - return s - } - appID := partitionlessAppID() - - part := os.Getenv("GAE_PARTITION") - if part == "" { - part = string(mustGetMetadata("instance/attributes/gae_partition")) - } - - if part != "" { - appID = part + "~" + appID - } - return appID -} - -func IsDevAppServer() bool { - return os.Getenv("RUN_WITH_DEVAPPSERVER") != "" || os.Getenv("GAE_ENV") == "localdev" -} diff --git a/vendor/google.golang.org/appengine/internal/internal.go b/vendor/google.golang.org/appengine/internal/internal.go deleted file mode 100644 index 051ea398..00000000 --- a/vendor/google.golang.org/appengine/internal/internal.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// Package internal provides support for package appengine. -// -// Programs should not use this package directly. Its API is not stable. -// Use packages appengine and appengine/* instead. -package internal - -import ( - "fmt" - - "github.com/golang/protobuf/proto" - - remotepb "google.golang.org/appengine/internal/remote_api" -) - -// errorCodeMaps is a map of service name to the error code map for the service. -var errorCodeMaps = make(map[string]map[int32]string) - -// RegisterErrorCodeMap is called from API implementations to register their -// error code map. This should only be called from init functions. -func RegisterErrorCodeMap(service string, m map[int32]string) { - errorCodeMaps[service] = m -} - -type timeoutCodeKey struct { - service string - code int32 -} - -// timeoutCodes is the set of service+code pairs that represent timeouts. -var timeoutCodes = make(map[timeoutCodeKey]bool) - -func RegisterTimeoutErrorCode(service string, code int32) { - timeoutCodes[timeoutCodeKey{service, code}] = true -} - -// APIError is the type returned by appengine.Context's Call method -// when an API call fails in an API-specific way. This may be, for instance, -// a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE. -type APIError struct { - Service string - Detail string - Code int32 // API-specific error code -} - -func (e *APIError) Error() string { - if e.Code == 0 { - if e.Detail == "" { - return "APIError " - } - return e.Detail - } - s := fmt.Sprintf("API error %d", e.Code) - if m, ok := errorCodeMaps[e.Service]; ok { - s += " (" + e.Service + ": " + m[e.Code] + ")" - } else { - // Shouldn't happen, but provide a bit more detail if it does. - s = e.Service + " " + s - } - if e.Detail != "" { - s += ": " + e.Detail - } - return s -} - -func (e *APIError) IsTimeout() bool { - return timeoutCodes[timeoutCodeKey{e.Service, e.Code}] -} - -// CallError is the type returned by appengine.Context's Call method when an -// API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED. -type CallError struct { - Detail string - Code int32 - // TODO: Remove this if we get a distinguishable error code. - Timeout bool -} - -func (e *CallError) Error() string { - var msg string - switch remotepb.RpcError_ErrorCode(e.Code) { - case remotepb.RpcError_UNKNOWN: - return e.Detail - case remotepb.RpcError_OVER_QUOTA: - msg = "Over quota" - case remotepb.RpcError_CAPABILITY_DISABLED: - msg = "Capability disabled" - case remotepb.RpcError_CANCELLED: - msg = "Canceled" - default: - msg = fmt.Sprintf("Call error %d", e.Code) - } - s := msg + ": " + e.Detail - if e.Timeout { - s += " (timeout)" - } - return s -} - -func (e *CallError) IsTimeout() bool { - return e.Timeout -} - -// NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace. -// The function should be prepared to be called on the same message more than once; it should only modify the -// RPC request the first time. -var NamespaceMods = make(map[string]func(m proto.Message, namespace string)) diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/vendor/google.golang.org/appengine/internal/log/log_service.pb.go deleted file mode 100644 index 8545ac4a..00000000 --- a/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/log/log_service.proto - -package log - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type LogServiceError_ErrorCode int32 - -const ( - LogServiceError_OK LogServiceError_ErrorCode = 0 - LogServiceError_INVALID_REQUEST LogServiceError_ErrorCode = 1 - LogServiceError_STORAGE_ERROR LogServiceError_ErrorCode = 2 -) - -var LogServiceError_ErrorCode_name = map[int32]string{ - 0: "OK", - 1: "INVALID_REQUEST", - 2: "STORAGE_ERROR", -} -var LogServiceError_ErrorCode_value = map[string]int32{ - "OK": 0, - "INVALID_REQUEST": 1, - "STORAGE_ERROR": 2, -} - -func (x LogServiceError_ErrorCode) Enum() *LogServiceError_ErrorCode { - p := new(LogServiceError_ErrorCode) - *p = x - return p -} -func (x LogServiceError_ErrorCode) String() string { - return proto.EnumName(LogServiceError_ErrorCode_name, int32(x)) -} -func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(LogServiceError_ErrorCode_value, data, "LogServiceError_ErrorCode") - if err != nil { - return err - } - *x = LogServiceError_ErrorCode(value) - return nil -} -func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0} -} - -type LogServiceError struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogServiceError) Reset() { *m = LogServiceError{} } -func (m *LogServiceError) String() string { return proto.CompactTextString(m) } -func (*LogServiceError) ProtoMessage() {} -func (*LogServiceError) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{0} -} -func (m *LogServiceError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogServiceError.Unmarshal(m, b) -} -func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic) -} -func (dst *LogServiceError) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogServiceError.Merge(dst, src) -} -func (m *LogServiceError) XXX_Size() int { - return xxx_messageInfo_LogServiceError.Size(m) -} -func (m *LogServiceError) XXX_DiscardUnknown() { - xxx_messageInfo_LogServiceError.DiscardUnknown(m) -} - -var xxx_messageInfo_LogServiceError proto.InternalMessageInfo - -type UserAppLogLine struct { - TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"` - Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` - Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} } -func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) } -func (*UserAppLogLine) ProtoMessage() {} -func (*UserAppLogLine) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{1} -} -func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b) -} -func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic) -} -func (dst *UserAppLogLine) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserAppLogLine.Merge(dst, src) -} -func (m *UserAppLogLine) XXX_Size() int { - return xxx_messageInfo_UserAppLogLine.Size(m) -} -func (m *UserAppLogLine) XXX_DiscardUnknown() { - xxx_messageInfo_UserAppLogLine.DiscardUnknown(m) -} - -var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo - -func (m *UserAppLogLine) GetTimestampUsec() int64 { - if m != nil && m.TimestampUsec != nil { - return *m.TimestampUsec - } - return 0 -} - -func (m *UserAppLogLine) GetLevel() int64 { - if m != nil && m.Level != nil { - return *m.Level - } - return 0 -} - -func (m *UserAppLogLine) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message - } - return "" -} - -type UserAppLogGroup struct { - LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} } -func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) } -func (*UserAppLogGroup) ProtoMessage() {} -func (*UserAppLogGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{2} -} -func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b) -} -func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic) -} -func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserAppLogGroup.Merge(dst, src) -} -func (m *UserAppLogGroup) XXX_Size() int { - return xxx_messageInfo_UserAppLogGroup.Size(m) -} -func (m *UserAppLogGroup) XXX_DiscardUnknown() { - xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m) -} - -var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo - -func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine { - if m != nil { - return m.LogLine - } - return nil -} - -type FlushRequest struct { - Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FlushRequest) Reset() { *m = FlushRequest{} } -func (m *FlushRequest) String() string { return proto.CompactTextString(m) } -func (*FlushRequest) ProtoMessage() {} -func (*FlushRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{3} -} -func (m *FlushRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FlushRequest.Unmarshal(m, b) -} -func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic) -} -func (dst *FlushRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlushRequest.Merge(dst, src) -} -func (m *FlushRequest) XXX_Size() int { - return xxx_messageInfo_FlushRequest.Size(m) -} -func (m *FlushRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FlushRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FlushRequest proto.InternalMessageInfo - -func (m *FlushRequest) GetLogs() []byte { - if m != nil { - return m.Logs - } - return nil -} - -type SetStatusRequest struct { - Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} } -func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) } -func (*SetStatusRequest) ProtoMessage() {} -func (*SetStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{4} -} -func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b) -} -func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic) -} -func (dst *SetStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetStatusRequest.Merge(dst, src) -} -func (m *SetStatusRequest) XXX_Size() int { - return xxx_messageInfo_SetStatusRequest.Size(m) -} -func (m *SetStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo - -func (m *SetStatusRequest) GetStatus() string { - if m != nil && m.Status != nil { - return *m.Status - } - return "" -} - -type LogOffset struct { - RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogOffset) Reset() { *m = LogOffset{} } -func (m *LogOffset) String() string { return proto.CompactTextString(m) } -func (*LogOffset) ProtoMessage() {} -func (*LogOffset) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{5} -} -func (m *LogOffset) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogOffset.Unmarshal(m, b) -} -func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic) -} -func (dst *LogOffset) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogOffset.Merge(dst, src) -} -func (m *LogOffset) XXX_Size() int { - return xxx_messageInfo_LogOffset.Size(m) -} -func (m *LogOffset) XXX_DiscardUnknown() { - xxx_messageInfo_LogOffset.DiscardUnknown(m) -} - -var xxx_messageInfo_LogOffset proto.InternalMessageInfo - -func (m *LogOffset) GetRequestId() []byte { - if m != nil { - return m.RequestId - } - return nil -} - -type LogLine struct { - Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"` - Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` - LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogLine) Reset() { *m = LogLine{} } -func (m *LogLine) String() string { return proto.CompactTextString(m) } -func (*LogLine) ProtoMessage() {} -func (*LogLine) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{6} -} -func (m *LogLine) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogLine.Unmarshal(m, b) -} -func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogLine.Marshal(b, m, deterministic) -} -func (dst *LogLine) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogLine.Merge(dst, src) -} -func (m *LogLine) XXX_Size() int { - return xxx_messageInfo_LogLine.Size(m) -} -func (m *LogLine) XXX_DiscardUnknown() { - xxx_messageInfo_LogLine.DiscardUnknown(m) -} - -var xxx_messageInfo_LogLine proto.InternalMessageInfo - -func (m *LogLine) GetTime() int64 { - if m != nil && m.Time != nil { - return *m.Time - } - return 0 -} - -func (m *LogLine) GetLevel() int32 { - if m != nil && m.Level != nil { - return *m.Level - } - return 0 -} - -func (m *LogLine) GetLogMessage() string { - if m != nil && m.LogMessage != nil { - return *m.LogMessage - } - return "" -} - -type RequestLog struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` - VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"` - RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"` - Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"` - Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"` - Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` - StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"` - Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"` - Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"` - Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"` - Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"` - HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"` - Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"` - ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"` - Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"` - UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` - UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"` - Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"` - ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"` - Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"` - Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"` - TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"` - TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"` - WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"` - PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"` - ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"` - Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"` - CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"` - Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"` - LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"` - AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"` - ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"` - WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"` - WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"` - ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"` - ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RequestLog) Reset() { *m = RequestLog{} } -func (m *RequestLog) String() string { return proto.CompactTextString(m) } -func (*RequestLog) ProtoMessage() {} -func (*RequestLog) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{7} -} -func (m *RequestLog) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RequestLog.Unmarshal(m, b) -} -func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic) -} -func (dst *RequestLog) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestLog.Merge(dst, src) -} -func (m *RequestLog) XXX_Size() int { - return xxx_messageInfo_RequestLog.Size(m) -} -func (m *RequestLog) XXX_DiscardUnknown() { - xxx_messageInfo_RequestLog.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestLog proto.InternalMessageInfo - -const Default_RequestLog_ModuleId string = "default" -const Default_RequestLog_ReplicaIndex int32 = -1 -const Default_RequestLog_Finished bool = true - -func (m *RequestLog) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *RequestLog) GetModuleId() string { - if m != nil && m.ModuleId != nil { - return *m.ModuleId - } - return Default_RequestLog_ModuleId -} - -func (m *RequestLog) GetVersionId() string { - if m != nil && m.VersionId != nil { - return *m.VersionId - } - return "" -} - -func (m *RequestLog) GetRequestId() []byte { - if m != nil { - return m.RequestId - } - return nil -} - -func (m *RequestLog) GetOffset() *LogOffset { - if m != nil { - return m.Offset - } - return nil -} - -func (m *RequestLog) GetIp() string { - if m != nil && m.Ip != nil { - return *m.Ip - } - return "" -} - -func (m *RequestLog) GetNickname() string { - if m != nil && m.Nickname != nil { - return *m.Nickname - } - return "" -} - -func (m *RequestLog) GetStartTime() int64 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *RequestLog) GetEndTime() int64 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *RequestLog) GetLatency() int64 { - if m != nil && m.Latency != nil { - return *m.Latency - } - return 0 -} - -func (m *RequestLog) GetMcycles() int64 { - if m != nil && m.Mcycles != nil { - return *m.Mcycles - } - return 0 -} - -func (m *RequestLog) GetMethod() string { - if m != nil && m.Method != nil { - return *m.Method - } - return "" -} - -func (m *RequestLog) GetResource() string { - if m != nil && m.Resource != nil { - return *m.Resource - } - return "" -} - -func (m *RequestLog) GetHttpVersion() string { - if m != nil && m.HttpVersion != nil { - return *m.HttpVersion - } - return "" -} - -func (m *RequestLog) GetStatus() int32 { - if m != nil && m.Status != nil { - return *m.Status - } - return 0 -} - -func (m *RequestLog) GetResponseSize() int64 { - if m != nil && m.ResponseSize != nil { - return *m.ResponseSize - } - return 0 -} - -func (m *RequestLog) GetReferrer() string { - if m != nil && m.Referrer != nil { - return *m.Referrer - } - return "" -} - -func (m *RequestLog) GetUserAgent() string { - if m != nil && m.UserAgent != nil { - return *m.UserAgent - } - return "" -} - -func (m *RequestLog) GetUrlMapEntry() string { - if m != nil && m.UrlMapEntry != nil { - return *m.UrlMapEntry - } - return "" -} - -func (m *RequestLog) GetCombined() string { - if m != nil && m.Combined != nil { - return *m.Combined - } - return "" -} - -func (m *RequestLog) GetApiMcycles() int64 { - if m != nil && m.ApiMcycles != nil { - return *m.ApiMcycles - } - return 0 -} - -func (m *RequestLog) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *RequestLog) GetCost() float64 { - if m != nil && m.Cost != nil { - return *m.Cost - } - return 0 -} - -func (m *RequestLog) GetTaskQueueName() string { - if m != nil && m.TaskQueueName != nil { - return *m.TaskQueueName - } - return "" -} - -func (m *RequestLog) GetTaskName() string { - if m != nil && m.TaskName != nil { - return *m.TaskName - } - return "" -} - -func (m *RequestLog) GetWasLoadingRequest() bool { - if m != nil && m.WasLoadingRequest != nil { - return *m.WasLoadingRequest - } - return false -} - -func (m *RequestLog) GetPendingTime() int64 { - if m != nil && m.PendingTime != nil { - return *m.PendingTime - } - return 0 -} - -func (m *RequestLog) GetReplicaIndex() int32 { - if m != nil && m.ReplicaIndex != nil { - return *m.ReplicaIndex - } - return Default_RequestLog_ReplicaIndex -} - -func (m *RequestLog) GetFinished() bool { - if m != nil && m.Finished != nil { - return *m.Finished - } - return Default_RequestLog_Finished -} - -func (m *RequestLog) GetCloneKey() []byte { - if m != nil { - return m.CloneKey - } - return nil -} - -func (m *RequestLog) GetLine() []*LogLine { - if m != nil { - return m.Line - } - return nil -} - -func (m *RequestLog) GetLinesIncomplete() bool { - if m != nil && m.LinesIncomplete != nil { - return *m.LinesIncomplete - } - return false -} - -func (m *RequestLog) GetAppEngineRelease() []byte { - if m != nil { - return m.AppEngineRelease - } - return nil -} - -func (m *RequestLog) GetExitReason() int32 { - if m != nil && m.ExitReason != nil { - return *m.ExitReason - } - return 0 -} - -func (m *RequestLog) GetWasThrottledForTime() bool { - if m != nil && m.WasThrottledForTime != nil { - return *m.WasThrottledForTime - } - return false -} - -func (m *RequestLog) GetWasThrottledForRequests() bool { - if m != nil && m.WasThrottledForRequests != nil { - return *m.WasThrottledForRequests - } - return false -} - -func (m *RequestLog) GetThrottledTime() int64 { - if m != nil && m.ThrottledTime != nil { - return *m.ThrottledTime - } - return 0 -} - -func (m *RequestLog) GetServerName() []byte { - if m != nil { - return m.ServerName - } - return nil -} - -type LogModuleVersion struct { - ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` - VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} } -func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) } -func (*LogModuleVersion) ProtoMessage() {} -func (*LogModuleVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{8} -} -func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b) -} -func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic) -} -func (dst *LogModuleVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogModuleVersion.Merge(dst, src) -} -func (m *LogModuleVersion) XXX_Size() int { - return xxx_messageInfo_LogModuleVersion.Size(m) -} -func (m *LogModuleVersion) XXX_DiscardUnknown() { - xxx_messageInfo_LogModuleVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo - -const Default_LogModuleVersion_ModuleId string = "default" - -func (m *LogModuleVersion) GetModuleId() string { - if m != nil && m.ModuleId != nil { - return *m.ModuleId - } - return Default_LogModuleVersion_ModuleId -} - -func (m *LogModuleVersion) GetVersionId() string { - if m != nil && m.VersionId != nil { - return *m.VersionId - } - return "" -} - -type LogReadRequest struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` - ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"` - StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"` - RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"` - MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"` - IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"` - Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"` - CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"` - HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"` - ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"` - IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"` - AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"` - IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"` - IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"` - CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"` - NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogReadRequest) Reset() { *m = LogReadRequest{} } -func (m *LogReadRequest) String() string { return proto.CompactTextString(m) } -func (*LogReadRequest) ProtoMessage() {} -func (*LogReadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{9} -} -func (m *LogReadRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogReadRequest.Unmarshal(m, b) -} -func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic) -} -func (dst *LogReadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogReadRequest.Merge(dst, src) -} -func (m *LogReadRequest) XXX_Size() int { - return xxx_messageInfo_LogReadRequest.Size(m) -} -func (m *LogReadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogReadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo - -func (m *LogReadRequest) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *LogReadRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *LogReadRequest) GetModuleVersion() []*LogModuleVersion { - if m != nil { - return m.ModuleVersion - } - return nil -} - -func (m *LogReadRequest) GetStartTime() int64 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *LogReadRequest) GetEndTime() int64 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *LogReadRequest) GetOffset() *LogOffset { - if m != nil { - return m.Offset - } - return nil -} - -func (m *LogReadRequest) GetRequestId() [][]byte { - if m != nil { - return m.RequestId - } - return nil -} - -func (m *LogReadRequest) GetMinimumLogLevel() int32 { - if m != nil && m.MinimumLogLevel != nil { - return *m.MinimumLogLevel - } - return 0 -} - -func (m *LogReadRequest) GetIncludeIncomplete() bool { - if m != nil && m.IncludeIncomplete != nil { - return *m.IncludeIncomplete - } - return false -} - -func (m *LogReadRequest) GetCount() int64 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *LogReadRequest) GetCombinedLogRegex() string { - if m != nil && m.CombinedLogRegex != nil { - return *m.CombinedLogRegex - } - return "" -} - -func (m *LogReadRequest) GetHostRegex() string { - if m != nil && m.HostRegex != nil { - return *m.HostRegex - } - return "" -} - -func (m *LogReadRequest) GetReplicaIndex() int32 { - if m != nil && m.ReplicaIndex != nil { - return *m.ReplicaIndex - } - return 0 -} - -func (m *LogReadRequest) GetIncludeAppLogs() bool { - if m != nil && m.IncludeAppLogs != nil { - return *m.IncludeAppLogs - } - return false -} - -func (m *LogReadRequest) GetAppLogsPerRequest() int32 { - if m != nil && m.AppLogsPerRequest != nil { - return *m.AppLogsPerRequest - } - return 0 -} - -func (m *LogReadRequest) GetIncludeHost() bool { - if m != nil && m.IncludeHost != nil { - return *m.IncludeHost - } - return false -} - -func (m *LogReadRequest) GetIncludeAll() bool { - if m != nil && m.IncludeAll != nil { - return *m.IncludeAll - } - return false -} - -func (m *LogReadRequest) GetCacheIterator() bool { - if m != nil && m.CacheIterator != nil { - return *m.CacheIterator - } - return false -} - -func (m *LogReadRequest) GetNumShards() int32 { - if m != nil && m.NumShards != nil { - return *m.NumShards - } - return 0 -} - -type LogReadResponse struct { - Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"` - Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` - LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogReadResponse) Reset() { *m = LogReadResponse{} } -func (m *LogReadResponse) String() string { return proto.CompactTextString(m) } -func (*LogReadResponse) ProtoMessage() {} -func (*LogReadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{10} -} -func (m *LogReadResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogReadResponse.Unmarshal(m, b) -} -func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic) -} -func (dst *LogReadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogReadResponse.Merge(dst, src) -} -func (m *LogReadResponse) XXX_Size() int { - return xxx_messageInfo_LogReadResponse.Size(m) -} -func (m *LogReadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogReadResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo - -func (m *LogReadResponse) GetLog() []*RequestLog { - if m != nil { - return m.Log - } - return nil -} - -func (m *LogReadResponse) GetOffset() *LogOffset { - if m != nil { - return m.Offset - } - return nil -} - -func (m *LogReadResponse) GetLastEndTime() int64 { - if m != nil && m.LastEndTime != nil { - return *m.LastEndTime - } - return 0 -} - -type LogUsageRecord struct { - VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"` - StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"` - TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"` - Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} } -func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) } -func (*LogUsageRecord) ProtoMessage() {} -func (*LogUsageRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{11} -} -func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b) -} -func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic) -} -func (dst *LogUsageRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogUsageRecord.Merge(dst, src) -} -func (m *LogUsageRecord) XXX_Size() int { - return xxx_messageInfo_LogUsageRecord.Size(m) -} -func (m *LogUsageRecord) XXX_DiscardUnknown() { - xxx_messageInfo_LogUsageRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo - -func (m *LogUsageRecord) GetVersionId() string { - if m != nil && m.VersionId != nil { - return *m.VersionId - } - return "" -} - -func (m *LogUsageRecord) GetStartTime() int32 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *LogUsageRecord) GetEndTime() int32 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *LogUsageRecord) GetCount() int64 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *LogUsageRecord) GetTotalSize() int64 { - if m != nil && m.TotalSize != nil { - return *m.TotalSize - } - return 0 -} - -func (m *LogUsageRecord) GetRecords() int32 { - if m != nil && m.Records != nil { - return *m.Records - } - return 0 -} - -type LogUsageRequest struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` - StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"` - CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"` - UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"` - VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} } -func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) } -func (*LogUsageRequest) ProtoMessage() {} -func (*LogUsageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{12} -} -func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b) -} -func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic) -} -func (dst *LogUsageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogUsageRequest.Merge(dst, src) -} -func (m *LogUsageRequest) XXX_Size() int { - return xxx_messageInfo_LogUsageRequest.Size(m) -} -func (m *LogUsageRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogUsageRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo - -const Default_LogUsageRequest_ResolutionHours uint32 = 1 - -func (m *LogUsageRequest) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *LogUsageRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *LogUsageRequest) GetStartTime() int32 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *LogUsageRequest) GetEndTime() int32 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *LogUsageRequest) GetResolutionHours() uint32 { - if m != nil && m.ResolutionHours != nil { - return *m.ResolutionHours - } - return Default_LogUsageRequest_ResolutionHours -} - -func (m *LogUsageRequest) GetCombineVersions() bool { - if m != nil && m.CombineVersions != nil { - return *m.CombineVersions - } - return false -} - -func (m *LogUsageRequest) GetUsageVersion() int32 { - if m != nil && m.UsageVersion != nil { - return *m.UsageVersion - } - return 0 -} - -func (m *LogUsageRequest) GetVersionsOnly() bool { - if m != nil && m.VersionsOnly != nil { - return *m.VersionsOnly - } - return false -} - -type LogUsageResponse struct { - Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` - Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} } -func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) } -func (*LogUsageResponse) ProtoMessage() {} -func (*LogUsageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{13} -} -func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b) -} -func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic) -} -func (dst *LogUsageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogUsageResponse.Merge(dst, src) -} -func (m *LogUsageResponse) XXX_Size() int { - return xxx_messageInfo_LogUsageResponse.Size(m) -} -func (m *LogUsageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogUsageResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo - -func (m *LogUsageResponse) GetUsage() []*LogUsageRecord { - if m != nil { - return m.Usage - } - return nil -} - -func (m *LogUsageResponse) GetSummary() *LogUsageRecord { - if m != nil { - return m.Summary - } - return nil -} - -func init() { - proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError") - proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine") - proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup") - proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest") - proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest") - proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset") - proto.RegisterType((*LogLine)(nil), "appengine.LogLine") - proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog") - proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion") - proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest") - proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse") - proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord") - proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest") - proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d) -} - -var fileDescriptor_log_service_f054fd4b5012319d = []byte{ - // 1553 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6, - 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e, - 0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40, - 0x72, 0x3a, 0xd3, 0x1b, 0x0c, 0x0a, 0x1c, 0x81, 0x18, 0x2f, 0xb1, 0xc8, 0xee, 0xc2, 0x91, 0x72, - 0xdb, 0xdb, 0x3e, 0x46, 0x1f, 0xa2, 0xaf, 0xd2, 0xb7, 0xe9, 0xec, 0xd9, 0x05, 0x44, 0x2a, 0x4d, - 0xc6, 0x33, 0xb9, 0xe0, 0x10, 0xfb, 0x9d, 0x83, 0xdd, 0xf3, 0xf3, 0x9d, 0x6f, 0x01, 0xc7, 0xb9, - 0x94, 0xb9, 0xc0, 0xc3, 0x5c, 0x8a, 0xa4, 0xcc, 0x0f, 0xa5, 0xca, 0x8f, 0x92, 0xaa, 0xc2, 0x32, - 0x2f, 0x4a, 0x3c, 0x2a, 0x4a, 0x83, 0xaa, 0x4c, 0xc4, 0x91, 0x90, 0xb9, 0xfd, 0xc5, 0x1a, 0xd5, - 0xbb, 0x22, 0xc5, 0xc3, 0x4a, 0x49, 0x23, 0xd9, 0xb0, 0xf5, 0x0c, 0x5f, 0xc3, 0x74, 0x29, 0xf3, - 0x73, 0x67, 0x3e, 0x51, 0x4a, 0xaa, 0xf0, 0x4b, 0x18, 0xd2, 0xc3, 0x9f, 0x65, 0x86, 0x6c, 0x17, - 0x3a, 0x67, 0xdf, 0xce, 0x7e, 0xc7, 0xee, 0xc0, 0xf4, 0xf4, 0xf5, 0xf7, 0x2f, 0x96, 0xa7, 0x7f, - 0x89, 0xa3, 0x93, 0xef, 0xde, 0x9c, 0x9c, 0x5f, 0xcc, 0x02, 0xb6, 0x0f, 0x93, 0xf3, 0x8b, 0xb3, - 0xe8, 0xc5, 0xcb, 0x93, 0xf8, 0x24, 0x8a, 0xce, 0xa2, 0x59, 0x27, 0xcc, 0x61, 0xef, 0x8d, 0x46, - 0xf5, 0xa2, 0xaa, 0x96, 0x32, 0x5f, 0x16, 0x25, 0xb2, 0x8f, 0x60, 0xcf, 0x14, 0x6b, 0xd4, 0x26, - 0x59, 0x57, 0x71, 0xad, 0x31, 0xe5, 0xc1, 0xbc, 0xb3, 0xe8, 0x46, 0x93, 0x16, 0x7d, 0xa3, 0x31, - 0x65, 0x07, 0xd0, 0x13, 0xf8, 0x0e, 0x05, 0xef, 0x90, 0xd5, 0x2d, 0x18, 0x87, 0xfe, 0x1a, 0xb5, - 0x4e, 0x72, 0xe4, 0xdd, 0x79, 0x67, 0x31, 0x8c, 0x9a, 0x65, 0xf8, 0x12, 0xa6, 0x37, 0x07, 0xbd, - 0x54, 0xb2, 0xae, 0xd8, 0x9f, 0x60, 0x60, 0x73, 0x15, 0x45, 0x89, 0xbc, 0x33, 0xef, 0x2e, 0x46, - 0x9f, 0xdf, 0x3f, 0x6c, 0x33, 0x3d, 0xdc, 0x0e, 0x2b, 0xea, 0x0b, 0xf7, 0x10, 0x86, 0x30, 0xfe, - 0x5a, 0xd4, 0x7a, 0x15, 0xe1, 0x0f, 0x35, 0x6a, 0xc3, 0x18, 0xec, 0x08, 0x99, 0x6b, 0x1e, 0xcc, - 0x83, 0xc5, 0x38, 0xa2, 0xe7, 0xf0, 0x39, 0xcc, 0xce, 0xd1, 0x9c, 0x9b, 0xc4, 0xd4, 0xba, 0xf1, - 0xbb, 0x07, 0xbb, 0x9a, 0x00, 0xca, 0x67, 0x18, 0xf9, 0x55, 0xf8, 0x1c, 0x86, 0x4b, 0x99, 0x9f, - 0x5d, 0x5e, 0x6a, 0x34, 0xec, 0x11, 0x80, 0x72, 0xfe, 0x71, 0x91, 0xf9, 0x2d, 0x87, 0x1e, 0x39, - 0xcd, 0xc2, 0x0b, 0xe8, 0x37, 0x65, 0x62, 0xb0, 0x63, 0x0b, 0xe2, 0x8b, 0x43, 0xcf, 0xdb, 0x35, - 0xe9, 0x35, 0x35, 0x79, 0x0c, 0x23, 0x9b, 0xe6, 0x76, 0x5d, 0x40, 0xc8, 0xfc, 0x95, 0x2f, 0xcd, - 0x3f, 0x01, 0xc0, 0x47, 0xb9, 0x94, 0x39, 0xbb, 0x0b, 0xbb, 0x49, 0x55, 0xb9, 0xf3, 0xad, 0x6b, - 0x2f, 0xa9, 0xaa, 0xd3, 0x8c, 0x7d, 0x08, 0xc3, 0xb5, 0xcc, 0x6a, 0x81, 0xd6, 0xf2, 0xd1, 0x3c, - 0x58, 0x0c, 0x8f, 0xfb, 0x19, 0x5e, 0x26, 0xb5, 0x30, 0xd1, 0xc0, 0x59, 0x4e, 0x33, 0x9b, 0xc0, - 0x3b, 0x54, 0xba, 0x90, 0xa5, 0x75, 0xeb, 0xd0, 0x06, 0x43, 0x8f, 0x38, 0xf3, 0x46, 0x7e, 0x36, - 0x94, 0xcd, 0xfc, 0xd8, 0x27, 0xb0, 0x2b, 0xa9, 0x10, 0xfc, 0xe9, 0x3c, 0x58, 0x8c, 0x3e, 0x3f, - 0xd8, 0xe8, 0x47, 0x5b, 0xa4, 0xc8, 0xfb, 0xb0, 0x3d, 0xe8, 0x14, 0x15, 0xdf, 0xa1, 0x33, 0x3a, - 0x45, 0xc5, 0x1e, 0xc0, 0xa0, 0x2c, 0xd2, 0xb7, 0x65, 0xb2, 0x46, 0xde, 0xb3, 0x01, 0x46, 0xed, - 0xda, 0x1e, 0xac, 0x4d, 0xa2, 0x4c, 0x4c, 0x45, 0xdb, 0xa5, 0xa2, 0x0d, 0x09, 0xb9, 0xb0, 0x95, - 0xbb, 0x0f, 0x03, 0x2c, 0x33, 0x67, 0xec, 0x93, 0xb1, 0x8f, 0x65, 0x46, 0x26, 0x0e, 0x7d, 0x91, - 0x18, 0x2c, 0xd3, 0x6b, 0x3e, 0x70, 0x16, 0xbf, 0x24, 0xb2, 0xa5, 0xd7, 0xa9, 0x40, 0xcd, 0x87, - 0xce, 0xe2, 0x97, 0xb6, 0xd7, 0x6b, 0x34, 0x2b, 0x99, 0x71, 0x70, 0xbd, 0x76, 0x2b, 0x1b, 0xa1, - 0x42, 0x2d, 0x6b, 0x95, 0x22, 0x1f, 0x91, 0xa5, 0x5d, 0xb3, 0x27, 0x30, 0x5e, 0x19, 0x53, 0xc5, - 0xbe, 0x58, 0x7c, 0x4c, 0xf6, 0x91, 0xc5, 0xbe, 0x77, 0xd0, 0x06, 0x85, 0x26, 0xd4, 0x60, 0xbf, - 0x62, 0x4f, 0x61, 0xa2, 0x50, 0x57, 0xb2, 0xd4, 0x18, 0xeb, 0xe2, 0x27, 0xe4, 0x7b, 0x14, 0xce, - 0xb8, 0x01, 0xcf, 0x8b, 0x9f, 0xd0, 0x9d, 0x7d, 0x89, 0x4a, 0xa1, 0xe2, 0x53, 0x57, 0x9d, 0x66, - 0x6d, 0xab, 0x53, 0x6b, 0x54, 0x71, 0x92, 0x63, 0x69, 0xf8, 0x8c, 0xac, 0x43, 0x8b, 0xbc, 0xb0, - 0x00, 0x0b, 0x61, 0x52, 0x2b, 0x11, 0xaf, 0x93, 0x2a, 0xc6, 0xd2, 0xa8, 0x6b, 0xbe, 0xef, 0x62, - 0xab, 0x95, 0x78, 0x95, 0x54, 0x27, 0x16, 0xb2, 0xdb, 0xa7, 0x72, 0xfd, 0x8f, 0xa2, 0xc4, 0x8c, - 0x33, 0x97, 0x5a, 0xb3, 0xb6, 0x0c, 0x4c, 0xaa, 0x22, 0x6e, 0x8a, 0x75, 0x67, 0x1e, 0x2c, 0xba, - 0x11, 0x24, 0x55, 0xf1, 0xca, 0xd7, 0x8b, 0xc1, 0xce, 0x4a, 0x6a, 0xc3, 0x0f, 0xe8, 0x64, 0x7a, - 0xb6, 0x58, 0x6a, 0xb1, 0xbb, 0xf3, 0x60, 0x11, 0x44, 0xf4, 0xcc, 0x9e, 0xc1, 0xd4, 0x24, 0xfa, - 0x6d, 0xfc, 0x43, 0x8d, 0x35, 0xc6, 0xd4, 0xe8, 0x7b, 0xf4, 0xca, 0xc4, 0xc2, 0xdf, 0x59, 0xf4, - 0xb5, 0xed, 0xf6, 0x43, 0x18, 0x92, 0x1f, 0x79, 0x7c, 0xe0, 0x92, 0xb5, 0x00, 0x19, 0x0f, 0xe1, - 0xce, 0x8f, 0x89, 0x8e, 0x85, 0x4c, 0xb2, 0xa2, 0xcc, 0x63, 0xcf, 0x3e, 0xce, 0xe7, 0xc1, 0x62, - 0x10, 0xed, 0xff, 0x98, 0xe8, 0xa5, 0xb3, 0x34, 0x83, 0xfb, 0x04, 0xc6, 0x15, 0x96, 0xe4, 0x4b, - 0xfc, 0xb8, 0x4f, 0xe1, 0x8f, 0x3c, 0x46, 0x1c, 0xf9, 0xd8, 0x36, 0xa0, 0x12, 0x45, 0x9a, 0xc4, - 0x45, 0x99, 0xe1, 0x15, 0x7f, 0x30, 0x0f, 0x16, 0xbd, 0xe3, 0xce, 0xa7, 0x9f, 0xd9, 0x26, 0x90, - 0xe1, 0xd4, 0xe2, 0x6c, 0x0e, 0x83, 0xcb, 0xa2, 0x2c, 0xf4, 0x0a, 0x33, 0xfe, 0xd0, 0x1e, 0x78, - 0xbc, 0x63, 0x54, 0x8d, 0x51, 0x8b, 0xda, 0xd0, 0x53, 0x21, 0x4b, 0x8c, 0xdf, 0xe2, 0x35, 0xff, - 0x3d, 0x09, 0xc0, 0x80, 0x80, 0x6f, 0xf1, 0x9a, 0x3d, 0x83, 0x1d, 0x52, 0xab, 0x47, 0xa4, 0x56, - 0x6c, 0x7b, 0x3a, 0x48, 0xa6, 0xc8, 0xce, 0xfe, 0x08, 0x33, 0xfb, 0xaf, 0xe3, 0xa2, 0x4c, 0xe5, - 0xba, 0x12, 0x68, 0x90, 0x7f, 0x48, 0xf9, 0x4d, 0x09, 0x3f, 0x6d, 0x61, 0xf6, 0x09, 0x30, 0x3b, - 0xed, 0x6e, 0x9b, 0x58, 0xa1, 0xc0, 0x44, 0x23, 0x7f, 0x46, 0x07, 0xcf, 0x92, 0xaa, 0x3a, 0x21, - 0x43, 0xe4, 0x70, 0xdb, 0x49, 0xbc, 0x2a, 0x4c, 0xac, 0x30, 0xd1, 0xb2, 0xe4, 0x7f, 0xb0, 0x69, - 0x46, 0x60, 0xa1, 0x88, 0x10, 0xf6, 0x05, 0xdc, 0xb3, 0xc5, 0x35, 0x2b, 0x25, 0x8d, 0x11, 0x98, - 0xc5, 0x97, 0x52, 0xb9, 0xb2, 0x3d, 0xa6, 0xf3, 0x6d, 0xe9, 0x2f, 0x1a, 0xe3, 0xd7, 0x52, 0x51, - 0xf9, 0xbe, 0x84, 0x07, 0x3f, 0x7f, 0xc9, 0xf7, 0x45, 0xf3, 0x39, 0xbd, 0xf8, 0xc1, 0xad, 0x17, - 0x7d, 0x77, 0x34, 0xdd, 0x17, 0xed, 0x8b, 0x74, 0xd2, 0x13, 0x6a, 0xd0, 0xa4, 0x45, 0xe9, 0x8c, - 0xc7, 0x30, 0xb2, 0x97, 0x1a, 0x2a, 0x47, 0x8a, 0x90, 0x12, 0x04, 0x07, 0x59, 0x5a, 0x84, 0x7f, - 0x83, 0xd9, 0x52, 0xe6, 0xaf, 0x48, 0xc8, 0x9a, 0x81, 0xdb, 0xd2, 0xbc, 0xe0, 0x7d, 0x35, 0x2f, - 0xd8, 0xd2, 0xbc, 0xf0, 0xbf, 0x3d, 0xd8, 0x5b, 0xca, 0x3c, 0xc2, 0x24, 0x6b, 0x28, 0xf5, 0x0b, - 0x12, 0x7b, 0x7b, 0xa3, 0xee, 0xb6, 0x78, 0x7e, 0x05, 0x7b, 0x3e, 0x9a, 0x46, 0x23, 0xee, 0x10, - 0x0f, 0x1e, 0x6e, 0xf3, 0x60, 0x2b, 0x85, 0x68, 0xb2, 0xde, 0xca, 0x68, 0x5b, 0x07, 0xbb, 0x54, - 0xa9, 0x5f, 0xd0, 0xc1, 0x1d, 0x32, 0xb6, 0x3a, 0x78, 0xa3, 0xcd, 0xbd, 0xf7, 0xd0, 0xe6, 0x6d, - 0xa1, 0xdf, 0x9d, 0x77, 0xb7, 0x85, 0xfe, 0x39, 0xec, 0xaf, 0x8b, 0xb2, 0x58, 0xd7, 0xeb, 0x98, - 0xae, 0x60, 0xba, 0xb5, 0xfa, 0xc4, 0xa6, 0xa9, 0x37, 0x58, 0x46, 0xd3, 0xfd, 0xf5, 0x29, 0xb0, - 0xa2, 0x4c, 0x45, 0x9d, 0xe1, 0x26, 0x9d, 0x07, 0x6e, 0x5c, 0xbd, 0x65, 0x83, 0xd0, 0x07, 0xd0, - 0x4b, 0x65, 0x5d, 0x1a, 0x3e, 0xa4, 0xf8, 0xdd, 0xc2, 0xd2, 0xbc, 0x91, 0x23, 0x3a, 0x51, 0x61, - 0x8e, 0x57, 0x7c, 0x8f, 0x7a, 0x35, 0x6b, 0x2c, 0xd4, 0xa5, 0x1c, 0xaf, 0x6c, 0xf4, 0x56, 0x83, - 0xbc, 0x97, 0x53, 0xcb, 0xa1, 0x45, 0x9c, 0xf9, 0xe9, 0xed, 0x71, 0x9f, 0x51, 0xe4, 0xdb, 0xa3, - 0xbe, 0x80, 0x59, 0x13, 0xb6, 0xed, 0x35, 0x7d, 0x23, 0x00, 0x05, 0xbd, 0xe7, 0x71, 0xf7, 0x75, - 0xa1, 0xd9, 0x11, 0x1c, 0x34, 0x1e, 0x71, 0x85, 0x2d, 0xf3, 0xf9, 0x3e, 0xed, 0xba, 0x9f, 0x38, - 0xb7, 0xbf, 0xa2, 0xda, 0x50, 0xa4, 0x66, 0x6b, 0x92, 0xcd, 0x11, 0x6d, 0x3b, 0xf2, 0xd8, 0x37, - 0x56, 0x29, 0x1f, 0xc3, 0xa8, 0x3d, 0x5d, 0x08, 0x3e, 0x26, 0x0f, 0x68, 0x0e, 0x16, 0xc2, 0x8e, - 0x4d, 0x9a, 0xa4, 0x2b, 0x8c, 0x0b, 0x83, 0x2a, 0x31, 0x52, 0xf1, 0x09, 0xf9, 0x4c, 0x08, 0x3d, - 0xf5, 0xa0, 0xad, 0x44, 0x59, 0xaf, 0x63, 0xbd, 0x4a, 0x54, 0xa6, 0x39, 0xa3, 0x88, 0x86, 0x65, - 0xbd, 0x3e, 0x27, 0x20, 0xfc, 0x57, 0x40, 0xdf, 0x83, 0x8e, 0xdb, 0xee, 0xb2, 0x61, 0x1f, 0x43, - 0x57, 0xc8, 0x9c, 0x07, 0xc4, 0xcd, 0xbb, 0x1b, 0x2c, 0xb9, 0xf9, 0xc6, 0x88, 0xac, 0xc7, 0x06, - 0xa3, 0x3a, 0xef, 0xc1, 0xa8, 0x10, 0x26, 0x22, 0xd1, 0x26, 0x6e, 0xf9, 0xe9, 0xc8, 0x3b, 0xb2, - 0xe0, 0x89, 0xe3, 0x68, 0xf8, 0x9f, 0x80, 0x46, 0xed, 0x8d, 0xfd, 0xac, 0x89, 0x30, 0x95, 0xea, - 0xf6, 0x4c, 0x05, 0xb7, 0x86, 0xf3, 0xd6, 0x3c, 0x74, 0x5c, 0x7e, 0xff, 0x7f, 0x1e, 0xba, 0x64, - 0x6c, 0xe7, 0xa1, 0xe5, 0xd9, 0xce, 0x26, 0xcf, 0x1e, 0x01, 0x18, 0x69, 0x12, 0xe1, 0xee, 0xe1, - 0x9e, 0x9b, 0x2f, 0x42, 0xe8, 0x12, 0xe6, 0xd0, 0x57, 0x14, 0x97, 0xe6, 0xbb, 0x6e, 0x3b, 0xbf, - 0x0c, 0xff, 0xdd, 0xa1, 0x4a, 0xfa, 0xd0, 0x7f, 0x8b, 0x4c, 0xfc, 0x7c, 0xc4, 0x7b, 0xbf, 0x36, - 0xe2, 0xbd, 0xcd, 0x11, 0x9f, 0xd9, 0xcf, 0x11, 0x51, 0x1b, 0xbb, 0xf7, 0x4a, 0xd6, 0x4a, 0x53, - 0x0a, 0x93, 0xe3, 0xe0, 0xb3, 0x68, 0x7a, 0x63, 0xfa, 0xc6, 0x5a, 0xec, 0x25, 0xe3, 0x07, 0xa7, - 0xd1, 0x23, 0x97, 0xd4, 0x20, 0x9a, 0x7a, 0xdc, 0x8b, 0x0e, 0x7d, 0xa0, 0xd4, 0x36, 0xb1, 0x56, - 0xb8, 0xdc, 0xa8, 0x8f, 0x09, 0x6c, 0xa4, 0xe9, 0x29, 0x4c, 0x9a, 0x7d, 0x62, 0x59, 0x8a, 0x6b, - 0x3f, 0xe2, 0xe3, 0x06, 0x3c, 0x2b, 0xc5, 0x75, 0x78, 0x45, 0x2a, 0xed, 0xab, 0xe4, 0x09, 0x77, - 0x04, 0x3d, 0xda, 0xc8, 0x53, 0xee, 0xfe, 0x36, 0x8d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05, - 0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd, - 0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00, - 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/log/log_service.proto b/vendor/google.golang.org/appengine/internal/log/log_service.proto deleted file mode 100644 index 8981dc47..00000000 --- a/vendor/google.golang.org/appengine/internal/log/log_service.proto +++ /dev/null @@ -1,150 +0,0 @@ -syntax = "proto2"; -option go_package = "log"; - -package appengine; - -message LogServiceError { - enum ErrorCode { - OK = 0; - INVALID_REQUEST = 1; - STORAGE_ERROR = 2; - } -} - -message UserAppLogLine { - required int64 timestamp_usec = 1; - required int64 level = 2; - required string message = 3; -} - -message UserAppLogGroup { - repeated UserAppLogLine log_line = 2; -} - -message FlushRequest { - optional bytes logs = 1; -} - -message SetStatusRequest { - required string status = 1; -} - - -message LogOffset { - optional bytes request_id = 1; -} - -message LogLine { - required int64 time = 1; - required int32 level = 2; - required string log_message = 3; -} - -message RequestLog { - required string app_id = 1; - optional string module_id = 37 [default="default"]; - required string version_id = 2; - required bytes request_id = 3; - optional LogOffset offset = 35; - required string ip = 4; - optional string nickname = 5; - required int64 start_time = 6; - required int64 end_time = 7; - required int64 latency = 8; - required int64 mcycles = 9; - required string method = 10; - required string resource = 11; - required string http_version = 12; - required int32 status = 13; - required int64 response_size = 14; - optional string referrer = 15; - optional string user_agent = 16; - required string url_map_entry = 17; - required string combined = 18; - optional int64 api_mcycles = 19; - optional string host = 20; - optional double cost = 21; - - optional string task_queue_name = 22; - optional string task_name = 23; - - optional bool was_loading_request = 24; - optional int64 pending_time = 25; - optional int32 replica_index = 26 [default = -1]; - optional bool finished = 27 [default = true]; - optional bytes clone_key = 28; - - repeated LogLine line = 29; - - optional bool lines_incomplete = 36; - optional bytes app_engine_release = 38; - - optional int32 exit_reason = 30; - optional bool was_throttled_for_time = 31; - optional bool was_throttled_for_requests = 32; - optional int64 throttled_time = 33; - - optional bytes server_name = 34; -} - -message LogModuleVersion { - optional string module_id = 1 [default="default"]; - optional string version_id = 2; -} - -message LogReadRequest { - required string app_id = 1; - repeated string version_id = 2; - repeated LogModuleVersion module_version = 19; - - optional int64 start_time = 3; - optional int64 end_time = 4; - optional LogOffset offset = 5; - repeated bytes request_id = 6; - - optional int32 minimum_log_level = 7; - optional bool include_incomplete = 8; - optional int64 count = 9; - - optional string combined_log_regex = 14; - optional string host_regex = 15; - optional int32 replica_index = 16; - - optional bool include_app_logs = 10; - optional int32 app_logs_per_request = 17; - optional bool include_host = 11; - optional bool include_all = 12; - optional bool cache_iterator = 13; - optional int32 num_shards = 18; -} - -message LogReadResponse { - repeated RequestLog log = 1; - optional LogOffset offset = 2; - optional int64 last_end_time = 3; -} - -message LogUsageRecord { - optional string version_id = 1; - optional int32 start_time = 2; - optional int32 end_time = 3; - optional int64 count = 4; - optional int64 total_size = 5; - optional int32 records = 6; -} - -message LogUsageRequest { - required string app_id = 1; - repeated string version_id = 2; - optional int32 start_time = 3; - optional int32 end_time = 4; - optional uint32 resolution_hours = 5 [default = 1]; - optional bool combine_versions = 6; - optional int32 usage_version = 7; - optional bool versions_only = 8; -} - -message LogUsageResponse { - repeated LogUsageRecord usage = 1; - optional LogUsageRecord summary = 2; -} diff --git a/vendor/google.golang.org/appengine/internal/main.go b/vendor/google.golang.org/appengine/internal/main.go deleted file mode 100644 index afd0ae84..00000000 --- a/vendor/google.golang.org/appengine/internal/main.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appengine -// +build appengine - -package internal - -import ( - "appengine_internal" -) - -func Main() { - MainPath = "" - appengine_internal.Main() -} diff --git a/vendor/google.golang.org/appengine/internal/main_common.go b/vendor/google.golang.org/appengine/internal/main_common.go deleted file mode 100644 index 357dce4d..00000000 --- a/vendor/google.golang.org/appengine/internal/main_common.go +++ /dev/null @@ -1,7 +0,0 @@ -package internal - -// MainPath stores the file path of the main package. On App Engine Standard -// using Go version 1.9 and below, this will be unset. On App Engine Flex and -// App Engine Standard second-gen (Go 1.11 and above), this will be the -// filepath to package main. -var MainPath string diff --git a/vendor/google.golang.org/appengine/internal/main_vm.go b/vendor/google.golang.org/appengine/internal/main_vm.go deleted file mode 100644 index 86a8caf0..00000000 --- a/vendor/google.golang.org/appengine/internal/main_vm.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package internal - -import ( - "io" - "log" - "net/http" - "net/url" - "os" - "path/filepath" - "runtime" -) - -func Main() { - MainPath = filepath.Dir(findMainPath()) - installHealthChecker(http.DefaultServeMux) - - port := "8080" - if s := os.Getenv("PORT"); s != "" { - port = s - } - - host := "" - if IsDevAppServer() { - host = "127.0.0.1" - } - if err := http.ListenAndServe(host+":"+port, Middleware(http.DefaultServeMux)); err != nil { - log.Fatalf("http.ListenAndServe: %v", err) - } -} - -// Find the path to package main by looking at the root Caller. -func findMainPath() string { - pc := make([]uintptr, 100) - n := runtime.Callers(2, pc) - frames := runtime.CallersFrames(pc[:n]) - for { - frame, more := frames.Next() - // Tests won't have package main, instead they have testing.tRunner - if frame.Function == "main.main" || frame.Function == "testing.tRunner" { - return frame.File - } - if !more { - break - } - } - return "" -} - -func installHealthChecker(mux *http.ServeMux) { - // If no health check handler has been installed by this point, add a trivial one. - const healthPath = "/_ah/health" - hreq := &http.Request{ - Method: "GET", - URL: &url.URL{ - Path: healthPath, - }, - } - if _, pat := mux.Handler(hreq); pat != healthPath { - mux.HandleFunc(healthPath, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "ok") - }) - } -} diff --git a/vendor/google.golang.org/appengine/internal/metadata.go b/vendor/google.golang.org/appengine/internal/metadata.go deleted file mode 100644 index c4ba63bb..00000000 --- a/vendor/google.golang.org/appengine/internal/metadata.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -// This file has code for accessing metadata. -// -// References: -// https://cloud.google.com/compute/docs/metadata - -import ( - "fmt" - "io/ioutil" - "net/http" - "net/url" -) - -const ( - metadataHost = "metadata" - metadataPath = "/computeMetadata/v1/" -) - -var ( - metadataRequestHeaders = http.Header{ - "Metadata-Flavor": []string{"Google"}, - } -) - -// TODO(dsymonds): Do we need to support default values, like Python? -func mustGetMetadata(key string) []byte { - b, err := getMetadata(key) - if err != nil { - panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err)) - } - return b -} - -func getMetadata(key string) ([]byte, error) { - // TODO(dsymonds): May need to use url.Parse to support keys with query args. - req := &http.Request{ - Method: "GET", - URL: &url.URL{ - Scheme: "http", - Host: metadataHost, - Path: metadataPath + key, - }, - Header: metadataRequestHeaders, - Host: metadataHost, - } - resp, err := http.DefaultClient.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - if resp.StatusCode != 200 { - return nil, fmt.Errorf("metadata server returned HTTP %d", resp.StatusCode) - } - return ioutil.ReadAll(resp.Body) -} diff --git a/vendor/google.golang.org/appengine/internal/net.go b/vendor/google.golang.org/appengine/internal/net.go deleted file mode 100644 index fe429720..00000000 --- a/vendor/google.golang.org/appengine/internal/net.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -// This file implements a network dialer that limits the number of concurrent connections. -// It is only used for API calls. - -import ( - "log" - "net" - "runtime" - "sync" - "time" -) - -var limitSem = make(chan int, 100) // TODO(dsymonds): Use environment variable. - -func limitRelease() { - // non-blocking - select { - case <-limitSem: - default: - // This should not normally happen. - log.Print("appengine: unbalanced limitSem release!") - } -} - -func limitDial(network, addr string) (net.Conn, error) { - limitSem <- 1 - - // Dial with a timeout in case the API host is MIA. - // The connection should normally be very fast. - conn, err := net.DialTimeout(network, addr, 10*time.Second) - if err != nil { - limitRelease() - return nil, err - } - lc := &limitConn{Conn: conn} - runtime.SetFinalizer(lc, (*limitConn).Close) // shouldn't usually be required - return lc, nil -} - -type limitConn struct { - close sync.Once - net.Conn -} - -func (lc *limitConn) Close() error { - defer lc.close.Do(func() { - limitRelease() - runtime.SetFinalizer(lc, nil) - }) - return lc.Conn.Close() -} diff --git a/vendor/google.golang.org/appengine/internal/regen.sh b/vendor/google.golang.org/appengine/internal/regen.sh deleted file mode 100644 index 2fdb546a..00000000 --- a/vendor/google.golang.org/appengine/internal/regen.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -e -# -# This script rebuilds the generated code for the protocol buffers. -# To run this you will need protoc and goprotobuf installed; -# see https://github.com/golang/protobuf for instructions. - -PKG=google.golang.org/appengine - -function die() { - echo 1>&2 $* - exit 1 -} - -# Sanity check that the right tools are accessible. -for tool in go protoc protoc-gen-go; do - q=$(which $tool) || die "didn't find $tool" - echo 1>&2 "$tool: $q" -done - -echo -n 1>&2 "finding package dir... " -pkgdir=$(go list -f '{{.Dir}}' $PKG) -echo 1>&2 $pkgdir -base=$(echo $pkgdir | sed "s,/$PKG\$,,") -echo 1>&2 "base: $base" -cd $base - -# Run protoc once per package. -for dir in $(find $PKG/internal -name '*.proto' | xargs dirname | sort | uniq); do - echo 1>&2 "* $dir" - protoc --go_out=. $dir/*.proto -done - -for f in $(find $PKG/internal -name '*.pb.go'); do - # Remove proto.RegisterEnum calls. - # These cause duplicate registration panics when these packages - # are used on classic App Engine. proto.RegisterEnum only affects - # parsing the text format; we don't care about that. - # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17 - sed -i '/proto.RegisterEnum/d' $f -done diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go deleted file mode 100644 index 8d782a38..00000000 --- a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go +++ /dev/null @@ -1,361 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/remote_api/remote_api.proto - -package remote_api - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type RpcError_ErrorCode int32 - -const ( - RpcError_UNKNOWN RpcError_ErrorCode = 0 - RpcError_CALL_NOT_FOUND RpcError_ErrorCode = 1 - RpcError_PARSE_ERROR RpcError_ErrorCode = 2 - RpcError_SECURITY_VIOLATION RpcError_ErrorCode = 3 - RpcError_OVER_QUOTA RpcError_ErrorCode = 4 - RpcError_REQUEST_TOO_LARGE RpcError_ErrorCode = 5 - RpcError_CAPABILITY_DISABLED RpcError_ErrorCode = 6 - RpcError_FEATURE_DISABLED RpcError_ErrorCode = 7 - RpcError_BAD_REQUEST RpcError_ErrorCode = 8 - RpcError_RESPONSE_TOO_LARGE RpcError_ErrorCode = 9 - RpcError_CANCELLED RpcError_ErrorCode = 10 - RpcError_REPLAY_ERROR RpcError_ErrorCode = 11 - RpcError_DEADLINE_EXCEEDED RpcError_ErrorCode = 12 -) - -var RpcError_ErrorCode_name = map[int32]string{ - 0: "UNKNOWN", - 1: "CALL_NOT_FOUND", - 2: "PARSE_ERROR", - 3: "SECURITY_VIOLATION", - 4: "OVER_QUOTA", - 5: "REQUEST_TOO_LARGE", - 6: "CAPABILITY_DISABLED", - 7: "FEATURE_DISABLED", - 8: "BAD_REQUEST", - 9: "RESPONSE_TOO_LARGE", - 10: "CANCELLED", - 11: "REPLAY_ERROR", - 12: "DEADLINE_EXCEEDED", -} -var RpcError_ErrorCode_value = map[string]int32{ - "UNKNOWN": 0, - "CALL_NOT_FOUND": 1, - "PARSE_ERROR": 2, - "SECURITY_VIOLATION": 3, - "OVER_QUOTA": 4, - "REQUEST_TOO_LARGE": 5, - "CAPABILITY_DISABLED": 6, - "FEATURE_DISABLED": 7, - "BAD_REQUEST": 8, - "RESPONSE_TOO_LARGE": 9, - "CANCELLED": 10, - "REPLAY_ERROR": 11, - "DEADLINE_EXCEEDED": 12, -} - -func (x RpcError_ErrorCode) Enum() *RpcError_ErrorCode { - p := new(RpcError_ErrorCode) - *p = x - return p -} -func (x RpcError_ErrorCode) String() string { - return proto.EnumName(RpcError_ErrorCode_name, int32(x)) -} -func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode") - if err != nil { - return err - } - *x = RpcError_ErrorCode(value) - return nil -} -func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0} -} - -type Request struct { - ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"` - Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"` - Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` - RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{0} -} -func (m *Request) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Request.Unmarshal(m, b) -} -func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Request.Marshal(b, m, deterministic) -} -func (dst *Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_Request.Merge(dst, src) -} -func (m *Request) XXX_Size() int { - return xxx_messageInfo_Request.Size(m) -} -func (m *Request) XXX_DiscardUnknown() { - xxx_messageInfo_Request.DiscardUnknown(m) -} - -var xxx_messageInfo_Request proto.InternalMessageInfo - -func (m *Request) GetServiceName() string { - if m != nil && m.ServiceName != nil { - return *m.ServiceName - } - return "" -} - -func (m *Request) GetMethod() string { - if m != nil && m.Method != nil { - return *m.Method - } - return "" -} - -func (m *Request) GetRequest() []byte { - if m != nil { - return m.Request - } - return nil -} - -func (m *Request) GetRequestId() string { - if m != nil && m.RequestId != nil { - return *m.RequestId - } - return "" -} - -type ApplicationError struct { - Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` - Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApplicationError) Reset() { *m = ApplicationError{} } -func (m *ApplicationError) String() string { return proto.CompactTextString(m) } -func (*ApplicationError) ProtoMessage() {} -func (*ApplicationError) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{1} -} -func (m *ApplicationError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApplicationError.Unmarshal(m, b) -} -func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic) -} -func (dst *ApplicationError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplicationError.Merge(dst, src) -} -func (m *ApplicationError) XXX_Size() int { - return xxx_messageInfo_ApplicationError.Size(m) -} -func (m *ApplicationError) XXX_DiscardUnknown() { - xxx_messageInfo_ApplicationError.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplicationError proto.InternalMessageInfo - -func (m *ApplicationError) GetCode() int32 { - if m != nil && m.Code != nil { - return *m.Code - } - return 0 -} - -func (m *ApplicationError) GetDetail() string { - if m != nil && m.Detail != nil { - return *m.Detail - } - return "" -} - -type RpcError struct { - Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` - Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RpcError) Reset() { *m = RpcError{} } -func (m *RpcError) String() string { return proto.CompactTextString(m) } -func (*RpcError) ProtoMessage() {} -func (*RpcError) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{2} -} -func (m *RpcError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RpcError.Unmarshal(m, b) -} -func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RpcError.Marshal(b, m, deterministic) -} -func (dst *RpcError) XXX_Merge(src proto.Message) { - xxx_messageInfo_RpcError.Merge(dst, src) -} -func (m *RpcError) XXX_Size() int { - return xxx_messageInfo_RpcError.Size(m) -} -func (m *RpcError) XXX_DiscardUnknown() { - xxx_messageInfo_RpcError.DiscardUnknown(m) -} - -var xxx_messageInfo_RpcError proto.InternalMessageInfo - -func (m *RpcError) GetCode() int32 { - if m != nil && m.Code != nil { - return *m.Code - } - return 0 -} - -func (m *RpcError) GetDetail() string { - if m != nil && m.Detail != nil { - return *m.Detail - } - return "" -} - -type Response struct { - Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` - Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` - ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"` - JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"` - RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{3} -} -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) -} -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) -} -func (dst *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(dst, src) -} -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) -} -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) -} - -var xxx_messageInfo_Response proto.InternalMessageInfo - -func (m *Response) GetResponse() []byte { - if m != nil { - return m.Response - } - return nil -} - -func (m *Response) GetException() []byte { - if m != nil { - return m.Exception - } - return nil -} - -func (m *Response) GetApplicationError() *ApplicationError { - if m != nil { - return m.ApplicationError - } - return nil -} - -func (m *Response) GetJavaException() []byte { - if m != nil { - return m.JavaException - } - return nil -} - -func (m *Response) GetRpcError() *RpcError { - if m != nil { - return m.RpcError - } - return nil -} - -func init() { - proto.RegisterType((*Request)(nil), "remote_api.Request") - proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError") - proto.RegisterType((*RpcError)(nil), "remote_api.RpcError") - proto.RegisterType((*Response)(nil), "remote_api.Response") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d) -} - -var fileDescriptor_remote_api_1978114ec33a273d = []byte{ - // 531 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42, - 0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x6f, 0x91, 0x85, 0x65, 0xa7, 0x6b, 0xbb, 0x50, 0x5e, - 0x56, 0x2b, 0x67, 0x65, 0x8c, 0x12, 0xaf, 0xd9, 0x98, 0x8a, 0x17, 0x6e, 0xc0, 0xb5, 0x38, 0x0c, - 0xb7, 0x40, 0x36, 0x6e, 0x63, 0xf5, 0x89, 0xb7, 0x7f, 0x7e, 0x7b, 0xe6, 0x1b, 0xcd, 0xcc, 0xc2, - 0xbb, 0x5c, 0xa9, 0x7c, 0x23, 0x17, 0xb9, 0xda, 0x88, 0x32, 0x5f, 0x28, 0x9d, 0x5f, 0x88, 0xaa, - 0x92, 0x65, 0x5e, 0x94, 0xf2, 0xa2, 0x28, 0x6b, 0xa9, 0x4b, 0xb1, 0xb9, 0xd0, 0x72, 0xab, 0x6a, - 0xc9, 0x45, 0x55, 0xf4, 0xe4, 0xa2, 0xd2, 0xaa, 0x56, 0x18, 0xf6, 0xce, 0xec, 0x27, 0x8c, 0x98, - 0xfc, 0xf6, 0x5d, 0xee, 0x6a, 0xfc, 0x12, 0xec, 0x9d, 0xd4, 0xb7, 0x45, 0x26, 0x79, 0x29, 0xb6, - 0xd2, 0x31, 0xa7, 0xe6, 0xdc, 0x62, 0x93, 0xce, 0x0b, 0xc5, 0x56, 0xe2, 0x33, 0x38, 0xdc, 0xca, - 0xfa, 0x8b, 0x5a, 0x3b, 0x07, 0xed, 0xc7, 0x2e, 0xc2, 0x0e, 0x8c, 0xf4, 0xbf, 0x2a, 0xce, 0x60, - 0x6a, 0xce, 0x6d, 0x76, 0x17, 0xe2, 0x17, 0x00, 0x9d, 0xe4, 0xc5, 0xda, 0x19, 0x4e, 0x8d, 0xb9, - 0xc5, 0xac, 0xce, 0xf1, 0xd7, 0xb3, 0xb7, 0x80, 0x48, 0x55, 0x6d, 0x8a, 0x4c, 0xd4, 0x85, 0x2a, - 0xa9, 0xd6, 0x4a, 0x63, 0x0c, 0x83, 0x4c, 0xad, 0xa5, 0x63, 0x4c, 0xcd, 0xf9, 0x90, 0xb5, 0xba, - 0x01, 0xaf, 0x65, 0x2d, 0x8a, 0x4d, 0xd7, 0x55, 0x17, 0xcd, 0x7e, 0x9b, 0x30, 0x66, 0x55, 0xf6, - 0x7f, 0x89, 0x46, 0x2f, 0xf1, 0x97, 0x09, 0x56, 0x9b, 0xe5, 0x36, 0x7f, 0x4d, 0x60, 0x94, 0x86, - 0x1f, 0xc2, 0xe8, 0x63, 0x88, 0x1e, 0x61, 0x0c, 0xc7, 0x2e, 0x09, 0x02, 0x1e, 0x46, 0x09, 0xbf, - 0x8c, 0xd2, 0xd0, 0x43, 0x06, 0x7e, 0x0c, 0x93, 0x15, 0x61, 0x31, 0xe5, 0x94, 0xb1, 0x88, 0x21, - 0x13, 0x9f, 0x01, 0x8e, 0xa9, 0x9b, 0x32, 0x3f, 0xb9, 0xe1, 0xd7, 0x7e, 0x14, 0x90, 0xc4, 0x8f, - 0x42, 0x74, 0x80, 0x8f, 0x01, 0xa2, 0x6b, 0xca, 0xf8, 0x55, 0x1a, 0x25, 0x04, 0x0d, 0xf0, 0x53, - 0x38, 0x61, 0xf4, 0x2a, 0xa5, 0x71, 0xc2, 0x93, 0x28, 0xe2, 0x01, 0x61, 0xef, 0x29, 0x1a, 0xe2, - 0x67, 0xf0, 0xc4, 0x25, 0x2b, 0xb2, 0xf4, 0x83, 0xa6, 0x80, 0xe7, 0xc7, 0x64, 0x19, 0x50, 0x0f, - 0x1d, 0xe2, 0x53, 0x40, 0x97, 0x94, 0x24, 0x29, 0xa3, 0x7b, 0x77, 0xd4, 0xe0, 0x97, 0xc4, 0xe3, - 0x5d, 0x25, 0x34, 0x6e, 0xf0, 0x8c, 0xc6, 0xab, 0x28, 0x8c, 0x69, 0xaf, 0xae, 0x85, 0x8f, 0xc0, - 0x72, 0x49, 0xe8, 0xd2, 0xa0, 0xc9, 0x03, 0x8c, 0xc0, 0x66, 0x74, 0x15, 0x90, 0x9b, 0xae, 0xef, - 0x49, 0xd3, 0x8f, 0x47, 0x89, 0x17, 0xf8, 0x21, 0xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64, - 0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b, - 0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5, - 0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c, - 0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf, - 0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7, - 0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e, - 0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f, - 0x03, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto b/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto deleted file mode 100644 index f21763a4..00000000 --- a/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto2"; -option go_package = "remote_api"; - -package remote_api; - -message Request { - required string service_name = 2; - required string method = 3; - required bytes request = 4; - optional string request_id = 5; -} - -message ApplicationError { - required int32 code = 1; - required string detail = 2; -} - -message RpcError { - enum ErrorCode { - UNKNOWN = 0; - CALL_NOT_FOUND = 1; - PARSE_ERROR = 2; - SECURITY_VIOLATION = 3; - OVER_QUOTA = 4; - REQUEST_TOO_LARGE = 5; - CAPABILITY_DISABLED = 6; - FEATURE_DISABLED = 7; - BAD_REQUEST = 8; - RESPONSE_TOO_LARGE = 9; - CANCELLED = 10; - REPLAY_ERROR = 11; - DEADLINE_EXCEEDED = 12; - } - required int32 code = 1; - optional string detail = 2; -} - -message Response { - optional bytes response = 1; - optional bytes exception = 2; - optional ApplicationError application_error = 3; - optional bytes java_exception = 4; - optional RpcError rpc_error = 5; -} diff --git a/vendor/google.golang.org/appengine/internal/transaction.go b/vendor/google.golang.org/appengine/internal/transaction.go deleted file mode 100644 index 2ae8ab9f..00000000 --- a/vendor/google.golang.org/appengine/internal/transaction.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -// This file implements hooks for applying datastore transactions. - -import ( - "context" - "errors" - "reflect" - - "github.com/golang/protobuf/proto" - - basepb "google.golang.org/appengine/internal/base" - pb "google.golang.org/appengine/internal/datastore" -) - -var transactionSetters = make(map[reflect.Type]reflect.Value) - -// RegisterTransactionSetter registers a function that sets transaction information -// in a protocol buffer message. f should be a function with two arguments, -// the first being a protocol buffer type, and the second being *datastore.Transaction. -func RegisterTransactionSetter(f interface{}) { - v := reflect.ValueOf(f) - transactionSetters[v.Type().In(0)] = v -} - -// applyTransaction applies the transaction t to message pb -// by using the relevant setter passed to RegisterTransactionSetter. -func applyTransaction(pb proto.Message, t *pb.Transaction) { - v := reflect.ValueOf(pb) - if f, ok := transactionSetters[v.Type()]; ok { - f.Call([]reflect.Value{v, reflect.ValueOf(t)}) - } -} - -var transactionKey = "used for *Transaction" - -func transactionFromContext(ctx context.Context) *transaction { - t, _ := ctx.Value(&transactionKey).(*transaction) - return t -} - -func withTransaction(ctx context.Context, t *transaction) context.Context { - return context.WithValue(ctx, &transactionKey, t) -} - -type transaction struct { - transaction pb.Transaction - finished bool -} - -var ErrConcurrentTransaction = errors.New("internal: concurrent transaction") - -func RunTransactionOnce(c context.Context, f func(context.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) { - if transactionFromContext(c) != nil { - return nil, errors.New("nested transactions are not supported") - } - - // Begin the transaction. - t := &transaction{} - req := &pb.BeginTransactionRequest{ - App: proto.String(FullyQualifiedAppID(c)), - } - if xg { - req.AllowMultipleEg = proto.Bool(true) - } - if previousTransaction != nil { - req.PreviousTransaction = previousTransaction - } - if readOnly { - req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum() - } else { - req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum() - } - if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil { - return nil, err - } - - // Call f, rolling back the transaction if f returns a non-nil error, or panics. - // The panic is not recovered. - defer func() { - if t.finished { - return - } - t.finished = true - // Ignore the error return value, since we are already returning a non-nil - // error (or we're panicking). - Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{}) - }() - if err := f(withTransaction(c, t)); err != nil { - return &t.transaction, err - } - t.finished = true - - // Commit the transaction. - res := &pb.CommitResponse{} - err := Call(c, "datastore_v3", "Commit", &t.transaction, res) - if ae, ok := err.(*APIError); ok { - /* TODO: restore this conditional - if appengine.IsDevAppServer() { - */ - // The Python Dev AppServer raises an ApplicationError with error code 2 (which is - // Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.". - if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." { - return &t.transaction, ErrConcurrentTransaction - } - if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) { - return &t.transaction, ErrConcurrentTransaction - } - } - return &t.transaction, err -} diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go deleted file mode 100644 index 5f727750..00000000 --- a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go +++ /dev/null @@ -1,527 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto - -package urlfetch - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type URLFetchServiceError_ErrorCode int32 - -const ( - URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0 - URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1 - URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2 - URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3 - URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4 - URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5 - URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6 - URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7 - URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8 - URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9 - URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10 - URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11 - URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12 -) - -var URLFetchServiceError_ErrorCode_name = map[int32]string{ - 0: "OK", - 1: "INVALID_URL", - 2: "FETCH_ERROR", - 3: "UNSPECIFIED_ERROR", - 4: "RESPONSE_TOO_LARGE", - 5: "DEADLINE_EXCEEDED", - 6: "SSL_CERTIFICATE_ERROR", - 7: "DNS_ERROR", - 8: "CLOSED", - 9: "INTERNAL_TRANSIENT_ERROR", - 10: "TOO_MANY_REDIRECTS", - 11: "MALFORMED_REPLY", - 12: "CONNECTION_ERROR", -} -var URLFetchServiceError_ErrorCode_value = map[string]int32{ - "OK": 0, - "INVALID_URL": 1, - "FETCH_ERROR": 2, - "UNSPECIFIED_ERROR": 3, - "RESPONSE_TOO_LARGE": 4, - "DEADLINE_EXCEEDED": 5, - "SSL_CERTIFICATE_ERROR": 6, - "DNS_ERROR": 7, - "CLOSED": 8, - "INTERNAL_TRANSIENT_ERROR": 9, - "TOO_MANY_REDIRECTS": 10, - "MALFORMED_REPLY": 11, - "CONNECTION_ERROR": 12, -} - -func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode { - p := new(URLFetchServiceError_ErrorCode) - *p = x - return p -} -func (x URLFetchServiceError_ErrorCode) String() string { - return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x)) -} -func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode") - if err != nil { - return err - } - *x = URLFetchServiceError_ErrorCode(value) - return nil -} -func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0} -} - -type URLFetchRequest_RequestMethod int32 - -const ( - URLFetchRequest_GET URLFetchRequest_RequestMethod = 1 - URLFetchRequest_POST URLFetchRequest_RequestMethod = 2 - URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3 - URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4 - URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5 - URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6 -) - -var URLFetchRequest_RequestMethod_name = map[int32]string{ - 1: "GET", - 2: "POST", - 3: "HEAD", - 4: "PUT", - 5: "DELETE", - 6: "PATCH", -} -var URLFetchRequest_RequestMethod_value = map[string]int32{ - "GET": 1, - "POST": 2, - "HEAD": 3, - "PUT": 4, - "DELETE": 5, - "PATCH": 6, -} - -func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod { - p := new(URLFetchRequest_RequestMethod) - *p = x - return p -} -func (x URLFetchRequest_RequestMethod) String() string { - return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x)) -} -func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod") - if err != nil { - return err - } - *x = URLFetchRequest_RequestMethod(value) - return nil -} -func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} -} - -type URLFetchServiceError struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} } -func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) } -func (*URLFetchServiceError) ProtoMessage() {} -func (*URLFetchServiceError) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0} -} -func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b) -} -func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic) -} -func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchServiceError.Merge(dst, src) -} -func (m *URLFetchServiceError) XXX_Size() int { - return xxx_messageInfo_URLFetchServiceError.Size(m) -} -func (m *URLFetchServiceError) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo - -type URLFetchRequest struct { - Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"` - Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"` - Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` - Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"` - FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"` - Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"` - MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} } -func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) } -func (*URLFetchRequest) ProtoMessage() {} -func (*URLFetchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1} -} -func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b) -} -func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic) -} -func (dst *URLFetchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchRequest.Merge(dst, src) -} -func (m *URLFetchRequest) XXX_Size() int { - return xxx_messageInfo_URLFetchRequest.Size(m) -} -func (m *URLFetchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo - -const Default_URLFetchRequest_FollowRedirects bool = true -const Default_URLFetchRequest_MustValidateServerCertificate bool = true - -func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod { - if m != nil && m.Method != nil { - return *m.Method - } - return URLFetchRequest_GET -} - -func (m *URLFetchRequest) GetUrl() string { - if m != nil && m.Url != nil { - return *m.Url - } - return "" -} - -func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header { - if m != nil { - return m.Header - } - return nil -} - -func (m *URLFetchRequest) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (m *URLFetchRequest) GetFollowRedirects() bool { - if m != nil && m.FollowRedirects != nil { - return *m.FollowRedirects - } - return Default_URLFetchRequest_FollowRedirects -} - -func (m *URLFetchRequest) GetDeadline() float64 { - if m != nil && m.Deadline != nil { - return *m.Deadline - } - return 0 -} - -func (m *URLFetchRequest) GetMustValidateServerCertificate() bool { - if m != nil && m.MustValidateServerCertificate != nil { - return *m.MustValidateServerCertificate - } - return Default_URLFetchRequest_MustValidateServerCertificate -} - -type URLFetchRequest_Header struct { - Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} } -func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) } -func (*URLFetchRequest_Header) ProtoMessage() {} -func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} -} -func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b) -} -func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic) -} -func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src) -} -func (m *URLFetchRequest_Header) XXX_Size() int { - return xxx_messageInfo_URLFetchRequest_Header.Size(m) -} -func (m *URLFetchRequest_Header) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo - -func (m *URLFetchRequest_Header) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *URLFetchRequest_Header) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -type URLFetchResponse struct { - Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"` - StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"` - Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` - ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"` - ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"` - ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"` - FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"` - ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"` - ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"` - ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} } -func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) } -func (*URLFetchResponse) ProtoMessage() {} -func (*URLFetchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2} -} -func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b) -} -func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic) -} -func (dst *URLFetchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchResponse.Merge(dst, src) -} -func (m *URLFetchResponse) XXX_Size() int { - return xxx_messageInfo_URLFetchResponse.Size(m) -} -func (m *URLFetchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo - -const Default_URLFetchResponse_ContentWasTruncated bool = false -const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0 -const Default_URLFetchResponse_ApiBytesSent int64 = 0 -const Default_URLFetchResponse_ApiBytesReceived int64 = 0 - -func (m *URLFetchResponse) GetContent() []byte { - if m != nil { - return m.Content - } - return nil -} - -func (m *URLFetchResponse) GetStatusCode() int32 { - if m != nil && m.StatusCode != nil { - return *m.StatusCode - } - return 0 -} - -func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header { - if m != nil { - return m.Header - } - return nil -} - -func (m *URLFetchResponse) GetContentWasTruncated() bool { - if m != nil && m.ContentWasTruncated != nil { - return *m.ContentWasTruncated - } - return Default_URLFetchResponse_ContentWasTruncated -} - -func (m *URLFetchResponse) GetExternalBytesSent() int64 { - if m != nil && m.ExternalBytesSent != nil { - return *m.ExternalBytesSent - } - return 0 -} - -func (m *URLFetchResponse) GetExternalBytesReceived() int64 { - if m != nil && m.ExternalBytesReceived != nil { - return *m.ExternalBytesReceived - } - return 0 -} - -func (m *URLFetchResponse) GetFinalUrl() string { - if m != nil && m.FinalUrl != nil { - return *m.FinalUrl - } - return "" -} - -func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 { - if m != nil && m.ApiCpuMilliseconds != nil { - return *m.ApiCpuMilliseconds - } - return Default_URLFetchResponse_ApiCpuMilliseconds -} - -func (m *URLFetchResponse) GetApiBytesSent() int64 { - if m != nil && m.ApiBytesSent != nil { - return *m.ApiBytesSent - } - return Default_URLFetchResponse_ApiBytesSent -} - -func (m *URLFetchResponse) GetApiBytesReceived() int64 { - if m != nil && m.ApiBytesReceived != nil { - return *m.ApiBytesReceived - } - return Default_URLFetchResponse_ApiBytesReceived -} - -type URLFetchResponse_Header struct { - Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} } -func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) } -func (*URLFetchResponse_Header) ProtoMessage() {} -func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0} -} -func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b) -} -func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic) -} -func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src) -} -func (m *URLFetchResponse_Header) XXX_Size() int { - return xxx_messageInfo_URLFetchResponse_Header.Size(m) -} -func (m *URLFetchResponse_Header) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo - -func (m *URLFetchResponse_Header) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *URLFetchResponse_Header) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -func init() { - proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError") - proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest") - proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header") - proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse") - proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced) -} - -var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{ - // 770 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54, - 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29, - 0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e, - 0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d, - 0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b, - 0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27, - 0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0xa2, 0x62, 0x99, 0x15, 0x74, 0x9e, 0x15, 0x92, - 0xaa, 0x22, 0xc9, 0xcf, 0xd7, 0x55, 0x7e, 0x4b, 0x72, 0x71, 0xb7, 0x0f, 0xe2, 0x9a, 0xaa, 0xb7, - 0xd9, 0x82, 0xc6, 0xab, 0xaa, 0x94, 0x25, 0xf6, 0xf7, 0x67, 0x86, 0x7f, 0xeb, 0x70, 0x3a, 0x17, - 0xde, 0x44, 0xb1, 0xc2, 0x2d, 0x89, 0x57, 0x55, 0x59, 0x0d, 0xff, 0xd2, 0xa1, 0xbf, 0x89, 0xec, - 0x32, 0x25, 0xec, 0x80, 0x1e, 0x5c, 0xb3, 0x4f, 0xf0, 0x04, 0x8e, 0x5c, 0xff, 0xc6, 0xf2, 0x5c, - 0x27, 0x9e, 0x0b, 0x8f, 0x69, 0x0a, 0x98, 0xf0, 0xc8, 0xbe, 0x8a, 0xb9, 0x10, 0x81, 0x60, 0x3a, - 0x9e, 0xc1, 0xd3, 0xb9, 0x1f, 0xce, 0xb8, 0xed, 0x4e, 0x5c, 0xee, 0x34, 0xb0, 0x81, 0x9f, 0x01, - 0x0a, 0x1e, 0xce, 0x02, 0x3f, 0xe4, 0x71, 0x14, 0x04, 0xb1, 0x67, 0x89, 0xd7, 0x9c, 0xb5, 0x14, - 0xdd, 0xe1, 0x96, 0xe3, 0xb9, 0x3e, 0x8f, 0xf9, 0xaf, 0x36, 0xe7, 0x0e, 0x77, 0x58, 0x1b, 0x3f, - 0x87, 0xb3, 0x30, 0xf4, 0x62, 0x9b, 0x8b, 0xc8, 0x9d, 0xb8, 0xb6, 0x15, 0xf1, 0xa6, 0x53, 0x07, - 0x9f, 0x40, 0xdf, 0xf1, 0xc3, 0x26, 0xed, 0x22, 0x40, 0xc7, 0xf6, 0x82, 0x90, 0x3b, 0xac, 0x87, - 0x2f, 0xc0, 0x74, 0xfd, 0x88, 0x0b, 0xdf, 0xf2, 0xe2, 0x48, 0x58, 0x7e, 0xe8, 0x72, 0x3f, 0x6a, - 0x98, 0x7d, 0x35, 0x82, 0xba, 0x79, 0x6a, 0xf9, 0x6f, 0x62, 0xc1, 0x1d, 0x57, 0x70, 0x3b, 0x0a, - 0x19, 0xe0, 0x33, 0x38, 0x99, 0x5a, 0xde, 0x24, 0x10, 0x53, 0xee, 0xc4, 0x82, 0xcf, 0xbc, 0x37, - 0xec, 0x08, 0x4f, 0x81, 0xd9, 0x81, 0xef, 0x73, 0x3b, 0x72, 0x03, 0xbf, 0x69, 0x71, 0x3c, 0xfc, - 0xc7, 0x80, 0x93, 0x9d, 0x5a, 0x82, 0x7e, 0x5f, 0x53, 0x2d, 0xf1, 0x27, 0xe8, 0x4c, 0x49, 0xde, - 0x95, 0xa9, 0xa9, 0x0d, 0xf4, 0xd1, 0xa7, 0xaf, 0x46, 0xe3, 0xbd, 0xba, 0xe3, 0x47, 0xdc, 0x71, - 0xf3, 0xbb, 0xe5, 0x8b, 0xe6, 0x1c, 0x32, 0x30, 0xe6, 0x55, 0x6e, 0xea, 0x03, 0x7d, 0xd4, 0x17, - 0x2a, 0xc4, 0x1f, 0xa1, 0x73, 0x47, 0x49, 0x4a, 0x95, 0x69, 0x0c, 0x8c, 0x11, 0xbc, 0xfa, 0xea, - 0x23, 0x3d, 0xaf, 0x36, 0x44, 0xd1, 0x1c, 0xc0, 0x17, 0xd0, 0x9d, 0x25, 0xf7, 0x79, 0x99, 0xa4, - 0x66, 0x67, 0xa0, 0x8d, 0x8e, 0x2f, 0xf5, 0x9e, 0x26, 0x76, 0x10, 0x8e, 0xe1, 0x64, 0x52, 0xe6, - 0x79, 0xf9, 0x87, 0xa0, 0x34, 0xab, 0x68, 0x21, 0x6b, 0xb3, 0x3b, 0xd0, 0x46, 0xbd, 0x8b, 0x96, - 0xac, 0xd6, 0x24, 0x1e, 0x17, 0xf1, 0x39, 0xf4, 0x1c, 0x4a, 0xd2, 0x3c, 0x2b, 0xc8, 0xec, 0x0d, - 0xb4, 0x91, 0x26, 0xf6, 0x39, 0xfe, 0x0c, 0x5f, 0x4c, 0xd7, 0xb5, 0xbc, 0x49, 0xf2, 0x2c, 0x4d, - 0x24, 0xa9, 0xed, 0xa1, 0xca, 0xa6, 0x4a, 0x66, 0xb7, 0xd9, 0x22, 0x91, 0x64, 0xf6, 0xdf, 0xeb, - 0xfc, 0x71, 0xea, 0xf3, 0x97, 0xd0, 0xd9, 0xfe, 0x0f, 0x25, 0xc6, 0x35, 0xdd, 0x9b, 0xad, 0xad, - 0x18, 0xd7, 0x74, 0x8f, 0xa7, 0xd0, 0xbe, 0x49, 0xf2, 0x35, 0x99, 0xed, 0x0d, 0xb6, 0x4d, 0x86, - 0x1e, 0x3c, 0x79, 0xa0, 0x26, 0x76, 0xc1, 0x78, 0xcd, 0x23, 0xa6, 0x61, 0x0f, 0x5a, 0xb3, 0x20, - 0x8c, 0x98, 0xae, 0xa2, 0x2b, 0x6e, 0x39, 0xcc, 0x50, 0xc5, 0xd9, 0x3c, 0x62, 0x2d, 0xb5, 0x2e, - 0x0e, 0xf7, 0x78, 0xc4, 0x59, 0x1b, 0xfb, 0xd0, 0x9e, 0x59, 0x91, 0x7d, 0xc5, 0x3a, 0xc3, 0x7f, - 0x0d, 0x60, 0xef, 0x84, 0xad, 0x57, 0x65, 0x51, 0x13, 0x9a, 0xd0, 0xb5, 0xcb, 0x42, 0x52, 0x21, - 0x4d, 0x4d, 0x49, 0x29, 0x76, 0x29, 0x7e, 0x09, 0x10, 0xca, 0x44, 0xae, 0x6b, 0xf5, 0x71, 0x6c, - 0x8c, 0x6b, 0x8b, 0xf7, 0x10, 0xbc, 0x78, 0xe4, 0xdf, 0xf0, 0xa0, 0x7f, 0xdb, 0x6b, 0x1e, 0x1b, - 0xf8, 0x03, 0x3c, 0x6b, 0xae, 0xf9, 0x25, 0xa9, 0xa3, 0x6a, 0x5d, 0x28, 0x81, 0xb6, 0x66, 0xf6, - 0x2e, 0xda, 0xb7, 0x49, 0x5e, 0x93, 0x38, 0xc4, 0xc0, 0x6f, 0xe0, 0x29, 0xff, 0x73, 0xfb, 0x02, - 0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b, - 0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9, - 0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e, - 0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97, - 0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3, - 0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8, - 0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05, - 0x00, 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto b/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto deleted file mode 100644 index f695edf6..00000000 --- a/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto2"; -option go_package = "urlfetch"; - -package appengine; - -message URLFetchServiceError { - enum ErrorCode { - OK = 0; - INVALID_URL = 1; - FETCH_ERROR = 2; - UNSPECIFIED_ERROR = 3; - RESPONSE_TOO_LARGE = 4; - DEADLINE_EXCEEDED = 5; - SSL_CERTIFICATE_ERROR = 6; - DNS_ERROR = 7; - CLOSED = 8; - INTERNAL_TRANSIENT_ERROR = 9; - TOO_MANY_REDIRECTS = 10; - MALFORMED_REPLY = 11; - CONNECTION_ERROR = 12; - } -} - -message URLFetchRequest { - enum RequestMethod { - GET = 1; - POST = 2; - HEAD = 3; - PUT = 4; - DELETE = 5; - PATCH = 6; - } - required RequestMethod Method = 1; - required string Url = 2; - repeated group Header = 3 { - required string Key = 4; - required string Value = 5; - } - optional bytes Payload = 6 [ctype=CORD]; - - optional bool FollowRedirects = 7 [default=true]; - - optional double Deadline = 8; - - optional bool MustValidateServerCertificate = 9 [default=true]; -} - -message URLFetchResponse { - optional bytes Content = 1; - required int32 StatusCode = 2; - repeated group Header = 3 { - required string Key = 4; - required string Value = 5; - } - optional bool ContentWasTruncated = 6 [default=false]; - optional int64 ExternalBytesSent = 7; - optional int64 ExternalBytesReceived = 8; - - optional string FinalUrl = 9; - - optional int64 ApiCpuMilliseconds = 10 [default=0]; - optional int64 ApiBytesSent = 11 [default=0]; - optional int64 ApiBytesReceived = 12 [default=0]; -} diff --git a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go b/vendor/google.golang.org/appengine/urlfetch/urlfetch.go deleted file mode 100644 index 6c0d7241..00000000 --- a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// Package urlfetch provides an http.RoundTripper implementation -// for fetching URLs via App Engine's urlfetch service. -package urlfetch // import "google.golang.org/appengine/urlfetch" - -import ( - "context" - "errors" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "strconv" - "strings" - "time" - - "github.com/golang/protobuf/proto" - - "google.golang.org/appengine/internal" - pb "google.golang.org/appengine/internal/urlfetch" -) - -// Transport is an implementation of http.RoundTripper for -// App Engine. Users should generally create an http.Client using -// this transport and use the Client rather than using this transport -// directly. -type Transport struct { - Context context.Context - - // Controls whether the application checks the validity of SSL certificates - // over HTTPS connections. A value of false (the default) instructs the - // application to send a request to the server only if the certificate is - // valid and signed by a trusted certificate authority (CA), and also - // includes a hostname that matches the certificate. A value of true - // instructs the application to perform no certificate validation. - AllowInvalidServerCertificate bool -} - -// Verify statically that *Transport implements http.RoundTripper. -var _ http.RoundTripper = (*Transport)(nil) - -// Client returns an *http.Client using a default urlfetch Transport. This -// client will check the validity of SSL certificates. -// -// Any deadline of the provided context will be used for requests through this client. -// If the client does not have a deadline, then an App Engine default of 60 second is used. -func Client(ctx context.Context) *http.Client { - return &http.Client{ - Transport: &Transport{ - Context: ctx, - }, - } -} - -type bodyReader struct { - content []byte - truncated bool - closed bool -} - -// ErrTruncatedBody is the error returned after the final Read() from a -// response's Body if the body has been truncated by App Engine's proxy. -var ErrTruncatedBody = errors.New("urlfetch: truncated body") - -func statusCodeToText(code int) string { - if t := http.StatusText(code); t != "" { - return t - } - return strconv.Itoa(code) -} - -func (br *bodyReader) Read(p []byte) (n int, err error) { - if br.closed { - if br.truncated { - return 0, ErrTruncatedBody - } - return 0, io.EOF - } - n = copy(p, br.content) - if n > 0 { - br.content = br.content[n:] - return - } - if br.truncated { - br.closed = true - return 0, ErrTruncatedBody - } - return 0, io.EOF -} - -func (br *bodyReader) Close() error { - br.closed = true - br.content = nil - return nil -} - -// A map of the URL Fetch-accepted methods that take a request body. -var methodAcceptsRequestBody = map[string]bool{ - "POST": true, - "PUT": true, - "PATCH": true, -} - -// urlString returns a valid string given a URL. This function is necessary because -// the String method of URL doesn't correctly handle URLs with non-empty Opaque values. -// See http://code.google.com/p/go/issues/detail?id=4860. -func urlString(u *url.URL) string { - if u.Opaque == "" || strings.HasPrefix(u.Opaque, "//") { - return u.String() - } - aux := *u - aux.Opaque = "//" + aux.Host + aux.Opaque - return aux.String() -} - -// RoundTrip issues a single HTTP request and returns its response. Per the -// http.RoundTripper interface, RoundTrip only returns an error if there -// was an unsupported request or the URL Fetch proxy fails. -// Note that HTTP response codes such as 5xx, 403, 404, etc are not -// errors as far as the transport is concerned and will be returned -// with err set to nil. -func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error) { - methNum, ok := pb.URLFetchRequest_RequestMethod_value[req.Method] - if !ok { - return nil, fmt.Errorf("urlfetch: unsupported HTTP method %q", req.Method) - } - - method := pb.URLFetchRequest_RequestMethod(methNum) - - freq := &pb.URLFetchRequest{ - Method: &method, - Url: proto.String(urlString(req.URL)), - FollowRedirects: proto.Bool(false), // http.Client's responsibility - MustValidateServerCertificate: proto.Bool(!t.AllowInvalidServerCertificate), - } - if deadline, ok := t.Context.Deadline(); ok { - freq.Deadline = proto.Float64(deadline.Sub(time.Now()).Seconds()) - } - - for k, vals := range req.Header { - for _, val := range vals { - freq.Header = append(freq.Header, &pb.URLFetchRequest_Header{ - Key: proto.String(k), - Value: proto.String(val), - }) - } - } - if methodAcceptsRequestBody[req.Method] && req.Body != nil { - // Avoid a []byte copy if req.Body has a Bytes method. - switch b := req.Body.(type) { - case interface { - Bytes() []byte - }: - freq.Payload = b.Bytes() - default: - freq.Payload, err = ioutil.ReadAll(req.Body) - if err != nil { - return nil, err - } - } - } - - fres := &pb.URLFetchResponse{} - if err := internal.Call(t.Context, "urlfetch", "Fetch", freq, fres); err != nil { - return nil, err - } - - res = &http.Response{} - res.StatusCode = int(*fres.StatusCode) - res.Status = fmt.Sprintf("%d %s", res.StatusCode, statusCodeToText(res.StatusCode)) - res.Header = make(http.Header) - res.Request = req - - // Faked: - res.ProtoMajor = 1 - res.ProtoMinor = 1 - res.Proto = "HTTP/1.1" - res.Close = true - - for _, h := range fres.Header { - hkey := http.CanonicalHeaderKey(*h.Key) - hval := *h.Value - if hkey == "Content-Length" { - // Will get filled in below for all but HEAD requests. - if req.Method == "HEAD" { - res.ContentLength, _ = strconv.ParseInt(hval, 10, 64) - } - continue - } - res.Header.Add(hkey, hval) - } - - if req.Method != "HEAD" { - res.ContentLength = int64(len(fres.Content)) - } - - truncated := fres.GetContentWasTruncated() - res.Body = &bodyReader{content: fres.Content, truncated: truncated} - return -} - -func init() { - internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name) - internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED)) -} diff --git a/vendor/google.golang.org/protobuf/LICENSE b/vendor/google.golang.org/protobuf/LICENSE deleted file mode 100644 index 49ea0f92..00000000 --- a/vendor/google.golang.org/protobuf/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2018 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -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 -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/google.golang.org/protobuf/PATENTS b/vendor/google.golang.org/protobuf/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/google.golang.org/protobuf/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google 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, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go deleted file mode 100644 index a45f112b..00000000 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ /dev/null @@ -1,772 +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. - -package prototext - -import ( - "fmt" - "unicode/utf8" - - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/encoding/text" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/internal/set" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// Unmarshal reads the given []byte into the given [proto.Message]. -// The provided message must be mutable (e.g., a non-nil pointer to a message). -func Unmarshal(b []byte, m proto.Message) error { - return UnmarshalOptions{}.Unmarshal(b, m) -} - -// UnmarshalOptions is a configurable textproto format unmarshaler. -type UnmarshalOptions struct { - pragma.NoUnkeyedLiterals - - // AllowPartial accepts input for messages that will result in missing - // required fields. If AllowPartial is false (the default), Unmarshal will - // return error if there are any missing required fields. - AllowPartial bool - - // DiscardUnknown specifies whether to ignore unknown fields when parsing. - // An unknown field is any field whose field name or field number does not - // resolve to any known or extension field in the message. - // By default, unmarshal rejects unknown fields as an error. - DiscardUnknown bool - - // Resolver is used for looking up types when unmarshaling - // google.protobuf.Any messages or extension fields. - // If nil, this defaults to using protoregistry.GlobalTypes. - Resolver interface { - protoregistry.MessageTypeResolver - protoregistry.ExtensionTypeResolver - } -} - -// Unmarshal reads the given []byte and populates the given [proto.Message] -// using options in the UnmarshalOptions object. -// The provided message must be mutable (e.g., a non-nil pointer to a message). -func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error { - return o.unmarshal(b, m) -} - -// unmarshal is a centralized function that all unmarshal operations go through. -// For profiling purposes, avoid changing the name of this function or -// introducing other code paths for unmarshal that do not go through this. -func (o UnmarshalOptions) unmarshal(b []byte, m proto.Message) error { - proto.Reset(m) - - if o.Resolver == nil { - o.Resolver = protoregistry.GlobalTypes - } - - dec := decoder{text.NewDecoder(b), o} - if err := dec.unmarshalMessage(m.ProtoReflect(), false); err != nil { - return err - } - if o.AllowPartial { - return nil - } - return proto.CheckInitialized(m) -} - -type decoder struct { - *text.Decoder - opts UnmarshalOptions -} - -// newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { - line, column := d.Position(pos) - head := fmt.Sprintf("(line %d:%d): ", line, column) - return errors.New(head+f, x...) -} - -// unexpectedTokenError returns a syntax error for the given unexpected token. -func (d decoder) unexpectedTokenError(tok text.Token) error { - return d.syntaxError(tok.Pos(), "unexpected token: %s", tok.RawString()) -} - -// syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { - line, column := d.Position(pos) - head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) - return errors.New(head+f, x...) -} - -// unmarshalMessage unmarshals into the given protoreflect.Message. -func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) error { - messageDesc := m.Descriptor() - if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) { - return errors.New("no support for proto1 MessageSets") - } - - if messageDesc.FullName() == genid.Any_message_fullname { - return d.unmarshalAny(m, checkDelims) - } - - if checkDelims { - tok, err := d.Read() - if err != nil { - return err - } - - if tok.Kind() != text.MessageOpen { - return d.unexpectedTokenError(tok) - } - } - - var seenNums set.Ints - var seenOneofs set.Ints - fieldDescs := messageDesc.Fields() - - for { - // Read field name. - tok, err := d.Read() - if err != nil { - return err - } - switch typ := tok.Kind(); typ { - case text.Name: - // Continue below. - case text.EOF: - if checkDelims { - return text.ErrUnexpectedEOF - } - return nil - default: - if checkDelims && typ == text.MessageClose { - return nil - } - return d.unexpectedTokenError(tok) - } - - // Resolve the field descriptor. - var name protoreflect.Name - var fd protoreflect.FieldDescriptor - var xt protoreflect.ExtensionType - var xtErr error - var isFieldNumberName bool - - switch tok.NameKind() { - case text.IdentName: - name = protoreflect.Name(tok.IdentName()) - fd = fieldDescs.ByTextName(string(name)) - - case text.TypeName: - // Handle extensions only. This code path is not for Any. - xt, xtErr = d.opts.Resolver.FindExtensionByName(protoreflect.FullName(tok.TypeName())) - - case text.FieldNumber: - isFieldNumberName = true - num := protoreflect.FieldNumber(tok.FieldNumber()) - if !num.IsValid() { - return d.newError(tok.Pos(), "invalid field number: %d", num) - } - fd = fieldDescs.ByNumber(num) - if fd == nil { - xt, xtErr = d.opts.Resolver.FindExtensionByNumber(messageDesc.FullName(), num) - } - } - - if xt != nil { - fd = xt.TypeDescriptor() - if !messageDesc.ExtensionRanges().Has(fd.Number()) || fd.ContainingMessage().FullName() != messageDesc.FullName() { - return d.newError(tok.Pos(), "message %v cannot be extended by %v", messageDesc.FullName(), fd.FullName()) - } - } else if xtErr != nil && xtErr != protoregistry.NotFound { - return d.newError(tok.Pos(), "unable to resolve [%s]: %v", tok.RawString(), xtErr) - } - if flags.ProtoLegacy { - if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() { - fd = nil // reset since the weak reference is not linked in - } - } - - // Handle unknown fields. - if fd == nil { - if d.opts.DiscardUnknown || messageDesc.ReservedNames().Has(name) { - d.skipValue() - continue - } - return d.newError(tok.Pos(), "unknown field: %v", tok.RawString()) - } - - // Handle fields identified by field number. - if isFieldNumberName { - // TODO: Add an option to permit parsing field numbers. - // - // This requires careful thought as the MarshalOptions.EmitUnknown - // option allows formatting unknown fields as the field number and the - // best-effort textual representation of the field value. In that case, - // it may not be possible to unmarshal the value from a parser that does - // have information about the unknown field. - return d.newError(tok.Pos(), "cannot specify field by number: %v", tok.RawString()) - } - - switch { - case fd.IsList(): - kind := fd.Kind() - if kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() { - return d.syntaxError(tok.Pos(), "missing field separator :") - } - - list := m.Mutable(fd).List() - if err := d.unmarshalList(fd, list); err != nil { - return err - } - - case fd.IsMap(): - mmap := m.Mutable(fd).Map() - if err := d.unmarshalMap(fd, mmap); err != nil { - return err - } - - default: - kind := fd.Kind() - if kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() { - return d.syntaxError(tok.Pos(), "missing field separator :") - } - - // If field is a oneof, check if it has already been set. - if od := fd.ContainingOneof(); od != nil { - idx := uint64(od.Index()) - if seenOneofs.Has(idx) { - return d.newError(tok.Pos(), "error parsing %q, oneof %v is already set", tok.RawString(), od.FullName()) - } - seenOneofs.Set(idx) - } - - num := uint64(fd.Number()) - if seenNums.Has(num) { - return d.newError(tok.Pos(), "non-repeated field %q is repeated", tok.RawString()) - } - - if err := d.unmarshalSingular(fd, m); err != nil { - return err - } - seenNums.Set(num) - } - } - - return nil -} - -// unmarshalSingular unmarshals a non-repeated field value specified by the -// given FieldDescriptor. -func (d decoder) unmarshalSingular(fd protoreflect.FieldDescriptor, m protoreflect.Message) error { - var val protoreflect.Value - var err error - switch fd.Kind() { - case protoreflect.MessageKind, protoreflect.GroupKind: - val = m.NewField(fd) - err = d.unmarshalMessage(val.Message(), true) - default: - val, err = d.unmarshalScalar(fd) - } - if err == nil { - m.Set(fd, val) - } - return err -} - -// unmarshalScalar unmarshals a scalar/enum protoreflect.Value specified by the -// given FieldDescriptor. -func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { - tok, err := d.Read() - if err != nil { - return protoreflect.Value{}, err - } - - if tok.Kind() != text.Scalar { - return protoreflect.Value{}, d.unexpectedTokenError(tok) - } - - kind := fd.Kind() - switch kind { - case protoreflect.BoolKind: - if b, ok := tok.Bool(); ok { - return protoreflect.ValueOfBool(b), nil - } - - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - if n, ok := tok.Int32(); ok { - return protoreflect.ValueOfInt32(n), nil - } - - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - if n, ok := tok.Int64(); ok { - return protoreflect.ValueOfInt64(n), nil - } - - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - if n, ok := tok.Uint32(); ok { - return protoreflect.ValueOfUint32(n), nil - } - - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - if n, ok := tok.Uint64(); ok { - return protoreflect.ValueOfUint64(n), nil - } - - case protoreflect.FloatKind: - if n, ok := tok.Float32(); ok { - return protoreflect.ValueOfFloat32(n), nil - } - - case protoreflect.DoubleKind: - if n, ok := tok.Float64(); ok { - return protoreflect.ValueOfFloat64(n), nil - } - - case protoreflect.StringKind: - if s, ok := tok.String(); ok { - if strs.EnforceUTF8(fd) && !utf8.ValidString(s) { - return protoreflect.Value{}, d.newError(tok.Pos(), "contains invalid UTF-8") - } - return protoreflect.ValueOfString(s), nil - } - - case protoreflect.BytesKind: - if b, ok := tok.String(); ok { - return protoreflect.ValueOfBytes([]byte(b)), nil - } - - case protoreflect.EnumKind: - if lit, ok := tok.Enum(); ok { - // Lookup EnumNumber based on name. - if enumVal := fd.Enum().Values().ByName(protoreflect.Name(lit)); enumVal != nil { - return protoreflect.ValueOfEnum(enumVal.Number()), nil - } - } - if num, ok := tok.Int32(); ok { - return protoreflect.ValueOfEnum(protoreflect.EnumNumber(num)), nil - } - - default: - panic(fmt.Sprintf("invalid scalar kind %v", kind)) - } - - return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString()) -} - -// unmarshalList unmarshals into given protoreflect.List. A list value can -// either be in [] syntax or simply just a single scalar/message value. -func (d decoder) unmarshalList(fd protoreflect.FieldDescriptor, list protoreflect.List) error { - tok, err := d.Peek() - if err != nil { - return err - } - - switch fd.Kind() { - case protoreflect.MessageKind, protoreflect.GroupKind: - switch tok.Kind() { - case text.ListOpen: - d.Read() - for { - tok, err := d.Peek() - if err != nil { - return err - } - - switch tok.Kind() { - case text.ListClose: - d.Read() - return nil - case text.MessageOpen: - pval := list.NewElement() - if err := d.unmarshalMessage(pval.Message(), true); err != nil { - return err - } - list.Append(pval) - default: - return d.unexpectedTokenError(tok) - } - } - - case text.MessageOpen: - pval := list.NewElement() - if err := d.unmarshalMessage(pval.Message(), true); err != nil { - return err - } - list.Append(pval) - return nil - } - - default: - switch tok.Kind() { - case text.ListOpen: - d.Read() - for { - tok, err := d.Peek() - if err != nil { - return err - } - - switch tok.Kind() { - case text.ListClose: - d.Read() - return nil - case text.Scalar: - pval, err := d.unmarshalScalar(fd) - if err != nil { - return err - } - list.Append(pval) - default: - return d.unexpectedTokenError(tok) - } - } - - case text.Scalar: - pval, err := d.unmarshalScalar(fd) - if err != nil { - return err - } - list.Append(pval) - return nil - } - } - - return d.unexpectedTokenError(tok) -} - -// unmarshalMap unmarshals into given protoreflect.Map. A map value is a -// textproto message containing {key: , value: }. -func (d decoder) unmarshalMap(fd protoreflect.FieldDescriptor, mmap protoreflect.Map) error { - // Determine ahead whether map entry is a scalar type or a message type in - // order to call the appropriate unmarshalMapValue func inside - // unmarshalMapEntry. - var unmarshalMapValue func() (protoreflect.Value, error) - switch fd.MapValue().Kind() { - case protoreflect.MessageKind, protoreflect.GroupKind: - unmarshalMapValue = func() (protoreflect.Value, error) { - pval := mmap.NewValue() - if err := d.unmarshalMessage(pval.Message(), true); err != nil { - return protoreflect.Value{}, err - } - return pval, nil - } - default: - unmarshalMapValue = func() (protoreflect.Value, error) { - return d.unmarshalScalar(fd.MapValue()) - } - } - - tok, err := d.Read() - if err != nil { - return err - } - switch tok.Kind() { - case text.MessageOpen: - return d.unmarshalMapEntry(fd, mmap, unmarshalMapValue) - - case text.ListOpen: - for { - tok, err := d.Read() - if err != nil { - return err - } - switch tok.Kind() { - case text.ListClose: - return nil - case text.MessageOpen: - if err := d.unmarshalMapEntry(fd, mmap, unmarshalMapValue); err != nil { - return err - } - default: - return d.unexpectedTokenError(tok) - } - } - - default: - return d.unexpectedTokenError(tok) - } -} - -// unmarshalMap unmarshals into given protoreflect.Map. A map value is a -// textproto message containing {key: , value: }. -func (d decoder) unmarshalMapEntry(fd protoreflect.FieldDescriptor, mmap protoreflect.Map, unmarshalMapValue func() (protoreflect.Value, error)) error { - var key protoreflect.MapKey - var pval protoreflect.Value -Loop: - for { - // Read field name. - tok, err := d.Read() - if err != nil { - return err - } - switch tok.Kind() { - case text.Name: - if tok.NameKind() != text.IdentName { - if !d.opts.DiscardUnknown { - return d.newError(tok.Pos(), "unknown map entry field %q", tok.RawString()) - } - d.skipValue() - continue Loop - } - // Continue below. - case text.MessageClose: - break Loop - default: - return d.unexpectedTokenError(tok) - } - - switch name := protoreflect.Name(tok.IdentName()); name { - case genid.MapEntry_Key_field_name: - if !tok.HasSeparator() { - return d.syntaxError(tok.Pos(), "missing field separator :") - } - if key.IsValid() { - return d.newError(tok.Pos(), "map entry %q cannot be repeated", name) - } - val, err := d.unmarshalScalar(fd.MapKey()) - if err != nil { - return err - } - key = val.MapKey() - - case genid.MapEntry_Value_field_name: - if kind := fd.MapValue().Kind(); (kind != protoreflect.MessageKind) && (kind != protoreflect.GroupKind) { - if !tok.HasSeparator() { - return d.syntaxError(tok.Pos(), "missing field separator :") - } - } - if pval.IsValid() { - return d.newError(tok.Pos(), "map entry %q cannot be repeated", name) - } - pval, err = unmarshalMapValue() - if err != nil { - return err - } - - default: - if !d.opts.DiscardUnknown { - return d.newError(tok.Pos(), "unknown map entry field %q", name) - } - d.skipValue() - } - } - - if !key.IsValid() { - key = fd.MapKey().Default().MapKey() - } - if !pval.IsValid() { - switch fd.MapValue().Kind() { - case protoreflect.MessageKind, protoreflect.GroupKind: - // If value field is not set for message/group types, construct an - // empty one as default. - pval = mmap.NewValue() - default: - pval = fd.MapValue().Default() - } - } - mmap.Set(key, pval) - return nil -} - -// unmarshalAny unmarshals an Any textproto. It can either be in expanded form -// or non-expanded form. -func (d decoder) unmarshalAny(m protoreflect.Message, checkDelims bool) error { - var typeURL string - var bValue []byte - var seenTypeUrl bool - var seenValue bool - var isExpanded bool - - if checkDelims { - tok, err := d.Read() - if err != nil { - return err - } - - if tok.Kind() != text.MessageOpen { - return d.unexpectedTokenError(tok) - } - } - -Loop: - for { - // Read field name. Can only have 3 possible field names, i.e. type_url, - // value and type URL name inside []. - tok, err := d.Read() - if err != nil { - return err - } - if typ := tok.Kind(); typ != text.Name { - if checkDelims { - if typ == text.MessageClose { - break Loop - } - } else if typ == text.EOF { - break Loop - } - return d.unexpectedTokenError(tok) - } - - switch tok.NameKind() { - case text.IdentName: - // Both type_url and value fields require field separator :. - if !tok.HasSeparator() { - return d.syntaxError(tok.Pos(), "missing field separator :") - } - - switch name := protoreflect.Name(tok.IdentName()); name { - case genid.Any_TypeUrl_field_name: - if seenTypeUrl { - return d.newError(tok.Pos(), "duplicate %v field", genid.Any_TypeUrl_field_fullname) - } - if isExpanded { - return d.newError(tok.Pos(), "conflict with [%s] field", typeURL) - } - tok, err := d.Read() - if err != nil { - return err - } - var ok bool - typeURL, ok = tok.String() - if !ok { - return d.newError(tok.Pos(), "invalid %v field value: %v", genid.Any_TypeUrl_field_fullname, tok.RawString()) - } - seenTypeUrl = true - - case genid.Any_Value_field_name: - if seenValue { - return d.newError(tok.Pos(), "duplicate %v field", genid.Any_Value_field_fullname) - } - if isExpanded { - return d.newError(tok.Pos(), "conflict with [%s] field", typeURL) - } - tok, err := d.Read() - if err != nil { - return err - } - s, ok := tok.String() - if !ok { - return d.newError(tok.Pos(), "invalid %v field value: %v", genid.Any_Value_field_fullname, tok.RawString()) - } - bValue = []byte(s) - seenValue = true - - default: - if !d.opts.DiscardUnknown { - return d.newError(tok.Pos(), "invalid field name %q in %v message", tok.RawString(), genid.Any_message_fullname) - } - } - - case text.TypeName: - if isExpanded { - return d.newError(tok.Pos(), "cannot have more than one type") - } - if seenTypeUrl { - return d.newError(tok.Pos(), "conflict with type_url field") - } - typeURL = tok.TypeName() - var err error - bValue, err = d.unmarshalExpandedAny(typeURL, tok.Pos()) - if err != nil { - return err - } - isExpanded = true - - default: - if !d.opts.DiscardUnknown { - return d.newError(tok.Pos(), "invalid field name %q in %v message", tok.RawString(), genid.Any_message_fullname) - } - } - } - - fds := m.Descriptor().Fields() - if len(typeURL) > 0 { - m.Set(fds.ByNumber(genid.Any_TypeUrl_field_number), protoreflect.ValueOfString(typeURL)) - } - if len(bValue) > 0 { - m.Set(fds.ByNumber(genid.Any_Value_field_number), protoreflect.ValueOfBytes(bValue)) - } - return nil -} - -func (d decoder) unmarshalExpandedAny(typeURL string, pos int) ([]byte, error) { - mt, err := d.opts.Resolver.FindMessageByURL(typeURL) - if err != nil { - return nil, d.newError(pos, "unable to resolve message [%v]: %v", typeURL, err) - } - // Create new message for the embedded message type and unmarshal the value - // field into it. - m := mt.New() - if err := d.unmarshalMessage(m, true); err != nil { - return nil, err - } - // Serialize the embedded message and return the resulting bytes. - b, err := proto.MarshalOptions{ - AllowPartial: true, // Never check required fields inside an Any. - Deterministic: true, - }.Marshal(m.Interface()) - if err != nil { - return nil, d.newError(pos, "error in marshaling message into Any.value: %v", err) - } - return b, nil -} - -// skipValue makes the decoder parse a field value in order to advance the read -// to the next field. It relies on Read returning an error if the types are not -// in valid sequence. -func (d decoder) skipValue() error { - tok, err := d.Read() - if err != nil { - return err - } - // Only need to continue reading for messages and lists. - switch tok.Kind() { - case text.MessageOpen: - return d.skipMessageValue() - - case text.ListOpen: - for { - tok, err := d.Read() - if err != nil { - return err - } - switch tok.Kind() { - case text.ListClose: - return nil - case text.MessageOpen: - if err := d.skipMessageValue(); err != nil { - return err - } - default: - // Skip items. This will not validate whether skipped values are - // of the same type or not, same behavior as C++ - // TextFormat::Parser::AllowUnknownField(true) version 3.8.0. - } - } - } - return nil -} - -// skipMessageValue makes the decoder parse and skip over all fields in a -// message. It assumes that the previous read type is MessageOpen. -func (d decoder) skipMessageValue() error { - for { - tok, err := d.Read() - if err != nil { - return err - } - switch tok.Kind() { - case text.MessageClose: - return nil - case text.Name: - if err := d.skipValue(); err != nil { - return err - } - } - } -} diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/doc.go b/vendor/google.golang.org/protobuf/encoding/prototext/doc.go deleted file mode 100644 index 162b4f98..00000000 --- a/vendor/google.golang.org/protobuf/encoding/prototext/doc.go +++ /dev/null @@ -1,7 +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 prototext marshals and unmarshals protocol buffer messages as the -// textproto format. -package prototext diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go deleted file mode 100644 index 95967e81..00000000 --- a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +++ /dev/null @@ -1,376 +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. - -package prototext - -import ( - "fmt" - "strconv" - "unicode/utf8" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/encoding/text" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/order" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -const defaultIndent = " " - -// Format formats the message as a multiline string. -// This function is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. -func Format(m proto.Message) string { - return MarshalOptions{Multiline: true}.Format(m) -} - -// Marshal writes the given [proto.Message] in textproto format using default -// options. Do not depend on the output being stable. It may change over time -// across different versions of the program. -func Marshal(m proto.Message) ([]byte, error) { - return MarshalOptions{}.Marshal(m) -} - -// MarshalOptions is a configurable text format marshaler. -type MarshalOptions struct { - pragma.NoUnkeyedLiterals - - // Multiline specifies whether the marshaler should format the output in - // indented-form with every textual element on a new line. - // If Indent is an empty string, then an arbitrary indent is chosen. - Multiline bool - - // Indent specifies the set of indentation characters to use in a multiline - // formatted output such that every entry is preceded by Indent and - // terminated by a newline. If non-empty, then Multiline is treated as true. - // Indent can only be composed of space or tab characters. - Indent string - - // EmitASCII specifies whether to format strings and bytes as ASCII only - // as opposed to using UTF-8 encoding when possible. - EmitASCII bool - - // allowInvalidUTF8 specifies whether to permit the encoding of strings - // with invalid UTF-8. This is unexported as it is intended to only - // be specified by the Format method. - allowInvalidUTF8 bool - - // AllowPartial allows messages that have missing required fields to marshal - // without returning an error. If AllowPartial is false (the default), - // Marshal will return error if there are any missing required fields. - AllowPartial bool - - // EmitUnknown specifies whether to emit unknown fields in the output. - // If specified, the unmarshaler may be unable to parse the output. - // The default is to exclude unknown fields. - EmitUnknown bool - - // Resolver is used for looking up types when expanding google.protobuf.Any - // messages. If nil, this defaults to using protoregistry.GlobalTypes. - Resolver interface { - protoregistry.ExtensionTypeResolver - protoregistry.MessageTypeResolver - } -} - -// Format formats the message as a string. -// This method is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. -func (o MarshalOptions) Format(m proto.Message) string { - if m == nil || !m.ProtoReflect().IsValid() { - return "" // invalid syntax, but okay since this is for debugging - } - o.allowInvalidUTF8 = true - o.AllowPartial = true - o.EmitUnknown = true - b, _ := o.Marshal(m) - return string(b) -} - -// Marshal writes the given [proto.Message] in textproto format using options in -// MarshalOptions object. Do not depend on the output being stable. It may -// change over time across different versions of the program. -func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) { - return o.marshal(nil, m) -} - -// MarshalAppend appends the textproto format encoding of m to b, -// returning the result. -func (o MarshalOptions) MarshalAppend(b []byte, m proto.Message) ([]byte, error) { - return o.marshal(b, m) -} - -// marshal is a centralized function that all marshal operations go through. -// For profiling purposes, avoid changing the name of this function or -// introducing other code paths for marshal that do not go through this. -func (o MarshalOptions) marshal(b []byte, m proto.Message) ([]byte, error) { - var delims = [2]byte{'{', '}'} - - if o.Multiline && o.Indent == "" { - o.Indent = defaultIndent - } - if o.Resolver == nil { - o.Resolver = protoregistry.GlobalTypes - } - - internalEnc, err := text.NewEncoder(b, o.Indent, delims, o.EmitASCII) - if err != nil { - return nil, err - } - - // Treat nil message interface as an empty message, - // in which case there is nothing to output. - if m == nil { - return b, nil - } - - enc := encoder{internalEnc, o} - err = enc.marshalMessage(m.ProtoReflect(), false) - if err != nil { - return nil, err - } - out := enc.Bytes() - if len(o.Indent) > 0 && len(out) > 0 { - out = append(out, '\n') - } - if o.AllowPartial { - return out, nil - } - return out, proto.CheckInitialized(m) -} - -type encoder struct { - *text.Encoder - opts MarshalOptions -} - -// marshalMessage marshals the given protoreflect.Message. -func (e encoder) marshalMessage(m protoreflect.Message, inclDelims bool) error { - messageDesc := m.Descriptor() - if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) { - return errors.New("no support for proto1 MessageSets") - } - - if inclDelims { - e.StartMessage() - defer e.EndMessage() - } - - // Handle Any expansion. - if messageDesc.FullName() == genid.Any_message_fullname { - if e.marshalAny(m) { - return nil - } - // If unable to expand, continue on to marshal Any as a regular message. - } - - // Marshal fields. - var err error - order.RangeFields(m, order.IndexNameFieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - if err = e.marshalField(fd.TextName(), v, fd); err != nil { - return false - } - return true - }) - if err != nil { - return err - } - - // Marshal unknown fields. - if e.opts.EmitUnknown { - e.marshalUnknown(m.GetUnknown()) - } - - return nil -} - -// marshalField marshals the given field with protoreflect.Value. -func (e encoder) marshalField(name string, val protoreflect.Value, fd protoreflect.FieldDescriptor) error { - switch { - case fd.IsList(): - return e.marshalList(name, val.List(), fd) - case fd.IsMap(): - return e.marshalMap(name, val.Map(), fd) - default: - e.WriteName(name) - return e.marshalSingular(val, fd) - } -} - -// marshalSingular marshals the given non-repeated field value. This includes -// all scalar types, enums, messages, and groups. -func (e encoder) marshalSingular(val protoreflect.Value, fd protoreflect.FieldDescriptor) error { - kind := fd.Kind() - switch kind { - case protoreflect.BoolKind: - e.WriteBool(val.Bool()) - - case protoreflect.StringKind: - s := val.String() - if !e.opts.allowInvalidUTF8 && strs.EnforceUTF8(fd) && !utf8.ValidString(s) { - return errors.InvalidUTF8(string(fd.FullName())) - } - e.WriteString(s) - - case protoreflect.Int32Kind, protoreflect.Int64Kind, - protoreflect.Sint32Kind, protoreflect.Sint64Kind, - protoreflect.Sfixed32Kind, protoreflect.Sfixed64Kind: - e.WriteInt(val.Int()) - - case protoreflect.Uint32Kind, protoreflect.Uint64Kind, - protoreflect.Fixed32Kind, protoreflect.Fixed64Kind: - e.WriteUint(val.Uint()) - - case protoreflect.FloatKind: - // Encoder.WriteFloat handles the special numbers NaN and infinites. - e.WriteFloat(val.Float(), 32) - - case protoreflect.DoubleKind: - // Encoder.WriteFloat handles the special numbers NaN and infinites. - e.WriteFloat(val.Float(), 64) - - case protoreflect.BytesKind: - e.WriteString(string(val.Bytes())) - - case protoreflect.EnumKind: - num := val.Enum() - if desc := fd.Enum().Values().ByNumber(num); desc != nil { - e.WriteLiteral(string(desc.Name())) - } else { - // Use numeric value if there is no enum description. - e.WriteInt(int64(num)) - } - - case protoreflect.MessageKind, protoreflect.GroupKind: - return e.marshalMessage(val.Message(), true) - - default: - panic(fmt.Sprintf("%v has unknown kind: %v", fd.FullName(), kind)) - } - return nil -} - -// marshalList marshals the given protoreflect.List as multiple name-value fields. -func (e encoder) marshalList(name string, list protoreflect.List, fd protoreflect.FieldDescriptor) error { - size := list.Len() - for i := 0; i < size; i++ { - e.WriteName(name) - if err := e.marshalSingular(list.Get(i), fd); err != nil { - return err - } - } - return nil -} - -// marshalMap marshals the given protoreflect.Map as multiple name-value fields. -func (e encoder) marshalMap(name string, mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error { - var err error - order.RangeEntries(mmap, order.GenericKeyOrder, func(key protoreflect.MapKey, val protoreflect.Value) bool { - e.WriteName(name) - e.StartMessage() - defer e.EndMessage() - - e.WriteName(string(genid.MapEntry_Key_field_name)) - err = e.marshalSingular(key.Value(), fd.MapKey()) - if err != nil { - return false - } - - e.WriteName(string(genid.MapEntry_Value_field_name)) - err = e.marshalSingular(val, fd.MapValue()) - if err != nil { - return false - } - return true - }) - return err -} - -// marshalUnknown parses the given []byte and marshals fields out. -// This function assumes proper encoding in the given []byte. -func (e encoder) marshalUnknown(b []byte) { - const dec = 10 - const hex = 16 - for len(b) > 0 { - num, wtype, n := protowire.ConsumeTag(b) - b = b[n:] - e.WriteName(strconv.FormatInt(int64(num), dec)) - - switch wtype { - case protowire.VarintType: - var v uint64 - v, n = protowire.ConsumeVarint(b) - e.WriteUint(v) - case protowire.Fixed32Type: - var v uint32 - v, n = protowire.ConsumeFixed32(b) - e.WriteLiteral("0x" + strconv.FormatUint(uint64(v), hex)) - case protowire.Fixed64Type: - var v uint64 - v, n = protowire.ConsumeFixed64(b) - e.WriteLiteral("0x" + strconv.FormatUint(v, hex)) - case protowire.BytesType: - var v []byte - v, n = protowire.ConsumeBytes(b) - e.WriteString(string(v)) - case protowire.StartGroupType: - e.StartMessage() - var v []byte - v, n = protowire.ConsumeGroup(num, b) - e.marshalUnknown(v) - e.EndMessage() - default: - panic(fmt.Sprintf("prototext: error parsing unknown field wire type: %v", wtype)) - } - - b = b[n:] - } -} - -// marshalAny marshals the given google.protobuf.Any message in expanded form. -// It returns true if it was able to marshal, else false. -func (e encoder) marshalAny(any protoreflect.Message) bool { - // Construct the embedded message. - fds := any.Descriptor().Fields() - fdType := fds.ByNumber(genid.Any_TypeUrl_field_number) - typeURL := any.Get(fdType).String() - mt, err := e.opts.Resolver.FindMessageByURL(typeURL) - if err != nil { - return false - } - m := mt.New().Interface() - - // Unmarshal bytes into embedded message. - fdValue := fds.ByNumber(genid.Any_Value_field_number) - value := any.Get(fdValue) - err = proto.UnmarshalOptions{ - AllowPartial: true, - Resolver: e.opts.Resolver, - }.Unmarshal(value.Bytes(), m) - if err != nil { - return false - } - - // Get current encoder position. If marshaling fails, reset encoder output - // back to this position. - pos := e.Snapshot() - - // Field name is the proto field name enclosed in []. - e.WriteName("[" + typeURL + "]") - err = e.marshalMessage(m.ProtoReflect(), true) - if err != nil { - e.Reset(pos) - return false - } - return true -} diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go deleted file mode 100644 index e942bc98..00000000 --- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +++ /dev/null @@ -1,547 +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. - -// Package protowire parses and formats the raw wire encoding. -// See https://protobuf.dev/programming-guides/encoding. -// -// For marshaling and unmarshaling entire protobuf messages, -// use the [google.golang.org/protobuf/proto] package instead. -package protowire - -import ( - "io" - "math" - "math/bits" - - "google.golang.org/protobuf/internal/errors" -) - -// Number represents the field number. -type Number int32 - -const ( - MinValidNumber Number = 1 - FirstReservedNumber Number = 19000 - LastReservedNumber Number = 19999 - MaxValidNumber Number = 1<<29 - 1 - DefaultRecursionLimit = 10000 -) - -// IsValid reports whether the field number is semantically valid. -func (n Number) IsValid() bool { - return MinValidNumber <= n && n <= MaxValidNumber -} - -// Type represents the wire type. -type Type int8 - -const ( - VarintType Type = 0 - Fixed32Type Type = 5 - Fixed64Type Type = 1 - BytesType Type = 2 - StartGroupType Type = 3 - EndGroupType Type = 4 -) - -const ( - _ = -iota - errCodeTruncated - errCodeFieldNumber - errCodeOverflow - errCodeReserved - errCodeEndGroup - errCodeRecursionDepth -) - -var ( - errFieldNumber = errors.New("invalid field number") - errOverflow = errors.New("variable length integer overflow") - errReserved = errors.New("cannot parse reserved wire type") - errEndGroup = errors.New("mismatching end group marker") - errParse = errors.New("parse error") -) - -// ParseError converts an error code into an error value. -// This returns nil if n is a non-negative number. -func ParseError(n int) error { - if n >= 0 { - return nil - } - switch n { - case errCodeTruncated: - return io.ErrUnexpectedEOF - case errCodeFieldNumber: - return errFieldNumber - case errCodeOverflow: - return errOverflow - case errCodeReserved: - return errReserved - case errCodeEndGroup: - return errEndGroup - default: - return errParse - } -} - -// ConsumeField parses an entire field record (both tag and value) and returns -// the field number, the wire type, and the total length. -// This returns a negative length upon an error (see [ParseError]). -// -// The total length includes the tag header and the end group marker (if the -// field is a group). -func ConsumeField(b []byte) (Number, Type, int) { - num, typ, n := ConsumeTag(b) - if n < 0 { - return 0, 0, n // forward error code - } - m := ConsumeFieldValue(num, typ, b[n:]) - if m < 0 { - return 0, 0, m // forward error code - } - return num, typ, n + m -} - -// ConsumeFieldValue parses a field value and returns its length. -// This assumes that the field [Number] and wire [Type] have already been parsed. -// This returns a negative length upon an error (see [ParseError]). -// -// When parsing a group, the length includes the end group marker and -// the end group is verified to match the starting field number. -func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { - return consumeFieldValueD(num, typ, b, DefaultRecursionLimit) -} - -func consumeFieldValueD(num Number, typ Type, b []byte, depth int) (n int) { - switch typ { - case VarintType: - _, n = ConsumeVarint(b) - return n - case Fixed32Type: - _, n = ConsumeFixed32(b) - return n - case Fixed64Type: - _, n = ConsumeFixed64(b) - return n - case BytesType: - _, n = ConsumeBytes(b) - return n - case StartGroupType: - if depth < 0 { - return errCodeRecursionDepth - } - n0 := len(b) - for { - num2, typ2, n := ConsumeTag(b) - if n < 0 { - return n // forward error code - } - b = b[n:] - if typ2 == EndGroupType { - if num != num2 { - return errCodeEndGroup - } - return n0 - len(b) - } - - n = consumeFieldValueD(num2, typ2, b, depth-1) - if n < 0 { - return n // forward error code - } - b = b[n:] - } - case EndGroupType: - return errCodeEndGroup - default: - return errCodeReserved - } -} - -// AppendTag encodes num and typ as a varint-encoded tag and appends it to b. -func AppendTag(b []byte, num Number, typ Type) []byte { - return AppendVarint(b, EncodeTag(num, typ)) -} - -// ConsumeTag parses b as a varint-encoded tag, reporting its length. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeTag(b []byte) (Number, Type, int) { - v, n := ConsumeVarint(b) - if n < 0 { - return 0, 0, n // forward error code - } - num, typ := DecodeTag(v) - if num < MinValidNumber { - return 0, 0, errCodeFieldNumber - } - return num, typ, n -} - -func SizeTag(num Number) int { - return SizeVarint(EncodeTag(num, 0)) // wire type has no effect on size -} - -// AppendVarint appends v to b as a varint-encoded uint64. -func AppendVarint(b []byte, v uint64) []byte { - switch { - case v < 1<<7: - b = append(b, byte(v)) - case v < 1<<14: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte(v>>7)) - case v < 1<<21: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte(v>>14)) - case v < 1<<28: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte(v>>21)) - case v < 1<<35: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte((v>>21)&0x7f|0x80), - byte(v>>28)) - case v < 1<<42: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte((v>>21)&0x7f|0x80), - byte((v>>28)&0x7f|0x80), - byte(v>>35)) - case v < 1<<49: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte((v>>21)&0x7f|0x80), - byte((v>>28)&0x7f|0x80), - byte((v>>35)&0x7f|0x80), - byte(v>>42)) - case v < 1<<56: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte((v>>21)&0x7f|0x80), - byte((v>>28)&0x7f|0x80), - byte((v>>35)&0x7f|0x80), - byte((v>>42)&0x7f|0x80), - byte(v>>49)) - case v < 1<<63: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte((v>>21)&0x7f|0x80), - byte((v>>28)&0x7f|0x80), - byte((v>>35)&0x7f|0x80), - byte((v>>42)&0x7f|0x80), - byte((v>>49)&0x7f|0x80), - byte(v>>56)) - default: - b = append(b, - byte((v>>0)&0x7f|0x80), - byte((v>>7)&0x7f|0x80), - byte((v>>14)&0x7f|0x80), - byte((v>>21)&0x7f|0x80), - byte((v>>28)&0x7f|0x80), - byte((v>>35)&0x7f|0x80), - byte((v>>42)&0x7f|0x80), - byte((v>>49)&0x7f|0x80), - byte((v>>56)&0x7f|0x80), - 1) - } - return b -} - -// ConsumeVarint parses b as a varint-encoded uint64, reporting its length. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeVarint(b []byte) (v uint64, n int) { - var y uint64 - if len(b) <= 0 { - return 0, errCodeTruncated - } - v = uint64(b[0]) - if v < 0x80 { - return v, 1 - } - v -= 0x80 - - if len(b) <= 1 { - return 0, errCodeTruncated - } - y = uint64(b[1]) - v += y << 7 - if y < 0x80 { - return v, 2 - } - v -= 0x80 << 7 - - if len(b) <= 2 { - return 0, errCodeTruncated - } - y = uint64(b[2]) - v += y << 14 - if y < 0x80 { - return v, 3 - } - v -= 0x80 << 14 - - if len(b) <= 3 { - return 0, errCodeTruncated - } - y = uint64(b[3]) - v += y << 21 - if y < 0x80 { - return v, 4 - } - v -= 0x80 << 21 - - if len(b) <= 4 { - return 0, errCodeTruncated - } - y = uint64(b[4]) - v += y << 28 - if y < 0x80 { - return v, 5 - } - v -= 0x80 << 28 - - if len(b) <= 5 { - return 0, errCodeTruncated - } - y = uint64(b[5]) - v += y << 35 - if y < 0x80 { - return v, 6 - } - v -= 0x80 << 35 - - if len(b) <= 6 { - return 0, errCodeTruncated - } - y = uint64(b[6]) - v += y << 42 - if y < 0x80 { - return v, 7 - } - v -= 0x80 << 42 - - if len(b) <= 7 { - return 0, errCodeTruncated - } - y = uint64(b[7]) - v += y << 49 - if y < 0x80 { - return v, 8 - } - v -= 0x80 << 49 - - if len(b) <= 8 { - return 0, errCodeTruncated - } - y = uint64(b[8]) - v += y << 56 - if y < 0x80 { - return v, 9 - } - v -= 0x80 << 56 - - if len(b) <= 9 { - return 0, errCodeTruncated - } - y = uint64(b[9]) - v += y << 63 - if y < 2 { - return v, 10 - } - return 0, errCodeOverflow -} - -// SizeVarint returns the encoded size of a varint. -// The size is guaranteed to be within 1 and 10, inclusive. -func SizeVarint(v uint64) int { - // This computes 1 + (bits.Len64(v)-1)/7. - // 9/64 is a good enough approximation of 1/7 - return int(9*uint32(bits.Len64(v))+64) / 64 -} - -// AppendFixed32 appends v to b as a little-endian uint32. -func AppendFixed32(b []byte, v uint32) []byte { - return append(b, - byte(v>>0), - byte(v>>8), - byte(v>>16), - byte(v>>24)) -} - -// ConsumeFixed32 parses b as a little-endian uint32, reporting its length. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeFixed32(b []byte) (v uint32, n int) { - if len(b) < 4 { - return 0, errCodeTruncated - } - v = uint32(b[0])<<0 | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 - return v, 4 -} - -// SizeFixed32 returns the encoded size of a fixed32; which is always 4. -func SizeFixed32() int { - return 4 -} - -// AppendFixed64 appends v to b as a little-endian uint64. -func AppendFixed64(b []byte, v uint64) []byte { - return append(b, - byte(v>>0), - byte(v>>8), - byte(v>>16), - byte(v>>24), - byte(v>>32), - byte(v>>40), - byte(v>>48), - byte(v>>56)) -} - -// ConsumeFixed64 parses b as a little-endian uint64, reporting its length. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeFixed64(b []byte) (v uint64, n int) { - if len(b) < 8 { - return 0, errCodeTruncated - } - v = uint64(b[0])<<0 | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 - return v, 8 -} - -// SizeFixed64 returns the encoded size of a fixed64; which is always 8. -func SizeFixed64() int { - return 8 -} - -// AppendBytes appends v to b as a length-prefixed bytes value. -func AppendBytes(b []byte, v []byte) []byte { - return append(AppendVarint(b, uint64(len(v))), v...) -} - -// ConsumeBytes parses b as a length-prefixed bytes value, reporting its length. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeBytes(b []byte) (v []byte, n int) { - m, n := ConsumeVarint(b) - if n < 0 { - return nil, n // forward error code - } - if m > uint64(len(b[n:])) { - return nil, errCodeTruncated - } - return b[n:][:m], n + int(m) -} - -// SizeBytes returns the encoded size of a length-prefixed bytes value, -// given only the length. -func SizeBytes(n int) int { - return SizeVarint(uint64(n)) + n -} - -// AppendString appends v to b as a length-prefixed bytes value. -func AppendString(b []byte, v string) []byte { - return append(AppendVarint(b, uint64(len(v))), v...) -} - -// ConsumeString parses b as a length-prefixed bytes value, reporting its length. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeString(b []byte) (v string, n int) { - bb, n := ConsumeBytes(b) - return string(bb), n -} - -// AppendGroup appends v to b as group value, with a trailing end group marker. -// The value v must not contain the end marker. -func AppendGroup(b []byte, num Number, v []byte) []byte { - return AppendVarint(append(b, v...), EncodeTag(num, EndGroupType)) -} - -// ConsumeGroup parses b as a group value until the trailing end group marker, -// and verifies that the end marker matches the provided num. The value v -// does not contain the end marker, while the length does contain the end marker. -// This returns a negative length upon an error (see [ParseError]). -func ConsumeGroup(num Number, b []byte) (v []byte, n int) { - n = ConsumeFieldValue(num, StartGroupType, b) - if n < 0 { - return nil, n // forward error code - } - b = b[:n] - - // Truncate off end group marker, but need to handle denormalized varints. - // Assuming end marker is never 0 (which is always the case since - // EndGroupType is non-zero), we can truncate all trailing bytes where the - // lower 7 bits are all zero (implying that the varint is denormalized). - for len(b) > 0 && b[len(b)-1]&0x7f == 0 { - b = b[:len(b)-1] - } - b = b[:len(b)-SizeTag(num)] - return b, n -} - -// SizeGroup returns the encoded size of a group, given only the length. -func SizeGroup(num Number, n int) int { - return n + SizeTag(num) -} - -// DecodeTag decodes the field [Number] and wire [Type] from its unified form. -// The [Number] is -1 if the decoded field number overflows int32. -// Other than overflow, this does not check for field number validity. -func DecodeTag(x uint64) (Number, Type) { - // NOTE: MessageSet allows for larger field numbers than normal. - if x>>3 > uint64(math.MaxInt32) { - return -1, 0 - } - return Number(x >> 3), Type(x & 7) -} - -// EncodeTag encodes the field [Number] and wire [Type] into its unified form. -func EncodeTag(num Number, typ Type) uint64 { - return uint64(num)<<3 | uint64(typ&7) -} - -// DecodeZigZag decodes a zig-zag-encoded uint64 as an int64. -// -// Input: {…, 5, 3, 1, 0, 2, 4, 6, …} -// Output: {…, -3, -2, -1, 0, +1, +2, +3, …} -func DecodeZigZag(x uint64) int64 { - return int64(x>>1) ^ int64(x)<<63>>63 -} - -// EncodeZigZag encodes an int64 as a zig-zag-encoded uint64. -// -// Input: {…, -3, -2, -1, 0, +1, +2, +3, …} -// Output: {…, 5, 3, 1, 0, 2, 4, 6, …} -func EncodeZigZag(x int64) uint64 { - return uint64(x<<1) ^ uint64(x>>63) -} - -// DecodeBool decodes a uint64 as a bool. -// -// Input: { 0, 1, 2, …} -// Output: {false, true, true, …} -func DecodeBool(x uint64) bool { - return x != 0 -} - -// EncodeBool encodes a bool as a uint64. -// -// Input: {false, true} -// Output: { 0, 1} -func EncodeBool(x bool) uint64 { - if x { - return 1 - } - return 0 -} diff --git a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go deleted file mode 100644 index a45625c8..00000000 --- a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +++ /dev/null @@ -1,413 +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. - -// Package descfmt provides functionality to format descriptors. -package descfmt - -import ( - "fmt" - "io" - "reflect" - "strconv" - "strings" - - "google.golang.org/protobuf/internal/detrand" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type list interface { - Len() int - pragma.DoNotImplement -} - -func FormatList(s fmt.State, r rune, vs list) { - io.WriteString(s, formatListOpt(vs, true, r == 'v' && (s.Flag('+') || s.Flag('#')))) -} -func formatListOpt(vs list, isRoot, allowMulti bool) string { - start, end := "[", "]" - if isRoot { - var name string - switch vs.(type) { - case protoreflect.Names: - name = "Names" - case protoreflect.FieldNumbers: - name = "FieldNumbers" - case protoreflect.FieldRanges: - name = "FieldRanges" - case protoreflect.EnumRanges: - name = "EnumRanges" - case protoreflect.FileImports: - name = "FileImports" - case protoreflect.Descriptor: - name = reflect.ValueOf(vs).MethodByName("Get").Type().Out(0).Name() + "s" - default: - name = reflect.ValueOf(vs).Elem().Type().Name() - } - start, end = name+"{", "}" - } - - var ss []string - switch vs := vs.(type) { - case protoreflect.Names: - for i := 0; i < vs.Len(); i++ { - ss = append(ss, fmt.Sprint(vs.Get(i))) - } - return start + joinStrings(ss, false) + end - case protoreflect.FieldNumbers: - for i := 0; i < vs.Len(); i++ { - ss = append(ss, fmt.Sprint(vs.Get(i))) - } - return start + joinStrings(ss, false) + end - case protoreflect.FieldRanges: - for i := 0; i < vs.Len(); i++ { - r := vs.Get(i) - if r[0]+1 == r[1] { - ss = append(ss, fmt.Sprintf("%d", r[0])) - } else { - ss = append(ss, fmt.Sprintf("%d:%d", r[0], r[1])) // enum ranges are end exclusive - } - } - return start + joinStrings(ss, false) + end - case protoreflect.EnumRanges: - for i := 0; i < vs.Len(); i++ { - r := vs.Get(i) - if r[0] == r[1] { - ss = append(ss, fmt.Sprintf("%d", r[0])) - } else { - ss = append(ss, fmt.Sprintf("%d:%d", r[0], int64(r[1])+1)) // enum ranges are end inclusive - } - } - return start + joinStrings(ss, false) + end - case protoreflect.FileImports: - for i := 0; i < vs.Len(); i++ { - var rs records - rv := reflect.ValueOf(vs.Get(i)) - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Path"), "Path"}, - {rv.MethodByName("Package"), "Package"}, - {rv.MethodByName("IsPublic"), "IsPublic"}, - {rv.MethodByName("IsWeak"), "IsWeak"}, - }...) - ss = append(ss, "{"+rs.Join()+"}") - } - return start + joinStrings(ss, allowMulti) + end - default: - _, isEnumValue := vs.(protoreflect.EnumValueDescriptors) - for i := 0; i < vs.Len(); i++ { - m := reflect.ValueOf(vs).MethodByName("Get") - v := m.Call([]reflect.Value{reflect.ValueOf(i)})[0].Interface() - ss = append(ss, formatDescOpt(v.(protoreflect.Descriptor), false, allowMulti && !isEnumValue, nil)) - } - return start + joinStrings(ss, allowMulti && isEnumValue) + end - } -} - -type methodAndName struct { - method reflect.Value - name string -} - -func FormatDesc(s fmt.State, r rune, t protoreflect.Descriptor) { - io.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#')), nil)) -} - -func InternalFormatDescOptForTesting(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string { - return formatDescOpt(t, isRoot, allowMulti, record) -} - -func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string { - rv := reflect.ValueOf(t) - rt := rv.MethodByName("ProtoType").Type().In(0) - - start, end := "{", "}" - if isRoot { - start = rt.Name() + "{" - } - - _, isFile := t.(protoreflect.FileDescriptor) - rs := records{ - allowMulti: allowMulti, - record: record, - } - if t.IsPlaceholder() { - if isFile { - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Path"), "Path"}, - {rv.MethodByName("Package"), "Package"}, - {rv.MethodByName("IsPlaceholder"), "IsPlaceholder"}, - }...) - } else { - rs.Append(rv, []methodAndName{ - {rv.MethodByName("FullName"), "FullName"}, - {rv.MethodByName("IsPlaceholder"), "IsPlaceholder"}, - }...) - } - } else { - switch { - case isFile: - rs.Append(rv, methodAndName{rv.MethodByName("Syntax"), "Syntax"}) - case isRoot: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Syntax"), "Syntax"}, - {rv.MethodByName("FullName"), "FullName"}, - }...) - default: - rs.Append(rv, methodAndName{rv.MethodByName("Name"), "Name"}) - } - switch t := t.(type) { - case protoreflect.FieldDescriptor: - accessors := []methodAndName{ - {rv.MethodByName("Number"), "Number"}, - {rv.MethodByName("Cardinality"), "Cardinality"}, - {rv.MethodByName("Kind"), "Kind"}, - {rv.MethodByName("HasJSONName"), "HasJSONName"}, - {rv.MethodByName("JSONName"), "JSONName"}, - {rv.MethodByName("HasPresence"), "HasPresence"}, - {rv.MethodByName("IsExtension"), "IsExtension"}, - {rv.MethodByName("IsPacked"), "IsPacked"}, - {rv.MethodByName("IsWeak"), "IsWeak"}, - {rv.MethodByName("IsList"), "IsList"}, - {rv.MethodByName("IsMap"), "IsMap"}, - {rv.MethodByName("MapKey"), "MapKey"}, - {rv.MethodByName("MapValue"), "MapValue"}, - {rv.MethodByName("HasDefault"), "HasDefault"}, - {rv.MethodByName("Default"), "Default"}, - {rv.MethodByName("ContainingOneof"), "ContainingOneof"}, - {rv.MethodByName("ContainingMessage"), "ContainingMessage"}, - {rv.MethodByName("Message"), "Message"}, - {rv.MethodByName("Enum"), "Enum"}, - } - for _, s := range accessors { - switch s.name { - case "MapKey": - if k := t.MapKey(); k != nil { - rs.recs = append(rs.recs, [2]string{"MapKey", k.Kind().String()}) - } - case "MapValue": - if v := t.MapValue(); v != nil { - switch v.Kind() { - case protoreflect.EnumKind: - rs.AppendRecs("MapValue", [2]string{"MapValue", string(v.Enum().FullName())}) - case protoreflect.MessageKind, protoreflect.GroupKind: - rs.AppendRecs("MapValue", [2]string{"MapValue", string(v.Message().FullName())}) - default: - rs.AppendRecs("MapValue", [2]string{"MapValue", v.Kind().String()}) - } - } - case "ContainingOneof": - if od := t.ContainingOneof(); od != nil { - rs.AppendRecs("ContainingOneof", [2]string{"Oneof", string(od.Name())}) - } - case "ContainingMessage": - if t.IsExtension() { - rs.AppendRecs("ContainingMessage", [2]string{"Extendee", string(t.ContainingMessage().FullName())}) - } - case "Message": - if !t.IsMap() { - rs.Append(rv, s) - } - default: - rs.Append(rv, s) - } - } - case protoreflect.OneofDescriptor: - var ss []string - fs := t.Fields() - for i := 0; i < fs.Len(); i++ { - ss = append(ss, string(fs.Get(i).Name())) - } - if len(ss) > 0 { - rs.AppendRecs("Fields", [2]string{"Fields", "[" + joinStrings(ss, false) + "]"}) - } - - case protoreflect.FileDescriptor: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Path"), "Path"}, - {rv.MethodByName("Package"), "Package"}, - {rv.MethodByName("Imports"), "Imports"}, - {rv.MethodByName("Messages"), "Messages"}, - {rv.MethodByName("Enums"), "Enums"}, - {rv.MethodByName("Extensions"), "Extensions"}, - {rv.MethodByName("Services"), "Services"}, - }...) - - case protoreflect.MessageDescriptor: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("IsMapEntry"), "IsMapEntry"}, - {rv.MethodByName("Fields"), "Fields"}, - {rv.MethodByName("Oneofs"), "Oneofs"}, - {rv.MethodByName("ReservedNames"), "ReservedNames"}, - {rv.MethodByName("ReservedRanges"), "ReservedRanges"}, - {rv.MethodByName("RequiredNumbers"), "RequiredNumbers"}, - {rv.MethodByName("ExtensionRanges"), "ExtensionRanges"}, - {rv.MethodByName("Messages"), "Messages"}, - {rv.MethodByName("Enums"), "Enums"}, - {rv.MethodByName("Extensions"), "Extensions"}, - }...) - - case protoreflect.EnumDescriptor: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Values"), "Values"}, - {rv.MethodByName("ReservedNames"), "ReservedNames"}, - {rv.MethodByName("ReservedRanges"), "ReservedRanges"}, - }...) - - case protoreflect.EnumValueDescriptor: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Number"), "Number"}, - }...) - - case protoreflect.ServiceDescriptor: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Methods"), "Methods"}, - }...) - - case protoreflect.MethodDescriptor: - rs.Append(rv, []methodAndName{ - {rv.MethodByName("Input"), "Input"}, - {rv.MethodByName("Output"), "Output"}, - {rv.MethodByName("IsStreamingClient"), "IsStreamingClient"}, - {rv.MethodByName("IsStreamingServer"), "IsStreamingServer"}, - }...) - } - if m := rv.MethodByName("GoType"); m.IsValid() { - rs.Append(rv, methodAndName{m, "GoType"}) - } - } - return start + rs.Join() + end -} - -type records struct { - recs [][2]string - allowMulti bool - - // record is a function that will be called for every Append() or - // AppendRecs() call, to be used for testing with the - // InternalFormatDescOptForTesting function. - record func(string) -} - -func (rs *records) AppendRecs(fieldName string, newRecs [2]string) { - if rs.record != nil { - rs.record(fieldName) - } - rs.recs = append(rs.recs, newRecs) -} - -func (rs *records) Append(v reflect.Value, accessors ...methodAndName) { - for _, a := range accessors { - if rs.record != nil { - rs.record(a.name) - } - var rv reflect.Value - if a.method.IsValid() { - rv = a.method.Call(nil)[0] - } - if v.Kind() == reflect.Struct && !rv.IsValid() { - rv = v.FieldByName(a.name) - } - if !rv.IsValid() { - panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a.name)) - } - if _, ok := rv.Interface().(protoreflect.Value); ok { - rv = rv.MethodByName("Interface").Call(nil)[0] - if !rv.IsNil() { - rv = rv.Elem() - } - } - - // Ignore zero values. - var isZero bool - switch rv.Kind() { - case reflect.Interface, reflect.Slice: - isZero = rv.IsNil() - case reflect.Bool: - isZero = rv.Bool() == false - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - isZero = rv.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - isZero = rv.Uint() == 0 - case reflect.String: - isZero = rv.String() == "" - } - if n, ok := rv.Interface().(list); ok { - isZero = n.Len() == 0 - } - if isZero { - continue - } - - // Format the value. - var s string - v := rv.Interface() - switch v := v.(type) { - case list: - s = formatListOpt(v, false, rs.allowMulti) - case protoreflect.FieldDescriptor, protoreflect.OneofDescriptor, protoreflect.EnumValueDescriptor, protoreflect.MethodDescriptor: - s = string(v.(protoreflect.Descriptor).Name()) - case protoreflect.Descriptor: - s = string(v.FullName()) - case string: - s = strconv.Quote(v) - case []byte: - s = fmt.Sprintf("%q", v) - default: - s = fmt.Sprint(v) - } - rs.recs = append(rs.recs, [2]string{a.name, s}) - } -} - -func (rs *records) Join() string { - var ss []string - - // In single line mode, simply join all records with commas. - if !rs.allowMulti { - for _, r := range rs.recs { - ss = append(ss, r[0]+formatColon(0)+r[1]) - } - return joinStrings(ss, false) - } - - // In allowMulti line mode, align single line records for more readable output. - var maxLen int - flush := func(i int) { - for _, r := range rs.recs[len(ss):i] { - ss = append(ss, r[0]+formatColon(maxLen-len(r[0]))+r[1]) - } - maxLen = 0 - } - for i, r := range rs.recs { - if isMulti := strings.Contains(r[1], "\n"); isMulti { - flush(i) - ss = append(ss, r[0]+formatColon(0)+strings.Join(strings.Split(r[1], "\n"), "\n\t")) - } else if maxLen < len(r[0]) { - maxLen = len(r[0]) - } - } - flush(len(rs.recs)) - return joinStrings(ss, true) -} - -func formatColon(padding int) string { - // Deliberately introduce instability into the debug output to - // discourage users from performing string comparisons. - // This provides us flexibility to change the output in the future. - if detrand.Bool() { - return ":" + strings.Repeat(" ", 1+padding) // use non-breaking spaces (U+00a0) - } else { - return ":" + strings.Repeat(" ", 1+padding) // use regular spaces (U+0020) - } -} - -func joinStrings(ss []string, isMulti bool) string { - if len(ss) == 0 { - return "" - } - if isMulti { - return "\n\t" + strings.Join(ss, "\n\t") + "\n" - } - return strings.Join(ss, ", ") -} diff --git a/vendor/google.golang.org/protobuf/internal/descopts/options.go b/vendor/google.golang.org/protobuf/internal/descopts/options.go deleted file mode 100644 index 8401be8c..00000000 --- a/vendor/google.golang.org/protobuf/internal/descopts/options.go +++ /dev/null @@ -1,29 +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 descopts contains the nil pointers to concrete descriptor options. -// -// This package exists as a form of reverse dependency injection so that certain -// packages (e.g., internal/filedesc and internal/filetype can avoid a direct -// dependency on the descriptor proto package). -package descopts - -import pref "google.golang.org/protobuf/reflect/protoreflect" - -// These variables are set by the init function in descriptor.pb.go via logic -// in internal/filetype. In other words, so long as the descriptor proto package -// is linked in, these variables will be populated. -// -// Each variable is populated with a nil pointer to the options struct. -var ( - File pref.ProtoMessage - Enum pref.ProtoMessage - EnumValue pref.ProtoMessage - Message pref.ProtoMessage - Field pref.ProtoMessage - Oneof pref.ProtoMessage - ExtensionRange pref.ProtoMessage - Service pref.ProtoMessage - Method pref.ProtoMessage -) diff --git a/vendor/google.golang.org/protobuf/internal/detrand/rand.go b/vendor/google.golang.org/protobuf/internal/detrand/rand.go deleted file mode 100644 index 49c8676d..00000000 --- a/vendor/google.golang.org/protobuf/internal/detrand/rand.go +++ /dev/null @@ -1,69 +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. - -// Package detrand provides deterministically random functionality. -// -// The pseudo-randomness of these functions is seeded by the program binary -// itself and guarantees that the output does not change within a program, -// while ensuring that the output is unstable across different builds. -package detrand - -import ( - "encoding/binary" - "hash/fnv" - "os" -) - -// Disable disables detrand such that all functions returns the zero value. -// This function is not concurrent-safe and must be called during program init. -func Disable() { - randSeed = 0 -} - -// Bool returns a deterministically random boolean. -func Bool() bool { - return randSeed%2 == 1 -} - -// Intn returns a deterministically random integer between 0 and n-1, inclusive. -func Intn(n int) int { - if n <= 0 { - panic("must be positive") - } - return int(randSeed % uint64(n)) -} - -// randSeed is a best-effort at an approximate hash of the Go binary. -var randSeed = binaryHash() - -func binaryHash() uint64 { - // Open the Go binary. - s, err := os.Executable() - if err != nil { - return 0 - } - f, err := os.Open(s) - if err != nil { - return 0 - } - defer f.Close() - - // Hash the size and several samples of the Go binary. - const numSamples = 8 - var buf [64]byte - h := fnv.New64() - fi, err := f.Stat() - if err != nil { - return 0 - } - binary.LittleEndian.PutUint64(buf[:8], uint64(fi.Size())) - h.Write(buf[:8]) - for i := int64(0); i < numSamples; i++ { - if _, err := f.ReadAt(buf[:], i*fi.Size()/numSamples); err != nil { - return 0 - } - h.Write(buf[:]) - } - return h.Sum64() -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go deleted file mode 100644 index 328dc733..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go +++ /dev/null @@ -1,213 +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. - -// Package defval marshals and unmarshals textual forms of default values. -// -// This package handles both the form historically used in Go struct field tags -// and also the form used by google.protobuf.FieldDescriptorProto.default_value -// since they differ in superficial ways. -package defval - -import ( - "fmt" - "math" - "strconv" - - ptext "google.golang.org/protobuf/internal/encoding/text" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// Format is the serialization format used to represent the default value. -type Format int - -const ( - _ Format = iota - - // Descriptor uses the serialization format that protoc uses with the - // google.protobuf.FieldDescriptorProto.default_value field. - Descriptor - - // GoTag uses the historical serialization format in Go struct field tags. - GoTag -) - -// Unmarshal deserializes the default string s according to the given kind k. -// When k is an enum, a list of enum value descriptors must be provided. -func Unmarshal(s string, k protoreflect.Kind, evs protoreflect.EnumValueDescriptors, f Format) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) { - switch k { - case protoreflect.BoolKind: - if f == GoTag { - switch s { - case "1": - return protoreflect.ValueOfBool(true), nil, nil - case "0": - return protoreflect.ValueOfBool(false), nil, nil - } - } else { - switch s { - case "true": - return protoreflect.ValueOfBool(true), nil, nil - case "false": - return protoreflect.ValueOfBool(false), nil, nil - } - } - case protoreflect.EnumKind: - if f == GoTag { - // Go tags use the numeric form of the enum value. - if n, err := strconv.ParseInt(s, 10, 32); err == nil { - if ev := evs.ByNumber(protoreflect.EnumNumber(n)); ev != nil { - return protoreflect.ValueOfEnum(ev.Number()), ev, nil - } - } - } else { - // Descriptor default_value use the enum identifier. - ev := evs.ByName(protoreflect.Name(s)) - if ev != nil { - return protoreflect.ValueOfEnum(ev.Number()), ev, nil - } - } - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - if v, err := strconv.ParseInt(s, 10, 32); err == nil { - return protoreflect.ValueOfInt32(int32(v)), nil, nil - } - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - if v, err := strconv.ParseInt(s, 10, 64); err == nil { - return protoreflect.ValueOfInt64(int64(v)), nil, nil - } - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - if v, err := strconv.ParseUint(s, 10, 32); err == nil { - return protoreflect.ValueOfUint32(uint32(v)), nil, nil - } - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - if v, err := strconv.ParseUint(s, 10, 64); err == nil { - return protoreflect.ValueOfUint64(uint64(v)), nil, nil - } - case protoreflect.FloatKind, protoreflect.DoubleKind: - var v float64 - var err error - switch s { - case "-inf": - v = math.Inf(-1) - case "inf": - v = math.Inf(+1) - case "nan": - v = math.NaN() - default: - v, err = strconv.ParseFloat(s, 64) - } - if err == nil { - if k == protoreflect.FloatKind { - return protoreflect.ValueOfFloat32(float32(v)), nil, nil - } else { - return protoreflect.ValueOfFloat64(float64(v)), nil, nil - } - } - case protoreflect.StringKind: - // String values are already unescaped and can be used as is. - return protoreflect.ValueOfString(s), nil, nil - case protoreflect.BytesKind: - if b, ok := unmarshalBytes(s); ok { - return protoreflect.ValueOfBytes(b), nil, nil - } - } - return protoreflect.Value{}, nil, errors.New("could not parse value for %v: %q", k, s) -} - -// Marshal serializes v as the default string according to the given kind k. -// When specifying the Descriptor format for an enum kind, the associated -// enum value descriptor must be provided. -func Marshal(v protoreflect.Value, ev protoreflect.EnumValueDescriptor, k protoreflect.Kind, f Format) (string, error) { - switch k { - case protoreflect.BoolKind: - if f == GoTag { - if v.Bool() { - return "1", nil - } else { - return "0", nil - } - } else { - if v.Bool() { - return "true", nil - } else { - return "false", nil - } - } - case protoreflect.EnumKind: - if f == GoTag { - return strconv.FormatInt(int64(v.Enum()), 10), nil - } else { - return string(ev.Name()), nil - } - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - return strconv.FormatInt(v.Int(), 10), nil - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - return strconv.FormatUint(v.Uint(), 10), nil - case protoreflect.FloatKind, protoreflect.DoubleKind: - f := v.Float() - switch { - case math.IsInf(f, -1): - return "-inf", nil - case math.IsInf(f, +1): - return "inf", nil - case math.IsNaN(f): - return "nan", nil - default: - if k == protoreflect.FloatKind { - return strconv.FormatFloat(f, 'g', -1, 32), nil - } else { - return strconv.FormatFloat(f, 'g', -1, 64), nil - } - } - case protoreflect.StringKind: - // String values are serialized as is without any escaping. - return v.String(), nil - case protoreflect.BytesKind: - if s, ok := marshalBytes(v.Bytes()); ok { - return s, nil - } - } - return "", errors.New("could not format value for %v: %v", k, v) -} - -// unmarshalBytes deserializes bytes by applying C unescaping. -func unmarshalBytes(s string) ([]byte, bool) { - // Bytes values use the same escaping as the text format, - // however they lack the surrounding double quotes. - v, err := ptext.UnmarshalString(`"` + s + `"`) - if err != nil { - return nil, false - } - return []byte(v), true -} - -// marshalBytes serializes bytes by using C escaping. -// To match the exact output of protoc, this is identical to the -// CEscape function in strutil.cc of the protoc source code. -func marshalBytes(b []byte) (string, bool) { - var s []byte - for _, c := range b { - switch c { - case '\n': - s = append(s, `\n`...) - case '\r': - s = append(s, `\r`...) - case '\t': - s = append(s, `\t`...) - case '"': - s = append(s, `\"`...) - case '\'': - s = append(s, `\'`...) - case '\\': - s = append(s, `\\`...) - default: - if printableASCII := c >= 0x20 && c <= 0x7e; printableASCII { - s = append(s, c) - } else { - s = append(s, fmt.Sprintf(`\%03o`, c)...) - } - } - } - return string(s), true -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go b/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go deleted file mode 100644 index a6693f0a..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go +++ /dev/null @@ -1,242 +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 messageset encodes and decodes the obsolete MessageSet wire format. -package messageset - -import ( - "math" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// The MessageSet wire format is equivalent to a message defined as follows, -// where each Item defines an extension field with a field number of 'type_id' -// and content of 'message'. MessageSet extensions must be non-repeated message -// fields. -// -// message MessageSet { -// repeated group Item = 1 { -// required int32 type_id = 2; -// required string message = 3; -// } -// } -const ( - FieldItem = protowire.Number(1) - FieldTypeID = protowire.Number(2) - FieldMessage = protowire.Number(3) -) - -// ExtensionName is the field name for extensions of MessageSet. -// -// A valid MessageSet extension must be of the form: -// -// message MyMessage { -// extend proto2.bridge.MessageSet { -// optional MyMessage message_set_extension = 1234; -// } -// ... -// } -const ExtensionName = "message_set_extension" - -// IsMessageSet returns whether the message uses the MessageSet wire format. -func IsMessageSet(md protoreflect.MessageDescriptor) bool { - xmd, ok := md.(interface{ IsMessageSet() bool }) - return ok && xmd.IsMessageSet() -} - -// IsMessageSetExtension reports this field properly extends a MessageSet. -func IsMessageSetExtension(fd protoreflect.FieldDescriptor) bool { - switch { - case fd.Name() != ExtensionName: - return false - case !IsMessageSet(fd.ContainingMessage()): - return false - case fd.FullName().Parent() != fd.Message().FullName(): - return false - } - return true -} - -// SizeField returns the size of a MessageSet item field containing an extension -// with the given field number, not counting the contents of the message subfield. -func SizeField(num protowire.Number) int { - return 2*protowire.SizeTag(FieldItem) + protowire.SizeTag(FieldTypeID) + protowire.SizeVarint(uint64(num)) -} - -// Unmarshal parses a MessageSet. -// -// It calls fn with the type ID and value of each item in the MessageSet. -// Unknown fields are discarded. -// -// If wantLen is true, the item values include the varint length prefix. -// This is ugly, but simplifies the fast-path decoder in internal/impl. -func Unmarshal(b []byte, wantLen bool, fn func(typeID protowire.Number, value []byte) error) error { - for len(b) > 0 { - num, wtyp, n := protowire.ConsumeTag(b) - if n < 0 { - return protowire.ParseError(n) - } - b = b[n:] - if num != FieldItem || wtyp != protowire.StartGroupType { - n := protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return protowire.ParseError(n) - } - b = b[n:] - continue - } - typeID, value, n, err := ConsumeFieldValue(b, wantLen) - if err != nil { - return err - } - b = b[n:] - if typeID == 0 { - continue - } - if err := fn(typeID, value); err != nil { - return err - } - } - return nil -} - -// ConsumeFieldValue parses b as a MessageSet item field value until and including -// the trailing end group marker. It assumes the start group tag has already been parsed. -// It returns the contents of the type_id and message subfields and the total -// item length. -// -// If wantLen is true, the returned message value includes the length prefix. -func ConsumeFieldValue(b []byte, wantLen bool) (typeid protowire.Number, message []byte, n int, err error) { - ilen := len(b) - for { - num, wtyp, n := protowire.ConsumeTag(b) - if n < 0 { - return 0, nil, 0, protowire.ParseError(n) - } - b = b[n:] - switch { - case num == FieldItem && wtyp == protowire.EndGroupType: - if wantLen && len(message) == 0 { - // The message field was missing, which should never happen. - // Be prepared for this case anyway. - message = protowire.AppendVarint(message, 0) - } - return typeid, message, ilen - len(b), nil - case num == FieldTypeID && wtyp == protowire.VarintType: - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, nil, 0, protowire.ParseError(n) - } - b = b[n:] - if v < 1 || v > math.MaxInt32 { - return 0, nil, 0, errors.New("invalid type_id in message set") - } - typeid = protowire.Number(v) - case num == FieldMessage && wtyp == protowire.BytesType: - m, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, nil, 0, protowire.ParseError(n) - } - if message == nil { - if wantLen { - message = b[:n:n] - } else { - message = m[:len(m):len(m)] - } - } else { - // This case should never happen in practice, but handle it for - // correctness: The MessageSet item contains multiple message - // fields, which need to be merged. - // - // In the case where we're returning the length, this becomes - // quite inefficient since we need to strip the length off - // the existing data and reconstruct it with the combined length. - if wantLen { - _, nn := protowire.ConsumeVarint(message) - m0 := message[nn:] - message = nil - message = protowire.AppendVarint(message, uint64(len(m0)+len(m))) - message = append(message, m0...) - message = append(message, m...) - } else { - message = append(message, m...) - } - } - b = b[n:] - default: - // We have no place to put it, so we just ignore unknown fields. - n := protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return 0, nil, 0, protowire.ParseError(n) - } - b = b[n:] - } - } -} - -// AppendFieldStart appends the start of a MessageSet item field containing -// an extension with the given number. The caller must add the message -// subfield (including the tag). -func AppendFieldStart(b []byte, num protowire.Number) []byte { - b = protowire.AppendTag(b, FieldItem, protowire.StartGroupType) - b = protowire.AppendTag(b, FieldTypeID, protowire.VarintType) - b = protowire.AppendVarint(b, uint64(num)) - return b -} - -// AppendFieldEnd appends the trailing end group marker for a MessageSet item field. -func AppendFieldEnd(b []byte) []byte { - return protowire.AppendTag(b, FieldItem, protowire.EndGroupType) -} - -// SizeUnknown returns the size of an unknown fields section in MessageSet format. -// -// See AppendUnknown. -func SizeUnknown(unknown []byte) (size int) { - for len(unknown) > 0 { - num, typ, n := protowire.ConsumeTag(unknown) - if n < 0 || typ != protowire.BytesType { - return 0 - } - unknown = unknown[n:] - _, n = protowire.ConsumeBytes(unknown) - if n < 0 { - return 0 - } - unknown = unknown[n:] - size += SizeField(num) + protowire.SizeTag(FieldMessage) + n - } - return size -} - -// AppendUnknown appends unknown fields to b in MessageSet format. -// -// For historic reasons, unresolved items in a MessageSet are stored in a -// message's unknown fields section in non-MessageSet format. That is, an -// unknown item with typeID T and value V appears in the unknown fields as -// a field with number T and value V. -// -// This function converts the unknown fields back into MessageSet form. -func AppendUnknown(b, unknown []byte) ([]byte, error) { - for len(unknown) > 0 { - num, typ, n := protowire.ConsumeTag(unknown) - if n < 0 || typ != protowire.BytesType { - return nil, errors.New("invalid data in message set unknown fields") - } - unknown = unknown[n:] - _, n = protowire.ConsumeBytes(unknown) - if n < 0 { - return nil, errors.New("invalid data in message set unknown fields") - } - b = AppendFieldStart(b, num) - b = protowire.AppendTag(b, FieldMessage, protowire.BytesType) - b = append(b, unknown[:n]...) - b = AppendFieldEnd(b) - unknown = unknown[n:] - } - return b, nil -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go deleted file mode 100644 index 373d2083..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ /dev/null @@ -1,207 +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. - -// Package tag marshals and unmarshals the legacy struct tags as generated -// by historical versions of protoc-gen-go. -package tag - -import ( - "reflect" - "strconv" - "strings" - - "google.golang.org/protobuf/internal/encoding/defval" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" -) - -var byteType = reflect.TypeOf(byte(0)) - -// Unmarshal decodes the tag into a prototype.Field. -// -// The goType is needed to determine the original protoreflect.Kind since the -// tag does not record sufficient information to determine that. -// The type is the underlying field type (e.g., a repeated field may be -// represented by []T, but the Go type passed in is just T). -// A list of enum value descriptors must be provided for enum fields. -// This does not populate the Enum or Message (except for weak message). -// -// This function is a best effort attempt; parsing errors are ignored. -func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { - f := new(filedesc.Field) - f.L0.ParentFile = filedesc.SurrogateProto2 - for len(tag) > 0 { - i := strings.IndexByte(tag, ',') - if i < 0 { - i = len(tag) - } - switch s := tag[:i]; { - case strings.HasPrefix(s, "name="): - f.L0.FullName = protoreflect.FullName(s[len("name="):]) - case strings.Trim(s, "0123456789") == "": - n, _ := strconv.ParseUint(s, 10, 32) - f.L1.Number = protoreflect.FieldNumber(n) - case s == "opt": - f.L1.Cardinality = protoreflect.Optional - case s == "req": - f.L1.Cardinality = protoreflect.Required - case s == "rep": - f.L1.Cardinality = protoreflect.Repeated - case s == "varint": - switch goType.Kind() { - case reflect.Bool: - f.L1.Kind = protoreflect.BoolKind - case reflect.Int32: - f.L1.Kind = protoreflect.Int32Kind - case reflect.Int64: - f.L1.Kind = protoreflect.Int64Kind - case reflect.Uint32: - f.L1.Kind = protoreflect.Uint32Kind - case reflect.Uint64: - f.L1.Kind = protoreflect.Uint64Kind - } - case s == "zigzag32": - if goType.Kind() == reflect.Int32 { - f.L1.Kind = protoreflect.Sint32Kind - } - case s == "zigzag64": - if goType.Kind() == reflect.Int64 { - f.L1.Kind = protoreflect.Sint64Kind - } - case s == "fixed32": - switch goType.Kind() { - case reflect.Int32: - f.L1.Kind = protoreflect.Sfixed32Kind - case reflect.Uint32: - f.L1.Kind = protoreflect.Fixed32Kind - case reflect.Float32: - f.L1.Kind = protoreflect.FloatKind - } - case s == "fixed64": - switch goType.Kind() { - case reflect.Int64: - f.L1.Kind = protoreflect.Sfixed64Kind - case reflect.Uint64: - f.L1.Kind = protoreflect.Fixed64Kind - case reflect.Float64: - f.L1.Kind = protoreflect.DoubleKind - } - case s == "bytes": - switch { - case goType.Kind() == reflect.String: - f.L1.Kind = protoreflect.StringKind - case goType.Kind() == reflect.Slice && goType.Elem() == byteType: - f.L1.Kind = protoreflect.BytesKind - default: - f.L1.Kind = protoreflect.MessageKind - } - case s == "group": - f.L1.Kind = protoreflect.GroupKind - case strings.HasPrefix(s, "enum="): - f.L1.Kind = protoreflect.EnumKind - case strings.HasPrefix(s, "json="): - jsonName := s[len("json="):] - if jsonName != strs.JSONCamelCase(string(f.L0.FullName.Name())) { - f.L1.StringName.InitJSON(jsonName) - } - case s == "packed": - f.L1.HasPacked = true - f.L1.IsPacked = true - case strings.HasPrefix(s, "weak="): - f.L1.IsWeak = true - f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):])) - case strings.HasPrefix(s, "def="): - // The default tag is special in that everything afterwards is the - // default regardless of the presence of commas. - s, i = tag[len("def="):], len(tag) - v, ev, _ := defval.Unmarshal(s, f.L1.Kind, evs, defval.GoTag) - f.L1.Default = filedesc.DefaultValue(v, ev) - case s == "proto3": - f.L0.ParentFile = filedesc.SurrogateProto3 - } - tag = strings.TrimPrefix(tag[i:], ",") - } - - // The generator uses the group message name instead of the field name. - // We obtain the real field name by lowercasing the group name. - if f.L1.Kind == protoreflect.GroupKind { - f.L0.FullName = protoreflect.FullName(strings.ToLower(string(f.L0.FullName))) - } - return f -} - -// Marshal encodes the protoreflect.FieldDescriptor as a tag. -// -// The enumName must be provided if the kind is an enum. -// Historically, the formulation of the enum "name" was the proto package -// dot-concatenated with the generated Go identifier for the enum type. -// Depending on the context on how Marshal is called, there are different ways -// through which that information is determined. As such it is the caller's -// responsibility to provide a function to obtain that information. -func Marshal(fd protoreflect.FieldDescriptor, enumName string) string { - var tag []string - switch fd.Kind() { - case protoreflect.BoolKind, protoreflect.EnumKind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Int64Kind, protoreflect.Uint64Kind: - tag = append(tag, "varint") - case protoreflect.Sint32Kind: - tag = append(tag, "zigzag32") - case protoreflect.Sint64Kind: - tag = append(tag, "zigzag64") - case protoreflect.Sfixed32Kind, protoreflect.Fixed32Kind, protoreflect.FloatKind: - tag = append(tag, "fixed32") - case protoreflect.Sfixed64Kind, protoreflect.Fixed64Kind, protoreflect.DoubleKind: - tag = append(tag, "fixed64") - case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind: - tag = append(tag, "bytes") - case protoreflect.GroupKind: - tag = append(tag, "group") - } - tag = append(tag, strconv.Itoa(int(fd.Number()))) - switch fd.Cardinality() { - case protoreflect.Optional: - tag = append(tag, "opt") - case protoreflect.Required: - tag = append(tag, "req") - case protoreflect.Repeated: - tag = append(tag, "rep") - } - if fd.IsPacked() { - tag = append(tag, "packed") - } - name := string(fd.Name()) - if fd.Kind() == protoreflect.GroupKind { - // The name of the FieldDescriptor for a group field is - // lowercased. To find the original capitalization, we - // look in the field's MessageType. - name = string(fd.Message().Name()) - } - tag = append(tag, "name="+name) - if jsonName := fd.JSONName(); jsonName != "" && jsonName != name && !fd.IsExtension() { - // NOTE: The jsonName != name condition is suspect, but it preserve - // the exact same semantics from the previous generator. - tag = append(tag, "json="+jsonName) - } - if fd.IsWeak() { - tag = append(tag, "weak="+string(fd.Message().FullName())) - } - // The previous implementation does not tag extension fields as proto3, - // even when the field is defined in a proto3 file. Match that behavior - // for consistency. - if fd.Syntax() == protoreflect.Proto3 && !fd.IsExtension() { - tag = append(tag, "proto3") - } - if fd.Kind() == protoreflect.EnumKind && enumName != "" { - tag = append(tag, "enum="+enumName) - } - if fd.ContainingOneof() != nil { - tag = append(tag, "oneof") - } - // This must appear last in the tag, since commas in strings aren't escaped. - if fd.HasDefault() { - def, _ := defval.Marshal(fd.Default(), fd.DefaultEnumValue(), fd.Kind(), defval.GoTag) - tag = append(tag, "def="+def) - } - return strings.Join(tag, ",") -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go deleted file mode 100644 index 87853e78..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ /dev/null @@ -1,686 +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. - -package text - -import ( - "bytes" - "fmt" - "io" - "strconv" - "unicode/utf8" - - "google.golang.org/protobuf/internal/errors" -) - -// Decoder is a token-based textproto decoder. -type Decoder struct { - // lastCall is last method called, either readCall or peekCall. - // Initial value is readCall. - lastCall call - - // lastToken contains the last read token. - lastToken Token - - // lastErr contains the last read error. - lastErr error - - // openStack is a stack containing the byte characters for MessageOpen and - // ListOpen kinds. The top of stack represents the message or the list that - // the current token is nested in. An empty stack means the current token is - // at the top level message. The characters '{' and '<' both represent the - // MessageOpen kind. - openStack []byte - - // orig is used in reporting line and column. - orig []byte - // in contains the unconsumed input. - in []byte -} - -// NewDecoder returns a Decoder to read the given []byte. -func NewDecoder(b []byte) *Decoder { - return &Decoder{orig: b, in: b} -} - -// ErrUnexpectedEOF means that EOF was encountered in the middle of the input. -var ErrUnexpectedEOF = errors.New("%v", io.ErrUnexpectedEOF) - -// call specifies which Decoder method was invoked. -type call uint8 - -const ( - readCall call = iota - peekCall -) - -// Peek looks ahead and returns the next token and error without advancing a read. -func (d *Decoder) Peek() (Token, error) { - defer func() { d.lastCall = peekCall }() - if d.lastCall == readCall { - d.lastToken, d.lastErr = d.Read() - } - return d.lastToken, d.lastErr -} - -// Read returns the next token. -// It will return an error if there is no valid token. -func (d *Decoder) Read() (Token, error) { - defer func() { d.lastCall = readCall }() - if d.lastCall == peekCall { - return d.lastToken, d.lastErr - } - - tok, err := d.parseNext(d.lastToken.kind) - if err != nil { - return Token{}, err - } - - switch tok.kind { - case comma, semicolon: - tok, err = d.parseNext(tok.kind) - if err != nil { - return Token{}, err - } - } - d.lastToken = tok - return tok, nil -} - -const ( - mismatchedFmt = "mismatched close character %q" - unexpectedFmt = "unexpected character %q" -) - -// parseNext parses the next Token based on given last kind. -func (d *Decoder) parseNext(lastKind Kind) (Token, error) { - // Trim leading spaces. - d.consume(0) - isEOF := false - if len(d.in) == 0 { - isEOF = true - } - - switch lastKind { - case EOF: - return d.consumeToken(EOF, 0, 0), nil - - case bof: - // Start of top level message. Next token can be EOF or Name. - if isEOF { - return d.consumeToken(EOF, 0, 0), nil - } - return d.parseFieldName() - - case Name: - // Next token can be MessageOpen, ListOpen or Scalar. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case '{', '<': - d.pushOpenStack(ch) - return d.consumeToken(MessageOpen, 1, 0), nil - case '[': - d.pushOpenStack(ch) - return d.consumeToken(ListOpen, 1, 0), nil - default: - return d.parseScalar() - } - - case Scalar: - openKind, closeCh := d.currentOpenKind() - switch openKind { - case bof: - // Top level message. - // Next token can be EOF, comma, semicolon or Name. - if isEOF { - return d.consumeToken(EOF, 0, 0), nil - } - switch d.in[0] { - case ',': - return d.consumeToken(comma, 1, 0), nil - case ';': - return d.consumeToken(semicolon, 1, 0), nil - default: - return d.parseFieldName() - } - - case MessageOpen: - // Next token can be MessageClose, comma, semicolon or Name. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case closeCh: - d.popOpenStack() - return d.consumeToken(MessageClose, 1, 0), nil - case otherCloseChar[closeCh]: - return Token{}, d.newSyntaxError(mismatchedFmt, ch) - case ',': - return d.consumeToken(comma, 1, 0), nil - case ';': - return d.consumeToken(semicolon, 1, 0), nil - default: - return d.parseFieldName() - } - - case ListOpen: - // Next token can be ListClose or comma. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case ']': - d.popOpenStack() - return d.consumeToken(ListClose, 1, 0), nil - case ',': - return d.consumeToken(comma, 1, 0), nil - default: - return Token{}, d.newSyntaxError(unexpectedFmt, ch) - } - } - - case MessageOpen: - // Next token can be MessageClose or Name. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - _, closeCh := d.currentOpenKind() - switch ch := d.in[0]; ch { - case closeCh: - d.popOpenStack() - return d.consumeToken(MessageClose, 1, 0), nil - case otherCloseChar[closeCh]: - return Token{}, d.newSyntaxError(mismatchedFmt, ch) - default: - return d.parseFieldName() - } - - case MessageClose: - openKind, closeCh := d.currentOpenKind() - switch openKind { - case bof: - // Top level message. - // Next token can be EOF, comma, semicolon or Name. - if isEOF { - return d.consumeToken(EOF, 0, 0), nil - } - switch ch := d.in[0]; ch { - case ',': - return d.consumeToken(comma, 1, 0), nil - case ';': - return d.consumeToken(semicolon, 1, 0), nil - default: - return d.parseFieldName() - } - - case MessageOpen: - // Next token can be MessageClose, comma, semicolon or Name. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case closeCh: - d.popOpenStack() - return d.consumeToken(MessageClose, 1, 0), nil - case otherCloseChar[closeCh]: - return Token{}, d.newSyntaxError(mismatchedFmt, ch) - case ',': - return d.consumeToken(comma, 1, 0), nil - case ';': - return d.consumeToken(semicolon, 1, 0), nil - default: - return d.parseFieldName() - } - - case ListOpen: - // Next token can be ListClose or comma - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case closeCh: - d.popOpenStack() - return d.consumeToken(ListClose, 1, 0), nil - case ',': - return d.consumeToken(comma, 1, 0), nil - default: - return Token{}, d.newSyntaxError(unexpectedFmt, ch) - } - } - - case ListOpen: - // Next token can be ListClose, MessageStart or Scalar. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case ']': - d.popOpenStack() - return d.consumeToken(ListClose, 1, 0), nil - case '{', '<': - d.pushOpenStack(ch) - return d.consumeToken(MessageOpen, 1, 0), nil - default: - return d.parseScalar() - } - - case ListClose: - openKind, closeCh := d.currentOpenKind() - switch openKind { - case bof: - // Top level message. - // Next token can be EOF, comma, semicolon or Name. - if isEOF { - return d.consumeToken(EOF, 0, 0), nil - } - switch ch := d.in[0]; ch { - case ',': - return d.consumeToken(comma, 1, 0), nil - case ';': - return d.consumeToken(semicolon, 1, 0), nil - default: - return d.parseFieldName() - } - - case MessageOpen: - // Next token can be MessageClose, comma, semicolon or Name. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case closeCh: - d.popOpenStack() - return d.consumeToken(MessageClose, 1, 0), nil - case otherCloseChar[closeCh]: - return Token{}, d.newSyntaxError(mismatchedFmt, ch) - case ',': - return d.consumeToken(comma, 1, 0), nil - case ';': - return d.consumeToken(semicolon, 1, 0), nil - default: - return d.parseFieldName() - } - - default: - // It is not possible to have this case. Let it panic below. - } - - case comma, semicolon: - openKind, closeCh := d.currentOpenKind() - switch openKind { - case bof: - // Top level message. Next token can be EOF or Name. - if isEOF { - return d.consumeToken(EOF, 0, 0), nil - } - return d.parseFieldName() - - case MessageOpen: - // Next token can be MessageClose or Name. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case closeCh: - d.popOpenStack() - return d.consumeToken(MessageClose, 1, 0), nil - case otherCloseChar[closeCh]: - return Token{}, d.newSyntaxError(mismatchedFmt, ch) - default: - return d.parseFieldName() - } - - case ListOpen: - if lastKind == semicolon { - // It is not be possible to have this case as logic here - // should not have produced a semicolon Token when inside a - // list. Let it panic below. - break - } - // Next token can be MessageOpen or Scalar. - if isEOF { - return Token{}, ErrUnexpectedEOF - } - switch ch := d.in[0]; ch { - case '{', '<': - d.pushOpenStack(ch) - return d.consumeToken(MessageOpen, 1, 0), nil - default: - return d.parseScalar() - } - } - } - - line, column := d.Position(len(d.orig) - len(d.in)) - panic(fmt.Sprintf("Decoder.parseNext: bug at handling line %d:%d with lastKind=%v", line, column, lastKind)) -} - -var otherCloseChar = map[byte]byte{ - '}': '>', - '>': '}', -} - -// currentOpenKind indicates whether current position is inside a message, list -// or top-level message by returning MessageOpen, ListOpen or bof respectively. -// If the returned kind is either a MessageOpen or ListOpen, it also returns the -// corresponding closing character. -func (d *Decoder) currentOpenKind() (Kind, byte) { - if len(d.openStack) == 0 { - return bof, 0 - } - openCh := d.openStack[len(d.openStack)-1] - switch openCh { - case '{': - return MessageOpen, '}' - case '<': - return MessageOpen, '>' - case '[': - return ListOpen, ']' - } - panic(fmt.Sprintf("Decoder: openStack contains invalid byte %c", openCh)) -} - -func (d *Decoder) pushOpenStack(ch byte) { - d.openStack = append(d.openStack, ch) -} - -func (d *Decoder) popOpenStack() { - d.openStack = d.openStack[:len(d.openStack)-1] -} - -// parseFieldName parses field name and separator. -func (d *Decoder) parseFieldName() (tok Token, err error) { - defer func() { - if err == nil && d.tryConsumeChar(':') { - tok.attrs |= hasSeparator - } - }() - - // Extension or Any type URL. - if d.in[0] == '[' { - return d.parseTypeName() - } - - // Identifier. - if size := parseIdent(d.in, false); size > 0 { - return d.consumeToken(Name, size, uint8(IdentName)), nil - } - - // Field number. Identify if input is a valid number that is not negative - // and is decimal integer within 32-bit range. - if num := parseNumber(d.in); num.size > 0 { - str := num.string(d.in) - if !num.neg && num.kind == numDec { - if _, err := strconv.ParseInt(str, 10, 32); err == nil { - return d.consumeToken(Name, num.size, uint8(FieldNumber)), nil - } - } - return Token{}, d.newSyntaxError("invalid field number: %s", str) - } - - return Token{}, d.newSyntaxError("invalid field name: %s", errId(d.in)) -} - -// parseTypeName parses Any type URL or extension field name. The name is -// enclosed in [ and ] characters. The C++ parser does not handle many legal URL -// strings. This implementation is more liberal and allows for the pattern -// ^[-_a-zA-Z0-9]+([./][-_a-zA-Z0-9]+)*`). Whitespaces and comments are allowed -// in between [ ], '.', '/' and the sub names. -func (d *Decoder) parseTypeName() (Token, error) { - startPos := len(d.orig) - len(d.in) - // Use alias s to advance first in order to use d.in for error handling. - // Caller already checks for [ as first character. - s := consume(d.in[1:], 0) - if len(s) == 0 { - return Token{}, ErrUnexpectedEOF - } - - var name []byte - for len(s) > 0 && isTypeNameChar(s[0]) { - name = append(name, s[0]) - s = s[1:] - } - s = consume(s, 0) - - var closed bool - for len(s) > 0 && !closed { - switch { - case s[0] == ']': - s = s[1:] - closed = true - - case s[0] == '/', s[0] == '.': - if len(name) > 0 && (name[len(name)-1] == '/' || name[len(name)-1] == '.') { - return Token{}, d.newSyntaxError("invalid type URL/extension field name: %s", - d.orig[startPos:len(d.orig)-len(s)+1]) - } - name = append(name, s[0]) - s = s[1:] - s = consume(s, 0) - for len(s) > 0 && isTypeNameChar(s[0]) { - name = append(name, s[0]) - s = s[1:] - } - s = consume(s, 0) - - default: - return Token{}, d.newSyntaxError( - "invalid type URL/extension field name: %s", d.orig[startPos:len(d.orig)-len(s)+1]) - } - } - - if !closed { - return Token{}, ErrUnexpectedEOF - } - - // First character cannot be '.'. Last character cannot be '.' or '/'. - size := len(name) - if size == 0 || name[0] == '.' || name[size-1] == '.' || name[size-1] == '/' { - return Token{}, d.newSyntaxError("invalid type URL/extension field name: %s", - d.orig[startPos:len(d.orig)-len(s)]) - } - - d.in = s - endPos := len(d.orig) - len(d.in) - d.consume(0) - - return Token{ - kind: Name, - attrs: uint8(TypeName), - pos: startPos, - raw: d.orig[startPos:endPos], - str: string(name), - }, nil -} - -func isTypeNameChar(b byte) bool { - return (b == '-' || b == '_' || - ('0' <= b && b <= '9') || - ('a' <= b && b <= 'z') || - ('A' <= b && b <= 'Z')) -} - -func isWhiteSpace(b byte) bool { - switch b { - case ' ', '\n', '\r', '\t': - return true - default: - return false - } -} - -// parseIdent parses an unquoted proto identifier and returns size. -// If allowNeg is true, it allows '-' to be the first character in the -// identifier. This is used when parsing literal values like -infinity, etc. -// Regular expression matches an identifier: `^[_a-zA-Z][_a-zA-Z0-9]*` -func parseIdent(input []byte, allowNeg bool) int { - var size int - - s := input - if len(s) == 0 { - return 0 - } - - if allowNeg && s[0] == '-' { - s = s[1:] - size++ - if len(s) == 0 { - return 0 - } - } - - switch { - case s[0] == '_', - 'a' <= s[0] && s[0] <= 'z', - 'A' <= s[0] && s[0] <= 'Z': - s = s[1:] - size++ - default: - return 0 - } - - for len(s) > 0 && (s[0] == '_' || - 'a' <= s[0] && s[0] <= 'z' || - 'A' <= s[0] && s[0] <= 'Z' || - '0' <= s[0] && s[0] <= '9') { - s = s[1:] - size++ - } - - if len(s) > 0 && !isDelim(s[0]) { - return 0 - } - - return size -} - -// parseScalar parses for a string, literal or number value. -func (d *Decoder) parseScalar() (Token, error) { - if d.in[0] == '"' || d.in[0] == '\'' { - return d.parseStringValue() - } - - if tok, ok := d.parseLiteralValue(); ok { - return tok, nil - } - - if tok, ok := d.parseNumberValue(); ok { - return tok, nil - } - - return Token{}, d.newSyntaxError("invalid scalar value: %s", errId(d.in)) -} - -// parseLiteralValue parses a literal value. A literal value is used for -// bools, special floats and enums. This function simply identifies that the -// field value is a literal. -func (d *Decoder) parseLiteralValue() (Token, bool) { - size := parseIdent(d.in, true) - if size == 0 { - return Token{}, false - } - return d.consumeToken(Scalar, size, literalValue), true -} - -// consumeToken constructs a Token for given Kind from d.in and consumes given -// size-length from it. -func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token { - // Important to compute raw and pos before consuming. - tok := Token{ - kind: kind, - attrs: attrs, - pos: len(d.orig) - len(d.in), - raw: d.in[:size], - } - d.consume(size) - return tok -} - -// newSyntaxError returns a syntax error with line and column information for -// current position. -func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { - e := errors.New(f, x...) - line, column := d.Position(len(d.orig) - len(d.in)) - return errors.New("syntax error (line %d:%d): %v", line, column, e) -} - -// Position returns line and column number of given index of the original input. -// It will panic if index is out of range. -func (d *Decoder) Position(idx int) (line int, column int) { - b := d.orig[:idx] - line = bytes.Count(b, []byte("\n")) + 1 - if i := bytes.LastIndexByte(b, '\n'); i >= 0 { - b = b[i+1:] - } - column = utf8.RuneCount(b) + 1 // ignore multi-rune characters - return line, column -} - -func (d *Decoder) tryConsumeChar(c byte) bool { - if len(d.in) > 0 && d.in[0] == c { - d.consume(1) - return true - } - return false -} - -// consume consumes n bytes of input and any subsequent whitespace or comments. -func (d *Decoder) consume(n int) { - d.in = consume(d.in, n) - return -} - -// consume consumes n bytes of input and any subsequent whitespace or comments. -func consume(b []byte, n int) []byte { - b = b[n:] - for len(b) > 0 { - switch b[0] { - case ' ', '\n', '\r', '\t': - b = b[1:] - case '#': - if i := bytes.IndexByte(b, '\n'); i >= 0 { - b = b[i+len("\n"):] - } else { - b = nil - } - default: - return b - } - } - return b -} - -// errId extracts a byte sequence that looks like an invalid ID -// (for the purposes of error reporting). -func errId(seq []byte) []byte { - const maxLen = 32 - for i := 0; i < len(seq); { - if i > maxLen { - return append(seq[:i:i], "…"...) - } - r, size := utf8.DecodeRune(seq[i:]) - if r > utf8.RuneSelf || (r != '/' && isDelim(byte(r))) { - if i == 0 { - // Either the first byte is invalid UTF-8 or a - // delimiter, or the first rune is non-ASCII. - // Return it as-is. - i = size - } - return seq[:i:i] - } - i += size - } - // No delimiter found. - return seq -} - -// isDelim returns true if given byte is a delimiter character. -func isDelim(c byte) bool { - return !(c == '-' || c == '+' || c == '.' || c == '_' || - ('a' <= c && c <= 'z') || - ('A' <= c && c <= 'Z') || - ('0' <= c && c <= '9')) -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go deleted file mode 100644 index 45c81f02..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go +++ /dev/null @@ -1,211 +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. - -package text - -// parseNumberValue parses a number from the input and returns a Token object. -func (d *Decoder) parseNumberValue() (Token, bool) { - in := d.in - num := parseNumber(in) - if num.size == 0 { - return Token{}, false - } - numAttrs := num.kind - if num.neg { - numAttrs |= isNegative - } - tok := Token{ - kind: Scalar, - attrs: numberValue, - pos: len(d.orig) - len(d.in), - raw: d.in[:num.size], - str: num.string(d.in), - numAttrs: numAttrs, - } - d.consume(num.size) - return tok, true -} - -const ( - numDec uint8 = (1 << iota) / 2 - numHex - numOct - numFloat -) - -// number is the result of parsing out a valid number from parseNumber. It -// contains data for doing float or integer conversion via the strconv package -// in conjunction with the input bytes. -type number struct { - kind uint8 - neg bool - size int - // if neg, this is the length of whitespace and comments between - // the minus sign and the rest fo the number literal - sep int -} - -func (num number) string(data []byte) string { - strSize := num.size - last := num.size - 1 - if num.kind == numFloat && (data[last] == 'f' || data[last] == 'F') { - strSize = last - } - if num.neg && num.sep > 0 { - // strip whitespace/comments between negative sign and the rest - strLen := strSize - num.sep - str := make([]byte, strLen) - str[0] = data[0] - copy(str[1:], data[num.sep+1:strSize]) - return string(str) - } - return string(data[:strSize]) - -} - -// parseNumber constructs a number object from given input. It allows for the -// following patterns: -// -// integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*) -// float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?) -// -// It also returns the number of parsed bytes for the given number, 0 if it is -// not a number. -func parseNumber(input []byte) number { - kind := numDec - var size int - var neg bool - - s := input - if len(s) == 0 { - return number{} - } - - // Optional - - var sep int - if s[0] == '-' { - neg = true - s = s[1:] - size++ - // Consume any whitespace or comments between the - // negative sign and the rest of the number - lenBefore := len(s) - s = consume(s, 0) - sep = lenBefore - len(s) - size += sep - if len(s) == 0 { - return number{} - } - } - - switch { - case s[0] == '0': - if len(s) > 1 { - switch { - case s[1] == 'x' || s[1] == 'X': - // Parse as hex number. - kind = numHex - n := 2 - s = s[2:] - for len(s) > 0 && (('0' <= s[0] && s[0] <= '9') || - ('a' <= s[0] && s[0] <= 'f') || - ('A' <= s[0] && s[0] <= 'F')) { - s = s[1:] - n++ - } - if n == 2 { - return number{} - } - size += n - - case '0' <= s[1] && s[1] <= '7': - // Parse as octal number. - kind = numOct - n := 2 - s = s[2:] - for len(s) > 0 && '0' <= s[0] && s[0] <= '7' { - s = s[1:] - n++ - } - size += n - } - - if kind&(numHex|numOct) > 0 { - if len(s) > 0 && !isDelim(s[0]) { - return number{} - } - return number{kind: kind, neg: neg, size: size, sep: sep} - } - } - s = s[1:] - size++ - - case '1' <= s[0] && s[0] <= '9': - n := 1 - s = s[1:] - for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { - s = s[1:] - n++ - } - size += n - - case s[0] == '.': - // Set kind to numFloat to signify the intent to parse as float. And - // that it needs to have other digits after '.'. - kind = numFloat - - default: - return number{} - } - - // . followed by 0 or more digits. - if len(s) > 0 && s[0] == '.' { - n := 1 - s = s[1:] - // If decimal point was before any digits, it should be followed by - // other digits. - if len(s) == 0 && kind == numFloat { - return number{} - } - for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { - s = s[1:] - n++ - } - size += n - kind = numFloat - } - - // e or E followed by an optional - or + and 1 or more digits. - if len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') { - kind = numFloat - s = s[1:] - n := 1 - if s[0] == '+' || s[0] == '-' { - s = s[1:] - n++ - if len(s) == 0 { - return number{} - } - } - for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { - s = s[1:] - n++ - } - size += n - } - - // Optional suffix f or F for floats. - if len(s) > 0 && (s[0] == 'f' || s[0] == 'F') { - kind = numFloat - s = s[1:] - size++ - } - - // Check that next byte is a delimiter or it is at the end. - if len(s) > 0 && !isDelim(s[0]) { - return number{} - } - - return number{kind: kind, neg: neg, size: size, sep: sep} -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go deleted file mode 100644 index d4d34902..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go +++ /dev/null @@ -1,161 +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. - -package text - -import ( - "bytes" - "strconv" - "strings" - "unicode" - "unicode/utf16" - "unicode/utf8" - - "google.golang.org/protobuf/internal/strs" -) - -// parseStringValue parses string field token. -// This differs from parseString since the text format allows -// multiple back-to-back string literals where they are semantically treated -// as a single large string with all values concatenated. -// -// E.g., `"foo" "bar" "baz"` => "foobarbaz" -func (d *Decoder) parseStringValue() (Token, error) { - // Note that the ending quote is sufficient to unambiguously mark the end - // of a string. Thus, the text grammar does not require intervening - // whitespace or control characters in-between strings. - // Thus, the following is valid: - // `"foo"'bar'"baz"` => "foobarbaz" - in0 := d.in - var ss []string - for len(d.in) > 0 && (d.in[0] == '"' || d.in[0] == '\'') { - s, err := d.parseString() - if err != nil { - return Token{}, err - } - ss = append(ss, s) - } - // d.in already points to the end of the value at this point. - return Token{ - kind: Scalar, - attrs: stringValue, - pos: len(d.orig) - len(in0), - raw: in0[:len(in0)-len(d.in)], - str: strings.Join(ss, ""), - }, nil -} - -// parseString parses a string value enclosed in " or '. -func (d *Decoder) parseString() (string, error) { - in := d.in - if len(in) == 0 { - return "", ErrUnexpectedEOF - } - quote := in[0] - in = in[1:] - i := indexNeedEscapeInBytes(in) - in, out := in[i:], in[:i:i] // set cap to prevent mutations - for len(in) > 0 { - switch r, n := utf8.DecodeRune(in); { - case r == utf8.RuneError && n == 1: - return "", d.newSyntaxError("invalid UTF-8 detected") - case r == 0 || r == '\n': - return "", d.newSyntaxError("invalid character %q in string", r) - case r == rune(quote): - in = in[1:] - d.consume(len(d.in) - len(in)) - return string(out), nil - case r == '\\': - if len(in) < 2 { - return "", ErrUnexpectedEOF - } - switch r := in[1]; r { - case '"', '\'', '\\', '?': - in, out = in[2:], append(out, r) - case 'a': - in, out = in[2:], append(out, '\a') - case 'b': - in, out = in[2:], append(out, '\b') - case 'n': - in, out = in[2:], append(out, '\n') - case 'r': - in, out = in[2:], append(out, '\r') - case 't': - in, out = in[2:], append(out, '\t') - case 'v': - in, out = in[2:], append(out, '\v') - case 'f': - in, out = in[2:], append(out, '\f') - case '0', '1', '2', '3', '4', '5', '6', '7': - // One, two, or three octal characters. - n := len(in[1:]) - len(bytes.TrimLeft(in[1:], "01234567")) - if n > 3 { - n = 3 - } - v, err := strconv.ParseUint(string(in[1:1+n]), 8, 8) - if err != nil { - return "", d.newSyntaxError("invalid octal escape code %q in string", in[:1+n]) - } - in, out = in[1+n:], append(out, byte(v)) - case 'x': - // One or two hexadecimal characters. - n := len(in[2:]) - len(bytes.TrimLeft(in[2:], "0123456789abcdefABCDEF")) - if n > 2 { - n = 2 - } - v, err := strconv.ParseUint(string(in[2:2+n]), 16, 8) - if err != nil { - return "", d.newSyntaxError("invalid hex escape code %q in string", in[:2+n]) - } - in, out = in[2+n:], append(out, byte(v)) - case 'u', 'U': - // Four or eight hexadecimal characters - n := 6 - if r == 'U' { - n = 10 - } - if len(in) < n { - return "", ErrUnexpectedEOF - } - v, err := strconv.ParseUint(string(in[2:n]), 16, 32) - if utf8.MaxRune < v || err != nil { - return "", d.newSyntaxError("invalid Unicode escape code %q in string", in[:n]) - } - in = in[n:] - - r := rune(v) - if utf16.IsSurrogate(r) { - if len(in) < 6 { - return "", ErrUnexpectedEOF - } - v, err := strconv.ParseUint(string(in[2:6]), 16, 16) - r = utf16.DecodeRune(r, rune(v)) - if in[0] != '\\' || in[1] != 'u' || r == unicode.ReplacementChar || err != nil { - return "", d.newSyntaxError("invalid Unicode escape code %q in string", in[:6]) - } - in = in[6:] - } - out = append(out, string(r)...) - default: - return "", d.newSyntaxError("invalid escape code %q in string", in[:2]) - } - default: - i := indexNeedEscapeInBytes(in[n:]) - in, out = in[n+i:], append(out, in[:n+i]...) - } - } - return "", ErrUnexpectedEOF -} - -// indexNeedEscapeInString returns the index of the character that needs -// escaping. If no characters need escaping, this returns the input length. -func indexNeedEscapeInBytes(b []byte) int { return indexNeedEscapeInString(strs.UnsafeString(b)) } - -// UnmarshalString returns an unescaped string given a textproto string value. -// String value needs to contain single or double quotes. This is only used by -// internal/encoding/defval package for unmarshaling bytes. -func UnmarshalString(s string) (string, error) { - d := NewDecoder([]byte(s)) - return d.parseString() -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go deleted file mode 100644 index 83d2b0d5..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go +++ /dev/null @@ -1,373 +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. - -package text - -import ( - "bytes" - "fmt" - "math" - "strconv" - "strings" - - "google.golang.org/protobuf/internal/flags" -) - -// Kind represents a token kind expressible in the textproto format. -type Kind uint8 - -// Kind values. -const ( - Invalid Kind = iota - EOF - Name // Name indicates the field name. - Scalar // Scalar are scalar values, e.g. "string", 47, ENUM_LITERAL, true. - MessageOpen - MessageClose - ListOpen - ListClose - - // comma and semi-colon are only for parsing in between values and should not be exposed. - comma - semicolon - - // bof indicates beginning of file, which is the default token - // kind at the beginning of parsing. - bof = Invalid -) - -func (t Kind) String() string { - switch t { - case Invalid: - return "" - case EOF: - return "eof" - case Scalar: - return "scalar" - case Name: - return "name" - case MessageOpen: - return "{" - case MessageClose: - return "}" - case ListOpen: - return "[" - case ListClose: - return "]" - case comma: - return "," - case semicolon: - return ";" - default: - return fmt.Sprintf("", uint8(t)) - } -} - -// NameKind represents different types of field names. -type NameKind uint8 - -// NameKind values. -const ( - IdentName NameKind = iota + 1 - TypeName - FieldNumber -) - -func (t NameKind) String() string { - switch t { - case IdentName: - return "IdentName" - case TypeName: - return "TypeName" - case FieldNumber: - return "FieldNumber" - default: - return fmt.Sprintf("", uint8(t)) - } -} - -// Bit mask in Token.attrs to indicate if a Name token is followed by the -// separator char ':'. The field name separator char is optional for message -// field or repeated message field, but required for all other types. Decoder -// simply indicates whether a Name token is followed by separator or not. It is -// up to the prototext package to validate. -const hasSeparator = 1 << 7 - -// Scalar value types. -const ( - numberValue = iota + 1 - stringValue - literalValue -) - -// Bit mask in Token.numAttrs to indicate that the number is a negative. -const isNegative = 1 << 7 - -// Token provides a parsed token kind and value. Values are provided by the -// different accessor methods. -type Token struct { - // Kind of the Token object. - kind Kind - // attrs contains metadata for the following Kinds: - // Name: hasSeparator bit and one of NameKind. - // Scalar: one of numberValue, stringValue, literalValue. - attrs uint8 - // numAttrs contains metadata for numberValue: - // - highest bit is whether negative or positive. - // - lower bits indicate one of numDec, numHex, numOct, numFloat. - numAttrs uint8 - // pos provides the position of the token in the original input. - pos int - // raw bytes of the serialized token. - // This is a subslice into the original input. - raw []byte - // str contains parsed string for the following: - // - stringValue of Scalar kind - // - numberValue of Scalar kind - // - TypeName of Name kind - str string -} - -// Kind returns the token kind. -func (t Token) Kind() Kind { - return t.kind -} - -// RawString returns the read value in string. -func (t Token) RawString() string { - return string(t.raw) -} - -// Pos returns the token position from the input. -func (t Token) Pos() int { - return t.pos -} - -// NameKind returns IdentName, TypeName or FieldNumber. -// It panics if type is not Name. -func (t Token) NameKind() NameKind { - if t.kind == Name { - return NameKind(t.attrs &^ hasSeparator) - } - panic(fmt.Sprintf("Token is not a Name type: %s", t.kind)) -} - -// HasSeparator returns true if the field name is followed by the separator char -// ':', else false. It panics if type is not Name. -func (t Token) HasSeparator() bool { - if t.kind == Name { - return t.attrs&hasSeparator != 0 - } - panic(fmt.Sprintf("Token is not a Name type: %s", t.kind)) -} - -// IdentName returns the value for IdentName type. -func (t Token) IdentName() string { - if t.kind == Name && t.attrs&uint8(IdentName) != 0 { - return string(t.raw) - } - panic(fmt.Sprintf("Token is not an IdentName: %s:%s", t.kind, NameKind(t.attrs&^hasSeparator))) -} - -// TypeName returns the value for TypeName type. -func (t Token) TypeName() string { - if t.kind == Name && t.attrs&uint8(TypeName) != 0 { - return t.str - } - panic(fmt.Sprintf("Token is not a TypeName: %s:%s", t.kind, NameKind(t.attrs&^hasSeparator))) -} - -// FieldNumber returns the value for FieldNumber type. It returns a -// non-negative int32 value. Caller will still need to validate for the correct -// field number range. -func (t Token) FieldNumber() int32 { - if t.kind != Name || t.attrs&uint8(FieldNumber) == 0 { - panic(fmt.Sprintf("Token is not a FieldNumber: %s:%s", t.kind, NameKind(t.attrs&^hasSeparator))) - } - // Following should not return an error as it had already been called right - // before this Token was constructed. - num, _ := strconv.ParseInt(string(t.raw), 10, 32) - return int32(num) -} - -// String returns the string value for a Scalar type. -func (t Token) String() (string, bool) { - if t.kind != Scalar || t.attrs != stringValue { - return "", false - } - return t.str, true -} - -// Enum returns the literal value for a Scalar type for use as enum literals. -func (t Token) Enum() (string, bool) { - if t.kind != Scalar || t.attrs != literalValue || (len(t.raw) > 0 && t.raw[0] == '-') { - return "", false - } - return string(t.raw), true -} - -// Bool returns the bool value for a Scalar type. -func (t Token) Bool() (bool, bool) { - if t.kind != Scalar { - return false, false - } - switch t.attrs { - case literalValue: - if b, ok := boolLits[string(t.raw)]; ok { - return b, true - } - case numberValue: - // Unsigned integer representation of 0 or 1 is permitted: 00, 0x0, 01, - // 0x1, etc. - n, err := strconv.ParseUint(t.str, 0, 64) - if err == nil { - switch n { - case 0: - return false, true - case 1: - return true, true - } - } - } - return false, false -} - -// These exact boolean literals are the ones supported in C++. -var boolLits = map[string]bool{ - "t": true, - "true": true, - "True": true, - "f": false, - "false": false, - "False": false, -} - -// Uint64 returns the uint64 value for a Scalar type. -func (t Token) Uint64() (uint64, bool) { - if t.kind != Scalar || t.attrs != numberValue || - t.numAttrs&isNegative > 0 || t.numAttrs&numFloat > 0 { - return 0, false - } - n, err := strconv.ParseUint(t.str, 0, 64) - if err != nil { - return 0, false - } - return n, true -} - -// Uint32 returns the uint32 value for a Scalar type. -func (t Token) Uint32() (uint32, bool) { - if t.kind != Scalar || t.attrs != numberValue || - t.numAttrs&isNegative > 0 || t.numAttrs&numFloat > 0 { - return 0, false - } - n, err := strconv.ParseUint(t.str, 0, 32) - if err != nil { - return 0, false - } - return uint32(n), true -} - -// Int64 returns the int64 value for a Scalar type. -func (t Token) Int64() (int64, bool) { - if t.kind != Scalar || t.attrs != numberValue || t.numAttrs&numFloat > 0 { - return 0, false - } - if n, err := strconv.ParseInt(t.str, 0, 64); err == nil { - return n, true - } - // C++ accepts large positive hex numbers as negative values. - // This feature is here for proto1 backwards compatibility purposes. - if flags.ProtoLegacy && (t.numAttrs == numHex) { - if n, err := strconv.ParseUint(t.str, 0, 64); err == nil { - return int64(n), true - } - } - return 0, false -} - -// Int32 returns the int32 value for a Scalar type. -func (t Token) Int32() (int32, bool) { - if t.kind != Scalar || t.attrs != numberValue || t.numAttrs&numFloat > 0 { - return 0, false - } - if n, err := strconv.ParseInt(t.str, 0, 32); err == nil { - return int32(n), true - } - // C++ accepts large positive hex numbers as negative values. - // This feature is here for proto1 backwards compatibility purposes. - if flags.ProtoLegacy && (t.numAttrs == numHex) { - if n, err := strconv.ParseUint(t.str, 0, 32); err == nil { - return int32(n), true - } - } - return 0, false -} - -// Float64 returns the float64 value for a Scalar type. -func (t Token) Float64() (float64, bool) { - if t.kind != Scalar { - return 0, false - } - switch t.attrs { - case literalValue: - if f, ok := floatLits[strings.ToLower(string(t.raw))]; ok { - return f, true - } - case numberValue: - n, err := strconv.ParseFloat(t.str, 64) - if err == nil { - return n, true - } - nerr := err.(*strconv.NumError) - if nerr.Err == strconv.ErrRange { - return n, true - } - } - return 0, false -} - -// Float32 returns the float32 value for a Scalar type. -func (t Token) Float32() (float32, bool) { - if t.kind != Scalar { - return 0, false - } - switch t.attrs { - case literalValue: - if f, ok := floatLits[strings.ToLower(string(t.raw))]; ok { - return float32(f), true - } - case numberValue: - n, err := strconv.ParseFloat(t.str, 64) - if err == nil { - // Overflows are treated as (-)infinity. - return float32(n), true - } - nerr := err.(*strconv.NumError) - if nerr.Err == strconv.ErrRange { - return float32(n), true - } - } - return 0, false -} - -// These are the supported float literals which C++ permits case-insensitive -// variants of these. -var floatLits = map[string]float64{ - "nan": math.NaN(), - "inf": math.Inf(1), - "infinity": math.Inf(1), - "-inf": math.Inf(-1), - "-infinity": math.Inf(-1), -} - -// TokenEquals returns true if given Tokens are equal, else false. -func TokenEquals(x, y Token) bool { - return x.kind == y.kind && - x.attrs == y.attrs && - x.numAttrs == y.numAttrs && - x.pos == y.pos && - bytes.Equal(x.raw, y.raw) && - x.str == y.str -} diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go b/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go deleted file mode 100644 index 7ae6c2a3..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/doc.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. - -// Package text implements the text format for protocol buffers. -// This package has no semantic understanding for protocol buffers and is only -// a parser and composer for the format. -// -// There is no formal specification for the protobuf text format, as such the -// C++ implementation (see google::protobuf::TextFormat) is the reference -// implementation of the text format. -// -// This package is neither a superset nor a subset of the C++ implementation. -// This implementation permits a more liberal grammar in some cases to be -// backwards compatible with the historical Go implementation. -// Future parsings unique to Go should not be added. -// Some grammars allowed by the C++ implementation are deliberately -// not implemented here because they are considered a bug by the protobuf team -// and should not be replicated. -// -// The Go implementation should implement a sufficient amount of the C++ -// grammar such that the default text serialization by C++ can be parsed by Go. -// However, just because the C++ parser accepts some input does not mean that -// the Go implementation should as well. -// -// The text format is almost a superset of JSON except: -// - message keys are not quoted strings, but identifiers -// - the top-level value must be a message without the delimiters -package text diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go deleted file mode 100644 index cf7aed77..00000000 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go +++ /dev/null @@ -1,272 +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. - -package text - -import ( - "math" - "math/bits" - "strconv" - "strings" - "unicode/utf8" - - "google.golang.org/protobuf/internal/detrand" - "google.golang.org/protobuf/internal/errors" -) - -// encType represents an encoding type. -type encType uint8 - -const ( - _ encType = (1 << iota) / 2 - name - scalar - messageOpen - messageClose -) - -// Encoder provides methods to write out textproto constructs and values. The user is -// responsible for producing valid sequences of constructs and values. -type Encoder struct { - encoderState - - indent string - delims [2]byte - outputASCII bool -} - -type encoderState struct { - lastType encType - indents []byte - out []byte -} - -// NewEncoder returns an Encoder. -// -// If indent is a non-empty string, it causes every entry in a List or Message -// to be preceded by the indent and trailed by a newline. -// -// If delims is not the zero value, it controls the delimiter characters used -// for messages (e.g., "{}" vs "<>"). -// -// If outputASCII is true, strings will be serialized in such a way that -// multi-byte UTF-8 sequences are escaped. This property ensures that the -// overall output is ASCII (as opposed to UTF-8). -func NewEncoder(buf []byte, indent string, delims [2]byte, outputASCII bool) (*Encoder, error) { - e := &Encoder{ - encoderState: encoderState{out: buf}, - } - if len(indent) > 0 { - if strings.Trim(indent, " \t") != "" { - return nil, errors.New("indent may only be composed of space and tab characters") - } - e.indent = indent - } - switch delims { - case [2]byte{0, 0}: - e.delims = [2]byte{'{', '}'} - case [2]byte{'{', '}'}, [2]byte{'<', '>'}: - e.delims = delims - default: - return nil, errors.New("delimiters may only be \"{}\" or \"<>\"") - } - e.outputASCII = outputASCII - - return e, nil -} - -// Bytes returns the content of the written bytes. -func (e *Encoder) Bytes() []byte { - return e.out -} - -// StartMessage writes out the '{' or '<' symbol. -func (e *Encoder) StartMessage() { - e.prepareNext(messageOpen) - e.out = append(e.out, e.delims[0]) -} - -// EndMessage writes out the '}' or '>' symbol. -func (e *Encoder) EndMessage() { - e.prepareNext(messageClose) - e.out = append(e.out, e.delims[1]) -} - -// WriteName writes out the field name and the separator ':'. -func (e *Encoder) WriteName(s string) { - e.prepareNext(name) - e.out = append(e.out, s...) - e.out = append(e.out, ':') -} - -// WriteBool writes out the given boolean value. -func (e *Encoder) WriteBool(b bool) { - if b { - e.WriteLiteral("true") - } else { - e.WriteLiteral("false") - } -} - -// WriteString writes out the given string value. -func (e *Encoder) WriteString(s string) { - e.prepareNext(scalar) - e.out = appendString(e.out, s, e.outputASCII) -} - -func appendString(out []byte, in string, outputASCII bool) []byte { - out = append(out, '"') - i := indexNeedEscapeInString(in) - in, out = in[i:], append(out, in[:i]...) - for len(in) > 0 { - switch r, n := utf8.DecodeRuneInString(in); { - case r == utf8.RuneError && n == 1: - // We do not report invalid UTF-8 because strings in the text format - // are used to represent both the proto string and bytes type. - r = rune(in[0]) - fallthrough - case r < ' ' || r == '"' || r == '\\' || r == 0x7f: - out = append(out, '\\') - switch r { - case '"', '\\': - out = append(out, byte(r)) - case '\n': - out = append(out, 'n') - case '\r': - out = append(out, 'r') - case '\t': - out = append(out, 't') - default: - out = append(out, 'x') - out = append(out, "00"[1+(bits.Len32(uint32(r))-1)/4:]...) - out = strconv.AppendUint(out, uint64(r), 16) - } - in = in[n:] - case r >= utf8.RuneSelf && (outputASCII || r <= 0x009f): - out = append(out, '\\') - if r <= math.MaxUint16 { - out = append(out, 'u') - out = append(out, "0000"[1+(bits.Len32(uint32(r))-1)/4:]...) - out = strconv.AppendUint(out, uint64(r), 16) - } else { - out = append(out, 'U') - out = append(out, "00000000"[1+(bits.Len32(uint32(r))-1)/4:]...) - out = strconv.AppendUint(out, uint64(r), 16) - } - in = in[n:] - default: - i := indexNeedEscapeInString(in[n:]) - in, out = in[n+i:], append(out, in[:n+i]...) - } - } - out = append(out, '"') - return out -} - -// indexNeedEscapeInString returns the index of the character that needs -// escaping. If no characters need escaping, this returns the input length. -func indexNeedEscapeInString(s string) int { - for i := 0; i < len(s); i++ { - if c := s[i]; c < ' ' || c == '"' || c == '\'' || c == '\\' || c >= 0x7f { - return i - } - } - return len(s) -} - -// WriteFloat writes out the given float value for given bitSize. -func (e *Encoder) WriteFloat(n float64, bitSize int) { - e.prepareNext(scalar) - e.out = appendFloat(e.out, n, bitSize) -} - -func appendFloat(out []byte, n float64, bitSize int) []byte { - switch { - case math.IsNaN(n): - return append(out, "nan"...) - case math.IsInf(n, +1): - return append(out, "inf"...) - case math.IsInf(n, -1): - return append(out, "-inf"...) - default: - return strconv.AppendFloat(out, n, 'g', -1, bitSize) - } -} - -// WriteInt writes out the given signed integer value. -func (e *Encoder) WriteInt(n int64) { - e.prepareNext(scalar) - e.out = strconv.AppendInt(e.out, n, 10) -} - -// WriteUint writes out the given unsigned integer value. -func (e *Encoder) WriteUint(n uint64) { - e.prepareNext(scalar) - e.out = strconv.AppendUint(e.out, n, 10) -} - -// WriteLiteral writes out the given string as a literal value without quotes. -// This is used for writing enum literal strings. -func (e *Encoder) WriteLiteral(s string) { - e.prepareNext(scalar) - e.out = append(e.out, s...) -} - -// prepareNext adds possible space and indentation for the next value based -// on last encType and indent option. It also updates e.lastType to next. -func (e *Encoder) prepareNext(next encType) { - defer func() { - e.lastType = next - }() - - // Single line. - if len(e.indent) == 0 { - // Add space after each field before the next one. - if e.lastType&(scalar|messageClose) != 0 && next == name { - e.out = append(e.out, ' ') - // Add a random extra space to make output unstable. - if detrand.Bool() { - e.out = append(e.out, ' ') - } - } - return - } - - // Multi-line. - switch { - case e.lastType == name: - e.out = append(e.out, ' ') - // Add a random extra space after name: to make output unstable. - if detrand.Bool() { - e.out = append(e.out, ' ') - } - - case e.lastType == messageOpen && next != messageClose: - e.indents = append(e.indents, e.indent...) - e.out = append(e.out, '\n') - e.out = append(e.out, e.indents...) - - case e.lastType&(scalar|messageClose) != 0: - if next == messageClose { - e.indents = e.indents[:len(e.indents)-len(e.indent)] - } - e.out = append(e.out, '\n') - e.out = append(e.out, e.indents...) - } -} - -// Snapshot returns the current snapshot for use in Reset. -func (e *Encoder) Snapshot() encoderState { - return e.encoderState -} - -// Reset resets the Encoder to the given encoderState from a Snapshot. -func (e *Encoder) Reset(es encoderState) { - e.encoderState = es -} - -// AppendString appends the escaped form of the input string to b. -func AppendString(b []byte, s string) []byte { - return appendString(b, s, false) -} diff --git a/vendor/google.golang.org/protobuf/internal/errors/errors.go b/vendor/google.golang.org/protobuf/internal/errors/errors.go deleted file mode 100644 index 20c17b35..00000000 --- a/vendor/google.golang.org/protobuf/internal/errors/errors.go +++ /dev/null @@ -1,89 +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. - -// Package errors implements functions to manipulate errors. -package errors - -import ( - "errors" - "fmt" - - "google.golang.org/protobuf/internal/detrand" -) - -// Error is a sentinel matching all errors produced by this package. -var Error = errors.New("protobuf error") - -// New formats a string according to the format specifier and arguments and -// returns an error that has a "proto" prefix. -func New(f string, x ...interface{}) error { - return &prefixError{s: format(f, x...)} -} - -type prefixError struct{ s string } - -var prefix = func() string { - // Deliberately introduce instability into the error message string to - // discourage users from performing error string comparisons. - if detrand.Bool() { - return "proto: " // use non-breaking spaces (U+00a0) - } else { - return "proto: " // use regular spaces (U+0020) - } -}() - -func (e *prefixError) Error() string { - return prefix + e.s -} - -func (e *prefixError) Unwrap() error { - return Error -} - -// Wrap returns an error that has a "proto" prefix, the formatted string described -// by the format specifier and arguments, and a suffix of err. The error wraps err. -func Wrap(err error, f string, x ...interface{}) error { - return &wrapError{ - s: format(f, x...), - err: err, - } -} - -type wrapError struct { - s string - err error -} - -func (e *wrapError) Error() string { - return format("%v%v: %v", prefix, e.s, e.err) -} - -func (e *wrapError) Unwrap() error { - return e.err -} - -func (e *wrapError) Is(target error) bool { - return target == Error -} - -func format(f string, x ...interface{}) string { - // avoid "proto: " prefix when chaining - for i := 0; i < len(x); i++ { - switch e := x[i].(type) { - case *prefixError: - x[i] = e.s - case *wrapError: - x[i] = format("%v: %v", e.s, e.err) - } - } - return fmt.Sprintf(f, x...) -} - -func InvalidUTF8(name string) error { - return New("field %v contains invalid UTF-8", name) -} - -func RequiredNotSet(name string) error { - return New("required field %v not set", name) -} diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go deleted file mode 100644 index fbcd3492..00000000 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +++ /dev/null @@ -1,40 +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. - -//go:build !go1.13 -// +build !go1.13 - -package errors - -import "reflect" - -// Is is a copy of Go 1.13's errors.Is for use with older Go versions. -func Is(err, target error) bool { - if target == nil { - return err == target - } - - isComparable := reflect.TypeOf(target).Comparable() - for { - if isComparable && err == target { - return true - } - if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { - return true - } - if err = unwrap(err); err == nil { - return false - } - } -} - -func unwrap(err error) error { - u, ok := err.(interface { - Unwrap() error - }) - if !ok { - return nil - } - return u.Unwrap() -} diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go deleted file mode 100644 index 5e72f1cd..00000000 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +++ /dev/null @@ -1,13 +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. - -//go:build go1.13 -// +build go1.13 - -package errors - -import "errors" - -// Is is errors.Is. -func Is(err, target error) bool { return errors.Is(err, target) } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/build.go b/vendor/google.golang.org/protobuf/internal/filedesc/build.go deleted file mode 100644 index 7cac1c19..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/build.go +++ /dev/null @@ -1,157 +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 filedesc provides functionality for constructing descriptors. -// -// The types in this package implement interfaces in the protoreflect package -// related to protobuf descripriptors. -package filedesc - -import ( - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// Builder construct a protoreflect.FileDescriptor from the raw descriptor. -type Builder struct { - // GoPackagePath is the Go package path that is invoking this builder. - GoPackagePath string - - // RawDescriptor is the wire-encoded bytes of FileDescriptorProto - // and must be populated. - RawDescriptor []byte - - // NumEnums is the total number of enums declared in the file. - NumEnums int32 - // NumMessages is the total number of messages declared in the file. - // It includes the implicit message declarations for map entries. - NumMessages int32 - // NumExtensions is the total number of extensions declared in the file. - NumExtensions int32 - // NumServices is the total number of services declared in the file. - NumServices int32 - - // TypeResolver resolves extension field types for descriptor options. - // If nil, it uses protoregistry.GlobalTypes. - TypeResolver interface { - protoregistry.ExtensionTypeResolver - } - - // FileRegistry is use to lookup file, enum, and message dependencies. - // Once constructed, the file descriptor is registered here. - // If nil, it uses protoregistry.GlobalFiles. - FileRegistry interface { - FindFileByPath(string) (protoreflect.FileDescriptor, error) - FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) - RegisterFile(protoreflect.FileDescriptor) error - } -} - -// resolverByIndex is an interface Builder.FileRegistry may implement. -// If so, it permits looking up an enum or message dependency based on the -// sub-list and element index into filetype.Builder.DependencyIndexes. -type resolverByIndex interface { - FindEnumByIndex(int32, int32, []Enum, []Message) protoreflect.EnumDescriptor - FindMessageByIndex(int32, int32, []Enum, []Message) protoreflect.MessageDescriptor -} - -// Indexes of each sub-list in filetype.Builder.DependencyIndexes. -const ( - listFieldDeps int32 = iota - listExtTargets - listExtDeps - listMethInDeps - listMethOutDeps -) - -// Out is the output of the Builder. -type Out struct { - File protoreflect.FileDescriptor - - // Enums is all enum descriptors in "flattened ordering". - Enums []Enum - // Messages is all message descriptors in "flattened ordering". - // It includes the implicit message declarations for map entries. - Messages []Message - // Extensions is all extension descriptors in "flattened ordering". - Extensions []Extension - // Service is all service descriptors in "flattened ordering". - Services []Service -} - -// Build constructs a FileDescriptor given the parameters set in Builder. -// It assumes that the inputs are well-formed and panics if any inconsistencies -// are encountered. -// -// If NumEnums+NumMessages+NumExtensions+NumServices is zero, -// then Build automatically derives them from the raw descriptor. -func (db Builder) Build() (out Out) { - // Populate the counts if uninitialized. - if db.NumEnums+db.NumMessages+db.NumExtensions+db.NumServices == 0 { - db.unmarshalCounts(db.RawDescriptor, true) - } - - // Initialize resolvers and registries if unpopulated. - if db.TypeResolver == nil { - db.TypeResolver = protoregistry.GlobalTypes - } - if db.FileRegistry == nil { - db.FileRegistry = protoregistry.GlobalFiles - } - - fd := newRawFile(db) - out.File = fd - out.Enums = fd.allEnums - out.Messages = fd.allMessages - out.Extensions = fd.allExtensions - out.Services = fd.allServices - - if err := db.FileRegistry.RegisterFile(fd); err != nil { - panic(err) - } - return out -} - -// unmarshalCounts counts the number of enum, message, extension, and service -// declarations in the raw message, which is either a FileDescriptorProto -// or a MessageDescriptorProto depending on whether isFile is set. -func (db *Builder) unmarshalCounts(b []byte, isFile bool) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - if isFile { - switch num { - case genid.FileDescriptorProto_EnumType_field_number: - db.NumEnums++ - case genid.FileDescriptorProto_MessageType_field_number: - db.unmarshalCounts(v, false) - db.NumMessages++ - case genid.FileDescriptorProto_Extension_field_number: - db.NumExtensions++ - case genid.FileDescriptorProto_Service_field_number: - db.NumServices++ - } - } else { - switch num { - case genid.DescriptorProto_EnumType_field_number: - db.NumEnums++ - case genid.DescriptorProto_NestedType_field_number: - db.unmarshalCounts(v, false) - db.NumMessages++ - case genid.DescriptorProto_Extension_field_number: - db.NumExtensions++ - } - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go deleted file mode 100644 index 193c68e8..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ /dev/null @@ -1,678 +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 filedesc - -import ( - "bytes" - "fmt" - "sync" - "sync/atomic" - - "google.golang.org/protobuf/internal/descfmt" - "google.golang.org/protobuf/internal/descopts" - "google.golang.org/protobuf/internal/encoding/defval" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// Edition is an Enum for proto2.Edition -type Edition int32 - -// These values align with the value of Enum in descriptor.proto which allows -// direct conversion between the proto enum and this enum. -const ( - EditionUnknown Edition = 0 - EditionProto2 Edition = 998 - EditionProto3 Edition = 999 - Edition2023 Edition = 1000 - EditionUnsupported Edition = 100000 -) - -// The types in this file may have a suffix: -// • L0: Contains fields common to all descriptors (except File) and -// must be initialized up front. -// • L1: Contains fields specific to a descriptor and -// must be initialized up front. If the associated proto uses Editions, the -// Editions features must always be resolved. If not explicitly set, the -// appropriate default must be resolved and set. -// • L2: Contains fields that are lazily initialized when constructing -// from the raw file descriptor. When constructing as a literal, the L2 -// fields must be initialized up front. -// -// The types are exported so that packages like reflect/protodesc can -// directly construct descriptors. - -type ( - File struct { - fileRaw - L1 FileL1 - - once uint32 // atomically set if L2 is valid - mu sync.Mutex // protects L2 - L2 *FileL2 - } - FileL1 struct { - Syntax protoreflect.Syntax - Edition Edition // Only used if Syntax == Editions - Path string - Package protoreflect.FullName - - Enums Enums - Messages Messages - Extensions Extensions - Services Services - - EditionFeatures FileEditionFeatures - } - FileL2 struct { - Options func() protoreflect.ProtoMessage - Imports FileImports - Locations SourceLocations - } - - FileEditionFeatures struct { - // IsFieldPresence is true if field_presence is EXPLICIT - // https://protobuf.dev/editions/features/#field_presence - IsFieldPresence bool - // IsOpenEnum is true if enum_type is OPEN - // https://protobuf.dev/editions/features/#enum_type - IsOpenEnum bool - // IsPacked is true if repeated_field_encoding is PACKED - // https://protobuf.dev/editions/features/#repeated_field_encoding - IsPacked bool - // IsUTF8Validated is true if utf_validation is VERIFY - // https://protobuf.dev/editions/features/#utf8_validation - IsUTF8Validated bool - // IsDelimitedEncoded is true if message_encoding is DELIMITED - // https://protobuf.dev/editions/features/#message_encoding - IsDelimitedEncoded bool - // IsJSONCompliant is true if json_format is ALLOW - // https://protobuf.dev/editions/features/#json_format - IsJSONCompliant bool - } -) - -func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd } -func (fd *File) Parent() protoreflect.Descriptor { return nil } -func (fd *File) Index() int { return 0 } -func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax } -func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() } -func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package } -func (fd *File) IsPlaceholder() bool { return false } -func (fd *File) Options() protoreflect.ProtoMessage { - if f := fd.lazyInit().Options; f != nil { - return f() - } - return descopts.File -} -func (fd *File) Path() string { return fd.L1.Path } -func (fd *File) Package() protoreflect.FullName { return fd.L1.Package } -func (fd *File) Imports() protoreflect.FileImports { return &fd.lazyInit().Imports } -func (fd *File) Enums() protoreflect.EnumDescriptors { return &fd.L1.Enums } -func (fd *File) Messages() protoreflect.MessageDescriptors { return &fd.L1.Messages } -func (fd *File) Extensions() protoreflect.ExtensionDescriptors { return &fd.L1.Extensions } -func (fd *File) Services() protoreflect.ServiceDescriptors { return &fd.L1.Services } -func (fd *File) SourceLocations() protoreflect.SourceLocations { return &fd.lazyInit().Locations } -func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } -func (fd *File) ProtoType(protoreflect.FileDescriptor) {} -func (fd *File) ProtoInternal(pragma.DoNotImplement) {} - -func (fd *File) lazyInit() *FileL2 { - if atomic.LoadUint32(&fd.once) == 0 { - fd.lazyInitOnce() - } - return fd.L2 -} - -func (fd *File) lazyInitOnce() { - fd.mu.Lock() - if fd.L2 == nil { - fd.lazyRawInit() // recursively initializes all L2 structures - } - atomic.StoreUint32(&fd.once, 1) - fd.mu.Unlock() -} - -// GoPackagePath is a pseudo-internal API for determining the Go package path -// that this file descriptor is declared in. -// -// WARNING: This method is exempt from the compatibility promise and may be -// removed in the future without warning. -func (fd *File) GoPackagePath() string { - return fd.builder.GoPackagePath -} - -type ( - Enum struct { - Base - L1 EnumL1 - L2 *EnumL2 // protected by fileDesc.once - } - EnumL1 struct { - eagerValues bool // controls whether EnumL2.Values is already populated - } - EnumL2 struct { - Options func() protoreflect.ProtoMessage - Values EnumValues - ReservedNames Names - ReservedRanges EnumRanges - } - - EnumValue struct { - Base - L1 EnumValueL1 - } - EnumValueL1 struct { - Options func() protoreflect.ProtoMessage - Number protoreflect.EnumNumber - } -) - -func (ed *Enum) Options() protoreflect.ProtoMessage { - if f := ed.lazyInit().Options; f != nil { - return f() - } - return descopts.Enum -} -func (ed *Enum) Values() protoreflect.EnumValueDescriptors { - if ed.L1.eagerValues { - return &ed.L2.Values - } - return &ed.lazyInit().Values -} -func (ed *Enum) ReservedNames() protoreflect.Names { return &ed.lazyInit().ReservedNames } -func (ed *Enum) ReservedRanges() protoreflect.EnumRanges { return &ed.lazyInit().ReservedRanges } -func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) } -func (ed *Enum) ProtoType(protoreflect.EnumDescriptor) {} -func (ed *Enum) lazyInit() *EnumL2 { - ed.L0.ParentFile.lazyInit() // implicitly initializes L2 - return ed.L2 -} - -func (ed *EnumValue) Options() protoreflect.ProtoMessage { - if f := ed.L1.Options; f != nil { - return f() - } - return descopts.EnumValue -} -func (ed *EnumValue) Number() protoreflect.EnumNumber { return ed.L1.Number } -func (ed *EnumValue) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) } -func (ed *EnumValue) ProtoType(protoreflect.EnumValueDescriptor) {} - -type ( - Message struct { - Base - L1 MessageL1 - L2 *MessageL2 // protected by fileDesc.once - } - MessageL1 struct { - Enums Enums - Messages Messages - Extensions Extensions - IsMapEntry bool // promoted from google.protobuf.MessageOptions - IsMessageSet bool // promoted from google.protobuf.MessageOptions - } - MessageL2 struct { - Options func() protoreflect.ProtoMessage - Fields Fields - Oneofs Oneofs - ReservedNames Names - ReservedRanges FieldRanges - RequiredNumbers FieldNumbers // must be consistent with Fields.Cardinality - ExtensionRanges FieldRanges - ExtensionRangeOptions []func() protoreflect.ProtoMessage // must be same length as ExtensionRanges - } - - Field struct { - Base - L1 FieldL1 - } - FieldL1 struct { - Options func() protoreflect.ProtoMessage - Number protoreflect.FieldNumber - Cardinality protoreflect.Cardinality // must be consistent with Message.RequiredNumbers - Kind protoreflect.Kind - StringName stringName - IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto - IsWeak bool // promoted from google.protobuf.FieldOptions - HasPacked bool // promoted from google.protobuf.FieldOptions - IsPacked bool // promoted from google.protobuf.FieldOptions - HasEnforceUTF8 bool // promoted from google.protobuf.FieldOptions - EnforceUTF8 bool // promoted from google.protobuf.FieldOptions - Default defaultValue - ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields - Enum protoreflect.EnumDescriptor - Message protoreflect.MessageDescriptor - - // Edition features. - Presence bool - } - - Oneof struct { - Base - L1 OneofL1 - } - OneofL1 struct { - Options func() protoreflect.ProtoMessage - Fields OneofFields // must be consistent with Message.Fields.ContainingOneof - } -) - -func (md *Message) Options() protoreflect.ProtoMessage { - if f := md.lazyInit().Options; f != nil { - return f() - } - return descopts.Message -} -func (md *Message) IsMapEntry() bool { return md.L1.IsMapEntry } -func (md *Message) Fields() protoreflect.FieldDescriptors { return &md.lazyInit().Fields } -func (md *Message) Oneofs() protoreflect.OneofDescriptors { return &md.lazyInit().Oneofs } -func (md *Message) ReservedNames() protoreflect.Names { return &md.lazyInit().ReservedNames } -func (md *Message) ReservedRanges() protoreflect.FieldRanges { return &md.lazyInit().ReservedRanges } -func (md *Message) RequiredNumbers() protoreflect.FieldNumbers { return &md.lazyInit().RequiredNumbers } -func (md *Message) ExtensionRanges() protoreflect.FieldRanges { return &md.lazyInit().ExtensionRanges } -func (md *Message) ExtensionRangeOptions(i int) protoreflect.ProtoMessage { - if f := md.lazyInit().ExtensionRangeOptions[i]; f != nil { - return f() - } - return descopts.ExtensionRange -} -func (md *Message) Enums() protoreflect.EnumDescriptors { return &md.L1.Enums } -func (md *Message) Messages() protoreflect.MessageDescriptors { return &md.L1.Messages } -func (md *Message) Extensions() protoreflect.ExtensionDescriptors { return &md.L1.Extensions } -func (md *Message) ProtoType(protoreflect.MessageDescriptor) {} -func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) } -func (md *Message) lazyInit() *MessageL2 { - md.L0.ParentFile.lazyInit() // implicitly initializes L2 - return md.L2 -} - -// IsMessageSet is a pseudo-internal API for checking whether a message -// should serialize in the proto1 message format. -// -// WARNING: This method is exempt from the compatibility promise and may be -// removed in the future without warning. -func (md *Message) IsMessageSet() bool { - return md.L1.IsMessageSet -} - -func (fd *Field) Options() protoreflect.ProtoMessage { - if f := fd.L1.Options; f != nil { - return f() - } - return descopts.Field -} -func (fd *Field) Number() protoreflect.FieldNumber { return fd.L1.Number } -func (fd *Field) Cardinality() protoreflect.Cardinality { return fd.L1.Cardinality } -func (fd *Field) Kind() protoreflect.Kind { return fd.L1.Kind } -func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON } -func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) } -func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) } -func (fd *Field) HasPresence() bool { - if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { - return fd.L1.Presence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil - } - return fd.L1.Cardinality != protoreflect.Repeated && (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 || fd.L1.Message != nil || fd.L1.ContainingOneof != nil) -} -func (fd *Field) HasOptionalKeyword() bool { - return (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional -} -func (fd *Field) IsPacked() bool { - if !fd.L1.HasPacked && fd.L0.ParentFile.L1.Syntax != protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Repeated { - switch fd.L1.Kind { - case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: - default: - return true - } - } - return fd.L1.IsPacked -} -func (fd *Field) IsExtension() bool { return false } -func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } -func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() } -func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() } -func (fd *Field) MapKey() protoreflect.FieldDescriptor { - if !fd.IsMap() { - return nil - } - return fd.Message().Fields().ByNumber(genid.MapEntry_Key_field_number) -} -func (fd *Field) MapValue() protoreflect.FieldDescriptor { - if !fd.IsMap() { - return nil - } - return fd.Message().Fields().ByNumber(genid.MapEntry_Value_field_number) -} -func (fd *Field) HasDefault() bool { return fd.L1.Default.has } -func (fd *Field) Default() protoreflect.Value { return fd.L1.Default.get(fd) } -func (fd *Field) DefaultEnumValue() protoreflect.EnumValueDescriptor { return fd.L1.Default.enum } -func (fd *Field) ContainingOneof() protoreflect.OneofDescriptor { return fd.L1.ContainingOneof } -func (fd *Field) ContainingMessage() protoreflect.MessageDescriptor { - return fd.L0.Parent.(protoreflect.MessageDescriptor) -} -func (fd *Field) Enum() protoreflect.EnumDescriptor { - return fd.L1.Enum -} -func (fd *Field) Message() protoreflect.MessageDescriptor { - if fd.L1.IsWeak { - if d, _ := protoregistry.GlobalFiles.FindDescriptorByName(fd.L1.Message.FullName()); d != nil { - return d.(protoreflect.MessageDescriptor) - } - } - return fd.L1.Message -} -func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } -func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} - -// EnforceUTF8 is a pseudo-internal API to determine whether to enforce UTF-8 -// validation for the string field. This exists for Google-internal use only -// since proto3 did not enforce UTF-8 validity prior to the open-source release. -// If this method does not exist, the default is to enforce valid UTF-8. -// -// WARNING: This method is exempt from the compatibility promise and may be -// removed in the future without warning. -func (fd *Field) EnforceUTF8() bool { - if fd.L1.HasEnforceUTF8 { - return fd.L1.EnforceUTF8 - } - return fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 -} - -func (od *Oneof) IsSynthetic() bool { - return od.L0.ParentFile.L1.Syntax == protoreflect.Proto3 && len(od.L1.Fields.List) == 1 && od.L1.Fields.List[0].HasOptionalKeyword() -} -func (od *Oneof) Options() protoreflect.ProtoMessage { - if f := od.L1.Options; f != nil { - return f() - } - return descopts.Oneof -} -func (od *Oneof) Fields() protoreflect.FieldDescriptors { return &od.L1.Fields } -func (od *Oneof) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, od) } -func (od *Oneof) ProtoType(protoreflect.OneofDescriptor) {} - -type ( - Extension struct { - Base - L1 ExtensionL1 - L2 *ExtensionL2 // protected by fileDesc.once - } - ExtensionL1 struct { - Number protoreflect.FieldNumber - Extendee protoreflect.MessageDescriptor - Cardinality protoreflect.Cardinality - Kind protoreflect.Kind - } - ExtensionL2 struct { - Options func() protoreflect.ProtoMessage - StringName stringName - IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto - IsPacked bool // promoted from google.protobuf.FieldOptions - Default defaultValue - Enum protoreflect.EnumDescriptor - Message protoreflect.MessageDescriptor - } -) - -func (xd *Extension) Options() protoreflect.ProtoMessage { - if f := xd.lazyInit().Options; f != nil { - return f() - } - return descopts.Field -} -func (xd *Extension) Number() protoreflect.FieldNumber { return xd.L1.Number } -func (xd *Extension) Cardinality() protoreflect.Cardinality { return xd.L1.Cardinality } -func (xd *Extension) Kind() protoreflect.Kind { return xd.L1.Kind } -func (xd *Extension) HasJSONName() bool { return xd.lazyInit().StringName.hasJSON } -func (xd *Extension) JSONName() string { return xd.lazyInit().StringName.getJSON(xd) } -func (xd *Extension) TextName() string { return xd.lazyInit().StringName.getText(xd) } -func (xd *Extension) HasPresence() bool { return xd.L1.Cardinality != protoreflect.Repeated } -func (xd *Extension) HasOptionalKeyword() bool { - return (xd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && xd.L1.Cardinality == protoreflect.Optional) || xd.lazyInit().IsProto3Optional -} -func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked } -func (xd *Extension) IsExtension() bool { return true } -func (xd *Extension) IsWeak() bool { return false } -func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated } -func (xd *Extension) IsMap() bool { return false } -func (xd *Extension) MapKey() protoreflect.FieldDescriptor { return nil } -func (xd *Extension) MapValue() protoreflect.FieldDescriptor { return nil } -func (xd *Extension) HasDefault() bool { return xd.lazyInit().Default.has } -func (xd *Extension) Default() protoreflect.Value { return xd.lazyInit().Default.get(xd) } -func (xd *Extension) DefaultEnumValue() protoreflect.EnumValueDescriptor { - return xd.lazyInit().Default.enum -} -func (xd *Extension) ContainingOneof() protoreflect.OneofDescriptor { return nil } -func (xd *Extension) ContainingMessage() protoreflect.MessageDescriptor { return xd.L1.Extendee } -func (xd *Extension) Enum() protoreflect.EnumDescriptor { return xd.lazyInit().Enum } -func (xd *Extension) Message() protoreflect.MessageDescriptor { return xd.lazyInit().Message } -func (xd *Extension) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, xd) } -func (xd *Extension) ProtoType(protoreflect.FieldDescriptor) {} -func (xd *Extension) ProtoInternal(pragma.DoNotImplement) {} -func (xd *Extension) lazyInit() *ExtensionL2 { - xd.L0.ParentFile.lazyInit() // implicitly initializes L2 - return xd.L2 -} - -type ( - Service struct { - Base - L1 ServiceL1 - L2 *ServiceL2 // protected by fileDesc.once - } - ServiceL1 struct{} - ServiceL2 struct { - Options func() protoreflect.ProtoMessage - Methods Methods - } - - Method struct { - Base - L1 MethodL1 - } - MethodL1 struct { - Options func() protoreflect.ProtoMessage - Input protoreflect.MessageDescriptor - Output protoreflect.MessageDescriptor - IsStreamingClient bool - IsStreamingServer bool - } -) - -func (sd *Service) Options() protoreflect.ProtoMessage { - if f := sd.lazyInit().Options; f != nil { - return f() - } - return descopts.Service -} -func (sd *Service) Methods() protoreflect.MethodDescriptors { return &sd.lazyInit().Methods } -func (sd *Service) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, sd) } -func (sd *Service) ProtoType(protoreflect.ServiceDescriptor) {} -func (sd *Service) ProtoInternal(pragma.DoNotImplement) {} -func (sd *Service) lazyInit() *ServiceL2 { - sd.L0.ParentFile.lazyInit() // implicitly initializes L2 - return sd.L2 -} - -func (md *Method) Options() protoreflect.ProtoMessage { - if f := md.L1.Options; f != nil { - return f() - } - return descopts.Method -} -func (md *Method) Input() protoreflect.MessageDescriptor { return md.L1.Input } -func (md *Method) Output() protoreflect.MessageDescriptor { return md.L1.Output } -func (md *Method) IsStreamingClient() bool { return md.L1.IsStreamingClient } -func (md *Method) IsStreamingServer() bool { return md.L1.IsStreamingServer } -func (md *Method) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) } -func (md *Method) ProtoType(protoreflect.MethodDescriptor) {} -func (md *Method) ProtoInternal(pragma.DoNotImplement) {} - -// Surrogate files are can be used to create standalone descriptors -// where the syntax is only information derived from the parent file. -var ( - SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}} - SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}} -) - -type ( - Base struct { - L0 BaseL0 - } - BaseL0 struct { - FullName protoreflect.FullName // must be populated - ParentFile *File // must be populated - Parent protoreflect.Descriptor - Index int - } -) - -func (d *Base) Name() protoreflect.Name { return d.L0.FullName.Name() } -func (d *Base) FullName() protoreflect.FullName { return d.L0.FullName } -func (d *Base) ParentFile() protoreflect.FileDescriptor { - if d.L0.ParentFile == SurrogateProto2 || d.L0.ParentFile == SurrogateProto3 { - return nil // surrogate files are not real parents - } - return d.L0.ParentFile -} -func (d *Base) Parent() protoreflect.Descriptor { return d.L0.Parent } -func (d *Base) Index() int { return d.L0.Index } -func (d *Base) Syntax() protoreflect.Syntax { return d.L0.ParentFile.Syntax() } -func (d *Base) IsPlaceholder() bool { return false } -func (d *Base) ProtoInternal(pragma.DoNotImplement) {} - -type stringName struct { - hasJSON bool - once sync.Once - nameJSON string - nameText string -} - -// InitJSON initializes the name. It is exported for use by other internal packages. -func (s *stringName) InitJSON(name string) { - s.hasJSON = true - s.nameJSON = name -} - -func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName { - s.once.Do(func() { - if fd.IsExtension() { - // For extensions, JSON and text are formatted the same way. - var name string - if messageset.IsMessageSetExtension(fd) { - name = string("[" + fd.FullName().Parent() + "]") - } else { - name = string("[" + fd.FullName() + "]") - } - s.nameJSON = name - s.nameText = name - } else { - // Format the JSON name. - if !s.hasJSON { - s.nameJSON = strs.JSONCamelCase(string(fd.Name())) - } - - // Format the text name. - s.nameText = string(fd.Name()) - if fd.Kind() == protoreflect.GroupKind { - s.nameText = string(fd.Message().Name()) - } - } - }) - return s -} - -func (s *stringName) getJSON(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameJSON } -func (s *stringName) getText(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameText } - -func DefaultValue(v protoreflect.Value, ev protoreflect.EnumValueDescriptor) defaultValue { - dv := defaultValue{has: v.IsValid(), val: v, enum: ev} - if b, ok := v.Interface().([]byte); ok { - // Store a copy of the default bytes, so that we can detect - // accidental mutations of the original value. - dv.bytes = append([]byte(nil), b...) - } - return dv -} - -func unmarshalDefault(b []byte, k protoreflect.Kind, pf *File, ed protoreflect.EnumDescriptor) defaultValue { - var evs protoreflect.EnumValueDescriptors - if k == protoreflect.EnumKind { - // If the enum is declared within the same file, be careful not to - // blindly call the Values method, lest we bind ourselves in a deadlock. - if e, ok := ed.(*Enum); ok && e.L0.ParentFile == pf { - evs = &e.L2.Values - } else { - evs = ed.Values() - } - - // If we are unable to resolve the enum dependency, use a placeholder - // enum value since we will not be able to parse the default value. - if ed.IsPlaceholder() && protoreflect.Name(b).IsValid() { - v := protoreflect.ValueOfEnum(0) - ev := PlaceholderEnumValue(ed.FullName().Parent().Append(protoreflect.Name(b))) - return DefaultValue(v, ev) - } - } - - v, ev, err := defval.Unmarshal(string(b), k, evs, defval.Descriptor) - if err != nil { - panic(err) - } - return DefaultValue(v, ev) -} - -type defaultValue struct { - has bool - val protoreflect.Value - enum protoreflect.EnumValueDescriptor - bytes []byte -} - -func (dv *defaultValue) get(fd protoreflect.FieldDescriptor) protoreflect.Value { - // Return the zero value as the default if unpopulated. - if !dv.has { - if fd.Cardinality() == protoreflect.Repeated { - return protoreflect.Value{} - } - switch fd.Kind() { - case protoreflect.BoolKind: - return protoreflect.ValueOfBool(false) - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - return protoreflect.ValueOfInt32(0) - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - return protoreflect.ValueOfInt64(0) - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - return protoreflect.ValueOfUint32(0) - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - return protoreflect.ValueOfUint64(0) - case protoreflect.FloatKind: - return protoreflect.ValueOfFloat32(0) - case protoreflect.DoubleKind: - return protoreflect.ValueOfFloat64(0) - case protoreflect.StringKind: - return protoreflect.ValueOfString("") - case protoreflect.BytesKind: - return protoreflect.ValueOfBytes(nil) - case protoreflect.EnumKind: - if evs := fd.Enum().Values(); evs.Len() > 0 { - return protoreflect.ValueOfEnum(evs.Get(0).Number()) - } - return protoreflect.ValueOfEnum(0) - } - } - - if len(dv.bytes) > 0 && !bytes.Equal(dv.bytes, dv.val.Bytes()) { - // TODO: Avoid panic if we're running with the race detector - // and instead spawn a goroutine that periodically resets - // this value back to the original to induce a race. - panic(fmt.Sprintf("detected mutation on the default bytes for %v", fd.FullName())) - } - return dv.val -} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go deleted file mode 100644 index 4a1584c9..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ /dev/null @@ -1,471 +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 filedesc - -import ( - "sync" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// fileRaw is a data struct used when initializing a file descriptor from -// a raw FileDescriptorProto. -type fileRaw struct { - builder Builder - allEnums []Enum - allMessages []Message - allExtensions []Extension - allServices []Service -} - -func newRawFile(db Builder) *File { - fd := &File{fileRaw: fileRaw{builder: db}} - fd.initDecls(db.NumEnums, db.NumMessages, db.NumExtensions, db.NumServices) - fd.unmarshalSeed(db.RawDescriptor) - - // Extended message targets are eagerly resolved since registration - // needs this information at program init time. - for i := range fd.allExtensions { - xd := &fd.allExtensions[i] - xd.L1.Extendee = fd.resolveMessageDependency(xd.L1.Extendee, listExtTargets, int32(i)) - } - - fd.checkDecls() - return fd -} - -// initDecls pre-allocates slices for the exact number of enums, messages -// (including map entries), extensions, and services declared in the proto file. -// This is done to avoid regrowing the slice, which would change the address -// for any previously seen declaration. -// -// The alloc methods "allocates" slices by pulling from the capacity. -func (fd *File) initDecls(numEnums, numMessages, numExtensions, numServices int32) { - fd.allEnums = make([]Enum, 0, numEnums) - fd.allMessages = make([]Message, 0, numMessages) - fd.allExtensions = make([]Extension, 0, numExtensions) - fd.allServices = make([]Service, 0, numServices) -} - -func (fd *File) allocEnums(n int) []Enum { - total := len(fd.allEnums) - es := fd.allEnums[total : total+n] - fd.allEnums = fd.allEnums[:total+n] - return es -} -func (fd *File) allocMessages(n int) []Message { - total := len(fd.allMessages) - ms := fd.allMessages[total : total+n] - fd.allMessages = fd.allMessages[:total+n] - return ms -} -func (fd *File) allocExtensions(n int) []Extension { - total := len(fd.allExtensions) - xs := fd.allExtensions[total : total+n] - fd.allExtensions = fd.allExtensions[:total+n] - return xs -} -func (fd *File) allocServices(n int) []Service { - total := len(fd.allServices) - xs := fd.allServices[total : total+n] - fd.allServices = fd.allServices[:total+n] - return xs -} - -// checkDecls performs a sanity check that the expected number of expected -// declarations matches the number that were found in the descriptor proto. -func (fd *File) checkDecls() { - switch { - case len(fd.allEnums) != cap(fd.allEnums): - case len(fd.allMessages) != cap(fd.allMessages): - case len(fd.allExtensions) != cap(fd.allExtensions): - case len(fd.allServices) != cap(fd.allServices): - default: - return - } - panic("mismatching cardinality") -} - -func (fd *File) unmarshalSeed(b []byte) { - sb := getBuilder() - defer putBuilder(sb) - - var prevField protoreflect.FieldNumber - var numEnums, numMessages, numExtensions, numServices int - var posEnums, posMessages, posExtensions, posServices int - b0 := b - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FileDescriptorProto_Syntax_field_number: - switch string(v) { - case "proto2": - fd.L1.Syntax = protoreflect.Proto2 - case "proto3": - fd.L1.Syntax = protoreflect.Proto3 - default: - panic("invalid syntax") - } - case genid.FileDescriptorProto_Name_field_number: - fd.L1.Path = sb.MakeString(v) - case genid.FileDescriptorProto_Package_field_number: - fd.L1.Package = protoreflect.FullName(sb.MakeString(v)) - case genid.FileDescriptorProto_EnumType_field_number: - if prevField != genid.FileDescriptorProto_EnumType_field_number { - if numEnums > 0 { - panic("non-contiguous repeated field") - } - posEnums = len(b0) - len(b) - n - m - } - numEnums++ - case genid.FileDescriptorProto_MessageType_field_number: - if prevField != genid.FileDescriptorProto_MessageType_field_number { - if numMessages > 0 { - panic("non-contiguous repeated field") - } - posMessages = len(b0) - len(b) - n - m - } - numMessages++ - case genid.FileDescriptorProto_Extension_field_number: - if prevField != genid.FileDescriptorProto_Extension_field_number { - if numExtensions > 0 { - panic("non-contiguous repeated field") - } - posExtensions = len(b0) - len(b) - n - m - } - numExtensions++ - case genid.FileDescriptorProto_Service_field_number: - if prevField != genid.FileDescriptorProto_Service_field_number { - if numServices > 0 { - panic("non-contiguous repeated field") - } - posServices = len(b0) - len(b) - n - m - } - numServices++ - } - prevField = num - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - prevField = -1 // ignore known field numbers of unknown wire type - } - } - - // If syntax is missing, it is assumed to be proto2. - if fd.L1.Syntax == 0 { - fd.L1.Syntax = protoreflect.Proto2 - } - - // Must allocate all declarations before parsing each descriptor type - // to ensure we handled all descriptors in "flattened ordering". - if numEnums > 0 { - fd.L1.Enums.List = fd.allocEnums(numEnums) - } - if numMessages > 0 { - fd.L1.Messages.List = fd.allocMessages(numMessages) - } - if numExtensions > 0 { - fd.L1.Extensions.List = fd.allocExtensions(numExtensions) - } - if numServices > 0 { - fd.L1.Services.List = fd.allocServices(numServices) - } - - if numEnums > 0 { - b := b0[posEnums:] - for i := range fd.L1.Enums.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - fd.L1.Enums.List[i].unmarshalSeed(v, sb, fd, fd, i) - b = b[n+m:] - } - } - if numMessages > 0 { - b := b0[posMessages:] - for i := range fd.L1.Messages.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - fd.L1.Messages.List[i].unmarshalSeed(v, sb, fd, fd, i) - b = b[n+m:] - } - } - if numExtensions > 0 { - b := b0[posExtensions:] - for i := range fd.L1.Extensions.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - fd.L1.Extensions.List[i].unmarshalSeed(v, sb, fd, fd, i) - b = b[n+m:] - } - } - if numServices > 0 { - b := b0[posServices:] - for i := range fd.L1.Services.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - fd.L1.Services.List[i].unmarshalSeed(v, sb, fd, fd, i) - b = b[n+m:] - } - } -} - -func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - ed.L0.ParentFile = pf - ed.L0.Parent = pd - ed.L0.Index = i - - var numValues int - for b := b; len(b) > 0; { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.EnumDescriptorProto_Name_field_number: - ed.L0.FullName = appendFullName(sb, pd.FullName(), v) - case genid.EnumDescriptorProto_Value_field_number: - numValues++ - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - - // Only construct enum value descriptors for top-level enums since - // they are needed for registration. - if pd != pf { - return - } - ed.L1.eagerValues = true - ed.L2 = new(EnumL2) - ed.L2.Values.List = make([]EnumValue, numValues) - for i := 0; len(b) > 0; { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.EnumDescriptorProto_Value_field_number: - ed.L2.Values.List[i].unmarshalFull(v, sb, pf, ed, i) - i++ - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - md.L0.ParentFile = pf - md.L0.Parent = pd - md.L0.Index = i - - var prevField protoreflect.FieldNumber - var numEnums, numMessages, numExtensions int - var posEnums, posMessages, posExtensions int - b0 := b - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.DescriptorProto_Name_field_number: - md.L0.FullName = appendFullName(sb, pd.FullName(), v) - case genid.DescriptorProto_EnumType_field_number: - if prevField != genid.DescriptorProto_EnumType_field_number { - if numEnums > 0 { - panic("non-contiguous repeated field") - } - posEnums = len(b0) - len(b) - n - m - } - numEnums++ - case genid.DescriptorProto_NestedType_field_number: - if prevField != genid.DescriptorProto_NestedType_field_number { - if numMessages > 0 { - panic("non-contiguous repeated field") - } - posMessages = len(b0) - len(b) - n - m - } - numMessages++ - case genid.DescriptorProto_Extension_field_number: - if prevField != genid.DescriptorProto_Extension_field_number { - if numExtensions > 0 { - panic("non-contiguous repeated field") - } - posExtensions = len(b0) - len(b) - n - m - } - numExtensions++ - case genid.DescriptorProto_Options_field_number: - md.unmarshalSeedOptions(v) - } - prevField = num - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - prevField = -1 // ignore known field numbers of unknown wire type - } - } - - // Must allocate all declarations before parsing each descriptor type - // to ensure we handled all descriptors in "flattened ordering". - if numEnums > 0 { - md.L1.Enums.List = pf.allocEnums(numEnums) - } - if numMessages > 0 { - md.L1.Messages.List = pf.allocMessages(numMessages) - } - if numExtensions > 0 { - md.L1.Extensions.List = pf.allocExtensions(numExtensions) - } - - if numEnums > 0 { - b := b0[posEnums:] - for i := range md.L1.Enums.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - md.L1.Enums.List[i].unmarshalSeed(v, sb, pf, md, i) - b = b[n+m:] - } - } - if numMessages > 0 { - b := b0[posMessages:] - for i := range md.L1.Messages.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - md.L1.Messages.List[i].unmarshalSeed(v, sb, pf, md, i) - b = b[n+m:] - } - } - if numExtensions > 0 { - b := b0[posExtensions:] - for i := range md.L1.Extensions.List { - _, n := protowire.ConsumeVarint(b) - v, m := protowire.ConsumeBytes(b[n:]) - md.L1.Extensions.List[i].unmarshalSeed(v, sb, pf, md, i) - b = b[n+m:] - } - } -} - -func (md *Message) unmarshalSeedOptions(b []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.MessageOptions_MapEntry_field_number: - md.L1.IsMapEntry = protowire.DecodeBool(v) - case genid.MessageOptions_MessageSetWireFormat_field_number: - md.L1.IsMessageSet = protowire.DecodeBool(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - xd.L0.ParentFile = pf - xd.L0.Parent = pd - xd.L0.Index = i - - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldDescriptorProto_Number_field_number: - xd.L1.Number = protoreflect.FieldNumber(v) - case genid.FieldDescriptorProto_Label_field_number: - xd.L1.Cardinality = protoreflect.Cardinality(v) - case genid.FieldDescriptorProto_Type_field_number: - xd.L1.Kind = protoreflect.Kind(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FieldDescriptorProto_Name_field_number: - xd.L0.FullName = appendFullName(sb, pd.FullName(), v) - case genid.FieldDescriptorProto_Extendee_field_number: - xd.L1.Extendee = PlaceholderMessage(makeFullName(sb, v)) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - sd.L0.ParentFile = pf - sd.L0.Parent = pd - sd.L0.Index = i - - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.ServiceDescriptorProto_Name_field_number: - sd.L0.FullName = appendFullName(sb, pd.FullName(), v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -var nameBuilderPool = sync.Pool{ - New: func() interface{} { return new(strs.Builder) }, -} - -func getBuilder() *strs.Builder { - return nameBuilderPool.Get().(*strs.Builder) -} -func putBuilder(b *strs.Builder) { - nameBuilderPool.Put(b) -} - -// makeFullName converts b to a protoreflect.FullName, -// where b must start with a leading dot. -func makeFullName(sb *strs.Builder, b []byte) protoreflect.FullName { - if len(b) == 0 || b[0] != '.' { - panic("name reference must be fully qualified") - } - return protoreflect.FullName(sb.MakeString(b[1:])) -} - -func appendFullName(sb *strs.Builder, prefix protoreflect.FullName, suffix []byte) protoreflect.FullName { - return sb.AppendFullName(prefix, protoreflect.Name(strs.UnsafeString(suffix))) -} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go deleted file mode 100644 index 736a19a7..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ /dev/null @@ -1,704 +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 filedesc - -import ( - "reflect" - "sync" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/descopts" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (fd *File) lazyRawInit() { - fd.unmarshalFull(fd.builder.RawDescriptor) - fd.resolveMessages() - fd.resolveExtensions() - fd.resolveServices() -} - -func (file *File) resolveMessages() { - var depIdx int32 - for i := range file.allMessages { - md := &file.allMessages[i] - - // Resolve message field dependencies. - for j := range md.L2.Fields.List { - fd := &md.L2.Fields.List[j] - - // Weak fields are resolved upon actual use. - if fd.L1.IsWeak { - continue - } - - // Resolve message field dependency. - switch fd.L1.Kind { - case protoreflect.EnumKind: - fd.L1.Enum = file.resolveEnumDependency(fd.L1.Enum, listFieldDeps, depIdx) - depIdx++ - case protoreflect.MessageKind, protoreflect.GroupKind: - fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) - depIdx++ - } - - // Default is resolved here since it depends on Enum being resolved. - if v := fd.L1.Default.val; v.IsValid() { - fd.L1.Default = unmarshalDefault(v.Bytes(), fd.L1.Kind, file, fd.L1.Enum) - } - } - } -} - -func (file *File) resolveExtensions() { - var depIdx int32 - for i := range file.allExtensions { - xd := &file.allExtensions[i] - - // Resolve extension field dependency. - switch xd.L1.Kind { - case protoreflect.EnumKind: - xd.L2.Enum = file.resolveEnumDependency(xd.L2.Enum, listExtDeps, depIdx) - depIdx++ - case protoreflect.MessageKind, protoreflect.GroupKind: - xd.L2.Message = file.resolveMessageDependency(xd.L2.Message, listExtDeps, depIdx) - depIdx++ - } - - // Default is resolved here since it depends on Enum being resolved. - if v := xd.L2.Default.val; v.IsValid() { - xd.L2.Default = unmarshalDefault(v.Bytes(), xd.L1.Kind, file, xd.L2.Enum) - } - } -} - -func (file *File) resolveServices() { - var depIdx int32 - for i := range file.allServices { - sd := &file.allServices[i] - - // Resolve method dependencies. - for j := range sd.L2.Methods.List { - md := &sd.L2.Methods.List[j] - md.L1.Input = file.resolveMessageDependency(md.L1.Input, listMethInDeps, depIdx) - md.L1.Output = file.resolveMessageDependency(md.L1.Output, listMethOutDeps, depIdx) - depIdx++ - } - } -} - -func (file *File) resolveEnumDependency(ed protoreflect.EnumDescriptor, i, j int32) protoreflect.EnumDescriptor { - r := file.builder.FileRegistry - if r, ok := r.(resolverByIndex); ok { - if ed2 := r.FindEnumByIndex(i, j, file.allEnums, file.allMessages); ed2 != nil { - return ed2 - } - } - for i := range file.allEnums { - if ed2 := &file.allEnums[i]; ed2.L0.FullName == ed.FullName() { - return ed2 - } - } - if d, _ := r.FindDescriptorByName(ed.FullName()); d != nil { - return d.(protoreflect.EnumDescriptor) - } - return ed -} - -func (file *File) resolveMessageDependency(md protoreflect.MessageDescriptor, i, j int32) protoreflect.MessageDescriptor { - r := file.builder.FileRegistry - if r, ok := r.(resolverByIndex); ok { - if md2 := r.FindMessageByIndex(i, j, file.allEnums, file.allMessages); md2 != nil { - return md2 - } - } - for i := range file.allMessages { - if md2 := &file.allMessages[i]; md2.L0.FullName == md.FullName() { - return md2 - } - } - if d, _ := r.FindDescriptorByName(md.FullName()); d != nil { - return d.(protoreflect.MessageDescriptor) - } - return md -} - -func (fd *File) unmarshalFull(b []byte) { - sb := getBuilder() - defer putBuilder(sb) - - var enumIdx, messageIdx, extensionIdx, serviceIdx int - var rawOptions []byte - fd.L2 = new(FileL2) - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FileDescriptorProto_PublicDependency_field_number: - fd.L2.Imports[v].IsPublic = true - case genid.FileDescriptorProto_WeakDependency_field_number: - fd.L2.Imports[v].IsWeak = true - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FileDescriptorProto_Dependency_field_number: - path := sb.MakeString(v) - imp, _ := fd.builder.FileRegistry.FindFileByPath(path) - if imp == nil { - imp = PlaceholderFile(path) - } - fd.L2.Imports = append(fd.L2.Imports, protoreflect.FileImport{FileDescriptor: imp}) - case genid.FileDescriptorProto_EnumType_field_number: - fd.L1.Enums.List[enumIdx].unmarshalFull(v, sb) - enumIdx++ - case genid.FileDescriptorProto_MessageType_field_number: - fd.L1.Messages.List[messageIdx].unmarshalFull(v, sb) - messageIdx++ - case genid.FileDescriptorProto_Extension_field_number: - fd.L1.Extensions.List[extensionIdx].unmarshalFull(v, sb) - extensionIdx++ - case genid.FileDescriptorProto_Service_field_number: - fd.L1.Services.List[serviceIdx].unmarshalFull(v, sb) - serviceIdx++ - case genid.FileDescriptorProto_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - fd.L2.Options = fd.builder.optionsUnmarshaler(&descopts.File, rawOptions) -} - -func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) { - var rawValues [][]byte - var rawOptions []byte - if !ed.L1.eagerValues { - ed.L2 = new(EnumL2) - } - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.EnumDescriptorProto_Value_field_number: - rawValues = append(rawValues, v) - case genid.EnumDescriptorProto_ReservedName_field_number: - ed.L2.ReservedNames.List = append(ed.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v))) - case genid.EnumDescriptorProto_ReservedRange_field_number: - ed.L2.ReservedRanges.List = append(ed.L2.ReservedRanges.List, unmarshalEnumReservedRange(v)) - case genid.EnumDescriptorProto_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - if !ed.L1.eagerValues && len(rawValues) > 0 { - ed.L2.Values.List = make([]EnumValue, len(rawValues)) - for i, b := range rawValues { - ed.L2.Values.List[i].unmarshalFull(b, sb, ed.L0.ParentFile, ed, i) - } - } - ed.L2.Options = ed.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Enum, rawOptions) -} - -func unmarshalEnumReservedRange(b []byte) (r [2]protoreflect.EnumNumber) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.EnumDescriptorProto_EnumReservedRange_Start_field_number: - r[0] = protoreflect.EnumNumber(v) - case genid.EnumDescriptorProto_EnumReservedRange_End_field_number: - r[1] = protoreflect.EnumNumber(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - return r -} - -func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - vd.L0.ParentFile = pf - vd.L0.Parent = pd - vd.L0.Index = i - - var rawOptions []byte - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.EnumValueDescriptorProto_Number_field_number: - vd.L1.Number = protoreflect.EnumNumber(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.EnumValueDescriptorProto_Name_field_number: - // NOTE: Enum values are in the same scope as the enum parent. - vd.L0.FullName = appendFullName(sb, pd.Parent().FullName(), v) - case genid.EnumValueDescriptorProto_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - vd.L1.Options = pf.builder.optionsUnmarshaler(&descopts.EnumValue, rawOptions) -} - -func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) { - var rawFields, rawOneofs [][]byte - var enumIdx, messageIdx, extensionIdx int - var rawOptions []byte - md.L2 = new(MessageL2) - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.DescriptorProto_Field_field_number: - rawFields = append(rawFields, v) - case genid.DescriptorProto_OneofDecl_field_number: - rawOneofs = append(rawOneofs, v) - case genid.DescriptorProto_ReservedName_field_number: - md.L2.ReservedNames.List = append(md.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v))) - case genid.DescriptorProto_ReservedRange_field_number: - md.L2.ReservedRanges.List = append(md.L2.ReservedRanges.List, unmarshalMessageReservedRange(v)) - case genid.DescriptorProto_ExtensionRange_field_number: - r, rawOptions := unmarshalMessageExtensionRange(v) - opts := md.L0.ParentFile.builder.optionsUnmarshaler(&descopts.ExtensionRange, rawOptions) - md.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, r) - md.L2.ExtensionRangeOptions = append(md.L2.ExtensionRangeOptions, opts) - case genid.DescriptorProto_EnumType_field_number: - md.L1.Enums.List[enumIdx].unmarshalFull(v, sb) - enumIdx++ - case genid.DescriptorProto_NestedType_field_number: - md.L1.Messages.List[messageIdx].unmarshalFull(v, sb) - messageIdx++ - case genid.DescriptorProto_Extension_field_number: - md.L1.Extensions.List[extensionIdx].unmarshalFull(v, sb) - extensionIdx++ - case genid.DescriptorProto_Options_field_number: - md.unmarshalOptions(v) - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - if len(rawFields) > 0 || len(rawOneofs) > 0 { - md.L2.Fields.List = make([]Field, len(rawFields)) - md.L2.Oneofs.List = make([]Oneof, len(rawOneofs)) - for i, b := range rawFields { - fd := &md.L2.Fields.List[i] - fd.unmarshalFull(b, sb, md.L0.ParentFile, md, i) - if fd.L1.Cardinality == protoreflect.Required { - md.L2.RequiredNumbers.List = append(md.L2.RequiredNumbers.List, fd.L1.Number) - } - } - for i, b := range rawOneofs { - od := &md.L2.Oneofs.List[i] - od.unmarshalFull(b, sb, md.L0.ParentFile, md, i) - } - } - md.L2.Options = md.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Message, rawOptions) -} - -func (md *Message) unmarshalOptions(b []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.MessageOptions_MapEntry_field_number: - md.L1.IsMapEntry = protowire.DecodeBool(v) - case genid.MessageOptions_MessageSetWireFormat_field_number: - md.L1.IsMessageSet = protowire.DecodeBool(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -func unmarshalMessageReservedRange(b []byte) (r [2]protoreflect.FieldNumber) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.DescriptorProto_ReservedRange_Start_field_number: - r[0] = protoreflect.FieldNumber(v) - case genid.DescriptorProto_ReservedRange_End_field_number: - r[1] = protoreflect.FieldNumber(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - return r -} - -func unmarshalMessageExtensionRange(b []byte) (r [2]protoreflect.FieldNumber, rawOptions []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.DescriptorProto_ExtensionRange_Start_field_number: - r[0] = protoreflect.FieldNumber(v) - case genid.DescriptorProto_ExtensionRange_End_field_number: - r[1] = protoreflect.FieldNumber(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.DescriptorProto_ExtensionRange_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - return r, rawOptions -} - -func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - fd.L0.ParentFile = pf - fd.L0.Parent = pd - fd.L0.Index = i - - var rawTypeName []byte - var rawOptions []byte - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldDescriptorProto_Number_field_number: - fd.L1.Number = protoreflect.FieldNumber(v) - case genid.FieldDescriptorProto_Label_field_number: - fd.L1.Cardinality = protoreflect.Cardinality(v) - case genid.FieldDescriptorProto_Type_field_number: - fd.L1.Kind = protoreflect.Kind(v) - case genid.FieldDescriptorProto_OneofIndex_field_number: - // In Message.unmarshalFull, we allocate slices for both - // the field and oneof descriptors before unmarshaling either - // of them. This ensures pointers to slice elements are stable. - od := &pd.(*Message).L2.Oneofs.List[v] - od.L1.Fields.List = append(od.L1.Fields.List, fd) - if fd.L1.ContainingOneof != nil { - panic("oneof type already set") - } - fd.L1.ContainingOneof = od - case genid.FieldDescriptorProto_Proto3Optional_field_number: - fd.L1.IsProto3Optional = protowire.DecodeBool(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FieldDescriptorProto_Name_field_number: - fd.L0.FullName = appendFullName(sb, pd.FullName(), v) - case genid.FieldDescriptorProto_JsonName_field_number: - fd.L1.StringName.InitJSON(sb.MakeString(v)) - case genid.FieldDescriptorProto_DefaultValue_field_number: - fd.L1.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveMessages - case genid.FieldDescriptorProto_TypeName_field_number: - rawTypeName = v - case genid.FieldDescriptorProto_Options_field_number: - fd.unmarshalOptions(v) - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - if rawTypeName != nil { - name := makeFullName(sb, rawTypeName) - switch fd.L1.Kind { - case protoreflect.EnumKind: - fd.L1.Enum = PlaceholderEnum(name) - case protoreflect.MessageKind, protoreflect.GroupKind: - fd.L1.Message = PlaceholderMessage(name) - } - } - fd.L1.Options = pf.builder.optionsUnmarshaler(&descopts.Field, rawOptions) -} - -func (fd *Field) unmarshalOptions(b []byte) { - const FieldOptions_EnforceUTF8 = 13 - - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldOptions_Packed_field_number: - fd.L1.HasPacked = true - fd.L1.IsPacked = protowire.DecodeBool(v) - case genid.FieldOptions_Weak_field_number: - fd.L1.IsWeak = protowire.DecodeBool(v) - case FieldOptions_EnforceUTF8: - fd.L1.HasEnforceUTF8 = true - fd.L1.EnforceUTF8 = protowire.DecodeBool(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - od.L0.ParentFile = pf - od.L0.Parent = pd - od.L0.Index = i - - var rawOptions []byte - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.OneofDescriptorProto_Name_field_number: - od.L0.FullName = appendFullName(sb, pd.FullName(), v) - case genid.OneofDescriptorProto_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - od.L1.Options = pf.builder.optionsUnmarshaler(&descopts.Oneof, rawOptions) -} - -func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { - var rawTypeName []byte - var rawOptions []byte - xd.L2 = new(ExtensionL2) - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldDescriptorProto_Proto3Optional_field_number: - xd.L2.IsProto3Optional = protowire.DecodeBool(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FieldDescriptorProto_JsonName_field_number: - xd.L2.StringName.InitJSON(sb.MakeString(v)) - case genid.FieldDescriptorProto_DefaultValue_field_number: - xd.L2.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveExtensions - case genid.FieldDescriptorProto_TypeName_field_number: - rawTypeName = v - case genid.FieldDescriptorProto_Options_field_number: - xd.unmarshalOptions(v) - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - if rawTypeName != nil { - name := makeFullName(sb, rawTypeName) - switch xd.L1.Kind { - case protoreflect.EnumKind: - xd.L2.Enum = PlaceholderEnum(name) - case protoreflect.MessageKind, protoreflect.GroupKind: - xd.L2.Message = PlaceholderMessage(name) - } - } - xd.L2.Options = xd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Field, rawOptions) -} - -func (xd *Extension) unmarshalOptions(b []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldOptions_Packed_field_number: - xd.L2.IsPacked = protowire.DecodeBool(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - -func (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) { - var rawMethods [][]byte - var rawOptions []byte - sd.L2 = new(ServiceL2) - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.ServiceDescriptorProto_Method_field_number: - rawMethods = append(rawMethods, v) - case genid.ServiceDescriptorProto_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - if len(rawMethods) > 0 { - sd.L2.Methods.List = make([]Method, len(rawMethods)) - for i, b := range rawMethods { - sd.L2.Methods.List[i].unmarshalFull(b, sb, sd.L0.ParentFile, sd, i) - } - } - sd.L2.Options = sd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Service, rawOptions) -} - -func (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { - md.L0.ParentFile = pf - md.L0.Parent = pd - md.L0.Index = i - - var rawOptions []byte - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.MethodDescriptorProto_ClientStreaming_field_number: - md.L1.IsStreamingClient = protowire.DecodeBool(v) - case genid.MethodDescriptorProto_ServerStreaming_field_number: - md.L1.IsStreamingServer = protowire.DecodeBool(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.MethodDescriptorProto_Name_field_number: - md.L0.FullName = appendFullName(sb, pd.FullName(), v) - case genid.MethodDescriptorProto_InputType_field_number: - md.L1.Input = PlaceholderMessage(makeFullName(sb, v)) - case genid.MethodDescriptorProto_OutputType_field_number: - md.L1.Output = PlaceholderMessage(makeFullName(sb, v)) - case genid.MethodDescriptorProto_Options_field_number: - rawOptions = appendOptions(rawOptions, v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } - md.L1.Options = pf.builder.optionsUnmarshaler(&descopts.Method, rawOptions) -} - -// appendOptions appends src to dst, where the returned slice is never nil. -// This is necessary to distinguish between empty and unpopulated options. -func appendOptions(dst, src []byte) []byte { - if dst == nil { - dst = []byte{} - } - return append(dst, src...) -} - -// optionsUnmarshaler constructs a lazy unmarshal function for an options message. -// -// The type of message to unmarshal to is passed as a pointer since the -// vars in descopts may not yet be populated at the time this function is called. -func (db *Builder) optionsUnmarshaler(p *protoreflect.ProtoMessage, b []byte) func() protoreflect.ProtoMessage { - if b == nil { - return nil - } - var opts protoreflect.ProtoMessage - var once sync.Once - return func() protoreflect.ProtoMessage { - once.Do(func() { - if *p == nil { - panic("Descriptor.Options called without importing the descriptor package") - } - opts = reflect.New(reflect.TypeOf(*p).Elem()).Interface().(protoreflect.ProtoMessage) - if err := (proto.UnmarshalOptions{ - AllowPartial: true, - Resolver: db.TypeResolver, - }).Unmarshal(b, opts); err != nil { - panic(err) - } - }) - return opts - } -} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go deleted file mode 100644 index e3b6587d..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go +++ /dev/null @@ -1,457 +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 filedesc - -import ( - "fmt" - "math" - "sort" - "sync" - - "google.golang.org/protobuf/internal/genid" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/descfmt" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type FileImports []protoreflect.FileImport - -func (p *FileImports) Len() int { return len(*p) } -func (p *FileImports) Get(i int) protoreflect.FileImport { return (*p)[i] } -func (p *FileImports) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *FileImports) ProtoInternal(pragma.DoNotImplement) {} - -type Names struct { - List []protoreflect.Name - once sync.Once - has map[protoreflect.Name]int // protected by once -} - -func (p *Names) Len() int { return len(p.List) } -func (p *Names) Get(i int) protoreflect.Name { return p.List[i] } -func (p *Names) Has(s protoreflect.Name) bool { return p.lazyInit().has[s] > 0 } -func (p *Names) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *Names) ProtoInternal(pragma.DoNotImplement) {} -func (p *Names) lazyInit() *Names { - p.once.Do(func() { - if len(p.List) > 0 { - p.has = make(map[protoreflect.Name]int, len(p.List)) - for _, s := range p.List { - p.has[s] = p.has[s] + 1 - } - } - }) - return p -} - -// CheckValid reports any errors with the set of names with an error message -// that completes the sentence: "ranges is invalid because it has ..." -func (p *Names) CheckValid() error { - for s, n := range p.lazyInit().has { - switch { - case n > 1: - return errors.New("duplicate name: %q", s) - case false && !s.IsValid(): - // NOTE: The C++ implementation does not validate the identifier. - // See https://github.com/protocolbuffers/protobuf/issues/6335. - return errors.New("invalid name: %q", s) - } - } - return nil -} - -type EnumRanges struct { - List [][2]protoreflect.EnumNumber // start inclusive; end inclusive - once sync.Once - sorted [][2]protoreflect.EnumNumber // protected by once -} - -func (p *EnumRanges) Len() int { return len(p.List) } -func (p *EnumRanges) Get(i int) [2]protoreflect.EnumNumber { return p.List[i] } -func (p *EnumRanges) Has(n protoreflect.EnumNumber) bool { - for ls := p.lazyInit().sorted; len(ls) > 0; { - i := len(ls) / 2 - switch r := enumRange(ls[i]); { - case n < r.Start(): - ls = ls[:i] // search lower - case n > r.End(): - ls = ls[i+1:] // search upper - default: - return true - } - } - return false -} -func (p *EnumRanges) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *EnumRanges) ProtoInternal(pragma.DoNotImplement) {} -func (p *EnumRanges) lazyInit() *EnumRanges { - p.once.Do(func() { - p.sorted = append(p.sorted, p.List...) - sort.Slice(p.sorted, func(i, j int) bool { - return p.sorted[i][0] < p.sorted[j][0] - }) - }) - return p -} - -// CheckValid reports any errors with the set of names with an error message -// that completes the sentence: "ranges is invalid because it has ..." -func (p *EnumRanges) CheckValid() error { - var rp enumRange - for i, r := range p.lazyInit().sorted { - r := enumRange(r) - switch { - case !(r.Start() <= r.End()): - return errors.New("invalid range: %v", r) - case !(rp.End() < r.Start()) && i > 0: - return errors.New("overlapping ranges: %v with %v", rp, r) - } - rp = r - } - return nil -} - -type enumRange [2]protoreflect.EnumNumber - -func (r enumRange) Start() protoreflect.EnumNumber { return r[0] } // inclusive -func (r enumRange) End() protoreflect.EnumNumber { return r[1] } // inclusive -func (r enumRange) String() string { - if r.Start() == r.End() { - return fmt.Sprintf("%d", r.Start()) - } - return fmt.Sprintf("%d to %d", r.Start(), r.End()) -} - -type FieldRanges struct { - List [][2]protoreflect.FieldNumber // start inclusive; end exclusive - once sync.Once - sorted [][2]protoreflect.FieldNumber // protected by once -} - -func (p *FieldRanges) Len() int { return len(p.List) } -func (p *FieldRanges) Get(i int) [2]protoreflect.FieldNumber { return p.List[i] } -func (p *FieldRanges) Has(n protoreflect.FieldNumber) bool { - for ls := p.lazyInit().sorted; len(ls) > 0; { - i := len(ls) / 2 - switch r := fieldRange(ls[i]); { - case n < r.Start(): - ls = ls[:i] // search lower - case n > r.End(): - ls = ls[i+1:] // search upper - default: - return true - } - } - return false -} -func (p *FieldRanges) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *FieldRanges) ProtoInternal(pragma.DoNotImplement) {} -func (p *FieldRanges) lazyInit() *FieldRanges { - p.once.Do(func() { - p.sorted = append(p.sorted, p.List...) - sort.Slice(p.sorted, func(i, j int) bool { - return p.sorted[i][0] < p.sorted[j][0] - }) - }) - return p -} - -// CheckValid reports any errors with the set of ranges with an error message -// that completes the sentence: "ranges is invalid because it has ..." -func (p *FieldRanges) CheckValid(isMessageSet bool) error { - var rp fieldRange - for i, r := range p.lazyInit().sorted { - r := fieldRange(r) - switch { - case !isValidFieldNumber(r.Start(), isMessageSet): - return errors.New("invalid field number: %d", r.Start()) - case !isValidFieldNumber(r.End(), isMessageSet): - return errors.New("invalid field number: %d", r.End()) - case !(r.Start() <= r.End()): - return errors.New("invalid range: %v", r) - case !(rp.End() < r.Start()) && i > 0: - return errors.New("overlapping ranges: %v with %v", rp, r) - } - rp = r - } - return nil -} - -// isValidFieldNumber reports whether the field number is valid. -// Unlike the FieldNumber.IsValid method, it allows ranges that cover the -// reserved number range. -func isValidFieldNumber(n protoreflect.FieldNumber, isMessageSet bool) bool { - return protowire.MinValidNumber <= n && (n <= protowire.MaxValidNumber || isMessageSet) -} - -// CheckOverlap reports an error if p and q overlap. -func (p *FieldRanges) CheckOverlap(q *FieldRanges) error { - rps := p.lazyInit().sorted - rqs := q.lazyInit().sorted - for pi, qi := 0, 0; pi < len(rps) && qi < len(rqs); { - rp := fieldRange(rps[pi]) - rq := fieldRange(rqs[qi]) - if !(rp.End() < rq.Start() || rq.End() < rp.Start()) { - return errors.New("overlapping ranges: %v with %v", rp, rq) - } - if rp.Start() < rq.Start() { - pi++ - } else { - qi++ - } - } - return nil -} - -type fieldRange [2]protoreflect.FieldNumber - -func (r fieldRange) Start() protoreflect.FieldNumber { return r[0] } // inclusive -func (r fieldRange) End() protoreflect.FieldNumber { return r[1] - 1 } // inclusive -func (r fieldRange) String() string { - if r.Start() == r.End() { - return fmt.Sprintf("%d", r.Start()) - } - return fmt.Sprintf("%d to %d", r.Start(), r.End()) -} - -type FieldNumbers struct { - List []protoreflect.FieldNumber - once sync.Once - has map[protoreflect.FieldNumber]struct{} // protected by once -} - -func (p *FieldNumbers) Len() int { return len(p.List) } -func (p *FieldNumbers) Get(i int) protoreflect.FieldNumber { return p.List[i] } -func (p *FieldNumbers) Has(n protoreflect.FieldNumber) bool { - p.once.Do(func() { - if len(p.List) > 0 { - p.has = make(map[protoreflect.FieldNumber]struct{}, len(p.List)) - for _, n := range p.List { - p.has[n] = struct{}{} - } - } - }) - _, ok := p.has[n] - return ok -} -func (p *FieldNumbers) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement) {} - -type OneofFields struct { - List []protoreflect.FieldDescriptor - once sync.Once - byName map[protoreflect.Name]protoreflect.FieldDescriptor // protected by once - byJSON map[string]protoreflect.FieldDescriptor // protected by once - byText map[string]protoreflect.FieldDescriptor // protected by once - byNum map[protoreflect.FieldNumber]protoreflect.FieldDescriptor // protected by once -} - -func (p *OneofFields) Len() int { return len(p.List) } -func (p *OneofFields) Get(i int) protoreflect.FieldDescriptor { return p.List[i] } -func (p *OneofFields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor { - return p.lazyInit().byName[s] -} -func (p *OneofFields) ByJSONName(s string) protoreflect.FieldDescriptor { - return p.lazyInit().byJSON[s] -} -func (p *OneofFields) ByTextName(s string) protoreflect.FieldDescriptor { - return p.lazyInit().byText[s] -} -func (p *OneofFields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor { - return p.lazyInit().byNum[n] -} -func (p *OneofFields) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *OneofFields) ProtoInternal(pragma.DoNotImplement) {} - -func (p *OneofFields) lazyInit() *OneofFields { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]protoreflect.FieldDescriptor, len(p.List)) - p.byJSON = make(map[string]protoreflect.FieldDescriptor, len(p.List)) - p.byText = make(map[string]protoreflect.FieldDescriptor, len(p.List)) - p.byNum = make(map[protoreflect.FieldNumber]protoreflect.FieldDescriptor, len(p.List)) - for _, f := range p.List { - // Field names and numbers are guaranteed to be unique. - p.byName[f.Name()] = f - p.byJSON[f.JSONName()] = f - p.byText[f.TextName()] = f - p.byNum[f.Number()] = f - } - } - }) - return p -} - -type SourceLocations struct { - // List is a list of SourceLocations. - // The SourceLocation.Next field does not need to be populated - // as it will be lazily populated upon first need. - List []protoreflect.SourceLocation - - // File is the parent file descriptor that these locations are relative to. - // If non-nil, ByDescriptor verifies that the provided descriptor - // is a child of this file descriptor. - File protoreflect.FileDescriptor - - once sync.Once - byPath map[pathKey]int -} - -func (p *SourceLocations) Len() int { return len(p.List) } -func (p *SourceLocations) Get(i int) protoreflect.SourceLocation { return p.lazyInit().List[i] } -func (p *SourceLocations) byKey(k pathKey) protoreflect.SourceLocation { - if i, ok := p.lazyInit().byPath[k]; ok { - return p.List[i] - } - return protoreflect.SourceLocation{} -} -func (p *SourceLocations) ByPath(path protoreflect.SourcePath) protoreflect.SourceLocation { - return p.byKey(newPathKey(path)) -} -func (p *SourceLocations) ByDescriptor(desc protoreflect.Descriptor) protoreflect.SourceLocation { - if p.File != nil && desc != nil && p.File != desc.ParentFile() { - return protoreflect.SourceLocation{} // mismatching parent files - } - var pathArr [16]int32 - path := pathArr[:0] - for { - switch desc.(type) { - case protoreflect.FileDescriptor: - // Reverse the path since it was constructed in reverse. - for i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 { - path[i], path[j] = path[j], path[i] - } - return p.byKey(newPathKey(path)) - case protoreflect.MessageDescriptor: - path = append(path, int32(desc.Index())) - desc = desc.Parent() - switch desc.(type) { - case protoreflect.FileDescriptor: - path = append(path, int32(genid.FileDescriptorProto_MessageType_field_number)) - case protoreflect.MessageDescriptor: - path = append(path, int32(genid.DescriptorProto_NestedType_field_number)) - default: - return protoreflect.SourceLocation{} - } - case protoreflect.FieldDescriptor: - isExtension := desc.(protoreflect.FieldDescriptor).IsExtension() - path = append(path, int32(desc.Index())) - desc = desc.Parent() - if isExtension { - switch desc.(type) { - case protoreflect.FileDescriptor: - path = append(path, int32(genid.FileDescriptorProto_Extension_field_number)) - case protoreflect.MessageDescriptor: - path = append(path, int32(genid.DescriptorProto_Extension_field_number)) - default: - return protoreflect.SourceLocation{} - } - } else { - switch desc.(type) { - case protoreflect.MessageDescriptor: - path = append(path, int32(genid.DescriptorProto_Field_field_number)) - default: - return protoreflect.SourceLocation{} - } - } - case protoreflect.OneofDescriptor: - path = append(path, int32(desc.Index())) - desc = desc.Parent() - switch desc.(type) { - case protoreflect.MessageDescriptor: - path = append(path, int32(genid.DescriptorProto_OneofDecl_field_number)) - default: - return protoreflect.SourceLocation{} - } - case protoreflect.EnumDescriptor: - path = append(path, int32(desc.Index())) - desc = desc.Parent() - switch desc.(type) { - case protoreflect.FileDescriptor: - path = append(path, int32(genid.FileDescriptorProto_EnumType_field_number)) - case protoreflect.MessageDescriptor: - path = append(path, int32(genid.DescriptorProto_EnumType_field_number)) - default: - return protoreflect.SourceLocation{} - } - case protoreflect.EnumValueDescriptor: - path = append(path, int32(desc.Index())) - desc = desc.Parent() - switch desc.(type) { - case protoreflect.EnumDescriptor: - path = append(path, int32(genid.EnumDescriptorProto_Value_field_number)) - default: - return protoreflect.SourceLocation{} - } - case protoreflect.ServiceDescriptor: - path = append(path, int32(desc.Index())) - desc = desc.Parent() - switch desc.(type) { - case protoreflect.FileDescriptor: - path = append(path, int32(genid.FileDescriptorProto_Service_field_number)) - default: - return protoreflect.SourceLocation{} - } - case protoreflect.MethodDescriptor: - path = append(path, int32(desc.Index())) - desc = desc.Parent() - switch desc.(type) { - case protoreflect.ServiceDescriptor: - path = append(path, int32(genid.ServiceDescriptorProto_Method_field_number)) - default: - return protoreflect.SourceLocation{} - } - default: - return protoreflect.SourceLocation{} - } - } -} -func (p *SourceLocations) lazyInit() *SourceLocations { - p.once.Do(func() { - if len(p.List) > 0 { - // Collect all the indexes for a given path. - pathIdxs := make(map[pathKey][]int, len(p.List)) - for i, l := range p.List { - k := newPathKey(l.Path) - pathIdxs[k] = append(pathIdxs[k], i) - } - - // Update the next index for all locations. - p.byPath = make(map[pathKey]int, len(p.List)) - for k, idxs := range pathIdxs { - for i := 0; i < len(idxs)-1; i++ { - p.List[idxs[i]].Next = idxs[i+1] - } - p.List[idxs[len(idxs)-1]].Next = 0 - p.byPath[k] = idxs[0] // record the first location for this path - } - } - }) - return p -} -func (p *SourceLocations) ProtoInternal(pragma.DoNotImplement) {} - -// pathKey is a comparable representation of protoreflect.SourcePath. -type pathKey struct { - arr [16]uint8 // first n-1 path segments; last element is the length - str string // used if the path does not fit in arr -} - -func newPathKey(p protoreflect.SourcePath) (k pathKey) { - if len(p) < len(k.arr) { - for i, ps := range p { - if ps < 0 || math.MaxUint8 <= ps { - return pathKey{str: p.String()} - } - k.arr[i] = uint8(ps) - } - k.arr[len(k.arr)-1] = uint8(len(p)) - return k - } - return pathKey{str: p.String()} -} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go deleted file mode 100644 index 30db19fd..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +++ /dev/null @@ -1,356 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package filedesc - -import ( - "fmt" - "sync" - - "google.golang.org/protobuf/internal/descfmt" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type Enums struct { - List []Enum - once sync.Once - byName map[protoreflect.Name]*Enum // protected by once -} - -func (p *Enums) Len() int { - return len(p.List) -} -func (p *Enums) Get(i int) protoreflect.EnumDescriptor { - return &p.List[i] -} -func (p *Enums) ByName(s protoreflect.Name) protoreflect.EnumDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Enums) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Enums) ProtoInternal(pragma.DoNotImplement) {} -func (p *Enums) lazyInit() *Enums { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Enum, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - } - } - }) - return p -} - -type EnumValues struct { - List []EnumValue - once sync.Once - byName map[protoreflect.Name]*EnumValue // protected by once - byNum map[protoreflect.EnumNumber]*EnumValue // protected by once -} - -func (p *EnumValues) Len() int { - return len(p.List) -} -func (p *EnumValues) Get(i int) protoreflect.EnumValueDescriptor { - return &p.List[i] -} -func (p *EnumValues) ByName(s protoreflect.Name) protoreflect.EnumValueDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *EnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor { - if d := p.lazyInit().byNum[n]; d != nil { - return d - } - return nil -} -func (p *EnumValues) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *EnumValues) ProtoInternal(pragma.DoNotImplement) {} -func (p *EnumValues) lazyInit() *EnumValues { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*EnumValue, len(p.List)) - p.byNum = make(map[protoreflect.EnumNumber]*EnumValue, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - if _, ok := p.byNum[d.Number()]; !ok { - p.byNum[d.Number()] = d - } - } - } - }) - return p -} - -type Messages struct { - List []Message - once sync.Once - byName map[protoreflect.Name]*Message // protected by once -} - -func (p *Messages) Len() int { - return len(p.List) -} -func (p *Messages) Get(i int) protoreflect.MessageDescriptor { - return &p.List[i] -} -func (p *Messages) ByName(s protoreflect.Name) protoreflect.MessageDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Messages) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Messages) ProtoInternal(pragma.DoNotImplement) {} -func (p *Messages) lazyInit() *Messages { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Message, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - } - } - }) - return p -} - -type Fields struct { - List []Field - once sync.Once - byName map[protoreflect.Name]*Field // protected by once - byJSON map[string]*Field // protected by once - byText map[string]*Field // protected by once - byNum map[protoreflect.FieldNumber]*Field // protected by once -} - -func (p *Fields) Len() int { - return len(p.List) -} -func (p *Fields) Get(i int) protoreflect.FieldDescriptor { - return &p.List[i] -} -func (p *Fields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Fields) ByJSONName(s string) protoreflect.FieldDescriptor { - if d := p.lazyInit().byJSON[s]; d != nil { - return d - } - return nil -} -func (p *Fields) ByTextName(s string) protoreflect.FieldDescriptor { - if d := p.lazyInit().byText[s]; d != nil { - return d - } - return nil -} -func (p *Fields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor { - if d := p.lazyInit().byNum[n]; d != nil { - return d - } - return nil -} -func (p *Fields) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Fields) ProtoInternal(pragma.DoNotImplement) {} -func (p *Fields) lazyInit() *Fields { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Field, len(p.List)) - p.byJSON = make(map[string]*Field, len(p.List)) - p.byText = make(map[string]*Field, len(p.List)) - p.byNum = make(map[protoreflect.FieldNumber]*Field, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - if _, ok := p.byJSON[d.JSONName()]; !ok { - p.byJSON[d.JSONName()] = d - } - if _, ok := p.byText[d.TextName()]; !ok { - p.byText[d.TextName()] = d - } - if _, ok := p.byNum[d.Number()]; !ok { - p.byNum[d.Number()] = d - } - } - } - }) - return p -} - -type Oneofs struct { - List []Oneof - once sync.Once - byName map[protoreflect.Name]*Oneof // protected by once -} - -func (p *Oneofs) Len() int { - return len(p.List) -} -func (p *Oneofs) Get(i int) protoreflect.OneofDescriptor { - return &p.List[i] -} -func (p *Oneofs) ByName(s protoreflect.Name) protoreflect.OneofDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Oneofs) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Oneofs) ProtoInternal(pragma.DoNotImplement) {} -func (p *Oneofs) lazyInit() *Oneofs { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Oneof, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - } - } - }) - return p -} - -type Extensions struct { - List []Extension - once sync.Once - byName map[protoreflect.Name]*Extension // protected by once -} - -func (p *Extensions) Len() int { - return len(p.List) -} -func (p *Extensions) Get(i int) protoreflect.ExtensionDescriptor { - return &p.List[i] -} -func (p *Extensions) ByName(s protoreflect.Name) protoreflect.ExtensionDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Extensions) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Extensions) ProtoInternal(pragma.DoNotImplement) {} -func (p *Extensions) lazyInit() *Extensions { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Extension, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - } - } - }) - return p -} - -type Services struct { - List []Service - once sync.Once - byName map[protoreflect.Name]*Service // protected by once -} - -func (p *Services) Len() int { - return len(p.List) -} -func (p *Services) Get(i int) protoreflect.ServiceDescriptor { - return &p.List[i] -} -func (p *Services) ByName(s protoreflect.Name) protoreflect.ServiceDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Services) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Services) ProtoInternal(pragma.DoNotImplement) {} -func (p *Services) lazyInit() *Services { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Service, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - } - } - }) - return p -} - -type Methods struct { - List []Method - once sync.Once - byName map[protoreflect.Name]*Method // protected by once -} - -func (p *Methods) Len() int { - return len(p.List) -} -func (p *Methods) Get(i int) protoreflect.MethodDescriptor { - return &p.List[i] -} -func (p *Methods) ByName(s protoreflect.Name) protoreflect.MethodDescriptor { - if d := p.lazyInit().byName[s]; d != nil { - return d - } - return nil -} -func (p *Methods) Format(s fmt.State, r rune) { - descfmt.FormatList(s, r, p) -} -func (p *Methods) ProtoInternal(pragma.DoNotImplement) {} -func (p *Methods) lazyInit() *Methods { - p.once.Do(func() { - if len(p.List) > 0 { - p.byName = make(map[protoreflect.Name]*Method, len(p.List)) - for i := range p.List { - d := &p.List[i] - if _, ok := p.byName[d.Name()]; !ok { - p.byName[d.Name()] = d - } - } - } - }) - return p -} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go deleted file mode 100644 index 28240ebc..00000000 --- a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +++ /dev/null @@ -1,109 +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 filedesc - -import ( - "google.golang.org/protobuf/internal/descopts" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" -) - -var ( - emptyNames = new(Names) - emptyEnumRanges = new(EnumRanges) - emptyFieldRanges = new(FieldRanges) - emptyFieldNumbers = new(FieldNumbers) - emptySourceLocations = new(SourceLocations) - - emptyFiles = new(FileImports) - emptyMessages = new(Messages) - emptyFields = new(Fields) - emptyOneofs = new(Oneofs) - emptyEnums = new(Enums) - emptyEnumValues = new(EnumValues) - emptyExtensions = new(Extensions) - emptyServices = new(Services) -) - -// PlaceholderFile is a placeholder, representing only the file path. -type PlaceholderFile string - -func (f PlaceholderFile) ParentFile() protoreflect.FileDescriptor { return f } -func (f PlaceholderFile) Parent() protoreflect.Descriptor { return nil } -func (f PlaceholderFile) Index() int { return 0 } -func (f PlaceholderFile) Syntax() protoreflect.Syntax { return 0 } -func (f PlaceholderFile) Name() protoreflect.Name { return "" } -func (f PlaceholderFile) FullName() protoreflect.FullName { return "" } -func (f PlaceholderFile) IsPlaceholder() bool { return true } -func (f PlaceholderFile) Options() protoreflect.ProtoMessage { return descopts.File } -func (f PlaceholderFile) Path() string { return string(f) } -func (f PlaceholderFile) Package() protoreflect.FullName { return "" } -func (f PlaceholderFile) Imports() protoreflect.FileImports { return emptyFiles } -func (f PlaceholderFile) Messages() protoreflect.MessageDescriptors { return emptyMessages } -func (f PlaceholderFile) Enums() protoreflect.EnumDescriptors { return emptyEnums } -func (f PlaceholderFile) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions } -func (f PlaceholderFile) Services() protoreflect.ServiceDescriptors { return emptyServices } -func (f PlaceholderFile) SourceLocations() protoreflect.SourceLocations { return emptySourceLocations } -func (f PlaceholderFile) ProtoType(protoreflect.FileDescriptor) { return } -func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement) { return } - -// PlaceholderEnum is a placeholder, representing only the full name. -type PlaceholderEnum protoreflect.FullName - -func (e PlaceholderEnum) ParentFile() protoreflect.FileDescriptor { return nil } -func (e PlaceholderEnum) Parent() protoreflect.Descriptor { return nil } -func (e PlaceholderEnum) Index() int { return 0 } -func (e PlaceholderEnum) Syntax() protoreflect.Syntax { return 0 } -func (e PlaceholderEnum) Name() protoreflect.Name { return protoreflect.FullName(e).Name() } -func (e PlaceholderEnum) FullName() protoreflect.FullName { return protoreflect.FullName(e) } -func (e PlaceholderEnum) IsPlaceholder() bool { return true } -func (e PlaceholderEnum) Options() protoreflect.ProtoMessage { return descopts.Enum } -func (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors { return emptyEnumValues } -func (e PlaceholderEnum) ReservedNames() protoreflect.Names { return emptyNames } -func (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges { return emptyEnumRanges } -func (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor) { return } -func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return } - -// PlaceholderEnumValue is a placeholder, representing only the full name. -type PlaceholderEnumValue protoreflect.FullName - -func (e PlaceholderEnumValue) ParentFile() protoreflect.FileDescriptor { return nil } -func (e PlaceholderEnumValue) Parent() protoreflect.Descriptor { return nil } -func (e PlaceholderEnumValue) Index() int { return 0 } -func (e PlaceholderEnumValue) Syntax() protoreflect.Syntax { return 0 } -func (e PlaceholderEnumValue) Name() protoreflect.Name { return protoreflect.FullName(e).Name() } -func (e PlaceholderEnumValue) FullName() protoreflect.FullName { return protoreflect.FullName(e) } -func (e PlaceholderEnumValue) IsPlaceholder() bool { return true } -func (e PlaceholderEnumValue) Options() protoreflect.ProtoMessage { return descopts.EnumValue } -func (e PlaceholderEnumValue) Number() protoreflect.EnumNumber { return 0 } -func (e PlaceholderEnumValue) ProtoType(protoreflect.EnumValueDescriptor) { return } -func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement) { return } - -// PlaceholderMessage is a placeholder, representing only the full name. -type PlaceholderMessage protoreflect.FullName - -func (m PlaceholderMessage) ParentFile() protoreflect.FileDescriptor { return nil } -func (m PlaceholderMessage) Parent() protoreflect.Descriptor { return nil } -func (m PlaceholderMessage) Index() int { return 0 } -func (m PlaceholderMessage) Syntax() protoreflect.Syntax { return 0 } -func (m PlaceholderMessage) Name() protoreflect.Name { return protoreflect.FullName(m).Name() } -func (m PlaceholderMessage) FullName() protoreflect.FullName { return protoreflect.FullName(m) } -func (m PlaceholderMessage) IsPlaceholder() bool { return true } -func (m PlaceholderMessage) Options() protoreflect.ProtoMessage { return descopts.Message } -func (m PlaceholderMessage) IsMapEntry() bool { return false } -func (m PlaceholderMessage) Fields() protoreflect.FieldDescriptors { return emptyFields } -func (m PlaceholderMessage) Oneofs() protoreflect.OneofDescriptors { return emptyOneofs } -func (m PlaceholderMessage) ReservedNames() protoreflect.Names { return emptyNames } -func (m PlaceholderMessage) ReservedRanges() protoreflect.FieldRanges { return emptyFieldRanges } -func (m PlaceholderMessage) RequiredNumbers() protoreflect.FieldNumbers { return emptyFieldNumbers } -func (m PlaceholderMessage) ExtensionRanges() protoreflect.FieldRanges { return emptyFieldRanges } -func (m PlaceholderMessage) ExtensionRangeOptions(int) protoreflect.ProtoMessage { - panic("index out of range") -} -func (m PlaceholderMessage) Messages() protoreflect.MessageDescriptors { return emptyMessages } -func (m PlaceholderMessage) Enums() protoreflect.EnumDescriptors { return emptyEnums } -func (m PlaceholderMessage) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions } -func (m PlaceholderMessage) ProtoType(protoreflect.MessageDescriptor) { return } -func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement) { return } diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go deleted file mode 100644 index f0e38c4e..00000000 --- a/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ /dev/null @@ -1,296 +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 filetype provides functionality for wrapping descriptors -// with Go type information. -package filetype - -import ( - "reflect" - - "google.golang.org/protobuf/internal/descopts" - "google.golang.org/protobuf/internal/filedesc" - pimpl "google.golang.org/protobuf/internal/impl" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// Builder constructs type descriptors from a raw file descriptor -// and associated Go types for each enum and message declaration. -// -// # Flattened Ordering -// -// The protobuf type system represents declarations as a tree. Certain nodes in -// the tree require us to either associate it with a concrete Go type or to -// resolve a dependency, which is information that must be provided separately -// since it cannot be derived from the file descriptor alone. -// -// However, representing a tree as Go literals is difficult to simply do in a -// space and time efficient way. Thus, we store them as a flattened list of -// objects where the serialization order from the tree-based form is important. -// -// The "flattened ordering" is defined as a tree traversal of all enum, message, -// extension, and service declarations using the following algorithm: -// -// def VisitFileDecls(fd): -// for e in fd.Enums: yield e -// for m in fd.Messages: yield m -// for x in fd.Extensions: yield x -// for s in fd.Services: yield s -// for m in fd.Messages: yield from VisitMessageDecls(m) -// -// def VisitMessageDecls(md): -// for e in md.Enums: yield e -// for m in md.Messages: yield m -// for x in md.Extensions: yield x -// for m in md.Messages: yield from VisitMessageDecls(m) -// -// The traversal starts at the root file descriptor and yields each direct -// declaration within each node before traversing into sub-declarations -// that children themselves may have. -type Builder struct { - // File is the underlying file descriptor builder. - File filedesc.Builder - - // GoTypes is a unique set of the Go types for all declarations and - // dependencies. Each type is represented as a zero value of the Go type. - // - // Declarations are Go types generated for enums and messages directly - // declared (not publicly imported) in the proto source file. - // Messages for map entries are accounted for, but represented by nil. - // Enum declarations in "flattened ordering" come first, followed by - // message declarations in "flattened ordering". - // - // Dependencies are Go types for enums or messages referenced by - // message fields (excluding weak fields), for parent extended messages of - // extension fields, for enums or messages referenced by extension fields, - // and for input and output messages referenced by service methods. - // Dependencies must come after declarations, but the ordering of - // dependencies themselves is unspecified. - GoTypes []interface{} - - // DependencyIndexes is an ordered list of indexes into GoTypes for the - // dependencies of messages, extensions, or services. - // - // There are 5 sub-lists in "flattened ordering" concatenated back-to-back: - // 0. Message field dependencies: list of the enum or message type - // referred to by every message field. - // 1. Extension field targets: list of the extended parent message of - // every extension. - // 2. Extension field dependencies: list of the enum or message type - // referred to by every extension field. - // 3. Service method inputs: list of the input message type - // referred to by every service method. - // 4. Service method outputs: list of the output message type - // referred to by every service method. - // - // The offset into DependencyIndexes for the start of each sub-list - // is appended to the end in reverse order. - DependencyIndexes []int32 - - // EnumInfos is a list of enum infos in "flattened ordering". - EnumInfos []pimpl.EnumInfo - - // MessageInfos is a list of message infos in "flattened ordering". - // If provided, the GoType and PBType for each element is populated. - // - // Requirement: len(MessageInfos) == len(Build.Messages) - MessageInfos []pimpl.MessageInfo - - // ExtensionInfos is a list of extension infos in "flattened ordering". - // Each element is initialized and registered with the protoregistry package. - // - // Requirement: len(LegacyExtensions) == len(Build.Extensions) - ExtensionInfos []pimpl.ExtensionInfo - - // TypeRegistry is the registry to register each type descriptor. - // If nil, it uses protoregistry.GlobalTypes. - TypeRegistry interface { - RegisterMessage(protoreflect.MessageType) error - RegisterEnum(protoreflect.EnumType) error - RegisterExtension(protoreflect.ExtensionType) error - } -} - -// Out is the output of the builder. -type Out struct { - File protoreflect.FileDescriptor -} - -func (tb Builder) Build() (out Out) { - // Replace the resolver with one that resolves dependencies by index, - // which is faster and more reliable than relying on the global registry. - if tb.File.FileRegistry == nil { - tb.File.FileRegistry = protoregistry.GlobalFiles - } - tb.File.FileRegistry = &resolverByIndex{ - goTypes: tb.GoTypes, - depIdxs: tb.DependencyIndexes, - fileRegistry: tb.File.FileRegistry, - } - - // Initialize registry if unpopulated. - if tb.TypeRegistry == nil { - tb.TypeRegistry = protoregistry.GlobalTypes - } - - fbOut := tb.File.Build() - out.File = fbOut.File - - // Process enums. - enumGoTypes := tb.GoTypes[:len(fbOut.Enums)] - if len(tb.EnumInfos) != len(fbOut.Enums) { - panic("mismatching enum lengths") - } - if len(fbOut.Enums) > 0 { - for i := range fbOut.Enums { - tb.EnumInfos[i] = pimpl.EnumInfo{ - GoReflectType: reflect.TypeOf(enumGoTypes[i]), - Desc: &fbOut.Enums[i], - } - // Register enum types. - if err := tb.TypeRegistry.RegisterEnum(&tb.EnumInfos[i]); err != nil { - panic(err) - } - } - } - - // Process messages. - messageGoTypes := tb.GoTypes[len(fbOut.Enums):][:len(fbOut.Messages)] - if len(tb.MessageInfos) != len(fbOut.Messages) { - panic("mismatching message lengths") - } - if len(fbOut.Messages) > 0 { - for i := range fbOut.Messages { - if messageGoTypes[i] == nil { - continue // skip map entry - } - - tb.MessageInfos[i].GoReflectType = reflect.TypeOf(messageGoTypes[i]) - tb.MessageInfos[i].Desc = &fbOut.Messages[i] - - // Register message types. - if err := tb.TypeRegistry.RegisterMessage(&tb.MessageInfos[i]); err != nil { - panic(err) - } - } - - // As a special-case for descriptor.proto, - // locally register concrete message type for the options. - if out.File.Path() == "google/protobuf/descriptor.proto" && out.File.Package() == "google.protobuf" { - for i := range fbOut.Messages { - switch fbOut.Messages[i].Name() { - case "FileOptions": - descopts.File = messageGoTypes[i].(protoreflect.ProtoMessage) - case "EnumOptions": - descopts.Enum = messageGoTypes[i].(protoreflect.ProtoMessage) - case "EnumValueOptions": - descopts.EnumValue = messageGoTypes[i].(protoreflect.ProtoMessage) - case "MessageOptions": - descopts.Message = messageGoTypes[i].(protoreflect.ProtoMessage) - case "FieldOptions": - descopts.Field = messageGoTypes[i].(protoreflect.ProtoMessage) - case "OneofOptions": - descopts.Oneof = messageGoTypes[i].(protoreflect.ProtoMessage) - case "ExtensionRangeOptions": - descopts.ExtensionRange = messageGoTypes[i].(protoreflect.ProtoMessage) - case "ServiceOptions": - descopts.Service = messageGoTypes[i].(protoreflect.ProtoMessage) - case "MethodOptions": - descopts.Method = messageGoTypes[i].(protoreflect.ProtoMessage) - } - } - } - } - - // Process extensions. - if len(tb.ExtensionInfos) != len(fbOut.Extensions) { - panic("mismatching extension lengths") - } - var depIdx int32 - for i := range fbOut.Extensions { - // For enum and message kinds, determine the referent Go type so - // that we can construct their constructors. - const listExtDeps = 2 - var goType reflect.Type - switch fbOut.Extensions[i].L1.Kind { - case protoreflect.EnumKind: - j := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx) - goType = reflect.TypeOf(tb.GoTypes[j]) - depIdx++ - case protoreflect.MessageKind, protoreflect.GroupKind: - j := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx) - goType = reflect.TypeOf(tb.GoTypes[j]) - depIdx++ - default: - goType = goTypeForPBKind[fbOut.Extensions[i].L1.Kind] - } - if fbOut.Extensions[i].IsList() { - goType = reflect.SliceOf(goType) - } - - pimpl.InitExtensionInfo(&tb.ExtensionInfos[i], &fbOut.Extensions[i], goType) - - // Register extension types. - if err := tb.TypeRegistry.RegisterExtension(&tb.ExtensionInfos[i]); err != nil { - panic(err) - } - } - - return out -} - -var goTypeForPBKind = map[protoreflect.Kind]reflect.Type{ - protoreflect.BoolKind: reflect.TypeOf(bool(false)), - protoreflect.Int32Kind: reflect.TypeOf(int32(0)), - protoreflect.Sint32Kind: reflect.TypeOf(int32(0)), - protoreflect.Sfixed32Kind: reflect.TypeOf(int32(0)), - protoreflect.Int64Kind: reflect.TypeOf(int64(0)), - protoreflect.Sint64Kind: reflect.TypeOf(int64(0)), - protoreflect.Sfixed64Kind: reflect.TypeOf(int64(0)), - protoreflect.Uint32Kind: reflect.TypeOf(uint32(0)), - protoreflect.Fixed32Kind: reflect.TypeOf(uint32(0)), - protoreflect.Uint64Kind: reflect.TypeOf(uint64(0)), - protoreflect.Fixed64Kind: reflect.TypeOf(uint64(0)), - protoreflect.FloatKind: reflect.TypeOf(float32(0)), - protoreflect.DoubleKind: reflect.TypeOf(float64(0)), - protoreflect.StringKind: reflect.TypeOf(string("")), - protoreflect.BytesKind: reflect.TypeOf([]byte(nil)), -} - -type depIdxs []int32 - -// Get retrieves the jth element of the ith sub-list. -func (x depIdxs) Get(i, j int32) int32 { - return x[x[int32(len(x))-i-1]+j] -} - -type ( - resolverByIndex struct { - goTypes []interface{} - depIdxs depIdxs - fileRegistry - } - fileRegistry interface { - FindFileByPath(string) (protoreflect.FileDescriptor, error) - FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) - RegisterFile(protoreflect.FileDescriptor) error - } -) - -func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.EnumDescriptor { - if depIdx := int(r.depIdxs.Get(i, j)); int(depIdx) < len(es)+len(ms) { - return &es[depIdx] - } else { - return pimpl.Export{}.EnumDescriptorOf(r.goTypes[depIdx]) - } -} - -func (r *resolverByIndex) FindMessageByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.MessageDescriptor { - if depIdx := int(r.depIdxs.Get(i, j)); depIdx < len(es)+len(ms) { - return &ms[depIdx-len(es)] - } else { - return pimpl.Export{}.MessageDescriptorOf(r.goTypes[depIdx]) - } -} diff --git a/vendor/google.golang.org/protobuf/internal/flags/flags.go b/vendor/google.golang.org/protobuf/internal/flags/flags.go deleted file mode 100644 index 58372dd3..00000000 --- a/vendor/google.golang.org/protobuf/internal/flags/flags.go +++ /dev/null @@ -1,24 +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. - -// Package flags provides a set of flags controlled by build tags. -package flags - -// ProtoLegacy specifies whether to enable support for legacy functionality -// such as MessageSets, weak fields, and various other obscure behavior -// that is necessary to maintain backwards compatibility with proto1 or -// the pre-release variants of proto2 and proto3. -// -// This is disabled by default unless built with the "protolegacy" tag. -// -// WARNING: The compatibility agreement covers nothing provided by this flag. -// As such, functionality may suddenly be removed or changed at our discretion. -const ProtoLegacy = protoLegacy - -// LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions. -// -// Lazy extension unmarshaling validates the contents of message-valued -// extension fields at unmarshal time, but defers creating the message -// structure until the extension is first accessed. -const LazyUnmarshalExtensions = ProtoLegacy diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go deleted file mode 100644 index bda8e8cf..00000000 --- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go +++ /dev/null @@ -1,10 +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 !protolegacy -// +build !protolegacy - -package flags - -const protoLegacy = false diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go deleted file mode 100644 index 6d8d9bd6..00000000 --- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go +++ /dev/null @@ -1,10 +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 protolegacy -// +build protolegacy - -package flags - -const protoLegacy = true diff --git a/vendor/google.golang.org/protobuf/internal/genid/any_gen.go b/vendor/google.golang.org/protobuf/internal/genid/any_gen.go deleted file mode 100644 index e6f7d47a..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/any_gen.go +++ /dev/null @@ -1,34 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_any_proto = "google/protobuf/any.proto" - -// Names for google.protobuf.Any. -const ( - Any_message_name protoreflect.Name = "Any" - Any_message_fullname protoreflect.FullName = "google.protobuf.Any" -) - -// Field names for google.protobuf.Any. -const ( - Any_TypeUrl_field_name protoreflect.Name = "type_url" - Any_Value_field_name protoreflect.Name = "value" - - Any_TypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Any.type_url" - Any_Value_field_fullname protoreflect.FullName = "google.protobuf.Any.value" -) - -// Field numbers for google.protobuf.Any. -const ( - Any_TypeUrl_field_number protoreflect.FieldNumber = 1 - Any_Value_field_number protoreflect.FieldNumber = 2 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/api_gen.go b/vendor/google.golang.org/protobuf/internal/genid/api_gen.go deleted file mode 100644 index df8f9185..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +++ /dev/null @@ -1,106 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_api_proto = "google/protobuf/api.proto" - -// Names for google.protobuf.Api. -const ( - Api_message_name protoreflect.Name = "Api" - Api_message_fullname protoreflect.FullName = "google.protobuf.Api" -) - -// Field names for google.protobuf.Api. -const ( - Api_Name_field_name protoreflect.Name = "name" - Api_Methods_field_name protoreflect.Name = "methods" - Api_Options_field_name protoreflect.Name = "options" - Api_Version_field_name protoreflect.Name = "version" - Api_SourceContext_field_name protoreflect.Name = "source_context" - Api_Mixins_field_name protoreflect.Name = "mixins" - Api_Syntax_field_name protoreflect.Name = "syntax" - - Api_Name_field_fullname protoreflect.FullName = "google.protobuf.Api.name" - Api_Methods_field_fullname protoreflect.FullName = "google.protobuf.Api.methods" - Api_Options_field_fullname protoreflect.FullName = "google.protobuf.Api.options" - Api_Version_field_fullname protoreflect.FullName = "google.protobuf.Api.version" - Api_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Api.source_context" - Api_Mixins_field_fullname protoreflect.FullName = "google.protobuf.Api.mixins" - Api_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Api.syntax" -) - -// Field numbers for google.protobuf.Api. -const ( - Api_Name_field_number protoreflect.FieldNumber = 1 - Api_Methods_field_number protoreflect.FieldNumber = 2 - Api_Options_field_number protoreflect.FieldNumber = 3 - Api_Version_field_number protoreflect.FieldNumber = 4 - Api_SourceContext_field_number protoreflect.FieldNumber = 5 - Api_Mixins_field_number protoreflect.FieldNumber = 6 - Api_Syntax_field_number protoreflect.FieldNumber = 7 -) - -// Names for google.protobuf.Method. -const ( - Method_message_name protoreflect.Name = "Method" - Method_message_fullname protoreflect.FullName = "google.protobuf.Method" -) - -// Field names for google.protobuf.Method. -const ( - Method_Name_field_name protoreflect.Name = "name" - Method_RequestTypeUrl_field_name protoreflect.Name = "request_type_url" - Method_RequestStreaming_field_name protoreflect.Name = "request_streaming" - Method_ResponseTypeUrl_field_name protoreflect.Name = "response_type_url" - Method_ResponseStreaming_field_name protoreflect.Name = "response_streaming" - Method_Options_field_name protoreflect.Name = "options" - Method_Syntax_field_name protoreflect.Name = "syntax" - - Method_Name_field_fullname protoreflect.FullName = "google.protobuf.Method.name" - Method_RequestTypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Method.request_type_url" - Method_RequestStreaming_field_fullname protoreflect.FullName = "google.protobuf.Method.request_streaming" - Method_ResponseTypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Method.response_type_url" - Method_ResponseStreaming_field_fullname protoreflect.FullName = "google.protobuf.Method.response_streaming" - Method_Options_field_fullname protoreflect.FullName = "google.protobuf.Method.options" - Method_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Method.syntax" -) - -// Field numbers for google.protobuf.Method. -const ( - Method_Name_field_number protoreflect.FieldNumber = 1 - Method_RequestTypeUrl_field_number protoreflect.FieldNumber = 2 - Method_RequestStreaming_field_number protoreflect.FieldNumber = 3 - Method_ResponseTypeUrl_field_number protoreflect.FieldNumber = 4 - Method_ResponseStreaming_field_number protoreflect.FieldNumber = 5 - Method_Options_field_number protoreflect.FieldNumber = 6 - Method_Syntax_field_number protoreflect.FieldNumber = 7 -) - -// Names for google.protobuf.Mixin. -const ( - Mixin_message_name protoreflect.Name = "Mixin" - Mixin_message_fullname protoreflect.FullName = "google.protobuf.Mixin" -) - -// Field names for google.protobuf.Mixin. -const ( - Mixin_Name_field_name protoreflect.Name = "name" - Mixin_Root_field_name protoreflect.Name = "root" - - Mixin_Name_field_fullname protoreflect.FullName = "google.protobuf.Mixin.name" - Mixin_Root_field_fullname protoreflect.FullName = "google.protobuf.Mixin.root" -) - -// Field numbers for google.protobuf.Mixin. -const ( - Mixin_Name_field_number protoreflect.FieldNumber = 1 - Mixin_Root_field_number protoreflect.FieldNumber = 2 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go deleted file mode 100644 index 8f94230e..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ /dev/null @@ -1,1087 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_descriptor_proto = "google/protobuf/descriptor.proto" - -// Full and short names for google.protobuf.Edition. -const ( - Edition_enum_fullname = "google.protobuf.Edition" - Edition_enum_name = "Edition" -) - -// Names for google.protobuf.FileDescriptorSet. -const ( - FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet" - FileDescriptorSet_message_fullname protoreflect.FullName = "google.protobuf.FileDescriptorSet" -) - -// Field names for google.protobuf.FileDescriptorSet. -const ( - FileDescriptorSet_File_field_name protoreflect.Name = "file" - - FileDescriptorSet_File_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorSet.file" -) - -// Field numbers for google.protobuf.FileDescriptorSet. -const ( - FileDescriptorSet_File_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.FileDescriptorProto. -const ( - FileDescriptorProto_message_name protoreflect.Name = "FileDescriptorProto" - FileDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto" -) - -// Field names for google.protobuf.FileDescriptorProto. -const ( - FileDescriptorProto_Name_field_name protoreflect.Name = "name" - FileDescriptorProto_Package_field_name protoreflect.Name = "package" - FileDescriptorProto_Dependency_field_name protoreflect.Name = "dependency" - FileDescriptorProto_PublicDependency_field_name protoreflect.Name = "public_dependency" - FileDescriptorProto_WeakDependency_field_name protoreflect.Name = "weak_dependency" - FileDescriptorProto_MessageType_field_name protoreflect.Name = "message_type" - FileDescriptorProto_EnumType_field_name protoreflect.Name = "enum_type" - FileDescriptorProto_Service_field_name protoreflect.Name = "service" - FileDescriptorProto_Extension_field_name protoreflect.Name = "extension" - FileDescriptorProto_Options_field_name protoreflect.Name = "options" - FileDescriptorProto_SourceCodeInfo_field_name protoreflect.Name = "source_code_info" - FileDescriptorProto_Syntax_field_name protoreflect.Name = "syntax" - FileDescriptorProto_Edition_field_name protoreflect.Name = "edition" - - FileDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.name" - FileDescriptorProto_Package_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.package" - FileDescriptorProto_Dependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.dependency" - FileDescriptorProto_PublicDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.public_dependency" - FileDescriptorProto_WeakDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.weak_dependency" - FileDescriptorProto_MessageType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.message_type" - FileDescriptorProto_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.enum_type" - FileDescriptorProto_Service_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.service" - FileDescriptorProto_Extension_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.extension" - FileDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.options" - FileDescriptorProto_SourceCodeInfo_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.source_code_info" - FileDescriptorProto_Syntax_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.syntax" - FileDescriptorProto_Edition_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.edition" -) - -// Field numbers for google.protobuf.FileDescriptorProto. -const ( - FileDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - FileDescriptorProto_Package_field_number protoreflect.FieldNumber = 2 - FileDescriptorProto_Dependency_field_number protoreflect.FieldNumber = 3 - FileDescriptorProto_PublicDependency_field_number protoreflect.FieldNumber = 10 - FileDescriptorProto_WeakDependency_field_number protoreflect.FieldNumber = 11 - FileDescriptorProto_MessageType_field_number protoreflect.FieldNumber = 4 - FileDescriptorProto_EnumType_field_number protoreflect.FieldNumber = 5 - FileDescriptorProto_Service_field_number protoreflect.FieldNumber = 6 - FileDescriptorProto_Extension_field_number protoreflect.FieldNumber = 7 - FileDescriptorProto_Options_field_number protoreflect.FieldNumber = 8 - FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumber = 9 - FileDescriptorProto_Syntax_field_number protoreflect.FieldNumber = 12 - FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 14 -) - -// Names for google.protobuf.DescriptorProto. -const ( - DescriptorProto_message_name protoreflect.Name = "DescriptorProto" - DescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.DescriptorProto" -) - -// Field names for google.protobuf.DescriptorProto. -const ( - DescriptorProto_Name_field_name protoreflect.Name = "name" - DescriptorProto_Field_field_name protoreflect.Name = "field" - DescriptorProto_Extension_field_name protoreflect.Name = "extension" - DescriptorProto_NestedType_field_name protoreflect.Name = "nested_type" - DescriptorProto_EnumType_field_name protoreflect.Name = "enum_type" - DescriptorProto_ExtensionRange_field_name protoreflect.Name = "extension_range" - DescriptorProto_OneofDecl_field_name protoreflect.Name = "oneof_decl" - DescriptorProto_Options_field_name protoreflect.Name = "options" - DescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range" - DescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name" - - DescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.name" - DescriptorProto_Field_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.field" - DescriptorProto_Extension_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.extension" - DescriptorProto_NestedType_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.nested_type" - DescriptorProto_EnumType_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.enum_type" - DescriptorProto_ExtensionRange_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.extension_range" - DescriptorProto_OneofDecl_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.oneof_decl" - DescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.options" - DescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_range" - DescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_name" -) - -// Field numbers for google.protobuf.DescriptorProto. -const ( - DescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - DescriptorProto_Field_field_number protoreflect.FieldNumber = 2 - DescriptorProto_Extension_field_number protoreflect.FieldNumber = 6 - DescriptorProto_NestedType_field_number protoreflect.FieldNumber = 3 - DescriptorProto_EnumType_field_number protoreflect.FieldNumber = 4 - DescriptorProto_ExtensionRange_field_number protoreflect.FieldNumber = 5 - DescriptorProto_OneofDecl_field_number protoreflect.FieldNumber = 8 - DescriptorProto_Options_field_number protoreflect.FieldNumber = 7 - DescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 9 - DescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 10 -) - -// Names for google.protobuf.DescriptorProto.ExtensionRange. -const ( - DescriptorProto_ExtensionRange_message_name protoreflect.Name = "ExtensionRange" - DescriptorProto_ExtensionRange_message_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ExtensionRange" -) - -// Field names for google.protobuf.DescriptorProto.ExtensionRange. -const ( - DescriptorProto_ExtensionRange_Start_field_name protoreflect.Name = "start" - DescriptorProto_ExtensionRange_End_field_name protoreflect.Name = "end" - DescriptorProto_ExtensionRange_Options_field_name protoreflect.Name = "options" - - DescriptorProto_ExtensionRange_Start_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ExtensionRange.start" - DescriptorProto_ExtensionRange_End_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ExtensionRange.end" - DescriptorProto_ExtensionRange_Options_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ExtensionRange.options" -) - -// Field numbers for google.protobuf.DescriptorProto.ExtensionRange. -const ( - DescriptorProto_ExtensionRange_Start_field_number protoreflect.FieldNumber = 1 - DescriptorProto_ExtensionRange_End_field_number protoreflect.FieldNumber = 2 - DescriptorProto_ExtensionRange_Options_field_number protoreflect.FieldNumber = 3 -) - -// Names for google.protobuf.DescriptorProto.ReservedRange. -const ( - DescriptorProto_ReservedRange_message_name protoreflect.Name = "ReservedRange" - DescriptorProto_ReservedRange_message_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ReservedRange" -) - -// Field names for google.protobuf.DescriptorProto.ReservedRange. -const ( - DescriptorProto_ReservedRange_Start_field_name protoreflect.Name = "start" - DescriptorProto_ReservedRange_End_field_name protoreflect.Name = "end" - - DescriptorProto_ReservedRange_Start_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ReservedRange.start" - DescriptorProto_ReservedRange_End_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.ReservedRange.end" -) - -// Field numbers for google.protobuf.DescriptorProto.ReservedRange. -const ( - DescriptorProto_ReservedRange_Start_field_number protoreflect.FieldNumber = 1 - DescriptorProto_ReservedRange_End_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.ExtensionRangeOptions. -const ( - ExtensionRangeOptions_message_name protoreflect.Name = "ExtensionRangeOptions" - ExtensionRangeOptions_message_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions" -) - -// Field names for google.protobuf.ExtensionRangeOptions. -const ( - ExtensionRangeOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - ExtensionRangeOptions_Declaration_field_name protoreflect.Name = "declaration" - ExtensionRangeOptions_Features_field_name protoreflect.Name = "features" - ExtensionRangeOptions_Verification_field_name protoreflect.Name = "verification" - - ExtensionRangeOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.uninterpreted_option" - ExtensionRangeOptions_Declaration_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.declaration" - ExtensionRangeOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.features" - ExtensionRangeOptions_Verification_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.verification" -) - -// Field numbers for google.protobuf.ExtensionRangeOptions. -const ( - ExtensionRangeOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 - ExtensionRangeOptions_Declaration_field_number protoreflect.FieldNumber = 2 - ExtensionRangeOptions_Features_field_number protoreflect.FieldNumber = 50 - ExtensionRangeOptions_Verification_field_number protoreflect.FieldNumber = 3 -) - -// Full and short names for google.protobuf.ExtensionRangeOptions.VerificationState. -const ( - ExtensionRangeOptions_VerificationState_enum_fullname = "google.protobuf.ExtensionRangeOptions.VerificationState" - ExtensionRangeOptions_VerificationState_enum_name = "VerificationState" -) - -// Names for google.protobuf.ExtensionRangeOptions.Declaration. -const ( - ExtensionRangeOptions_Declaration_message_name protoreflect.Name = "Declaration" - ExtensionRangeOptions_Declaration_message_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration" -) - -// Field names for google.protobuf.ExtensionRangeOptions.Declaration. -const ( - ExtensionRangeOptions_Declaration_Number_field_name protoreflect.Name = "number" - ExtensionRangeOptions_Declaration_FullName_field_name protoreflect.Name = "full_name" - ExtensionRangeOptions_Declaration_Type_field_name protoreflect.Name = "type" - ExtensionRangeOptions_Declaration_Reserved_field_name protoreflect.Name = "reserved" - ExtensionRangeOptions_Declaration_Repeated_field_name protoreflect.Name = "repeated" - - ExtensionRangeOptions_Declaration_Number_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.number" - ExtensionRangeOptions_Declaration_FullName_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.full_name" - ExtensionRangeOptions_Declaration_Type_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.type" - ExtensionRangeOptions_Declaration_Reserved_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.reserved" - ExtensionRangeOptions_Declaration_Repeated_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.repeated" -) - -// Field numbers for google.protobuf.ExtensionRangeOptions.Declaration. -const ( - ExtensionRangeOptions_Declaration_Number_field_number protoreflect.FieldNumber = 1 - ExtensionRangeOptions_Declaration_FullName_field_number protoreflect.FieldNumber = 2 - ExtensionRangeOptions_Declaration_Type_field_number protoreflect.FieldNumber = 3 - ExtensionRangeOptions_Declaration_Reserved_field_number protoreflect.FieldNumber = 5 - ExtensionRangeOptions_Declaration_Repeated_field_number protoreflect.FieldNumber = 6 -) - -// Names for google.protobuf.FieldDescriptorProto. -const ( - FieldDescriptorProto_message_name protoreflect.Name = "FieldDescriptorProto" - FieldDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto" -) - -// Field names for google.protobuf.FieldDescriptorProto. -const ( - FieldDescriptorProto_Name_field_name protoreflect.Name = "name" - FieldDescriptorProto_Number_field_name protoreflect.Name = "number" - FieldDescriptorProto_Label_field_name protoreflect.Name = "label" - FieldDescriptorProto_Type_field_name protoreflect.Name = "type" - FieldDescriptorProto_TypeName_field_name protoreflect.Name = "type_name" - FieldDescriptorProto_Extendee_field_name protoreflect.Name = "extendee" - FieldDescriptorProto_DefaultValue_field_name protoreflect.Name = "default_value" - FieldDescriptorProto_OneofIndex_field_name protoreflect.Name = "oneof_index" - FieldDescriptorProto_JsonName_field_name protoreflect.Name = "json_name" - FieldDescriptorProto_Options_field_name protoreflect.Name = "options" - FieldDescriptorProto_Proto3Optional_field_name protoreflect.Name = "proto3_optional" - - FieldDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.name" - FieldDescriptorProto_Number_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.number" - FieldDescriptorProto_Label_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.label" - FieldDescriptorProto_Type_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.type" - FieldDescriptorProto_TypeName_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.type_name" - FieldDescriptorProto_Extendee_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.extendee" - FieldDescriptorProto_DefaultValue_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.default_value" - FieldDescriptorProto_OneofIndex_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.oneof_index" - FieldDescriptorProto_JsonName_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.json_name" - FieldDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.options" - FieldDescriptorProto_Proto3Optional_field_fullname protoreflect.FullName = "google.protobuf.FieldDescriptorProto.proto3_optional" -) - -// Field numbers for google.protobuf.FieldDescriptorProto. -const ( - FieldDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - FieldDescriptorProto_Number_field_number protoreflect.FieldNumber = 3 - FieldDescriptorProto_Label_field_number protoreflect.FieldNumber = 4 - FieldDescriptorProto_Type_field_number protoreflect.FieldNumber = 5 - FieldDescriptorProto_TypeName_field_number protoreflect.FieldNumber = 6 - FieldDescriptorProto_Extendee_field_number protoreflect.FieldNumber = 2 - FieldDescriptorProto_DefaultValue_field_number protoreflect.FieldNumber = 7 - FieldDescriptorProto_OneofIndex_field_number protoreflect.FieldNumber = 9 - FieldDescriptorProto_JsonName_field_number protoreflect.FieldNumber = 10 - FieldDescriptorProto_Options_field_number protoreflect.FieldNumber = 8 - FieldDescriptorProto_Proto3Optional_field_number protoreflect.FieldNumber = 17 -) - -// Full and short names for google.protobuf.FieldDescriptorProto.Type. -const ( - FieldDescriptorProto_Type_enum_fullname = "google.protobuf.FieldDescriptorProto.Type" - FieldDescriptorProto_Type_enum_name = "Type" -) - -// Full and short names for google.protobuf.FieldDescriptorProto.Label. -const ( - FieldDescriptorProto_Label_enum_fullname = "google.protobuf.FieldDescriptorProto.Label" - FieldDescriptorProto_Label_enum_name = "Label" -) - -// Names for google.protobuf.OneofDescriptorProto. -const ( - OneofDescriptorProto_message_name protoreflect.Name = "OneofDescriptorProto" - OneofDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.OneofDescriptorProto" -) - -// Field names for google.protobuf.OneofDescriptorProto. -const ( - OneofDescriptorProto_Name_field_name protoreflect.Name = "name" - OneofDescriptorProto_Options_field_name protoreflect.Name = "options" - - OneofDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.OneofDescriptorProto.name" - OneofDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.OneofDescriptorProto.options" -) - -// Field numbers for google.protobuf.OneofDescriptorProto. -const ( - OneofDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - OneofDescriptorProto_Options_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.EnumDescriptorProto. -const ( - EnumDescriptorProto_message_name protoreflect.Name = "EnumDescriptorProto" - EnumDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto" -) - -// Field names for google.protobuf.EnumDescriptorProto. -const ( - EnumDescriptorProto_Name_field_name protoreflect.Name = "name" - EnumDescriptorProto_Value_field_name protoreflect.Name = "value" - EnumDescriptorProto_Options_field_name protoreflect.Name = "options" - EnumDescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range" - EnumDescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name" - - EnumDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.name" - EnumDescriptorProto_Value_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.value" - EnumDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.options" - EnumDescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_range" - EnumDescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_name" -) - -// Field numbers for google.protobuf.EnumDescriptorProto. -const ( - EnumDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - EnumDescriptorProto_Value_field_number protoreflect.FieldNumber = 2 - EnumDescriptorProto_Options_field_number protoreflect.FieldNumber = 3 - EnumDescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 4 - EnumDescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 5 -) - -// Names for google.protobuf.EnumDescriptorProto.EnumReservedRange. -const ( - EnumDescriptorProto_EnumReservedRange_message_name protoreflect.Name = "EnumReservedRange" - EnumDescriptorProto_EnumReservedRange_message_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.EnumReservedRange" -) - -// Field names for google.protobuf.EnumDescriptorProto.EnumReservedRange. -const ( - EnumDescriptorProto_EnumReservedRange_Start_field_name protoreflect.Name = "start" - EnumDescriptorProto_EnumReservedRange_End_field_name protoreflect.Name = "end" - - EnumDescriptorProto_EnumReservedRange_Start_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.EnumReservedRange.start" - EnumDescriptorProto_EnumReservedRange_End_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.EnumReservedRange.end" -) - -// Field numbers for google.protobuf.EnumDescriptorProto.EnumReservedRange. -const ( - EnumDescriptorProto_EnumReservedRange_Start_field_number protoreflect.FieldNumber = 1 - EnumDescriptorProto_EnumReservedRange_End_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.EnumValueDescriptorProto. -const ( - EnumValueDescriptorProto_message_name protoreflect.Name = "EnumValueDescriptorProto" - EnumValueDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.EnumValueDescriptorProto" -) - -// Field names for google.protobuf.EnumValueDescriptorProto. -const ( - EnumValueDescriptorProto_Name_field_name protoreflect.Name = "name" - EnumValueDescriptorProto_Number_field_name protoreflect.Name = "number" - EnumValueDescriptorProto_Options_field_name protoreflect.Name = "options" - - EnumValueDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.EnumValueDescriptorProto.name" - EnumValueDescriptorProto_Number_field_fullname protoreflect.FullName = "google.protobuf.EnumValueDescriptorProto.number" - EnumValueDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.EnumValueDescriptorProto.options" -) - -// Field numbers for google.protobuf.EnumValueDescriptorProto. -const ( - EnumValueDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - EnumValueDescriptorProto_Number_field_number protoreflect.FieldNumber = 2 - EnumValueDescriptorProto_Options_field_number protoreflect.FieldNumber = 3 -) - -// Names for google.protobuf.ServiceDescriptorProto. -const ( - ServiceDescriptorProto_message_name protoreflect.Name = "ServiceDescriptorProto" - ServiceDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.ServiceDescriptorProto" -) - -// Field names for google.protobuf.ServiceDescriptorProto. -const ( - ServiceDescriptorProto_Name_field_name protoreflect.Name = "name" - ServiceDescriptorProto_Method_field_name protoreflect.Name = "method" - ServiceDescriptorProto_Options_field_name protoreflect.Name = "options" - - ServiceDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.ServiceDescriptorProto.name" - ServiceDescriptorProto_Method_field_fullname protoreflect.FullName = "google.protobuf.ServiceDescriptorProto.method" - ServiceDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.ServiceDescriptorProto.options" -) - -// Field numbers for google.protobuf.ServiceDescriptorProto. -const ( - ServiceDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - ServiceDescriptorProto_Method_field_number protoreflect.FieldNumber = 2 - ServiceDescriptorProto_Options_field_number protoreflect.FieldNumber = 3 -) - -// Names for google.protobuf.MethodDescriptorProto. -const ( - MethodDescriptorProto_message_name protoreflect.Name = "MethodDescriptorProto" - MethodDescriptorProto_message_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto" -) - -// Field names for google.protobuf.MethodDescriptorProto. -const ( - MethodDescriptorProto_Name_field_name protoreflect.Name = "name" - MethodDescriptorProto_InputType_field_name protoreflect.Name = "input_type" - MethodDescriptorProto_OutputType_field_name protoreflect.Name = "output_type" - MethodDescriptorProto_Options_field_name protoreflect.Name = "options" - MethodDescriptorProto_ClientStreaming_field_name protoreflect.Name = "client_streaming" - MethodDescriptorProto_ServerStreaming_field_name protoreflect.Name = "server_streaming" - - MethodDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto.name" - MethodDescriptorProto_InputType_field_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto.input_type" - MethodDescriptorProto_OutputType_field_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto.output_type" - MethodDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto.options" - MethodDescriptorProto_ClientStreaming_field_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto.client_streaming" - MethodDescriptorProto_ServerStreaming_field_fullname protoreflect.FullName = "google.protobuf.MethodDescriptorProto.server_streaming" -) - -// Field numbers for google.protobuf.MethodDescriptorProto. -const ( - MethodDescriptorProto_Name_field_number protoreflect.FieldNumber = 1 - MethodDescriptorProto_InputType_field_number protoreflect.FieldNumber = 2 - MethodDescriptorProto_OutputType_field_number protoreflect.FieldNumber = 3 - MethodDescriptorProto_Options_field_number protoreflect.FieldNumber = 4 - MethodDescriptorProto_ClientStreaming_field_number protoreflect.FieldNumber = 5 - MethodDescriptorProto_ServerStreaming_field_number protoreflect.FieldNumber = 6 -) - -// Names for google.protobuf.FileOptions. -const ( - FileOptions_message_name protoreflect.Name = "FileOptions" - FileOptions_message_fullname protoreflect.FullName = "google.protobuf.FileOptions" -) - -// Field names for google.protobuf.FileOptions. -const ( - FileOptions_JavaPackage_field_name protoreflect.Name = "java_package" - FileOptions_JavaOuterClassname_field_name protoreflect.Name = "java_outer_classname" - FileOptions_JavaMultipleFiles_field_name protoreflect.Name = "java_multiple_files" - FileOptions_JavaGenerateEqualsAndHash_field_name protoreflect.Name = "java_generate_equals_and_hash" - FileOptions_JavaStringCheckUtf8_field_name protoreflect.Name = "java_string_check_utf8" - FileOptions_OptimizeFor_field_name protoreflect.Name = "optimize_for" - FileOptions_GoPackage_field_name protoreflect.Name = "go_package" - FileOptions_CcGenericServices_field_name protoreflect.Name = "cc_generic_services" - FileOptions_JavaGenericServices_field_name protoreflect.Name = "java_generic_services" - FileOptions_PyGenericServices_field_name protoreflect.Name = "py_generic_services" - FileOptions_PhpGenericServices_field_name protoreflect.Name = "php_generic_services" - FileOptions_Deprecated_field_name protoreflect.Name = "deprecated" - FileOptions_CcEnableArenas_field_name protoreflect.Name = "cc_enable_arenas" - FileOptions_ObjcClassPrefix_field_name protoreflect.Name = "objc_class_prefix" - FileOptions_CsharpNamespace_field_name protoreflect.Name = "csharp_namespace" - FileOptions_SwiftPrefix_field_name protoreflect.Name = "swift_prefix" - FileOptions_PhpClassPrefix_field_name protoreflect.Name = "php_class_prefix" - FileOptions_PhpNamespace_field_name protoreflect.Name = "php_namespace" - FileOptions_PhpMetadataNamespace_field_name protoreflect.Name = "php_metadata_namespace" - FileOptions_RubyPackage_field_name protoreflect.Name = "ruby_package" - FileOptions_Features_field_name protoreflect.Name = "features" - FileOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - FileOptions_JavaPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_package" - FileOptions_JavaOuterClassname_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_outer_classname" - FileOptions_JavaMultipleFiles_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_multiple_files" - FileOptions_JavaGenerateEqualsAndHash_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_generate_equals_and_hash" - FileOptions_JavaStringCheckUtf8_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_string_check_utf8" - FileOptions_OptimizeFor_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.optimize_for" - FileOptions_GoPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.go_package" - FileOptions_CcGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_generic_services" - FileOptions_JavaGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_generic_services" - FileOptions_PyGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.py_generic_services" - FileOptions_PhpGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_generic_services" - FileOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.deprecated" - FileOptions_CcEnableArenas_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_enable_arenas" - FileOptions_ObjcClassPrefix_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.objc_class_prefix" - FileOptions_CsharpNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.csharp_namespace" - FileOptions_SwiftPrefix_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.swift_prefix" - FileOptions_PhpClassPrefix_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_class_prefix" - FileOptions_PhpNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_namespace" - FileOptions_PhpMetadataNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_metadata_namespace" - FileOptions_RubyPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.ruby_package" - FileOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.features" - FileOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.FileOptions. -const ( - FileOptions_JavaPackage_field_number protoreflect.FieldNumber = 1 - FileOptions_JavaOuterClassname_field_number protoreflect.FieldNumber = 8 - FileOptions_JavaMultipleFiles_field_number protoreflect.FieldNumber = 10 - FileOptions_JavaGenerateEqualsAndHash_field_number protoreflect.FieldNumber = 20 - FileOptions_JavaStringCheckUtf8_field_number protoreflect.FieldNumber = 27 - FileOptions_OptimizeFor_field_number protoreflect.FieldNumber = 9 - FileOptions_GoPackage_field_number protoreflect.FieldNumber = 11 - FileOptions_CcGenericServices_field_number protoreflect.FieldNumber = 16 - FileOptions_JavaGenericServices_field_number protoreflect.FieldNumber = 17 - FileOptions_PyGenericServices_field_number protoreflect.FieldNumber = 18 - FileOptions_PhpGenericServices_field_number protoreflect.FieldNumber = 42 - FileOptions_Deprecated_field_number protoreflect.FieldNumber = 23 - FileOptions_CcEnableArenas_field_number protoreflect.FieldNumber = 31 - FileOptions_ObjcClassPrefix_field_number protoreflect.FieldNumber = 36 - FileOptions_CsharpNamespace_field_number protoreflect.FieldNumber = 37 - FileOptions_SwiftPrefix_field_number protoreflect.FieldNumber = 39 - FileOptions_PhpClassPrefix_field_number protoreflect.FieldNumber = 40 - FileOptions_PhpNamespace_field_number protoreflect.FieldNumber = 41 - FileOptions_PhpMetadataNamespace_field_number protoreflect.FieldNumber = 44 - FileOptions_RubyPackage_field_number protoreflect.FieldNumber = 45 - FileOptions_Features_field_number protoreflect.FieldNumber = 50 - FileOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Full and short names for google.protobuf.FileOptions.OptimizeMode. -const ( - FileOptions_OptimizeMode_enum_fullname = "google.protobuf.FileOptions.OptimizeMode" - FileOptions_OptimizeMode_enum_name = "OptimizeMode" -) - -// Names for google.protobuf.MessageOptions. -const ( - MessageOptions_message_name protoreflect.Name = "MessageOptions" - MessageOptions_message_fullname protoreflect.FullName = "google.protobuf.MessageOptions" -) - -// Field names for google.protobuf.MessageOptions. -const ( - MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format" - MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor" - MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated" - MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry" - MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts" - MessageOptions_Features_field_name protoreflect.Name = "features" - MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format" - MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor" - MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated" - MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry" - MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts" - MessageOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.features" - MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.MessageOptions. -const ( - MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1 - MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2 - MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7 - MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11 - MessageOptions_Features_field_number protoreflect.FieldNumber = 12 - MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Names for google.protobuf.FieldOptions. -const ( - FieldOptions_message_name protoreflect.Name = "FieldOptions" - FieldOptions_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions" -) - -// Field names for google.protobuf.FieldOptions. -const ( - FieldOptions_Ctype_field_name protoreflect.Name = "ctype" - FieldOptions_Packed_field_name protoreflect.Name = "packed" - FieldOptions_Jstype_field_name protoreflect.Name = "jstype" - FieldOptions_Lazy_field_name protoreflect.Name = "lazy" - FieldOptions_UnverifiedLazy_field_name protoreflect.Name = "unverified_lazy" - FieldOptions_Deprecated_field_name protoreflect.Name = "deprecated" - FieldOptions_Weak_field_name protoreflect.Name = "weak" - FieldOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" - FieldOptions_Retention_field_name protoreflect.Name = "retention" - FieldOptions_Targets_field_name protoreflect.Name = "targets" - FieldOptions_EditionDefaults_field_name protoreflect.Name = "edition_defaults" - FieldOptions_Features_field_name protoreflect.Name = "features" - FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype" - FieldOptions_Packed_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.packed" - FieldOptions_Jstype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.jstype" - FieldOptions_Lazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.lazy" - FieldOptions_UnverifiedLazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.unverified_lazy" - FieldOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.deprecated" - FieldOptions_Weak_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.weak" - FieldOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.debug_redact" - FieldOptions_Retention_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.retention" - FieldOptions_Targets_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.targets" - FieldOptions_EditionDefaults_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.edition_defaults" - FieldOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.features" - FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.FieldOptions. -const ( - FieldOptions_Ctype_field_number protoreflect.FieldNumber = 1 - FieldOptions_Packed_field_number protoreflect.FieldNumber = 2 - FieldOptions_Jstype_field_number protoreflect.FieldNumber = 6 - FieldOptions_Lazy_field_number protoreflect.FieldNumber = 5 - FieldOptions_UnverifiedLazy_field_number protoreflect.FieldNumber = 15 - FieldOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - FieldOptions_Weak_field_number protoreflect.FieldNumber = 10 - FieldOptions_DebugRedact_field_number protoreflect.FieldNumber = 16 - FieldOptions_Retention_field_number protoreflect.FieldNumber = 17 - FieldOptions_Targets_field_number protoreflect.FieldNumber = 19 - FieldOptions_EditionDefaults_field_number protoreflect.FieldNumber = 20 - FieldOptions_Features_field_number protoreflect.FieldNumber = 21 - FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Full and short names for google.protobuf.FieldOptions.CType. -const ( - FieldOptions_CType_enum_fullname = "google.protobuf.FieldOptions.CType" - FieldOptions_CType_enum_name = "CType" -) - -// Full and short names for google.protobuf.FieldOptions.JSType. -const ( - FieldOptions_JSType_enum_fullname = "google.protobuf.FieldOptions.JSType" - FieldOptions_JSType_enum_name = "JSType" -) - -// Full and short names for google.protobuf.FieldOptions.OptionRetention. -const ( - FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention" - FieldOptions_OptionRetention_enum_name = "OptionRetention" -) - -// Full and short names for google.protobuf.FieldOptions.OptionTargetType. -const ( - FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType" - FieldOptions_OptionTargetType_enum_name = "OptionTargetType" -) - -// Names for google.protobuf.FieldOptions.EditionDefault. -const ( - FieldOptions_EditionDefault_message_name protoreflect.Name = "EditionDefault" - FieldOptions_EditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault" -) - -// Field names for google.protobuf.FieldOptions.EditionDefault. -const ( - FieldOptions_EditionDefault_Edition_field_name protoreflect.Name = "edition" - FieldOptions_EditionDefault_Value_field_name protoreflect.Name = "value" - - FieldOptions_EditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.edition" - FieldOptions_EditionDefault_Value_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.value" -) - -// Field numbers for google.protobuf.FieldOptions.EditionDefault. -const ( - FieldOptions_EditionDefault_Edition_field_number protoreflect.FieldNumber = 3 - FieldOptions_EditionDefault_Value_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.OneofOptions. -const ( - OneofOptions_message_name protoreflect.Name = "OneofOptions" - OneofOptions_message_fullname protoreflect.FullName = "google.protobuf.OneofOptions" -) - -// Field names for google.protobuf.OneofOptions. -const ( - OneofOptions_Features_field_name protoreflect.Name = "features" - OneofOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - OneofOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.features" - OneofOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.OneofOptions. -const ( - OneofOptions_Features_field_number protoreflect.FieldNumber = 1 - OneofOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Names for google.protobuf.EnumOptions. -const ( - EnumOptions_message_name protoreflect.Name = "EnumOptions" - EnumOptions_message_fullname protoreflect.FullName = "google.protobuf.EnumOptions" -) - -// Field names for google.protobuf.EnumOptions. -const ( - EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias" - EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated" - EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts" - EnumOptions_Features_field_name protoreflect.Name = "features" - EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias" - EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated" - EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts" - EnumOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.features" - EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.EnumOptions. -const ( - EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2 - EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6 - EnumOptions_Features_field_number protoreflect.FieldNumber = 7 - EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Names for google.protobuf.EnumValueOptions. -const ( - EnumValueOptions_message_name protoreflect.Name = "EnumValueOptions" - EnumValueOptions_message_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions" -) - -// Field names for google.protobuf.EnumValueOptions. -const ( - EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" - EnumValueOptions_Features_field_name protoreflect.Name = "features" - EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" - EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" - EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" - EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" - EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.EnumValueOptions. -const ( - EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 - EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 - EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 - EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Names for google.protobuf.ServiceOptions. -const ( - ServiceOptions_message_name protoreflect.Name = "ServiceOptions" - ServiceOptions_message_fullname protoreflect.FullName = "google.protobuf.ServiceOptions" -) - -// Field names for google.protobuf.ServiceOptions. -const ( - ServiceOptions_Features_field_name protoreflect.Name = "features" - ServiceOptions_Deprecated_field_name protoreflect.Name = "deprecated" - ServiceOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - ServiceOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.features" - ServiceOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.deprecated" - ServiceOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.ServiceOptions. -const ( - ServiceOptions_Features_field_number protoreflect.FieldNumber = 34 - ServiceOptions_Deprecated_field_number protoreflect.FieldNumber = 33 - ServiceOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Names for google.protobuf.MethodOptions. -const ( - MethodOptions_message_name protoreflect.Name = "MethodOptions" - MethodOptions_message_fullname protoreflect.FullName = "google.protobuf.MethodOptions" -) - -// Field names for google.protobuf.MethodOptions. -const ( - MethodOptions_Deprecated_field_name protoreflect.Name = "deprecated" - MethodOptions_IdempotencyLevel_field_name protoreflect.Name = "idempotency_level" - MethodOptions_Features_field_name protoreflect.Name = "features" - MethodOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - - MethodOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.deprecated" - MethodOptions_IdempotencyLevel_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.idempotency_level" - MethodOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.features" - MethodOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.uninterpreted_option" -) - -// Field numbers for google.protobuf.MethodOptions. -const ( - MethodOptions_Deprecated_field_number protoreflect.FieldNumber = 33 - MethodOptions_IdempotencyLevel_field_number protoreflect.FieldNumber = 34 - MethodOptions_Features_field_number protoreflect.FieldNumber = 35 - MethodOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 -) - -// Full and short names for google.protobuf.MethodOptions.IdempotencyLevel. -const ( - MethodOptions_IdempotencyLevel_enum_fullname = "google.protobuf.MethodOptions.IdempotencyLevel" - MethodOptions_IdempotencyLevel_enum_name = "IdempotencyLevel" -) - -// Names for google.protobuf.UninterpretedOption. -const ( - UninterpretedOption_message_name protoreflect.Name = "UninterpretedOption" - UninterpretedOption_message_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption" -) - -// Field names for google.protobuf.UninterpretedOption. -const ( - UninterpretedOption_Name_field_name protoreflect.Name = "name" - UninterpretedOption_IdentifierValue_field_name protoreflect.Name = "identifier_value" - UninterpretedOption_PositiveIntValue_field_name protoreflect.Name = "positive_int_value" - UninterpretedOption_NegativeIntValue_field_name protoreflect.Name = "negative_int_value" - UninterpretedOption_DoubleValue_field_name protoreflect.Name = "double_value" - UninterpretedOption_StringValue_field_name protoreflect.Name = "string_value" - UninterpretedOption_AggregateValue_field_name protoreflect.Name = "aggregate_value" - - UninterpretedOption_Name_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.name" - UninterpretedOption_IdentifierValue_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.identifier_value" - UninterpretedOption_PositiveIntValue_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.positive_int_value" - UninterpretedOption_NegativeIntValue_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.negative_int_value" - UninterpretedOption_DoubleValue_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.double_value" - UninterpretedOption_StringValue_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.string_value" - UninterpretedOption_AggregateValue_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.aggregate_value" -) - -// Field numbers for google.protobuf.UninterpretedOption. -const ( - UninterpretedOption_Name_field_number protoreflect.FieldNumber = 2 - UninterpretedOption_IdentifierValue_field_number protoreflect.FieldNumber = 3 - UninterpretedOption_PositiveIntValue_field_number protoreflect.FieldNumber = 4 - UninterpretedOption_NegativeIntValue_field_number protoreflect.FieldNumber = 5 - UninterpretedOption_DoubleValue_field_number protoreflect.FieldNumber = 6 - UninterpretedOption_StringValue_field_number protoreflect.FieldNumber = 7 - UninterpretedOption_AggregateValue_field_number protoreflect.FieldNumber = 8 -) - -// Names for google.protobuf.UninterpretedOption.NamePart. -const ( - UninterpretedOption_NamePart_message_name protoreflect.Name = "NamePart" - UninterpretedOption_NamePart_message_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.NamePart" -) - -// Field names for google.protobuf.UninterpretedOption.NamePart. -const ( - UninterpretedOption_NamePart_NamePart_field_name protoreflect.Name = "name_part" - UninterpretedOption_NamePart_IsExtension_field_name protoreflect.Name = "is_extension" - - UninterpretedOption_NamePart_NamePart_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.NamePart.name_part" - UninterpretedOption_NamePart_IsExtension_field_fullname protoreflect.FullName = "google.protobuf.UninterpretedOption.NamePart.is_extension" -) - -// Field numbers for google.protobuf.UninterpretedOption.NamePart. -const ( - UninterpretedOption_NamePart_NamePart_field_number protoreflect.FieldNumber = 1 - UninterpretedOption_NamePart_IsExtension_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.FeatureSet. -const ( - FeatureSet_message_name protoreflect.Name = "FeatureSet" - FeatureSet_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet" -) - -// Field names for google.protobuf.FeatureSet. -const ( - FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence" - FeatureSet_EnumType_field_name protoreflect.Name = "enum_type" - FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding" - FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation" - FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding" - FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format" - - FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence" - FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type" - FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding" - FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation" - FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding" - FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format" -) - -// Field numbers for google.protobuf.FeatureSet. -const ( - FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1 - FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2 - FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3 - FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4 - FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5 - FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6 -) - -// Full and short names for google.protobuf.FeatureSet.FieldPresence. -const ( - FeatureSet_FieldPresence_enum_fullname = "google.protobuf.FeatureSet.FieldPresence" - FeatureSet_FieldPresence_enum_name = "FieldPresence" -) - -// Full and short names for google.protobuf.FeatureSet.EnumType. -const ( - FeatureSet_EnumType_enum_fullname = "google.protobuf.FeatureSet.EnumType" - FeatureSet_EnumType_enum_name = "EnumType" -) - -// Full and short names for google.protobuf.FeatureSet.RepeatedFieldEncoding. -const ( - FeatureSet_RepeatedFieldEncoding_enum_fullname = "google.protobuf.FeatureSet.RepeatedFieldEncoding" - FeatureSet_RepeatedFieldEncoding_enum_name = "RepeatedFieldEncoding" -) - -// Full and short names for google.protobuf.FeatureSet.Utf8Validation. -const ( - FeatureSet_Utf8Validation_enum_fullname = "google.protobuf.FeatureSet.Utf8Validation" - FeatureSet_Utf8Validation_enum_name = "Utf8Validation" -) - -// Full and short names for google.protobuf.FeatureSet.MessageEncoding. -const ( - FeatureSet_MessageEncoding_enum_fullname = "google.protobuf.FeatureSet.MessageEncoding" - FeatureSet_MessageEncoding_enum_name = "MessageEncoding" -) - -// Full and short names for google.protobuf.FeatureSet.JsonFormat. -const ( - FeatureSet_JsonFormat_enum_fullname = "google.protobuf.FeatureSet.JsonFormat" - FeatureSet_JsonFormat_enum_name = "JsonFormat" -) - -// Names for google.protobuf.FeatureSetDefaults. -const ( - FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults" - FeatureSetDefaults_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults" -) - -// Field names for google.protobuf.FeatureSetDefaults. -const ( - FeatureSetDefaults_Defaults_field_name protoreflect.Name = "defaults" - FeatureSetDefaults_MinimumEdition_field_name protoreflect.Name = "minimum_edition" - FeatureSetDefaults_MaximumEdition_field_name protoreflect.Name = "maximum_edition" - - FeatureSetDefaults_Defaults_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.defaults" - FeatureSetDefaults_MinimumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.minimum_edition" - FeatureSetDefaults_MaximumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.maximum_edition" -) - -// Field numbers for google.protobuf.FeatureSetDefaults. -const ( - FeatureSetDefaults_Defaults_field_number protoreflect.FieldNumber = 1 - FeatureSetDefaults_MinimumEdition_field_number protoreflect.FieldNumber = 4 - FeatureSetDefaults_MaximumEdition_field_number protoreflect.FieldNumber = 5 -) - -// Names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. -const ( - FeatureSetDefaults_FeatureSetEditionDefault_message_name protoreflect.Name = "FeatureSetEditionDefault" - FeatureSetDefaults_FeatureSetEditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" -) - -// Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. -const ( - FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition" - FeatureSetDefaults_FeatureSetEditionDefault_Features_field_name protoreflect.Name = "features" - - FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition" - FeatureSetDefaults_FeatureSetEditionDefault_Features_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features" -) - -// Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. -const ( - FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3 - FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.SourceCodeInfo. -const ( - SourceCodeInfo_message_name protoreflect.Name = "SourceCodeInfo" - SourceCodeInfo_message_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo" -) - -// Field names for google.protobuf.SourceCodeInfo. -const ( - SourceCodeInfo_Location_field_name protoreflect.Name = "location" - - SourceCodeInfo_Location_field_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.location" -) - -// Field numbers for google.protobuf.SourceCodeInfo. -const ( - SourceCodeInfo_Location_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.SourceCodeInfo.Location. -const ( - SourceCodeInfo_Location_message_name protoreflect.Name = "Location" - SourceCodeInfo_Location_message_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.Location" -) - -// Field names for google.protobuf.SourceCodeInfo.Location. -const ( - SourceCodeInfo_Location_Path_field_name protoreflect.Name = "path" - SourceCodeInfo_Location_Span_field_name protoreflect.Name = "span" - SourceCodeInfo_Location_LeadingComments_field_name protoreflect.Name = "leading_comments" - SourceCodeInfo_Location_TrailingComments_field_name protoreflect.Name = "trailing_comments" - SourceCodeInfo_Location_LeadingDetachedComments_field_name protoreflect.Name = "leading_detached_comments" - - SourceCodeInfo_Location_Path_field_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.Location.path" - SourceCodeInfo_Location_Span_field_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.Location.span" - SourceCodeInfo_Location_LeadingComments_field_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.Location.leading_comments" - SourceCodeInfo_Location_TrailingComments_field_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.Location.trailing_comments" - SourceCodeInfo_Location_LeadingDetachedComments_field_fullname protoreflect.FullName = "google.protobuf.SourceCodeInfo.Location.leading_detached_comments" -) - -// Field numbers for google.protobuf.SourceCodeInfo.Location. -const ( - SourceCodeInfo_Location_Path_field_number protoreflect.FieldNumber = 1 - SourceCodeInfo_Location_Span_field_number protoreflect.FieldNumber = 2 - SourceCodeInfo_Location_LeadingComments_field_number protoreflect.FieldNumber = 3 - SourceCodeInfo_Location_TrailingComments_field_number protoreflect.FieldNumber = 4 - SourceCodeInfo_Location_LeadingDetachedComments_field_number protoreflect.FieldNumber = 6 -) - -// Names for google.protobuf.GeneratedCodeInfo. -const ( - GeneratedCodeInfo_message_name protoreflect.Name = "GeneratedCodeInfo" - GeneratedCodeInfo_message_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo" -) - -// Field names for google.protobuf.GeneratedCodeInfo. -const ( - GeneratedCodeInfo_Annotation_field_name protoreflect.Name = "annotation" - - GeneratedCodeInfo_Annotation_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.annotation" -) - -// Field numbers for google.protobuf.GeneratedCodeInfo. -const ( - GeneratedCodeInfo_Annotation_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.GeneratedCodeInfo.Annotation. -const ( - GeneratedCodeInfo_Annotation_message_name protoreflect.Name = "Annotation" - GeneratedCodeInfo_Annotation_message_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation" -) - -// Field names for google.protobuf.GeneratedCodeInfo.Annotation. -const ( - GeneratedCodeInfo_Annotation_Path_field_name protoreflect.Name = "path" - GeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = "source_file" - GeneratedCodeInfo_Annotation_Begin_field_name protoreflect.Name = "begin" - GeneratedCodeInfo_Annotation_End_field_name protoreflect.Name = "end" - GeneratedCodeInfo_Annotation_Semantic_field_name protoreflect.Name = "semantic" - - GeneratedCodeInfo_Annotation_Path_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.path" - GeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.source_file" - GeneratedCodeInfo_Annotation_Begin_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.begin" - GeneratedCodeInfo_Annotation_End_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.end" - GeneratedCodeInfo_Annotation_Semantic_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.semantic" -) - -// Field numbers for google.protobuf.GeneratedCodeInfo.Annotation. -const ( - GeneratedCodeInfo_Annotation_Path_field_number protoreflect.FieldNumber = 1 - GeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldNumber = 2 - GeneratedCodeInfo_Annotation_Begin_field_number protoreflect.FieldNumber = 3 - GeneratedCodeInfo_Annotation_End_field_number protoreflect.FieldNumber = 4 - GeneratedCodeInfo_Annotation_Semantic_field_number protoreflect.FieldNumber = 5 -) - -// Full and short names for google.protobuf.GeneratedCodeInfo.Annotation.Semantic. -const ( - GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic" - GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic" -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/doc.go b/vendor/google.golang.org/protobuf/internal/genid/doc.go deleted file mode 100644 index 45ccd012..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/doc.go +++ /dev/null @@ -1,11 +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 genid contains constants for declarations in descriptor.proto -// and the well-known types. -package genid - -import protoreflect "google.golang.org/protobuf/reflect/protoreflect" - -const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" diff --git a/vendor/google.golang.org/protobuf/internal/genid/duration_gen.go b/vendor/google.golang.org/protobuf/internal/genid/duration_gen.go deleted file mode 100644 index b070ef4f..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/duration_gen.go +++ /dev/null @@ -1,34 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_duration_proto = "google/protobuf/duration.proto" - -// Names for google.protobuf.Duration. -const ( - Duration_message_name protoreflect.Name = "Duration" - Duration_message_fullname protoreflect.FullName = "google.protobuf.Duration" -) - -// Field names for google.protobuf.Duration. -const ( - Duration_Seconds_field_name protoreflect.Name = "seconds" - Duration_Nanos_field_name protoreflect.Name = "nanos" - - Duration_Seconds_field_fullname protoreflect.FullName = "google.protobuf.Duration.seconds" - Duration_Nanos_field_fullname protoreflect.FullName = "google.protobuf.Duration.nanos" -) - -// Field numbers for google.protobuf.Duration. -const ( - Duration_Seconds_field_number protoreflect.FieldNumber = 1 - Duration_Nanos_field_number protoreflect.FieldNumber = 2 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go b/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go deleted file mode 100644 index 762abb34..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go +++ /dev/null @@ -1,19 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" - -// Names for google.protobuf.Empty. -const ( - Empty_message_name protoreflect.Name = "Empty" - Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go b/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go deleted file mode 100644 index 70bed453..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go +++ /dev/null @@ -1,31 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto" - -// Names for google.protobuf.FieldMask. -const ( - FieldMask_message_name protoreflect.Name = "FieldMask" - FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask" -) - -// Field names for google.protobuf.FieldMask. -const ( - FieldMask_Paths_field_name protoreflect.Name = "paths" - - FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths" -) - -// Field numbers for google.protobuf.FieldMask. -const ( - FieldMask_Paths_field_number protoreflect.FieldNumber = 1 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/goname.go b/vendor/google.golang.org/protobuf/internal/genid/goname.go deleted file mode 100644 index 693d2e9e..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/goname.go +++ /dev/null @@ -1,25 +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 genid - -// Go names of implementation-specific struct fields in generated messages. -const ( - State_goname = "state" - - SizeCache_goname = "sizeCache" - SizeCacheA_goname = "XXX_sizecache" - - WeakFields_goname = "weakFields" - WeakFieldsA_goname = "XXX_weak" - - UnknownFields_goname = "unknownFields" - UnknownFieldsA_goname = "XXX_unrecognized" - - ExtensionFields_goname = "extensionFields" - ExtensionFieldsA_goname = "XXX_InternalExtensions" - ExtensionFieldsB_goname = "XXX_extensions" - - WeakFieldPrefix_goname = "XXX_weak_" -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/map_entry.go b/vendor/google.golang.org/protobuf/internal/genid/map_entry.go deleted file mode 100644 index 8f9ea02f..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +++ /dev/null @@ -1,16 +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 genid - -import protoreflect "google.golang.org/protobuf/reflect/protoreflect" - -// Generic field names and numbers for synthetic map entry messages. -const ( - MapEntry_Key_field_name protoreflect.Name = "key" - MapEntry_Value_field_name protoreflect.Name = "value" - - MapEntry_Key_field_number protoreflect.FieldNumber = 1 - MapEntry_Value_field_number protoreflect.FieldNumber = 2 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go b/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go deleted file mode 100644 index 3e99ae16..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go +++ /dev/null @@ -1,31 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_source_context_proto = "google/protobuf/source_context.proto" - -// Names for google.protobuf.SourceContext. -const ( - SourceContext_message_name protoreflect.Name = "SourceContext" - SourceContext_message_fullname protoreflect.FullName = "google.protobuf.SourceContext" -) - -// Field names for google.protobuf.SourceContext. -const ( - SourceContext_FileName_field_name protoreflect.Name = "file_name" - - SourceContext_FileName_field_fullname protoreflect.FullName = "google.protobuf.SourceContext.file_name" -) - -// Field numbers for google.protobuf.SourceContext. -const ( - SourceContext_FileName_field_number protoreflect.FieldNumber = 1 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go b/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go deleted file mode 100644 index 1a38944b..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go +++ /dev/null @@ -1,116 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_struct_proto = "google/protobuf/struct.proto" - -// Full and short names for google.protobuf.NullValue. -const ( - NullValue_enum_fullname = "google.protobuf.NullValue" - NullValue_enum_name = "NullValue" -) - -// Names for google.protobuf.Struct. -const ( - Struct_message_name protoreflect.Name = "Struct" - Struct_message_fullname protoreflect.FullName = "google.protobuf.Struct" -) - -// Field names for google.protobuf.Struct. -const ( - Struct_Fields_field_name protoreflect.Name = "fields" - - Struct_Fields_field_fullname protoreflect.FullName = "google.protobuf.Struct.fields" -) - -// Field numbers for google.protobuf.Struct. -const ( - Struct_Fields_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.Struct.FieldsEntry. -const ( - Struct_FieldsEntry_message_name protoreflect.Name = "FieldsEntry" - Struct_FieldsEntry_message_fullname protoreflect.FullName = "google.protobuf.Struct.FieldsEntry" -) - -// Field names for google.protobuf.Struct.FieldsEntry. -const ( - Struct_FieldsEntry_Key_field_name protoreflect.Name = "key" - Struct_FieldsEntry_Value_field_name protoreflect.Name = "value" - - Struct_FieldsEntry_Key_field_fullname protoreflect.FullName = "google.protobuf.Struct.FieldsEntry.key" - Struct_FieldsEntry_Value_field_fullname protoreflect.FullName = "google.protobuf.Struct.FieldsEntry.value" -) - -// Field numbers for google.protobuf.Struct.FieldsEntry. -const ( - Struct_FieldsEntry_Key_field_number protoreflect.FieldNumber = 1 - Struct_FieldsEntry_Value_field_number protoreflect.FieldNumber = 2 -) - -// Names for google.protobuf.Value. -const ( - Value_message_name protoreflect.Name = "Value" - Value_message_fullname protoreflect.FullName = "google.protobuf.Value" -) - -// Field names for google.protobuf.Value. -const ( - Value_NullValue_field_name protoreflect.Name = "null_value" - Value_NumberValue_field_name protoreflect.Name = "number_value" - Value_StringValue_field_name protoreflect.Name = "string_value" - Value_BoolValue_field_name protoreflect.Name = "bool_value" - Value_StructValue_field_name protoreflect.Name = "struct_value" - Value_ListValue_field_name protoreflect.Name = "list_value" - - Value_NullValue_field_fullname protoreflect.FullName = "google.protobuf.Value.null_value" - Value_NumberValue_field_fullname protoreflect.FullName = "google.protobuf.Value.number_value" - Value_StringValue_field_fullname protoreflect.FullName = "google.protobuf.Value.string_value" - Value_BoolValue_field_fullname protoreflect.FullName = "google.protobuf.Value.bool_value" - Value_StructValue_field_fullname protoreflect.FullName = "google.protobuf.Value.struct_value" - Value_ListValue_field_fullname protoreflect.FullName = "google.protobuf.Value.list_value" -) - -// Field numbers for google.protobuf.Value. -const ( - Value_NullValue_field_number protoreflect.FieldNumber = 1 - Value_NumberValue_field_number protoreflect.FieldNumber = 2 - Value_StringValue_field_number protoreflect.FieldNumber = 3 - Value_BoolValue_field_number protoreflect.FieldNumber = 4 - Value_StructValue_field_number protoreflect.FieldNumber = 5 - Value_ListValue_field_number protoreflect.FieldNumber = 6 -) - -// Oneof names for google.protobuf.Value. -const ( - Value_Kind_oneof_name protoreflect.Name = "kind" - - Value_Kind_oneof_fullname protoreflect.FullName = "google.protobuf.Value.kind" -) - -// Names for google.protobuf.ListValue. -const ( - ListValue_message_name protoreflect.Name = "ListValue" - ListValue_message_fullname protoreflect.FullName = "google.protobuf.ListValue" -) - -// Field names for google.protobuf.ListValue. -const ( - ListValue_Values_field_name protoreflect.Name = "values" - - ListValue_Values_field_fullname protoreflect.FullName = "google.protobuf.ListValue.values" -) - -// Field numbers for google.protobuf.ListValue. -const ( - ListValue_Values_field_number protoreflect.FieldNumber = 1 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go b/vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go deleted file mode 100644 index f5cd5634..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go +++ /dev/null @@ -1,34 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_timestamp_proto = "google/protobuf/timestamp.proto" - -// Names for google.protobuf.Timestamp. -const ( - Timestamp_message_name protoreflect.Name = "Timestamp" - Timestamp_message_fullname protoreflect.FullName = "google.protobuf.Timestamp" -) - -// Field names for google.protobuf.Timestamp. -const ( - Timestamp_Seconds_field_name protoreflect.Name = "seconds" - Timestamp_Nanos_field_name protoreflect.Name = "nanos" - - Timestamp_Seconds_field_fullname protoreflect.FullName = "google.protobuf.Timestamp.seconds" - Timestamp_Nanos_field_fullname protoreflect.FullName = "google.protobuf.Timestamp.nanos" -) - -// Field numbers for google.protobuf.Timestamp. -const ( - Timestamp_Seconds_field_number protoreflect.FieldNumber = 1 - Timestamp_Nanos_field_number protoreflect.FieldNumber = 2 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go deleted file mode 100644 index e0f75fea..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go +++ /dev/null @@ -1,190 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_type_proto = "google/protobuf/type.proto" - -// Full and short names for google.protobuf.Syntax. -const ( - Syntax_enum_fullname = "google.protobuf.Syntax" - Syntax_enum_name = "Syntax" -) - -// Names for google.protobuf.Type. -const ( - Type_message_name protoreflect.Name = "Type" - Type_message_fullname protoreflect.FullName = "google.protobuf.Type" -) - -// Field names for google.protobuf.Type. -const ( - Type_Name_field_name protoreflect.Name = "name" - Type_Fields_field_name protoreflect.Name = "fields" - Type_Oneofs_field_name protoreflect.Name = "oneofs" - Type_Options_field_name protoreflect.Name = "options" - Type_SourceContext_field_name protoreflect.Name = "source_context" - Type_Syntax_field_name protoreflect.Name = "syntax" - Type_Edition_field_name protoreflect.Name = "edition" - - Type_Name_field_fullname protoreflect.FullName = "google.protobuf.Type.name" - Type_Fields_field_fullname protoreflect.FullName = "google.protobuf.Type.fields" - Type_Oneofs_field_fullname protoreflect.FullName = "google.protobuf.Type.oneofs" - Type_Options_field_fullname protoreflect.FullName = "google.protobuf.Type.options" - Type_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Type.source_context" - Type_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Type.syntax" - Type_Edition_field_fullname protoreflect.FullName = "google.protobuf.Type.edition" -) - -// Field numbers for google.protobuf.Type. -const ( - Type_Name_field_number protoreflect.FieldNumber = 1 - Type_Fields_field_number protoreflect.FieldNumber = 2 - Type_Oneofs_field_number protoreflect.FieldNumber = 3 - Type_Options_field_number protoreflect.FieldNumber = 4 - Type_SourceContext_field_number protoreflect.FieldNumber = 5 - Type_Syntax_field_number protoreflect.FieldNumber = 6 - Type_Edition_field_number protoreflect.FieldNumber = 7 -) - -// Names for google.protobuf.Field. -const ( - Field_message_name protoreflect.Name = "Field" - Field_message_fullname protoreflect.FullName = "google.protobuf.Field" -) - -// Field names for google.protobuf.Field. -const ( - Field_Kind_field_name protoreflect.Name = "kind" - Field_Cardinality_field_name protoreflect.Name = "cardinality" - Field_Number_field_name protoreflect.Name = "number" - Field_Name_field_name protoreflect.Name = "name" - Field_TypeUrl_field_name protoreflect.Name = "type_url" - Field_OneofIndex_field_name protoreflect.Name = "oneof_index" - Field_Packed_field_name protoreflect.Name = "packed" - Field_Options_field_name protoreflect.Name = "options" - Field_JsonName_field_name protoreflect.Name = "json_name" - Field_DefaultValue_field_name protoreflect.Name = "default_value" - - Field_Kind_field_fullname protoreflect.FullName = "google.protobuf.Field.kind" - Field_Cardinality_field_fullname protoreflect.FullName = "google.protobuf.Field.cardinality" - Field_Number_field_fullname protoreflect.FullName = "google.protobuf.Field.number" - Field_Name_field_fullname protoreflect.FullName = "google.protobuf.Field.name" - Field_TypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Field.type_url" - Field_OneofIndex_field_fullname protoreflect.FullName = "google.protobuf.Field.oneof_index" - Field_Packed_field_fullname protoreflect.FullName = "google.protobuf.Field.packed" - Field_Options_field_fullname protoreflect.FullName = "google.protobuf.Field.options" - Field_JsonName_field_fullname protoreflect.FullName = "google.protobuf.Field.json_name" - Field_DefaultValue_field_fullname protoreflect.FullName = "google.protobuf.Field.default_value" -) - -// Field numbers for google.protobuf.Field. -const ( - Field_Kind_field_number protoreflect.FieldNumber = 1 - Field_Cardinality_field_number protoreflect.FieldNumber = 2 - Field_Number_field_number protoreflect.FieldNumber = 3 - Field_Name_field_number protoreflect.FieldNumber = 4 - Field_TypeUrl_field_number protoreflect.FieldNumber = 6 - Field_OneofIndex_field_number protoreflect.FieldNumber = 7 - Field_Packed_field_number protoreflect.FieldNumber = 8 - Field_Options_field_number protoreflect.FieldNumber = 9 - Field_JsonName_field_number protoreflect.FieldNumber = 10 - Field_DefaultValue_field_number protoreflect.FieldNumber = 11 -) - -// Full and short names for google.protobuf.Field.Kind. -const ( - Field_Kind_enum_fullname = "google.protobuf.Field.Kind" - Field_Kind_enum_name = "Kind" -) - -// Full and short names for google.protobuf.Field.Cardinality. -const ( - Field_Cardinality_enum_fullname = "google.protobuf.Field.Cardinality" - Field_Cardinality_enum_name = "Cardinality" -) - -// Names for google.protobuf.Enum. -const ( - Enum_message_name protoreflect.Name = "Enum" - Enum_message_fullname protoreflect.FullName = "google.protobuf.Enum" -) - -// Field names for google.protobuf.Enum. -const ( - Enum_Name_field_name protoreflect.Name = "name" - Enum_Enumvalue_field_name protoreflect.Name = "enumvalue" - Enum_Options_field_name protoreflect.Name = "options" - Enum_SourceContext_field_name protoreflect.Name = "source_context" - Enum_Syntax_field_name protoreflect.Name = "syntax" - Enum_Edition_field_name protoreflect.Name = "edition" - - Enum_Name_field_fullname protoreflect.FullName = "google.protobuf.Enum.name" - Enum_Enumvalue_field_fullname protoreflect.FullName = "google.protobuf.Enum.enumvalue" - Enum_Options_field_fullname protoreflect.FullName = "google.protobuf.Enum.options" - Enum_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Enum.source_context" - Enum_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Enum.syntax" - Enum_Edition_field_fullname protoreflect.FullName = "google.protobuf.Enum.edition" -) - -// Field numbers for google.protobuf.Enum. -const ( - Enum_Name_field_number protoreflect.FieldNumber = 1 - Enum_Enumvalue_field_number protoreflect.FieldNumber = 2 - Enum_Options_field_number protoreflect.FieldNumber = 3 - Enum_SourceContext_field_number protoreflect.FieldNumber = 4 - Enum_Syntax_field_number protoreflect.FieldNumber = 5 - Enum_Edition_field_number protoreflect.FieldNumber = 6 -) - -// Names for google.protobuf.EnumValue. -const ( - EnumValue_message_name protoreflect.Name = "EnumValue" - EnumValue_message_fullname protoreflect.FullName = "google.protobuf.EnumValue" -) - -// Field names for google.protobuf.EnumValue. -const ( - EnumValue_Name_field_name protoreflect.Name = "name" - EnumValue_Number_field_name protoreflect.Name = "number" - EnumValue_Options_field_name protoreflect.Name = "options" - - EnumValue_Name_field_fullname protoreflect.FullName = "google.protobuf.EnumValue.name" - EnumValue_Number_field_fullname protoreflect.FullName = "google.protobuf.EnumValue.number" - EnumValue_Options_field_fullname protoreflect.FullName = "google.protobuf.EnumValue.options" -) - -// Field numbers for google.protobuf.EnumValue. -const ( - EnumValue_Name_field_number protoreflect.FieldNumber = 1 - EnumValue_Number_field_number protoreflect.FieldNumber = 2 - EnumValue_Options_field_number protoreflect.FieldNumber = 3 -) - -// Names for google.protobuf.Option. -const ( - Option_message_name protoreflect.Name = "Option" - Option_message_fullname protoreflect.FullName = "google.protobuf.Option" -) - -// Field names for google.protobuf.Option. -const ( - Option_Name_field_name protoreflect.Name = "name" - Option_Value_field_name protoreflect.Name = "value" - - Option_Name_field_fullname protoreflect.FullName = "google.protobuf.Option.name" - Option_Value_field_fullname protoreflect.FullName = "google.protobuf.Option.value" -) - -// Field numbers for google.protobuf.Option. -const ( - Option_Name_field_number protoreflect.FieldNumber = 1 - Option_Value_field_number protoreflect.FieldNumber = 2 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/wrappers.go b/vendor/google.golang.org/protobuf/internal/genid/wrappers.go deleted file mode 100644 index 429384b8..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +++ /dev/null @@ -1,13 +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 genid - -import protoreflect "google.golang.org/protobuf/reflect/protoreflect" - -// Generic field name and number for messages in wrappers.proto. -const ( - WrapperValue_Value_field_name protoreflect.Name = "value" - WrapperValue_Value_field_number protoreflect.FieldNumber = 1 -) diff --git a/vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go b/vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go deleted file mode 100644 index 72527d2a..00000000 --- a/vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go +++ /dev/null @@ -1,175 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package genid - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" -) - -const File_google_protobuf_wrappers_proto = "google/protobuf/wrappers.proto" - -// Names for google.protobuf.DoubleValue. -const ( - DoubleValue_message_name protoreflect.Name = "DoubleValue" - DoubleValue_message_fullname protoreflect.FullName = "google.protobuf.DoubleValue" -) - -// Field names for google.protobuf.DoubleValue. -const ( - DoubleValue_Value_field_name protoreflect.Name = "value" - - DoubleValue_Value_field_fullname protoreflect.FullName = "google.protobuf.DoubleValue.value" -) - -// Field numbers for google.protobuf.DoubleValue. -const ( - DoubleValue_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.FloatValue. -const ( - FloatValue_message_name protoreflect.Name = "FloatValue" - FloatValue_message_fullname protoreflect.FullName = "google.protobuf.FloatValue" -) - -// Field names for google.protobuf.FloatValue. -const ( - FloatValue_Value_field_name protoreflect.Name = "value" - - FloatValue_Value_field_fullname protoreflect.FullName = "google.protobuf.FloatValue.value" -) - -// Field numbers for google.protobuf.FloatValue. -const ( - FloatValue_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.Int64Value. -const ( - Int64Value_message_name protoreflect.Name = "Int64Value" - Int64Value_message_fullname protoreflect.FullName = "google.protobuf.Int64Value" -) - -// Field names for google.protobuf.Int64Value. -const ( - Int64Value_Value_field_name protoreflect.Name = "value" - - Int64Value_Value_field_fullname protoreflect.FullName = "google.protobuf.Int64Value.value" -) - -// Field numbers for google.protobuf.Int64Value. -const ( - Int64Value_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.UInt64Value. -const ( - UInt64Value_message_name protoreflect.Name = "UInt64Value" - UInt64Value_message_fullname protoreflect.FullName = "google.protobuf.UInt64Value" -) - -// Field names for google.protobuf.UInt64Value. -const ( - UInt64Value_Value_field_name protoreflect.Name = "value" - - UInt64Value_Value_field_fullname protoreflect.FullName = "google.protobuf.UInt64Value.value" -) - -// Field numbers for google.protobuf.UInt64Value. -const ( - UInt64Value_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.Int32Value. -const ( - Int32Value_message_name protoreflect.Name = "Int32Value" - Int32Value_message_fullname protoreflect.FullName = "google.protobuf.Int32Value" -) - -// Field names for google.protobuf.Int32Value. -const ( - Int32Value_Value_field_name protoreflect.Name = "value" - - Int32Value_Value_field_fullname protoreflect.FullName = "google.protobuf.Int32Value.value" -) - -// Field numbers for google.protobuf.Int32Value. -const ( - Int32Value_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.UInt32Value. -const ( - UInt32Value_message_name protoreflect.Name = "UInt32Value" - UInt32Value_message_fullname protoreflect.FullName = "google.protobuf.UInt32Value" -) - -// Field names for google.protobuf.UInt32Value. -const ( - UInt32Value_Value_field_name protoreflect.Name = "value" - - UInt32Value_Value_field_fullname protoreflect.FullName = "google.protobuf.UInt32Value.value" -) - -// Field numbers for google.protobuf.UInt32Value. -const ( - UInt32Value_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.BoolValue. -const ( - BoolValue_message_name protoreflect.Name = "BoolValue" - BoolValue_message_fullname protoreflect.FullName = "google.protobuf.BoolValue" -) - -// Field names for google.protobuf.BoolValue. -const ( - BoolValue_Value_field_name protoreflect.Name = "value" - - BoolValue_Value_field_fullname protoreflect.FullName = "google.protobuf.BoolValue.value" -) - -// Field numbers for google.protobuf.BoolValue. -const ( - BoolValue_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.StringValue. -const ( - StringValue_message_name protoreflect.Name = "StringValue" - StringValue_message_fullname protoreflect.FullName = "google.protobuf.StringValue" -) - -// Field names for google.protobuf.StringValue. -const ( - StringValue_Value_field_name protoreflect.Name = "value" - - StringValue_Value_field_fullname protoreflect.FullName = "google.protobuf.StringValue.value" -) - -// Field numbers for google.protobuf.StringValue. -const ( - StringValue_Value_field_number protoreflect.FieldNumber = 1 -) - -// Names for google.protobuf.BytesValue. -const ( - BytesValue_message_name protoreflect.Name = "BytesValue" - BytesValue_message_fullname protoreflect.FullName = "google.protobuf.BytesValue" -) - -// Field names for google.protobuf.BytesValue. -const ( - BytesValue_Value_field_name protoreflect.Name = "value" - - BytesValue_Value_field_fullname protoreflect.FullName = "google.protobuf.BytesValue.value" -) - -// Field numbers for google.protobuf.BytesValue. -const ( - BytesValue_Value_field_number protoreflect.FieldNumber = 1 -) diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/vendor/google.golang.org/protobuf/internal/impl/api_export.go deleted file mode 100644 index a371f98d..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/api_export.go +++ /dev/null @@ -1,177 +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. - -package impl - -import ( - "fmt" - "reflect" - "strconv" - - "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// Export is a zero-length named type that exists only to export a set of -// functions that we do not want to appear in godoc. -type Export struct{} - -// NewError formats a string according to the format specifier and arguments and -// returns an error that has a "proto" prefix. -func (Export) NewError(f string, x ...interface{}) error { - return errors.New(f, x...) -} - -// enum is any enum type generated by protoc-gen-go -// and must be a named int32 type. -type enum = interface{} - -// EnumOf returns the protoreflect.Enum interface over e. -// It returns nil if e is nil. -func (Export) EnumOf(e enum) protoreflect.Enum { - switch e := e.(type) { - case nil: - return nil - case protoreflect.Enum: - return e - default: - return legacyWrapEnum(reflect.ValueOf(e)) - } -} - -// EnumDescriptorOf returns the protoreflect.EnumDescriptor for e. -// It returns nil if e is nil. -func (Export) EnumDescriptorOf(e enum) protoreflect.EnumDescriptor { - switch e := e.(type) { - case nil: - return nil - case protoreflect.Enum: - return e.Descriptor() - default: - return LegacyLoadEnumDesc(reflect.TypeOf(e)) - } -} - -// EnumTypeOf returns the protoreflect.EnumType for e. -// It returns nil if e is nil. -func (Export) EnumTypeOf(e enum) protoreflect.EnumType { - switch e := e.(type) { - case nil: - return nil - case protoreflect.Enum: - return e.Type() - default: - return legacyLoadEnumType(reflect.TypeOf(e)) - } -} - -// EnumStringOf returns the enum value as a string, either as the name if -// the number is resolvable, or the number formatted as a string. -func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNumber) string { - ev := ed.Values().ByNumber(n) - if ev != nil { - return string(ev.Name()) - } - return strconv.Itoa(int(n)) -} - -// message is any message type generated by protoc-gen-go -// and must be a pointer to a named struct type. -type message = interface{} - -// legacyMessageWrapper wraps a v2 message as a v1 message. -type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } - -func (m legacyMessageWrapper) Reset() { proto.Reset(m.m) } -func (m legacyMessageWrapper) String() string { return Export{}.MessageStringOf(m.m) } -func (m legacyMessageWrapper) ProtoMessage() {} - -// ProtoMessageV1Of converts either a v1 or v2 message to a v1 message. -// It returns nil if m is nil. -func (Export) ProtoMessageV1Of(m message) protoiface.MessageV1 { - switch mv := m.(type) { - case nil: - return nil - case protoiface.MessageV1: - return mv - case unwrapper: - return Export{}.ProtoMessageV1Of(mv.protoUnwrap()) - case protoreflect.ProtoMessage: - return legacyMessageWrapper{mv} - default: - panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m)) - } -} - -func (Export) protoMessageV2Of(m message) protoreflect.ProtoMessage { - switch mv := m.(type) { - case nil: - return nil - case protoreflect.ProtoMessage: - return mv - case legacyMessageWrapper: - return mv.m - case protoiface.MessageV1: - return nil - default: - panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m)) - } -} - -// ProtoMessageV2Of converts either a v1 or v2 message to a v2 message. -// It returns nil if m is nil. -func (Export) ProtoMessageV2Of(m message) protoreflect.ProtoMessage { - if m == nil { - return nil - } - if mv := (Export{}).protoMessageV2Of(m); mv != nil { - return mv - } - return legacyWrapMessage(reflect.ValueOf(m)).Interface() -} - -// MessageOf returns the protoreflect.Message interface over m. -// It returns nil if m is nil. -func (Export) MessageOf(m message) protoreflect.Message { - if m == nil { - return nil - } - if mv := (Export{}).protoMessageV2Of(m); mv != nil { - return mv.ProtoReflect() - } - return legacyWrapMessage(reflect.ValueOf(m)) -} - -// MessageDescriptorOf returns the protoreflect.MessageDescriptor for m. -// It returns nil if m is nil. -func (Export) MessageDescriptorOf(m message) protoreflect.MessageDescriptor { - if m == nil { - return nil - } - if mv := (Export{}).protoMessageV2Of(m); mv != nil { - return mv.ProtoReflect().Descriptor() - } - return LegacyLoadMessageDesc(reflect.TypeOf(m)) -} - -// MessageTypeOf returns the protoreflect.MessageType for m. -// It returns nil if m is nil. -func (Export) MessageTypeOf(m message) protoreflect.MessageType { - if m == nil { - return nil - } - if mv := (Export{}).protoMessageV2Of(m); mv != nil { - return mv.ProtoReflect().Type() - } - return legacyLoadMessageType(reflect.TypeOf(m), "") -} - -// MessageStringOf returns the message value as a string, -// which is the message serialized in the protobuf text format. -func (Export) MessageStringOf(m protoreflect.ProtoMessage) string { - return prototext.MarshalOptions{Multiline: false}.Format(m) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go deleted file mode 100644 index bff041ed..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ /dev/null @@ -1,141 +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 impl - -import ( - "sync" - - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -func (mi *MessageInfo) checkInitialized(in protoiface.CheckInitializedInput) (protoiface.CheckInitializedOutput, error) { - var p pointer - if ms, ok := in.Message.(*messageState); ok { - p = ms.pointer() - } else { - p = in.Message.(*messageReflectWrapper).pointer() - } - return protoiface.CheckInitializedOutput{}, mi.checkInitializedPointer(p) -} - -func (mi *MessageInfo) checkInitializedPointer(p pointer) error { - mi.init() - if !mi.needsInitCheck { - return nil - } - if p.IsNil() { - for _, f := range mi.orderedCoderFields { - if f.isRequired { - return errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName())) - } - } - return nil - } - if mi.extensionOffset.IsValid() { - e := p.Apply(mi.extensionOffset).Extensions() - if err := mi.isInitExtensions(e); err != nil { - return err - } - } - for _, f := range mi.orderedCoderFields { - if !f.isRequired && f.funcs.isInit == nil { - continue - } - fptr := p.Apply(f.offset) - if f.isPointer && fptr.Elem().IsNil() { - if f.isRequired { - return errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName())) - } - continue - } - if f.funcs.isInit == nil { - continue - } - if err := f.funcs.isInit(fptr, f); err != nil { - return err - } - } - return nil -} - -func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error { - if ext == nil { - return nil - } - for _, x := range *ext { - ei := getExtensionFieldInfo(x.Type()) - if ei.funcs.isInit == nil { - continue - } - v := x.Value() - if !v.IsValid() { - continue - } - if err := ei.funcs.isInit(v); err != nil { - return err - } - } - return nil -} - -var ( - needsInitCheckMu sync.Mutex - needsInitCheckMap sync.Map -) - -// needsInitCheck reports whether a message needs to be checked for partial initialization. -// -// It returns true if the message transitively includes any required or extension fields. -func needsInitCheck(md protoreflect.MessageDescriptor) bool { - if v, ok := needsInitCheckMap.Load(md); ok { - if has, ok := v.(bool); ok { - return has - } - } - needsInitCheckMu.Lock() - defer needsInitCheckMu.Unlock() - return needsInitCheckLocked(md) -} - -func needsInitCheckLocked(md protoreflect.MessageDescriptor) (has bool) { - if v, ok := needsInitCheckMap.Load(md); ok { - // If has is true, we've previously determined that this message - // needs init checks. - // - // If has is false, we've previously determined that it can never - // be uninitialized. - // - // If has is not a bool, we've just encountered a cycle in the - // message graph. In this case, it is safe to return false: If - // the message does have required fields, we'll detect them later - // in the graph traversal. - has, ok := v.(bool) - return ok && has - } - needsInitCheckMap.Store(md, struct{}{}) // avoid cycles while descending into this message - defer func() { - needsInitCheckMap.Store(md, has) - }() - if md.RequiredNumbers().Len() > 0 { - return true - } - if md.ExtensionRanges().Len() > 0 { - return true - } - for i := 0; i < md.Fields().Len(); i++ { - fd := md.Fields().Get(i) - // Map keys are never messages, so just consider the map value. - if fd.IsMap() { - fd = fd.MapValue() - } - fmd := fd.Message() - if fmd != nil && needsInitCheckLocked(fmd) { - return true - } - } - return false -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go deleted file mode 100644 index e74cefdc..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ /dev/null @@ -1,223 +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 impl - -import ( - "sync" - "sync/atomic" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type extensionFieldInfo struct { - wiretag uint64 - tagsize int - unmarshalNeedsValue bool - funcs valueCoderFuncs - validation validationInfo -} - -var legacyExtensionFieldInfoCache sync.Map // map[protoreflect.ExtensionType]*extensionFieldInfo - -func getExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo { - if xi, ok := xt.(*ExtensionInfo); ok { - xi.lazyInit() - return xi.info - } - return legacyLoadExtensionFieldInfo(xt) -} - -// legacyLoadExtensionFieldInfo dynamically loads a *ExtensionInfo for xt. -func legacyLoadExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo { - if xi, ok := legacyExtensionFieldInfoCache.Load(xt); ok { - return xi.(*extensionFieldInfo) - } - e := makeExtensionFieldInfo(xt.TypeDescriptor()) - if e, ok := legacyMessageTypeCache.LoadOrStore(xt, e); ok { - return e.(*extensionFieldInfo) - } - return e -} - -func makeExtensionFieldInfo(xd protoreflect.ExtensionDescriptor) *extensionFieldInfo { - var wiretag uint64 - if !xd.IsPacked() { - wiretag = protowire.EncodeTag(xd.Number(), wireTypes[xd.Kind()]) - } else { - wiretag = protowire.EncodeTag(xd.Number(), protowire.BytesType) - } - e := &extensionFieldInfo{ - wiretag: wiretag, - tagsize: protowire.SizeVarint(wiretag), - funcs: encoderFuncsForValue(xd), - } - // Does the unmarshal function need a value passed to it? - // This is true for composite types, where we pass in a message, list, or map to fill in, - // and for enums, where we pass in a prototype value to specify the concrete enum type. - switch xd.Kind() { - case protoreflect.MessageKind, protoreflect.GroupKind, protoreflect.EnumKind: - e.unmarshalNeedsValue = true - default: - if xd.Cardinality() == protoreflect.Repeated { - e.unmarshalNeedsValue = true - } - } - return e -} - -type lazyExtensionValue struct { - atomicOnce uint32 // atomically set if value is valid - mu sync.Mutex - xi *extensionFieldInfo - value protoreflect.Value - b []byte - fn func() protoreflect.Value -} - -type ExtensionField struct { - typ protoreflect.ExtensionType - - // value is either the value of GetValue, - // or a *lazyExtensionValue that then returns the value of GetValue. - value protoreflect.Value - lazy *lazyExtensionValue -} - -func (f *ExtensionField) appendLazyBytes(xt protoreflect.ExtensionType, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, b []byte) { - if f.lazy == nil { - f.lazy = &lazyExtensionValue{xi: xi} - } - f.typ = xt - f.lazy.xi = xi - f.lazy.b = protowire.AppendTag(f.lazy.b, num, wtyp) - f.lazy.b = append(f.lazy.b, b...) -} - -func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool { - if f.typ == nil { - return true - } - if f.typ == xt && f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 { - return true - } - return false -} - -func (f *ExtensionField) lazyInit() { - f.lazy.mu.Lock() - defer f.lazy.mu.Unlock() - if atomic.LoadUint32(&f.lazy.atomicOnce) == 1 { - return - } - if f.lazy.xi != nil { - b := f.lazy.b - val := f.typ.New() - for len(b) > 0 { - var tag uint64 - if b[0] < 0x80 { - tag = uint64(b[0]) - b = b[1:] - } else if len(b) >= 2 && b[1] < 128 { - tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 - b = b[2:] - } else { - var n int - tag, n = protowire.ConsumeVarint(b) - if n < 0 { - panic(errors.New("bad tag in lazy extension decoding")) - } - b = b[n:] - } - num := protowire.Number(tag >> 3) - wtyp := protowire.Type(tag & 7) - var out unmarshalOutput - var err error - val, out, err = f.lazy.xi.funcs.unmarshal(b, val, num, wtyp, lazyUnmarshalOptions) - if err != nil { - panic(errors.New("decode failure in lazy extension decoding: %v", err)) - } - b = b[out.n:] - } - f.lazy.value = val - } else { - f.lazy.value = f.lazy.fn() - } - f.lazy.xi = nil - f.lazy.fn = nil - f.lazy.b = nil - atomic.StoreUint32(&f.lazy.atomicOnce, 1) -} - -// Set sets the type and value of the extension field. -// This must not be called concurrently. -func (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value) { - f.typ = t - f.value = v - f.lazy = nil -} - -// SetLazy sets the type and a value that is to be lazily evaluated upon first use. -// This must not be called concurrently. -func (f *ExtensionField) SetLazy(t protoreflect.ExtensionType, fn func() protoreflect.Value) { - f.typ = t - f.lazy = &lazyExtensionValue{fn: fn} -} - -// Value returns the value of the extension field. -// This may be called concurrently. -func (f *ExtensionField) Value() protoreflect.Value { - if f.lazy != nil { - if atomic.LoadUint32(&f.lazy.atomicOnce) == 0 { - f.lazyInit() - } - return f.lazy.value - } - return f.value -} - -// Type returns the type of the extension field. -// This may be called concurrently. -func (f ExtensionField) Type() protoreflect.ExtensionType { - return f.typ -} - -// IsSet returns whether the extension field is set. -// This may be called concurrently. -func (f ExtensionField) IsSet() bool { - return f.typ != nil -} - -// IsLazy reports whether a field is lazily encoded. -// It is exported for testing. -func IsLazy(m protoreflect.Message, fd protoreflect.FieldDescriptor) bool { - var mi *MessageInfo - var p pointer - switch m := m.(type) { - case *messageState: - mi = m.messageInfo() - p = m.pointer() - case *messageReflectWrapper: - mi = m.messageInfo() - p = m.pointer() - default: - return false - } - xd, ok := fd.(protoreflect.ExtensionTypeDescriptor) - if !ok { - return false - } - xt := xd.Type() - ext := mi.extensionMap(p) - if ext == nil { - return false - } - f, ok := (*ext)[int32(fd.Number())] - if !ok { - return false - } - return f.typ == xt && f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go deleted file mode 100644 index 3fadd241..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ /dev/null @@ -1,830 +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 impl - -import ( - "fmt" - "reflect" - "sync" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoiface" -) - -type errInvalidUTF8 struct{} - -func (errInvalidUTF8) Error() string { return "string field contains invalid UTF-8" } -func (errInvalidUTF8) InvalidUTF8() bool { return true } -func (errInvalidUTF8) Unwrap() error { return errors.Error } - -// initOneofFieldCoders initializes the fast-path functions for the fields in a oneof. -// -// For size, marshal, and isInit operations, functions are set only on the first field -// in the oneof. The functions are called when the oneof is non-nil, and will dispatch -// to the appropriate field-specific function as necessary. -// -// The unmarshal function is set on each field individually as usual. -func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si structInfo) { - fs := si.oneofsByName[od.Name()] - ft := fs.Type - oneofFields := make(map[reflect.Type]*coderFieldInfo) - needIsInit := false - fields := od.Fields() - for i, lim := 0, fields.Len(); i < lim; i++ { - fd := od.Fields().Get(i) - num := fd.Number() - // Make a copy of the original coderFieldInfo for use in unmarshaling. - // - // oneofFields[oneofType].funcs.marshal is the field-specific marshal function. - // - // mi.coderFields[num].marshal is set on only the first field in the oneof, - // and dispatches to the field-specific marshaler in oneofFields. - cf := *mi.coderFields[num] - ot := si.oneofWrappersByNumber[num] - cf.ft = ot.Field(0).Type - cf.mi, cf.funcs = fieldCoder(fd, cf.ft) - oneofFields[ot] = &cf - if cf.funcs.isInit != nil { - needIsInit = true - } - mi.coderFields[num].funcs.unmarshal = func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - var vw reflect.Value // pointer to wrapper type - vi := p.AsValueOf(ft).Elem() // oneof field value of interface kind - if !vi.IsNil() && !vi.Elem().IsNil() && vi.Elem().Elem().Type() == ot { - vw = vi.Elem() - } else { - vw = reflect.New(ot) - } - out, err := cf.funcs.unmarshal(b, pointerOfValue(vw).Apply(zeroOffset), wtyp, &cf, opts) - if err != nil { - return out, err - } - vi.Set(vw) - return out, nil - } - } - getInfo := func(p pointer) (pointer, *coderFieldInfo) { - v := p.AsValueOf(ft).Elem() - if v.IsNil() { - return pointer{}, nil - } - v = v.Elem() // interface -> *struct - if v.IsNil() { - return pointer{}, nil - } - return pointerOfValue(v).Apply(zeroOffset), oneofFields[v.Elem().Type()] - } - first := mi.coderFields[od.Fields().Get(0).Number()] - first.funcs.size = func(p pointer, _ *coderFieldInfo, opts marshalOptions) int { - p, info := getInfo(p) - if info == nil || info.funcs.size == nil { - return 0 - } - return info.funcs.size(p, info, opts) - } - first.funcs.marshal = func(b []byte, p pointer, _ *coderFieldInfo, opts marshalOptions) ([]byte, error) { - p, info := getInfo(p) - if info == nil || info.funcs.marshal == nil { - return b, nil - } - return info.funcs.marshal(b, p, info, opts) - } - first.funcs.merge = func(dst, src pointer, _ *coderFieldInfo, opts mergeOptions) { - srcp, srcinfo := getInfo(src) - if srcinfo == nil || srcinfo.funcs.merge == nil { - return - } - dstp, dstinfo := getInfo(dst) - if dstinfo != srcinfo { - dst.AsValueOf(ft).Elem().Set(reflect.New(src.AsValueOf(ft).Elem().Elem().Elem().Type())) - dstp = pointerOfValue(dst.AsValueOf(ft).Elem().Elem()).Apply(zeroOffset) - } - srcinfo.funcs.merge(dstp, srcp, srcinfo, opts) - } - if needIsInit { - first.funcs.isInit = func(p pointer, _ *coderFieldInfo) error { - p, info := getInfo(p) - if info == nil || info.funcs.isInit == nil { - return nil - } - return info.funcs.isInit(p, info) - } - } -} - -func makeWeakMessageFieldCoder(fd protoreflect.FieldDescriptor) pointerCoderFuncs { - var once sync.Once - var messageType protoreflect.MessageType - lazyInit := func() { - once.Do(func() { - messageName := fd.Message().FullName() - messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) - }) - } - - return pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - m, ok := p.WeakFields().get(f.num) - if !ok { - return 0 - } - lazyInit() - if messageType == nil { - panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) - } - return sizeMessage(m, f.tagsize, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - m, ok := p.WeakFields().get(f.num) - if !ok { - return b, nil - } - lazyInit() - if messageType == nil { - panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) - } - return appendMessage(b, m, f.wiretag, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - fs := p.WeakFields() - m, ok := fs.get(f.num) - if !ok { - lazyInit() - if messageType == nil { - return unmarshalOutput{}, errUnknown - } - m = messageType.New().Interface() - fs.set(f.num, m) - } - return consumeMessage(b, m, wtyp, opts) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - m, ok := p.WeakFields().get(f.num) - if !ok { - return nil - } - return proto.CheckInitialized(m) - }, - merge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - sm, ok := src.WeakFields().get(f.num) - if !ok { - return - } - dm, ok := dst.WeakFields().get(f.num) - if !ok { - lazyInit() - if messageType == nil { - panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) - } - dm = messageType.New().Interface() - dst.WeakFields().set(f.num, dm) - } - opts.Merge(dm, sm) - }, - } -} - -func makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { - if mi := getMessageInfo(ft); mi != nil { - funcs := pointerCoderFuncs{ - size: sizeMessageInfo, - marshal: appendMessageInfo, - unmarshal: consumeMessageInfo, - merge: mergeMessage, - } - if needsInitCheck(mi.Desc) { - funcs.isInit = isInitMessageInfo - } - return funcs - } else { - return pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - m := asMessage(p.AsValueOf(ft).Elem()) - return sizeMessage(m, f.tagsize, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - m := asMessage(p.AsValueOf(ft).Elem()) - return appendMessage(b, m, f.wiretag, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - mp := p.AsValueOf(ft).Elem() - if mp.IsNil() { - mp.Set(reflect.New(ft.Elem())) - } - return consumeMessage(b, asMessage(mp), wtyp, opts) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - m := asMessage(p.AsValueOf(ft).Elem()) - return proto.CheckInitialized(m) - }, - merge: mergeMessage, - } - } -} - -func sizeMessageInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int { - return protowire.SizeBytes(f.mi.sizePointer(p.Elem(), opts)) + f.tagsize -} - -func appendMessageInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(f.mi.sizePointer(p.Elem(), opts))) - return f.mi.marshalAppendPointer(b, p.Elem(), opts) -} - -func consumeMessageInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if p.Elem().IsNil() { - p.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) - } - o, err := f.mi.unmarshalPointer(v, p.Elem(), 0, opts) - if err != nil { - return out, err - } - out.n = n - out.initialized = o.initialized - return out, nil -} - -func isInitMessageInfo(p pointer, f *coderFieldInfo) error { - return f.mi.checkInitializedPointer(p.Elem()) -} - -func sizeMessage(m proto.Message, tagsize int, _ marshalOptions) int { - return protowire.SizeBytes(proto.Size(m)) + tagsize -} - -func appendMessage(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(proto.Size(m))) - return opts.Options().MarshalAppend(b, m) -} - -func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ - Buf: v, - Message: m.ProtoReflect(), - }) - if err != nil { - return out, err - } - out.n = n - out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 - return out, nil -} - -func sizeMessageValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - m := v.Message().Interface() - return sizeMessage(m, tagsize, opts) -} - -func appendMessageValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - m := v.Message().Interface() - return appendMessage(b, m, wiretag, opts) -} - -func consumeMessageValue(b []byte, v protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) { - m := v.Message().Interface() - out, err := consumeMessage(b, m, wtyp, opts) - return v, out, err -} - -func isInitMessageValue(v protoreflect.Value) error { - m := v.Message().Interface() - return proto.CheckInitialized(m) -} - -var coderMessageValue = valueCoderFuncs{ - size: sizeMessageValue, - marshal: appendMessageValue, - unmarshal: consumeMessageValue, - isInit: isInitMessageValue, - merge: mergeMessageValue, -} - -func sizeGroupValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - m := v.Message().Interface() - return sizeGroup(m, tagsize, opts) -} - -func appendGroupValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - m := v.Message().Interface() - return appendGroup(b, m, wiretag, opts) -} - -func consumeGroupValue(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) { - m := v.Message().Interface() - out, err := consumeGroup(b, m, num, wtyp, opts) - return v, out, err -} - -var coderGroupValue = valueCoderFuncs{ - size: sizeGroupValue, - marshal: appendGroupValue, - unmarshal: consumeGroupValue, - isInit: isInitMessageValue, - merge: mergeMessageValue, -} - -func makeGroupFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { - num := fd.Number() - if mi := getMessageInfo(ft); mi != nil { - funcs := pointerCoderFuncs{ - size: sizeGroupType, - marshal: appendGroupType, - unmarshal: consumeGroupType, - merge: mergeMessage, - } - if needsInitCheck(mi.Desc) { - funcs.isInit = isInitMessageInfo - } - return funcs - } else { - return pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - m := asMessage(p.AsValueOf(ft).Elem()) - return sizeGroup(m, f.tagsize, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - m := asMessage(p.AsValueOf(ft).Elem()) - return appendGroup(b, m, f.wiretag, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - mp := p.AsValueOf(ft).Elem() - if mp.IsNil() { - mp.Set(reflect.New(ft.Elem())) - } - return consumeGroup(b, asMessage(mp), num, wtyp, opts) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - m := asMessage(p.AsValueOf(ft).Elem()) - return proto.CheckInitialized(m) - }, - merge: mergeMessage, - } - } -} - -func sizeGroupType(p pointer, f *coderFieldInfo, opts marshalOptions) int { - return 2*f.tagsize + f.mi.sizePointer(p.Elem(), opts) -} - -func appendGroupType(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, f.wiretag) // start group - b, err := f.mi.marshalAppendPointer(b, p.Elem(), opts) - b = protowire.AppendVarint(b, f.wiretag+1) // end group - return b, err -} - -func consumeGroupType(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.StartGroupType { - return out, errUnknown - } - if p.Elem().IsNil() { - p.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) - } - return f.mi.unmarshalPointer(b, p.Elem(), f.num, opts) -} - -func sizeGroup(m proto.Message, tagsize int, _ marshalOptions) int { - return 2*tagsize + proto.Size(m) -} - -func appendGroup(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) // start group - b, err := opts.Options().MarshalAppend(b, m) - b = protowire.AppendVarint(b, wiretag+1) // end group - return b, err -} - -func consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.StartGroupType { - return out, errUnknown - } - b, n := protowire.ConsumeGroup(num, b) - if n < 0 { - return out, errDecode - } - o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ - Buf: b, - Message: m.ProtoReflect(), - }) - if err != nil { - return out, err - } - out.n = n - out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 - return out, nil -} - -func makeMessageSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { - if mi := getMessageInfo(ft); mi != nil { - funcs := pointerCoderFuncs{ - size: sizeMessageSliceInfo, - marshal: appendMessageSliceInfo, - unmarshal: consumeMessageSliceInfo, - merge: mergeMessageSlice, - } - if needsInitCheck(mi.Desc) { - funcs.isInit = isInitMessageSliceInfo - } - return funcs - } - return pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - return sizeMessageSlice(p, ft, f.tagsize, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - return appendMessageSlice(b, p, f.wiretag, ft, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - return consumeMessageSlice(b, p, ft, wtyp, opts) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - return isInitMessageSlice(p, ft) - }, - merge: mergeMessageSlice, - } -} - -func sizeMessageSliceInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int { - s := p.PointerSlice() - n := 0 - for _, v := range s { - n += protowire.SizeBytes(f.mi.sizePointer(v, opts)) + f.tagsize - } - return n -} - -func appendMessageSliceInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.PointerSlice() - var err error - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - siz := f.mi.sizePointer(v, opts) - b = protowire.AppendVarint(b, uint64(siz)) - b, err = f.mi.marshalAppendPointer(b, v, opts) - if err != nil { - return b, err - } - } - return b, nil -} - -func consumeMessageSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - m := reflect.New(f.mi.GoReflectType.Elem()).Interface() - mp := pointerOfIface(m) - o, err := f.mi.unmarshalPointer(v, mp, 0, opts) - if err != nil { - return out, err - } - p.AppendPointerSlice(mp) - out.n = n - out.initialized = o.initialized - return out, nil -} - -func isInitMessageSliceInfo(p pointer, f *coderFieldInfo) error { - s := p.PointerSlice() - for _, v := range s { - if err := f.mi.checkInitializedPointer(v); err != nil { - return err - } - } - return nil -} - -func sizeMessageSlice(p pointer, goType reflect.Type, tagsize int, _ marshalOptions) int { - s := p.PointerSlice() - n := 0 - for _, v := range s { - m := asMessage(v.AsValueOf(goType.Elem())) - n += protowire.SizeBytes(proto.Size(m)) + tagsize - } - return n -} - -func appendMessageSlice(b []byte, p pointer, wiretag uint64, goType reflect.Type, opts marshalOptions) ([]byte, error) { - s := p.PointerSlice() - var err error - for _, v := range s { - m := asMessage(v.AsValueOf(goType.Elem())) - b = protowire.AppendVarint(b, wiretag) - siz := proto.Size(m) - b = protowire.AppendVarint(b, uint64(siz)) - b, err = opts.Options().MarshalAppend(b, m) - if err != nil { - return b, err - } - } - return b, nil -} - -func consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - mp := reflect.New(goType.Elem()) - o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ - Buf: v, - Message: asMessage(mp).ProtoReflect(), - }) - if err != nil { - return out, err - } - p.AppendPointerSlice(pointerOfValue(mp)) - out.n = n - out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 - return out, nil -} - -func isInitMessageSlice(p pointer, goType reflect.Type) error { - s := p.PointerSlice() - for _, v := range s { - m := asMessage(v.AsValueOf(goType.Elem())) - if err := proto.CheckInitialized(m); err != nil { - return err - } - } - return nil -} - -// Slices of messages - -func sizeMessageSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { - list := listv.List() - n := 0 - for i, llen := 0, list.Len(); i < llen; i++ { - m := list.Get(i).Message().Interface() - n += protowire.SizeBytes(proto.Size(m)) + tagsize - } - return n -} - -func appendMessageSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - mopts := opts.Options() - for i, llen := 0, list.Len(); i < llen; i++ { - m := list.Get(i).Message().Interface() - b = protowire.AppendVarint(b, wiretag) - siz := proto.Size(m) - b = protowire.AppendVarint(b, uint64(siz)) - var err error - b, err = mopts.MarshalAppend(b, m) - if err != nil { - return b, err - } - } - return b, nil -} - -func consumeMessageSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp != protowire.BytesType { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - m := list.NewElement() - o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ - Buf: v, - Message: m.Message(), - }) - if err != nil { - return protoreflect.Value{}, out, err - } - list.Append(m) - out.n = n - out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 - return listv, out, nil -} - -func isInitMessageSliceValue(listv protoreflect.Value) error { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - m := list.Get(i).Message().Interface() - if err := proto.CheckInitialized(m); err != nil { - return err - } - } - return nil -} - -var coderMessageSliceValue = valueCoderFuncs{ - size: sizeMessageSliceValue, - marshal: appendMessageSliceValue, - unmarshal: consumeMessageSliceValue, - isInit: isInitMessageSliceValue, - merge: mergeMessageListValue, -} - -func sizeGroupSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { - list := listv.List() - n := 0 - for i, llen := 0, list.Len(); i < llen; i++ { - m := list.Get(i).Message().Interface() - n += 2*tagsize + proto.Size(m) - } - return n -} - -func appendGroupSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - mopts := opts.Options() - for i, llen := 0, list.Len(); i < llen; i++ { - m := list.Get(i).Message().Interface() - b = protowire.AppendVarint(b, wiretag) // start group - var err error - b, err = mopts.MarshalAppend(b, m) - if err != nil { - return b, err - } - b = protowire.AppendVarint(b, wiretag+1) // end group - } - return b, nil -} - -func consumeGroupSliceValue(b []byte, listv protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp != protowire.StartGroupType { - return protoreflect.Value{}, out, errUnknown - } - b, n := protowire.ConsumeGroup(num, b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - m := list.NewElement() - o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ - Buf: b, - Message: m.Message(), - }) - if err != nil { - return protoreflect.Value{}, out, err - } - list.Append(m) - out.n = n - out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 - return listv, out, nil -} - -var coderGroupSliceValue = valueCoderFuncs{ - size: sizeGroupSliceValue, - marshal: appendGroupSliceValue, - unmarshal: consumeGroupSliceValue, - isInit: isInitMessageSliceValue, - merge: mergeMessageListValue, -} - -func makeGroupSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { - num := fd.Number() - if mi := getMessageInfo(ft); mi != nil { - funcs := pointerCoderFuncs{ - size: sizeGroupSliceInfo, - marshal: appendGroupSliceInfo, - unmarshal: consumeGroupSliceInfo, - merge: mergeMessageSlice, - } - if needsInitCheck(mi.Desc) { - funcs.isInit = isInitMessageSliceInfo - } - return funcs - } - return pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - return sizeGroupSlice(p, ft, f.tagsize, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - return appendGroupSlice(b, p, f.wiretag, ft, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - return consumeGroupSlice(b, p, num, wtyp, ft, opts) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - return isInitMessageSlice(p, ft) - }, - merge: mergeMessageSlice, - } -} - -func sizeGroupSlice(p pointer, messageType reflect.Type, tagsize int, _ marshalOptions) int { - s := p.PointerSlice() - n := 0 - for _, v := range s { - m := asMessage(v.AsValueOf(messageType.Elem())) - n += 2*tagsize + proto.Size(m) - } - return n -} - -func appendGroupSlice(b []byte, p pointer, wiretag uint64, messageType reflect.Type, opts marshalOptions) ([]byte, error) { - s := p.PointerSlice() - var err error - for _, v := range s { - m := asMessage(v.AsValueOf(messageType.Elem())) - b = protowire.AppendVarint(b, wiretag) // start group - b, err = opts.Options().MarshalAppend(b, m) - if err != nil { - return b, err - } - b = protowire.AppendVarint(b, wiretag+1) // end group - } - return b, nil -} - -func consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire.Type, goType reflect.Type, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.StartGroupType { - return out, errUnknown - } - b, n := protowire.ConsumeGroup(num, b) - if n < 0 { - return out, errDecode - } - mp := reflect.New(goType.Elem()) - o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ - Buf: b, - Message: asMessage(mp).ProtoReflect(), - }) - if err != nil { - return out, err - } - p.AppendPointerSlice(pointerOfValue(mp)) - out.n = n - out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 - return out, nil -} - -func sizeGroupSliceInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int { - s := p.PointerSlice() - n := 0 - for _, v := range s { - n += 2*f.tagsize + f.mi.sizePointer(v, opts) - } - return n -} - -func appendGroupSliceInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.PointerSlice() - var err error - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) // start group - b, err = f.mi.marshalAppendPointer(b, v, opts) - if err != nil { - return b, err - } - b = protowire.AppendVarint(b, f.wiretag+1) // end group - } - return b, nil -} - -func consumeGroupSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - if wtyp != protowire.StartGroupType { - return unmarshalOutput{}, errUnknown - } - m := reflect.New(f.mi.GoReflectType.Elem()).Interface() - mp := pointerOfIface(m) - out, err := f.mi.unmarshalPointer(b, mp, f.num, opts) - if err != nil { - return out, err - } - p.AppendPointerSlice(mp) - return out, nil -} - -func asMessage(v reflect.Value) protoreflect.ProtoMessage { - if m, ok := v.Interface().(protoreflect.ProtoMessage); ok { - return m - } - return legacyWrapMessage(v).Interface() -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go b/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go deleted file mode 100644 index f55dc01e..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go +++ /dev/null @@ -1,5724 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package impl - -import ( - "math" - "unicode/utf8" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// sizeBool returns the size of wire encoding a bool pointer as a Bool. -func sizeBool(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Bool() - return f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) -} - -// appendBool wire encodes a bool pointer as a Bool. -func appendBool(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Bool() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeBool(v)) - return b, nil -} - -// consumeBool wire decodes a bool pointer as a Bool. -func consumeBool(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Bool() = protowire.DecodeBool(v) - out.n = n - return out, nil -} - -var coderBool = pointerCoderFuncs{ - size: sizeBool, - marshal: appendBool, - unmarshal: consumeBool, - merge: mergeBool, -} - -// sizeBoolNoZero returns the size of wire encoding a bool pointer as a Bool. -// The zero value is not encoded. -func sizeBoolNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Bool() - if v == false { - return 0 - } - return f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) -} - -// appendBoolNoZero wire encodes a bool pointer as a Bool. -// The zero value is not encoded. -func appendBoolNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Bool() - if v == false { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeBool(v)) - return b, nil -} - -var coderBoolNoZero = pointerCoderFuncs{ - size: sizeBoolNoZero, - marshal: appendBoolNoZero, - unmarshal: consumeBool, - merge: mergeBoolNoZero, -} - -// sizeBoolPtr returns the size of wire encoding a *bool pointer as a Bool. -// It panics if the pointer is nil. -func sizeBoolPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.BoolPtr() - return f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) -} - -// appendBoolPtr wire encodes a *bool pointer as a Bool. -// It panics if the pointer is nil. -func appendBoolPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.BoolPtr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeBool(v)) - return b, nil -} - -// consumeBoolPtr wire decodes a *bool pointer as a Bool. -func consumeBoolPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.BoolPtr() - if *vp == nil { - *vp = new(bool) - } - **vp = protowire.DecodeBool(v) - out.n = n - return out, nil -} - -var coderBoolPtr = pointerCoderFuncs{ - size: sizeBoolPtr, - marshal: appendBoolPtr, - unmarshal: consumeBoolPtr, - merge: mergeBoolPtr, -} - -// sizeBoolSlice returns the size of wire encoding a []bool pointer as a repeated Bool. -func sizeBoolSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.BoolSlice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) - } - return size -} - -// appendBoolSlice encodes a []bool pointer as a repeated Bool. -func appendBoolSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.BoolSlice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeBool(v)) - } - return b, nil -} - -// consumeBoolSlice wire decodes a []bool pointer as a repeated Bool. -func consumeBoolSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.BoolSlice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growBoolSlice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, protowire.DecodeBool(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, protowire.DecodeBool(v)) - out.n = n - return out, nil -} - -var coderBoolSlice = pointerCoderFuncs{ - size: sizeBoolSlice, - marshal: appendBoolSlice, - unmarshal: consumeBoolSlice, - merge: mergeBoolSlice, -} - -// sizeBoolPackedSlice returns the size of wire encoding a []bool pointer as a packed repeated Bool. -func sizeBoolPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.BoolSlice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(protowire.EncodeBool(v)) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendBoolPackedSlice encodes a []bool pointer as a packed repeated Bool. -func appendBoolPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.BoolSlice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(protowire.EncodeBool(v)) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, protowire.EncodeBool(v)) - } - return b, nil -} - -var coderBoolPackedSlice = pointerCoderFuncs{ - size: sizeBoolPackedSlice, - marshal: appendBoolPackedSlice, - unmarshal: consumeBoolSlice, - merge: mergeBoolSlice, -} - -// sizeBoolValue returns the size of wire encoding a bool value as a Bool. -func sizeBoolValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(protowire.EncodeBool(v.Bool())) -} - -// appendBoolValue encodes a bool value as a Bool. -func appendBoolValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool())) - return b, nil -} - -// consumeBoolValue decodes a bool value as a Bool. -func consumeBoolValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfBool(protowire.DecodeBool(v)), out, nil -} - -var coderBoolValue = valueCoderFuncs{ - size: sizeBoolValue, - marshal: appendBoolValue, - unmarshal: consumeBoolValue, - merge: mergeScalarValue, -} - -// sizeBoolSliceValue returns the size of wire encoding a []bool value as a repeated Bool. -func sizeBoolSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(protowire.EncodeBool(v.Bool())) - } - return size -} - -// appendBoolSliceValue encodes a []bool value as a repeated Bool. -func appendBoolSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool())) - } - return b, nil -} - -// consumeBoolSliceValue wire decodes a []bool value as a repeated Bool. -func consumeBoolSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v))) - out.n = n - return listv, out, nil -} - -var coderBoolSliceValue = valueCoderFuncs{ - size: sizeBoolSliceValue, - marshal: appendBoolSliceValue, - unmarshal: consumeBoolSliceValue, - merge: mergeListValue, -} - -// sizeBoolPackedSliceValue returns the size of wire encoding a []bool value as a packed repeated Bool. -func sizeBoolPackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(protowire.EncodeBool(v.Bool())) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendBoolPackedSliceValue encodes a []bool value as a packed repeated Bool. -func appendBoolPackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(protowire.EncodeBool(v.Bool())) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool())) - } - return b, nil -} - -var coderBoolPackedSliceValue = valueCoderFuncs{ - size: sizeBoolPackedSliceValue, - marshal: appendBoolPackedSliceValue, - unmarshal: consumeBoolSliceValue, - merge: mergeListValue, -} - -// sizeEnumValue returns the size of wire encoding a value as a Enum. -func sizeEnumValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(uint64(v.Enum())) -} - -// appendEnumValue encodes a value as a Enum. -func appendEnumValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(v.Enum())) - return b, nil -} - -// consumeEnumValue decodes a value as a Enum. -func consumeEnumValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)), out, nil -} - -var coderEnumValue = valueCoderFuncs{ - size: sizeEnumValue, - marshal: appendEnumValue, - unmarshal: consumeEnumValue, - merge: mergeScalarValue, -} - -// sizeEnumSliceValue returns the size of wire encoding a [] value as a repeated Enum. -func sizeEnumSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(uint64(v.Enum())) - } - return size -} - -// appendEnumSliceValue encodes a [] value as a repeated Enum. -func appendEnumSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(v.Enum())) - } - return b, nil -} - -// consumeEnumSliceValue wire decodes a [] value as a repeated Enum. -func consumeEnumSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v))) - out.n = n - return listv, out, nil -} - -var coderEnumSliceValue = valueCoderFuncs{ - size: sizeEnumSliceValue, - marshal: appendEnumSliceValue, - unmarshal: consumeEnumSliceValue, - merge: mergeListValue, -} - -// sizeEnumPackedSliceValue returns the size of wire encoding a [] value as a packed repeated Enum. -func sizeEnumPackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(v.Enum())) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendEnumPackedSliceValue encodes a [] value as a packed repeated Enum. -func appendEnumPackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(v.Enum())) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, uint64(v.Enum())) - } - return b, nil -} - -var coderEnumPackedSliceValue = valueCoderFuncs{ - size: sizeEnumPackedSliceValue, - marshal: appendEnumPackedSliceValue, - unmarshal: consumeEnumSliceValue, - merge: mergeListValue, -} - -// sizeInt32 returns the size of wire encoding a int32 pointer as a Int32. -func sizeInt32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int32() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendInt32 wire encodes a int32 pointer as a Int32. -func appendInt32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int32() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -// consumeInt32 wire decodes a int32 pointer as a Int32. -func consumeInt32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Int32() = int32(v) - out.n = n - return out, nil -} - -var coderInt32 = pointerCoderFuncs{ - size: sizeInt32, - marshal: appendInt32, - unmarshal: consumeInt32, - merge: mergeInt32, -} - -// sizeInt32NoZero returns the size of wire encoding a int32 pointer as a Int32. -// The zero value is not encoded. -func sizeInt32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int32() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendInt32NoZero wire encodes a int32 pointer as a Int32. -// The zero value is not encoded. -func appendInt32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int32() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -var coderInt32NoZero = pointerCoderFuncs{ - size: sizeInt32NoZero, - marshal: appendInt32NoZero, - unmarshal: consumeInt32, - merge: mergeInt32NoZero, -} - -// sizeInt32Ptr returns the size of wire encoding a *int32 pointer as a Int32. -// It panics if the pointer is nil. -func sizeInt32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.Int32Ptr() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendInt32Ptr wire encodes a *int32 pointer as a Int32. -// It panics if the pointer is nil. -func appendInt32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Int32Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -// consumeInt32Ptr wire decodes a *int32 pointer as a Int32. -func consumeInt32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.Int32Ptr() - if *vp == nil { - *vp = new(int32) - } - **vp = int32(v) - out.n = n - return out, nil -} - -var coderInt32Ptr = pointerCoderFuncs{ - size: sizeInt32Ptr, - marshal: appendInt32Ptr, - unmarshal: consumeInt32Ptr, - merge: mergeInt32Ptr, -} - -// sizeInt32Slice returns the size of wire encoding a []int32 pointer as a repeated Int32. -func sizeInt32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int32Slice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(uint64(v)) - } - return size -} - -// appendInt32Slice encodes a []int32 pointer as a repeated Int32. -func appendInt32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int32Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - } - return b, nil -} - -// consumeInt32Slice wire decodes a []int32 pointer as a repeated Int32. -func consumeInt32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Int32Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growInt32Slice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, int32(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, int32(v)) - out.n = n - return out, nil -} - -var coderInt32Slice = pointerCoderFuncs{ - size: sizeInt32Slice, - marshal: appendInt32Slice, - unmarshal: consumeInt32Slice, - merge: mergeInt32Slice, -} - -// sizeInt32PackedSlice returns the size of wire encoding a []int32 pointer as a packed repeated Int32. -func sizeInt32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int32Slice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(uint64(v)) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendInt32PackedSlice encodes a []int32 pointer as a packed repeated Int32. -func appendInt32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int32Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(uint64(v)) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, uint64(v)) - } - return b, nil -} - -var coderInt32PackedSlice = pointerCoderFuncs{ - size: sizeInt32PackedSlice, - marshal: appendInt32PackedSlice, - unmarshal: consumeInt32Slice, - merge: mergeInt32Slice, -} - -// sizeInt32Value returns the size of wire encoding a int32 value as a Int32. -func sizeInt32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(uint64(int32(v.Int()))) -} - -// appendInt32Value encodes a int32 value as a Int32. -func appendInt32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(int32(v.Int()))) - return b, nil -} - -// consumeInt32Value decodes a int32 value as a Int32. -func consumeInt32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfInt32(int32(v)), out, nil -} - -var coderInt32Value = valueCoderFuncs{ - size: sizeInt32Value, - marshal: appendInt32Value, - unmarshal: consumeInt32Value, - merge: mergeScalarValue, -} - -// sizeInt32SliceValue returns the size of wire encoding a []int32 value as a repeated Int32. -func sizeInt32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(uint64(int32(v.Int()))) - } - return size -} - -// appendInt32SliceValue encodes a []int32 value as a repeated Int32. -func appendInt32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(int32(v.Int()))) - } - return b, nil -} - -// consumeInt32SliceValue wire decodes a []int32 value as a repeated Int32. -func consumeInt32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(v))) - out.n = n - return listv, out, nil -} - -var coderInt32SliceValue = valueCoderFuncs{ - size: sizeInt32SliceValue, - marshal: appendInt32SliceValue, - unmarshal: consumeInt32SliceValue, - merge: mergeListValue, -} - -// sizeInt32PackedSliceValue returns the size of wire encoding a []int32 value as a packed repeated Int32. -func sizeInt32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(int32(v.Int()))) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendInt32PackedSliceValue encodes a []int32 value as a packed repeated Int32. -func appendInt32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(int32(v.Int()))) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, uint64(int32(v.Int()))) - } - return b, nil -} - -var coderInt32PackedSliceValue = valueCoderFuncs{ - size: sizeInt32PackedSliceValue, - marshal: appendInt32PackedSliceValue, - unmarshal: consumeInt32SliceValue, - merge: mergeListValue, -} - -// sizeSint32 returns the size of wire encoding a int32 pointer as a Sint32. -func sizeSint32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int32() - return f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v))) -} - -// appendSint32 wire encodes a int32 pointer as a Sint32. -func appendSint32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int32() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v))) - return b, nil -} - -// consumeSint32 wire decodes a int32 pointer as a Sint32. -func consumeSint32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Int32() = int32(protowire.DecodeZigZag(v & math.MaxUint32)) - out.n = n - return out, nil -} - -var coderSint32 = pointerCoderFuncs{ - size: sizeSint32, - marshal: appendSint32, - unmarshal: consumeSint32, - merge: mergeInt32, -} - -// sizeSint32NoZero returns the size of wire encoding a int32 pointer as a Sint32. -// The zero value is not encoded. -func sizeSint32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int32() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v))) -} - -// appendSint32NoZero wire encodes a int32 pointer as a Sint32. -// The zero value is not encoded. -func appendSint32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int32() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v))) - return b, nil -} - -var coderSint32NoZero = pointerCoderFuncs{ - size: sizeSint32NoZero, - marshal: appendSint32NoZero, - unmarshal: consumeSint32, - merge: mergeInt32NoZero, -} - -// sizeSint32Ptr returns the size of wire encoding a *int32 pointer as a Sint32. -// It panics if the pointer is nil. -func sizeSint32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.Int32Ptr() - return f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v))) -} - -// appendSint32Ptr wire encodes a *int32 pointer as a Sint32. -// It panics if the pointer is nil. -func appendSint32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Int32Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v))) - return b, nil -} - -// consumeSint32Ptr wire decodes a *int32 pointer as a Sint32. -func consumeSint32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.Int32Ptr() - if *vp == nil { - *vp = new(int32) - } - **vp = int32(protowire.DecodeZigZag(v & math.MaxUint32)) - out.n = n - return out, nil -} - -var coderSint32Ptr = pointerCoderFuncs{ - size: sizeSint32Ptr, - marshal: appendSint32Ptr, - unmarshal: consumeSint32Ptr, - merge: mergeInt32Ptr, -} - -// sizeSint32Slice returns the size of wire encoding a []int32 pointer as a repeated Sint32. -func sizeSint32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int32Slice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v))) - } - return size -} - -// appendSint32Slice encodes a []int32 pointer as a repeated Sint32. -func appendSint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int32Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v))) - } - return b, nil -} - -// consumeSint32Slice wire decodes a []int32 pointer as a repeated Sint32. -func consumeSint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Int32Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growInt32Slice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, int32(protowire.DecodeZigZag(v&math.MaxUint32))) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, int32(protowire.DecodeZigZag(v&math.MaxUint32))) - out.n = n - return out, nil -} - -var coderSint32Slice = pointerCoderFuncs{ - size: sizeSint32Slice, - marshal: appendSint32Slice, - unmarshal: consumeSint32Slice, - merge: mergeInt32Slice, -} - -// sizeSint32PackedSlice returns the size of wire encoding a []int32 pointer as a packed repeated Sint32. -func sizeSint32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int32Slice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(protowire.EncodeZigZag(int64(v))) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendSint32PackedSlice encodes a []int32 pointer as a packed repeated Sint32. -func appendSint32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int32Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(protowire.EncodeZigZag(int64(v))) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v))) - } - return b, nil -} - -var coderSint32PackedSlice = pointerCoderFuncs{ - size: sizeSint32PackedSlice, - marshal: appendSint32PackedSlice, - unmarshal: consumeSint32Slice, - merge: mergeInt32Slice, -} - -// sizeSint32Value returns the size of wire encoding a int32 value as a Sint32. -func sizeSint32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) -} - -// appendSint32Value encodes a int32 value as a Sint32. -func appendSint32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int())))) - return b, nil -} - -// consumeSint32Value decodes a int32 value as a Sint32. -func consumeSint32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))), out, nil -} - -var coderSint32Value = valueCoderFuncs{ - size: sizeSint32Value, - marshal: appendSint32Value, - unmarshal: consumeSint32Value, - merge: mergeScalarValue, -} - -// sizeSint32SliceValue returns the size of wire encoding a []int32 value as a repeated Sint32. -func sizeSint32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) - } - return size -} - -// appendSint32SliceValue encodes a []int32 value as a repeated Sint32. -func appendSint32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int())))) - } - return b, nil -} - -// consumeSint32SliceValue wire decodes a []int32 value as a repeated Sint32. -func consumeSint32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32)))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32)))) - out.n = n - return listv, out, nil -} - -var coderSint32SliceValue = valueCoderFuncs{ - size: sizeSint32SliceValue, - marshal: appendSint32SliceValue, - unmarshal: consumeSint32SliceValue, - merge: mergeListValue, -} - -// sizeSint32PackedSliceValue returns the size of wire encoding a []int32 value as a packed repeated Sint32. -func sizeSint32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendSint32PackedSliceValue encodes a []int32 value as a packed repeated Sint32. -func appendSint32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int())))) - } - return b, nil -} - -var coderSint32PackedSliceValue = valueCoderFuncs{ - size: sizeSint32PackedSliceValue, - marshal: appendSint32PackedSliceValue, - unmarshal: consumeSint32SliceValue, - merge: mergeListValue, -} - -// sizeUint32 returns the size of wire encoding a uint32 pointer as a Uint32. -func sizeUint32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Uint32() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendUint32 wire encodes a uint32 pointer as a Uint32. -func appendUint32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint32() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -// consumeUint32 wire decodes a uint32 pointer as a Uint32. -func consumeUint32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Uint32() = uint32(v) - out.n = n - return out, nil -} - -var coderUint32 = pointerCoderFuncs{ - size: sizeUint32, - marshal: appendUint32, - unmarshal: consumeUint32, - merge: mergeUint32, -} - -// sizeUint32NoZero returns the size of wire encoding a uint32 pointer as a Uint32. -// The zero value is not encoded. -func sizeUint32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Uint32() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendUint32NoZero wire encodes a uint32 pointer as a Uint32. -// The zero value is not encoded. -func appendUint32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint32() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -var coderUint32NoZero = pointerCoderFuncs{ - size: sizeUint32NoZero, - marshal: appendUint32NoZero, - unmarshal: consumeUint32, - merge: mergeUint32NoZero, -} - -// sizeUint32Ptr returns the size of wire encoding a *uint32 pointer as a Uint32. -// It panics if the pointer is nil. -func sizeUint32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.Uint32Ptr() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendUint32Ptr wire encodes a *uint32 pointer as a Uint32. -// It panics if the pointer is nil. -func appendUint32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Uint32Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -// consumeUint32Ptr wire decodes a *uint32 pointer as a Uint32. -func consumeUint32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.Uint32Ptr() - if *vp == nil { - *vp = new(uint32) - } - **vp = uint32(v) - out.n = n - return out, nil -} - -var coderUint32Ptr = pointerCoderFuncs{ - size: sizeUint32Ptr, - marshal: appendUint32Ptr, - unmarshal: consumeUint32Ptr, - merge: mergeUint32Ptr, -} - -// sizeUint32Slice returns the size of wire encoding a []uint32 pointer as a repeated Uint32. -func sizeUint32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint32Slice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(uint64(v)) - } - return size -} - -// appendUint32Slice encodes a []uint32 pointer as a repeated Uint32. -func appendUint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint32Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - } - return b, nil -} - -// consumeUint32Slice wire decodes a []uint32 pointer as a repeated Uint32. -func consumeUint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Uint32Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growUint32Slice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, uint32(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, uint32(v)) - out.n = n - return out, nil -} - -var coderUint32Slice = pointerCoderFuncs{ - size: sizeUint32Slice, - marshal: appendUint32Slice, - unmarshal: consumeUint32Slice, - merge: mergeUint32Slice, -} - -// sizeUint32PackedSlice returns the size of wire encoding a []uint32 pointer as a packed repeated Uint32. -func sizeUint32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint32Slice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(uint64(v)) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendUint32PackedSlice encodes a []uint32 pointer as a packed repeated Uint32. -func appendUint32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint32Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(uint64(v)) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, uint64(v)) - } - return b, nil -} - -var coderUint32PackedSlice = pointerCoderFuncs{ - size: sizeUint32PackedSlice, - marshal: appendUint32PackedSlice, - unmarshal: consumeUint32Slice, - merge: mergeUint32Slice, -} - -// sizeUint32Value returns the size of wire encoding a uint32 value as a Uint32. -func sizeUint32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(uint64(uint32(v.Uint()))) -} - -// appendUint32Value encodes a uint32 value as a Uint32. -func appendUint32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(uint32(v.Uint()))) - return b, nil -} - -// consumeUint32Value decodes a uint32 value as a Uint32. -func consumeUint32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfUint32(uint32(v)), out, nil -} - -var coderUint32Value = valueCoderFuncs{ - size: sizeUint32Value, - marshal: appendUint32Value, - unmarshal: consumeUint32Value, - merge: mergeScalarValue, -} - -// sizeUint32SliceValue returns the size of wire encoding a []uint32 value as a repeated Uint32. -func sizeUint32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(uint64(uint32(v.Uint()))) - } - return size -} - -// appendUint32SliceValue encodes a []uint32 value as a repeated Uint32. -func appendUint32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(uint32(v.Uint()))) - } - return b, nil -} - -// consumeUint32SliceValue wire decodes a []uint32 value as a repeated Uint32. -func consumeUint32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint32(uint32(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint32(uint32(v))) - out.n = n - return listv, out, nil -} - -var coderUint32SliceValue = valueCoderFuncs{ - size: sizeUint32SliceValue, - marshal: appendUint32SliceValue, - unmarshal: consumeUint32SliceValue, - merge: mergeListValue, -} - -// sizeUint32PackedSliceValue returns the size of wire encoding a []uint32 value as a packed repeated Uint32. -func sizeUint32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(uint32(v.Uint()))) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendUint32PackedSliceValue encodes a []uint32 value as a packed repeated Uint32. -func appendUint32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(uint32(v.Uint()))) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, uint64(uint32(v.Uint()))) - } - return b, nil -} - -var coderUint32PackedSliceValue = valueCoderFuncs{ - size: sizeUint32PackedSliceValue, - marshal: appendUint32PackedSliceValue, - unmarshal: consumeUint32SliceValue, - merge: mergeListValue, -} - -// sizeInt64 returns the size of wire encoding a int64 pointer as a Int64. -func sizeInt64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int64() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendInt64 wire encodes a int64 pointer as a Int64. -func appendInt64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int64() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -// consumeInt64 wire decodes a int64 pointer as a Int64. -func consumeInt64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Int64() = int64(v) - out.n = n - return out, nil -} - -var coderInt64 = pointerCoderFuncs{ - size: sizeInt64, - marshal: appendInt64, - unmarshal: consumeInt64, - merge: mergeInt64, -} - -// sizeInt64NoZero returns the size of wire encoding a int64 pointer as a Int64. -// The zero value is not encoded. -func sizeInt64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int64() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendInt64NoZero wire encodes a int64 pointer as a Int64. -// The zero value is not encoded. -func appendInt64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int64() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -var coderInt64NoZero = pointerCoderFuncs{ - size: sizeInt64NoZero, - marshal: appendInt64NoZero, - unmarshal: consumeInt64, - merge: mergeInt64NoZero, -} - -// sizeInt64Ptr returns the size of wire encoding a *int64 pointer as a Int64. -// It panics if the pointer is nil. -func sizeInt64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.Int64Ptr() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -// appendInt64Ptr wire encodes a *int64 pointer as a Int64. -// It panics if the pointer is nil. -func appendInt64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Int64Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -// consumeInt64Ptr wire decodes a *int64 pointer as a Int64. -func consumeInt64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.Int64Ptr() - if *vp == nil { - *vp = new(int64) - } - **vp = int64(v) - out.n = n - return out, nil -} - -var coderInt64Ptr = pointerCoderFuncs{ - size: sizeInt64Ptr, - marshal: appendInt64Ptr, - unmarshal: consumeInt64Ptr, - merge: mergeInt64Ptr, -} - -// sizeInt64Slice returns the size of wire encoding a []int64 pointer as a repeated Int64. -func sizeInt64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int64Slice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(uint64(v)) - } - return size -} - -// appendInt64Slice encodes a []int64 pointer as a repeated Int64. -func appendInt64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int64Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - } - return b, nil -} - -// consumeInt64Slice wire decodes a []int64 pointer as a repeated Int64. -func consumeInt64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Int64Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growInt64Slice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, int64(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, int64(v)) - out.n = n - return out, nil -} - -var coderInt64Slice = pointerCoderFuncs{ - size: sizeInt64Slice, - marshal: appendInt64Slice, - unmarshal: consumeInt64Slice, - merge: mergeInt64Slice, -} - -// sizeInt64PackedSlice returns the size of wire encoding a []int64 pointer as a packed repeated Int64. -func sizeInt64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int64Slice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(uint64(v)) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendInt64PackedSlice encodes a []int64 pointer as a packed repeated Int64. -func appendInt64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int64Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(uint64(v)) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, uint64(v)) - } - return b, nil -} - -var coderInt64PackedSlice = pointerCoderFuncs{ - size: sizeInt64PackedSlice, - marshal: appendInt64PackedSlice, - unmarshal: consumeInt64Slice, - merge: mergeInt64Slice, -} - -// sizeInt64Value returns the size of wire encoding a int64 value as a Int64. -func sizeInt64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(uint64(v.Int())) -} - -// appendInt64Value encodes a int64 value as a Int64. -func appendInt64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(v.Int())) - return b, nil -} - -// consumeInt64Value decodes a int64 value as a Int64. -func consumeInt64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfInt64(int64(v)), out, nil -} - -var coderInt64Value = valueCoderFuncs{ - size: sizeInt64Value, - marshal: appendInt64Value, - unmarshal: consumeInt64Value, - merge: mergeScalarValue, -} - -// sizeInt64SliceValue returns the size of wire encoding a []int64 value as a repeated Int64. -func sizeInt64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(uint64(v.Int())) - } - return size -} - -// appendInt64SliceValue encodes a []int64 value as a repeated Int64. -func appendInt64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(v.Int())) - } - return b, nil -} - -// consumeInt64SliceValue wire decodes a []int64 value as a repeated Int64. -func consumeInt64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt64(int64(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt64(int64(v))) - out.n = n - return listv, out, nil -} - -var coderInt64SliceValue = valueCoderFuncs{ - size: sizeInt64SliceValue, - marshal: appendInt64SliceValue, - unmarshal: consumeInt64SliceValue, - merge: mergeListValue, -} - -// sizeInt64PackedSliceValue returns the size of wire encoding a []int64 value as a packed repeated Int64. -func sizeInt64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(v.Int())) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendInt64PackedSliceValue encodes a []int64 value as a packed repeated Int64. -func appendInt64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(uint64(v.Int())) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, uint64(v.Int())) - } - return b, nil -} - -var coderInt64PackedSliceValue = valueCoderFuncs{ - size: sizeInt64PackedSliceValue, - marshal: appendInt64PackedSliceValue, - unmarshal: consumeInt64SliceValue, - merge: mergeListValue, -} - -// sizeSint64 returns the size of wire encoding a int64 pointer as a Sint64. -func sizeSint64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int64() - return f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) -} - -// appendSint64 wire encodes a int64 pointer as a Sint64. -func appendSint64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int64() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)) - return b, nil -} - -// consumeSint64 wire decodes a int64 pointer as a Sint64. -func consumeSint64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Int64() = protowire.DecodeZigZag(v) - out.n = n - return out, nil -} - -var coderSint64 = pointerCoderFuncs{ - size: sizeSint64, - marshal: appendSint64, - unmarshal: consumeSint64, - merge: mergeInt64, -} - -// sizeSint64NoZero returns the size of wire encoding a int64 pointer as a Sint64. -// The zero value is not encoded. -func sizeSint64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int64() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) -} - -// appendSint64NoZero wire encodes a int64 pointer as a Sint64. -// The zero value is not encoded. -func appendSint64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int64() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)) - return b, nil -} - -var coderSint64NoZero = pointerCoderFuncs{ - size: sizeSint64NoZero, - marshal: appendSint64NoZero, - unmarshal: consumeSint64, - merge: mergeInt64NoZero, -} - -// sizeSint64Ptr returns the size of wire encoding a *int64 pointer as a Sint64. -// It panics if the pointer is nil. -func sizeSint64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.Int64Ptr() - return f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) -} - -// appendSint64Ptr wire encodes a *int64 pointer as a Sint64. -// It panics if the pointer is nil. -func appendSint64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Int64Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)) - return b, nil -} - -// consumeSint64Ptr wire decodes a *int64 pointer as a Sint64. -func consumeSint64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.Int64Ptr() - if *vp == nil { - *vp = new(int64) - } - **vp = protowire.DecodeZigZag(v) - out.n = n - return out, nil -} - -var coderSint64Ptr = pointerCoderFuncs{ - size: sizeSint64Ptr, - marshal: appendSint64Ptr, - unmarshal: consumeSint64Ptr, - merge: mergeInt64Ptr, -} - -// sizeSint64Slice returns the size of wire encoding a []int64 pointer as a repeated Sint64. -func sizeSint64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int64Slice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) - } - return size -} - -// appendSint64Slice encodes a []int64 pointer as a repeated Sint64. -func appendSint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int64Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)) - } - return b, nil -} - -// consumeSint64Slice wire decodes a []int64 pointer as a repeated Sint64. -func consumeSint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Int64Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growInt64Slice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, protowire.DecodeZigZag(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, protowire.DecodeZigZag(v)) - out.n = n - return out, nil -} - -var coderSint64Slice = pointerCoderFuncs{ - size: sizeSint64Slice, - marshal: appendSint64Slice, - unmarshal: consumeSint64Slice, - merge: mergeInt64Slice, -} - -// sizeSint64PackedSlice returns the size of wire encoding a []int64 pointer as a packed repeated Sint64. -func sizeSint64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int64Slice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(protowire.EncodeZigZag(v)) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendSint64PackedSlice encodes a []int64 pointer as a packed repeated Sint64. -func appendSint64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int64Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(protowire.EncodeZigZag(v)) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)) - } - return b, nil -} - -var coderSint64PackedSlice = pointerCoderFuncs{ - size: sizeSint64PackedSlice, - marshal: appendSint64PackedSlice, - unmarshal: consumeSint64Slice, - merge: mergeInt64Slice, -} - -// sizeSint64Value returns the size of wire encoding a int64 value as a Sint64. -func sizeSint64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) -} - -// appendSint64Value encodes a int64 value as a Sint64. -func appendSint64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int())) - return b, nil -} - -// consumeSint64Value decodes a int64 value as a Sint64. -func consumeSint64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), out, nil -} - -var coderSint64Value = valueCoderFuncs{ - size: sizeSint64Value, - marshal: appendSint64Value, - unmarshal: consumeSint64Value, - merge: mergeScalarValue, -} - -// sizeSint64SliceValue returns the size of wire encoding a []int64 value as a repeated Sint64. -func sizeSint64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) - } - return size -} - -// appendSint64SliceValue encodes a []int64 value as a repeated Sint64. -func appendSint64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int())) - } - return b, nil -} - -// consumeSint64SliceValue wire decodes a []int64 value as a repeated Sint64. -func consumeSint64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v))) - out.n = n - return listv, out, nil -} - -var coderSint64SliceValue = valueCoderFuncs{ - size: sizeSint64SliceValue, - marshal: appendSint64SliceValue, - unmarshal: consumeSint64SliceValue, - merge: mergeListValue, -} - -// sizeSint64PackedSliceValue returns the size of wire encoding a []int64 value as a packed repeated Sint64. -func sizeSint64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendSint64PackedSliceValue encodes a []int64 value as a packed repeated Sint64. -func appendSint64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int())) - } - return b, nil -} - -var coderSint64PackedSliceValue = valueCoderFuncs{ - size: sizeSint64PackedSliceValue, - marshal: appendSint64PackedSliceValue, - unmarshal: consumeSint64SliceValue, - merge: mergeListValue, -} - -// sizeUint64 returns the size of wire encoding a uint64 pointer as a Uint64. -func sizeUint64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Uint64() - return f.tagsize + protowire.SizeVarint(v) -} - -// appendUint64 wire encodes a uint64 pointer as a Uint64. -func appendUint64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint64() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, v) - return b, nil -} - -// consumeUint64 wire decodes a uint64 pointer as a Uint64. -func consumeUint64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *p.Uint64() = v - out.n = n - return out, nil -} - -var coderUint64 = pointerCoderFuncs{ - size: sizeUint64, - marshal: appendUint64, - unmarshal: consumeUint64, - merge: mergeUint64, -} - -// sizeUint64NoZero returns the size of wire encoding a uint64 pointer as a Uint64. -// The zero value is not encoded. -func sizeUint64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Uint64() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeVarint(v) -} - -// appendUint64NoZero wire encodes a uint64 pointer as a Uint64. -// The zero value is not encoded. -func appendUint64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint64() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, v) - return b, nil -} - -var coderUint64NoZero = pointerCoderFuncs{ - size: sizeUint64NoZero, - marshal: appendUint64NoZero, - unmarshal: consumeUint64, - merge: mergeUint64NoZero, -} - -// sizeUint64Ptr returns the size of wire encoding a *uint64 pointer as a Uint64. -// It panics if the pointer is nil. -func sizeUint64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.Uint64Ptr() - return f.tagsize + protowire.SizeVarint(v) -} - -// appendUint64Ptr wire encodes a *uint64 pointer as a Uint64. -// It panics if the pointer is nil. -func appendUint64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Uint64Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, v) - return b, nil -} - -// consumeUint64Ptr wire decodes a *uint64 pointer as a Uint64. -func consumeUint64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - vp := p.Uint64Ptr() - if *vp == nil { - *vp = new(uint64) - } - **vp = v - out.n = n - return out, nil -} - -var coderUint64Ptr = pointerCoderFuncs{ - size: sizeUint64Ptr, - marshal: appendUint64Ptr, - unmarshal: consumeUint64Ptr, - merge: mergeUint64Ptr, -} - -// sizeUint64Slice returns the size of wire encoding a []uint64 pointer as a repeated Uint64. -func sizeUint64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint64Slice() - for _, v := range s { - size += f.tagsize + protowire.SizeVarint(v) - } - return size -} - -// appendUint64Slice encodes a []uint64 pointer as a repeated Uint64. -func appendUint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint64Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, v) - } - return b, nil -} - -// consumeUint64Slice wire decodes a []uint64 pointer as a repeated Uint64. -func consumeUint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Uint64Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := 0 - for _, v := range b { - if v < 0x80 { - count++ - } - } - if count > 0 { - p.growUint64Slice(count) - } - s := *sp - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - s = append(s, v) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return out, errDecode - } - *sp = append(*sp, v) - out.n = n - return out, nil -} - -var coderUint64Slice = pointerCoderFuncs{ - size: sizeUint64Slice, - marshal: appendUint64Slice, - unmarshal: consumeUint64Slice, - merge: mergeUint64Slice, -} - -// sizeUint64PackedSlice returns the size of wire encoding a []uint64 pointer as a packed repeated Uint64. -func sizeUint64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint64Slice() - if len(s) == 0 { - return 0 - } - n := 0 - for _, v := range s { - n += protowire.SizeVarint(v) - } - return f.tagsize + protowire.SizeBytes(n) -} - -// appendUint64PackedSlice encodes a []uint64 pointer as a packed repeated Uint64. -func appendUint64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint64Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for _, v := range s { - n += protowire.SizeVarint(v) - } - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendVarint(b, v) - } - return b, nil -} - -var coderUint64PackedSlice = pointerCoderFuncs{ - size: sizeUint64PackedSlice, - marshal: appendUint64PackedSlice, - unmarshal: consumeUint64Slice, - merge: mergeUint64Slice, -} - -// sizeUint64Value returns the size of wire encoding a uint64 value as a Uint64. -func sizeUint64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeVarint(v.Uint()) -} - -// appendUint64Value encodes a uint64 value as a Uint64. -func appendUint64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, v.Uint()) - return b, nil -} - -// consumeUint64Value decodes a uint64 value as a Uint64. -func consumeUint64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfUint64(v), out, nil -} - -var coderUint64Value = valueCoderFuncs{ - size: sizeUint64Value, - marshal: appendUint64Value, - unmarshal: consumeUint64Value, - merge: mergeScalarValue, -} - -// sizeUint64SliceValue returns the size of wire encoding a []uint64 value as a repeated Uint64. -func sizeUint64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeVarint(v.Uint()) - } - return size -} - -// appendUint64SliceValue encodes a []uint64 value as a repeated Uint64. -func appendUint64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, v.Uint()) - } - return b, nil -} - -// consumeUint64SliceValue wire decodes a []uint64 value as a repeated Uint64. -func consumeUint64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint64(v)) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.VarintType { - return protoreflect.Value{}, out, errUnknown - } - var v uint64 - var n int - if len(b) >= 1 && b[0] < 0x80 { - v = uint64(b[0]) - n = 1 - } else if len(b) >= 2 && b[1] < 128 { - v = uint64(b[0]&0x7f) + uint64(b[1])<<7 - n = 2 - } else { - v, n = protowire.ConsumeVarint(b) - } - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint64(v)) - out.n = n - return listv, out, nil -} - -var coderUint64SliceValue = valueCoderFuncs{ - size: sizeUint64SliceValue, - marshal: appendUint64SliceValue, - unmarshal: consumeUint64SliceValue, - merge: mergeListValue, -} - -// sizeUint64PackedSliceValue returns the size of wire encoding a []uint64 value as a packed repeated Uint64. -func sizeUint64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := 0 - for i, llen := 0, llen; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(v.Uint()) - } - return tagsize + protowire.SizeBytes(n) -} - -// appendUint64PackedSliceValue encodes a []uint64 value as a packed repeated Uint64. -func appendUint64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := 0 - for i := 0; i < llen; i++ { - v := list.Get(i) - n += protowire.SizeVarint(v.Uint()) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, v.Uint()) - } - return b, nil -} - -var coderUint64PackedSliceValue = valueCoderFuncs{ - size: sizeUint64PackedSliceValue, - marshal: appendUint64PackedSliceValue, - unmarshal: consumeUint64SliceValue, - merge: mergeListValue, -} - -// sizeSfixed32 returns the size of wire encoding a int32 pointer as a Sfixed32. -func sizeSfixed32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - - return f.tagsize + protowire.SizeFixed32() -} - -// appendSfixed32 wire encodes a int32 pointer as a Sfixed32. -func appendSfixed32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int32() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, uint32(v)) - return b, nil -} - -// consumeSfixed32 wire decodes a int32 pointer as a Sfixed32. -func consumeSfixed32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - *p.Int32() = int32(v) - out.n = n - return out, nil -} - -var coderSfixed32 = pointerCoderFuncs{ - size: sizeSfixed32, - marshal: appendSfixed32, - unmarshal: consumeSfixed32, - merge: mergeInt32, -} - -// sizeSfixed32NoZero returns the size of wire encoding a int32 pointer as a Sfixed32. -// The zero value is not encoded. -func sizeSfixed32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int32() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeFixed32() -} - -// appendSfixed32NoZero wire encodes a int32 pointer as a Sfixed32. -// The zero value is not encoded. -func appendSfixed32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int32() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, uint32(v)) - return b, nil -} - -var coderSfixed32NoZero = pointerCoderFuncs{ - size: sizeSfixed32NoZero, - marshal: appendSfixed32NoZero, - unmarshal: consumeSfixed32, - merge: mergeInt32NoZero, -} - -// sizeSfixed32Ptr returns the size of wire encoding a *int32 pointer as a Sfixed32. -// It panics if the pointer is nil. -func sizeSfixed32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return f.tagsize + protowire.SizeFixed32() -} - -// appendSfixed32Ptr wire encodes a *int32 pointer as a Sfixed32. -// It panics if the pointer is nil. -func appendSfixed32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Int32Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, uint32(v)) - return b, nil -} - -// consumeSfixed32Ptr wire decodes a *int32 pointer as a Sfixed32. -func consumeSfixed32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - vp := p.Int32Ptr() - if *vp == nil { - *vp = new(int32) - } - **vp = int32(v) - out.n = n - return out, nil -} - -var coderSfixed32Ptr = pointerCoderFuncs{ - size: sizeSfixed32Ptr, - marshal: appendSfixed32Ptr, - unmarshal: consumeSfixed32Ptr, - merge: mergeInt32Ptr, -} - -// sizeSfixed32Slice returns the size of wire encoding a []int32 pointer as a repeated Sfixed32. -func sizeSfixed32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int32Slice() - size = len(s) * (f.tagsize + protowire.SizeFixed32()) - return size -} - -// appendSfixed32Slice encodes a []int32 pointer as a repeated Sfixed32. -func appendSfixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int32Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, uint32(v)) - } - return b, nil -} - -// consumeSfixed32Slice wire decodes a []int32 pointer as a repeated Sfixed32. -func consumeSfixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Int32Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := len(b) / protowire.SizeFixed32() - if count > 0 { - p.growInt32Slice(count) - } - s := *sp - for len(b) > 0 { - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - s = append(s, int32(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, int32(v)) - out.n = n - return out, nil -} - -var coderSfixed32Slice = pointerCoderFuncs{ - size: sizeSfixed32Slice, - marshal: appendSfixed32Slice, - unmarshal: consumeSfixed32Slice, - merge: mergeInt32Slice, -} - -// sizeSfixed32PackedSlice returns the size of wire encoding a []int32 pointer as a packed repeated Sfixed32. -func sizeSfixed32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int32Slice() - if len(s) == 0 { - return 0 - } - n := len(s) * protowire.SizeFixed32() - return f.tagsize + protowire.SizeBytes(n) -} - -// appendSfixed32PackedSlice encodes a []int32 pointer as a packed repeated Sfixed32. -func appendSfixed32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int32Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := len(s) * protowire.SizeFixed32() - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendFixed32(b, uint32(v)) - } - return b, nil -} - -var coderSfixed32PackedSlice = pointerCoderFuncs{ - size: sizeSfixed32PackedSlice, - marshal: appendSfixed32PackedSlice, - unmarshal: consumeSfixed32Slice, - merge: mergeInt32Slice, -} - -// sizeSfixed32Value returns the size of wire encoding a int32 value as a Sfixed32. -func sizeSfixed32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeFixed32() -} - -// appendSfixed32Value encodes a int32 value as a Sfixed32. -func appendSfixed32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed32(b, uint32(v.Int())) - return b, nil -} - -// consumeSfixed32Value decodes a int32 value as a Sfixed32. -func consumeSfixed32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfInt32(int32(v)), out, nil -} - -var coderSfixed32Value = valueCoderFuncs{ - size: sizeSfixed32Value, - marshal: appendSfixed32Value, - unmarshal: consumeSfixed32Value, - merge: mergeScalarValue, -} - -// sizeSfixed32SliceValue returns the size of wire encoding a []int32 value as a repeated Sfixed32. -func sizeSfixed32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - size = list.Len() * (tagsize + protowire.SizeFixed32()) - return size -} - -// appendSfixed32SliceValue encodes a []int32 value as a repeated Sfixed32. -func appendSfixed32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed32(b, uint32(v.Int())) - } - return b, nil -} - -// consumeSfixed32SliceValue wire decodes a []int32 value as a repeated Sfixed32. -func consumeSfixed32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.Fixed32Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(v))) - out.n = n - return listv, out, nil -} - -var coderSfixed32SliceValue = valueCoderFuncs{ - size: sizeSfixed32SliceValue, - marshal: appendSfixed32SliceValue, - unmarshal: consumeSfixed32SliceValue, - merge: mergeListValue, -} - -// sizeSfixed32PackedSliceValue returns the size of wire encoding a []int32 value as a packed repeated Sfixed32. -func sizeSfixed32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := llen * protowire.SizeFixed32() - return tagsize + protowire.SizeBytes(n) -} - -// appendSfixed32PackedSliceValue encodes a []int32 value as a packed repeated Sfixed32. -func appendSfixed32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := llen * protowire.SizeFixed32() - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendFixed32(b, uint32(v.Int())) - } - return b, nil -} - -var coderSfixed32PackedSliceValue = valueCoderFuncs{ - size: sizeSfixed32PackedSliceValue, - marshal: appendSfixed32PackedSliceValue, - unmarshal: consumeSfixed32SliceValue, - merge: mergeListValue, -} - -// sizeFixed32 returns the size of wire encoding a uint32 pointer as a Fixed32. -func sizeFixed32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - - return f.tagsize + protowire.SizeFixed32() -} - -// appendFixed32 wire encodes a uint32 pointer as a Fixed32. -func appendFixed32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint32() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, v) - return b, nil -} - -// consumeFixed32 wire decodes a uint32 pointer as a Fixed32. -func consumeFixed32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - *p.Uint32() = v - out.n = n - return out, nil -} - -var coderFixed32 = pointerCoderFuncs{ - size: sizeFixed32, - marshal: appendFixed32, - unmarshal: consumeFixed32, - merge: mergeUint32, -} - -// sizeFixed32NoZero returns the size of wire encoding a uint32 pointer as a Fixed32. -// The zero value is not encoded. -func sizeFixed32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Uint32() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeFixed32() -} - -// appendFixed32NoZero wire encodes a uint32 pointer as a Fixed32. -// The zero value is not encoded. -func appendFixed32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint32() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, v) - return b, nil -} - -var coderFixed32NoZero = pointerCoderFuncs{ - size: sizeFixed32NoZero, - marshal: appendFixed32NoZero, - unmarshal: consumeFixed32, - merge: mergeUint32NoZero, -} - -// sizeFixed32Ptr returns the size of wire encoding a *uint32 pointer as a Fixed32. -// It panics if the pointer is nil. -func sizeFixed32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return f.tagsize + protowire.SizeFixed32() -} - -// appendFixed32Ptr wire encodes a *uint32 pointer as a Fixed32. -// It panics if the pointer is nil. -func appendFixed32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Uint32Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, v) - return b, nil -} - -// consumeFixed32Ptr wire decodes a *uint32 pointer as a Fixed32. -func consumeFixed32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - vp := p.Uint32Ptr() - if *vp == nil { - *vp = new(uint32) - } - **vp = v - out.n = n - return out, nil -} - -var coderFixed32Ptr = pointerCoderFuncs{ - size: sizeFixed32Ptr, - marshal: appendFixed32Ptr, - unmarshal: consumeFixed32Ptr, - merge: mergeUint32Ptr, -} - -// sizeFixed32Slice returns the size of wire encoding a []uint32 pointer as a repeated Fixed32. -func sizeFixed32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint32Slice() - size = len(s) * (f.tagsize + protowire.SizeFixed32()) - return size -} - -// appendFixed32Slice encodes a []uint32 pointer as a repeated Fixed32. -func appendFixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint32Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, v) - } - return b, nil -} - -// consumeFixed32Slice wire decodes a []uint32 pointer as a repeated Fixed32. -func consumeFixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Uint32Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := len(b) / protowire.SizeFixed32() - if count > 0 { - p.growUint32Slice(count) - } - s := *sp - for len(b) > 0 { - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - s = append(s, v) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, v) - out.n = n - return out, nil -} - -var coderFixed32Slice = pointerCoderFuncs{ - size: sizeFixed32Slice, - marshal: appendFixed32Slice, - unmarshal: consumeFixed32Slice, - merge: mergeUint32Slice, -} - -// sizeFixed32PackedSlice returns the size of wire encoding a []uint32 pointer as a packed repeated Fixed32. -func sizeFixed32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint32Slice() - if len(s) == 0 { - return 0 - } - n := len(s) * protowire.SizeFixed32() - return f.tagsize + protowire.SizeBytes(n) -} - -// appendFixed32PackedSlice encodes a []uint32 pointer as a packed repeated Fixed32. -func appendFixed32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint32Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := len(s) * protowire.SizeFixed32() - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendFixed32(b, v) - } - return b, nil -} - -var coderFixed32PackedSlice = pointerCoderFuncs{ - size: sizeFixed32PackedSlice, - marshal: appendFixed32PackedSlice, - unmarshal: consumeFixed32Slice, - merge: mergeUint32Slice, -} - -// sizeFixed32Value returns the size of wire encoding a uint32 value as a Fixed32. -func sizeFixed32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeFixed32() -} - -// appendFixed32Value encodes a uint32 value as a Fixed32. -func appendFixed32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed32(b, uint32(v.Uint())) - return b, nil -} - -// consumeFixed32Value decodes a uint32 value as a Fixed32. -func consumeFixed32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfUint32(uint32(v)), out, nil -} - -var coderFixed32Value = valueCoderFuncs{ - size: sizeFixed32Value, - marshal: appendFixed32Value, - unmarshal: consumeFixed32Value, - merge: mergeScalarValue, -} - -// sizeFixed32SliceValue returns the size of wire encoding a []uint32 value as a repeated Fixed32. -func sizeFixed32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - size = list.Len() * (tagsize + protowire.SizeFixed32()) - return size -} - -// appendFixed32SliceValue encodes a []uint32 value as a repeated Fixed32. -func appendFixed32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed32(b, uint32(v.Uint())) - } - return b, nil -} - -// consumeFixed32SliceValue wire decodes a []uint32 value as a repeated Fixed32. -func consumeFixed32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint32(uint32(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.Fixed32Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint32(uint32(v))) - out.n = n - return listv, out, nil -} - -var coderFixed32SliceValue = valueCoderFuncs{ - size: sizeFixed32SliceValue, - marshal: appendFixed32SliceValue, - unmarshal: consumeFixed32SliceValue, - merge: mergeListValue, -} - -// sizeFixed32PackedSliceValue returns the size of wire encoding a []uint32 value as a packed repeated Fixed32. -func sizeFixed32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := llen * protowire.SizeFixed32() - return tagsize + protowire.SizeBytes(n) -} - -// appendFixed32PackedSliceValue encodes a []uint32 value as a packed repeated Fixed32. -func appendFixed32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := llen * protowire.SizeFixed32() - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendFixed32(b, uint32(v.Uint())) - } - return b, nil -} - -var coderFixed32PackedSliceValue = valueCoderFuncs{ - size: sizeFixed32PackedSliceValue, - marshal: appendFixed32PackedSliceValue, - unmarshal: consumeFixed32SliceValue, - merge: mergeListValue, -} - -// sizeFloat returns the size of wire encoding a float32 pointer as a Float. -func sizeFloat(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - - return f.tagsize + protowire.SizeFixed32() -} - -// appendFloat wire encodes a float32 pointer as a Float. -func appendFloat(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Float32() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, math.Float32bits(v)) - return b, nil -} - -// consumeFloat wire decodes a float32 pointer as a Float. -func consumeFloat(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - *p.Float32() = math.Float32frombits(v) - out.n = n - return out, nil -} - -var coderFloat = pointerCoderFuncs{ - size: sizeFloat, - marshal: appendFloat, - unmarshal: consumeFloat, - merge: mergeFloat32, -} - -// sizeFloatNoZero returns the size of wire encoding a float32 pointer as a Float. -// The zero value is not encoded. -func sizeFloatNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Float32() - if v == 0 && !math.Signbit(float64(v)) { - return 0 - } - return f.tagsize + protowire.SizeFixed32() -} - -// appendFloatNoZero wire encodes a float32 pointer as a Float. -// The zero value is not encoded. -func appendFloatNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Float32() - if v == 0 && !math.Signbit(float64(v)) { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, math.Float32bits(v)) - return b, nil -} - -var coderFloatNoZero = pointerCoderFuncs{ - size: sizeFloatNoZero, - marshal: appendFloatNoZero, - unmarshal: consumeFloat, - merge: mergeFloat32NoZero, -} - -// sizeFloatPtr returns the size of wire encoding a *float32 pointer as a Float. -// It panics if the pointer is nil. -func sizeFloatPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return f.tagsize + protowire.SizeFixed32() -} - -// appendFloatPtr wire encodes a *float32 pointer as a Float. -// It panics if the pointer is nil. -func appendFloatPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Float32Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, math.Float32bits(v)) - return b, nil -} - -// consumeFloatPtr wire decodes a *float32 pointer as a Float. -func consumeFloatPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - vp := p.Float32Ptr() - if *vp == nil { - *vp = new(float32) - } - **vp = math.Float32frombits(v) - out.n = n - return out, nil -} - -var coderFloatPtr = pointerCoderFuncs{ - size: sizeFloatPtr, - marshal: appendFloatPtr, - unmarshal: consumeFloatPtr, - merge: mergeFloat32Ptr, -} - -// sizeFloatSlice returns the size of wire encoding a []float32 pointer as a repeated Float. -func sizeFloatSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Float32Slice() - size = len(s) * (f.tagsize + protowire.SizeFixed32()) - return size -} - -// appendFloatSlice encodes a []float32 pointer as a repeated Float. -func appendFloatSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Float32Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed32(b, math.Float32bits(v)) - } - return b, nil -} - -// consumeFloatSlice wire decodes a []float32 pointer as a repeated Float. -func consumeFloatSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Float32Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := len(b) / protowire.SizeFixed32() - if count > 0 { - p.growFloat32Slice(count) - } - s := *sp - for len(b) > 0 { - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - s = append(s, math.Float32frombits(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.Fixed32Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, math.Float32frombits(v)) - out.n = n - return out, nil -} - -var coderFloatSlice = pointerCoderFuncs{ - size: sizeFloatSlice, - marshal: appendFloatSlice, - unmarshal: consumeFloatSlice, - merge: mergeFloat32Slice, -} - -// sizeFloatPackedSlice returns the size of wire encoding a []float32 pointer as a packed repeated Float. -func sizeFloatPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Float32Slice() - if len(s) == 0 { - return 0 - } - n := len(s) * protowire.SizeFixed32() - return f.tagsize + protowire.SizeBytes(n) -} - -// appendFloatPackedSlice encodes a []float32 pointer as a packed repeated Float. -func appendFloatPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Float32Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := len(s) * protowire.SizeFixed32() - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendFixed32(b, math.Float32bits(v)) - } - return b, nil -} - -var coderFloatPackedSlice = pointerCoderFuncs{ - size: sizeFloatPackedSlice, - marshal: appendFloatPackedSlice, - unmarshal: consumeFloatSlice, - merge: mergeFloat32Slice, -} - -// sizeFloatValue returns the size of wire encoding a float32 value as a Float. -func sizeFloatValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeFixed32() -} - -// appendFloatValue encodes a float32 value as a Float. -func appendFloatValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float()))) - return b, nil -} - -// consumeFloatValue decodes a float32 value as a Float. -func consumeFloatValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.Fixed32Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))), out, nil -} - -var coderFloatValue = valueCoderFuncs{ - size: sizeFloatValue, - marshal: appendFloatValue, - unmarshal: consumeFloatValue, - merge: mergeScalarValue, -} - -// sizeFloatSliceValue returns the size of wire encoding a []float32 value as a repeated Float. -func sizeFloatSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - size = list.Len() * (tagsize + protowire.SizeFixed32()) - return size -} - -// appendFloatSliceValue encodes a []float32 value as a repeated Float. -func appendFloatSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float()))) - } - return b, nil -} - -// consumeFloatSliceValue wire decodes a []float32 value as a repeated Float. -func consumeFloatSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v)))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.Fixed32Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v)))) - out.n = n - return listv, out, nil -} - -var coderFloatSliceValue = valueCoderFuncs{ - size: sizeFloatSliceValue, - marshal: appendFloatSliceValue, - unmarshal: consumeFloatSliceValue, - merge: mergeListValue, -} - -// sizeFloatPackedSliceValue returns the size of wire encoding a []float32 value as a packed repeated Float. -func sizeFloatPackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := llen * protowire.SizeFixed32() - return tagsize + protowire.SizeBytes(n) -} - -// appendFloatPackedSliceValue encodes a []float32 value as a packed repeated Float. -func appendFloatPackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := llen * protowire.SizeFixed32() - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float()))) - } - return b, nil -} - -var coderFloatPackedSliceValue = valueCoderFuncs{ - size: sizeFloatPackedSliceValue, - marshal: appendFloatPackedSliceValue, - unmarshal: consumeFloatSliceValue, - merge: mergeListValue, -} - -// sizeSfixed64 returns the size of wire encoding a int64 pointer as a Sfixed64. -func sizeSfixed64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - - return f.tagsize + protowire.SizeFixed64() -} - -// appendSfixed64 wire encodes a int64 pointer as a Sfixed64. -func appendSfixed64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int64() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, uint64(v)) - return b, nil -} - -// consumeSfixed64 wire decodes a int64 pointer as a Sfixed64. -func consumeSfixed64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - *p.Int64() = int64(v) - out.n = n - return out, nil -} - -var coderSfixed64 = pointerCoderFuncs{ - size: sizeSfixed64, - marshal: appendSfixed64, - unmarshal: consumeSfixed64, - merge: mergeInt64, -} - -// sizeSfixed64NoZero returns the size of wire encoding a int64 pointer as a Sfixed64. -// The zero value is not encoded. -func sizeSfixed64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Int64() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeFixed64() -} - -// appendSfixed64NoZero wire encodes a int64 pointer as a Sfixed64. -// The zero value is not encoded. -func appendSfixed64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Int64() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, uint64(v)) - return b, nil -} - -var coderSfixed64NoZero = pointerCoderFuncs{ - size: sizeSfixed64NoZero, - marshal: appendSfixed64NoZero, - unmarshal: consumeSfixed64, - merge: mergeInt64NoZero, -} - -// sizeSfixed64Ptr returns the size of wire encoding a *int64 pointer as a Sfixed64. -// It panics if the pointer is nil. -func sizeSfixed64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return f.tagsize + protowire.SizeFixed64() -} - -// appendSfixed64Ptr wire encodes a *int64 pointer as a Sfixed64. -// It panics if the pointer is nil. -func appendSfixed64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Int64Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, uint64(v)) - return b, nil -} - -// consumeSfixed64Ptr wire decodes a *int64 pointer as a Sfixed64. -func consumeSfixed64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - vp := p.Int64Ptr() - if *vp == nil { - *vp = new(int64) - } - **vp = int64(v) - out.n = n - return out, nil -} - -var coderSfixed64Ptr = pointerCoderFuncs{ - size: sizeSfixed64Ptr, - marshal: appendSfixed64Ptr, - unmarshal: consumeSfixed64Ptr, - merge: mergeInt64Ptr, -} - -// sizeSfixed64Slice returns the size of wire encoding a []int64 pointer as a repeated Sfixed64. -func sizeSfixed64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int64Slice() - size = len(s) * (f.tagsize + protowire.SizeFixed64()) - return size -} - -// appendSfixed64Slice encodes a []int64 pointer as a repeated Sfixed64. -func appendSfixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int64Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, uint64(v)) - } - return b, nil -} - -// consumeSfixed64Slice wire decodes a []int64 pointer as a repeated Sfixed64. -func consumeSfixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Int64Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := len(b) / protowire.SizeFixed64() - if count > 0 { - p.growInt64Slice(count) - } - s := *sp - for len(b) > 0 { - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - s = append(s, int64(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, int64(v)) - out.n = n - return out, nil -} - -var coderSfixed64Slice = pointerCoderFuncs{ - size: sizeSfixed64Slice, - marshal: appendSfixed64Slice, - unmarshal: consumeSfixed64Slice, - merge: mergeInt64Slice, -} - -// sizeSfixed64PackedSlice returns the size of wire encoding a []int64 pointer as a packed repeated Sfixed64. -func sizeSfixed64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Int64Slice() - if len(s) == 0 { - return 0 - } - n := len(s) * protowire.SizeFixed64() - return f.tagsize + protowire.SizeBytes(n) -} - -// appendSfixed64PackedSlice encodes a []int64 pointer as a packed repeated Sfixed64. -func appendSfixed64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Int64Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := len(s) * protowire.SizeFixed64() - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendFixed64(b, uint64(v)) - } - return b, nil -} - -var coderSfixed64PackedSlice = pointerCoderFuncs{ - size: sizeSfixed64PackedSlice, - marshal: appendSfixed64PackedSlice, - unmarshal: consumeSfixed64Slice, - merge: mergeInt64Slice, -} - -// sizeSfixed64Value returns the size of wire encoding a int64 value as a Sfixed64. -func sizeSfixed64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeFixed64() -} - -// appendSfixed64Value encodes a int64 value as a Sfixed64. -func appendSfixed64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed64(b, uint64(v.Int())) - return b, nil -} - -// consumeSfixed64Value decodes a int64 value as a Sfixed64. -func consumeSfixed64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfInt64(int64(v)), out, nil -} - -var coderSfixed64Value = valueCoderFuncs{ - size: sizeSfixed64Value, - marshal: appendSfixed64Value, - unmarshal: consumeSfixed64Value, - merge: mergeScalarValue, -} - -// sizeSfixed64SliceValue returns the size of wire encoding a []int64 value as a repeated Sfixed64. -func sizeSfixed64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - size = list.Len() * (tagsize + protowire.SizeFixed64()) - return size -} - -// appendSfixed64SliceValue encodes a []int64 value as a repeated Sfixed64. -func appendSfixed64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed64(b, uint64(v.Int())) - } - return b, nil -} - -// consumeSfixed64SliceValue wire decodes a []int64 value as a repeated Sfixed64. -func consumeSfixed64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt64(int64(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.Fixed64Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfInt64(int64(v))) - out.n = n - return listv, out, nil -} - -var coderSfixed64SliceValue = valueCoderFuncs{ - size: sizeSfixed64SliceValue, - marshal: appendSfixed64SliceValue, - unmarshal: consumeSfixed64SliceValue, - merge: mergeListValue, -} - -// sizeSfixed64PackedSliceValue returns the size of wire encoding a []int64 value as a packed repeated Sfixed64. -func sizeSfixed64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := llen * protowire.SizeFixed64() - return tagsize + protowire.SizeBytes(n) -} - -// appendSfixed64PackedSliceValue encodes a []int64 value as a packed repeated Sfixed64. -func appendSfixed64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := llen * protowire.SizeFixed64() - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendFixed64(b, uint64(v.Int())) - } - return b, nil -} - -var coderSfixed64PackedSliceValue = valueCoderFuncs{ - size: sizeSfixed64PackedSliceValue, - marshal: appendSfixed64PackedSliceValue, - unmarshal: consumeSfixed64SliceValue, - merge: mergeListValue, -} - -// sizeFixed64 returns the size of wire encoding a uint64 pointer as a Fixed64. -func sizeFixed64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - - return f.tagsize + protowire.SizeFixed64() -} - -// appendFixed64 wire encodes a uint64 pointer as a Fixed64. -func appendFixed64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint64() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, v) - return b, nil -} - -// consumeFixed64 wire decodes a uint64 pointer as a Fixed64. -func consumeFixed64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - *p.Uint64() = v - out.n = n - return out, nil -} - -var coderFixed64 = pointerCoderFuncs{ - size: sizeFixed64, - marshal: appendFixed64, - unmarshal: consumeFixed64, - merge: mergeUint64, -} - -// sizeFixed64NoZero returns the size of wire encoding a uint64 pointer as a Fixed64. -// The zero value is not encoded. -func sizeFixed64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Uint64() - if v == 0 { - return 0 - } - return f.tagsize + protowire.SizeFixed64() -} - -// appendFixed64NoZero wire encodes a uint64 pointer as a Fixed64. -// The zero value is not encoded. -func appendFixed64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Uint64() - if v == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, v) - return b, nil -} - -var coderFixed64NoZero = pointerCoderFuncs{ - size: sizeFixed64NoZero, - marshal: appendFixed64NoZero, - unmarshal: consumeFixed64, - merge: mergeUint64NoZero, -} - -// sizeFixed64Ptr returns the size of wire encoding a *uint64 pointer as a Fixed64. -// It panics if the pointer is nil. -func sizeFixed64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return f.tagsize + protowire.SizeFixed64() -} - -// appendFixed64Ptr wire encodes a *uint64 pointer as a Fixed64. -// It panics if the pointer is nil. -func appendFixed64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Uint64Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, v) - return b, nil -} - -// consumeFixed64Ptr wire decodes a *uint64 pointer as a Fixed64. -func consumeFixed64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - vp := p.Uint64Ptr() - if *vp == nil { - *vp = new(uint64) - } - **vp = v - out.n = n - return out, nil -} - -var coderFixed64Ptr = pointerCoderFuncs{ - size: sizeFixed64Ptr, - marshal: appendFixed64Ptr, - unmarshal: consumeFixed64Ptr, - merge: mergeUint64Ptr, -} - -// sizeFixed64Slice returns the size of wire encoding a []uint64 pointer as a repeated Fixed64. -func sizeFixed64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint64Slice() - size = len(s) * (f.tagsize + protowire.SizeFixed64()) - return size -} - -// appendFixed64Slice encodes a []uint64 pointer as a repeated Fixed64. -func appendFixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint64Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, v) - } - return b, nil -} - -// consumeFixed64Slice wire decodes a []uint64 pointer as a repeated Fixed64. -func consumeFixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Uint64Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := len(b) / protowire.SizeFixed64() - if count > 0 { - p.growUint64Slice(count) - } - s := *sp - for len(b) > 0 { - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - s = append(s, v) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, v) - out.n = n - return out, nil -} - -var coderFixed64Slice = pointerCoderFuncs{ - size: sizeFixed64Slice, - marshal: appendFixed64Slice, - unmarshal: consumeFixed64Slice, - merge: mergeUint64Slice, -} - -// sizeFixed64PackedSlice returns the size of wire encoding a []uint64 pointer as a packed repeated Fixed64. -func sizeFixed64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Uint64Slice() - if len(s) == 0 { - return 0 - } - n := len(s) * protowire.SizeFixed64() - return f.tagsize + protowire.SizeBytes(n) -} - -// appendFixed64PackedSlice encodes a []uint64 pointer as a packed repeated Fixed64. -func appendFixed64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Uint64Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := len(s) * protowire.SizeFixed64() - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendFixed64(b, v) - } - return b, nil -} - -var coderFixed64PackedSlice = pointerCoderFuncs{ - size: sizeFixed64PackedSlice, - marshal: appendFixed64PackedSlice, - unmarshal: consumeFixed64Slice, - merge: mergeUint64Slice, -} - -// sizeFixed64Value returns the size of wire encoding a uint64 value as a Fixed64. -func sizeFixed64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeFixed64() -} - -// appendFixed64Value encodes a uint64 value as a Fixed64. -func appendFixed64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed64(b, v.Uint()) - return b, nil -} - -// consumeFixed64Value decodes a uint64 value as a Fixed64. -func consumeFixed64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfUint64(v), out, nil -} - -var coderFixed64Value = valueCoderFuncs{ - size: sizeFixed64Value, - marshal: appendFixed64Value, - unmarshal: consumeFixed64Value, - merge: mergeScalarValue, -} - -// sizeFixed64SliceValue returns the size of wire encoding a []uint64 value as a repeated Fixed64. -func sizeFixed64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - size = list.Len() * (tagsize + protowire.SizeFixed64()) - return size -} - -// appendFixed64SliceValue encodes a []uint64 value as a repeated Fixed64. -func appendFixed64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed64(b, v.Uint()) - } - return b, nil -} - -// consumeFixed64SliceValue wire decodes a []uint64 value as a repeated Fixed64. -func consumeFixed64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint64(v)) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.Fixed64Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfUint64(v)) - out.n = n - return listv, out, nil -} - -var coderFixed64SliceValue = valueCoderFuncs{ - size: sizeFixed64SliceValue, - marshal: appendFixed64SliceValue, - unmarshal: consumeFixed64SliceValue, - merge: mergeListValue, -} - -// sizeFixed64PackedSliceValue returns the size of wire encoding a []uint64 value as a packed repeated Fixed64. -func sizeFixed64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := llen * protowire.SizeFixed64() - return tagsize + protowire.SizeBytes(n) -} - -// appendFixed64PackedSliceValue encodes a []uint64 value as a packed repeated Fixed64. -func appendFixed64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := llen * protowire.SizeFixed64() - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendFixed64(b, v.Uint()) - } - return b, nil -} - -var coderFixed64PackedSliceValue = valueCoderFuncs{ - size: sizeFixed64PackedSliceValue, - marshal: appendFixed64PackedSliceValue, - unmarshal: consumeFixed64SliceValue, - merge: mergeListValue, -} - -// sizeDouble returns the size of wire encoding a float64 pointer as a Double. -func sizeDouble(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - - return f.tagsize + protowire.SizeFixed64() -} - -// appendDouble wire encodes a float64 pointer as a Double. -func appendDouble(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Float64() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, math.Float64bits(v)) - return b, nil -} - -// consumeDouble wire decodes a float64 pointer as a Double. -func consumeDouble(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - *p.Float64() = math.Float64frombits(v) - out.n = n - return out, nil -} - -var coderDouble = pointerCoderFuncs{ - size: sizeDouble, - marshal: appendDouble, - unmarshal: consumeDouble, - merge: mergeFloat64, -} - -// sizeDoubleNoZero returns the size of wire encoding a float64 pointer as a Double. -// The zero value is not encoded. -func sizeDoubleNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Float64() - if v == 0 && !math.Signbit(float64(v)) { - return 0 - } - return f.tagsize + protowire.SizeFixed64() -} - -// appendDoubleNoZero wire encodes a float64 pointer as a Double. -// The zero value is not encoded. -func appendDoubleNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Float64() - if v == 0 && !math.Signbit(float64(v)) { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, math.Float64bits(v)) - return b, nil -} - -var coderDoubleNoZero = pointerCoderFuncs{ - size: sizeDoubleNoZero, - marshal: appendDoubleNoZero, - unmarshal: consumeDouble, - merge: mergeFloat64NoZero, -} - -// sizeDoublePtr returns the size of wire encoding a *float64 pointer as a Double. -// It panics if the pointer is nil. -func sizeDoublePtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return f.tagsize + protowire.SizeFixed64() -} - -// appendDoublePtr wire encodes a *float64 pointer as a Double. -// It panics if the pointer is nil. -func appendDoublePtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.Float64Ptr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, math.Float64bits(v)) - return b, nil -} - -// consumeDoublePtr wire decodes a *float64 pointer as a Double. -func consumeDoublePtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - vp := p.Float64Ptr() - if *vp == nil { - *vp = new(float64) - } - **vp = math.Float64frombits(v) - out.n = n - return out, nil -} - -var coderDoublePtr = pointerCoderFuncs{ - size: sizeDoublePtr, - marshal: appendDoublePtr, - unmarshal: consumeDoublePtr, - merge: mergeFloat64Ptr, -} - -// sizeDoubleSlice returns the size of wire encoding a []float64 pointer as a repeated Double. -func sizeDoubleSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Float64Slice() - size = len(s) * (f.tagsize + protowire.SizeFixed64()) - return size -} - -// appendDoubleSlice encodes a []float64 pointer as a repeated Double. -func appendDoubleSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Float64Slice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendFixed64(b, math.Float64bits(v)) - } - return b, nil -} - -// consumeDoubleSlice wire decodes a []float64 pointer as a repeated Double. -func consumeDoubleSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.Float64Slice() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - count := len(b) / protowire.SizeFixed64() - if count > 0 { - p.growFloat64Slice(count) - } - s := *sp - for len(b) > 0 { - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - s = append(s, math.Float64frombits(v)) - b = b[n:] - } - *sp = s - out.n = n - return out, nil - } - if wtyp != protowire.Fixed64Type { - return out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, math.Float64frombits(v)) - out.n = n - return out, nil -} - -var coderDoubleSlice = pointerCoderFuncs{ - size: sizeDoubleSlice, - marshal: appendDoubleSlice, - unmarshal: consumeDoubleSlice, - merge: mergeFloat64Slice, -} - -// sizeDoublePackedSlice returns the size of wire encoding a []float64 pointer as a packed repeated Double. -func sizeDoublePackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.Float64Slice() - if len(s) == 0 { - return 0 - } - n := len(s) * protowire.SizeFixed64() - return f.tagsize + protowire.SizeBytes(n) -} - -// appendDoublePackedSlice encodes a []float64 pointer as a packed repeated Double. -func appendDoublePackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.Float64Slice() - if len(s) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := len(s) * protowire.SizeFixed64() - b = protowire.AppendVarint(b, uint64(n)) - for _, v := range s { - b = protowire.AppendFixed64(b, math.Float64bits(v)) - } - return b, nil -} - -var coderDoublePackedSlice = pointerCoderFuncs{ - size: sizeDoublePackedSlice, - marshal: appendDoublePackedSlice, - unmarshal: consumeDoubleSlice, - merge: mergeFloat64Slice, -} - -// sizeDoubleValue returns the size of wire encoding a float64 value as a Double. -func sizeDoubleValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeFixed64() -} - -// appendDoubleValue encodes a float64 value as a Double. -func appendDoubleValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed64(b, math.Float64bits(v.Float())) - return b, nil -} - -// consumeDoubleValue decodes a float64 value as a Double. -func consumeDoubleValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.Fixed64Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfFloat64(math.Float64frombits(v)), out, nil -} - -var coderDoubleValue = valueCoderFuncs{ - size: sizeDoubleValue, - marshal: appendDoubleValue, - unmarshal: consumeDoubleValue, - merge: mergeScalarValue, -} - -// sizeDoubleSliceValue returns the size of wire encoding a []float64 value as a repeated Double. -func sizeDoubleSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - size = list.Len() * (tagsize + protowire.SizeFixed64()) - return size -} - -// appendDoubleSliceValue encodes a []float64 value as a repeated Double. -func appendDoubleSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendFixed64(b, math.Float64bits(v.Float())) - } - return b, nil -} - -// consumeDoubleSliceValue wire decodes a []float64 value as a repeated Double. -func consumeDoubleSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v))) - b = b[n:] - } - out.n = n - return listv, out, nil - } - if wtyp != protowire.Fixed64Type { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v))) - out.n = n - return listv, out, nil -} - -var coderDoubleSliceValue = valueCoderFuncs{ - size: sizeDoubleSliceValue, - marshal: appendDoubleSliceValue, - unmarshal: consumeDoubleSliceValue, - merge: mergeListValue, -} - -// sizeDoublePackedSliceValue returns the size of wire encoding a []float64 value as a packed repeated Double. -func sizeDoublePackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return 0 - } - n := llen * protowire.SizeFixed64() - return tagsize + protowire.SizeBytes(n) -} - -// appendDoublePackedSliceValue encodes a []float64 value as a packed repeated Double. -func appendDoublePackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - llen := list.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, wiretag) - n := llen * protowire.SizeFixed64() - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - v := list.Get(i) - b = protowire.AppendFixed64(b, math.Float64bits(v.Float())) - } - return b, nil -} - -var coderDoublePackedSliceValue = valueCoderFuncs{ - size: sizeDoublePackedSliceValue, - marshal: appendDoublePackedSliceValue, - unmarshal: consumeDoubleSliceValue, - merge: mergeListValue, -} - -// sizeString returns the size of wire encoding a string pointer as a String. -func sizeString(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.String() - return f.tagsize + protowire.SizeBytes(len(v)) -} - -// appendString wire encodes a string pointer as a String. -func appendString(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.String() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - return b, nil -} - -// consumeString wire decodes a string pointer as a String. -func consumeString(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - *p.String() = string(v) - out.n = n - return out, nil -} - -var coderString = pointerCoderFuncs{ - size: sizeString, - marshal: appendString, - unmarshal: consumeString, - merge: mergeString, -} - -// appendStringValidateUTF8 wire encodes a string pointer as a String. -func appendStringValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.String() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - if !utf8.ValidString(v) { - return b, errInvalidUTF8{} - } - return b, nil -} - -// consumeStringValidateUTF8 wire decodes a string pointer as a String. -func consumeStringValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if !utf8.Valid(v) { - return out, errInvalidUTF8{} - } - *p.String() = string(v) - out.n = n - return out, nil -} - -var coderStringValidateUTF8 = pointerCoderFuncs{ - size: sizeString, - marshal: appendStringValidateUTF8, - unmarshal: consumeStringValidateUTF8, - merge: mergeString, -} - -// sizeStringNoZero returns the size of wire encoding a string pointer as a String. -// The zero value is not encoded. -func sizeStringNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.String() - if len(v) == 0 { - return 0 - } - return f.tagsize + protowire.SizeBytes(len(v)) -} - -// appendStringNoZero wire encodes a string pointer as a String. -// The zero value is not encoded. -func appendStringNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.String() - if len(v) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - return b, nil -} - -var coderStringNoZero = pointerCoderFuncs{ - size: sizeStringNoZero, - marshal: appendStringNoZero, - unmarshal: consumeString, - merge: mergeStringNoZero, -} - -// appendStringNoZeroValidateUTF8 wire encodes a string pointer as a String. -// The zero value is not encoded. -func appendStringNoZeroValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.String() - if len(v) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - if !utf8.ValidString(v) { - return b, errInvalidUTF8{} - } - return b, nil -} - -var coderStringNoZeroValidateUTF8 = pointerCoderFuncs{ - size: sizeStringNoZero, - marshal: appendStringNoZeroValidateUTF8, - unmarshal: consumeStringValidateUTF8, - merge: mergeStringNoZero, -} - -// sizeStringPtr returns the size of wire encoding a *string pointer as a String. -// It panics if the pointer is nil. -func sizeStringPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := **p.StringPtr() - return f.tagsize + protowire.SizeBytes(len(v)) -} - -// appendStringPtr wire encodes a *string pointer as a String. -// It panics if the pointer is nil. -func appendStringPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.StringPtr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - return b, nil -} - -// consumeStringPtr wire decodes a *string pointer as a String. -func consumeStringPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - vp := p.StringPtr() - if *vp == nil { - *vp = new(string) - } - **vp = string(v) - out.n = n - return out, nil -} - -var coderStringPtr = pointerCoderFuncs{ - size: sizeStringPtr, - marshal: appendStringPtr, - unmarshal: consumeStringPtr, - merge: mergeStringPtr, -} - -// appendStringPtrValidateUTF8 wire encodes a *string pointer as a String. -// It panics if the pointer is nil. -func appendStringPtrValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := **p.StringPtr() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - if !utf8.ValidString(v) { - return b, errInvalidUTF8{} - } - return b, nil -} - -// consumeStringPtrValidateUTF8 wire decodes a *string pointer as a String. -func consumeStringPtrValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if !utf8.Valid(v) { - return out, errInvalidUTF8{} - } - vp := p.StringPtr() - if *vp == nil { - *vp = new(string) - } - **vp = string(v) - out.n = n - return out, nil -} - -var coderStringPtrValidateUTF8 = pointerCoderFuncs{ - size: sizeStringPtr, - marshal: appendStringPtrValidateUTF8, - unmarshal: consumeStringPtrValidateUTF8, - merge: mergeStringPtr, -} - -// sizeStringSlice returns the size of wire encoding a []string pointer as a repeated String. -func sizeStringSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.StringSlice() - for _, v := range s { - size += f.tagsize + protowire.SizeBytes(len(v)) - } - return size -} - -// appendStringSlice encodes a []string pointer as a repeated String. -func appendStringSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.StringSlice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - } - return b, nil -} - -// consumeStringSlice wire decodes a []string pointer as a repeated String. -func consumeStringSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.StringSlice() - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, string(v)) - out.n = n - return out, nil -} - -var coderStringSlice = pointerCoderFuncs{ - size: sizeStringSlice, - marshal: appendStringSlice, - unmarshal: consumeStringSlice, - merge: mergeStringSlice, -} - -// appendStringSliceValidateUTF8 encodes a []string pointer as a repeated String. -func appendStringSliceValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.StringSlice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendString(b, v) - if !utf8.ValidString(v) { - return b, errInvalidUTF8{} - } - } - return b, nil -} - -// consumeStringSliceValidateUTF8 wire decodes a []string pointer as a repeated String. -func consumeStringSliceValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if !utf8.Valid(v) { - return out, errInvalidUTF8{} - } - sp := p.StringSlice() - *sp = append(*sp, string(v)) - out.n = n - return out, nil -} - -var coderStringSliceValidateUTF8 = pointerCoderFuncs{ - size: sizeStringSlice, - marshal: appendStringSliceValidateUTF8, - unmarshal: consumeStringSliceValidateUTF8, - merge: mergeStringSlice, -} - -// sizeStringValue returns the size of wire encoding a string value as a String. -func sizeStringValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeBytes(len(v.String())) -} - -// appendStringValue encodes a string value as a String. -func appendStringValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendString(b, v.String()) - return b, nil -} - -// consumeStringValue decodes a string value as a String. -func consumeStringValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfString(string(v)), out, nil -} - -var coderStringValue = valueCoderFuncs{ - size: sizeStringValue, - marshal: appendStringValue, - unmarshal: consumeStringValue, - merge: mergeScalarValue, -} - -// appendStringValueValidateUTF8 encodes a string value as a String. -func appendStringValueValidateUTF8(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendString(b, v.String()) - if !utf8.ValidString(v.String()) { - return b, errInvalidUTF8{} - } - return b, nil -} - -// consumeStringValueValidateUTF8 decodes a string value as a String. -func consumeStringValueValidateUTF8(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - if !utf8.Valid(v) { - return protoreflect.Value{}, out, errInvalidUTF8{} - } - out.n = n - return protoreflect.ValueOfString(string(v)), out, nil -} - -var coderStringValueValidateUTF8 = valueCoderFuncs{ - size: sizeStringValue, - marshal: appendStringValueValidateUTF8, - unmarshal: consumeStringValueValidateUTF8, - merge: mergeScalarValue, -} - -// sizeStringSliceValue returns the size of wire encoding a []string value as a repeated String. -func sizeStringSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeBytes(len(v.String())) - } - return size -} - -// appendStringSliceValue encodes a []string value as a repeated String. -func appendStringSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendString(b, v.String()) - } - return b, nil -} - -// consumeStringSliceValue wire decodes a []string value as a repeated String. -func consumeStringSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp != protowire.BytesType { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfString(string(v))) - out.n = n - return listv, out, nil -} - -var coderStringSliceValue = valueCoderFuncs{ - size: sizeStringSliceValue, - marshal: appendStringSliceValue, - unmarshal: consumeStringSliceValue, - merge: mergeListValue, -} - -// sizeBytes returns the size of wire encoding a []byte pointer as a Bytes. -func sizeBytes(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Bytes() - return f.tagsize + protowire.SizeBytes(len(v)) -} - -// appendBytes wire encodes a []byte pointer as a Bytes. -func appendBytes(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Bytes() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendBytes(b, v) - return b, nil -} - -// consumeBytes wire decodes a []byte pointer as a Bytes. -func consumeBytes(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - *p.Bytes() = append(emptyBuf[:], v...) - out.n = n - return out, nil -} - -var coderBytes = pointerCoderFuncs{ - size: sizeBytes, - marshal: appendBytes, - unmarshal: consumeBytes, - merge: mergeBytes, -} - -// appendBytesValidateUTF8 wire encodes a []byte pointer as a Bytes. -func appendBytesValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Bytes() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendBytes(b, v) - if !utf8.Valid(v) { - return b, errInvalidUTF8{} - } - return b, nil -} - -// consumeBytesValidateUTF8 wire decodes a []byte pointer as a Bytes. -func consumeBytesValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if !utf8.Valid(v) { - return out, errInvalidUTF8{} - } - *p.Bytes() = append(emptyBuf[:], v...) - out.n = n - return out, nil -} - -var coderBytesValidateUTF8 = pointerCoderFuncs{ - size: sizeBytes, - marshal: appendBytesValidateUTF8, - unmarshal: consumeBytesValidateUTF8, - merge: mergeBytes, -} - -// sizeBytesNoZero returns the size of wire encoding a []byte pointer as a Bytes. -// The zero value is not encoded. -func sizeBytesNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - v := *p.Bytes() - if len(v) == 0 { - return 0 - } - return f.tagsize + protowire.SizeBytes(len(v)) -} - -// appendBytesNoZero wire encodes a []byte pointer as a Bytes. -// The zero value is not encoded. -func appendBytesNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Bytes() - if len(v) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendBytes(b, v) - return b, nil -} - -// consumeBytesNoZero wire decodes a []byte pointer as a Bytes. -// The zero value is not decoded. -func consumeBytesNoZero(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - *p.Bytes() = append(([]byte)(nil), v...) - out.n = n - return out, nil -} - -var coderBytesNoZero = pointerCoderFuncs{ - size: sizeBytesNoZero, - marshal: appendBytesNoZero, - unmarshal: consumeBytesNoZero, - merge: mergeBytesNoZero, -} - -// appendBytesNoZeroValidateUTF8 wire encodes a []byte pointer as a Bytes. -// The zero value is not encoded. -func appendBytesNoZeroValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := *p.Bytes() - if len(v) == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendBytes(b, v) - if !utf8.Valid(v) { - return b, errInvalidUTF8{} - } - return b, nil -} - -// consumeBytesNoZeroValidateUTF8 wire decodes a []byte pointer as a Bytes. -func consumeBytesNoZeroValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if !utf8.Valid(v) { - return out, errInvalidUTF8{} - } - *p.Bytes() = append(([]byte)(nil), v...) - out.n = n - return out, nil -} - -var coderBytesNoZeroValidateUTF8 = pointerCoderFuncs{ - size: sizeBytesNoZero, - marshal: appendBytesNoZeroValidateUTF8, - unmarshal: consumeBytesNoZeroValidateUTF8, - merge: mergeBytesNoZero, -} - -// sizeBytesSlice returns the size of wire encoding a [][]byte pointer as a repeated Bytes. -func sizeBytesSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := *p.BytesSlice() - for _, v := range s { - size += f.tagsize + protowire.SizeBytes(len(v)) - } - return size -} - -// appendBytesSlice encodes a [][]byte pointer as a repeated Bytes. -func appendBytesSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.BytesSlice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendBytes(b, v) - } - return b, nil -} - -// consumeBytesSlice wire decodes a [][]byte pointer as a repeated Bytes. -func consumeBytesSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - sp := p.BytesSlice() - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - *sp = append(*sp, append(emptyBuf[:], v...)) - out.n = n - return out, nil -} - -var coderBytesSlice = pointerCoderFuncs{ - size: sizeBytesSlice, - marshal: appendBytesSlice, - unmarshal: consumeBytesSlice, - merge: mergeBytesSlice, -} - -// appendBytesSliceValidateUTF8 encodes a [][]byte pointer as a repeated Bytes. -func appendBytesSliceValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := *p.BytesSlice() - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendBytes(b, v) - if !utf8.Valid(v) { - return b, errInvalidUTF8{} - } - } - return b, nil -} - -// consumeBytesSliceValidateUTF8 wire decodes a [][]byte pointer as a repeated Bytes. -func consumeBytesSliceValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - if !utf8.Valid(v) { - return out, errInvalidUTF8{} - } - sp := p.BytesSlice() - *sp = append(*sp, append(emptyBuf[:], v...)) - out.n = n - return out, nil -} - -var coderBytesSliceValidateUTF8 = pointerCoderFuncs{ - size: sizeBytesSlice, - marshal: appendBytesSliceValidateUTF8, - unmarshal: consumeBytesSliceValidateUTF8, - merge: mergeBytesSlice, -} - -// sizeBytesValue returns the size of wire encoding a []byte value as a Bytes. -func sizeBytesValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { - return tagsize + protowire.SizeBytes(len(v.Bytes())) -} - -// appendBytesValue encodes a []byte value as a Bytes. -func appendBytesValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendBytes(b, v.Bytes()) - return b, nil -} - -// consumeBytesValue decodes a []byte value as a Bytes. -func consumeBytesValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - out.n = n - return protoreflect.ValueOfBytes(append(emptyBuf[:], v...)), out, nil -} - -var coderBytesValue = valueCoderFuncs{ - size: sizeBytesValue, - marshal: appendBytesValue, - unmarshal: consumeBytesValue, - merge: mergeBytesValue, -} - -// sizeBytesSliceValue returns the size of wire encoding a [][]byte value as a repeated Bytes. -func sizeBytesSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - size += tagsize + protowire.SizeBytes(len(v.Bytes())) - } - return size -} - -// appendBytesSliceValue encodes a [][]byte value as a repeated Bytes. -func appendBytesSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { - list := listv.List() - for i, llen := 0, list.Len(); i < llen; i++ { - v := list.Get(i) - b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendBytes(b, v.Bytes()) - } - return b, nil -} - -// consumeBytesSliceValue wire decodes a [][]byte value as a repeated Bytes. -func consumeBytesSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { - list := listv.List() - if wtyp != protowire.BytesType { - return protoreflect.Value{}, out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return protoreflect.Value{}, out, errDecode - } - list.Append(protoreflect.ValueOfBytes(append(emptyBuf[:], v...))) - out.n = n - return listv, out, nil -} - -var coderBytesSliceValue = valueCoderFuncs{ - size: sizeBytesSliceValue, - marshal: appendBytesSliceValue, - unmarshal: consumeBytesSliceValue, - merge: mergeBytesListValue, -} - -// We append to an empty array rather than a nil []byte to get non-nil zero-length byte slices. -var emptyBuf [0]byte - -var wireTypes = map[protoreflect.Kind]protowire.Type{ - protoreflect.BoolKind: protowire.VarintType, - protoreflect.EnumKind: protowire.VarintType, - protoreflect.Int32Kind: protowire.VarintType, - protoreflect.Sint32Kind: protowire.VarintType, - protoreflect.Uint32Kind: protowire.VarintType, - protoreflect.Int64Kind: protowire.VarintType, - protoreflect.Sint64Kind: protowire.VarintType, - protoreflect.Uint64Kind: protowire.VarintType, - protoreflect.Sfixed32Kind: protowire.Fixed32Type, - protoreflect.Fixed32Kind: protowire.Fixed32Type, - protoreflect.FloatKind: protowire.Fixed32Type, - protoreflect.Sfixed64Kind: protowire.Fixed64Type, - protoreflect.Fixed64Kind: protowire.Fixed64Type, - protoreflect.DoubleKind: protowire.Fixed64Type, - protoreflect.StringKind: protowire.BytesType, - protoreflect.BytesKind: protowire.BytesType, - protoreflect.MessageKind: protowire.BytesType, - protoreflect.GroupKind: protowire.StartGroupType, -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go deleted file mode 100644 index 111b9d16..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ /dev/null @@ -1,388 +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 impl - -import ( - "reflect" - "sort" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type mapInfo struct { - goType reflect.Type - keyWiretag uint64 - valWiretag uint64 - keyFuncs valueCoderFuncs - valFuncs valueCoderFuncs - keyZero protoreflect.Value - keyKind protoreflect.Kind - conv *mapConverter -} - -func encoderFuncsForMap(fd protoreflect.FieldDescriptor, ft reflect.Type) (valueMessage *MessageInfo, funcs pointerCoderFuncs) { - // TODO: Consider generating specialized map coders. - keyField := fd.MapKey() - valField := fd.MapValue() - keyWiretag := protowire.EncodeTag(1, wireTypes[keyField.Kind()]) - valWiretag := protowire.EncodeTag(2, wireTypes[valField.Kind()]) - keyFuncs := encoderFuncsForValue(keyField) - valFuncs := encoderFuncsForValue(valField) - conv := newMapConverter(ft, fd) - - mapi := &mapInfo{ - goType: ft, - keyWiretag: keyWiretag, - valWiretag: valWiretag, - keyFuncs: keyFuncs, - valFuncs: valFuncs, - keyZero: keyField.Default(), - keyKind: keyField.Kind(), - conv: conv, - } - if valField.Kind() == protoreflect.MessageKind { - valueMessage = getMessageInfo(ft.Elem()) - } - - funcs = pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - return sizeMap(p.AsValueOf(ft).Elem(), mapi, f, opts) - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - return appendMap(b, p.AsValueOf(ft).Elem(), mapi, f, opts) - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - mp := p.AsValueOf(ft) - if mp.Elem().IsNil() { - mp.Elem().Set(reflect.MakeMap(mapi.goType)) - } - if f.mi == nil { - return consumeMap(b, mp.Elem(), wtyp, mapi, f, opts) - } else { - return consumeMapOfMessage(b, mp.Elem(), wtyp, mapi, f, opts) - } - }, - } - switch valField.Kind() { - case protoreflect.MessageKind: - funcs.merge = mergeMapOfMessage - case protoreflect.BytesKind: - funcs.merge = mergeMapOfBytes - default: - funcs.merge = mergeMap - } - if valFuncs.isInit != nil { - funcs.isInit = func(p pointer, f *coderFieldInfo) error { - return isInitMap(p.AsValueOf(ft).Elem(), mapi, f) - } - } - return valueMessage, funcs -} - -const ( - mapKeyTagSize = 1 // field 1, tag size 1. - mapValTagSize = 1 // field 2, tag size 2. -) - -func sizeMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) int { - if mapv.Len() == 0 { - return 0 - } - n := 0 - iter := mapRange(mapv) - for iter.Next() { - key := mapi.conv.keyConv.PBValueOf(iter.Key()).MapKey() - keySize := mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) - var valSize int - value := mapi.conv.valConv.PBValueOf(iter.Value()) - if f.mi == nil { - valSize = mapi.valFuncs.size(value, mapValTagSize, opts) - } else { - p := pointerOfValue(iter.Value()) - valSize += mapValTagSize - valSize += protowire.SizeBytes(f.mi.sizePointer(p, opts)) - } - n += f.tagsize + protowire.SizeBytes(keySize+valSize) - } - return n -} - -func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - var ( - key = mapi.keyZero - val = mapi.conv.valConv.New() - ) - for len(b) > 0 { - num, wtyp, n := protowire.ConsumeTag(b) - if n < 0 { - return out, errDecode - } - if num > protowire.MaxValidNumber { - return out, errDecode - } - b = b[n:] - err := errUnknown - switch num { - case genid.MapEntry_Key_field_number: - var v protoreflect.Value - var o unmarshalOutput - v, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts) - if err != nil { - break - } - key = v - n = o.n - case genid.MapEntry_Value_field_number: - var v protoreflect.Value - var o unmarshalOutput - v, o, err = mapi.valFuncs.unmarshal(b, val, num, wtyp, opts) - if err != nil { - break - } - val = v - n = o.n - } - if err == errUnknown { - n = protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return out, errDecode - } - } else if err != nil { - return out, err - } - b = b[n:] - } - mapv.SetMapIndex(mapi.conv.keyConv.GoValueOf(key), mapi.conv.valConv.GoValueOf(val)) - out.n = n - return out, nil -} - -func consumeMapOfMessage(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - var ( - key = mapi.keyZero - val = reflect.New(f.mi.GoReflectType.Elem()) - ) - for len(b) > 0 { - num, wtyp, n := protowire.ConsumeTag(b) - if n < 0 { - return out, errDecode - } - if num > protowire.MaxValidNumber { - return out, errDecode - } - b = b[n:] - err := errUnknown - switch num { - case 1: - var v protoreflect.Value - var o unmarshalOutput - v, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts) - if err != nil { - break - } - key = v - n = o.n - case 2: - if wtyp != protowire.BytesType { - break - } - var v []byte - v, n = protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - var o unmarshalOutput - o, err = f.mi.unmarshalPointer(v, pointerOfValue(val), 0, opts) - if o.initialized { - // Consider this map item initialized so long as we see - // an initialized value. - out.initialized = true - } - } - if err == errUnknown { - n = protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return out, errDecode - } - } else if err != nil { - return out, err - } - b = b[n:] - } - mapv.SetMapIndex(mapi.conv.keyConv.GoValueOf(key), val) - out.n = n - return out, nil -} - -func appendMapItem(b []byte, keyrv, valrv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - if f.mi == nil { - key := mapi.conv.keyConv.PBValueOf(keyrv).MapKey() - val := mapi.conv.valConv.PBValueOf(valrv) - size := 0 - size += mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) - size += mapi.valFuncs.size(val, mapValTagSize, opts) - b = protowire.AppendVarint(b, uint64(size)) - b, err := mapi.keyFuncs.marshal(b, key.Value(), mapi.keyWiretag, opts) - if err != nil { - return nil, err - } - return mapi.valFuncs.marshal(b, val, mapi.valWiretag, opts) - } else { - key := mapi.conv.keyConv.PBValueOf(keyrv).MapKey() - val := pointerOfValue(valrv) - valSize := f.mi.sizePointer(val, opts) - size := 0 - size += mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) - size += mapValTagSize + protowire.SizeBytes(valSize) - b = protowire.AppendVarint(b, uint64(size)) - b, err := mapi.keyFuncs.marshal(b, key.Value(), mapi.keyWiretag, opts) - if err != nil { - return nil, err - } - b = protowire.AppendVarint(b, mapi.valWiretag) - b = protowire.AppendVarint(b, uint64(valSize)) - return f.mi.marshalAppendPointer(b, val, opts) - } -} - -func appendMap(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - if mapv.Len() == 0 { - return b, nil - } - if opts.Deterministic() { - return appendMapDeterministic(b, mapv, mapi, f, opts) - } - iter := mapRange(mapv) - for iter.Next() { - var err error - b = protowire.AppendVarint(b, f.wiretag) - b, err = appendMapItem(b, iter.Key(), iter.Value(), mapi, f, opts) - if err != nil { - return b, err - } - } - return b, nil -} - -func appendMapDeterministic(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - keys := mapv.MapKeys() - sort.Slice(keys, func(i, j int) bool { - switch keys[i].Kind() { - case reflect.Bool: - return !keys[i].Bool() && keys[j].Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return keys[i].Int() < keys[j].Int() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return keys[i].Uint() < keys[j].Uint() - case reflect.Float32, reflect.Float64: - return keys[i].Float() < keys[j].Float() - case reflect.String: - return keys[i].String() < keys[j].String() - default: - panic("invalid kind: " + keys[i].Kind().String()) - } - }) - for _, key := range keys { - var err error - b = protowire.AppendVarint(b, f.wiretag) - b, err = appendMapItem(b, key, mapv.MapIndex(key), mapi, f, opts) - if err != nil { - return b, err - } - } - return b, nil -} - -func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { - if mi := f.mi; mi != nil { - mi.init() - if !mi.needsInitCheck { - return nil - } - iter := mapRange(mapv) - for iter.Next() { - val := pointerOfValue(iter.Value()) - if err := mi.checkInitializedPointer(val); err != nil { - return err - } - } - } else { - iter := mapRange(mapv) - for iter.Next() { - val := mapi.conv.valConv.PBValueOf(iter.Value()) - if err := mapi.valFuncs.isInit(val); err != nil { - return err - } - } - } - return nil -} - -func mergeMap(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - dstm := dst.AsValueOf(f.ft).Elem() - srcm := src.AsValueOf(f.ft).Elem() - if srcm.Len() == 0 { - return - } - if dstm.IsNil() { - dstm.Set(reflect.MakeMap(f.ft)) - } - iter := mapRange(srcm) - for iter.Next() { - dstm.SetMapIndex(iter.Key(), iter.Value()) - } -} - -func mergeMapOfBytes(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - dstm := dst.AsValueOf(f.ft).Elem() - srcm := src.AsValueOf(f.ft).Elem() - if srcm.Len() == 0 { - return - } - if dstm.IsNil() { - dstm.Set(reflect.MakeMap(f.ft)) - } - iter := mapRange(srcm) - for iter.Next() { - dstm.SetMapIndex(iter.Key(), reflect.ValueOf(append(emptyBuf[:], iter.Value().Bytes()...))) - } -} - -func mergeMapOfMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - dstm := dst.AsValueOf(f.ft).Elem() - srcm := src.AsValueOf(f.ft).Elem() - if srcm.Len() == 0 { - return - } - if dstm.IsNil() { - dstm.Set(reflect.MakeMap(f.ft)) - } - iter := mapRange(srcm) - for iter.Next() { - val := reflect.New(f.ft.Elem().Elem()) - if f.mi != nil { - f.mi.mergePointer(pointerOfValue(val), pointerOfValue(iter.Value()), opts) - } else { - opts.Merge(asMessage(val), asMessage(iter.Value())) - } - dstm.SetMapIndex(iter.Key(), val) - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go deleted file mode 100644 index 4b15493f..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +++ /dev/null @@ -1,38 +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. - -//go:build !go1.12 -// +build !go1.12 - -package impl - -import "reflect" - -type mapIter struct { - v reflect.Value - keys []reflect.Value -} - -// mapRange provides a less-efficient equivalent to -// the Go 1.12 reflect.Value.MapRange method. -func mapRange(v reflect.Value) *mapIter { - return &mapIter{v: v} -} - -func (i *mapIter) Next() bool { - if i.keys == nil { - i.keys = i.v.MapKeys() - } else { - i.keys = i.keys[1:] - } - return len(i.keys) > 0 -} - -func (i *mapIter) Key() reflect.Value { - return i.keys[0] -} - -func (i *mapIter) Value() reflect.Value { - return i.v.MapIndex(i.keys[0]) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go deleted file mode 100644 index 0b31b66e..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +++ /dev/null @@ -1,12 +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. - -//go:build go1.12 -// +build go1.12 - -package impl - -import "reflect" - -func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go deleted file mode 100644 index 6b2fdbb7..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +++ /dev/null @@ -1,217 +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 impl - -import ( - "fmt" - "reflect" - "sort" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/order" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// coderMessageInfo contains per-message information used by the fast-path functions. -// This is a different type from MessageInfo to keep MessageInfo as general-purpose as -// possible. -type coderMessageInfo struct { - methods protoiface.Methods - - orderedCoderFields []*coderFieldInfo - denseCoderFields []*coderFieldInfo - coderFields map[protowire.Number]*coderFieldInfo - sizecacheOffset offset - unknownOffset offset - unknownPtrKind bool - extensionOffset offset - needsInitCheck bool - isMessageSet bool - numRequiredFields uint8 -} - -type coderFieldInfo struct { - funcs pointerCoderFuncs // fast-path per-field functions - mi *MessageInfo // field's message - ft reflect.Type - validation validationInfo // information used by message validation - num protoreflect.FieldNumber // field number - offset offset // struct field offset - wiretag uint64 // field tag (number + wire type) - tagsize int // size of the varint-encoded tag - isPointer bool // true if IsNil may be called on the struct field - isRequired bool // true if field is required -} - -func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { - mi.sizecacheOffset = invalidOffset - mi.unknownOffset = invalidOffset - mi.extensionOffset = invalidOffset - - if si.sizecacheOffset.IsValid() && si.sizecacheType == sizecacheType { - mi.sizecacheOffset = si.sizecacheOffset - } - if si.unknownOffset.IsValid() && (si.unknownType == unknownFieldsAType || si.unknownType == unknownFieldsBType) { - mi.unknownOffset = si.unknownOffset - mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr - } - if si.extensionOffset.IsValid() && si.extensionType == extensionFieldsType { - mi.extensionOffset = si.extensionOffset - } - - mi.coderFields = make(map[protowire.Number]*coderFieldInfo) - fields := mi.Desc.Fields() - preallocFields := make([]coderFieldInfo, fields.Len()) - for i := 0; i < fields.Len(); i++ { - fd := fields.Get(i) - - fs := si.fieldsByNumber[fd.Number()] - isOneof := fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() - if isOneof { - fs = si.oneofsByName[fd.ContainingOneof().Name()] - } - ft := fs.Type - var wiretag uint64 - if !fd.IsPacked() { - wiretag = protowire.EncodeTag(fd.Number(), wireTypes[fd.Kind()]) - } else { - wiretag = protowire.EncodeTag(fd.Number(), protowire.BytesType) - } - var fieldOffset offset - var funcs pointerCoderFuncs - var childMessage *MessageInfo - switch { - case ft == nil: - // This never occurs for generated message types. - // It implies that a hand-crafted type has missing Go fields - // for specific protobuf message fields. - funcs = pointerCoderFuncs{ - size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { - return 0 - }, - marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - return nil, nil - }, - unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { - panic("missing Go struct field for " + string(fd.FullName())) - }, - isInit: func(p pointer, f *coderFieldInfo) error { - panic("missing Go struct field for " + string(fd.FullName())) - }, - merge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - panic("missing Go struct field for " + string(fd.FullName())) - }, - } - case isOneof: - fieldOffset = offsetOf(fs, mi.Exporter) - case fd.IsWeak(): - fieldOffset = si.weakOffset - funcs = makeWeakMessageFieldCoder(fd) - default: - fieldOffset = offsetOf(fs, mi.Exporter) - childMessage, funcs = fieldCoder(fd, ft) - } - cf := &preallocFields[i] - *cf = coderFieldInfo{ - num: fd.Number(), - offset: fieldOffset, - wiretag: wiretag, - ft: ft, - tagsize: protowire.SizeVarint(wiretag), - funcs: funcs, - mi: childMessage, - validation: newFieldValidationInfo(mi, si, fd, ft), - isPointer: fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(), - isRequired: fd.Cardinality() == protoreflect.Required, - } - mi.orderedCoderFields = append(mi.orderedCoderFields, cf) - mi.coderFields[cf.num] = cf - } - for i, oneofs := 0, mi.Desc.Oneofs(); i < oneofs.Len(); i++ { - if od := oneofs.Get(i); !od.IsSynthetic() { - mi.initOneofFieldCoders(od, si) - } - } - if messageset.IsMessageSet(mi.Desc) { - if !mi.extensionOffset.IsValid() { - panic(fmt.Sprintf("%v: MessageSet with no extensions field", mi.Desc.FullName())) - } - if !mi.unknownOffset.IsValid() { - panic(fmt.Sprintf("%v: MessageSet with no unknown field", mi.Desc.FullName())) - } - mi.isMessageSet = true - } - sort.Slice(mi.orderedCoderFields, func(i, j int) bool { - return mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num - }) - - var maxDense protoreflect.FieldNumber - for _, cf := range mi.orderedCoderFields { - if cf.num >= 16 && cf.num >= 2*maxDense { - break - } - maxDense = cf.num - } - mi.denseCoderFields = make([]*coderFieldInfo, maxDense+1) - for _, cf := range mi.orderedCoderFields { - if int(cf.num) >= len(mi.denseCoderFields) { - break - } - mi.denseCoderFields[cf.num] = cf - } - - // To preserve compatibility with historic wire output, marshal oneofs last. - if mi.Desc.Oneofs().Len() > 0 { - sort.Slice(mi.orderedCoderFields, func(i, j int) bool { - fi := fields.ByNumber(mi.orderedCoderFields[i].num) - fj := fields.ByNumber(mi.orderedCoderFields[j].num) - return order.LegacyFieldOrder(fi, fj) - }) - } - - mi.needsInitCheck = needsInitCheck(mi.Desc) - if mi.methods.Marshal == nil && mi.methods.Size == nil { - mi.methods.Flags |= protoiface.SupportMarshalDeterministic - mi.methods.Marshal = mi.marshal - mi.methods.Size = mi.size - } - if mi.methods.Unmarshal == nil { - mi.methods.Flags |= protoiface.SupportUnmarshalDiscardUnknown - mi.methods.Unmarshal = mi.unmarshal - } - if mi.methods.CheckInitialized == nil { - mi.methods.CheckInitialized = mi.checkInitialized - } - if mi.methods.Merge == nil { - mi.methods.Merge = mi.merge - } -} - -// getUnknownBytes returns a *[]byte for the unknown fields. -// It is the caller's responsibility to check whether the pointer is nil. -// This function is specially designed to be inlineable. -func (mi *MessageInfo) getUnknownBytes(p pointer) *[]byte { - if mi.unknownPtrKind { - return *p.Apply(mi.unknownOffset).BytesPtr() - } else { - return p.Apply(mi.unknownOffset).Bytes() - } -} - -// mutableUnknownBytes returns a *[]byte for the unknown fields. -// The returned pointer is guaranteed to not be nil. -func (mi *MessageInfo) mutableUnknownBytes(p pointer) *[]byte { - if mi.unknownPtrKind { - bp := p.Apply(mi.unknownOffset).BytesPtr() - if *bp == nil { - *bp = new([]byte) - } - return *bp - } else { - return p.Apply(mi.unknownOffset).Bytes() - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go deleted file mode 100644 index b7a23faf..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +++ /dev/null @@ -1,123 +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 impl - -import ( - "sort" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" -) - -func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int) { - if !flags.ProtoLegacy { - return 0 - } - - ext := *p.Apply(mi.extensionOffset).Extensions() - for _, x := range ext { - xi := getExtensionFieldInfo(x.Type()) - if xi.funcs.size == nil { - continue - } - num, _ := protowire.DecodeTag(xi.wiretag) - size += messageset.SizeField(num) - size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts) - } - - if u := mi.getUnknownBytes(p); u != nil { - size += messageset.SizeUnknown(*u) - } - - return size -} - -func marshalMessageSet(mi *MessageInfo, b []byte, p pointer, opts marshalOptions) ([]byte, error) { - if !flags.ProtoLegacy { - return b, errors.New("no support for message_set_wire_format") - } - - ext := *p.Apply(mi.extensionOffset).Extensions() - switch len(ext) { - case 0: - case 1: - // Fast-path for one extension: Don't bother sorting the keys. - for _, x := range ext { - var err error - b, err = marshalMessageSetField(mi, b, x, opts) - if err != nil { - return b, err - } - } - default: - // Sort the keys to provide a deterministic encoding. - // Not sure this is required, but the old code does it. - keys := make([]int, 0, len(ext)) - for k := range ext { - keys = append(keys, int(k)) - } - sort.Ints(keys) - for _, k := range keys { - var err error - b, err = marshalMessageSetField(mi, b, ext[int32(k)], opts) - if err != nil { - return b, err - } - } - } - - if u := mi.getUnknownBytes(p); u != nil { - var err error - b, err = messageset.AppendUnknown(b, *u) - if err != nil { - return b, err - } - } - - return b, nil -} - -func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts marshalOptions) ([]byte, error) { - xi := getExtensionFieldInfo(x.Type()) - num, _ := protowire.DecodeTag(xi.wiretag) - b = messageset.AppendFieldStart(b, num) - b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts) - if err != nil { - return b, err - } - b = messageset.AppendFieldEnd(b) - return b, nil -} - -func unmarshalMessageSet(mi *MessageInfo, b []byte, p pointer, opts unmarshalOptions) (out unmarshalOutput, err error) { - if !flags.ProtoLegacy { - return out, errors.New("no support for message_set_wire_format") - } - - ep := p.Apply(mi.extensionOffset).Extensions() - if *ep == nil { - *ep = make(map[int32]ExtensionField) - } - ext := *ep - initialized := true - err = messageset.Unmarshal(b, true, func(num protowire.Number, v []byte) error { - o, err := mi.unmarshalExtension(v, num, protowire.BytesType, ext, opts) - if err == errUnknown { - u := mi.mutableUnknownBytes(p) - *u = protowire.AppendTag(*u, num, protowire.BytesType) - *u = append(*u, v...) - return nil - } - if !o.initialized { - initialized = false - } - return err - }) - out.n = len(b) - out.initialized = initialized - return out, err -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go deleted file mode 100644 index 145c577b..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +++ /dev/null @@ -1,210 +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. - -//go:build purego || appengine -// +build purego appengine - -package impl - -import ( - "reflect" - - "google.golang.org/protobuf/encoding/protowire" -) - -func sizeEnum(p pointer, f *coderFieldInfo, _ marshalOptions) (size int) { - v := p.v.Elem().Int() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -func appendEnum(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := p.v.Elem().Int() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -func consumeEnum(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, _ unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - p.v.Elem().SetInt(int64(v)) - out.n = n - return out, nil -} - -func mergeEnum(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - dst.v.Elem().Set(src.v.Elem()) -} - -var coderEnum = pointerCoderFuncs{ - size: sizeEnum, - marshal: appendEnum, - unmarshal: consumeEnum, - merge: mergeEnum, -} - -func sizeEnumNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - if p.v.Elem().Int() == 0 { - return 0 - } - return sizeEnum(p, f, opts) -} - -func appendEnumNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - if p.v.Elem().Int() == 0 { - return b, nil - } - return appendEnum(b, p, f, opts) -} - -func mergeEnumNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - if src.v.Elem().Int() != 0 { - dst.v.Elem().Set(src.v.Elem()) - } -} - -var coderEnumNoZero = pointerCoderFuncs{ - size: sizeEnumNoZero, - marshal: appendEnumNoZero, - unmarshal: consumeEnum, - merge: mergeEnumNoZero, -} - -func sizeEnumPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return sizeEnum(pointer{p.v.Elem()}, f, opts) -} - -func appendEnumPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - return appendEnum(b, pointer{p.v.Elem()}, f, opts) -} - -func consumeEnumPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - if p.v.Elem().IsNil() { - p.v.Elem().Set(reflect.New(p.v.Elem().Type().Elem())) - } - return consumeEnum(b, pointer{p.v.Elem()}, wtyp, f, opts) -} - -func mergeEnumPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - if !src.v.Elem().IsNil() { - v := reflect.New(dst.v.Type().Elem().Elem()) - v.Elem().Set(src.v.Elem().Elem()) - dst.v.Elem().Set(v) - } -} - -var coderEnumPtr = pointerCoderFuncs{ - size: sizeEnumPtr, - marshal: appendEnumPtr, - unmarshal: consumeEnumPtr, - merge: mergeEnumPtr, -} - -func sizeEnumSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := p.v.Elem() - for i, llen := 0, s.Len(); i < llen; i++ { - size += protowire.SizeVarint(uint64(s.Index(i).Int())) + f.tagsize - } - return size -} - -func appendEnumSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.v.Elem() - for i, llen := 0, s.Len(); i < llen; i++ { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(s.Index(i).Int())) - } - return b, nil -} - -func consumeEnumSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - s := p.v.Elem() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - rv := reflect.New(s.Type().Elem()).Elem() - rv.SetInt(int64(v)) - s.Set(reflect.Append(s, rv)) - b = b[n:] - } - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - rv := reflect.New(s.Type().Elem()).Elem() - rv.SetInt(int64(v)) - s.Set(reflect.Append(s, rv)) - out.n = n - return out, nil -} - -func mergeEnumSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - dst.v.Elem().Set(reflect.AppendSlice(dst.v.Elem(), src.v.Elem())) -} - -var coderEnumSlice = pointerCoderFuncs{ - size: sizeEnumSlice, - marshal: appendEnumSlice, - unmarshal: consumeEnumSlice, - merge: mergeEnumSlice, -} - -func sizeEnumPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := p.v.Elem() - llen := s.Len() - if llen == 0 { - return 0 - } - n := 0 - for i := 0; i < llen; i++ { - n += protowire.SizeVarint(uint64(s.Index(i).Int())) - } - return f.tagsize + protowire.SizeBytes(n) -} - -func appendEnumPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.v.Elem() - llen := s.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for i := 0; i < llen; i++ { - n += protowire.SizeVarint(uint64(s.Index(i).Int())) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - b = protowire.AppendVarint(b, uint64(s.Index(i).Int())) - } - return b, nil -} - -var coderEnumPackedSlice = pointerCoderFuncs{ - size: sizeEnumPackedSlice, - marshal: appendEnumPackedSlice, - unmarshal: consumeEnumSlice, - merge: mergeEnumSlice, -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go deleted file mode 100644 index 576dcf3a..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go +++ /dev/null @@ -1,557 +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 impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// pointerCoderFuncs is a set of pointer encoding functions. -type pointerCoderFuncs struct { - mi *MessageInfo - size func(p pointer, f *coderFieldInfo, opts marshalOptions) int - marshal func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) - unmarshal func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) - isInit func(p pointer, f *coderFieldInfo) error - merge func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) -} - -// valueCoderFuncs is a set of protoreflect.Value encoding functions. -type valueCoderFuncs struct { - size func(v protoreflect.Value, tagsize int, opts marshalOptions) int - marshal func(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) - unmarshal func(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) - isInit func(v protoreflect.Value) error - merge func(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value -} - -// fieldCoder returns pointer functions for a field, used for operating on -// struct fields. -func fieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { - switch { - case fd.IsMap(): - return encoderFuncsForMap(fd, ft) - case fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked(): - // Repeated fields (not packed). - if ft.Kind() != reflect.Slice { - break - } - ft := ft.Elem() - switch fd.Kind() { - case protoreflect.BoolKind: - if ft.Kind() == reflect.Bool { - return nil, coderBoolSlice - } - case protoreflect.EnumKind: - if ft.Kind() == reflect.Int32 { - return nil, coderEnumSlice - } - case protoreflect.Int32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderInt32Slice - } - case protoreflect.Sint32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSint32Slice - } - case protoreflect.Uint32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderUint32Slice - } - case protoreflect.Int64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderInt64Slice - } - case protoreflect.Sint64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSint64Slice - } - case protoreflect.Uint64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderUint64Slice - } - case protoreflect.Sfixed32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSfixed32Slice - } - case protoreflect.Fixed32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderFixed32Slice - } - case protoreflect.FloatKind: - if ft.Kind() == reflect.Float32 { - return nil, coderFloatSlice - } - case protoreflect.Sfixed64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSfixed64Slice - } - case protoreflect.Fixed64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderFixed64Slice - } - case protoreflect.DoubleKind: - if ft.Kind() == reflect.Float64 { - return nil, coderDoubleSlice - } - case protoreflect.StringKind: - if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { - return nil, coderStringSliceValidateUTF8 - } - if ft.Kind() == reflect.String { - return nil, coderStringSlice - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) { - return nil, coderBytesSliceValidateUTF8 - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { - return nil, coderBytesSlice - } - case protoreflect.BytesKind: - if ft.Kind() == reflect.String { - return nil, coderStringSlice - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { - return nil, coderBytesSlice - } - case protoreflect.MessageKind: - return getMessageInfo(ft), makeMessageSliceFieldCoder(fd, ft) - case protoreflect.GroupKind: - return getMessageInfo(ft), makeGroupSliceFieldCoder(fd, ft) - } - case fd.Cardinality() == protoreflect.Repeated && fd.IsPacked(): - // Packed repeated fields. - // - // Only repeated fields of primitive numeric types - // (Varint, Fixed32, or Fixed64 wire type) can be packed. - if ft.Kind() != reflect.Slice { - break - } - ft := ft.Elem() - switch fd.Kind() { - case protoreflect.BoolKind: - if ft.Kind() == reflect.Bool { - return nil, coderBoolPackedSlice - } - case protoreflect.EnumKind: - if ft.Kind() == reflect.Int32 { - return nil, coderEnumPackedSlice - } - case protoreflect.Int32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderInt32PackedSlice - } - case protoreflect.Sint32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSint32PackedSlice - } - case protoreflect.Uint32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderUint32PackedSlice - } - case protoreflect.Int64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderInt64PackedSlice - } - case protoreflect.Sint64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSint64PackedSlice - } - case protoreflect.Uint64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderUint64PackedSlice - } - case protoreflect.Sfixed32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSfixed32PackedSlice - } - case protoreflect.Fixed32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderFixed32PackedSlice - } - case protoreflect.FloatKind: - if ft.Kind() == reflect.Float32 { - return nil, coderFloatPackedSlice - } - case protoreflect.Sfixed64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSfixed64PackedSlice - } - case protoreflect.Fixed64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderFixed64PackedSlice - } - case protoreflect.DoubleKind: - if ft.Kind() == reflect.Float64 { - return nil, coderDoublePackedSlice - } - } - case fd.Kind() == protoreflect.MessageKind: - return getMessageInfo(ft), makeMessageFieldCoder(fd, ft) - case fd.Kind() == protoreflect.GroupKind: - return getMessageInfo(ft), makeGroupFieldCoder(fd, ft) - case fd.Syntax() == protoreflect.Proto3 && fd.ContainingOneof() == nil: - // Populated oneof fields always encode even if set to the zero value, - // which normally are not encoded in proto3. - switch fd.Kind() { - case protoreflect.BoolKind: - if ft.Kind() == reflect.Bool { - return nil, coderBoolNoZero - } - case protoreflect.EnumKind: - if ft.Kind() == reflect.Int32 { - return nil, coderEnumNoZero - } - case protoreflect.Int32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderInt32NoZero - } - case protoreflect.Sint32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSint32NoZero - } - case protoreflect.Uint32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderUint32NoZero - } - case protoreflect.Int64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderInt64NoZero - } - case protoreflect.Sint64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSint64NoZero - } - case protoreflect.Uint64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderUint64NoZero - } - case protoreflect.Sfixed32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSfixed32NoZero - } - case protoreflect.Fixed32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderFixed32NoZero - } - case protoreflect.FloatKind: - if ft.Kind() == reflect.Float32 { - return nil, coderFloatNoZero - } - case protoreflect.Sfixed64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSfixed64NoZero - } - case protoreflect.Fixed64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderFixed64NoZero - } - case protoreflect.DoubleKind: - if ft.Kind() == reflect.Float64 { - return nil, coderDoubleNoZero - } - case protoreflect.StringKind: - if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { - return nil, coderStringNoZeroValidateUTF8 - } - if ft.Kind() == reflect.String { - return nil, coderStringNoZero - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) { - return nil, coderBytesNoZeroValidateUTF8 - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { - return nil, coderBytesNoZero - } - case protoreflect.BytesKind: - if ft.Kind() == reflect.String { - return nil, coderStringNoZero - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { - return nil, coderBytesNoZero - } - } - case ft.Kind() == reflect.Ptr: - ft := ft.Elem() - switch fd.Kind() { - case protoreflect.BoolKind: - if ft.Kind() == reflect.Bool { - return nil, coderBoolPtr - } - case protoreflect.EnumKind: - if ft.Kind() == reflect.Int32 { - return nil, coderEnumPtr - } - case protoreflect.Int32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderInt32Ptr - } - case protoreflect.Sint32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSint32Ptr - } - case protoreflect.Uint32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderUint32Ptr - } - case protoreflect.Int64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderInt64Ptr - } - case protoreflect.Sint64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSint64Ptr - } - case protoreflect.Uint64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderUint64Ptr - } - case protoreflect.Sfixed32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSfixed32Ptr - } - case protoreflect.Fixed32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderFixed32Ptr - } - case protoreflect.FloatKind: - if ft.Kind() == reflect.Float32 { - return nil, coderFloatPtr - } - case protoreflect.Sfixed64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSfixed64Ptr - } - case protoreflect.Fixed64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderFixed64Ptr - } - case protoreflect.DoubleKind: - if ft.Kind() == reflect.Float64 { - return nil, coderDoublePtr - } - case protoreflect.StringKind: - if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { - return nil, coderStringPtrValidateUTF8 - } - if ft.Kind() == reflect.String { - return nil, coderStringPtr - } - case protoreflect.BytesKind: - if ft.Kind() == reflect.String { - return nil, coderStringPtr - } - } - default: - switch fd.Kind() { - case protoreflect.BoolKind: - if ft.Kind() == reflect.Bool { - return nil, coderBool - } - case protoreflect.EnumKind: - if ft.Kind() == reflect.Int32 { - return nil, coderEnum - } - case protoreflect.Int32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderInt32 - } - case protoreflect.Sint32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSint32 - } - case protoreflect.Uint32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderUint32 - } - case protoreflect.Int64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderInt64 - } - case protoreflect.Sint64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSint64 - } - case protoreflect.Uint64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderUint64 - } - case protoreflect.Sfixed32Kind: - if ft.Kind() == reflect.Int32 { - return nil, coderSfixed32 - } - case protoreflect.Fixed32Kind: - if ft.Kind() == reflect.Uint32 { - return nil, coderFixed32 - } - case protoreflect.FloatKind: - if ft.Kind() == reflect.Float32 { - return nil, coderFloat - } - case protoreflect.Sfixed64Kind: - if ft.Kind() == reflect.Int64 { - return nil, coderSfixed64 - } - case protoreflect.Fixed64Kind: - if ft.Kind() == reflect.Uint64 { - return nil, coderFixed64 - } - case protoreflect.DoubleKind: - if ft.Kind() == reflect.Float64 { - return nil, coderDouble - } - case protoreflect.StringKind: - if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { - return nil, coderStringValidateUTF8 - } - if ft.Kind() == reflect.String { - return nil, coderString - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) { - return nil, coderBytesValidateUTF8 - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { - return nil, coderBytes - } - case protoreflect.BytesKind: - if ft.Kind() == reflect.String { - return nil, coderString - } - if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { - return nil, coderBytes - } - } - } - panic(fmt.Sprintf("invalid type: no encoder for %v %v %v/%v", fd.FullName(), fd.Cardinality(), fd.Kind(), ft)) -} - -// encoderFuncsForValue returns value functions for a field, used for -// extension values and map encoding. -func encoderFuncsForValue(fd protoreflect.FieldDescriptor) valueCoderFuncs { - switch { - case fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked(): - switch fd.Kind() { - case protoreflect.BoolKind: - return coderBoolSliceValue - case protoreflect.EnumKind: - return coderEnumSliceValue - case protoreflect.Int32Kind: - return coderInt32SliceValue - case protoreflect.Sint32Kind: - return coderSint32SliceValue - case protoreflect.Uint32Kind: - return coderUint32SliceValue - case protoreflect.Int64Kind: - return coderInt64SliceValue - case protoreflect.Sint64Kind: - return coderSint64SliceValue - case protoreflect.Uint64Kind: - return coderUint64SliceValue - case protoreflect.Sfixed32Kind: - return coderSfixed32SliceValue - case protoreflect.Fixed32Kind: - return coderFixed32SliceValue - case protoreflect.FloatKind: - return coderFloatSliceValue - case protoreflect.Sfixed64Kind: - return coderSfixed64SliceValue - case protoreflect.Fixed64Kind: - return coderFixed64SliceValue - case protoreflect.DoubleKind: - return coderDoubleSliceValue - case protoreflect.StringKind: - // We don't have a UTF-8 validating coder for repeated string fields. - // Value coders are used for extensions and maps. - // Extensions are never proto3, and maps never contain lists. - return coderStringSliceValue - case protoreflect.BytesKind: - return coderBytesSliceValue - case protoreflect.MessageKind: - return coderMessageSliceValue - case protoreflect.GroupKind: - return coderGroupSliceValue - } - case fd.Cardinality() == protoreflect.Repeated && fd.IsPacked(): - switch fd.Kind() { - case protoreflect.BoolKind: - return coderBoolPackedSliceValue - case protoreflect.EnumKind: - return coderEnumPackedSliceValue - case protoreflect.Int32Kind: - return coderInt32PackedSliceValue - case protoreflect.Sint32Kind: - return coderSint32PackedSliceValue - case protoreflect.Uint32Kind: - return coderUint32PackedSliceValue - case protoreflect.Int64Kind: - return coderInt64PackedSliceValue - case protoreflect.Sint64Kind: - return coderSint64PackedSliceValue - case protoreflect.Uint64Kind: - return coderUint64PackedSliceValue - case protoreflect.Sfixed32Kind: - return coderSfixed32PackedSliceValue - case protoreflect.Fixed32Kind: - return coderFixed32PackedSliceValue - case protoreflect.FloatKind: - return coderFloatPackedSliceValue - case protoreflect.Sfixed64Kind: - return coderSfixed64PackedSliceValue - case protoreflect.Fixed64Kind: - return coderFixed64PackedSliceValue - case protoreflect.DoubleKind: - return coderDoublePackedSliceValue - } - default: - switch fd.Kind() { - default: - case protoreflect.BoolKind: - return coderBoolValue - case protoreflect.EnumKind: - return coderEnumValue - case protoreflect.Int32Kind: - return coderInt32Value - case protoreflect.Sint32Kind: - return coderSint32Value - case protoreflect.Uint32Kind: - return coderUint32Value - case protoreflect.Int64Kind: - return coderInt64Value - case protoreflect.Sint64Kind: - return coderSint64Value - case protoreflect.Uint64Kind: - return coderUint64Value - case protoreflect.Sfixed32Kind: - return coderSfixed32Value - case protoreflect.Fixed32Kind: - return coderFixed32Value - case protoreflect.FloatKind: - return coderFloatValue - case protoreflect.Sfixed64Kind: - return coderSfixed64Value - case protoreflect.Fixed64Kind: - return coderFixed64Value - case protoreflect.DoubleKind: - return coderDoubleValue - case protoreflect.StringKind: - if strs.EnforceUTF8(fd) { - return coderStringValueValidateUTF8 - } - return coderStringValue - case protoreflect.BytesKind: - return coderBytesValue - case protoreflect.MessageKind: - return coderMessageValue - case protoreflect.GroupKind: - return coderGroupValue - } - } - panic(fmt.Sprintf("invalid field: no encoder for %v %v %v", fd.FullName(), fd.Cardinality(), fd.Kind())) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go deleted file mode 100644 index 757642e2..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +++ /dev/null @@ -1,18 +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. - -//go:build !purego && !appengine -// +build !purego,!appengine - -package impl - -// When using unsafe pointers, we can just treat enum values as int32s. - -var ( - coderEnumNoZero = coderInt32NoZero - coderEnum = coderInt32 - coderEnumPtr = coderInt32Ptr - coderEnumSlice = coderInt32Slice - coderEnumPackedSlice = coderInt32PackedSlice -) diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go deleted file mode 100644 index 185ef2ef..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ /dev/null @@ -1,495 +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. - -package impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -// unwrapper unwraps the value to the underlying value. -// This is implemented by List and Map. -type unwrapper interface { - protoUnwrap() interface{} -} - -// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. -type Converter interface { - // PBValueOf converts a reflect.Value to a protoreflect.Value. - PBValueOf(reflect.Value) protoreflect.Value - - // GoValueOf converts a protoreflect.Value to a reflect.Value. - GoValueOf(protoreflect.Value) reflect.Value - - // IsValidPB returns whether a protoreflect.Value is compatible with this type. - IsValidPB(protoreflect.Value) bool - - // IsValidGo returns whether a reflect.Value is compatible with this type. - IsValidGo(reflect.Value) bool - - // New returns a new field value. - // For scalars, it returns the default value of the field. - // For composite types, it returns a new mutable value. - New() protoreflect.Value - - // Zero returns a new field value. - // For scalars, it returns the default value of the field. - // For composite types, it returns an immutable, empty value. - Zero() protoreflect.Value -} - -// NewConverter matches a Go type with a protobuf field and returns a Converter -// that converts between the two. Enums must be a named int32 kind that -// implements protoreflect.Enum, and messages must be pointer to a named -// struct type that implements protoreflect.ProtoMessage. -// -// This matcher deliberately supports a wider range of Go types than what -// protoc-gen-go historically generated to be able to automatically wrap some -// v1 messages generated by other forks of protoc-gen-go. -func NewConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { - switch { - case fd.IsList(): - return newListConverter(t, fd) - case fd.IsMap(): - return newMapConverter(t, fd) - default: - return newSingularConverter(t, fd) - } -} - -var ( - boolType = reflect.TypeOf(bool(false)) - int32Type = reflect.TypeOf(int32(0)) - int64Type = reflect.TypeOf(int64(0)) - uint32Type = reflect.TypeOf(uint32(0)) - uint64Type = reflect.TypeOf(uint64(0)) - float32Type = reflect.TypeOf(float32(0)) - float64Type = reflect.TypeOf(float64(0)) - stringType = reflect.TypeOf(string("")) - bytesType = reflect.TypeOf([]byte(nil)) - byteType = reflect.TypeOf(byte(0)) -) - -var ( - boolZero = protoreflect.ValueOfBool(false) - int32Zero = protoreflect.ValueOfInt32(0) - int64Zero = protoreflect.ValueOfInt64(0) - uint32Zero = protoreflect.ValueOfUint32(0) - uint64Zero = protoreflect.ValueOfUint64(0) - float32Zero = protoreflect.ValueOfFloat32(0) - float64Zero = protoreflect.ValueOfFloat64(0) - stringZero = protoreflect.ValueOfString("") - bytesZero = protoreflect.ValueOfBytes(nil) -) - -func newSingularConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { - defVal := func(fd protoreflect.FieldDescriptor, zero protoreflect.Value) protoreflect.Value { - if fd.Cardinality() == protoreflect.Repeated { - // Default isn't defined for repeated fields. - return zero - } - return fd.Default() - } - switch fd.Kind() { - case protoreflect.BoolKind: - if t.Kind() == reflect.Bool { - return &boolConverter{t, defVal(fd, boolZero)} - } - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - if t.Kind() == reflect.Int32 { - return &int32Converter{t, defVal(fd, int32Zero)} - } - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - if t.Kind() == reflect.Int64 { - return &int64Converter{t, defVal(fd, int64Zero)} - } - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - if t.Kind() == reflect.Uint32 { - return &uint32Converter{t, defVal(fd, uint32Zero)} - } - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - if t.Kind() == reflect.Uint64 { - return &uint64Converter{t, defVal(fd, uint64Zero)} - } - case protoreflect.FloatKind: - if t.Kind() == reflect.Float32 { - return &float32Converter{t, defVal(fd, float32Zero)} - } - case protoreflect.DoubleKind: - if t.Kind() == reflect.Float64 { - return &float64Converter{t, defVal(fd, float64Zero)} - } - case protoreflect.StringKind: - if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) { - return &stringConverter{t, defVal(fd, stringZero)} - } - case protoreflect.BytesKind: - if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) { - return &bytesConverter{t, defVal(fd, bytesZero)} - } - case protoreflect.EnumKind: - // Handle enums, which must be a named int32 type. - if t.Kind() == reflect.Int32 { - return newEnumConverter(t, fd) - } - case protoreflect.MessageKind, protoreflect.GroupKind: - return newMessageConverter(t) - } - panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) -} - -type boolConverter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *boolConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfBool(v.Bool()) -} -func (c *boolConverter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(v.Bool()).Convert(c.goType) -} -func (c *boolConverter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(bool) - return ok -} -func (c *boolConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *boolConverter) New() protoreflect.Value { return c.def } -func (c *boolConverter) Zero() protoreflect.Value { return c.def } - -type int32Converter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *int32Converter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfInt32(int32(v.Int())) -} -func (c *int32Converter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(int32(v.Int())).Convert(c.goType) -} -func (c *int32Converter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(int32) - return ok -} -func (c *int32Converter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *int32Converter) New() protoreflect.Value { return c.def } -func (c *int32Converter) Zero() protoreflect.Value { return c.def } - -type int64Converter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *int64Converter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfInt64(int64(v.Int())) -} -func (c *int64Converter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(int64(v.Int())).Convert(c.goType) -} -func (c *int64Converter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(int64) - return ok -} -func (c *int64Converter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *int64Converter) New() protoreflect.Value { return c.def } -func (c *int64Converter) Zero() protoreflect.Value { return c.def } - -type uint32Converter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *uint32Converter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfUint32(uint32(v.Uint())) -} -func (c *uint32Converter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(uint32(v.Uint())).Convert(c.goType) -} -func (c *uint32Converter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(uint32) - return ok -} -func (c *uint32Converter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *uint32Converter) New() protoreflect.Value { return c.def } -func (c *uint32Converter) Zero() protoreflect.Value { return c.def } - -type uint64Converter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *uint64Converter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfUint64(uint64(v.Uint())) -} -func (c *uint64Converter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(uint64(v.Uint())).Convert(c.goType) -} -func (c *uint64Converter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(uint64) - return ok -} -func (c *uint64Converter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *uint64Converter) New() protoreflect.Value { return c.def } -func (c *uint64Converter) Zero() protoreflect.Value { return c.def } - -type float32Converter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *float32Converter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfFloat32(float32(v.Float())) -} -func (c *float32Converter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(float32(v.Float())).Convert(c.goType) -} -func (c *float32Converter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(float32) - return ok -} -func (c *float32Converter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *float32Converter) New() protoreflect.Value { return c.def } -func (c *float32Converter) Zero() protoreflect.Value { return c.def } - -type float64Converter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *float64Converter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfFloat64(float64(v.Float())) -} -func (c *float64Converter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(float64(v.Float())).Convert(c.goType) -} -func (c *float64Converter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(float64) - return ok -} -func (c *float64Converter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *float64Converter) New() protoreflect.Value { return c.def } -func (c *float64Converter) Zero() protoreflect.Value { return c.def } - -type stringConverter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfString(v.Convert(stringType).String()) -} -func (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value { - // pref.Value.String never panics, so we go through an interface - // conversion here to check the type. - s := v.Interface().(string) - if c.goType.Kind() == reflect.Slice && s == "" { - return reflect.Zero(c.goType) // ensure empty string is []byte(nil) - } - return reflect.ValueOf(s).Convert(c.goType) -} -func (c *stringConverter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(string) - return ok -} -func (c *stringConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *stringConverter) New() protoreflect.Value { return c.def } -func (c *stringConverter) Zero() protoreflect.Value { return c.def } - -type bytesConverter struct { - goType reflect.Type - def protoreflect.Value -} - -func (c *bytesConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - if c.goType.Kind() == reflect.String && v.Len() == 0 { - return protoreflect.ValueOfBytes(nil) // ensure empty string is []byte(nil) - } - return protoreflect.ValueOfBytes(v.Convert(bytesType).Bytes()) -} -func (c *bytesConverter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(v.Bytes()).Convert(c.goType) -} -func (c *bytesConverter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().([]byte) - return ok -} -func (c *bytesConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} -func (c *bytesConverter) New() protoreflect.Value { return c.def } -func (c *bytesConverter) Zero() protoreflect.Value { return c.def } - -type enumConverter struct { - goType reflect.Type - def protoreflect.Value -} - -func newEnumConverter(goType reflect.Type, fd protoreflect.FieldDescriptor) Converter { - var def protoreflect.Value - if fd.Cardinality() == protoreflect.Repeated { - def = protoreflect.ValueOfEnum(fd.Enum().Values().Get(0).Number()) - } else { - def = fd.Default() - } - return &enumConverter{goType, def} -} - -func (c *enumConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfEnum(protoreflect.EnumNumber(v.Int())) -} - -func (c *enumConverter) GoValueOf(v protoreflect.Value) reflect.Value { - return reflect.ValueOf(v.Enum()).Convert(c.goType) -} - -func (c *enumConverter) IsValidPB(v protoreflect.Value) bool { - _, ok := v.Interface().(protoreflect.EnumNumber) - return ok -} - -func (c *enumConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} - -func (c *enumConverter) New() protoreflect.Value { - return c.def -} - -func (c *enumConverter) Zero() protoreflect.Value { - return c.def -} - -type messageConverter struct { - goType reflect.Type -} - -func newMessageConverter(goType reflect.Type) Converter { - return &messageConverter{goType} -} - -func (c *messageConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - if c.isNonPointer() { - if v.CanAddr() { - v = v.Addr() // T => *T - } else { - v = reflect.Zero(reflect.PtrTo(v.Type())) - } - } - if m, ok := v.Interface().(protoreflect.ProtoMessage); ok { - return protoreflect.ValueOfMessage(m.ProtoReflect()) - } - return protoreflect.ValueOfMessage(legacyWrapMessage(v)) -} - -func (c *messageConverter) GoValueOf(v protoreflect.Value) reflect.Value { - m := v.Message() - var rv reflect.Value - if u, ok := m.(unwrapper); ok { - rv = reflect.ValueOf(u.protoUnwrap()) - } else { - rv = reflect.ValueOf(m.Interface()) - } - if c.isNonPointer() { - if rv.Type() != reflect.PtrTo(c.goType) { - panic(fmt.Sprintf("invalid type: got %v, want %v", rv.Type(), reflect.PtrTo(c.goType))) - } - if !rv.IsNil() { - rv = rv.Elem() // *T => T - } else { - rv = reflect.Zero(rv.Type().Elem()) - } - } - if rv.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", rv.Type(), c.goType)) - } - return rv -} - -func (c *messageConverter) IsValidPB(v protoreflect.Value) bool { - m := v.Message() - var rv reflect.Value - if u, ok := m.(unwrapper); ok { - rv = reflect.ValueOf(u.protoUnwrap()) - } else { - rv = reflect.ValueOf(m.Interface()) - } - if c.isNonPointer() { - return rv.Type() == reflect.PtrTo(c.goType) - } - return rv.Type() == c.goType -} - -func (c *messageConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} - -func (c *messageConverter) New() protoreflect.Value { - if c.isNonPointer() { - return c.PBValueOf(reflect.New(c.goType).Elem()) - } - return c.PBValueOf(reflect.New(c.goType.Elem())) -} - -func (c *messageConverter) Zero() protoreflect.Value { - return c.PBValueOf(reflect.Zero(c.goType)) -} - -// isNonPointer reports whether the type is a non-pointer type. -// This never occurs for generated message types. -func (c *messageConverter) isNonPointer() bool { - return c.goType.Kind() != reflect.Ptr -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go deleted file mode 100644 index f8913651..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +++ /dev/null @@ -1,141 +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. - -package impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -func newListConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { - switch { - case t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice: - return &listPtrConverter{t, newSingularConverter(t.Elem().Elem(), fd)} - case t.Kind() == reflect.Slice: - return &listConverter{t, newSingularConverter(t.Elem(), fd)} - } - panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) -} - -type listConverter struct { - goType reflect.Type // []T - c Converter -} - -func (c *listConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - pv := reflect.New(c.goType) - pv.Elem().Set(v) - return protoreflect.ValueOfList(&listReflect{pv, c.c}) -} - -func (c *listConverter) GoValueOf(v protoreflect.Value) reflect.Value { - rv := v.List().(*listReflect).v - if rv.IsNil() { - return reflect.Zero(c.goType) - } - return rv.Elem() -} - -func (c *listConverter) IsValidPB(v protoreflect.Value) bool { - list, ok := v.Interface().(*listReflect) - if !ok { - return false - } - return list.v.Type().Elem() == c.goType -} - -func (c *listConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} - -func (c *listConverter) New() protoreflect.Value { - return protoreflect.ValueOfList(&listReflect{reflect.New(c.goType), c.c}) -} - -func (c *listConverter) Zero() protoreflect.Value { - return protoreflect.ValueOfList(&listReflect{reflect.Zero(reflect.PtrTo(c.goType)), c.c}) -} - -type listPtrConverter struct { - goType reflect.Type // *[]T - c Converter -} - -func (c *listPtrConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfList(&listReflect{v, c.c}) -} - -func (c *listPtrConverter) GoValueOf(v protoreflect.Value) reflect.Value { - return v.List().(*listReflect).v -} - -func (c *listPtrConverter) IsValidPB(v protoreflect.Value) bool { - list, ok := v.Interface().(*listReflect) - if !ok { - return false - } - return list.v.Type() == c.goType -} - -func (c *listPtrConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} - -func (c *listPtrConverter) New() protoreflect.Value { - return c.PBValueOf(reflect.New(c.goType.Elem())) -} - -func (c *listPtrConverter) Zero() protoreflect.Value { - return c.PBValueOf(reflect.Zero(c.goType)) -} - -type listReflect struct { - v reflect.Value // *[]T - conv Converter -} - -func (ls *listReflect) Len() int { - if ls.v.IsNil() { - return 0 - } - return ls.v.Elem().Len() -} -func (ls *listReflect) Get(i int) protoreflect.Value { - return ls.conv.PBValueOf(ls.v.Elem().Index(i)) -} -func (ls *listReflect) Set(i int, v protoreflect.Value) { - ls.v.Elem().Index(i).Set(ls.conv.GoValueOf(v)) -} -func (ls *listReflect) Append(v protoreflect.Value) { - ls.v.Elem().Set(reflect.Append(ls.v.Elem(), ls.conv.GoValueOf(v))) -} -func (ls *listReflect) AppendMutable() protoreflect.Value { - if _, ok := ls.conv.(*messageConverter); !ok { - panic("invalid AppendMutable on list with non-message type") - } - v := ls.NewElement() - ls.Append(v) - return v -} -func (ls *listReflect) Truncate(i int) { - ls.v.Elem().Set(ls.v.Elem().Slice(0, i)) -} -func (ls *listReflect) NewElement() protoreflect.Value { - return ls.conv.New() -} -func (ls *listReflect) IsValid() bool { - return !ls.v.IsNil() -} -func (ls *listReflect) protoUnwrap() interface{} { - return ls.v.Interface() -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go deleted file mode 100644 index f30b0a05..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ /dev/null @@ -1,121 +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. - -package impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type mapConverter struct { - goType reflect.Type // map[K]V - keyConv, valConv Converter -} - -func newMapConverter(t reflect.Type, fd protoreflect.FieldDescriptor) *mapConverter { - if t.Kind() != reflect.Map { - panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) - } - return &mapConverter{ - goType: t, - keyConv: newSingularConverter(t.Key(), fd.MapKey()), - valConv: newSingularConverter(t.Elem(), fd.MapValue()), - } -} - -func (c *mapConverter) PBValueOf(v reflect.Value) protoreflect.Value { - if v.Type() != c.goType { - panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) - } - return protoreflect.ValueOfMap(&mapReflect{v, c.keyConv, c.valConv}) -} - -func (c *mapConverter) GoValueOf(v protoreflect.Value) reflect.Value { - return v.Map().(*mapReflect).v -} - -func (c *mapConverter) IsValidPB(v protoreflect.Value) bool { - mapv, ok := v.Interface().(*mapReflect) - if !ok { - return false - } - return mapv.v.Type() == c.goType -} - -func (c *mapConverter) IsValidGo(v reflect.Value) bool { - return v.IsValid() && v.Type() == c.goType -} - -func (c *mapConverter) New() protoreflect.Value { - return c.PBValueOf(reflect.MakeMap(c.goType)) -} - -func (c *mapConverter) Zero() protoreflect.Value { - return c.PBValueOf(reflect.Zero(c.goType)) -} - -type mapReflect struct { - v reflect.Value // map[K]V - keyConv Converter - valConv Converter -} - -func (ms *mapReflect) Len() int { - return ms.v.Len() -} -func (ms *mapReflect) Has(k protoreflect.MapKey) bool { - rk := ms.keyConv.GoValueOf(k.Value()) - rv := ms.v.MapIndex(rk) - return rv.IsValid() -} -func (ms *mapReflect) Get(k protoreflect.MapKey) protoreflect.Value { - rk := ms.keyConv.GoValueOf(k.Value()) - rv := ms.v.MapIndex(rk) - if !rv.IsValid() { - return protoreflect.Value{} - } - return ms.valConv.PBValueOf(rv) -} -func (ms *mapReflect) Set(k protoreflect.MapKey, v protoreflect.Value) { - rk := ms.keyConv.GoValueOf(k.Value()) - rv := ms.valConv.GoValueOf(v) - ms.v.SetMapIndex(rk, rv) -} -func (ms *mapReflect) Clear(k protoreflect.MapKey) { - rk := ms.keyConv.GoValueOf(k.Value()) - ms.v.SetMapIndex(rk, reflect.Value{}) -} -func (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value { - if _, ok := ms.valConv.(*messageConverter); !ok { - panic("invalid Mutable on map with non-message value type") - } - v := ms.Get(k) - if !v.IsValid() { - v = ms.NewValue() - ms.Set(k, v) - } - return v -} -func (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - iter := mapRange(ms.v) - for iter.Next() { - k := ms.keyConv.PBValueOf(iter.Key()).MapKey() - v := ms.valConv.PBValueOf(iter.Value()) - if !f(k, v) { - return - } - } -} -func (ms *mapReflect) NewValue() protoreflect.Value { - return ms.valConv.New() -} -func (ms *mapReflect) IsValid() bool { - return !ms.v.IsNil() -} -func (ms *mapReflect) protoUnwrap() interface{} { - return ms.v.Interface() -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go deleted file mode 100644 index cda0520c..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ /dev/null @@ -1,285 +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 impl - -import ( - "math/bits" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoiface" -) - -var errDecode = errors.New("cannot parse invalid wire-format data") -var errRecursionDepth = errors.New("exceeded maximum recursion depth") - -type unmarshalOptions struct { - flags protoiface.UnmarshalInputFlags - resolver interface { - FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) - FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) - } - depth int -} - -func (o unmarshalOptions) Options() proto.UnmarshalOptions { - return proto.UnmarshalOptions{ - Merge: true, - AllowPartial: true, - DiscardUnknown: o.DiscardUnknown(), - Resolver: o.resolver, - } -} - -func (o unmarshalOptions) DiscardUnknown() bool { - return o.flags&protoiface.UnmarshalDiscardUnknown != 0 -} - -func (o unmarshalOptions) IsDefault() bool { - return o.flags == 0 && o.resolver == protoregistry.GlobalTypes -} - -var lazyUnmarshalOptions = unmarshalOptions{ - resolver: protoregistry.GlobalTypes, - depth: protowire.DefaultRecursionLimit, -} - -type unmarshalOutput struct { - n int // number of bytes consumed - initialized bool -} - -// unmarshal is protoreflect.Methods.Unmarshal. -func (mi *MessageInfo) unmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - var p pointer - if ms, ok := in.Message.(*messageState); ok { - p = ms.pointer() - } else { - p = in.Message.(*messageReflectWrapper).pointer() - } - out, err := mi.unmarshalPointer(in.Buf, p, 0, unmarshalOptions{ - flags: in.Flags, - resolver: in.Resolver, - depth: in.Depth, - }) - var flags protoiface.UnmarshalOutputFlags - if out.initialized { - flags |= protoiface.UnmarshalInitialized - } - return protoiface.UnmarshalOutput{ - Flags: flags, - }, err -} - -// errUnknown is returned during unmarshaling to indicate a parse error that -// should result in a field being placed in the unknown fields section (for example, -// when the wire type doesn't match) as opposed to the entire unmarshal operation -// failing (for example, when a field extends past the available input). -// -// This is a sentinel error which should never be visible to the user. -var errUnknown = errors.New("unknown") - -func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { - mi.init() - opts.depth-- - if opts.depth < 0 { - return out, errRecursionDepth - } - if flags.ProtoLegacy && mi.isMessageSet { - return unmarshalMessageSet(mi, b, p, opts) - } - initialized := true - var requiredMask uint64 - var exts *map[int32]ExtensionField - start := len(b) - for len(b) > 0 { - // Parse the tag (field number and wire type). - var tag uint64 - if b[0] < 0x80 { - tag = uint64(b[0]) - b = b[1:] - } else if len(b) >= 2 && b[1] < 128 { - tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 - b = b[2:] - } else { - var n int - tag, n = protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - b = b[n:] - } - var num protowire.Number - if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { - return out, errDecode - } else { - num = protowire.Number(n) - } - wtyp := protowire.Type(tag & 7) - - if wtyp == protowire.EndGroupType { - if num != groupTag { - return out, errDecode - } - groupTag = 0 - break - } - - var f *coderFieldInfo - if int(num) < len(mi.denseCoderFields) { - f = mi.denseCoderFields[num] - } else { - f = mi.coderFields[num] - } - var n int - err := errUnknown - switch { - case f != nil: - if f.funcs.unmarshal == nil { - break - } - var o unmarshalOutput - o, err = f.funcs.unmarshal(b, p.Apply(f.offset), wtyp, f, opts) - n = o.n - if err != nil { - break - } - requiredMask |= f.validation.requiredBit - if f.funcs.isInit != nil && !o.initialized { - initialized = false - } - default: - // Possible extension. - if exts == nil && mi.extensionOffset.IsValid() { - exts = p.Apply(mi.extensionOffset).Extensions() - if *exts == nil { - *exts = make(map[int32]ExtensionField) - } - } - if exts == nil { - break - } - var o unmarshalOutput - o, err = mi.unmarshalExtension(b, num, wtyp, *exts, opts) - if err != nil { - break - } - n = o.n - if !o.initialized { - initialized = false - } - } - if err != nil { - if err != errUnknown { - return out, err - } - n = protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return out, errDecode - } - if !opts.DiscardUnknown() && mi.unknownOffset.IsValid() { - u := mi.mutableUnknownBytes(p) - *u = protowire.AppendTag(*u, num, wtyp) - *u = append(*u, b[:n]...) - } - } - b = b[n:] - } - if groupTag != 0 { - return out, errDecode - } - if mi.numRequiredFields > 0 && bits.OnesCount64(requiredMask) != int(mi.numRequiredFields) { - initialized = false - } - if initialized { - out.initialized = true - } - out.n = start - len(b) - return out, nil -} - -func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp protowire.Type, exts map[int32]ExtensionField, opts unmarshalOptions) (out unmarshalOutput, err error) { - x := exts[int32(num)] - xt := x.Type() - if xt == nil { - var err error - xt, err = opts.resolver.FindExtensionByNumber(mi.Desc.FullName(), num) - if err != nil { - if err == protoregistry.NotFound { - return out, errUnknown - } - return out, errors.New("%v: unable to resolve extension %v: %v", mi.Desc.FullName(), num, err) - } - } - xi := getExtensionFieldInfo(xt) - if xi.funcs.unmarshal == nil { - return out, errUnknown - } - if flags.LazyUnmarshalExtensions { - if opts.IsDefault() && x.canLazy(xt) { - out, valid := skipExtension(b, xi, num, wtyp, opts) - switch valid { - case ValidationValid: - if out.initialized { - x.appendLazyBytes(xt, xi, num, wtyp, b[:out.n]) - exts[int32(num)] = x - return out, nil - } - case ValidationInvalid: - return out, errDecode - case ValidationUnknown: - } - } - } - ival := x.Value() - if !ival.IsValid() && xi.unmarshalNeedsValue { - // Create a new message, list, or map value to fill in. - // For enums, create a prototype value to let the unmarshal func know the - // concrete type. - ival = xt.New() - } - v, out, err := xi.funcs.unmarshal(b, ival, num, wtyp, opts) - if err != nil { - return out, err - } - if xi.funcs.isInit == nil { - out.initialized = true - } - x.Set(xt, v) - exts[int32(num)] = x - return out, nil -} - -func skipExtension(b []byte, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, _ ValidationStatus) { - if xi.validation.mi == nil { - return out, ValidationUnknown - } - xi.validation.mi.init() - switch xi.validation.typ { - case validationTypeMessage: - if wtyp != protowire.BytesType { - return out, ValidationUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, ValidationUnknown - } - out, st := xi.validation.mi.validate(v, 0, opts) - out.n = n - return out, st - case validationTypeGroup: - if wtyp != protowire.StartGroupType { - return out, ValidationUnknown - } - out, st := xi.validation.mi.validate(b, num, opts) - return out, st - default: - return out, ValidationUnknown - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go deleted file mode 100644 index 845c67d6..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ /dev/null @@ -1,201 +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 impl - -import ( - "math" - "sort" - "sync/atomic" - - "google.golang.org/protobuf/internal/flags" - proto "google.golang.org/protobuf/proto" - piface "google.golang.org/protobuf/runtime/protoiface" -) - -type marshalOptions struct { - flags piface.MarshalInputFlags -} - -func (o marshalOptions) Options() proto.MarshalOptions { - return proto.MarshalOptions{ - AllowPartial: true, - Deterministic: o.Deterministic(), - UseCachedSize: o.UseCachedSize(), - } -} - -func (o marshalOptions) Deterministic() bool { return o.flags&piface.MarshalDeterministic != 0 } -func (o marshalOptions) UseCachedSize() bool { return o.flags&piface.MarshalUseCachedSize != 0 } - -// size is protoreflect.Methods.Size. -func (mi *MessageInfo) size(in piface.SizeInput) piface.SizeOutput { - var p pointer - if ms, ok := in.Message.(*messageState); ok { - p = ms.pointer() - } else { - p = in.Message.(*messageReflectWrapper).pointer() - } - size := mi.sizePointer(p, marshalOptions{ - flags: in.Flags, - }) - return piface.SizeOutput{Size: size} -} - -func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) { - mi.init() - if p.IsNil() { - return 0 - } - if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() { - if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 { - return int(size) - } - } - return mi.sizePointerSlow(p, opts) -} - -func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int) { - if flags.ProtoLegacy && mi.isMessageSet { - size = sizeMessageSet(mi, p, opts) - if mi.sizecacheOffset.IsValid() { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) - } - return size - } - if mi.extensionOffset.IsValid() { - e := p.Apply(mi.extensionOffset).Extensions() - size += mi.sizeExtensions(e, opts) - } - for _, f := range mi.orderedCoderFields { - if f.funcs.size == nil { - continue - } - fptr := p.Apply(f.offset) - if f.isPointer && fptr.Elem().IsNil() { - continue - } - size += f.funcs.size(fptr, f, opts) - } - if mi.unknownOffset.IsValid() { - if u := mi.getUnknownBytes(p); u != nil { - size += len(*u) - } - } - if mi.sizecacheOffset.IsValid() { - if size > math.MaxInt32 { - // The size is too large for the int32 sizecache field. - // We will need to recompute the size when encoding; - // unfortunately expensive, but better than invalid output. - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1) - } else { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) - } - } - return size -} - -// marshal is protoreflect.Methods.Marshal. -func (mi *MessageInfo) marshal(in piface.MarshalInput) (out piface.MarshalOutput, err error) { - var p pointer - if ms, ok := in.Message.(*messageState); ok { - p = ms.pointer() - } else { - p = in.Message.(*messageReflectWrapper).pointer() - } - b, err := mi.marshalAppendPointer(in.Buf, p, marshalOptions{ - flags: in.Flags, - }) - return piface.MarshalOutput{Buf: b}, err -} - -func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOptions) ([]byte, error) { - mi.init() - if p.IsNil() { - return b, nil - } - if flags.ProtoLegacy && mi.isMessageSet { - return marshalMessageSet(mi, b, p, opts) - } - var err error - // The old marshaler encodes extensions at beginning. - if mi.extensionOffset.IsValid() { - e := p.Apply(mi.extensionOffset).Extensions() - // TODO: Special handling for MessageSet? - b, err = mi.appendExtensions(b, e, opts) - if err != nil { - return b, err - } - } - for _, f := range mi.orderedCoderFields { - if f.funcs.marshal == nil { - continue - } - fptr := p.Apply(f.offset) - if f.isPointer && fptr.Elem().IsNil() { - continue - } - b, err = f.funcs.marshal(b, fptr, f, opts) - if err != nil { - return b, err - } - } - if mi.unknownOffset.IsValid() && !mi.isMessageSet { - if u := mi.getUnknownBytes(p); u != nil { - b = append(b, (*u)...) - } - } - return b, nil -} - -func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { - if ext == nil { - return 0 - } - for _, x := range *ext { - xi := getExtensionFieldInfo(x.Type()) - if xi.funcs.size == nil { - continue - } - n += xi.funcs.size(x.Value(), xi.tagsize, opts) - } - return n -} - -func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, opts marshalOptions) ([]byte, error) { - if ext == nil { - return b, nil - } - - switch len(*ext) { - case 0: - return b, nil - case 1: - // Fast-path for one extension: Don't bother sorting the keys. - var err error - for _, x := range *ext { - xi := getExtensionFieldInfo(x.Type()) - b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) - } - return b, err - default: - // Sort the keys to provide a deterministic encoding. - // Not sure this is required, but the old code does it. - keys := make([]int, 0, len(*ext)) - for k := range *ext { - keys = append(keys, int(k)) - } - sort.Ints(keys) - var err error - for _, k := range keys { - x := (*ext)[int32(k)] - xi := getExtensionFieldInfo(x.Type()) - b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) - if err != nil { - return b, err - } - } - return b, nil - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/enum.go b/vendor/google.golang.org/protobuf/internal/impl/enum.go deleted file mode 100644 index 5f3ef5ad..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/enum.go +++ /dev/null @@ -1,21 +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 impl - -import ( - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type EnumInfo struct { - GoReflectType reflect.Type // int32 kind - Desc protoreflect.EnumDescriptor -} - -func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { - return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) -} -func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } diff --git a/vendor/google.golang.org/protobuf/internal/impl/extension.go b/vendor/google.golang.org/protobuf/internal/impl/extension.go deleted file mode 100644 index cb25b0ba..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/extension.go +++ /dev/null @@ -1,156 +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 impl - -import ( - "reflect" - "sync" - "sync/atomic" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// ExtensionInfo implements ExtensionType. -// -// This type contains a number of exported fields for legacy compatibility. -// The only non-deprecated use of this type is through the methods of the -// ExtensionType interface. -type ExtensionInfo struct { - // An ExtensionInfo may exist in several stages of initialization. - // - // extensionInfoUninitialized: Some or all of the legacy exported - // fields may be set, but none of the unexported fields have been - // initialized. This is the starting state for an ExtensionInfo - // in legacy generated code. - // - // extensionInfoDescInit: The desc field is set, but other unexported fields - // may not be initialized. Legacy exported fields may or may not be set. - // This is the starting state for an ExtensionInfo in newly generated code. - // - // extensionInfoFullInit: The ExtensionInfo is fully initialized. - // This state is only entered after lazy initialization is complete. - init uint32 - mu sync.Mutex - - goType reflect.Type - desc extensionTypeDescriptor - conv Converter - info *extensionFieldInfo // for fast-path method implementations - - // ExtendedType is a typed nil-pointer to the parent message type that - // is being extended. It is possible for this to be unpopulated in v2 - // since the message may no longer implement the MessageV1 interface. - // - // Deprecated: Use the ExtendedType method instead. - ExtendedType protoiface.MessageV1 - - // ExtensionType is the zero value of the extension type. - // - // For historical reasons, reflect.TypeOf(ExtensionType) and the - // type returned by InterfaceOf may not be identical. - // - // Deprecated: Use InterfaceOf(xt.Zero()) instead. - ExtensionType interface{} - - // Field is the field number of the extension. - // - // Deprecated: Use the Descriptor().Number method instead. - Field int32 - - // Name is the fully qualified name of extension. - // - // Deprecated: Use the Descriptor().FullName method instead. - Name string - - // Tag is the protobuf struct tag used in the v1 API. - // - // Deprecated: Do not use. - Tag string - - // Filename is the proto filename in which the extension is defined. - // - // Deprecated: Use Descriptor().ParentFile().Path() instead. - Filename string -} - -// Stages of initialization: See the ExtensionInfo.init field. -const ( - extensionInfoUninitialized = 0 - extensionInfoDescInit = 1 - extensionInfoFullInit = 2 -) - -func InitExtensionInfo(xi *ExtensionInfo, xd protoreflect.ExtensionDescriptor, goType reflect.Type) { - xi.goType = goType - xi.desc = extensionTypeDescriptor{xd, xi} - xi.init = extensionInfoDescInit -} - -func (xi *ExtensionInfo) New() protoreflect.Value { - return xi.lazyInit().New() -} -func (xi *ExtensionInfo) Zero() protoreflect.Value { - return xi.lazyInit().Zero() -} -func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { - return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) -} -func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { - return xi.lazyInit().GoValueOf(v).Interface() -} -func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { - return xi.lazyInit().IsValidPB(v) -} -func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { - return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) -} -func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { - if atomic.LoadUint32(&xi.init) < extensionInfoDescInit { - xi.lazyInitSlow() - } - return &xi.desc -} - -func (xi *ExtensionInfo) lazyInit() Converter { - if atomic.LoadUint32(&xi.init) < extensionInfoFullInit { - xi.lazyInitSlow() - } - return xi.conv -} - -func (xi *ExtensionInfo) lazyInitSlow() { - xi.mu.Lock() - defer xi.mu.Unlock() - - if xi.init == extensionInfoFullInit { - return - } - defer atomic.StoreUint32(&xi.init, extensionInfoFullInit) - - if xi.desc.ExtensionDescriptor == nil { - xi.initFromLegacy() - } - if !xi.desc.ExtensionDescriptor.IsPlaceholder() { - if xi.ExtensionType == nil { - xi.initToLegacy() - } - xi.conv = NewConverter(xi.goType, xi.desc.ExtensionDescriptor) - xi.info = makeExtensionFieldInfo(xi.desc.ExtensionDescriptor) - xi.info.validation = newValidationInfo(xi.desc.ExtensionDescriptor, xi.goType) - } -} - -type extensionTypeDescriptor struct { - protoreflect.ExtensionDescriptor - xi *ExtensionInfo -} - -func (xtd *extensionTypeDescriptor) Type() protoreflect.ExtensionType { - return xtd.xi -} -func (xtd *extensionTypeDescriptor) Descriptor() protoreflect.ExtensionDescriptor { - return xtd.ExtensionDescriptor -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go deleted file mode 100644 index c2a803bb..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +++ /dev/null @@ -1,218 +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. - -package impl - -import ( - "fmt" - "reflect" - "strings" - "sync" - - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// legacyEnumName returns the name of enums used in legacy code. -// It is neither the protobuf full name nor the qualified Go name, -// but rather an odd hybrid of both. -func legacyEnumName(ed protoreflect.EnumDescriptor) string { - var protoPkg string - enumName := string(ed.FullName()) - if fd := ed.ParentFile(); fd != nil { - protoPkg = string(fd.Package()) - enumName = strings.TrimPrefix(enumName, protoPkg+".") - } - if protoPkg == "" { - return strs.GoCamelCase(enumName) - } - return protoPkg + "." + strs.GoCamelCase(enumName) -} - -// legacyWrapEnum wraps v as a protoreflect.Enum, -// where v must be a int32 kind and not implement the v2 API already. -func legacyWrapEnum(v reflect.Value) protoreflect.Enum { - et := legacyLoadEnumType(v.Type()) - return et.New(protoreflect.EnumNumber(v.Int())) -} - -var legacyEnumTypeCache sync.Map // map[reflect.Type]protoreflect.EnumType - -// legacyLoadEnumType dynamically loads a protoreflect.EnumType for t, -// where t must be an int32 kind and not implement the v2 API already. -func legacyLoadEnumType(t reflect.Type) protoreflect.EnumType { - // Fast-path: check if a EnumType is cached for this concrete type. - if et, ok := legacyEnumTypeCache.Load(t); ok { - return et.(protoreflect.EnumType) - } - - // Slow-path: derive enum descriptor and initialize EnumType. - var et protoreflect.EnumType - ed := LegacyLoadEnumDesc(t) - et = &legacyEnumType{ - desc: ed, - goType: t, - } - if et, ok := legacyEnumTypeCache.LoadOrStore(t, et); ok { - return et.(protoreflect.EnumType) - } - return et -} - -type legacyEnumType struct { - desc protoreflect.EnumDescriptor - goType reflect.Type - m sync.Map // map[protoreflect.EnumNumber]proto.Enum -} - -func (t *legacyEnumType) New(n protoreflect.EnumNumber) protoreflect.Enum { - if e, ok := t.m.Load(n); ok { - return e.(protoreflect.Enum) - } - e := &legacyEnumWrapper{num: n, pbTyp: t, goTyp: t.goType} - t.m.Store(n, e) - return e -} -func (t *legacyEnumType) Descriptor() protoreflect.EnumDescriptor { - return t.desc -} - -type legacyEnumWrapper struct { - num protoreflect.EnumNumber - pbTyp protoreflect.EnumType - goTyp reflect.Type -} - -func (e *legacyEnumWrapper) Descriptor() protoreflect.EnumDescriptor { - return e.pbTyp.Descriptor() -} -func (e *legacyEnumWrapper) Type() protoreflect.EnumType { - return e.pbTyp -} -func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { - return e.num -} -func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { - return e -} -func (e *legacyEnumWrapper) protoUnwrap() interface{} { - v := reflect.New(e.goTyp).Elem() - v.SetInt(int64(e.num)) - return v.Interface() -} - -var ( - _ protoreflect.Enum = (*legacyEnumWrapper)(nil) - _ unwrapper = (*legacyEnumWrapper)(nil) -) - -var legacyEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor - -// LegacyLoadEnumDesc returns an EnumDescriptor derived from the Go type, -// which must be an int32 kind and not implement the v2 API already. -// -// This is exported for testing purposes. -func LegacyLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor { - // Fast-path: check if an EnumDescriptor is cached for this concrete type. - if ed, ok := legacyEnumDescCache.Load(t); ok { - return ed.(protoreflect.EnumDescriptor) - } - - // Slow-path: initialize EnumDescriptor from the raw descriptor. - ev := reflect.Zero(t).Interface() - if _, ok := ev.(protoreflect.Enum); ok { - panic(fmt.Sprintf("%v already implements proto.Enum", t)) - } - edV1, ok := ev.(enumV1) - if !ok { - return aberrantLoadEnumDesc(t) - } - b, idxs := edV1.EnumDescriptor() - - var ed protoreflect.EnumDescriptor - if len(idxs) == 1 { - ed = legacyLoadFileDesc(b).Enums().Get(idxs[0]) - } else { - md := legacyLoadFileDesc(b).Messages().Get(idxs[0]) - for _, i := range idxs[1 : len(idxs)-1] { - md = md.Messages().Get(i) - } - ed = md.Enums().Get(idxs[len(idxs)-1]) - } - if ed, ok := legacyEnumDescCache.LoadOrStore(t, ed); ok { - return ed.(protoreflect.EnumDescriptor) - } - return ed -} - -var aberrantEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor - -// aberrantLoadEnumDesc returns an EnumDescriptor derived from the Go type, -// which must not implement protoreflect.Enum or enumV1. -// -// If the type does not implement enumV1, then there is no reliable -// way to derive the original protobuf type information. -// We are unable to use the global enum registry since it is -// unfortunately keyed by the protobuf full name, which we also do not know. -// Thus, this produces some bogus enum descriptor based on the Go type name. -func aberrantLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor { - // Fast-path: check if an EnumDescriptor is cached for this concrete type. - if ed, ok := aberrantEnumDescCache.Load(t); ok { - return ed.(protoreflect.EnumDescriptor) - } - - // Slow-path: construct a bogus, but unique EnumDescriptor. - ed := &filedesc.Enum{L2: new(filedesc.EnumL2)} - ed.L0.FullName = AberrantDeriveFullName(t) // e.g., github_com.user.repo.MyEnum - ed.L0.ParentFile = filedesc.SurrogateProto3 - ed.L2.Values.List = append(ed.L2.Values.List, filedesc.EnumValue{}) - - // TODO: Use the presence of a UnmarshalJSON method to determine proto2? - - vd := &ed.L2.Values.List[0] - vd.L0.FullName = ed.L0.FullName + "_UNKNOWN" // e.g., github_com.user.repo.MyEnum_UNKNOWN - vd.L0.ParentFile = ed.L0.ParentFile - vd.L0.Parent = ed - - // TODO: We could use the String method to obtain some enum value names by - // starting at 0 and print the enum until it produces invalid identifiers. - // An exhaustive query is clearly impractical, but can be best-effort. - - if ed, ok := aberrantEnumDescCache.LoadOrStore(t, ed); ok { - return ed.(protoreflect.EnumDescriptor) - } - return ed -} - -// AberrantDeriveFullName derives a fully qualified protobuf name for the given Go type -// The provided name is not guaranteed to be stable nor universally unique. -// It should be sufficiently unique within a program. -// -// This is exported for testing purposes. -func AberrantDeriveFullName(t reflect.Type) protoreflect.FullName { - sanitize := func(r rune) rune { - switch { - case r == '/': - return '.' - case 'a' <= r && r <= 'z', 'A' <= r && r <= 'Z', '0' <= r && r <= '9': - return r - default: - return '_' - } - } - prefix := strings.Map(sanitize, t.PkgPath()) - suffix := strings.Map(sanitize, t.Name()) - if suffix == "" { - suffix = fmt.Sprintf("UnknownX%X", reflect.ValueOf(t).Pointer()) - } - - ss := append(strings.Split(prefix, "."), suffix) - for i, s := range ss { - if s == "" || ('0' <= s[0] && s[0] <= '9') { - ss[i] = "x" + s - } - } - return protoreflect.FullName(strings.Join(ss, ".")) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go deleted file mode 100644 index 9b64ad5b..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go +++ /dev/null @@ -1,92 +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 impl - -import ( - "encoding/binary" - "encoding/json" - "hash/crc32" - "math" - "reflect" - - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// These functions exist to support exported APIs in generated protobufs. -// While these are deprecated, they cannot be removed for compatibility reasons. - -// LegacyEnumName returns the name of enums used in legacy code. -func (Export) LegacyEnumName(ed protoreflect.EnumDescriptor) string { - return legacyEnumName(ed) -} - -// LegacyMessageTypeOf returns the protoreflect.MessageType for m, -// with name used as the message name if necessary. -func (Export) LegacyMessageTypeOf(m protoiface.MessageV1, name protoreflect.FullName) protoreflect.MessageType { - if mv := (Export{}).protoMessageV2Of(m); mv != nil { - return mv.ProtoReflect().Type() - } - return legacyLoadMessageType(reflect.TypeOf(m), name) -} - -// UnmarshalJSONEnum unmarshals an enum from a JSON-encoded input. -// The input can either be a string representing the enum value by name, -// or a number representing the enum number itself. -func (Export) UnmarshalJSONEnum(ed protoreflect.EnumDescriptor, b []byte) (protoreflect.EnumNumber, error) { - if b[0] == '"' { - var name protoreflect.Name - if err := json.Unmarshal(b, &name); err != nil { - return 0, errors.New("invalid input for enum %v: %s", ed.FullName(), b) - } - ev := ed.Values().ByName(name) - if ev == nil { - return 0, errors.New("invalid value for enum %v: %s", ed.FullName(), name) - } - return ev.Number(), nil - } else { - var num protoreflect.EnumNumber - if err := json.Unmarshal(b, &num); err != nil { - return 0, errors.New("invalid input for enum %v: %s", ed.FullName(), b) - } - return num, nil - } -} - -// CompressGZIP compresses the input as a GZIP-encoded file. -// The current implementation does no compression. -func (Export) CompressGZIP(in []byte) (out []byte) { - // RFC 1952, section 2.3.1. - var gzipHeader = [10]byte{0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff} - - // RFC 1951, section 3.2.4. - var blockHeader [5]byte - const maxBlockSize = math.MaxUint16 - numBlocks := 1 + len(in)/maxBlockSize - - // RFC 1952, section 2.3.1. - var gzipFooter [8]byte - binary.LittleEndian.PutUint32(gzipFooter[0:4], crc32.ChecksumIEEE(in)) - binary.LittleEndian.PutUint32(gzipFooter[4:8], uint32(len(in))) - - // Encode the input without compression using raw DEFLATE blocks. - out = make([]byte, 0, len(gzipHeader)+len(blockHeader)*numBlocks+len(in)+len(gzipFooter)) - out = append(out, gzipHeader[:]...) - for blockHeader[0] == 0 { - blockSize := maxBlockSize - if blockSize > len(in) { - blockHeader[0] = 0x01 // final bit per RFC 1951, section 3.2.3. - blockSize = len(in) - } - binary.LittleEndian.PutUint16(blockHeader[1:3], uint16(blockSize)) - binary.LittleEndian.PutUint16(blockHeader[3:5], ^uint16(blockSize)) - out = append(out, blockHeader[:]...) - out = append(out, in[:blockSize]...) - in = in[blockSize:] - } - out = append(out, gzipFooter[:]...) - return out -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go deleted file mode 100644 index 87b30d05..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +++ /dev/null @@ -1,176 +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. - -package impl - -import ( - "reflect" - - "google.golang.org/protobuf/internal/descopts" - "google.golang.org/protobuf/internal/encoding/messageset" - ptag "google.golang.org/protobuf/internal/encoding/tag" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoiface" -) - -func (xi *ExtensionInfo) initToLegacy() { - xd := xi.desc - var parent protoiface.MessageV1 - messageName := xd.ContainingMessage().FullName() - if mt, _ := protoregistry.GlobalTypes.FindMessageByName(messageName); mt != nil { - // Create a new parent message and unwrap it if possible. - mv := mt.New().Interface() - t := reflect.TypeOf(mv) - if mv, ok := mv.(unwrapper); ok { - t = reflect.TypeOf(mv.protoUnwrap()) - } - - // Check whether the message implements the legacy v1 Message interface. - mz := reflect.Zero(t).Interface() - if mz, ok := mz.(protoiface.MessageV1); ok { - parent = mz - } - } - - // Determine the v1 extension type, which is unfortunately not the same as - // the v2 ExtensionType.GoType. - extType := xi.goType - switch extType.Kind() { - case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: - extType = reflect.PtrTo(extType) // T -> *T for singular scalar fields - } - - // Reconstruct the legacy enum full name. - var enumName string - if xd.Kind() == protoreflect.EnumKind { - enumName = legacyEnumName(xd.Enum()) - } - - // Derive the proto file that the extension was declared within. - var filename string - if fd := xd.ParentFile(); fd != nil { - filename = fd.Path() - } - - // For MessageSet extensions, the name used is the parent message. - name := xd.FullName() - if messageset.IsMessageSetExtension(xd) { - name = name.Parent() - } - - xi.ExtendedType = parent - xi.ExtensionType = reflect.Zero(extType).Interface() - xi.Field = int32(xd.Number()) - xi.Name = string(name) - xi.Tag = ptag.Marshal(xd, enumName) - xi.Filename = filename -} - -// initFromLegacy initializes an ExtensionInfo from -// the contents of the deprecated exported fields of the type. -func (xi *ExtensionInfo) initFromLegacy() { - // The v1 API returns "type incomplete" descriptors where only the - // field number is specified. In such a case, use a placeholder. - if xi.ExtendedType == nil || xi.ExtensionType == nil { - xd := placeholderExtension{ - name: protoreflect.FullName(xi.Name), - number: protoreflect.FieldNumber(xi.Field), - } - xi.desc = extensionTypeDescriptor{xd, xi} - return - } - - // Resolve enum or message dependencies. - var ed protoreflect.EnumDescriptor - var md protoreflect.MessageDescriptor - t := reflect.TypeOf(xi.ExtensionType) - isOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct - isRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 - if isOptional || isRepeated { - t = t.Elem() - } - switch v := reflect.Zero(t).Interface().(type) { - case protoreflect.Enum: - ed = v.Descriptor() - case enumV1: - ed = LegacyLoadEnumDesc(t) - case protoreflect.ProtoMessage: - md = v.ProtoReflect().Descriptor() - case messageV1: - md = LegacyLoadMessageDesc(t) - } - - // Derive basic field information from the struct tag. - var evs protoreflect.EnumValueDescriptors - if ed != nil { - evs = ed.Values() - } - fd := ptag.Unmarshal(xi.Tag, t, evs).(*filedesc.Field) - - // Construct a v2 ExtensionType. - xd := &filedesc.Extension{L2: new(filedesc.ExtensionL2)} - xd.L0.ParentFile = filedesc.SurrogateProto2 - xd.L0.FullName = protoreflect.FullName(xi.Name) - xd.L1.Number = protoreflect.FieldNumber(xi.Field) - xd.L1.Cardinality = fd.L1.Cardinality - xd.L1.Kind = fd.L1.Kind - xd.L2.IsPacked = fd.L1.IsPacked - xd.L2.Default = fd.L1.Default - xd.L1.Extendee = Export{}.MessageDescriptorOf(xi.ExtendedType) - xd.L2.Enum = ed - xd.L2.Message = md - - // Derive real extension field name for MessageSets. - if messageset.IsMessageSet(xd.L1.Extendee) && md.FullName() == xd.L0.FullName { - xd.L0.FullName = xd.L0.FullName.Append(messageset.ExtensionName) - } - - tt := reflect.TypeOf(xi.ExtensionType) - if isOptional { - tt = tt.Elem() - } - xi.goType = tt - xi.desc = extensionTypeDescriptor{xd, xi} -} - -type placeholderExtension struct { - name protoreflect.FullName - number protoreflect.FieldNumber -} - -func (x placeholderExtension) ParentFile() protoreflect.FileDescriptor { return nil } -func (x placeholderExtension) Parent() protoreflect.Descriptor { return nil } -func (x placeholderExtension) Index() int { return 0 } -func (x placeholderExtension) Syntax() protoreflect.Syntax { return 0 } -func (x placeholderExtension) Name() protoreflect.Name { return x.name.Name() } -func (x placeholderExtension) FullName() protoreflect.FullName { return x.name } -func (x placeholderExtension) IsPlaceholder() bool { return true } -func (x placeholderExtension) Options() protoreflect.ProtoMessage { return descopts.Field } -func (x placeholderExtension) Number() protoreflect.FieldNumber { return x.number } -func (x placeholderExtension) Cardinality() protoreflect.Cardinality { return 0 } -func (x placeholderExtension) Kind() protoreflect.Kind { return 0 } -func (x placeholderExtension) HasJSONName() bool { return false } -func (x placeholderExtension) JSONName() string { return "[" + string(x.name) + "]" } -func (x placeholderExtension) TextName() string { return "[" + string(x.name) + "]" } -func (x placeholderExtension) HasPresence() bool { return false } -func (x placeholderExtension) HasOptionalKeyword() bool { return false } -func (x placeholderExtension) IsExtension() bool { return true } -func (x placeholderExtension) IsWeak() bool { return false } -func (x placeholderExtension) IsPacked() bool { return false } -func (x placeholderExtension) IsList() bool { return false } -func (x placeholderExtension) IsMap() bool { return false } -func (x placeholderExtension) MapKey() protoreflect.FieldDescriptor { return nil } -func (x placeholderExtension) MapValue() protoreflect.FieldDescriptor { return nil } -func (x placeholderExtension) HasDefault() bool { return false } -func (x placeholderExtension) Default() protoreflect.Value { return protoreflect.Value{} } -func (x placeholderExtension) DefaultEnumValue() protoreflect.EnumValueDescriptor { return nil } -func (x placeholderExtension) ContainingOneof() protoreflect.OneofDescriptor { return nil } -func (x placeholderExtension) ContainingMessage() protoreflect.MessageDescriptor { return nil } -func (x placeholderExtension) Enum() protoreflect.EnumDescriptor { return nil } -func (x placeholderExtension) Message() protoreflect.MessageDescriptor { return nil } -func (x placeholderExtension) ProtoType(protoreflect.FieldDescriptor) { return } -func (x placeholderExtension) ProtoInternal(pragma.DoNotImplement) { return } diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go deleted file mode 100644 index 9ab09108..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go +++ /dev/null @@ -1,81 +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. - -package impl - -import ( - "bytes" - "compress/gzip" - "io/ioutil" - "sync" - - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// Every enum and message type generated by protoc-gen-go since commit 2fc053c5 -// on February 25th, 2016 has had a method to get the raw descriptor. -// Types that were not generated by protoc-gen-go or were generated prior -// to that version are not supported. -// -// The []byte returned is the encoded form of a FileDescriptorProto message -// compressed using GZIP. The []int is the path from the top-level file -// to the specific message or enum declaration. -type ( - enumV1 interface { - EnumDescriptor() ([]byte, []int) - } - messageV1 interface { - Descriptor() ([]byte, []int) - } -) - -var legacyFileDescCache sync.Map // map[*byte]protoreflect.FileDescriptor - -// legacyLoadFileDesc unmarshals b as a compressed FileDescriptorProto message. -// -// This assumes that b is immutable and that b does not refer to part of a -// concatenated series of GZIP files (which would require shenanigans that -// rely on the concatenation properties of both protobufs and GZIP). -// File descriptors generated by protoc-gen-go do not rely on that property. -func legacyLoadFileDesc(b []byte) protoreflect.FileDescriptor { - // Fast-path: check whether we already have a cached file descriptor. - if fd, ok := legacyFileDescCache.Load(&b[0]); ok { - return fd.(protoreflect.FileDescriptor) - } - - // Slow-path: decompress and unmarshal the file descriptor proto. - zr, err := gzip.NewReader(bytes.NewReader(b)) - if err != nil { - panic(err) - } - b2, err := ioutil.ReadAll(zr) - if err != nil { - panic(err) - } - - fd := filedesc.Builder{ - RawDescriptor: b2, - FileRegistry: resolverOnly{protoregistry.GlobalFiles}, // do not register back to global registry - }.Build().File - if fd, ok := legacyFileDescCache.LoadOrStore(&b[0], fd); ok { - return fd.(protoreflect.FileDescriptor) - } - return fd -} - -type resolverOnly struct { - reg *protoregistry.Files -} - -func (r resolverOnly) FindFileByPath(path string) (protoreflect.FileDescriptor, error) { - return r.reg.FindFileByPath(path) -} -func (r resolverOnly) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) { - return r.reg.FindDescriptorByName(name) -} -func (resolverOnly) RegisterFile(protoreflect.FileDescriptor) error { - return nil -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go deleted file mode 100644 index 2ab2c629..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ /dev/null @@ -1,568 +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. - -package impl - -import ( - "fmt" - "reflect" - "strings" - "sync" - - "google.golang.org/protobuf/internal/descopts" - ptag "google.golang.org/protobuf/internal/encoding/tag" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// legacyWrapMessage wraps v as a protoreflect.Message, -// where v must be a *struct kind and not implement the v2 API already. -func legacyWrapMessage(v reflect.Value) protoreflect.Message { - t := v.Type() - if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct { - return aberrantMessage{v: v} - } - mt := legacyLoadMessageInfo(t, "") - return mt.MessageOf(v.Interface()) -} - -// legacyLoadMessageType dynamically loads a protoreflect.Type for t, -// where t must be not implement the v2 API already. -// The provided name is used if it cannot be determined from the message. -func legacyLoadMessageType(t reflect.Type, name protoreflect.FullName) protoreflect.MessageType { - if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct { - return aberrantMessageType{t} - } - return legacyLoadMessageInfo(t, name) -} - -var legacyMessageTypeCache sync.Map // map[reflect.Type]*MessageInfo - -// legacyLoadMessageInfo dynamically loads a *MessageInfo for t, -// where t must be a *struct kind and not implement the v2 API already. -// The provided name is used if it cannot be determined from the message. -func legacyLoadMessageInfo(t reflect.Type, name protoreflect.FullName) *MessageInfo { - // Fast-path: check if a MessageInfo is cached for this concrete type. - if mt, ok := legacyMessageTypeCache.Load(t); ok { - return mt.(*MessageInfo) - } - - // Slow-path: derive message descriptor and initialize MessageInfo. - mi := &MessageInfo{ - Desc: legacyLoadMessageDesc(t, name), - GoReflectType: t, - } - - var hasMarshal, hasUnmarshal bool - v := reflect.Zero(t).Interface() - if _, hasMarshal = v.(legacyMarshaler); hasMarshal { - mi.methods.Marshal = legacyMarshal - - // We have no way to tell whether the type's Marshal method - // supports deterministic serialization or not, but this - // preserves the v1 implementation's behavior of always - // calling Marshal methods when present. - mi.methods.Flags |= protoiface.SupportMarshalDeterministic - } - if _, hasUnmarshal = v.(legacyUnmarshaler); hasUnmarshal { - mi.methods.Unmarshal = legacyUnmarshal - } - if _, hasMerge := v.(legacyMerger); hasMerge || (hasMarshal && hasUnmarshal) { - mi.methods.Merge = legacyMerge - } - - if mi, ok := legacyMessageTypeCache.LoadOrStore(t, mi); ok { - return mi.(*MessageInfo) - } - return mi -} - -var legacyMessageDescCache sync.Map // map[reflect.Type]protoreflect.MessageDescriptor - -// LegacyLoadMessageDesc returns an MessageDescriptor derived from the Go type, -// which should be a *struct kind and must not implement the v2 API already. -// -// This is exported for testing purposes. -func LegacyLoadMessageDesc(t reflect.Type) protoreflect.MessageDescriptor { - return legacyLoadMessageDesc(t, "") -} -func legacyLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor { - // Fast-path: check if a MessageDescriptor is cached for this concrete type. - if mi, ok := legacyMessageDescCache.Load(t); ok { - return mi.(protoreflect.MessageDescriptor) - } - - // Slow-path: initialize MessageDescriptor from the raw descriptor. - mv := reflect.Zero(t).Interface() - if _, ok := mv.(protoreflect.ProtoMessage); ok { - panic(fmt.Sprintf("%v already implements proto.Message", t)) - } - mdV1, ok := mv.(messageV1) - if !ok { - return aberrantLoadMessageDesc(t, name) - } - - // If this is a dynamic message type where there isn't a 1-1 mapping between - // Go and protobuf types, calling the Descriptor method on the zero value of - // the message type isn't likely to work. If it panics, swallow the panic and - // continue as if the Descriptor method wasn't present. - b, idxs := func() ([]byte, []int) { - defer func() { - recover() - }() - return mdV1.Descriptor() - }() - if b == nil { - return aberrantLoadMessageDesc(t, name) - } - - // If the Go type has no fields, then this might be a proto3 empty message - // from before the size cache was added. If there are any fields, check to - // see that at least one of them looks like something we generated. - if t.Elem().Kind() == reflect.Struct { - if nfield := t.Elem().NumField(); nfield > 0 { - hasProtoField := false - for i := 0; i < nfield; i++ { - f := t.Elem().Field(i) - if f.Tag.Get("protobuf") != "" || f.Tag.Get("protobuf_oneof") != "" || strings.HasPrefix(f.Name, "XXX_") { - hasProtoField = true - break - } - } - if !hasProtoField { - return aberrantLoadMessageDesc(t, name) - } - } - } - - md := legacyLoadFileDesc(b).Messages().Get(idxs[0]) - for _, i := range idxs[1:] { - md = md.Messages().Get(i) - } - if name != "" && md.FullName() != name { - panic(fmt.Sprintf("mismatching message name: got %v, want %v", md.FullName(), name)) - } - if md, ok := legacyMessageDescCache.LoadOrStore(t, md); ok { - return md.(protoreflect.MessageDescriptor) - } - return md -} - -var ( - aberrantMessageDescLock sync.Mutex - aberrantMessageDescCache map[reflect.Type]protoreflect.MessageDescriptor -) - -// aberrantLoadMessageDesc returns an MessageDescriptor derived from the Go type, -// which must not implement protoreflect.ProtoMessage or messageV1. -// -// This is a best-effort derivation of the message descriptor using the protobuf -// tags on the struct fields. -func aberrantLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor { - aberrantMessageDescLock.Lock() - defer aberrantMessageDescLock.Unlock() - if aberrantMessageDescCache == nil { - aberrantMessageDescCache = make(map[reflect.Type]protoreflect.MessageDescriptor) - } - return aberrantLoadMessageDescReentrant(t, name) -} -func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor { - // Fast-path: check if an MessageDescriptor is cached for this concrete type. - if md, ok := aberrantMessageDescCache[t]; ok { - return md - } - - // Slow-path: construct a descriptor from the Go struct type (best-effort). - // Cache the MessageDescriptor early on so that we can resolve internal - // cyclic references. - md := &filedesc.Message{L2: new(filedesc.MessageL2)} - md.L0.FullName = aberrantDeriveMessageName(t, name) - md.L0.ParentFile = filedesc.SurrogateProto2 - aberrantMessageDescCache[t] = md - - if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct { - return md - } - - // Try to determine if the message is using proto3 by checking scalars. - for i := 0; i < t.Elem().NumField(); i++ { - f := t.Elem().Field(i) - if tag := f.Tag.Get("protobuf"); tag != "" { - switch f.Type.Kind() { - case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: - md.L0.ParentFile = filedesc.SurrogateProto3 - } - for _, s := range strings.Split(tag, ",") { - if s == "proto3" { - md.L0.ParentFile = filedesc.SurrogateProto3 - } - } - } - } - - // Obtain a list of oneof wrapper types. - var oneofWrappers []reflect.Type - methods := make([]reflect.Method, 0, 2) - if m, ok := t.MethodByName("XXX_OneofFuncs"); ok { - methods = append(methods, m) - } - if m, ok := t.MethodByName("XXX_OneofWrappers"); ok { - methods = append(methods, m) - } - for _, fn := range methods { - for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { - for _, v := range vs { - oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) - } - } - } - } - - // Obtain a list of the extension ranges. - if fn, ok := t.MethodByName("ExtensionRangeArray"); ok { - vs := fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0] - for i := 0; i < vs.Len(); i++ { - v := vs.Index(i) - md.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{ - protoreflect.FieldNumber(v.FieldByName("Start").Int()), - protoreflect.FieldNumber(v.FieldByName("End").Int() + 1), - }) - md.L2.ExtensionRangeOptions = append(md.L2.ExtensionRangeOptions, nil) - } - } - - // Derive the message fields by inspecting the struct fields. - for i := 0; i < t.Elem().NumField(); i++ { - f := t.Elem().Field(i) - if tag := f.Tag.Get("protobuf"); tag != "" { - tagKey := f.Tag.Get("protobuf_key") - tagVal := f.Tag.Get("protobuf_val") - aberrantAppendField(md, f.Type, tag, tagKey, tagVal) - } - if tag := f.Tag.Get("protobuf_oneof"); tag != "" { - n := len(md.L2.Oneofs.List) - md.L2.Oneofs.List = append(md.L2.Oneofs.List, filedesc.Oneof{}) - od := &md.L2.Oneofs.List[n] - od.L0.FullName = md.FullName().Append(protoreflect.Name(tag)) - od.L0.ParentFile = md.L0.ParentFile - od.L0.Parent = md - od.L0.Index = n - - for _, t := range oneofWrappers { - if t.Implements(f.Type) { - f := t.Elem().Field(0) - if tag := f.Tag.Get("protobuf"); tag != "" { - aberrantAppendField(md, f.Type, tag, "", "") - fd := &md.L2.Fields.List[len(md.L2.Fields.List)-1] - fd.L1.ContainingOneof = od - od.L1.Fields.List = append(od.L1.Fields.List, fd) - } - } - } - } - } - - return md -} - -func aberrantDeriveMessageName(t reflect.Type, name protoreflect.FullName) protoreflect.FullName { - if name.IsValid() { - return name - } - func() { - defer func() { recover() }() // swallow possible nil panics - if m, ok := reflect.Zero(t).Interface().(interface{ XXX_MessageName() string }); ok { - name = protoreflect.FullName(m.XXX_MessageName()) - } - }() - if name.IsValid() { - return name - } - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - return AberrantDeriveFullName(t) -} - -func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, tagVal string) { - t := goType - isOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct - isRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 - if isOptional || isRepeated { - t = t.Elem() - } - fd := ptag.Unmarshal(tag, t, placeholderEnumValues{}).(*filedesc.Field) - - // Append field descriptor to the message. - n := len(md.L2.Fields.List) - md.L2.Fields.List = append(md.L2.Fields.List, *fd) - fd = &md.L2.Fields.List[n] - fd.L0.FullName = md.FullName().Append(fd.Name()) - fd.L0.ParentFile = md.L0.ParentFile - fd.L0.Parent = md - fd.L0.Index = n - - if fd.L1.IsWeak || fd.L1.HasPacked { - fd.L1.Options = func() protoreflect.ProtoMessage { - opts := descopts.Field.ProtoReflect().New() - if fd.L1.IsWeak { - opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true)) - } - if fd.L1.HasPacked { - opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.IsPacked)) - } - return opts.Interface() - } - } - - // Populate Enum and Message. - if fd.Enum() == nil && fd.Kind() == protoreflect.EnumKind { - switch v := reflect.Zero(t).Interface().(type) { - case protoreflect.Enum: - fd.L1.Enum = v.Descriptor() - default: - fd.L1.Enum = LegacyLoadEnumDesc(t) - } - } - if fd.Message() == nil && (fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind) { - switch v := reflect.Zero(t).Interface().(type) { - case protoreflect.ProtoMessage: - fd.L1.Message = v.ProtoReflect().Descriptor() - case messageV1: - fd.L1.Message = LegacyLoadMessageDesc(t) - default: - if t.Kind() == reflect.Map { - n := len(md.L1.Messages.List) - md.L1.Messages.List = append(md.L1.Messages.List, filedesc.Message{L2: new(filedesc.MessageL2)}) - md2 := &md.L1.Messages.List[n] - md2.L0.FullName = md.FullName().Append(protoreflect.Name(strs.MapEntryName(string(fd.Name())))) - md2.L0.ParentFile = md.L0.ParentFile - md2.L0.Parent = md - md2.L0.Index = n - - md2.L1.IsMapEntry = true - md2.L2.Options = func() protoreflect.ProtoMessage { - opts := descopts.Message.ProtoReflect().New() - opts.Set(opts.Descriptor().Fields().ByName("map_entry"), protoreflect.ValueOfBool(true)) - return opts.Interface() - } - - aberrantAppendField(md2, t.Key(), tagKey, "", "") - aberrantAppendField(md2, t.Elem(), tagVal, "", "") - - fd.L1.Message = md2 - break - } - fd.L1.Message = aberrantLoadMessageDescReentrant(t, "") - } - } -} - -type placeholderEnumValues struct { - protoreflect.EnumValueDescriptors -} - -func (placeholderEnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor { - return filedesc.PlaceholderEnumValue(protoreflect.FullName(fmt.Sprintf("UNKNOWN_%d", n))) -} - -// legacyMarshaler is the proto.Marshaler interface superseded by protoiface.Methoder. -type legacyMarshaler interface { - Marshal() ([]byte, error) -} - -// legacyUnmarshaler is the proto.Unmarshaler interface superseded by protoiface.Methoder. -type legacyUnmarshaler interface { - Unmarshal([]byte) error -} - -// legacyMerger is the proto.Merger interface superseded by protoiface.Methoder. -type legacyMerger interface { - Merge(protoiface.MessageV1) -} - -var aberrantProtoMethods = &protoiface.Methods{ - Marshal: legacyMarshal, - Unmarshal: legacyUnmarshal, - Merge: legacyMerge, - - // We have no way to tell whether the type's Marshal method - // supports deterministic serialization or not, but this - // preserves the v1 implementation's behavior of always - // calling Marshal methods when present. - Flags: protoiface.SupportMarshalDeterministic, -} - -func legacyMarshal(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - v := in.Message.(unwrapper).protoUnwrap() - marshaler, ok := v.(legacyMarshaler) - if !ok { - return protoiface.MarshalOutput{}, errors.New("%T does not implement Marshal", v) - } - out, err := marshaler.Marshal() - if in.Buf != nil { - out = append(in.Buf, out...) - } - return protoiface.MarshalOutput{ - Buf: out, - }, err -} - -func legacyUnmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - v := in.Message.(unwrapper).protoUnwrap() - unmarshaler, ok := v.(legacyUnmarshaler) - if !ok { - return protoiface.UnmarshalOutput{}, errors.New("%T does not implement Unmarshal", v) - } - return protoiface.UnmarshalOutput{}, unmarshaler.Unmarshal(in.Buf) -} - -func legacyMerge(in protoiface.MergeInput) protoiface.MergeOutput { - // Check whether this supports the legacy merger. - dstv := in.Destination.(unwrapper).protoUnwrap() - merger, ok := dstv.(legacyMerger) - if ok { - merger.Merge(Export{}.ProtoMessageV1Of(in.Source)) - return protoiface.MergeOutput{Flags: protoiface.MergeComplete} - } - - // If legacy merger is unavailable, implement merge in terms of - // a marshal and unmarshal operation. - srcv := in.Source.(unwrapper).protoUnwrap() - marshaler, ok := srcv.(legacyMarshaler) - if !ok { - return protoiface.MergeOutput{} - } - dstv = in.Destination.(unwrapper).protoUnwrap() - unmarshaler, ok := dstv.(legacyUnmarshaler) - if !ok { - return protoiface.MergeOutput{} - } - if !in.Source.IsValid() { - // Legacy Marshal methods may not function on nil messages. - // Check for a typed nil source only after we confirm that - // legacy Marshal/Unmarshal methods are present, for - // consistency. - return protoiface.MergeOutput{Flags: protoiface.MergeComplete} - } - b, err := marshaler.Marshal() - if err != nil { - return protoiface.MergeOutput{} - } - err = unmarshaler.Unmarshal(b) - if err != nil { - return protoiface.MergeOutput{} - } - return protoiface.MergeOutput{Flags: protoiface.MergeComplete} -} - -// aberrantMessageType implements MessageType for all types other than pointer-to-struct. -type aberrantMessageType struct { - t reflect.Type -} - -func (mt aberrantMessageType) New() protoreflect.Message { - if mt.t.Kind() == reflect.Ptr { - return aberrantMessage{reflect.New(mt.t.Elem())} - } - return aberrantMessage{reflect.Zero(mt.t)} -} -func (mt aberrantMessageType) Zero() protoreflect.Message { - return aberrantMessage{reflect.Zero(mt.t)} -} -func (mt aberrantMessageType) GoType() reflect.Type { - return mt.t -} -func (mt aberrantMessageType) Descriptor() protoreflect.MessageDescriptor { - return LegacyLoadMessageDesc(mt.t) -} - -// aberrantMessage implements Message for all types other than pointer-to-struct. -// -// When the underlying type implements legacyMarshaler or legacyUnmarshaler, -// the aberrant Message can be marshaled or unmarshaled. Otherwise, there is -// not much that can be done with values of this type. -type aberrantMessage struct { - v reflect.Value -} - -// Reset implements the v1 proto.Message.Reset method. -func (m aberrantMessage) Reset() { - if mr, ok := m.v.Interface().(interface{ Reset() }); ok { - mr.Reset() - return - } - if m.v.Kind() == reflect.Ptr && !m.v.IsNil() { - m.v.Elem().Set(reflect.Zero(m.v.Type().Elem())) - } -} - -func (m aberrantMessage) ProtoReflect() protoreflect.Message { - return m -} - -func (m aberrantMessage) Descriptor() protoreflect.MessageDescriptor { - return LegacyLoadMessageDesc(m.v.Type()) -} -func (m aberrantMessage) Type() protoreflect.MessageType { - return aberrantMessageType{m.v.Type()} -} -func (m aberrantMessage) New() protoreflect.Message { - if m.v.Type().Kind() == reflect.Ptr { - return aberrantMessage{reflect.New(m.v.Type().Elem())} - } - return aberrantMessage{reflect.Zero(m.v.Type())} -} -func (m aberrantMessage) Interface() protoreflect.ProtoMessage { - return m -} -func (m aberrantMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - return -} -func (m aberrantMessage) Has(protoreflect.FieldDescriptor) bool { - return false -} -func (m aberrantMessage) Clear(protoreflect.FieldDescriptor) { - panic("invalid Message.Clear on " + string(m.Descriptor().FullName())) -} -func (m aberrantMessage) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - if fd.Default().IsValid() { - return fd.Default() - } - panic("invalid Message.Get on " + string(m.Descriptor().FullName())) -} -func (m aberrantMessage) Set(protoreflect.FieldDescriptor, protoreflect.Value) { - panic("invalid Message.Set on " + string(m.Descriptor().FullName())) -} -func (m aberrantMessage) Mutable(protoreflect.FieldDescriptor) protoreflect.Value { - panic("invalid Message.Mutable on " + string(m.Descriptor().FullName())) -} -func (m aberrantMessage) NewField(protoreflect.FieldDescriptor) protoreflect.Value { - panic("invalid Message.NewField on " + string(m.Descriptor().FullName())) -} -func (m aberrantMessage) WhichOneof(protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - panic("invalid Message.WhichOneof descriptor on " + string(m.Descriptor().FullName())) -} -func (m aberrantMessage) GetUnknown() protoreflect.RawFields { - return nil -} -func (m aberrantMessage) SetUnknown(protoreflect.RawFields) { - // SetUnknown discards its input on messages which don't support unknown field storage. -} -func (m aberrantMessage) IsValid() bool { - if m.v.Kind() == reflect.Ptr { - return !m.v.IsNil() - } - return false -} -func (m aberrantMessage) ProtoMethods() *protoiface.Methods { - return aberrantProtoMethods -} -func (m aberrantMessage) protoUnwrap() interface{} { - return m.v.Interface() -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/merge.go b/vendor/google.golang.org/protobuf/internal/impl/merge.go deleted file mode 100644 index 7e65f64f..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/merge.go +++ /dev/null @@ -1,176 +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 impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -type mergeOptions struct{} - -func (o mergeOptions) Merge(dst, src proto.Message) { - proto.Merge(dst, src) -} - -// merge is protoreflect.Methods.Merge. -func (mi *MessageInfo) merge(in protoiface.MergeInput) protoiface.MergeOutput { - dp, ok := mi.getPointer(in.Destination) - if !ok { - return protoiface.MergeOutput{} - } - sp, ok := mi.getPointer(in.Source) - if !ok { - return protoiface.MergeOutput{} - } - mi.mergePointer(dp, sp, mergeOptions{}) - return protoiface.MergeOutput{Flags: protoiface.MergeComplete} -} - -func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { - mi.init() - if dst.IsNil() { - panic(fmt.Sprintf("invalid value: merging into nil message")) - } - if src.IsNil() { - return - } - for _, f := range mi.orderedCoderFields { - if f.funcs.merge == nil { - continue - } - sfptr := src.Apply(f.offset) - if f.isPointer && sfptr.Elem().IsNil() { - continue - } - f.funcs.merge(dst.Apply(f.offset), sfptr, f, opts) - } - if mi.extensionOffset.IsValid() { - sext := src.Apply(mi.extensionOffset).Extensions() - dext := dst.Apply(mi.extensionOffset).Extensions() - if *dext == nil { - *dext = make(map[int32]ExtensionField) - } - for num, sx := range *sext { - xt := sx.Type() - xi := getExtensionFieldInfo(xt) - if xi.funcs.merge == nil { - continue - } - dx := (*dext)[num] - var dv protoreflect.Value - if dx.Type() == sx.Type() { - dv = dx.Value() - } - if !dv.IsValid() && xi.unmarshalNeedsValue { - dv = xt.New() - } - dv = xi.funcs.merge(dv, sx.Value(), opts) - dx.Set(sx.Type(), dv) - (*dext)[num] = dx - } - } - if mi.unknownOffset.IsValid() { - su := mi.getUnknownBytes(src) - if su != nil && len(*su) > 0 { - du := mi.mutableUnknownBytes(dst) - *du = append(*du, *su...) - } - } -} - -func mergeScalarValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { - return src -} - -func mergeBytesValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { - return protoreflect.ValueOfBytes(append(emptyBuf[:], src.Bytes()...)) -} - -func mergeListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { - dstl := dst.List() - srcl := src.List() - for i, llen := 0, srcl.Len(); i < llen; i++ { - dstl.Append(srcl.Get(i)) - } - return dst -} - -func mergeBytesListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { - dstl := dst.List() - srcl := src.List() - for i, llen := 0, srcl.Len(); i < llen; i++ { - sb := srcl.Get(i).Bytes() - db := append(emptyBuf[:], sb...) - dstl.Append(protoreflect.ValueOfBytes(db)) - } - return dst -} - -func mergeMessageListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { - dstl := dst.List() - srcl := src.List() - for i, llen := 0, srcl.Len(); i < llen; i++ { - sm := srcl.Get(i).Message() - dm := proto.Clone(sm.Interface()).ProtoReflect() - dstl.Append(protoreflect.ValueOfMessage(dm)) - } - return dst -} - -func mergeMessageValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { - opts.Merge(dst.Message().Interface(), src.Message().Interface()) - return dst -} - -func mergeMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - if f.mi != nil { - if dst.Elem().IsNil() { - dst.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) - } - f.mi.mergePointer(dst.Elem(), src.Elem(), opts) - } else { - dm := dst.AsValueOf(f.ft).Elem() - sm := src.AsValueOf(f.ft).Elem() - if dm.IsNil() { - dm.Set(reflect.New(f.ft.Elem())) - } - opts.Merge(asMessage(dm), asMessage(sm)) - } -} - -func mergeMessageSlice(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - for _, sp := range src.PointerSlice() { - dm := reflect.New(f.ft.Elem().Elem()) - if f.mi != nil { - f.mi.mergePointer(pointerOfValue(dm), sp, opts) - } else { - opts.Merge(asMessage(dm), asMessage(sp.AsValueOf(f.ft.Elem().Elem()))) - } - dst.AppendPointerSlice(pointerOfValue(dm)) - } -} - -func mergeBytes(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Bytes() = append(emptyBuf[:], *src.Bytes()...) -} - -func mergeBytesNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Bytes() - if len(v) > 0 { - *dst.Bytes() = append(emptyBuf[:], v...) - } -} - -func mergeBytesSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.BytesSlice() - for _, v := range *src.BytesSlice() { - *ds = append(*ds, append(emptyBuf[:], v...)) - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go b/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go deleted file mode 100644 index 8816c274..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go +++ /dev/null @@ -1,209 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package impl - -import () - -func mergeBool(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Bool() = *src.Bool() -} - -func mergeBoolNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Bool() - if v != false { - *dst.Bool() = v - } -} - -func mergeBoolPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.BoolPtr() - if p != nil { - v := *p - *dst.BoolPtr() = &v - } -} - -func mergeBoolSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.BoolSlice() - ss := src.BoolSlice() - *ds = append(*ds, *ss...) -} - -func mergeInt32(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Int32() = *src.Int32() -} - -func mergeInt32NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Int32() - if v != 0 { - *dst.Int32() = v - } -} - -func mergeInt32Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.Int32Ptr() - if p != nil { - v := *p - *dst.Int32Ptr() = &v - } -} - -func mergeInt32Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.Int32Slice() - ss := src.Int32Slice() - *ds = append(*ds, *ss...) -} - -func mergeUint32(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Uint32() = *src.Uint32() -} - -func mergeUint32NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Uint32() - if v != 0 { - *dst.Uint32() = v - } -} - -func mergeUint32Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.Uint32Ptr() - if p != nil { - v := *p - *dst.Uint32Ptr() = &v - } -} - -func mergeUint32Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.Uint32Slice() - ss := src.Uint32Slice() - *ds = append(*ds, *ss...) -} - -func mergeInt64(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Int64() = *src.Int64() -} - -func mergeInt64NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Int64() - if v != 0 { - *dst.Int64() = v - } -} - -func mergeInt64Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.Int64Ptr() - if p != nil { - v := *p - *dst.Int64Ptr() = &v - } -} - -func mergeInt64Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.Int64Slice() - ss := src.Int64Slice() - *ds = append(*ds, *ss...) -} - -func mergeUint64(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Uint64() = *src.Uint64() -} - -func mergeUint64NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Uint64() - if v != 0 { - *dst.Uint64() = v - } -} - -func mergeUint64Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.Uint64Ptr() - if p != nil { - v := *p - *dst.Uint64Ptr() = &v - } -} - -func mergeUint64Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.Uint64Slice() - ss := src.Uint64Slice() - *ds = append(*ds, *ss...) -} - -func mergeFloat32(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Float32() = *src.Float32() -} - -func mergeFloat32NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Float32() - if v != 0 { - *dst.Float32() = v - } -} - -func mergeFloat32Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.Float32Ptr() - if p != nil { - v := *p - *dst.Float32Ptr() = &v - } -} - -func mergeFloat32Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.Float32Slice() - ss := src.Float32Slice() - *ds = append(*ds, *ss...) -} - -func mergeFloat64(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.Float64() = *src.Float64() -} - -func mergeFloat64NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.Float64() - if v != 0 { - *dst.Float64() = v - } -} - -func mergeFloat64Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.Float64Ptr() - if p != nil { - v := *p - *dst.Float64Ptr() = &v - } -} - -func mergeFloat64Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.Float64Slice() - ss := src.Float64Slice() - *ds = append(*ds, *ss...) -} - -func mergeString(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - *dst.String() = *src.String() -} - -func mergeStringNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - v := *src.String() - if v != "" { - *dst.String() = v - } -} - -func mergeStringPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - p := *src.StringPtr() - if p != nil { - v := *p - *dst.StringPtr() = &v - } -} - -func mergeStringSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - ds := dst.StringSlice() - ss := src.StringSlice() - *ds = append(*ds, *ss...) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go deleted file mode 100644 index 629bacdc..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ /dev/null @@ -1,284 +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. - -package impl - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "sync" - "sync/atomic" - - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// MessageInfo provides protobuf related functionality for a given Go type -// that represents a message. A given instance of MessageInfo is tied to -// exactly one Go type, which must be a pointer to a struct type. -// -// The exported fields must be populated before any methods are called -// and cannot be mutated after set. -type MessageInfo struct { - // GoReflectType is the underlying message Go type and must be populated. - GoReflectType reflect.Type // pointer to struct - - // Desc is the underlying message descriptor type and must be populated. - Desc protoreflect.MessageDescriptor - - // Exporter must be provided in a purego environment in order to provide - // access to unexported fields. - Exporter exporter - - // OneofWrappers is list of pointers to oneof wrapper struct types. - OneofWrappers []interface{} - - initMu sync.Mutex // protects all unexported fields - initDone uint32 - - reflectMessageInfo // for reflection implementation - coderMessageInfo // for fast-path method implementations -} - -// exporter is a function that returns a reference to the ith field of v, -// where v is a pointer to a struct. It returns nil if it does not support -// exporting the requested field (e.g., already exported). -type exporter func(v interface{}, i int) interface{} - -// getMessageInfo returns the MessageInfo for any message type that -// is generated by our implementation of protoc-gen-go (for v2 and on). -// If it is unable to obtain a MessageInfo, it returns nil. -func getMessageInfo(mt reflect.Type) *MessageInfo { - m, ok := reflect.Zero(mt).Interface().(protoreflect.ProtoMessage) - if !ok { - return nil - } - mr, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *MessageInfo }) - if !ok { - return nil - } - return mr.ProtoMessageInfo() -} - -func (mi *MessageInfo) init() { - // This function is called in the hot path. Inline the sync.Once logic, - // since allocating a closure for Once.Do is expensive. - // Keep init small to ensure that it can be inlined. - if atomic.LoadUint32(&mi.initDone) == 0 { - mi.initOnce() - } -} - -func (mi *MessageInfo) initOnce() { - mi.initMu.Lock() - defer mi.initMu.Unlock() - if mi.initDone == 1 { - return - } - - t := mi.GoReflectType - if t.Kind() != reflect.Ptr && t.Elem().Kind() != reflect.Struct { - panic(fmt.Sprintf("got %v, want *struct kind", t)) - } - t = t.Elem() - - si := mi.makeStructInfo(t) - mi.makeReflectFuncs(t, si) - mi.makeCoderMethods(t, si) - - atomic.StoreUint32(&mi.initDone, 1) -} - -// getPointer returns the pointer for a message, which should be of -// the type of the MessageInfo. If the message is of a different type, -// it returns ok==false. -func (mi *MessageInfo) getPointer(m protoreflect.Message) (p pointer, ok bool) { - switch m := m.(type) { - case *messageState: - return m.pointer(), m.messageInfo() == mi - case *messageReflectWrapper: - return m.pointer(), m.messageInfo() == mi - } - return pointer{}, false -} - -type ( - SizeCache = int32 - WeakFields = map[int32]protoreflect.ProtoMessage - UnknownFields = unknownFieldsA // TODO: switch to unknownFieldsB - unknownFieldsA = []byte - unknownFieldsB = *[]byte - ExtensionFields = map[int32]ExtensionField -) - -var ( - sizecacheType = reflect.TypeOf(SizeCache(0)) - weakFieldsType = reflect.TypeOf(WeakFields(nil)) - unknownFieldsAType = reflect.TypeOf(unknownFieldsA(nil)) - unknownFieldsBType = reflect.TypeOf(unknownFieldsB(nil)) - extensionFieldsType = reflect.TypeOf(ExtensionFields(nil)) -) - -type structInfo struct { - sizecacheOffset offset - sizecacheType reflect.Type - weakOffset offset - weakType reflect.Type - unknownOffset offset - unknownType reflect.Type - extensionOffset offset - extensionType reflect.Type - - fieldsByNumber map[protoreflect.FieldNumber]reflect.StructField - oneofsByName map[protoreflect.Name]reflect.StructField - oneofWrappersByType map[reflect.Type]protoreflect.FieldNumber - oneofWrappersByNumber map[protoreflect.FieldNumber]reflect.Type -} - -func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo { - si := structInfo{ - sizecacheOffset: invalidOffset, - weakOffset: invalidOffset, - unknownOffset: invalidOffset, - extensionOffset: invalidOffset, - - fieldsByNumber: map[protoreflect.FieldNumber]reflect.StructField{}, - oneofsByName: map[protoreflect.Name]reflect.StructField{}, - oneofWrappersByType: map[reflect.Type]protoreflect.FieldNumber{}, - oneofWrappersByNumber: map[protoreflect.FieldNumber]reflect.Type{}, - } - -fieldLoop: - for i := 0; i < t.NumField(); i++ { - switch f := t.Field(i); f.Name { - case genid.SizeCache_goname, genid.SizeCacheA_goname: - if f.Type == sizecacheType { - si.sizecacheOffset = offsetOf(f, mi.Exporter) - si.sizecacheType = f.Type - } - case genid.WeakFields_goname, genid.WeakFieldsA_goname: - if f.Type == weakFieldsType { - si.weakOffset = offsetOf(f, mi.Exporter) - si.weakType = f.Type - } - case genid.UnknownFields_goname, genid.UnknownFieldsA_goname: - if f.Type == unknownFieldsAType || f.Type == unknownFieldsBType { - si.unknownOffset = offsetOf(f, mi.Exporter) - si.unknownType = f.Type - } - case genid.ExtensionFields_goname, genid.ExtensionFieldsA_goname, genid.ExtensionFieldsB_goname: - if f.Type == extensionFieldsType { - si.extensionOffset = offsetOf(f, mi.Exporter) - si.extensionType = f.Type - } - default: - for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { - if len(s) > 0 && strings.Trim(s, "0123456789") == "" { - n, _ := strconv.ParseUint(s, 10, 64) - si.fieldsByNumber[protoreflect.FieldNumber(n)] = f - continue fieldLoop - } - } - if s := f.Tag.Get("protobuf_oneof"); len(s) > 0 { - si.oneofsByName[protoreflect.Name(s)] = f - continue fieldLoop - } - } - } - - // Derive a mapping of oneof wrappers to fields. - oneofWrappers := mi.OneofWrappers - methods := make([]reflect.Method, 0, 2) - if m, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok { - methods = append(methods, m) - } - if m, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok { - methods = append(methods, m) - } - for _, fn := range methods { - for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { - oneofWrappers = vs - } - } - } - for _, v := range oneofWrappers { - tf := reflect.TypeOf(v).Elem() - f := tf.Field(0) - for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { - if len(s) > 0 && strings.Trim(s, "0123456789") == "" { - n, _ := strconv.ParseUint(s, 10, 64) - si.oneofWrappersByType[tf] = protoreflect.FieldNumber(n) - si.oneofWrappersByNumber[protoreflect.FieldNumber(n)] = tf - break - } - } - } - - return si -} - -func (mi *MessageInfo) New() protoreflect.Message { - m := reflect.New(mi.GoReflectType.Elem()).Interface() - if r, ok := m.(protoreflect.ProtoMessage); ok { - return r.ProtoReflect() - } - return mi.MessageOf(m) -} -func (mi *MessageInfo) Zero() protoreflect.Message { - return mi.MessageOf(reflect.Zero(mi.GoReflectType).Interface()) -} -func (mi *MessageInfo) Descriptor() protoreflect.MessageDescriptor { - return mi.Desc -} -func (mi *MessageInfo) Enum(i int) protoreflect.EnumType { - mi.init() - fd := mi.Desc.Fields().Get(i) - return Export{}.EnumTypeOf(mi.fieldTypes[fd.Number()]) -} -func (mi *MessageInfo) Message(i int) protoreflect.MessageType { - mi.init() - fd := mi.Desc.Fields().Get(i) - switch { - case fd.IsWeak(): - mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()) - return mt - case fd.IsMap(): - return mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]} - default: - return Export{}.MessageTypeOf(mi.fieldTypes[fd.Number()]) - } -} - -type mapEntryType struct { - desc protoreflect.MessageDescriptor - valType interface{} // zero value of enum or message type -} - -func (mt mapEntryType) New() protoreflect.Message { - return nil -} -func (mt mapEntryType) Zero() protoreflect.Message { - return nil -} -func (mt mapEntryType) Descriptor() protoreflect.MessageDescriptor { - return mt.desc -} -func (mt mapEntryType) Enum(i int) protoreflect.EnumType { - fd := mt.desc.Fields().Get(i) - if fd.Enum() == nil { - return nil - } - return Export{}.EnumTypeOf(mt.valType) -} -func (mt mapEntryType) Message(i int) protoreflect.MessageType { - fd := mt.desc.Fields().Get(i) - if fd.Message() == nil { - return nil - } - return Export{}.MessageTypeOf(mt.valType) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go deleted file mode 100644 index d9ea010b..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ /dev/null @@ -1,463 +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 impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/internal/detrand" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type reflectMessageInfo struct { - fields map[protoreflect.FieldNumber]*fieldInfo - oneofs map[protoreflect.Name]*oneofInfo - - // fieldTypes contains the zero value of an enum or message field. - // For lists, it contains the element type. - // For maps, it contains the entry value type. - fieldTypes map[protoreflect.FieldNumber]interface{} - - // denseFields is a subset of fields where: - // 0 < fieldDesc.Number() < len(denseFields) - // It provides faster access to the fieldInfo, but may be incomplete. - denseFields []*fieldInfo - - // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. - rangeInfos []interface{} // either *fieldInfo or *oneofInfo - - getUnknown func(pointer) protoreflect.RawFields - setUnknown func(pointer, protoreflect.RawFields) - extensionMap func(pointer) *extensionMap - - nilMessage atomicNilMessage -} - -// makeReflectFuncs generates the set of functions to support reflection. -func (mi *MessageInfo) makeReflectFuncs(t reflect.Type, si structInfo) { - mi.makeKnownFieldsFunc(si) - mi.makeUnknownFieldsFunc(t, si) - mi.makeExtensionFieldsFunc(t, si) - mi.makeFieldTypes(si) -} - -// makeKnownFieldsFunc generates functions for operations that can be performed -// on each protobuf message field. It takes in a reflect.Type representing the -// Go struct and matches message fields with struct fields. -// -// This code assumes that the struct is well-formed and panics if there are -// any discrepancies. -func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) { - mi.fields = map[protoreflect.FieldNumber]*fieldInfo{} - md := mi.Desc - fds := md.Fields() - for i := 0; i < fds.Len(); i++ { - fd := fds.Get(i) - fs := si.fieldsByNumber[fd.Number()] - isOneof := fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() - if isOneof { - fs = si.oneofsByName[fd.ContainingOneof().Name()] - } - var fi fieldInfo - switch { - case fs.Type == nil: - fi = fieldInfoForMissing(fd) // never occurs for officially generated message types - case isOneof: - fi = fieldInfoForOneof(fd, fs, mi.Exporter, si.oneofWrappersByNumber[fd.Number()]) - case fd.IsMap(): - fi = fieldInfoForMap(fd, fs, mi.Exporter) - case fd.IsList(): - fi = fieldInfoForList(fd, fs, mi.Exporter) - case fd.IsWeak(): - fi = fieldInfoForWeakMessage(fd, si.weakOffset) - case fd.Message() != nil: - fi = fieldInfoForMessage(fd, fs, mi.Exporter) - default: - fi = fieldInfoForScalar(fd, fs, mi.Exporter) - } - mi.fields[fd.Number()] = &fi - } - - mi.oneofs = map[protoreflect.Name]*oneofInfo{} - for i := 0; i < md.Oneofs().Len(); i++ { - od := md.Oneofs().Get(i) - mi.oneofs[od.Name()] = makeOneofInfo(od, si, mi.Exporter) - } - - mi.denseFields = make([]*fieldInfo, fds.Len()*2) - for i := 0; i < fds.Len(); i++ { - if fd := fds.Get(i); int(fd.Number()) < len(mi.denseFields) { - mi.denseFields[fd.Number()] = mi.fields[fd.Number()] - } - } - - for i := 0; i < fds.Len(); { - fd := fds.Get(i) - if od := fd.ContainingOneof(); od != nil && !od.IsSynthetic() { - mi.rangeInfos = append(mi.rangeInfos, mi.oneofs[od.Name()]) - i += od.Fields().Len() - } else { - mi.rangeInfos = append(mi.rangeInfos, mi.fields[fd.Number()]) - i++ - } - } - - // Introduce instability to iteration order, but keep it deterministic. - if len(mi.rangeInfos) > 1 && detrand.Bool() { - i := detrand.Intn(len(mi.rangeInfos) - 1) - mi.rangeInfos[i], mi.rangeInfos[i+1] = mi.rangeInfos[i+1], mi.rangeInfos[i] - } -} - -func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) { - switch { - case si.unknownOffset.IsValid() && si.unknownType == unknownFieldsAType: - // Handle as []byte. - mi.getUnknown = func(p pointer) protoreflect.RawFields { - if p.IsNil() { - return nil - } - return *p.Apply(mi.unknownOffset).Bytes() - } - mi.setUnknown = func(p pointer, b protoreflect.RawFields) { - if p.IsNil() { - panic("invalid SetUnknown on nil Message") - } - *p.Apply(mi.unknownOffset).Bytes() = b - } - case si.unknownOffset.IsValid() && si.unknownType == unknownFieldsBType: - // Handle as *[]byte. - mi.getUnknown = func(p pointer) protoreflect.RawFields { - if p.IsNil() { - return nil - } - bp := p.Apply(mi.unknownOffset).BytesPtr() - if *bp == nil { - return nil - } - return **bp - } - mi.setUnknown = func(p pointer, b protoreflect.RawFields) { - if p.IsNil() { - panic("invalid SetUnknown on nil Message") - } - bp := p.Apply(mi.unknownOffset).BytesPtr() - if *bp == nil { - *bp = new([]byte) - } - **bp = b - } - default: - mi.getUnknown = func(pointer) protoreflect.RawFields { - return nil - } - mi.setUnknown = func(p pointer, _ protoreflect.RawFields) { - if p.IsNil() { - panic("invalid SetUnknown on nil Message") - } - } - } -} - -func (mi *MessageInfo) makeExtensionFieldsFunc(t reflect.Type, si structInfo) { - if si.extensionOffset.IsValid() { - mi.extensionMap = func(p pointer) *extensionMap { - if p.IsNil() { - return (*extensionMap)(nil) - } - v := p.Apply(si.extensionOffset).AsValueOf(extensionFieldsType) - return (*extensionMap)(v.Interface().(*map[int32]ExtensionField)) - } - } else { - mi.extensionMap = func(pointer) *extensionMap { - return (*extensionMap)(nil) - } - } -} -func (mi *MessageInfo) makeFieldTypes(si structInfo) { - md := mi.Desc - fds := md.Fields() - for i := 0; i < fds.Len(); i++ { - var ft reflect.Type - fd := fds.Get(i) - fs := si.fieldsByNumber[fd.Number()] - isOneof := fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() - if isOneof { - fs = si.oneofsByName[fd.ContainingOneof().Name()] - } - var isMessage bool - switch { - case fs.Type == nil: - continue // never occurs for officially generated message types - case isOneof: - if fd.Enum() != nil || fd.Message() != nil { - ft = si.oneofWrappersByNumber[fd.Number()].Field(0).Type - } - case fd.IsMap(): - if fd.MapValue().Enum() != nil || fd.MapValue().Message() != nil { - ft = fs.Type.Elem() - } - isMessage = fd.MapValue().Message() != nil - case fd.IsList(): - if fd.Enum() != nil || fd.Message() != nil { - ft = fs.Type.Elem() - } - isMessage = fd.Message() != nil - case fd.Enum() != nil: - ft = fs.Type - if fd.HasPresence() && ft.Kind() == reflect.Ptr { - ft = ft.Elem() - } - case fd.Message() != nil: - ft = fs.Type - if fd.IsWeak() { - ft = nil - } - isMessage = true - } - if isMessage && ft != nil && ft.Kind() != reflect.Ptr { - ft = reflect.PtrTo(ft) // never occurs for officially generated message types - } - if ft != nil { - if mi.fieldTypes == nil { - mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) - } - mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() - } - } -} - -type extensionMap map[int32]ExtensionField - -func (m *extensionMap) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if m != nil { - for _, x := range *m { - xd := x.Type().TypeDescriptor() - v := x.Value() - if xd.IsList() && v.List().Len() == 0 { - continue - } - if !f(xd, v) { - return - } - } - } -} -func (m *extensionMap) Has(xt protoreflect.ExtensionType) (ok bool) { - if m == nil { - return false - } - xd := xt.TypeDescriptor() - x, ok := (*m)[int32(xd.Number())] - if !ok { - return false - } - switch { - case xd.IsList(): - return x.Value().List().Len() > 0 - case xd.IsMap(): - return x.Value().Map().Len() > 0 - case xd.Message() != nil: - return x.Value().Message().IsValid() - } - return true -} -func (m *extensionMap) Clear(xt protoreflect.ExtensionType) { - delete(*m, int32(xt.TypeDescriptor().Number())) -} -func (m *extensionMap) Get(xt protoreflect.ExtensionType) protoreflect.Value { - xd := xt.TypeDescriptor() - if m != nil { - if x, ok := (*m)[int32(xd.Number())]; ok { - return x.Value() - } - } - return xt.Zero() -} -func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) { - xd := xt.TypeDescriptor() - isValid := true - switch { - case !xt.IsValidValue(v): - isValid = false - case xd.IsList(): - isValid = v.List().IsValid() - case xd.IsMap(): - isValid = v.Map().IsValid() - case xd.Message() != nil: - isValid = v.Message().IsValid() - } - if !isValid { - panic(fmt.Sprintf("%v: assigning invalid value", xt.TypeDescriptor().FullName())) - } - - if *m == nil { - *m = make(map[int32]ExtensionField) - } - var x ExtensionField - x.Set(xt, v) - (*m)[int32(xd.Number())] = x -} -func (m *extensionMap) Mutable(xt protoreflect.ExtensionType) protoreflect.Value { - xd := xt.TypeDescriptor() - if xd.Kind() != protoreflect.MessageKind && xd.Kind() != protoreflect.GroupKind && !xd.IsList() && !xd.IsMap() { - panic("invalid Mutable on field with non-composite type") - } - if x, ok := (*m)[int32(xd.Number())]; ok { - return x.Value() - } - v := xt.New() - m.Set(xt, v) - return v -} - -// MessageState is a data structure that is nested as the first field in a -// concrete message. It provides a way to implement the ProtoReflect method -// in an allocation-free way without needing to have a shadow Go type generated -// for every message type. This technique only works using unsafe. -// -// Example generated code: -// -// type M struct { -// state protoimpl.MessageState -// -// Field1 int32 -// Field2 string -// Field3 *BarMessage -// ... -// } -// -// func (m *M) ProtoReflect() protoreflect.Message { -// mi := &file_fizz_buzz_proto_msgInfos[5] -// if protoimpl.UnsafeEnabled && m != nil { -// ms := protoimpl.X.MessageStateOf(Pointer(m)) -// if ms.LoadMessageInfo() == nil { -// ms.StoreMessageInfo(mi) -// } -// return ms -// } -// return mi.MessageOf(m) -// } -// -// The MessageState type holds a *MessageInfo, which must be atomically set to -// the message info associated with a given message instance. -// By unsafely converting a *M into a *MessageState, the MessageState object -// has access to all the information needed to implement protobuf reflection. -// It has access to the message info as its first field, and a pointer to the -// MessageState is identical to a pointer to the concrete message value. -// -// Requirements: -// - The type M must implement protoreflect.ProtoMessage. -// - The address of m must not be nil. -// - The address of m and the address of m.state must be equal, -// even though they are different Go types. -type MessageState struct { - pragma.NoUnkeyedLiterals - pragma.DoNotCompare - pragma.DoNotCopy - - atomicMessageInfo *MessageInfo -} - -type messageState MessageState - -var ( - _ protoreflect.Message = (*messageState)(nil) - _ unwrapper = (*messageState)(nil) -) - -// messageDataType is a tuple of a pointer to the message data and -// a pointer to the message type. It is a generalized way of providing a -// reflective view over a message instance. The disadvantage of this approach -// is the need to allocate this tuple of 16B. -type messageDataType struct { - p pointer - mi *MessageInfo -} - -type ( - messageReflectWrapper messageDataType - messageIfaceWrapper messageDataType -) - -var ( - _ protoreflect.Message = (*messageReflectWrapper)(nil) - _ unwrapper = (*messageReflectWrapper)(nil) - _ protoreflect.ProtoMessage = (*messageIfaceWrapper)(nil) - _ unwrapper = (*messageIfaceWrapper)(nil) -) - -// MessageOf returns a reflective view over a message. The input must be a -// pointer to a named Go struct. If the provided type has a ProtoReflect method, -// it must be implemented by calling this method. -func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { - if reflect.TypeOf(m) != mi.GoReflectType { - panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) - } - p := pointerOfIface(m) - if p.IsNil() { - return mi.nilMessage.Init(mi) - } - return &messageReflectWrapper{p, mi} -} - -func (m *messageReflectWrapper) pointer() pointer { return m.p } -func (m *messageReflectWrapper) messageInfo() *MessageInfo { return m.mi } - -// Reset implements the v1 proto.Message.Reset method. -func (m *messageIfaceWrapper) Reset() { - if mr, ok := m.protoUnwrap().(interface{ Reset() }); ok { - mr.Reset() - return - } - rv := reflect.ValueOf(m.protoUnwrap()) - if rv.Kind() == reflect.Ptr && !rv.IsNil() { - rv.Elem().Set(reflect.Zero(rv.Type().Elem())) - } -} -func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { - return (*messageReflectWrapper)(m) -} -func (m *messageIfaceWrapper) protoUnwrap() interface{} { - return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) -} - -// checkField verifies that the provided field descriptor is valid. -// Exactly one of the returned values is populated. -func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionType) { - var fi *fieldInfo - if n := fd.Number(); 0 < n && int(n) < len(mi.denseFields) { - fi = mi.denseFields[n] - } else { - fi = mi.fields[n] - } - if fi != nil { - if fi.fieldDesc != fd { - if got, want := fd.FullName(), fi.fieldDesc.FullName(); got != want { - panic(fmt.Sprintf("mismatching field: got %v, want %v", got, want)) - } - panic(fmt.Sprintf("mismatching field: %v", fd.FullName())) - } - return fi, nil - } - - if fd.IsExtension() { - if got, want := fd.ContainingMessage().FullName(), mi.Desc.FullName(); got != want { - // TODO: Should this be exact containing message descriptor match? - panic(fmt.Sprintf("extension %v has mismatching containing message: got %v, want %v", fd.FullName(), got, want)) - } - if !mi.Desc.ExtensionRanges().Has(fd.Number()) { - panic(fmt.Sprintf("extension %v extends %v outside the extension range", fd.FullName(), mi.Desc.FullName())) - } - xtd, ok := fd.(protoreflect.ExtensionTypeDescriptor) - if !ok { - panic(fmt.Sprintf("extension %v does not implement protoreflect.ExtensionTypeDescriptor", fd.FullName())) - } - return nil, xtd.Type() - } - panic(fmt.Sprintf("field %v is invalid", fd.FullName())) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go deleted file mode 100644 index 5e736c60..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +++ /dev/null @@ -1,543 +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. - -package impl - -import ( - "fmt" - "math" - "reflect" - "sync" - - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -type fieldInfo struct { - fieldDesc protoreflect.FieldDescriptor - - // These fields are used for protobuf reflection support. - has func(pointer) bool - clear func(pointer) - get func(pointer) protoreflect.Value - set func(pointer, protoreflect.Value) - mutable func(pointer) protoreflect.Value - newMessage func() protoreflect.Message - newField func() protoreflect.Value -} - -func fieldInfoForMissing(fd protoreflect.FieldDescriptor) fieldInfo { - // This never occurs for generated message types. - // It implies that a hand-crafted type has missing Go fields - // for specific protobuf message fields. - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - return false - }, - clear: func(p pointer) { - panic("missing Go struct field for " + string(fd.FullName())) - }, - get: func(p pointer) protoreflect.Value { - return fd.Default() - }, - set: func(p pointer, v protoreflect.Value) { - panic("missing Go struct field for " + string(fd.FullName())) - }, - mutable: func(p pointer) protoreflect.Value { - panic("missing Go struct field for " + string(fd.FullName())) - }, - newMessage: func() protoreflect.Message { - panic("missing Go struct field for " + string(fd.FullName())) - }, - newField: func() protoreflect.Value { - if v := fd.Default(); v.IsValid() { - return v - } - panic("missing Go struct field for " + string(fd.FullName())) - }, - } -} - -func fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Interface { - panic(fmt.Sprintf("field %v has invalid type: got %v, want interface kind", fd.FullName(), ft)) - } - if ot.Kind() != reflect.Struct { - panic(fmt.Sprintf("field %v has invalid type: got %v, want struct kind", fd.FullName(), ot)) - } - if !reflect.PtrTo(ot).Implements(ft) { - panic(fmt.Sprintf("field %v has invalid type: %v does not implement %v", fd.FullName(), ot, ft)) - } - conv := NewConverter(ot.Field(0).Type, fd) - isMessage := fd.Message() != nil - - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) - return fieldInfo{ - // NOTE: The logic below intentionally assumes that oneof fields are - // well-formatted. That is, the oneof interface never contains a - // typed nil pointer to one of the wrapper structs. - - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() { - return false - } - return true - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() || rv.Elem().Type().Elem() != ot { - // NOTE: We intentionally don't check for rv.Elem().IsNil() - // so that (*OneofWrapperType)(nil) gets cleared to nil. - return - } - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() { - return conv.Zero() - } - rv = rv.Elem().Elem().Field(0) - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() { - rv.Set(reflect.New(ot)) - } - rv = rv.Elem().Elem().Field(0) - rv.Set(conv.GoValueOf(v)) - }, - mutable: func(p pointer) protoreflect.Value { - if !isMessage { - panic(fmt.Sprintf("field %v with invalid Mutable call on field with non-composite type", fd.FullName())) - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() { - rv.Set(reflect.New(ot)) - } - rv = rv.Elem().Elem().Field(0) - if rv.Kind() == reflect.Ptr && rv.IsNil() { - rv.Set(conv.GoValueOf(protoreflect.ValueOfMessage(conv.New().Message()))) - } - return conv.PBValueOf(rv) - }, - newMessage: func() protoreflect.Message { - return conv.New().Message() - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Map { - panic(fmt.Sprintf("field %v has invalid type: got %v, want map kind", fd.FullName(), ft)) - } - conv := NewConverter(ft, fd) - - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return rv.Len() > 0 - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.Len() == 0 { - return conv.Zero() - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - pv := conv.GoValueOf(v) - if pv.IsNil() { - panic(fmt.Sprintf("map field %v cannot be set with read-only value", fd.FullName())) - } - rv.Set(pv) - }, - mutable: func(p pointer) protoreflect.Value { - v := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if v.IsNil() { - v.Set(reflect.MakeMap(fs.Type)) - } - return conv.PBValueOf(v) - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Slice { - panic(fmt.Sprintf("field %v has invalid type: got %v, want slice kind", fd.FullName(), ft)) - } - conv := NewConverter(reflect.PtrTo(ft), fd) - - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return rv.Len() > 0 - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type) - if rv.Elem().Len() == 0 { - return conv.Zero() - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - pv := conv.GoValueOf(v) - if pv.IsNil() { - panic(fmt.Sprintf("list field %v cannot be set with read-only value", fd.FullName())) - } - rv.Set(pv.Elem()) - }, - mutable: func(p pointer) protoreflect.Value { - v := p.Apply(fieldOffset).AsValueOf(fs.Type) - return conv.PBValueOf(v) - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -var ( - nilBytes = reflect.ValueOf([]byte(nil)) - emptyBytes = reflect.ValueOf([]byte{}) -) - -func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { - ft := fs.Type - nullable := fd.HasPresence() - isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 - if nullable { - if ft.Kind() != reflect.Ptr && ft.Kind() != reflect.Slice { - // This never occurs for generated message types. - // Despite the protobuf type system specifying presence, - // the Go field type cannot represent it. - nullable = false - } - if ft.Kind() == reflect.Ptr { - ft = ft.Elem() - } - } - conv := NewConverter(ft, fd) - - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if nullable { - return !rv.IsNil() - } - switch rv.Kind() { - case reflect.Bool: - return rv.Bool() - case reflect.Int32, reflect.Int64: - return rv.Int() != 0 - case reflect.Uint32, reflect.Uint64: - return rv.Uint() != 0 - case reflect.Float32, reflect.Float64: - return rv.Float() != 0 || math.Signbit(rv.Float()) - case reflect.String, reflect.Slice: - return rv.Len() > 0 - default: - panic(fmt.Sprintf("field %v has invalid type: %v", fd.FullName(), rv.Type())) // should never happen - } - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if nullable { - if rv.IsNil() { - return conv.Zero() - } - if rv.Kind() == reflect.Ptr { - rv = rv.Elem() - } - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if nullable && rv.Kind() == reflect.Ptr { - if rv.IsNil() { - rv.Set(reflect.New(ft)) - } - rv = rv.Elem() - } - rv.Set(conv.GoValueOf(v)) - if isBytes && rv.Len() == 0 { - if nullable { - rv.Set(emptyBytes) // preserve presence - } else { - rv.Set(nilBytes) // do not preserve presence - } - } - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo { - if !flags.ProtoLegacy { - panic("no support for proto1 weak fields") - } - - var once sync.Once - var messageType protoreflect.MessageType - lazyInit := func() { - once.Do(func() { - messageName := fd.Message().FullName() - messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) - if messageType == nil { - panic(fmt.Sprintf("weak message %v for field %v is not linked in", messageName, fd.FullName())) - } - }) - } - - num := fd.Number() - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - _, ok := p.Apply(weakOffset).WeakFields().get(num) - return ok - }, - clear: func(p pointer) { - p.Apply(weakOffset).WeakFields().clear(num) - }, - get: func(p pointer) protoreflect.Value { - lazyInit() - if p.IsNil() { - return protoreflect.ValueOfMessage(messageType.Zero()) - } - m, ok := p.Apply(weakOffset).WeakFields().get(num) - if !ok { - return protoreflect.ValueOfMessage(messageType.Zero()) - } - return protoreflect.ValueOfMessage(m.ProtoReflect()) - }, - set: func(p pointer, v protoreflect.Value) { - lazyInit() - m := v.Message() - if m.Descriptor() != messageType.Descriptor() { - if got, want := m.Descriptor().FullName(), messageType.Descriptor().FullName(); got != want { - panic(fmt.Sprintf("field %v has mismatching message descriptor: got %v, want %v", fd.FullName(), got, want)) - } - panic(fmt.Sprintf("field %v has mismatching message descriptor: %v", fd.FullName(), m.Descriptor().FullName())) - } - p.Apply(weakOffset).WeakFields().set(num, m.Interface()) - }, - mutable: func(p pointer) protoreflect.Value { - lazyInit() - fs := p.Apply(weakOffset).WeakFields() - m, ok := fs.get(num) - if !ok { - m = messageType.New().Interface() - fs.set(num, m) - } - return protoreflect.ValueOfMessage(m.ProtoReflect()) - }, - newMessage: func() protoreflect.Message { - lazyInit() - return messageType.New() - }, - newField: func() protoreflect.Value { - lazyInit() - return protoreflect.ValueOfMessage(messageType.New()) - }, - } -} - -func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { - ft := fs.Type - conv := NewConverter(ft, fd) - - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if fs.Type.Kind() != reflect.Ptr { - return !isZero(rv) - } - return !rv.IsNil() - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(conv.GoValueOf(v)) - if fs.Type.Kind() == reflect.Ptr && rv.IsNil() { - panic(fmt.Sprintf("field %v has invalid nil pointer", fd.FullName())) - } - }, - mutable: func(p pointer) protoreflect.Value { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if fs.Type.Kind() == reflect.Ptr && rv.IsNil() { - rv.Set(conv.GoValueOf(conv.New())) - } - return conv.PBValueOf(rv) - }, - newMessage: func() protoreflect.Message { - return conv.New().Message() - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -type oneofInfo struct { - oneofDesc protoreflect.OneofDescriptor - which func(pointer) protoreflect.FieldNumber -} - -func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo { - oi := &oneofInfo{oneofDesc: od} - if od.IsSynthetic() { - fs := si.fieldsByNumber[od.Fields().Get(0).Number()] - fieldOffset := offsetOf(fs, x) - oi.which = func(p pointer) protoreflect.FieldNumber { - if p.IsNil() { - return 0 - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() { // valid on either *T or []byte - return 0 - } - return od.Fields().Get(0).Number() - } - } else { - fs := si.oneofsByName[od.Name()] - fieldOffset := offsetOf(fs, x) - oi.which = func(p pointer) protoreflect.FieldNumber { - if p.IsNil() { - return 0 - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() { - return 0 - } - rv = rv.Elem() - if rv.IsNil() { - return 0 - } - return si.oneofWrappersByType[rv.Type().Elem()] - } - } - return oi -} - -// isZero is identical to reflect.Value.IsZero. -// TODO: Remove this when Go1.13 is the minimally supported Go version. -func isZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return math.Float64bits(v.Float()) == 0 - case reflect.Complex64, reflect.Complex128: - c := v.Complex() - return math.Float64bits(real(c)) == 0 && math.Float64bits(imag(c)) == 0 - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if !isZero(v.Index(i)) { - return false - } - } - return true - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: - return v.IsNil() - case reflect.String: - return v.Len() == 0 - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if !isZero(v.Field(i)) { - return false - } - } - return true - default: - panic(&reflect.ValueError{"reflect.Value.IsZero", v.Kind()}) - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go deleted file mode 100644 index 741d6e5b..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +++ /dev/null @@ -1,249 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package impl - -import ( - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -func (m *messageState) Descriptor() protoreflect.MessageDescriptor { - return m.messageInfo().Desc -} -func (m *messageState) Type() protoreflect.MessageType { - return m.messageInfo() -} -func (m *messageState) New() protoreflect.Message { - return m.messageInfo().New() -} -func (m *messageState) Interface() protoreflect.ProtoMessage { - return m.protoUnwrap().(protoreflect.ProtoMessage) -} -func (m *messageState) protoUnwrap() interface{} { - return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) -} -func (m *messageState) ProtoMethods() *protoiface.Methods { - m.messageInfo().init() - return &m.messageInfo().methods -} - -// ProtoMessageInfo is a pseudo-internal API for allowing the v1 code -// to be able to retrieve a v2 MessageInfo struct. -// -// WARNING: This method is exempt from the compatibility promise and -// may be removed in the future without warning. -func (m *messageState) ProtoMessageInfo() *MessageInfo { - return m.messageInfo() -} - -func (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - m.messageInfo().init() - for _, ri := range m.messageInfo().rangeInfos { - switch ri := ri.(type) { - case *fieldInfo: - if ri.has(m.pointer()) { - if !f(ri.fieldDesc, ri.get(m.pointer())) { - return - } - } - case *oneofInfo: - if n := ri.which(m.pointer()); n > 0 { - fi := m.messageInfo().fields[n] - if !f(fi.fieldDesc, fi.get(m.pointer())) { - return - } - } - } - } - m.messageInfo().extensionMap(m.pointer()).Range(f) -} -func (m *messageState) Has(fd protoreflect.FieldDescriptor) bool { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.has(m.pointer()) - } else { - return m.messageInfo().extensionMap(m.pointer()).Has(xt) - } -} -func (m *messageState) Clear(fd protoreflect.FieldDescriptor) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - fi.clear(m.pointer()) - } else { - m.messageInfo().extensionMap(m.pointer()).Clear(xt) - } -} -func (m *messageState) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.get(m.pointer()) - } else { - return m.messageInfo().extensionMap(m.pointer()).Get(xt) - } -} -func (m *messageState) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - fi.set(m.pointer(), v) - } else { - m.messageInfo().extensionMap(m.pointer()).Set(xt, v) - } -} -func (m *messageState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.mutable(m.pointer()) - } else { - return m.messageInfo().extensionMap(m.pointer()).Mutable(xt) - } -} -func (m *messageState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.newField() - } else { - return xt.New() - } -} -func (m *messageState) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - m.messageInfo().init() - if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { - return od.Fields().ByNumber(oi.which(m.pointer())) - } - panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName())) -} -func (m *messageState) GetUnknown() protoreflect.RawFields { - m.messageInfo().init() - return m.messageInfo().getUnknown(m.pointer()) -} -func (m *messageState) SetUnknown(b protoreflect.RawFields) { - m.messageInfo().init() - m.messageInfo().setUnknown(m.pointer(), b) -} -func (m *messageState) IsValid() bool { - return !m.pointer().IsNil() -} - -func (m *messageReflectWrapper) Descriptor() protoreflect.MessageDescriptor { - return m.messageInfo().Desc -} -func (m *messageReflectWrapper) Type() protoreflect.MessageType { - return m.messageInfo() -} -func (m *messageReflectWrapper) New() protoreflect.Message { - return m.messageInfo().New() -} -func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage { - if m, ok := m.protoUnwrap().(protoreflect.ProtoMessage); ok { - return m - } - return (*messageIfaceWrapper)(m) -} -func (m *messageReflectWrapper) protoUnwrap() interface{} { - return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) -} -func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { - m.messageInfo().init() - return &m.messageInfo().methods -} - -// ProtoMessageInfo is a pseudo-internal API for allowing the v1 code -// to be able to retrieve a v2 MessageInfo struct. -// -// WARNING: This method is exempt from the compatibility promise and -// may be removed in the future without warning. -func (m *messageReflectWrapper) ProtoMessageInfo() *MessageInfo { - return m.messageInfo() -} - -func (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - m.messageInfo().init() - for _, ri := range m.messageInfo().rangeInfos { - switch ri := ri.(type) { - case *fieldInfo: - if ri.has(m.pointer()) { - if !f(ri.fieldDesc, ri.get(m.pointer())) { - return - } - } - case *oneofInfo: - if n := ri.which(m.pointer()); n > 0 { - fi := m.messageInfo().fields[n] - if !f(fi.fieldDesc, fi.get(m.pointer())) { - return - } - } - } - } - m.messageInfo().extensionMap(m.pointer()).Range(f) -} -func (m *messageReflectWrapper) Has(fd protoreflect.FieldDescriptor) bool { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.has(m.pointer()) - } else { - return m.messageInfo().extensionMap(m.pointer()).Has(xt) - } -} -func (m *messageReflectWrapper) Clear(fd protoreflect.FieldDescriptor) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - fi.clear(m.pointer()) - } else { - m.messageInfo().extensionMap(m.pointer()).Clear(xt) - } -} -func (m *messageReflectWrapper) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.get(m.pointer()) - } else { - return m.messageInfo().extensionMap(m.pointer()).Get(xt) - } -} -func (m *messageReflectWrapper) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - fi.set(m.pointer(), v) - } else { - m.messageInfo().extensionMap(m.pointer()).Set(xt, v) - } -} -func (m *messageReflectWrapper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.mutable(m.pointer()) - } else { - return m.messageInfo().extensionMap(m.pointer()).Mutable(xt) - } -} -func (m *messageReflectWrapper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { - return fi.newField() - } else { - return xt.New() - } -} -func (m *messageReflectWrapper) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - m.messageInfo().init() - if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { - return od.Fields().ByNumber(oi.which(m.pointer())) - } - panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName())) -} -func (m *messageReflectWrapper) GetUnknown() protoreflect.RawFields { - m.messageInfo().init() - return m.messageInfo().getUnknown(m.pointer()) -} -func (m *messageReflectWrapper) SetUnknown(b protoreflect.RawFields) { - m.messageInfo().init() - m.messageInfo().setUnknown(m.pointer(), b) -} -func (m *messageReflectWrapper) IsValid() bool { - return !m.pointer().IsNil() -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go deleted file mode 100644 index 517e9443..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ /dev/null @@ -1,215 +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 purego || appengine -// +build purego appengine - -package impl - -import ( - "fmt" - "reflect" - "sync" -) - -const UnsafeEnabled = false - -// Pointer is an opaque pointer type. -type Pointer interface{} - -// offset represents the offset to a struct field, accessible from a pointer. -// The offset is the field index into a struct. -type offset struct { - index int - export exporter -} - -// offsetOf returns a field offset for the struct field. -func offsetOf(f reflect.StructField, x exporter) offset { - if len(f.Index) != 1 { - panic("embedded structs are not supported") - } - if f.PkgPath == "" { - return offset{index: f.Index[0]} // field is already exported - } - if x == nil { - panic("exporter must be provided for unexported field") - } - return offset{index: f.Index[0], export: x} -} - -// IsValid reports whether the offset is valid. -func (f offset) IsValid() bool { return f.index >= 0 } - -// invalidOffset is an invalid field offset. -var invalidOffset = offset{index: -1} - -// zeroOffset is a noop when calling pointer.Apply. -var zeroOffset = offset{index: 0} - -// pointer is an abstract representation of a pointer to a struct or field. -type pointer struct{ v reflect.Value } - -// pointerOf returns p as a pointer. -func pointerOf(p Pointer) pointer { - return pointerOfIface(p) -} - -// pointerOfValue returns v as a pointer. -func pointerOfValue(v reflect.Value) pointer { - return pointer{v: v} -} - -// pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { - return pointer{v: reflect.ValueOf(v)} -} - -// IsNil reports whether the pointer is nil. -func (p pointer) IsNil() bool { - return p.v.IsNil() -} - -// Apply adds an offset to the pointer to derive a new pointer -// to a specified field. The current pointer must be pointing at a struct. -func (p pointer) Apply(f offset) pointer { - if f.export != nil { - if v := reflect.ValueOf(f.export(p.v.Interface(), f.index)); v.IsValid() { - return pointer{v: v} - } - } - return pointer{v: p.v.Elem().Field(f.index).Addr()} -} - -// AsValueOf treats p as a pointer to an object of type t and returns the value. -// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t)) -func (p pointer) AsValueOf(t reflect.Type) reflect.Value { - if got := p.v.Type().Elem(); got != t { - panic(fmt.Sprintf("invalid type: got %v, want %v", got, t)) - } - return p.v -} - -// AsIfaceOf treats p as a pointer to an object of type t and returns the value. -// It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { - return p.AsValueOf(t).Interface() -} - -func (p pointer) Bool() *bool { return p.v.Interface().(*bool) } -func (p pointer) BoolPtr() **bool { return p.v.Interface().(**bool) } -func (p pointer) BoolSlice() *[]bool { return p.v.Interface().(*[]bool) } -func (p pointer) Int32() *int32 { return p.v.Interface().(*int32) } -func (p pointer) Int32Ptr() **int32 { return p.v.Interface().(**int32) } -func (p pointer) Int32Slice() *[]int32 { return p.v.Interface().(*[]int32) } -func (p pointer) Int64() *int64 { return p.v.Interface().(*int64) } -func (p pointer) Int64Ptr() **int64 { return p.v.Interface().(**int64) } -func (p pointer) Int64Slice() *[]int64 { return p.v.Interface().(*[]int64) } -func (p pointer) Uint32() *uint32 { return p.v.Interface().(*uint32) } -func (p pointer) Uint32Ptr() **uint32 { return p.v.Interface().(**uint32) } -func (p pointer) Uint32Slice() *[]uint32 { return p.v.Interface().(*[]uint32) } -func (p pointer) Uint64() *uint64 { return p.v.Interface().(*uint64) } -func (p pointer) Uint64Ptr() **uint64 { return p.v.Interface().(**uint64) } -func (p pointer) Uint64Slice() *[]uint64 { return p.v.Interface().(*[]uint64) } -func (p pointer) Float32() *float32 { return p.v.Interface().(*float32) } -func (p pointer) Float32Ptr() **float32 { return p.v.Interface().(**float32) } -func (p pointer) Float32Slice() *[]float32 { return p.v.Interface().(*[]float32) } -func (p pointer) Float64() *float64 { return p.v.Interface().(*float64) } -func (p pointer) Float64Ptr() **float64 { return p.v.Interface().(**float64) } -func (p pointer) Float64Slice() *[]float64 { return p.v.Interface().(*[]float64) } -func (p pointer) String() *string { return p.v.Interface().(*string) } -func (p pointer) StringPtr() **string { return p.v.Interface().(**string) } -func (p pointer) StringSlice() *[]string { return p.v.Interface().(*[]string) } -func (p pointer) Bytes() *[]byte { return p.v.Interface().(*[]byte) } -func (p pointer) BytesPtr() **[]byte { return p.v.Interface().(**[]byte) } -func (p pointer) BytesSlice() *[][]byte { return p.v.Interface().(*[][]byte) } -func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.v.Interface().(*WeakFields)) } -func (p pointer) Extensions() *map[int32]ExtensionField { - return p.v.Interface().(*map[int32]ExtensionField) -} - -func (p pointer) Elem() pointer { - return pointer{v: p.v.Elem()} -} - -// PointerSlice copies []*T from p as a new []pointer. -// This behavior differs from the implementation in pointer_unsafe.go. -func (p pointer) PointerSlice() []pointer { - // TODO: reconsider this - if p.v.IsNil() { - return nil - } - n := p.v.Elem().Len() - s := make([]pointer, n) - for i := 0; i < n; i++ { - s[i] = pointer{v: p.v.Elem().Index(i)} - } - return s -} - -// AppendPointerSlice appends v to p, which must be a []*T. -func (p pointer) AppendPointerSlice(v pointer) { - sp := p.v.Elem() - sp.Set(reflect.Append(sp, v.v)) -} - -// SetPointer sets *p to v. -func (p pointer) SetPointer(v pointer) { - p.v.Elem().Set(v.v) -} - -func growSlice(p pointer, addCap int) { - // TODO: Once we only support Go 1.20 and newer, use reflect.Grow. - in := p.v.Elem() - out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap) - reflect.Copy(out, in) - p.v.Elem().Set(out) -} - -func (p pointer) growBoolSlice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growInt32Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growUint32Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growInt64Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growUint64Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growFloat64Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growFloat32Slice(addCap int) { - growSlice(p, addCap) -} - -func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") } -func (ms *messageState) pointer() pointer { panic("not supported") } -func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") } -func (ms *messageState) LoadMessageInfo() *MessageInfo { panic("not supported") } -func (ms *messageState) StoreMessageInfo(mi *MessageInfo) { panic("not supported") } - -type atomicNilMessage struct { - once sync.Once - m messageReflectWrapper -} - -func (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper { - m.once.Do(func() { - m.m.p = pointerOfIface(reflect.Zero(mi.GoReflectType).Interface()) - m.m.mi = mi - }) - return &m.m -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go deleted file mode 100644 index 4b020e31..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ /dev/null @@ -1,215 +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 !purego && !appengine -// +build !purego,!appengine - -package impl - -import ( - "reflect" - "sync/atomic" - "unsafe" -) - -const UnsafeEnabled = true - -// Pointer is an opaque pointer type. -type Pointer unsafe.Pointer - -// offset represents the offset to a struct field, accessible from a pointer. -// The offset is the byte offset to the field from the start of the struct. -type offset uintptr - -// offsetOf returns a field offset for the struct field. -func offsetOf(f reflect.StructField, x exporter) offset { - return offset(f.Offset) -} - -// IsValid reports whether the offset is valid. -func (f offset) IsValid() bool { return f != invalidOffset } - -// invalidOffset is an invalid field offset. -var invalidOffset = ^offset(0) - -// zeroOffset is a noop when calling pointer.Apply. -var zeroOffset = offset(0) - -// pointer is a pointer to a message struct or field. -type pointer struct{ p unsafe.Pointer } - -// pointerOf returns p as a pointer. -func pointerOf(p Pointer) pointer { - return pointer{p: unsafe.Pointer(p)} -} - -// pointerOfValue returns v as a pointer. -func pointerOfValue(v reflect.Value) pointer { - return pointer{p: unsafe.Pointer(v.Pointer())} -} - -// pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { - type ifaceHeader struct { - Type unsafe.Pointer - Data unsafe.Pointer - } - return pointer{p: (*ifaceHeader)(unsafe.Pointer(&v)).Data} -} - -// IsNil reports whether the pointer is nil. -func (p pointer) IsNil() bool { - return p.p == nil -} - -// Apply adds an offset to the pointer to derive a new pointer -// to a specified field. The pointer must be valid and pointing at a struct. -func (p pointer) Apply(f offset) pointer { - if p.IsNil() { - panic("invalid nil pointer") - } - return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} -} - -// AsValueOf treats p as a pointer to an object of type t and returns the value. -// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t)) -func (p pointer) AsValueOf(t reflect.Type) reflect.Value { - return reflect.NewAt(t, p.p) -} - -// AsIfaceOf treats p as a pointer to an object of type t and returns the value. -// It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { - // TODO: Use tricky unsafe magic to directly create ifaceHeader. - return p.AsValueOf(t).Interface() -} - -func (p pointer) Bool() *bool { return (*bool)(p.p) } -func (p pointer) BoolPtr() **bool { return (**bool)(p.p) } -func (p pointer) BoolSlice() *[]bool { return (*[]bool)(p.p) } -func (p pointer) Int32() *int32 { return (*int32)(p.p) } -func (p pointer) Int32Ptr() **int32 { return (**int32)(p.p) } -func (p pointer) Int32Slice() *[]int32 { return (*[]int32)(p.p) } -func (p pointer) Int64() *int64 { return (*int64)(p.p) } -func (p pointer) Int64Ptr() **int64 { return (**int64)(p.p) } -func (p pointer) Int64Slice() *[]int64 { return (*[]int64)(p.p) } -func (p pointer) Uint32() *uint32 { return (*uint32)(p.p) } -func (p pointer) Uint32Ptr() **uint32 { return (**uint32)(p.p) } -func (p pointer) Uint32Slice() *[]uint32 { return (*[]uint32)(p.p) } -func (p pointer) Uint64() *uint64 { return (*uint64)(p.p) } -func (p pointer) Uint64Ptr() **uint64 { return (**uint64)(p.p) } -func (p pointer) Uint64Slice() *[]uint64 { return (*[]uint64)(p.p) } -func (p pointer) Float32() *float32 { return (*float32)(p.p) } -func (p pointer) Float32Ptr() **float32 { return (**float32)(p.p) } -func (p pointer) Float32Slice() *[]float32 { return (*[]float32)(p.p) } -func (p pointer) Float64() *float64 { return (*float64)(p.p) } -func (p pointer) Float64Ptr() **float64 { return (**float64)(p.p) } -func (p pointer) Float64Slice() *[]float64 { return (*[]float64)(p.p) } -func (p pointer) String() *string { return (*string)(p.p) } -func (p pointer) StringPtr() **string { return (**string)(p.p) } -func (p pointer) StringSlice() *[]string { return (*[]string)(p.p) } -func (p pointer) Bytes() *[]byte { return (*[]byte)(p.p) } -func (p pointer) BytesPtr() **[]byte { return (**[]byte)(p.p) } -func (p pointer) BytesSlice() *[][]byte { return (*[][]byte)(p.p) } -func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.p) } -func (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) } - -func (p pointer) Elem() pointer { - return pointer{p: *(*unsafe.Pointer)(p.p)} -} - -// PointerSlice loads []*T from p as a []pointer. -// The value returned is aliased with the original slice. -// This behavior differs from the implementation in pointer_reflect.go. -func (p pointer) PointerSlice() []pointer { - // Super-tricky - p should point to a []*T where T is a - // message type. We load it as []pointer. - return *(*[]pointer)(p.p) -} - -// AppendPointerSlice appends v to p, which must be a []*T. -func (p pointer) AppendPointerSlice(v pointer) { - *(*[]pointer)(p.p) = append(*(*[]pointer)(p.p), v) -} - -// SetPointer sets *p to v. -func (p pointer) SetPointer(v pointer) { - *(*unsafe.Pointer)(p.p) = (unsafe.Pointer)(v.p) -} - -func (p pointer) growBoolSlice(addCap int) { - sp := p.BoolSlice() - s := make([]bool, 0, addCap+len(*sp)) - s = s[:len(*sp)] - copy(s, *sp) - *sp = s -} - -func (p pointer) growInt32Slice(addCap int) { - sp := p.Int32Slice() - s := make([]int32, 0, addCap+len(*sp)) - s = s[:len(*sp)] - copy(s, *sp) - *sp = s -} - -func (p pointer) growUint32Slice(addCap int) { - p.growInt32Slice(addCap) -} - -func (p pointer) growFloat32Slice(addCap int) { - p.growInt32Slice(addCap) -} - -func (p pointer) growInt64Slice(addCap int) { - sp := p.Int64Slice() - s := make([]int64, 0, addCap+len(*sp)) - s = s[:len(*sp)] - copy(s, *sp) - *sp = s -} - -func (p pointer) growUint64Slice(addCap int) { - p.growInt64Slice(addCap) -} - -func (p pointer) growFloat64Slice(addCap int) { - p.growInt64Slice(addCap) -} - -// Static check that MessageState does not exceed the size of a pointer. -const _ = uint(unsafe.Sizeof(unsafe.Pointer(nil)) - unsafe.Sizeof(MessageState{})) - -func (Export) MessageStateOf(p Pointer) *messageState { - // Super-tricky - see documentation on MessageState. - return (*messageState)(unsafe.Pointer(p)) -} -func (ms *messageState) pointer() pointer { - // Super-tricky - see documentation on MessageState. - return pointer{p: unsafe.Pointer(ms)} -} -func (ms *messageState) messageInfo() *MessageInfo { - mi := ms.LoadMessageInfo() - if mi == nil { - panic("invalid nil message info; this suggests memory corruption due to a race or shallow copy on the message struct") - } - return mi -} -func (ms *messageState) LoadMessageInfo() *MessageInfo { - return (*MessageInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&ms.atomicMessageInfo)))) -} -func (ms *messageState) StoreMessageInfo(mi *MessageInfo) { - atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&ms.atomicMessageInfo)), unsafe.Pointer(mi)) -} - -type atomicNilMessage struct{ p unsafe.Pointer } // p is a *messageReflectWrapper - -func (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper { - if p := atomic.LoadPointer(&m.p); p != nil { - return (*messageReflectWrapper)(p) - } - w := &messageReflectWrapper{mi: mi} - atomic.CompareAndSwapPointer(&m.p, nil, (unsafe.Pointer)(w)) - return (*messageReflectWrapper)(atomic.LoadPointer(&m.p)) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go deleted file mode 100644 index a24e6bbd..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/validate.go +++ /dev/null @@ -1,576 +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 impl - -import ( - "fmt" - "math" - "math/bits" - "reflect" - "unicode/utf8" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoiface" -) - -// ValidationStatus is the result of validating the wire-format encoding of a message. -type ValidationStatus int - -const ( - // ValidationUnknown indicates that unmarshaling the message might succeed or fail. - // The validator was unable to render a judgement. - // - // The only causes of this status are an aberrant message type appearing somewhere - // in the message or a failure in the extension resolver. - ValidationUnknown ValidationStatus = iota + 1 - - // ValidationInvalid indicates that unmarshaling the message will fail. - ValidationInvalid - - // ValidationValid indicates that unmarshaling the message will succeed. - ValidationValid -) - -func (v ValidationStatus) String() string { - switch v { - case ValidationUnknown: - return "ValidationUnknown" - case ValidationInvalid: - return "ValidationInvalid" - case ValidationValid: - return "ValidationValid" - default: - return fmt.Sprintf("ValidationStatus(%d)", int(v)) - } -} - -// Validate determines whether the contents of the buffer are a valid wire encoding -// of the message type. -// -// This function is exposed for testing. -func Validate(mt protoreflect.MessageType, in protoiface.UnmarshalInput) (out protoiface.UnmarshalOutput, _ ValidationStatus) { - mi, ok := mt.(*MessageInfo) - if !ok { - return out, ValidationUnknown - } - if in.Resolver == nil { - in.Resolver = protoregistry.GlobalTypes - } - o, st := mi.validate(in.Buf, 0, unmarshalOptions{ - flags: in.Flags, - resolver: in.Resolver, - }) - if o.initialized { - out.Flags |= protoiface.UnmarshalInitialized - } - return out, st -} - -type validationInfo struct { - mi *MessageInfo - typ validationType - keyType, valType validationType - - // For non-required fields, requiredBit is 0. - // - // For required fields, requiredBit's nth bit is set, where n is a - // unique index in the range [0, MessageInfo.numRequiredFields). - // - // If there are more than 64 required fields, requiredBit is 0. - requiredBit uint64 -} - -type validationType uint8 - -const ( - validationTypeOther validationType = iota - validationTypeMessage - validationTypeGroup - validationTypeMap - validationTypeRepeatedVarint - validationTypeRepeatedFixed32 - validationTypeRepeatedFixed64 - validationTypeVarint - validationTypeFixed32 - validationTypeFixed64 - validationTypeBytes - validationTypeUTF8String - validationTypeMessageSetItem -) - -func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo { - var vi validationInfo - switch { - case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): - switch fd.Kind() { - case protoreflect.MessageKind: - vi.typ = validationTypeMessage - if ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok { - vi.mi = getMessageInfo(ot.Field(0).Type) - } - case protoreflect.GroupKind: - vi.typ = validationTypeGroup - if ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok { - vi.mi = getMessageInfo(ot.Field(0).Type) - } - case protoreflect.StringKind: - if strs.EnforceUTF8(fd) { - vi.typ = validationTypeUTF8String - } - } - default: - vi = newValidationInfo(fd, ft) - } - if fd.Cardinality() == protoreflect.Required { - // Avoid overflow. The required field check is done with a 64-bit mask, with - // any message containing more than 64 required fields always reported as - // potentially uninitialized, so it is not important to get a precise count - // of the required fields past 64. - if mi.numRequiredFields < math.MaxUint8 { - mi.numRequiredFields++ - vi.requiredBit = 1 << (mi.numRequiredFields - 1) - } - } - return vi -} - -func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo { - var vi validationInfo - switch { - case fd.IsList(): - switch fd.Kind() { - case protoreflect.MessageKind: - vi.typ = validationTypeMessage - if ft.Kind() == reflect.Slice { - vi.mi = getMessageInfo(ft.Elem()) - } - case protoreflect.GroupKind: - vi.typ = validationTypeGroup - if ft.Kind() == reflect.Slice { - vi.mi = getMessageInfo(ft.Elem()) - } - case protoreflect.StringKind: - vi.typ = validationTypeBytes - if strs.EnforceUTF8(fd) { - vi.typ = validationTypeUTF8String - } - default: - switch wireTypes[fd.Kind()] { - case protowire.VarintType: - vi.typ = validationTypeRepeatedVarint - case protowire.Fixed32Type: - vi.typ = validationTypeRepeatedFixed32 - case protowire.Fixed64Type: - vi.typ = validationTypeRepeatedFixed64 - } - } - case fd.IsMap(): - vi.typ = validationTypeMap - switch fd.MapKey().Kind() { - case protoreflect.StringKind: - if strs.EnforceUTF8(fd) { - vi.keyType = validationTypeUTF8String - } - } - switch fd.MapValue().Kind() { - case protoreflect.MessageKind: - vi.valType = validationTypeMessage - if ft.Kind() == reflect.Map { - vi.mi = getMessageInfo(ft.Elem()) - } - case protoreflect.StringKind: - if strs.EnforceUTF8(fd) { - vi.valType = validationTypeUTF8String - } - } - default: - switch fd.Kind() { - case protoreflect.MessageKind: - vi.typ = validationTypeMessage - if !fd.IsWeak() { - vi.mi = getMessageInfo(ft) - } - case protoreflect.GroupKind: - vi.typ = validationTypeGroup - vi.mi = getMessageInfo(ft) - case protoreflect.StringKind: - vi.typ = validationTypeBytes - if strs.EnforceUTF8(fd) { - vi.typ = validationTypeUTF8String - } - default: - switch wireTypes[fd.Kind()] { - case protowire.VarintType: - vi.typ = validationTypeVarint - case protowire.Fixed32Type: - vi.typ = validationTypeFixed32 - case protowire.Fixed64Type: - vi.typ = validationTypeFixed64 - case protowire.BytesType: - vi.typ = validationTypeBytes - } - } - } - return vi -} - -func (mi *MessageInfo) validate(b []byte, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, result ValidationStatus) { - mi.init() - type validationState struct { - typ validationType - keyType, valType validationType - endGroup protowire.Number - mi *MessageInfo - tail []byte - requiredMask uint64 - } - - // Pre-allocate some slots to avoid repeated slice reallocation. - states := make([]validationState, 0, 16) - states = append(states, validationState{ - typ: validationTypeMessage, - mi: mi, - }) - if groupTag > 0 { - states[0].typ = validationTypeGroup - states[0].endGroup = groupTag - } - initialized := true - start := len(b) -State: - for len(states) > 0 { - st := &states[len(states)-1] - for len(b) > 0 { - // Parse the tag (field number and wire type). - var tag uint64 - if b[0] < 0x80 { - tag = uint64(b[0]) - b = b[1:] - } else if len(b) >= 2 && b[1] < 128 { - tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 - b = b[2:] - } else { - var n int - tag, n = protowire.ConsumeVarint(b) - if n < 0 { - return out, ValidationInvalid - } - b = b[n:] - } - var num protowire.Number - if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { - return out, ValidationInvalid - } else { - num = protowire.Number(n) - } - wtyp := protowire.Type(tag & 7) - - if wtyp == protowire.EndGroupType { - if st.endGroup == num { - goto PopState - } - return out, ValidationInvalid - } - var vi validationInfo - switch { - case st.typ == validationTypeMap: - switch num { - case genid.MapEntry_Key_field_number: - vi.typ = st.keyType - case genid.MapEntry_Value_field_number: - vi.typ = st.valType - vi.mi = st.mi - vi.requiredBit = 1 - } - case flags.ProtoLegacy && st.mi.isMessageSet: - switch num { - case messageset.FieldItem: - vi.typ = validationTypeMessageSetItem - } - default: - var f *coderFieldInfo - if int(num) < len(st.mi.denseCoderFields) { - f = st.mi.denseCoderFields[num] - } else { - f = st.mi.coderFields[num] - } - if f != nil { - vi = f.validation - if vi.typ == validationTypeMessage && vi.mi == nil { - // Probable weak field. - // - // TODO: Consider storing the results of this lookup somewhere - // rather than recomputing it on every validation. - fd := st.mi.Desc.Fields().ByNumber(num) - if fd == nil || !fd.IsWeak() { - break - } - messageName := fd.Message().FullName() - messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName) - switch err { - case nil: - vi.mi, _ = messageType.(*MessageInfo) - case protoregistry.NotFound: - vi.typ = validationTypeBytes - default: - return out, ValidationUnknown - } - } - break - } - // Possible extension field. - // - // TODO: We should return ValidationUnknown when: - // 1. The resolver is not frozen. (More extensions may be added to it.) - // 2. The resolver returns preg.NotFound. - // In this case, a type added to the resolver in the future could cause - // unmarshaling to begin failing. Supporting this requires some way to - // determine if the resolver is frozen. - xt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), num) - if err != nil && err != protoregistry.NotFound { - return out, ValidationUnknown - } - if err == nil { - vi = getExtensionFieldInfo(xt).validation - } - } - if vi.requiredBit != 0 { - // Check that the field has a compatible wire type. - // We only need to consider non-repeated field types, - // since repeated fields (and maps) can never be required. - ok := false - switch vi.typ { - case validationTypeVarint: - ok = wtyp == protowire.VarintType - case validationTypeFixed32: - ok = wtyp == protowire.Fixed32Type - case validationTypeFixed64: - ok = wtyp == protowire.Fixed64Type - case validationTypeBytes, validationTypeUTF8String, validationTypeMessage: - ok = wtyp == protowire.BytesType - case validationTypeGroup: - ok = wtyp == protowire.StartGroupType - } - if ok { - st.requiredMask |= vi.requiredBit - } - } - - switch wtyp { - case protowire.VarintType: - if len(b) >= 10 { - switch { - case b[0] < 0x80: - b = b[1:] - case b[1] < 0x80: - b = b[2:] - case b[2] < 0x80: - b = b[3:] - case b[3] < 0x80: - b = b[4:] - case b[4] < 0x80: - b = b[5:] - case b[5] < 0x80: - b = b[6:] - case b[6] < 0x80: - b = b[7:] - case b[7] < 0x80: - b = b[8:] - case b[8] < 0x80: - b = b[9:] - case b[9] < 0x80 && b[9] < 2: - b = b[10:] - default: - return out, ValidationInvalid - } - } else { - switch { - case len(b) > 0 && b[0] < 0x80: - b = b[1:] - case len(b) > 1 && b[1] < 0x80: - b = b[2:] - case len(b) > 2 && b[2] < 0x80: - b = b[3:] - case len(b) > 3 && b[3] < 0x80: - b = b[4:] - case len(b) > 4 && b[4] < 0x80: - b = b[5:] - case len(b) > 5 && b[5] < 0x80: - b = b[6:] - case len(b) > 6 && b[6] < 0x80: - b = b[7:] - case len(b) > 7 && b[7] < 0x80: - b = b[8:] - case len(b) > 8 && b[8] < 0x80: - b = b[9:] - case len(b) > 9 && b[9] < 2: - b = b[10:] - default: - return out, ValidationInvalid - } - } - continue State - case protowire.BytesType: - var size uint64 - if len(b) >= 1 && b[0] < 0x80 { - size = uint64(b[0]) - b = b[1:] - } else if len(b) >= 2 && b[1] < 128 { - size = uint64(b[0]&0x7f) + uint64(b[1])<<7 - b = b[2:] - } else { - var n int - size, n = protowire.ConsumeVarint(b) - if n < 0 { - return out, ValidationInvalid - } - b = b[n:] - } - if size > uint64(len(b)) { - return out, ValidationInvalid - } - v := b[:size] - b = b[size:] - switch vi.typ { - case validationTypeMessage: - if vi.mi == nil { - return out, ValidationUnknown - } - vi.mi.init() - fallthrough - case validationTypeMap: - if vi.mi != nil { - vi.mi.init() - } - states = append(states, validationState{ - typ: vi.typ, - keyType: vi.keyType, - valType: vi.valType, - mi: vi.mi, - tail: b, - }) - b = v - continue State - case validationTypeRepeatedVarint: - // Packed field. - for len(v) > 0 { - _, n := protowire.ConsumeVarint(v) - if n < 0 { - return out, ValidationInvalid - } - v = v[n:] - } - case validationTypeRepeatedFixed32: - // Packed field. - if len(v)%4 != 0 { - return out, ValidationInvalid - } - case validationTypeRepeatedFixed64: - // Packed field. - if len(v)%8 != 0 { - return out, ValidationInvalid - } - case validationTypeUTF8String: - if !utf8.Valid(v) { - return out, ValidationInvalid - } - } - case protowire.Fixed32Type: - if len(b) < 4 { - return out, ValidationInvalid - } - b = b[4:] - case protowire.Fixed64Type: - if len(b) < 8 { - return out, ValidationInvalid - } - b = b[8:] - case protowire.StartGroupType: - switch { - case vi.typ == validationTypeGroup: - if vi.mi == nil { - return out, ValidationUnknown - } - vi.mi.init() - states = append(states, validationState{ - typ: validationTypeGroup, - mi: vi.mi, - endGroup: num, - }) - continue State - case flags.ProtoLegacy && vi.typ == validationTypeMessageSetItem: - typeid, v, n, err := messageset.ConsumeFieldValue(b, false) - if err != nil { - return out, ValidationInvalid - } - xt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), typeid) - switch { - case err == protoregistry.NotFound: - b = b[n:] - case err != nil: - return out, ValidationUnknown - default: - xvi := getExtensionFieldInfo(xt).validation - if xvi.mi != nil { - xvi.mi.init() - } - states = append(states, validationState{ - typ: xvi.typ, - mi: xvi.mi, - tail: b[n:], - }) - b = v - continue State - } - default: - n := protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return out, ValidationInvalid - } - b = b[n:] - } - default: - return out, ValidationInvalid - } - } - if st.endGroup != 0 { - return out, ValidationInvalid - } - if len(b) != 0 { - return out, ValidationInvalid - } - b = st.tail - PopState: - numRequiredFields := 0 - switch st.typ { - case validationTypeMessage, validationTypeGroup: - numRequiredFields = int(st.mi.numRequiredFields) - case validationTypeMap: - // If this is a map field with a message value that contains - // required fields, require that the value be present. - if st.mi != nil && st.mi.numRequiredFields > 0 { - numRequiredFields = 1 - } - } - // If there are more than 64 required fields, this check will - // always fail and we will report that the message is potentially - // uninitialized. - if numRequiredFields > 0 && bits.OnesCount64(st.requiredMask) != numRequiredFields { - initialized = false - } - states = states[:len(states)-1] - } - out.n = start - len(b) - if initialized { - out.initialized = true - } - return out, ValidationValid -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/weak.go b/vendor/google.golang.org/protobuf/internal/impl/weak.go deleted file mode 100644 index eb79a7ba..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/weak.go +++ /dev/null @@ -1,74 +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 impl - -import ( - "fmt" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// weakFields adds methods to the exported WeakFields type for internal use. -// -// The exported type is an alias to an unnamed type, so methods can't be -// defined directly on it. -type weakFields WeakFields - -func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) { - m, ok := w[int32(num)] - return m, ok -} - -func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) { - if *w == nil { - *w = make(weakFields) - } - (*w)[int32(num)] = m -} - -func (w *weakFields) clear(num protoreflect.FieldNumber) { - delete(*w, int32(num)) -} - -func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool { - _, ok := w[int32(num)] - return ok -} - -func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) { - delete(*w, int32(num)) -} - -func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage { - if m, ok := w[int32(num)]; ok { - return m - } - mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) - if mt == nil { - panic(fmt.Sprintf("message %v for weak field is not linked in", name)) - } - return mt.Zero().Interface() -} - -func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) { - if m != nil { - mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) - if mt == nil { - panic(fmt.Sprintf("message %v for weak field is not linked in", name)) - } - if mt != m.ProtoReflect().Type() { - panic(fmt.Sprintf("invalid message type for weak field: got %T, want %T", m, mt.Zero().Interface())) - } - } - if m == nil || !m.ProtoReflect().IsValid() { - delete(*w, int32(num)) - return - } - if *w == nil { - *w = make(weakFields) - } - (*w)[int32(num)] = m -} diff --git a/vendor/google.golang.org/protobuf/internal/order/order.go b/vendor/google.golang.org/protobuf/internal/order/order.go deleted file mode 100644 index dea522e1..00000000 --- a/vendor/google.golang.org/protobuf/internal/order/order.go +++ /dev/null @@ -1,89 +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 order - -import ( - "google.golang.org/protobuf/reflect/protoreflect" -) - -// FieldOrder specifies the ordering to visit message fields. -// It is a function that reports whether x is ordered before y. -type FieldOrder func(x, y protoreflect.FieldDescriptor) bool - -var ( - // AnyFieldOrder specifies no specific field ordering. - AnyFieldOrder FieldOrder = nil - - // LegacyFieldOrder sorts fields in the same ordering as emitted by - // wire serialization in the github.com/golang/protobuf implementation. - LegacyFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool { - ox, oy := x.ContainingOneof(), y.ContainingOneof() - inOneof := func(od protoreflect.OneofDescriptor) bool { - return od != nil && !od.IsSynthetic() - } - - // Extension fields sort before non-extension fields. - if x.IsExtension() != y.IsExtension() { - return x.IsExtension() && !y.IsExtension() - } - // Fields not within a oneof sort before those within a oneof. - if inOneof(ox) != inOneof(oy) { - return !inOneof(ox) && inOneof(oy) - } - // Fields in disjoint oneof sets are sorted by declaration index. - if inOneof(ox) && inOneof(oy) && ox != oy { - return ox.Index() < oy.Index() - } - // Fields sorted by field number. - return x.Number() < y.Number() - } - - // NumberFieldOrder sorts fields by their field number. - NumberFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool { - return x.Number() < y.Number() - } - - // IndexNameFieldOrder sorts non-extension fields before extension fields. - // Non-extensions are sorted according to their declaration index. - // Extensions are sorted according to their full name. - IndexNameFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool { - // Non-extension fields sort before extension fields. - if x.IsExtension() != y.IsExtension() { - return !x.IsExtension() && y.IsExtension() - } - // Extensions sorted by fullname. - if x.IsExtension() && y.IsExtension() { - return x.FullName() < y.FullName() - } - // Non-extensions sorted by declaration index. - return x.Index() < y.Index() - } -) - -// KeyOrder specifies the ordering to visit map entries. -// It is a function that reports whether x is ordered before y. -type KeyOrder func(x, y protoreflect.MapKey) bool - -var ( - // AnyKeyOrder specifies no specific key ordering. - AnyKeyOrder KeyOrder = nil - - // GenericKeyOrder sorts false before true, numeric keys in ascending order, - // and strings in lexicographical ordering according to UTF-8 codepoints. - GenericKeyOrder KeyOrder = func(x, y protoreflect.MapKey) bool { - switch x.Interface().(type) { - case bool: - return !x.Bool() && y.Bool() - case int32, int64: - return x.Int() < y.Int() - case uint32, uint64: - return x.Uint() < y.Uint() - case string: - return x.String() < y.String() - default: - panic("invalid map key type") - } - } -) diff --git a/vendor/google.golang.org/protobuf/internal/order/range.go b/vendor/google.golang.org/protobuf/internal/order/range.go deleted file mode 100644 index 1665a68e..00000000 --- a/vendor/google.golang.org/protobuf/internal/order/range.go +++ /dev/null @@ -1,115 +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 order provides ordered access to messages and maps. -package order - -import ( - "sort" - "sync" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type messageField struct { - fd protoreflect.FieldDescriptor - v protoreflect.Value -} - -var messageFieldPool = sync.Pool{ - New: func() interface{} { return new([]messageField) }, -} - -type ( - // FieldRnger is an interface for visiting all fields in a message. - // The protoreflect.Message type implements this interface. - FieldRanger interface{ Range(VisitField) } - // VisitField is called every time a message field is visited. - VisitField = func(protoreflect.FieldDescriptor, protoreflect.Value) bool -) - -// RangeFields iterates over the fields of fs according to the specified order. -func RangeFields(fs FieldRanger, less FieldOrder, fn VisitField) { - if less == nil { - fs.Range(fn) - return - } - - // Obtain a pre-allocated scratch buffer. - p := messageFieldPool.Get().(*[]messageField) - fields := (*p)[:0] - defer func() { - if cap(fields) < 1024 { - *p = fields - messageFieldPool.Put(p) - } - }() - - // Collect all fields in the message and sort them. - fs.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - fields = append(fields, messageField{fd, v}) - return true - }) - sort.Slice(fields, func(i, j int) bool { - return less(fields[i].fd, fields[j].fd) - }) - - // Visit the fields in the specified ordering. - for _, f := range fields { - if !fn(f.fd, f.v) { - return - } - } -} - -type mapEntry struct { - k protoreflect.MapKey - v protoreflect.Value -} - -var mapEntryPool = sync.Pool{ - New: func() interface{} { return new([]mapEntry) }, -} - -type ( - // EntryRanger is an interface for visiting all fields in a message. - // The protoreflect.Map type implements this interface. - EntryRanger interface{ Range(VisitEntry) } - // VisitEntry is called every time a map entry is visited. - VisitEntry = func(protoreflect.MapKey, protoreflect.Value) bool -) - -// RangeEntries iterates over the entries of es according to the specified order. -func RangeEntries(es EntryRanger, less KeyOrder, fn VisitEntry) { - if less == nil { - es.Range(fn) - return - } - - // Obtain a pre-allocated scratch buffer. - p := mapEntryPool.Get().(*[]mapEntry) - entries := (*p)[:0] - defer func() { - if cap(entries) < 1024 { - *p = entries - mapEntryPool.Put(p) - } - }() - - // Collect all entries in the map and sort them. - es.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { - entries = append(entries, mapEntry{k, v}) - return true - }) - sort.Slice(entries, func(i, j int) bool { - return less(entries[i].k, entries[j].k) - }) - - // Visit the entries in the specified ordering. - for _, e := range entries { - if !fn(e.k, e.v) { - return - } - } -} diff --git a/vendor/google.golang.org/protobuf/internal/pragma/pragma.go b/vendor/google.golang.org/protobuf/internal/pragma/pragma.go deleted file mode 100644 index 49dc4fcd..00000000 --- a/vendor/google.golang.org/protobuf/internal/pragma/pragma.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. - -// Package pragma provides types that can be embedded into a struct to -// statically enforce or prevent certain language properties. -package pragma - -import "sync" - -// NoUnkeyedLiterals can be embedded in a struct to prevent unkeyed literals. -type NoUnkeyedLiterals struct{} - -// DoNotImplement can be embedded in an interface to prevent trivial -// implementations of the interface. -// -// This is useful to prevent unauthorized implementations of an interface -// so that it can be extended in the future for any protobuf language changes. -type DoNotImplement interface{ ProtoInternal(DoNotImplement) } - -// DoNotCompare can be embedded in a struct to prevent comparability. -type DoNotCompare [0]func() - -// DoNotCopy can be embedded in a struct to help prevent shallow copies. -// This does not rely on a Go language feature, but rather a special case -// within the vet checker. -// -// See https://golang.org/issues/8005. -type DoNotCopy [0]sync.Mutex diff --git a/vendor/google.golang.org/protobuf/internal/set/ints.go b/vendor/google.golang.org/protobuf/internal/set/ints.go deleted file mode 100644 index d3d7f89a..00000000 --- a/vendor/google.golang.org/protobuf/internal/set/ints.go +++ /dev/null @@ -1,58 +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. - -// Package set provides simple set data structures for uint64s. -package set - -import "math/bits" - -// int64s represents a set of integers within the range of 0..63. -type int64s uint64 - -func (bs *int64s) Len() int { - return bits.OnesCount64(uint64(*bs)) -} -func (bs *int64s) Has(n uint64) bool { - return uint64(*bs)&(uint64(1)< 0 -} -func (bs *int64s) Set(n uint64) { - *(*uint64)(bs) |= uint64(1) << n -} -func (bs *int64s) Clear(n uint64) { - *(*uint64)(bs) &^= uint64(1) << n -} - -// Ints represents a set of integers within the range of 0..math.MaxUint64. -type Ints struct { - lo int64s - hi map[uint64]struct{} -} - -func (bs *Ints) Len() int { - return bs.lo.Len() + len(bs.hi) -} -func (bs *Ints) Has(n uint64) bool { - if n < 64 { - return bs.lo.Has(n) - } - _, ok := bs.hi[n] - return ok -} -func (bs *Ints) Set(n uint64) { - if n < 64 { - bs.lo.Set(n) - return - } - if bs.hi == nil { - bs.hi = make(map[uint64]struct{}) - } - bs.hi[n] = struct{}{} -} -func (bs *Ints) Clear(n uint64) { - if n < 64 { - bs.lo.Clear(n) - return - } - delete(bs.hi, n) -} diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings.go b/vendor/google.golang.org/protobuf/internal/strs/strings.go deleted file mode 100644 index 0b74e765..00000000 --- a/vendor/google.golang.org/protobuf/internal/strs/strings.go +++ /dev/null @@ -1,196 +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 strs provides string manipulation functionality specific to protobuf. -package strs - -import ( - "go/token" - "strings" - "unicode" - "unicode/utf8" - - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// EnforceUTF8 reports whether to enforce strict UTF-8 validation. -func EnforceUTF8(fd protoreflect.FieldDescriptor) bool { - if flags.ProtoLegacy { - if fd, ok := fd.(interface{ EnforceUTF8() bool }); ok { - return fd.EnforceUTF8() - } - } - return fd.Syntax() == protoreflect.Proto3 -} - -// GoCamelCase camel-cases a protobuf name for use as a Go identifier. -// -// If there is an interior underscore followed by a lower case letter, -// drop the underscore and convert the letter to upper case. -func GoCamelCase(s string) string { - // Invariant: if the next letter is lower case, it must be converted - // to upper case. - // That is, we process a word at a time, where words are marked by _ or - // upper case letter. Digits are treated as words. - var b []byte - for i := 0; i < len(s); i++ { - c := s[i] - switch { - case c == '.' && i+1 < len(s) && isASCIILower(s[i+1]): - // Skip over '.' in ".{{lowercase}}". - case c == '.': - b = append(b, '_') // convert '.' to '_' - case c == '_' && (i == 0 || s[i-1] == '.'): - // Convert initial '_' to ensure we start with a capital letter. - // Do the same for '_' after '.' to match historic behavior. - b = append(b, 'X') // convert '_' to 'X' - case c == '_' && i+1 < len(s) && isASCIILower(s[i+1]): - // Skip over '_' in "_{{lowercase}}". - case isASCIIDigit(c): - b = append(b, c) - default: - // Assume we have a letter now - if not, it's a bogus identifier. - // The next word is a sequence of characters that must start upper case. - if isASCIILower(c) { - c -= 'a' - 'A' // convert lowercase to uppercase - } - b = append(b, c) - - // Accept lower case sequence that follows. - for ; i+1 < len(s) && isASCIILower(s[i+1]); i++ { - b = append(b, s[i+1]) - } - } - } - return string(b) -} - -// GoSanitized converts a string to a valid Go identifier. -func GoSanitized(s string) string { - // Sanitize the input to the set of valid characters, - // which must be '_' or be in the Unicode L or N categories. - s = strings.Map(func(r rune) rune { - if unicode.IsLetter(r) || unicode.IsDigit(r) { - return r - } - return '_' - }, s) - - // Prepend '_' in the event of a Go keyword conflict or if - // the identifier is invalid (does not start in the Unicode L category). - r, _ := utf8.DecodeRuneInString(s) - if token.Lookup(s).IsKeyword() || !unicode.IsLetter(r) { - return "_" + s - } - return s -} - -// JSONCamelCase converts a snake_case identifier to a camelCase identifier, -// according to the protobuf JSON specification. -func JSONCamelCase(s string) string { - var b []byte - var wasUnderscore bool - for i := 0; i < len(s); i++ { // proto identifiers are always ASCII - c := s[i] - if c != '_' { - if wasUnderscore && isASCIILower(c) { - c -= 'a' - 'A' // convert to uppercase - } - b = append(b, c) - } - wasUnderscore = c == '_' - } - return string(b) -} - -// JSONSnakeCase converts a camelCase identifier to a snake_case identifier, -// according to the protobuf JSON specification. -func JSONSnakeCase(s string) string { - var b []byte - for i := 0; i < len(s); i++ { // proto identifiers are always ASCII - c := s[i] - if isASCIIUpper(c) { - b = append(b, '_') - c += 'a' - 'A' // convert to lowercase - } - b = append(b, c) - } - return string(b) -} - -// MapEntryName derives the name of the map entry message given the field name. -// See protoc v3.8.0: src/google/protobuf/descriptor.cc:254-276,6057 -func MapEntryName(s string) string { - var b []byte - upperNext := true - for _, c := range s { - switch { - case c == '_': - upperNext = true - case upperNext: - b = append(b, byte(unicode.ToUpper(c))) - upperNext = false - default: - b = append(b, byte(c)) - } - } - b = append(b, "Entry"...) - return string(b) -} - -// EnumValueName derives the camel-cased enum value name. -// See protoc v3.8.0: src/google/protobuf/descriptor.cc:297-313 -func EnumValueName(s string) string { - var b []byte - upperNext := true - for _, c := range s { - switch { - case c == '_': - upperNext = true - case upperNext: - b = append(b, byte(unicode.ToUpper(c))) - upperNext = false - default: - b = append(b, byte(unicode.ToLower(c))) - upperNext = false - } - } - return string(b) -} - -// TrimEnumPrefix trims the enum name prefix from an enum value name, -// where the prefix is all lowercase without underscores. -// See protoc v3.8.0: src/google/protobuf/descriptor.cc:330-375 -func TrimEnumPrefix(s, prefix string) string { - s0 := s // original input - for len(s) > 0 && len(prefix) > 0 { - if s[0] == '_' { - s = s[1:] - continue - } - if unicode.ToLower(rune(s[0])) != rune(prefix[0]) { - return s0 // no prefix match - } - s, prefix = s[1:], prefix[1:] - } - if len(prefix) > 0 { - return s0 // no prefix match - } - s = strings.TrimLeft(s, "_") - if len(s) == 0 { - return s0 // avoid returning empty string - } - return s -} - -func isASCIILower(c byte) bool { - return 'a' <= c && c <= 'z' -} -func isASCIIUpper(c byte) bool { - return 'A' <= c && c <= 'Z' -} -func isASCIIDigit(c byte) bool { - return '0' <= c && c <= '9' -} diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go deleted file mode 100644 index a1f6f333..00000000 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.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 purego || appengine -// +build purego appengine - -package strs - -import pref "google.golang.org/protobuf/reflect/protoreflect" - -func UnsafeString(b []byte) string { - return string(b) -} - -func UnsafeBytes(s string) []byte { - return []byte(s) -} - -type Builder struct{} - -func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { - return prefix.Append(name) -} - -func (*Builder) MakeString(b []byte) string { - return string(b) -} diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go deleted file mode 100644 index a008acd0..00000000 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +++ /dev/null @@ -1,95 +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 !purego && !appengine && !go1.21 -// +build !purego,!appengine,!go1.21 - -package strs - -import ( - "unsafe" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type ( - stringHeader struct { - Data unsafe.Pointer - Len int - } - sliceHeader struct { - Data unsafe.Pointer - Len int - Cap int - } -) - -// UnsafeString returns an unsafe string reference of b. -// The caller must treat the input slice as immutable. -// -// WARNING: Use carefully. The returned result must not leak to the end user -// unless the input slice is provably immutable. -func UnsafeString(b []byte) (s string) { - src := (*sliceHeader)(unsafe.Pointer(&b)) - dst := (*stringHeader)(unsafe.Pointer(&s)) - dst.Data = src.Data - dst.Len = src.Len - return s -} - -// UnsafeBytes returns an unsafe bytes slice reference of s. -// The caller must treat returned slice as immutable. -// -// WARNING: Use carefully. The returned result must not leak to the end user. -func UnsafeBytes(s string) (b []byte) { - src := (*stringHeader)(unsafe.Pointer(&s)) - dst := (*sliceHeader)(unsafe.Pointer(&b)) - dst.Data = src.Data - dst.Len = src.Len - dst.Cap = src.Len - return b -} - -// Builder builds a set of strings with shared lifetime. -// This differs from strings.Builder, which is for building a single string. -type Builder struct { - buf []byte -} - -// AppendFullName is equivalent to protoreflect.FullName.Append, -// but optimized for large batches where each name has a shared lifetime. -func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName { - n := len(prefix) + len(".") + len(name) - if len(prefix) == 0 { - n -= len(".") - } - sb.grow(n) - sb.buf = append(sb.buf, prefix...) - sb.buf = append(sb.buf, '.') - sb.buf = append(sb.buf, name...) - return protoreflect.FullName(sb.last(n)) -} - -// MakeString is equivalent to string(b), but optimized for large batches -// with a shared lifetime. -func (sb *Builder) MakeString(b []byte) string { - sb.grow(len(b)) - sb.buf = append(sb.buf, b...) - return sb.last(len(b)) -} - -func (sb *Builder) grow(n int) { - if cap(sb.buf)-len(sb.buf) >= n { - return - } - - // Unlike strings.Builder, we do not need to copy over the contents - // of the old buffer since our builder provides no API for - // retrieving previously created strings. - sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n)) -} - -func (sb *Builder) last(n int) string { - return UnsafeString(sb.buf[len(sb.buf)-n:]) -} diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go deleted file mode 100644 index 60166f2b..00000000 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go +++ /dev/null @@ -1,74 +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 !purego && !appengine && go1.21 -// +build !purego,!appengine,go1.21 - -package strs - -import ( - "unsafe" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -// UnsafeString returns an unsafe string reference of b. -// The caller must treat the input slice as immutable. -// -// WARNING: Use carefully. The returned result must not leak to the end user -// unless the input slice is provably immutable. -func UnsafeString(b []byte) string { - return unsafe.String(unsafe.SliceData(b), len(b)) -} - -// UnsafeBytes returns an unsafe bytes slice reference of s. -// The caller must treat returned slice as immutable. -// -// WARNING: Use carefully. The returned result must not leak to the end user. -func UnsafeBytes(s string) []byte { - return unsafe.Slice(unsafe.StringData(s), len(s)) -} - -// Builder builds a set of strings with shared lifetime. -// This differs from strings.Builder, which is for building a single string. -type Builder struct { - buf []byte -} - -// AppendFullName is equivalent to protoreflect.FullName.Append, -// but optimized for large batches where each name has a shared lifetime. -func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName { - n := len(prefix) + len(".") + len(name) - if len(prefix) == 0 { - n -= len(".") - } - sb.grow(n) - sb.buf = append(sb.buf, prefix...) - sb.buf = append(sb.buf, '.') - sb.buf = append(sb.buf, name...) - return protoreflect.FullName(sb.last(n)) -} - -// MakeString is equivalent to string(b), but optimized for large batches -// with a shared lifetime. -func (sb *Builder) MakeString(b []byte) string { - sb.grow(len(b)) - sb.buf = append(sb.buf, b...) - return sb.last(len(b)) -} - -func (sb *Builder) grow(n int) { - if cap(sb.buf)-len(sb.buf) >= n { - return - } - - // Unlike strings.Builder, we do not need to copy over the contents - // of the old buffer since our builder provides no API for - // retrieving previously created strings. - sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n)) -} - -func (sb *Builder) last(n int) string { - return UnsafeString(sb.buf[len(sb.buf)-n:]) -} diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go deleted file mode 100644 index d8f48faf..00000000 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ /dev/null @@ -1,79 +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 version records versioning information about this module. -package version - -import ( - "fmt" - "strings" -) - -// These constants determine the current version of this module. -// -// For our release process, we enforce the following rules: -// - Tagged releases use a tag that is identical to String. -// - Tagged releases never reference a commit where the String -// contains "devel". -// - The set of all commits in this repository where String -// does not contain "devel" must have a unique String. -// -// Steps for tagging a new release: -// -// 1. Create a new CL. -// -// 2. Update Minor, Patch, and/or PreRelease as necessary. -// PreRelease must not contain the string "devel". -// -// 3. Since the last released minor version, have there been any changes to -// generator that relies on new functionality in the runtime? -// If yes, then increment RequiredGenerated. -// -// 4. Since the last released minor version, have there been any changes to -// the runtime that removes support for old .pb.go source code? -// If yes, then increment SupportMinimum. -// -// 5. Send out the CL for review and submit it. -// Note that the next CL in step 8 must be submitted after this CL -// without any other CLs in-between. -// -// 6. Tag a new version, where the tag is is the current String. -// -// 7. Write release notes for all notable changes -// between this release and the last release. -// -// 8. Create a new CL. -// -// 9. Update PreRelease to include the string "devel". -// For example: "" -> "devel" or "rc.1" -> "rc.1.devel" -// -// 10. Send out the CL for review and submit it. -const ( - Major = 1 - Minor = 32 - Patch = 0 - PreRelease = "" -) - -// String formats the version string for this module in semver format. -// -// Examples: -// -// v1.20.1 -// v1.21.0-rc.1 -func String() string { - v := fmt.Sprintf("v%d.%d.%d", Major, Minor, Patch) - if PreRelease != "" { - v += "-" + PreRelease - - // TODO: Add metadata about the commit or build hash. - // See https://golang.org/issue/29814 - // See https://golang.org/issue/33533 - var metadata string - if strings.Contains(PreRelease, "devel") && metadata != "" { - v += "+" + metadata - } - } - return v -} diff --git a/vendor/google.golang.org/protobuf/proto/checkinit.go b/vendor/google.golang.org/protobuf/proto/checkinit.go deleted file mode 100644 index 3e9a6a2f..00000000 --- a/vendor/google.golang.org/protobuf/proto/checkinit.go +++ /dev/null @@ -1,71 +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 proto - -import ( - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// CheckInitialized returns an error if any required fields in m are not set. -func CheckInitialized(m Message) error { - // Treat a nil message interface as an "untyped" empty message, - // which we assume to have no required fields. - if m == nil { - return nil - } - - return checkInitialized(m.ProtoReflect()) -} - -// CheckInitialized returns an error if any required fields in m are not set. -func checkInitialized(m protoreflect.Message) error { - if methods := protoMethods(m); methods != nil && methods.CheckInitialized != nil { - _, err := methods.CheckInitialized(protoiface.CheckInitializedInput{ - Message: m, - }) - return err - } - return checkInitializedSlow(m) -} - -func checkInitializedSlow(m protoreflect.Message) error { - md := m.Descriptor() - fds := md.Fields() - for i, nums := 0, md.RequiredNumbers(); i < nums.Len(); i++ { - fd := fds.ByNumber(nums.Get(i)) - if !m.Has(fd) { - return errors.RequiredNotSet(string(fd.FullName())) - } - } - var err error - m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - switch { - case fd.IsList(): - if fd.Message() == nil { - return true - } - for i, list := 0, v.List(); i < list.Len() && err == nil; i++ { - err = checkInitialized(list.Get(i).Message()) - } - case fd.IsMap(): - if fd.MapValue().Message() == nil { - return true - } - v.Map().Range(func(key protoreflect.MapKey, v protoreflect.Value) bool { - err = checkInitialized(v.Message()) - return err == nil - }) - default: - if fd.Message() == nil { - return true - } - err = checkInitialized(v.Message()) - } - return err == nil - }) - return err -} diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go deleted file mode 100644 index e5b03b56..00000000 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ /dev/null @@ -1,294 +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. - -package proto - -import ( - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoiface" -) - -// UnmarshalOptions configures the unmarshaler. -// -// Example usage: -// -// err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m) -type UnmarshalOptions struct { - pragma.NoUnkeyedLiterals - - // Merge merges the input into the destination message. - // The default behavior is to always reset the message before unmarshaling, - // unless Merge is specified. - Merge bool - - // AllowPartial accepts input for messages that will result in missing - // required fields. If AllowPartial is false (the default), Unmarshal will - // return an error if there are any missing required fields. - AllowPartial bool - - // If DiscardUnknown is set, unknown fields are ignored. - DiscardUnknown bool - - // Resolver is used for looking up types when unmarshaling extension fields. - // If nil, this defaults to using protoregistry.GlobalTypes. - Resolver interface { - FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) - FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) - } - - // RecursionLimit limits how deeply messages may be nested. - // If zero, a default limit is applied. - RecursionLimit int -} - -// Unmarshal parses the wire-format message in b and places the result in m. -// The provided message must be mutable (e.g., a non-nil pointer to a message). -func Unmarshal(b []byte, m Message) error { - _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect()) - return err -} - -// Unmarshal parses the wire-format message in b and places the result in m. -// The provided message must be mutable (e.g., a non-nil pointer to a message). -func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { - if o.RecursionLimit == 0 { - o.RecursionLimit = protowire.DefaultRecursionLimit - } - _, err := o.unmarshal(b, m.ProtoReflect()) - return err -} - -// UnmarshalState parses a wire-format message and places the result in m. -// -// This method permits fine-grained control over the unmarshaler. -// Most users should use [Unmarshal] instead. -func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - if o.RecursionLimit == 0 { - o.RecursionLimit = protowire.DefaultRecursionLimit - } - return o.unmarshal(in.Buf, in.Message) -} - -// unmarshal is a centralized function that all unmarshal operations go through. -// For profiling purposes, avoid changing the name of this function or -// introducing other code paths for unmarshal that do not go through this. -func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out protoiface.UnmarshalOutput, err error) { - if o.Resolver == nil { - o.Resolver = protoregistry.GlobalTypes - } - if !o.Merge { - Reset(m.Interface()) - } - allowPartial := o.AllowPartial - o.Merge = true - o.AllowPartial = true - methods := protoMethods(m) - if methods != nil && methods.Unmarshal != nil && - !(o.DiscardUnknown && methods.Flags&protoiface.SupportUnmarshalDiscardUnknown == 0) { - in := protoiface.UnmarshalInput{ - Message: m, - Buf: b, - Resolver: o.Resolver, - Depth: o.RecursionLimit, - } - if o.DiscardUnknown { - in.Flags |= protoiface.UnmarshalDiscardUnknown - } - out, err = methods.Unmarshal(in) - } else { - o.RecursionLimit-- - if o.RecursionLimit < 0 { - return out, errors.New("exceeded max recursion depth") - } - err = o.unmarshalMessageSlow(b, m) - } - if err != nil { - return out, err - } - if allowPartial || (out.Flags&protoiface.UnmarshalInitialized != 0) { - return out, nil - } - return out, checkInitialized(m) -} - -func (o UnmarshalOptions) unmarshalMessage(b []byte, m protoreflect.Message) error { - _, err := o.unmarshal(b, m) - return err -} - -func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) error { - md := m.Descriptor() - if messageset.IsMessageSet(md) { - return o.unmarshalMessageSet(b, m) - } - fields := md.Fields() - for len(b) > 0 { - // Parse the tag (field number and wire type). - num, wtyp, tagLen := protowire.ConsumeTag(b) - if tagLen < 0 { - return errDecode - } - if num > protowire.MaxValidNumber { - return errDecode - } - - // Find the field descriptor for this field number. - fd := fields.ByNumber(num) - if fd == nil && md.ExtensionRanges().Has(num) { - extType, err := o.Resolver.FindExtensionByNumber(md.FullName(), num) - if err != nil && err != protoregistry.NotFound { - return errors.New("%v: unable to resolve extension %v: %v", md.FullName(), num, err) - } - if extType != nil { - fd = extType.TypeDescriptor() - } - } - var err error - if fd == nil { - err = errUnknown - } else if flags.ProtoLegacy { - if fd.IsWeak() && fd.Message().IsPlaceholder() { - err = errUnknown // weak referent is not linked in - } - } - - // Parse the field value. - var valLen int - switch { - case err != nil: - case fd.IsList(): - valLen, err = o.unmarshalList(b[tagLen:], wtyp, m.Mutable(fd).List(), fd) - case fd.IsMap(): - valLen, err = o.unmarshalMap(b[tagLen:], wtyp, m.Mutable(fd).Map(), fd) - default: - valLen, err = o.unmarshalSingular(b[tagLen:], wtyp, m, fd) - } - if err != nil { - if err != errUnknown { - return err - } - valLen = protowire.ConsumeFieldValue(num, wtyp, b[tagLen:]) - if valLen < 0 { - return errDecode - } - if !o.DiscardUnknown { - m.SetUnknown(append(m.GetUnknown(), b[:tagLen+valLen]...)) - } - } - b = b[tagLen+valLen:] - } - return nil -} - -func (o UnmarshalOptions) unmarshalSingular(b []byte, wtyp protowire.Type, m protoreflect.Message, fd protoreflect.FieldDescriptor) (n int, err error) { - v, n, err := o.unmarshalScalar(b, wtyp, fd) - if err != nil { - return 0, err - } - switch fd.Kind() { - case protoreflect.GroupKind, protoreflect.MessageKind: - m2 := m.Mutable(fd).Message() - if err := o.unmarshalMessage(v.Bytes(), m2); err != nil { - return n, err - } - default: - // Non-message scalars replace the previous value. - m.Set(fd, v) - } - return n, nil -} - -func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv protoreflect.Map, fd protoreflect.FieldDescriptor) (n int, err error) { - if wtyp != protowire.BytesType { - return 0, errUnknown - } - b, n = protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - var ( - keyField = fd.MapKey() - valField = fd.MapValue() - key protoreflect.Value - val protoreflect.Value - haveKey bool - haveVal bool - ) - switch valField.Kind() { - case protoreflect.GroupKind, protoreflect.MessageKind: - val = mapv.NewValue() - } - // Map entries are represented as a two-element message with fields - // containing the key and value. - for len(b) > 0 { - num, wtyp, n := protowire.ConsumeTag(b) - if n < 0 { - return 0, errDecode - } - if num > protowire.MaxValidNumber { - return 0, errDecode - } - b = b[n:] - err = errUnknown - switch num { - case genid.MapEntry_Key_field_number: - key, n, err = o.unmarshalScalar(b, wtyp, keyField) - if err != nil { - break - } - haveKey = true - case genid.MapEntry_Value_field_number: - var v protoreflect.Value - v, n, err = o.unmarshalScalar(b, wtyp, valField) - if err != nil { - break - } - switch valField.Kind() { - case protoreflect.GroupKind, protoreflect.MessageKind: - if err := o.unmarshalMessage(v.Bytes(), val.Message()); err != nil { - return 0, err - } - default: - val = v - } - haveVal = true - } - if err == errUnknown { - n = protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return 0, errDecode - } - } else if err != nil { - return 0, err - } - b = b[n:] - } - // Every map entry should have entries for key and value, but this is not strictly required. - if !haveKey { - key = keyField.Default() - } - if !haveVal { - switch valField.Kind() { - case protoreflect.GroupKind, protoreflect.MessageKind: - default: - val = valField.Default() - } - } - mapv.Set(key.MapKey(), val) - return n, nil -} - -// errUnknown is used internally to indicate fields which should be added -// to the unknown field set of a message. It is never returned from an exported -// function. -var errUnknown = errors.New("BUG: internal error (unknown)") - -var errDecode = errors.New("cannot parse invalid wire-format data") diff --git a/vendor/google.golang.org/protobuf/proto/decode_gen.go b/vendor/google.golang.org/protobuf/proto/decode_gen.go deleted file mode 100644 index 301eeb20..00000000 --- a/vendor/google.golang.org/protobuf/proto/decode_gen.go +++ /dev/null @@ -1,603 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package proto - -import ( - "math" - "unicode/utf8" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// unmarshalScalar decodes a value of the given kind. -// -// Message values are decoded into a []byte which aliases the input data. -func (o UnmarshalOptions) unmarshalScalar(b []byte, wtyp protowire.Type, fd protoreflect.FieldDescriptor) (val protoreflect.Value, n int, err error) { - switch fd.Kind() { - case protoreflect.BoolKind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfBool(protowire.DecodeBool(v)), n, nil - case protoreflect.EnumKind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)), n, nil - case protoreflect.Int32Kind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfInt32(int32(v)), n, nil - case protoreflect.Sint32Kind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))), n, nil - case protoreflect.Uint32Kind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfUint32(uint32(v)), n, nil - case protoreflect.Int64Kind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfInt64(int64(v)), n, nil - case protoreflect.Sint64Kind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), n, nil - case protoreflect.Uint64Kind: - if wtyp != protowire.VarintType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfUint64(v), n, nil - case protoreflect.Sfixed32Kind: - if wtyp != protowire.Fixed32Type { - return val, 0, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfInt32(int32(v)), n, nil - case protoreflect.Fixed32Kind: - if wtyp != protowire.Fixed32Type { - return val, 0, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfUint32(uint32(v)), n, nil - case protoreflect.FloatKind: - if wtyp != protowire.Fixed32Type { - return val, 0, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))), n, nil - case protoreflect.Sfixed64Kind: - if wtyp != protowire.Fixed64Type { - return val, 0, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfInt64(int64(v)), n, nil - case protoreflect.Fixed64Kind: - if wtyp != protowire.Fixed64Type { - return val, 0, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfUint64(v), n, nil - case protoreflect.DoubleKind: - if wtyp != protowire.Fixed64Type { - return val, 0, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfFloat64(math.Float64frombits(v)), n, nil - case protoreflect.StringKind: - if wtyp != protowire.BytesType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return val, 0, errDecode - } - if strs.EnforceUTF8(fd) && !utf8.Valid(v) { - return protoreflect.Value{}, 0, errors.InvalidUTF8(string(fd.FullName())) - } - return protoreflect.ValueOfString(string(v)), n, nil - case protoreflect.BytesKind: - if wtyp != protowire.BytesType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfBytes(append(emptyBuf[:], v...)), n, nil - case protoreflect.MessageKind: - if wtyp != protowire.BytesType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfBytes(v), n, nil - case protoreflect.GroupKind: - if wtyp != protowire.StartGroupType { - return val, 0, errUnknown - } - v, n := protowire.ConsumeGroup(fd.Number(), b) - if n < 0 { - return val, 0, errDecode - } - return protoreflect.ValueOfBytes(v), n, nil - default: - return val, 0, errUnknown - } -} - -func (o UnmarshalOptions) unmarshalList(b []byte, wtyp protowire.Type, list protoreflect.List, fd protoreflect.FieldDescriptor) (n int, err error) { - switch fd.Kind() { - case protoreflect.BoolKind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v))) - return n, nil - case protoreflect.EnumKind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v))) - return n, nil - case protoreflect.Int32Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfInt32(int32(v))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(v))) - return n, nil - case protoreflect.Sint32Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32)))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32)))) - return n, nil - case protoreflect.Uint32Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfUint32(uint32(v))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfUint32(uint32(v))) - return n, nil - case protoreflect.Int64Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfInt64(int64(v))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfInt64(int64(v))) - return n, nil - case protoreflect.Sint64Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v))) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v))) - return n, nil - case protoreflect.Uint64Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeVarint(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfUint64(v)) - } - return n, nil - } - if wtyp != protowire.VarintType { - return 0, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfUint64(v)) - return n, nil - case protoreflect.Sfixed32Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeFixed32(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfInt32(int32(v))) - } - return n, nil - } - if wtyp != protowire.Fixed32Type { - return 0, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfInt32(int32(v))) - return n, nil - case protoreflect.Fixed32Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeFixed32(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfUint32(uint32(v))) - } - return n, nil - } - if wtyp != protowire.Fixed32Type { - return 0, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfUint32(uint32(v))) - return n, nil - case protoreflect.FloatKind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeFixed32(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v)))) - } - return n, nil - } - if wtyp != protowire.Fixed32Type { - return 0, errUnknown - } - v, n := protowire.ConsumeFixed32(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v)))) - return n, nil - case protoreflect.Sfixed64Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeFixed64(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfInt64(int64(v))) - } - return n, nil - } - if wtyp != protowire.Fixed64Type { - return 0, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfInt64(int64(v))) - return n, nil - case protoreflect.Fixed64Kind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeFixed64(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfUint64(v)) - } - return n, nil - } - if wtyp != protowire.Fixed64Type { - return 0, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfUint64(v)) - return n, nil - case protoreflect.DoubleKind: - if wtyp == protowire.BytesType { - buf, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - for len(buf) > 0 { - v, n := protowire.ConsumeFixed64(buf) - if n < 0 { - return 0, errDecode - } - buf = buf[n:] - list.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v))) - } - return n, nil - } - if wtyp != protowire.Fixed64Type { - return 0, errUnknown - } - v, n := protowire.ConsumeFixed64(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v))) - return n, nil - case protoreflect.StringKind: - if wtyp != protowire.BytesType { - return 0, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - if strs.EnforceUTF8(fd) && !utf8.Valid(v) { - return 0, errors.InvalidUTF8(string(fd.FullName())) - } - list.Append(protoreflect.ValueOfString(string(v))) - return n, nil - case protoreflect.BytesKind: - if wtyp != protowire.BytesType { - return 0, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - list.Append(protoreflect.ValueOfBytes(append(emptyBuf[:], v...))) - return n, nil - case protoreflect.MessageKind: - if wtyp != protowire.BytesType { - return 0, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return 0, errDecode - } - m := list.NewElement() - if err := o.unmarshalMessage(v, m.Message()); err != nil { - return 0, err - } - list.Append(m) - return n, nil - case protoreflect.GroupKind: - if wtyp != protowire.StartGroupType { - return 0, errUnknown - } - v, n := protowire.ConsumeGroup(fd.Number(), b) - if n < 0 { - return 0, errDecode - } - m := list.NewElement() - if err := o.unmarshalMessage(v, m.Message()); err != nil { - return 0, err - } - list.Append(m) - return n, nil - default: - return 0, errUnknown - } -} - -// We append to an empty array rather than a nil []byte to get non-nil zero-length byte slices. -var emptyBuf [0]byte diff --git a/vendor/google.golang.org/protobuf/proto/doc.go b/vendor/google.golang.org/protobuf/proto/doc.go deleted file mode 100644 index 80ed16a0..00000000 --- a/vendor/google.golang.org/protobuf/proto/doc.go +++ /dev/null @@ -1,86 +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 proto provides functions operating on protocol buffer messages. -// -// For documentation on protocol buffers in general, see: -// https://protobuf.dev. -// -// For a tutorial on using protocol buffers with Go, see: -// https://protobuf.dev/getting-started/gotutorial. -// -// For a guide to generated Go protocol buffer code, see: -// https://protobuf.dev/reference/go/go-generated. -// -// # Binary serialization -// -// This package contains functions to convert to and from the wire format, -// an efficient binary serialization of protocol buffers. -// -// - [Size] reports the size of a message in the wire format. -// -// - [Marshal] converts a message to the wire format. -// The [MarshalOptions] type provides more control over wire marshaling. -// -// - [Unmarshal] converts a message from the wire format. -// The [UnmarshalOptions] type provides more control over wire unmarshaling. -// -// # Basic message operations -// -// - [Clone] makes a deep copy of a message. -// -// - [Merge] merges the content of a message into another. -// -// - [Equal] compares two messages. For more control over comparisons -// and detailed reporting of differences, see package -// [google.golang.org/protobuf/testing/protocmp]. -// -// - [Reset] clears the content of a message. -// -// - [CheckInitialized] reports whether all required fields in a message are set. -// -// # Optional scalar constructors -// -// The API for some generated messages represents optional scalar fields -// as pointers to a value. For example, an optional string field has the -// Go type *string. -// -// - [Bool], [Int32], [Int64], [Uint32], [Uint64], [Float32], [Float64], and [String] -// take a value and return a pointer to a new instance of it, -// to simplify construction of optional field values. -// -// Generated enum types usually have an Enum method which performs the -// same operation. -// -// Optional scalar fields are only supported in proto2. -// -// # Extension accessors -// -// - [HasExtension], [GetExtension], [SetExtension], and [ClearExtension] -// access extension field values in a protocol buffer message. -// -// Extension fields are only supported in proto2. -// -// # Related packages -// -// - Package [google.golang.org/protobuf/encoding/protojson] converts messages to -// and from JSON. -// -// - Package [google.golang.org/protobuf/encoding/prototext] converts messages to -// and from the text format. -// -// - Package [google.golang.org/protobuf/reflect/protoreflect] provides a -// reflection interface for protocol buffer data types. -// -// - Package [google.golang.org/protobuf/testing/protocmp] provides features -// to compare protocol buffer messages with the [github.com/google/go-cmp/cmp] -// package. -// -// - Package [google.golang.org/protobuf/types/dynamicpb] provides a dynamic -// message type, suitable for working with messages where the protocol buffer -// type is only known at runtime. -// -// This module contains additional packages for more specialized use cases. -// Consult the individual package documentation for details. -package proto diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go deleted file mode 100644 index 4fed202f..00000000 --- a/vendor/google.golang.org/protobuf/proto/encode.go +++ /dev/null @@ -1,322 +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 proto - -import ( - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/order" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// MarshalOptions configures the marshaler. -// -// Example usage: -// -// b, err := MarshalOptions{Deterministic: true}.Marshal(m) -type MarshalOptions struct { - pragma.NoUnkeyedLiterals - - // AllowPartial allows messages that have missing required fields to marshal - // without returning an error. If AllowPartial is false (the default), - // Marshal will return an error if there are any missing required fields. - AllowPartial bool - - // Deterministic controls whether the same message will always be - // serialized to the same bytes within the same binary. - // - // Setting this option guarantees that repeated serialization of - // the same message will return the same bytes, and that different - // processes of the same binary (which may be executing on different - // machines) will serialize equal messages to the same bytes. - // It has no effect on the resulting size of the encoded message compared - // to a non-deterministic marshal. - // - // Note that the deterministic serialization is NOT canonical across - // languages. It is not guaranteed to remain stable over time. It is - // unstable across different builds with schema changes due to unknown - // fields. Users who need canonical serialization (e.g., persistent - // storage in a canonical form, fingerprinting, etc.) must define - // their own canonicalization specification and implement their own - // serializer rather than relying on this API. - // - // If deterministic serialization is requested, map entries will be - // sorted by keys in lexographical order. This is an implementation - // detail and subject to change. - Deterministic bool - - // UseCachedSize indicates that the result of a previous Size call - // may be reused. - // - // Setting this option asserts that: - // - // 1. Size has previously been called on this message with identical - // options (except for UseCachedSize itself). - // - // 2. The message and all its submessages have not changed in any - // way since the Size call. - // - // If either of these invariants is violated, - // the results are undefined and may include panics or corrupted output. - // - // Implementations MAY take this option into account to provide - // better performance, but there is no guarantee that they will do so. - // There is absolutely no guarantee that Size followed by Marshal with - // UseCachedSize set will perform equivalently to Marshal alone. - UseCachedSize bool -} - -// Marshal returns the wire-format encoding of m. -func Marshal(m Message) ([]byte, error) { - // Treat nil message interface as an empty message; nothing to output. - if m == nil { - return nil, nil - } - - out, err := MarshalOptions{}.marshal(nil, m.ProtoReflect()) - if len(out.Buf) == 0 && err == nil { - out.Buf = emptyBytesForMessage(m) - } - return out.Buf, err -} - -// Marshal returns the wire-format encoding of m. -func (o MarshalOptions) Marshal(m Message) ([]byte, error) { - // Treat nil message interface as an empty message; nothing to output. - if m == nil { - return nil, nil - } - - out, err := o.marshal(nil, m.ProtoReflect()) - if len(out.Buf) == 0 && err == nil { - out.Buf = emptyBytesForMessage(m) - } - return out.Buf, err -} - -// emptyBytesForMessage returns a nil buffer if and only if m is invalid, -// otherwise it returns a non-nil empty buffer. -// -// This is to assist the edge-case where user-code does the following: -// -// m1.OptionalBytes, _ = proto.Marshal(m2) -// -// where they expect the proto2 "optional_bytes" field to be populated -// if any only if m2 is a valid message. -func emptyBytesForMessage(m Message) []byte { - if m == nil || !m.ProtoReflect().IsValid() { - return nil - } - return emptyBuf[:] -} - -// MarshalAppend appends the wire-format encoding of m to b, -// returning the result. -func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) { - // Treat nil message interface as an empty message; nothing to append. - if m == nil { - return b, nil - } - - out, err := o.marshal(b, m.ProtoReflect()) - return out.Buf, err -} - -// MarshalState returns the wire-format encoding of a message. -// -// This method permits fine-grained control over the marshaler. -// Most users should use [Marshal] instead. -func (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - return o.marshal(in.Buf, in.Message) -} - -// marshal is a centralized function that all marshal operations go through. -// For profiling purposes, avoid changing the name of this function or -// introducing other code paths for marshal that do not go through this. -func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoiface.MarshalOutput, err error) { - allowPartial := o.AllowPartial - o.AllowPartial = true - if methods := protoMethods(m); methods != nil && methods.Marshal != nil && - !(o.Deterministic && methods.Flags&protoiface.SupportMarshalDeterministic == 0) { - in := protoiface.MarshalInput{ - Message: m, - Buf: b, - } - if o.Deterministic { - in.Flags |= protoiface.MarshalDeterministic - } - if o.UseCachedSize { - in.Flags |= protoiface.MarshalUseCachedSize - } - if methods.Size != nil { - sout := methods.Size(protoiface.SizeInput{ - Message: m, - Flags: in.Flags, - }) - if cap(b) < len(b)+sout.Size { - in.Buf = make([]byte, len(b), growcap(cap(b), len(b)+sout.Size)) - copy(in.Buf, b) - } - in.Flags |= protoiface.MarshalUseCachedSize - } - out, err = methods.Marshal(in) - } else { - out.Buf, err = o.marshalMessageSlow(b, m) - } - if err != nil { - return out, err - } - if allowPartial { - return out, nil - } - return out, checkInitialized(m) -} - -func (o MarshalOptions) marshalMessage(b []byte, m protoreflect.Message) ([]byte, error) { - out, err := o.marshal(b, m) - return out.Buf, err -} - -// growcap scales up the capacity of a slice. -// -// Given a slice with a current capacity of oldcap and a desired -// capacity of wantcap, growcap returns a new capacity >= wantcap. -// -// The algorithm is mostly identical to the one used by append as of Go 1.14. -func growcap(oldcap, wantcap int) (newcap int) { - if wantcap > oldcap*2 { - newcap = wantcap - } else if oldcap < 1024 { - // The Go 1.14 runtime takes this case when len(s) < 1024, - // not when cap(s) < 1024. The difference doesn't seem - // significant here. - newcap = oldcap * 2 - } else { - newcap = oldcap - for 0 < newcap && newcap < wantcap { - newcap += newcap / 4 - } - if newcap <= 0 { - newcap = wantcap - } - } - return newcap -} - -func (o MarshalOptions) marshalMessageSlow(b []byte, m protoreflect.Message) ([]byte, error) { - if messageset.IsMessageSet(m.Descriptor()) { - return o.marshalMessageSet(b, m) - } - fieldOrder := order.AnyFieldOrder - if o.Deterministic { - // TODO: This should use a more natural ordering like NumberFieldOrder, - // but doing so breaks golden tests that make invalid assumption about - // output stability of this implementation. - fieldOrder = order.LegacyFieldOrder - } - var err error - order.RangeFields(m, fieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - b, err = o.marshalField(b, fd, v) - return err == nil - }) - if err != nil { - return b, err - } - b = append(b, m.GetUnknown()...) - return b, nil -} - -func (o MarshalOptions) marshalField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) { - switch { - case fd.IsList(): - return o.marshalList(b, fd, value.List()) - case fd.IsMap(): - return o.marshalMap(b, fd, value.Map()) - default: - b = protowire.AppendTag(b, fd.Number(), wireTypes[fd.Kind()]) - return o.marshalSingular(b, fd, value) - } -} - -func (o MarshalOptions) marshalList(b []byte, fd protoreflect.FieldDescriptor, list protoreflect.List) ([]byte, error) { - if fd.IsPacked() && list.Len() > 0 { - b = protowire.AppendTag(b, fd.Number(), protowire.BytesType) - b, pos := appendSpeculativeLength(b) - for i, llen := 0, list.Len(); i < llen; i++ { - var err error - b, err = o.marshalSingular(b, fd, list.Get(i)) - if err != nil { - return b, err - } - } - b = finishSpeculativeLength(b, pos) - return b, nil - } - - kind := fd.Kind() - for i, llen := 0, list.Len(); i < llen; i++ { - var err error - b = protowire.AppendTag(b, fd.Number(), wireTypes[kind]) - b, err = o.marshalSingular(b, fd, list.Get(i)) - if err != nil { - return b, err - } - } - return b, nil -} - -func (o MarshalOptions) marshalMap(b []byte, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) ([]byte, error) { - keyf := fd.MapKey() - valf := fd.MapValue() - keyOrder := order.AnyKeyOrder - if o.Deterministic { - keyOrder = order.GenericKeyOrder - } - var err error - order.RangeEntries(mapv, keyOrder, func(key protoreflect.MapKey, value protoreflect.Value) bool { - b = protowire.AppendTag(b, fd.Number(), protowire.BytesType) - var pos int - b, pos = appendSpeculativeLength(b) - - b, err = o.marshalField(b, keyf, key.Value()) - if err != nil { - return false - } - b, err = o.marshalField(b, valf, value) - if err != nil { - return false - } - b = finishSpeculativeLength(b, pos) - return true - }) - return b, err -} - -// When encoding length-prefixed fields, we speculatively set aside some number of bytes -// for the length, encode the data, and then encode the length (shifting the data if necessary -// to make room). -const speculativeLength = 1 - -func appendSpeculativeLength(b []byte) ([]byte, int) { - pos := len(b) - b = append(b, "\x00\x00\x00\x00"[:speculativeLength]...) - return b, pos -} - -func finishSpeculativeLength(b []byte, pos int) []byte { - mlen := len(b) - pos - speculativeLength - msiz := protowire.SizeVarint(uint64(mlen)) - if msiz != speculativeLength { - for i := 0; i < msiz-speculativeLength; i++ { - b = append(b, 0) - } - copy(b[pos+msiz:], b[pos+speculativeLength:]) - b = b[:pos+msiz+mlen] - } - protowire.AppendVarint(b[:pos], uint64(mlen)) - return b -} diff --git a/vendor/google.golang.org/protobuf/proto/encode_gen.go b/vendor/google.golang.org/protobuf/proto/encode_gen.go deleted file mode 100644 index 185dacfb..00000000 --- a/vendor/google.golang.org/protobuf/proto/encode_gen.go +++ /dev/null @@ -1,97 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package proto - -import ( - "math" - "unicode/utf8" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" -) - -var wireTypes = map[protoreflect.Kind]protowire.Type{ - protoreflect.BoolKind: protowire.VarintType, - protoreflect.EnumKind: protowire.VarintType, - protoreflect.Int32Kind: protowire.VarintType, - protoreflect.Sint32Kind: protowire.VarintType, - protoreflect.Uint32Kind: protowire.VarintType, - protoreflect.Int64Kind: protowire.VarintType, - protoreflect.Sint64Kind: protowire.VarintType, - protoreflect.Uint64Kind: protowire.VarintType, - protoreflect.Sfixed32Kind: protowire.Fixed32Type, - protoreflect.Fixed32Kind: protowire.Fixed32Type, - protoreflect.FloatKind: protowire.Fixed32Type, - protoreflect.Sfixed64Kind: protowire.Fixed64Type, - protoreflect.Fixed64Kind: protowire.Fixed64Type, - protoreflect.DoubleKind: protowire.Fixed64Type, - protoreflect.StringKind: protowire.BytesType, - protoreflect.BytesKind: protowire.BytesType, - protoreflect.MessageKind: protowire.BytesType, - protoreflect.GroupKind: protowire.StartGroupType, -} - -func (o MarshalOptions) marshalSingular(b []byte, fd protoreflect.FieldDescriptor, v protoreflect.Value) ([]byte, error) { - switch fd.Kind() { - case protoreflect.BoolKind: - b = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool())) - case protoreflect.EnumKind: - b = protowire.AppendVarint(b, uint64(v.Enum())) - case protoreflect.Int32Kind: - b = protowire.AppendVarint(b, uint64(int32(v.Int()))) - case protoreflect.Sint32Kind: - b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int())))) - case protoreflect.Uint32Kind: - b = protowire.AppendVarint(b, uint64(uint32(v.Uint()))) - case protoreflect.Int64Kind: - b = protowire.AppendVarint(b, uint64(v.Int())) - case protoreflect.Sint64Kind: - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int())) - case protoreflect.Uint64Kind: - b = protowire.AppendVarint(b, v.Uint()) - case protoreflect.Sfixed32Kind: - b = protowire.AppendFixed32(b, uint32(v.Int())) - case protoreflect.Fixed32Kind: - b = protowire.AppendFixed32(b, uint32(v.Uint())) - case protoreflect.FloatKind: - b = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float()))) - case protoreflect.Sfixed64Kind: - b = protowire.AppendFixed64(b, uint64(v.Int())) - case protoreflect.Fixed64Kind: - b = protowire.AppendFixed64(b, v.Uint()) - case protoreflect.DoubleKind: - b = protowire.AppendFixed64(b, math.Float64bits(v.Float())) - case protoreflect.StringKind: - if strs.EnforceUTF8(fd) && !utf8.ValidString(v.String()) { - return b, errors.InvalidUTF8(string(fd.FullName())) - } - b = protowire.AppendString(b, v.String()) - case protoreflect.BytesKind: - b = protowire.AppendBytes(b, v.Bytes()) - case protoreflect.MessageKind: - var pos int - var err error - b, pos = appendSpeculativeLength(b) - b, err = o.marshalMessage(b, v.Message()) - if err != nil { - return b, err - } - b = finishSpeculativeLength(b, pos) - case protoreflect.GroupKind: - var err error - b, err = o.marshalMessage(b, v.Message()) - if err != nil { - return b, err - } - b = protowire.AppendVarint(b, protowire.EncodeTag(fd.Number(), protowire.EndGroupType)) - default: - return b, errors.New("invalid kind %v", fd.Kind()) - } - return b, nil -} diff --git a/vendor/google.golang.org/protobuf/proto/equal.go b/vendor/google.golang.org/protobuf/proto/equal.go deleted file mode 100644 index 1a0be1b0..00000000 --- a/vendor/google.golang.org/protobuf/proto/equal.go +++ /dev/null @@ -1,57 +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 proto - -import ( - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -// Equal reports whether two messages are equal, -// by recursively comparing the fields of the message. -// -// - Bytes fields are equal if they contain identical bytes. -// Empty bytes (regardless of nil-ness) are considered equal. -// -// - Floating-point fields are equal if they contain the same value. -// Unlike the == operator, a NaN is equal to another NaN. -// -// - Other scalar fields are equal if they contain the same value. -// -// - Message fields are equal if they have -// the same set of populated known and extension field values, and -// the same set of unknown fields values. -// -// - Lists are equal if they are the same length and -// each corresponding element is equal. -// -// - Maps are equal if they have the same set of keys and -// the corresponding value for each key is equal. -// -// An invalid message is not equal to a valid message. -// An invalid message is only equal to another invalid message of the -// same type. An invalid message often corresponds to a nil pointer -// of the concrete message type. For example, (*pb.M)(nil) is not equal -// to &pb.M{}. -// If two valid messages marshal to the same bytes under deterministic -// serialization, then Equal is guaranteed to report true. -func Equal(x, y Message) bool { - if x == nil || y == nil { - return x == nil && y == nil - } - if reflect.TypeOf(x).Kind() == reflect.Ptr && x == y { - // Avoid an expensive comparison if both inputs are identical pointers. - return true - } - mx := x.ProtoReflect() - my := y.ProtoReflect() - if mx.IsValid() != my.IsValid() { - return false - } - vx := protoreflect.ValueOfMessage(mx) - vy := protoreflect.ValueOfMessage(my) - return vx.Equal(vy) -} diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go deleted file mode 100644 index 17899a3a..00000000 --- a/vendor/google.golang.org/protobuf/proto/extension.go +++ /dev/null @@ -1,92 +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 proto - -import ( - "google.golang.org/protobuf/reflect/protoreflect" -) - -// HasExtension reports whether an extension field is populated. -// It returns false if m is invalid or if xt does not extend m. -func HasExtension(m Message, xt protoreflect.ExtensionType) bool { - // Treat nil message interface as an empty message; no populated fields. - if m == nil { - return false - } - - // As a special-case, we reports invalid or mismatching descriptors - // as always not being populated (since they aren't). - if xt == nil || m.ProtoReflect().Descriptor() != xt.TypeDescriptor().ContainingMessage() { - return false - } - - return m.ProtoReflect().Has(xt.TypeDescriptor()) -} - -// ClearExtension clears an extension field such that subsequent -// [HasExtension] calls return false. -// It panics if m is invalid or if xt does not extend m. -func ClearExtension(m Message, xt protoreflect.ExtensionType) { - m.ProtoReflect().Clear(xt.TypeDescriptor()) -} - -// GetExtension retrieves the value for an extension field. -// If the field is unpopulated, it returns the default value for -// scalars and an immutable, empty value for lists or messages. -// It panics if xt does not extend m. -func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { - // Treat nil message interface as an empty message; return the default. - if m == nil { - return xt.InterfaceOf(xt.Zero()) - } - - return xt.InterfaceOf(m.ProtoReflect().Get(xt.TypeDescriptor())) -} - -// SetExtension stores the value of an extension field. -// It panics if m is invalid, xt does not extend m, or if type of v -// is invalid for the specified extension field. -func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { - xd := xt.TypeDescriptor() - pv := xt.ValueOf(v) - - // Specially treat an invalid list, map, or message as clear. - isValid := true - switch { - case xd.IsList(): - isValid = pv.List().IsValid() - case xd.IsMap(): - isValid = pv.Map().IsValid() - case xd.Message() != nil: - isValid = pv.Message().IsValid() - } - if !isValid { - m.ProtoReflect().Clear(xd) - return - } - - m.ProtoReflect().Set(xd, pv) -} - -// RangeExtensions iterates over every populated extension field in m in an -// undefined order, calling f for each extension type and value encountered. -// It returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current extension field. -func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { - // Treat nil message interface as an empty message; nothing to range over. - if m == nil { - return - } - - m.ProtoReflect().Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - if fd.IsExtension() { - xt := fd.(protoreflect.ExtensionTypeDescriptor).Type() - vi := xt.InterfaceOf(v) - return f(xt, vi) - } - return true - }) -} diff --git a/vendor/google.golang.org/protobuf/proto/merge.go b/vendor/google.golang.org/protobuf/proto/merge.go deleted file mode 100644 index 3c6fe578..00000000 --- a/vendor/google.golang.org/protobuf/proto/merge.go +++ /dev/null @@ -1,139 +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 proto - -import ( - "fmt" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// Merge merges src into dst, which must be a message with the same descriptor. -// -// Populated scalar fields in src are copied to dst, while populated -// singular messages in src are merged into dst by recursively calling Merge. -// The elements of every list field in src is appended to the corresponded -// list fields in dst. The entries of every map field in src is copied into -// the corresponding map field in dst, possibly replacing existing entries. -// The unknown fields of src are appended to the unknown fields of dst. -// -// It is semantically equivalent to unmarshaling the encoded form of src -// into dst with the [UnmarshalOptions.Merge] option specified. -func Merge(dst, src Message) { - // TODO: Should nil src be treated as semantically equivalent to a - // untyped, read-only, empty message? What about a nil dst? - - dstMsg, srcMsg := dst.ProtoReflect(), src.ProtoReflect() - if dstMsg.Descriptor() != srcMsg.Descriptor() { - if got, want := dstMsg.Descriptor().FullName(), srcMsg.Descriptor().FullName(); got != want { - panic(fmt.Sprintf("descriptor mismatch: %v != %v", got, want)) - } - panic("descriptor mismatch") - } - mergeOptions{}.mergeMessage(dstMsg, srcMsg) -} - -// Clone returns a deep copy of m. -// If the top-level message is invalid, it returns an invalid message as well. -func Clone(m Message) Message { - // NOTE: Most usages of Clone assume the following properties: - // t := reflect.TypeOf(m) - // t == reflect.TypeOf(m.ProtoReflect().New().Interface()) - // t == reflect.TypeOf(m.ProtoReflect().Type().Zero().Interface()) - // - // Embedding protobuf messages breaks this since the parent type will have - // a forwarded ProtoReflect method, but the Interface method will return - // the underlying embedded message type. - if m == nil { - return nil - } - src := m.ProtoReflect() - if !src.IsValid() { - return src.Type().Zero().Interface() - } - dst := src.New() - mergeOptions{}.mergeMessage(dst, src) - return dst.Interface() -} - -// mergeOptions provides a namespace for merge functions, and can be -// exported in the future if we add user-visible merge options. -type mergeOptions struct{} - -func (o mergeOptions) mergeMessage(dst, src protoreflect.Message) { - methods := protoMethods(dst) - if methods != nil && methods.Merge != nil { - in := protoiface.MergeInput{ - Destination: dst, - Source: src, - } - out := methods.Merge(in) - if out.Flags&protoiface.MergeComplete != 0 { - return - } - } - - if !dst.IsValid() { - panic(fmt.Sprintf("cannot merge into invalid %v message", dst.Descriptor().FullName())) - } - - src.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - switch { - case fd.IsList(): - o.mergeList(dst.Mutable(fd).List(), v.List(), fd) - case fd.IsMap(): - o.mergeMap(dst.Mutable(fd).Map(), v.Map(), fd.MapValue()) - case fd.Message() != nil: - o.mergeMessage(dst.Mutable(fd).Message(), v.Message()) - case fd.Kind() == protoreflect.BytesKind: - dst.Set(fd, o.cloneBytes(v)) - default: - dst.Set(fd, v) - } - return true - }) - - if len(src.GetUnknown()) > 0 { - dst.SetUnknown(append(dst.GetUnknown(), src.GetUnknown()...)) - } -} - -func (o mergeOptions) mergeList(dst, src protoreflect.List, fd protoreflect.FieldDescriptor) { - // Merge semantics appends to the end of the existing list. - for i, n := 0, src.Len(); i < n; i++ { - switch v := src.Get(i); { - case fd.Message() != nil: - dstv := dst.NewElement() - o.mergeMessage(dstv.Message(), v.Message()) - dst.Append(dstv) - case fd.Kind() == protoreflect.BytesKind: - dst.Append(o.cloneBytes(v)) - default: - dst.Append(v) - } - } -} - -func (o mergeOptions) mergeMap(dst, src protoreflect.Map, fd protoreflect.FieldDescriptor) { - // Merge semantics replaces, rather than merges into existing entries. - src.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { - switch { - case fd.Message() != nil: - dstv := dst.NewValue() - o.mergeMessage(dstv.Message(), v.Message()) - dst.Set(k, dstv) - case fd.Kind() == protoreflect.BytesKind: - dst.Set(k, o.cloneBytes(v)) - default: - dst.Set(k, v) - } - return true - }) -} - -func (o mergeOptions) cloneBytes(v protoreflect.Value) protoreflect.Value { - return protoreflect.ValueOfBytes(append([]byte{}, v.Bytes()...)) -} diff --git a/vendor/google.golang.org/protobuf/proto/messageset.go b/vendor/google.golang.org/protobuf/proto/messageset.go deleted file mode 100644 index 312d5d45..00000000 --- a/vendor/google.golang.org/protobuf/proto/messageset.go +++ /dev/null @@ -1,93 +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 proto - -import ( - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/order" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -func (o MarshalOptions) sizeMessageSet(m protoreflect.Message) (size int) { - m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - size += messageset.SizeField(fd.Number()) - size += protowire.SizeTag(messageset.FieldMessage) - size += protowire.SizeBytes(o.size(v.Message())) - return true - }) - size += messageset.SizeUnknown(m.GetUnknown()) - return size -} - -func (o MarshalOptions) marshalMessageSet(b []byte, m protoreflect.Message) ([]byte, error) { - if !flags.ProtoLegacy { - return b, errors.New("no support for message_set_wire_format") - } - fieldOrder := order.AnyFieldOrder - if o.Deterministic { - fieldOrder = order.NumberFieldOrder - } - var err error - order.RangeFields(m, fieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - b, err = o.marshalMessageSetField(b, fd, v) - return err == nil - }) - if err != nil { - return b, err - } - return messageset.AppendUnknown(b, m.GetUnknown()) -} - -func (o MarshalOptions) marshalMessageSetField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) { - b = messageset.AppendFieldStart(b, fd.Number()) - b = protowire.AppendTag(b, messageset.FieldMessage, protowire.BytesType) - b = protowire.AppendVarint(b, uint64(o.Size(value.Message().Interface()))) - b, err := o.marshalMessage(b, value.Message()) - if err != nil { - return b, err - } - b = messageset.AppendFieldEnd(b) - return b, nil -} - -func (o UnmarshalOptions) unmarshalMessageSet(b []byte, m protoreflect.Message) error { - if !flags.ProtoLegacy { - return errors.New("no support for message_set_wire_format") - } - return messageset.Unmarshal(b, false, func(num protowire.Number, v []byte) error { - err := o.unmarshalMessageSetField(m, num, v) - if err == errUnknown { - unknown := m.GetUnknown() - unknown = protowire.AppendTag(unknown, num, protowire.BytesType) - unknown = protowire.AppendBytes(unknown, v) - m.SetUnknown(unknown) - return nil - } - return err - }) -} - -func (o UnmarshalOptions) unmarshalMessageSetField(m protoreflect.Message, num protowire.Number, v []byte) error { - md := m.Descriptor() - if !md.ExtensionRanges().Has(num) { - return errUnknown - } - xt, err := o.Resolver.FindExtensionByNumber(md.FullName(), num) - if err == protoregistry.NotFound { - return errUnknown - } - if err != nil { - return errors.New("%v: unable to resolve extension %v: %v", md.FullName(), num, err) - } - xd := xt.TypeDescriptor() - if err := o.unmarshalMessage(v, m.Mutable(xd).Message()); err != nil { - return err - } - return nil -} diff --git a/vendor/google.golang.org/protobuf/proto/proto.go b/vendor/google.golang.org/protobuf/proto/proto.go deleted file mode 100644 index 7543ee6b..00000000 --- a/vendor/google.golang.org/protobuf/proto/proto.go +++ /dev/null @@ -1,45 +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. - -package proto - -import ( - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// Message is the top-level interface that all messages must implement. -// It provides access to a reflective view of a message. -// Any implementation of this interface may be used with all functions in the -// protobuf module that accept a Message, except where otherwise specified. -// -// This is the v2 interface definition for protobuf messages. -// The v1 interface definition is [github.com/golang/protobuf/proto.Message]. -// -// - To convert a v1 message to a v2 message, -// use [google.golang.org/protobuf/protoadapt.MessageV2Of]. -// - To convert a v2 message to a v1 message, -// use [google.golang.org/protobuf/protoadapt.MessageV1Of]. -type Message = protoreflect.ProtoMessage - -// Error matches all errors produced by packages in the protobuf module -// according to [errors.Is]. -// -// Example usage: -// -// if errors.Is(err, proto.Error) { ... } -var Error error - -func init() { - Error = errors.Error -} - -// MessageName returns the full name of m. -// If m is nil, it returns an empty string. -func MessageName(m Message) protoreflect.FullName { - if m == nil { - return "" - } - return m.ProtoReflect().Descriptor().FullName() -} diff --git a/vendor/google.golang.org/protobuf/proto/proto_methods.go b/vendor/google.golang.org/protobuf/proto/proto_methods.go deleted file mode 100644 index 465e057b..00000000 --- a/vendor/google.golang.org/protobuf/proto/proto_methods.go +++ /dev/null @@ -1,20 +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. - -// The protoreflect build tag disables use of fast-path methods. -//go:build !protoreflect -// +build !protoreflect - -package proto - -import ( - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -const hasProtoMethods = true - -func protoMethods(m protoreflect.Message) *protoiface.Methods { - return m.ProtoMethods() -} diff --git a/vendor/google.golang.org/protobuf/proto/proto_reflect.go b/vendor/google.golang.org/protobuf/proto/proto_reflect.go deleted file mode 100644 index 494d6cee..00000000 --- a/vendor/google.golang.org/protobuf/proto/proto_reflect.go +++ /dev/null @@ -1,20 +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. - -// The protoreflect build tag disables use of fast-path methods. -//go:build protoreflect -// +build protoreflect - -package proto - -import ( - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -const hasProtoMethods = false - -func protoMethods(m protoreflect.Message) *protoiface.Methods { - return nil -} diff --git a/vendor/google.golang.org/protobuf/proto/reset.go b/vendor/google.golang.org/protobuf/proto/reset.go deleted file mode 100644 index 3d7f8943..00000000 --- a/vendor/google.golang.org/protobuf/proto/reset.go +++ /dev/null @@ -1,43 +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 proto - -import ( - "fmt" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -// Reset clears every field in the message. -// The resulting message shares no observable memory with its previous state -// other than the memory for the message itself. -func Reset(m Message) { - if mr, ok := m.(interface{ Reset() }); ok && hasProtoMethods { - mr.Reset() - return - } - resetMessage(m.ProtoReflect()) -} - -func resetMessage(m protoreflect.Message) { - if !m.IsValid() { - panic(fmt.Sprintf("cannot reset invalid %v message", m.Descriptor().FullName())) - } - - // Clear all known fields. - fds := m.Descriptor().Fields() - for i := 0; i < fds.Len(); i++ { - m.Clear(fds.Get(i)) - } - - // Clear extension fields. - m.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { - m.Clear(fd) - return true - }) - - // Clear unknown fields. - m.SetUnknown(nil) -} diff --git a/vendor/google.golang.org/protobuf/proto/size.go b/vendor/google.golang.org/protobuf/proto/size.go deleted file mode 100644 index f1692b49..00000000 --- a/vendor/google.golang.org/protobuf/proto/size.go +++ /dev/null @@ -1,101 +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 proto - -import ( - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/runtime/protoiface" -) - -// Size returns the size in bytes of the wire-format encoding of m. -func Size(m Message) int { - return MarshalOptions{}.Size(m) -} - -// Size returns the size in bytes of the wire-format encoding of m. -func (o MarshalOptions) Size(m Message) int { - // Treat a nil message interface as an empty message; nothing to output. - if m == nil { - return 0 - } - - return o.size(m.ProtoReflect()) -} - -// size is a centralized function that all size operations go through. -// For profiling purposes, avoid changing the name of this function or -// introducing other code paths for size that do not go through this. -func (o MarshalOptions) size(m protoreflect.Message) (size int) { - methods := protoMethods(m) - if methods != nil && methods.Size != nil { - out := methods.Size(protoiface.SizeInput{ - Message: m, - }) - return out.Size - } - if methods != nil && methods.Marshal != nil { - // This is not efficient, but we don't have any choice. - // This case is mainly used for legacy types with a Marshal method. - out, _ := methods.Marshal(protoiface.MarshalInput{ - Message: m, - }) - return len(out.Buf) - } - return o.sizeMessageSlow(m) -} - -func (o MarshalOptions) sizeMessageSlow(m protoreflect.Message) (size int) { - if messageset.IsMessageSet(m.Descriptor()) { - return o.sizeMessageSet(m) - } - m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - size += o.sizeField(fd, v) - return true - }) - size += len(m.GetUnknown()) - return size -} - -func (o MarshalOptions) sizeField(fd protoreflect.FieldDescriptor, value protoreflect.Value) (size int) { - num := fd.Number() - switch { - case fd.IsList(): - return o.sizeList(num, fd, value.List()) - case fd.IsMap(): - return o.sizeMap(num, fd, value.Map()) - default: - return protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), value) - } -} - -func (o MarshalOptions) sizeList(num protowire.Number, fd protoreflect.FieldDescriptor, list protoreflect.List) (size int) { - sizeTag := protowire.SizeTag(num) - - if fd.IsPacked() && list.Len() > 0 { - content := 0 - for i, llen := 0, list.Len(); i < llen; i++ { - content += o.sizeSingular(num, fd.Kind(), list.Get(i)) - } - return sizeTag + protowire.SizeBytes(content) - } - - for i, llen := 0, list.Len(); i < llen; i++ { - size += sizeTag + o.sizeSingular(num, fd.Kind(), list.Get(i)) - } - return size -} - -func (o MarshalOptions) sizeMap(num protowire.Number, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) (size int) { - sizeTag := protowire.SizeTag(num) - - mapv.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool { - size += sizeTag - size += protowire.SizeBytes(o.sizeField(fd.MapKey(), key.Value()) + o.sizeField(fd.MapValue(), value)) - return true - }) - return size -} diff --git a/vendor/google.golang.org/protobuf/proto/size_gen.go b/vendor/google.golang.org/protobuf/proto/size_gen.go deleted file mode 100644 index 3cf61a82..00000000 --- a/vendor/google.golang.org/protobuf/proto/size_gen.go +++ /dev/null @@ -1,55 +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. - -// Code generated by generate-types. DO NOT EDIT. - -package proto - -import ( - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (o MarshalOptions) sizeSingular(num protowire.Number, kind protoreflect.Kind, v protoreflect.Value) int { - switch kind { - case protoreflect.BoolKind: - return protowire.SizeVarint(protowire.EncodeBool(v.Bool())) - case protoreflect.EnumKind: - return protowire.SizeVarint(uint64(v.Enum())) - case protoreflect.Int32Kind: - return protowire.SizeVarint(uint64(int32(v.Int()))) - case protoreflect.Sint32Kind: - return protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) - case protoreflect.Uint32Kind: - return protowire.SizeVarint(uint64(uint32(v.Uint()))) - case protoreflect.Int64Kind: - return protowire.SizeVarint(uint64(v.Int())) - case protoreflect.Sint64Kind: - return protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) - case protoreflect.Uint64Kind: - return protowire.SizeVarint(v.Uint()) - case protoreflect.Sfixed32Kind: - return protowire.SizeFixed32() - case protoreflect.Fixed32Kind: - return protowire.SizeFixed32() - case protoreflect.FloatKind: - return protowire.SizeFixed32() - case protoreflect.Sfixed64Kind: - return protowire.SizeFixed64() - case protoreflect.Fixed64Kind: - return protowire.SizeFixed64() - case protoreflect.DoubleKind: - return protowire.SizeFixed64() - case protoreflect.StringKind: - return protowire.SizeBytes(len(v.String())) - case protoreflect.BytesKind: - return protowire.SizeBytes(len(v.Bytes())) - case protoreflect.MessageKind: - return protowire.SizeBytes(o.size(v.Message())) - case protoreflect.GroupKind: - return protowire.SizeGroup(num, o.size(v.Message())) - default: - return 0 - } -} diff --git a/vendor/google.golang.org/protobuf/proto/wrappers.go b/vendor/google.golang.org/protobuf/proto/wrappers.go deleted file mode 100644 index 653b12c3..00000000 --- a/vendor/google.golang.org/protobuf/proto/wrappers.go +++ /dev/null @@ -1,29 +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 proto - -// Bool stores v in a new bool value and returns a pointer to it. -func Bool(v bool) *bool { return &v } - -// Int32 stores v in a new int32 value and returns a pointer to it. -func Int32(v int32) *int32 { return &v } - -// Int64 stores v in a new int64 value and returns a pointer to it. -func Int64(v int64) *int64 { return &v } - -// Float32 stores v in a new float32 value and returns a pointer to it. -func Float32(v float32) *float32 { return &v } - -// Float64 stores v in a new float64 value and returns a pointer to it. -func Float64(v float64) *float64 { return &v } - -// Uint32 stores v in a new uint32 value and returns a pointer to it. -func Uint32(v uint32) *uint32 { return &v } - -// Uint64 stores v in a new uint64 value and returns a pointer to it. -func Uint64(v uint64) *uint64 { return &v } - -// String stores v in a new string value and returns a pointer to it. -func String(v string) *string { return &v } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go deleted file mode 100644 index baa0cc62..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ /dev/null @@ -1,285 +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. - -// Package protodesc provides functionality for converting -// FileDescriptorProto messages to/from [protoreflect.FileDescriptor] values. -// -// The google.protobuf.FileDescriptorProto is a protobuf message that describes -// the type information for a .proto file in a form that is easily serializable. -// The [protoreflect.FileDescriptor] is a more structured representation of -// the FileDescriptorProto message where references and remote dependencies -// can be directly followed. -package protodesc - -import ( - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - - "google.golang.org/protobuf/types/descriptorpb" -) - -// Resolver is the resolver used by [NewFile] to resolve dependencies. -// The enums and messages provided must belong to some parent file, -// which is also registered. -// -// It is implemented by [protoregistry.Files]. -type Resolver interface { - FindFileByPath(string) (protoreflect.FileDescriptor, error) - FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) -} - -// FileOptions configures the construction of file descriptors. -type FileOptions struct { - pragma.NoUnkeyedLiterals - - // AllowUnresolvable configures New to permissively allow unresolvable - // file, enum, or message dependencies. Unresolved dependencies are replaced - // by placeholder equivalents. - // - // The following dependencies may be left unresolved: - // • Resolving an imported file. - // • Resolving the type for a message field or extension field. - // If the kind of the field is unknown, then a placeholder is used for both - // the Enum and Message accessors on the protoreflect.FieldDescriptor. - // • Resolving an enum value set as the default for an optional enum field. - // If unresolvable, the protoreflect.FieldDescriptor.Default is set to the - // first value in the associated enum (or zero if the also enum dependency - // is also unresolvable). The protoreflect.FieldDescriptor.DefaultEnumValue - // is populated with a placeholder. - // • Resolving the extended message type for an extension field. - // • Resolving the input or output message type for a service method. - // - // If the unresolved dependency uses a relative name, - // then the placeholder will contain an invalid FullName with a "*." prefix, - // indicating that the starting prefix of the full name is unknown. - AllowUnresolvable bool -} - -// NewFile creates a new [protoreflect.FileDescriptor] from the provided -// file descriptor message. See [FileOptions.New] for more information. -func NewFile(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { - return FileOptions{}.New(fd, r) -} - -// NewFiles creates a new [protoregistry.Files] from the provided -// FileDescriptorSet message. See [FileOptions.NewFiles] for more information. -func NewFiles(fd *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { - return FileOptions{}.NewFiles(fd) -} - -// New creates a new [protoreflect.FileDescriptor] from the provided -// file descriptor message. The file must represent a valid proto file according -// to protobuf semantics. The returned descriptor is a deep copy of the input. -// -// Any imported files, enum types, or message types referenced in the file are -// resolved using the provided registry. When looking up an import file path, -// the path must be unique. The newly created file descriptor is not registered -// back into the provided file registry. -func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { - if r == nil { - r = (*protoregistry.Files)(nil) // empty resolver - } - - // Handle the file descriptor content. - f := &filedesc.File{L2: &filedesc.FileL2{}} - switch fd.GetSyntax() { - case "proto2", "": - f.L1.Syntax = protoreflect.Proto2 - case "proto3": - f.L1.Syntax = protoreflect.Proto3 - case "editions": - f.L1.Syntax = protoreflect.Editions - f.L1.Edition = fromEditionProto(fd.GetEdition()) - default: - return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) - } - if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < SupportedEditionsMinimum || fd.GetEdition() > SupportedEditionsMaximum) { - return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) - } - f.L1.Path = fd.GetName() - if f.L1.Path == "" { - return nil, errors.New("file path must be populated") - } - f.L1.Package = protoreflect.FullName(fd.GetPackage()) - if !f.L1.Package.IsValid() && f.L1.Package != "" { - return nil, errors.New("invalid package: %q", f.L1.Package) - } - if opts := fd.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.FileOptions) - f.L2.Options = func() protoreflect.ProtoMessage { return opts } - } - if f.L1.Syntax == protoreflect.Editions { - initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) - } - - f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency())) - for _, i := range fd.GetPublicDependency() { - if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsPublic { - return nil, errors.New("invalid or duplicate public import index: %d", i) - } - f.L2.Imports[i].IsPublic = true - } - for _, i := range fd.GetWeakDependency() { - if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsWeak { - return nil, errors.New("invalid or duplicate weak import index: %d", i) - } - f.L2.Imports[i].IsWeak = true - } - imps := importSet{f.Path(): true} - for i, path := range fd.GetDependency() { - imp := &f.L2.Imports[i] - f, err := r.FindFileByPath(path) - if err == protoregistry.NotFound && (o.AllowUnresolvable || imp.IsWeak) { - f = filedesc.PlaceholderFile(path) - } else if err != nil { - return nil, errors.New("could not resolve import %q: %v", path, err) - } - imp.FileDescriptor = f - - if imps[imp.Path()] { - return nil, errors.New("already imported %q", path) - } - imps[imp.Path()] = true - } - for i := range fd.GetDependency() { - imp := &f.L2.Imports[i] - imps.importPublic(imp.Imports()) - } - - // Handle source locations. - f.L2.Locations.File = f - for _, loc := range fd.GetSourceCodeInfo().GetLocation() { - var l protoreflect.SourceLocation - // TODO: Validate that the path points to an actual declaration? - l.Path = protoreflect.SourcePath(loc.GetPath()) - s := loc.GetSpan() - switch len(s) { - case 3: - l.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[0]), int(s[2]) - case 4: - l.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[2]), int(s[3]) - default: - return nil, errors.New("invalid span: %v", s) - } - // TODO: Validate that the span information is sensible? - // See https://github.com/protocolbuffers/protobuf/issues/6378. - if false && (l.EndLine < l.StartLine || l.StartLine < 0 || l.StartColumn < 0 || l.EndColumn < 0 || - (l.StartLine == l.EndLine && l.EndColumn <= l.StartColumn)) { - return nil, errors.New("invalid span: %v", s) - } - l.LeadingDetachedComments = loc.GetLeadingDetachedComments() - l.LeadingComments = loc.GetLeadingComments() - l.TrailingComments = loc.GetTrailingComments() - f.L2.Locations.List = append(f.L2.Locations.List, l) - } - - // Step 1: Allocate and derive the names for all declarations. - // This copies all fields from the descriptor proto except: - // google.protobuf.FieldDescriptorProto.type_name - // google.protobuf.FieldDescriptorProto.default_value - // google.protobuf.FieldDescriptorProto.oneof_index - // google.protobuf.FieldDescriptorProto.extendee - // google.protobuf.MethodDescriptorProto.input - // google.protobuf.MethodDescriptorProto.output - var err error - sb := new(strs.Builder) - r1 := make(descsByName) - if f.L1.Enums.List, err = r1.initEnumDeclarations(fd.GetEnumType(), f, sb); err != nil { - return nil, err - } - if f.L1.Messages.List, err = r1.initMessagesDeclarations(fd.GetMessageType(), f, sb); err != nil { - return nil, err - } - if f.L1.Extensions.List, err = r1.initExtensionDeclarations(fd.GetExtension(), f, sb); err != nil { - return nil, err - } - if f.L1.Services.List, err = r1.initServiceDeclarations(fd.GetService(), f, sb); err != nil { - return nil, err - } - - // Step 2: Resolve every dependency reference not handled by step 1. - r2 := &resolver{local: r1, remote: r, imports: imps, allowUnresolvable: o.AllowUnresolvable} - if err := r2.resolveMessageDependencies(f.L1.Messages.List, fd.GetMessageType()); err != nil { - return nil, err - } - if err := r2.resolveExtensionDependencies(f.L1.Extensions.List, fd.GetExtension()); err != nil { - return nil, err - } - if err := r2.resolveServiceDependencies(f.L1.Services.List, fd.GetService()); err != nil { - return nil, err - } - - // Step 3: Validate every enum, message, and extension declaration. - if err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil { - return nil, err - } - if err := validateMessageDeclarations(f.L1.Messages.List, fd.GetMessageType()); err != nil { - return nil, err - } - if err := validateExtensionDeclarations(f.L1.Extensions.List, fd.GetExtension()); err != nil { - return nil, err - } - - return f, nil -} - -type importSet map[string]bool - -func (is importSet) importPublic(imps protoreflect.FileImports) { - for i := 0; i < imps.Len(); i++ { - if imp := imps.Get(i); imp.IsPublic { - is[imp.Path()] = true - is.importPublic(imp.Imports()) - } - } -} - -// NewFiles creates a new [protoregistry.Files] from the provided -// FileDescriptorSet message. The descriptor set must include only -// valid files according to protobuf semantics. The returned descriptors -// are a deep copy of the input. -func (o FileOptions) NewFiles(fds *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { - files := make(map[string]*descriptorpb.FileDescriptorProto) - for _, fd := range fds.File { - if _, ok := files[fd.GetName()]; ok { - return nil, errors.New("file appears multiple times: %q", fd.GetName()) - } - files[fd.GetName()] = fd - } - r := &protoregistry.Files{} - for _, fd := range files { - if err := o.addFileDeps(r, fd, files); err != nil { - return nil, err - } - } - return r, nil -} -func (o FileOptions) addFileDeps(r *protoregistry.Files, fd *descriptorpb.FileDescriptorProto, files map[string]*descriptorpb.FileDescriptorProto) error { - // Set the entry to nil while descending into a file's dependencies to detect cycles. - files[fd.GetName()] = nil - for _, dep := range fd.Dependency { - depfd, ok := files[dep] - if depfd == nil { - if ok { - return errors.New("import cycle in file: %q", dep) - } - continue - } - if err := o.addFileDeps(r, depfd, files); err != nil { - return err - } - } - // Delete the entry once dependencies are processed. - delete(files, fd.GetName()) - f, err := o.New(fd, r) - if err != nil { - return err - } - return r.RegisterFile(f) -} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go deleted file mode 100644 index aff6fd49..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ /dev/null @@ -1,272 +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 protodesc - -import ( - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - "google.golang.org/protobuf/types/descriptorpb" -) - -type descsByName map[protoreflect.FullName]protoreflect.Descriptor - -func (r descsByName) initEnumDeclarations(eds []*descriptorpb.EnumDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (es []filedesc.Enum, err error) { - es = make([]filedesc.Enum, len(eds)) // allocate up-front to ensure stable pointers - for i, ed := range eds { - e := &es[i] - e.L2 = new(filedesc.EnumL2) - if e.L0, err = r.makeBase(e, parent, ed.GetName(), i, sb); err != nil { - return nil, err - } - if opts := ed.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.EnumOptions) - e.L2.Options = func() protoreflect.ProtoMessage { return opts } - } - for _, s := range ed.GetReservedName() { - e.L2.ReservedNames.List = append(e.L2.ReservedNames.List, protoreflect.Name(s)) - } - for _, rr := range ed.GetReservedRange() { - e.L2.ReservedRanges.List = append(e.L2.ReservedRanges.List, [2]protoreflect.EnumNumber{ - protoreflect.EnumNumber(rr.GetStart()), - protoreflect.EnumNumber(rr.GetEnd()), - }) - } - if e.L2.Values.List, err = r.initEnumValuesFromDescriptorProto(ed.GetValue(), e, sb); err != nil { - return nil, err - } - } - return es, nil -} - -func (r descsByName) initEnumValuesFromDescriptorProto(vds []*descriptorpb.EnumValueDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (vs []filedesc.EnumValue, err error) { - vs = make([]filedesc.EnumValue, len(vds)) // allocate up-front to ensure stable pointers - for i, vd := range vds { - v := &vs[i] - if v.L0, err = r.makeBase(v, parent, vd.GetName(), i, sb); err != nil { - return nil, err - } - if opts := vd.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.EnumValueOptions) - v.L1.Options = func() protoreflect.ProtoMessage { return opts } - } - v.L1.Number = protoreflect.EnumNumber(vd.GetNumber()) - } - return vs, nil -} - -func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Message, err error) { - ms = make([]filedesc.Message, len(mds)) // allocate up-front to ensure stable pointers - for i, md := range mds { - m := &ms[i] - m.L2 = new(filedesc.MessageL2) - if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { - return nil, err - } - if opts := md.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.MessageOptions) - m.L2.Options = func() protoreflect.ProtoMessage { return opts } - m.L1.IsMapEntry = opts.GetMapEntry() - m.L1.IsMessageSet = opts.GetMessageSetWireFormat() - } - for _, s := range md.GetReservedName() { - m.L2.ReservedNames.List = append(m.L2.ReservedNames.List, protoreflect.Name(s)) - } - for _, rr := range md.GetReservedRange() { - m.L2.ReservedRanges.List = append(m.L2.ReservedRanges.List, [2]protoreflect.FieldNumber{ - protoreflect.FieldNumber(rr.GetStart()), - protoreflect.FieldNumber(rr.GetEnd()), - }) - } - for _, xr := range md.GetExtensionRange() { - m.L2.ExtensionRanges.List = append(m.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{ - protoreflect.FieldNumber(xr.GetStart()), - protoreflect.FieldNumber(xr.GetEnd()), - }) - var optsFunc func() protoreflect.ProtoMessage - if opts := xr.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.ExtensionRangeOptions) - optsFunc = func() protoreflect.ProtoMessage { return opts } - } - m.L2.ExtensionRangeOptions = append(m.L2.ExtensionRangeOptions, optsFunc) - } - if m.L2.Fields.List, err = r.initFieldsFromDescriptorProto(md.GetField(), m, sb); err != nil { - return nil, err - } - if m.L2.Oneofs.List, err = r.initOneofsFromDescriptorProto(md.GetOneofDecl(), m, sb); err != nil { - return nil, err - } - if m.L1.Enums.List, err = r.initEnumDeclarations(md.GetEnumType(), m, sb); err != nil { - return nil, err - } - if m.L1.Messages.List, err = r.initMessagesDeclarations(md.GetNestedType(), m, sb); err != nil { - return nil, err - } - if m.L1.Extensions.List, err = r.initExtensionDeclarations(md.GetExtension(), m, sb); err != nil { - return nil, err - } - } - return ms, nil -} - -func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (fs []filedesc.Field, err error) { - fs = make([]filedesc.Field, len(fds)) // allocate up-front to ensure stable pointers - for i, fd := range fds { - f := &fs[i] - if f.L0, err = r.makeBase(f, parent, fd.GetName(), i, sb); err != nil { - return nil, err - } - f.L1.IsProto3Optional = fd.GetProto3Optional() - if opts := fd.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.FieldOptions) - f.L1.Options = func() protoreflect.ProtoMessage { return opts } - f.L1.IsWeak = opts.GetWeak() - f.L1.HasPacked = opts.Packed != nil - f.L1.IsPacked = opts.GetPacked() - } - f.L1.Number = protoreflect.FieldNumber(fd.GetNumber()) - f.L1.Cardinality = protoreflect.Cardinality(fd.GetLabel()) - if fd.Type != nil { - f.L1.Kind = protoreflect.Kind(fd.GetType()) - } - if fd.JsonName != nil { - f.L1.StringName.InitJSON(fd.GetJsonName()) - } - - if f.Base.L0.ParentFile.Syntax() == protoreflect.Editions { - f.L1.Presence = resolveFeatureHasFieldPresence(f.Base.L0.ParentFile, fd) - // We reuse the existing field because the old option `[packed = - // true]` is mutually exclusive with the editions feature. - if fd.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED { - f.L1.HasPacked = true - f.L1.IsPacked = resolveFeatureRepeatedFieldEncodingPacked(f.Base.L0.ParentFile, fd) - } - - // We pretend this option is always explicitly set because the only - // use of HasEnforceUTF8 is to determine whether to use EnforceUTF8 - // or to return the appropriate default. - // When using editions we either parse the option or resolve the - // appropriate default here (instead of later when this option is - // requested from the descriptor). - // In proto2/proto3 syntax HasEnforceUTF8 might be false. - f.L1.HasEnforceUTF8 = true - f.L1.EnforceUTF8 = resolveFeatureEnforceUTF8(f.Base.L0.ParentFile, fd) - - if f.L1.Kind == protoreflect.MessageKind && resolveFeatureDelimitedEncoding(f.Base.L0.ParentFile, fd) { - f.L1.Kind = protoreflect.GroupKind - } - } - } - return fs, nil -} - -func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (os []filedesc.Oneof, err error) { - os = make([]filedesc.Oneof, len(ods)) // allocate up-front to ensure stable pointers - for i, od := range ods { - o := &os[i] - if o.L0, err = r.makeBase(o, parent, od.GetName(), i, sb); err != nil { - return nil, err - } - if opts := od.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.OneofOptions) - o.L1.Options = func() protoreflect.ProtoMessage { return opts } - } - } - return os, nil -} - -func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (xs []filedesc.Extension, err error) { - xs = make([]filedesc.Extension, len(xds)) // allocate up-front to ensure stable pointers - for i, xd := range xds { - x := &xs[i] - x.L2 = new(filedesc.ExtensionL2) - if x.L0, err = r.makeBase(x, parent, xd.GetName(), i, sb); err != nil { - return nil, err - } - if opts := xd.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.FieldOptions) - x.L2.Options = func() protoreflect.ProtoMessage { return opts } - x.L2.IsPacked = opts.GetPacked() - } - x.L1.Number = protoreflect.FieldNumber(xd.GetNumber()) - x.L1.Cardinality = protoreflect.Cardinality(xd.GetLabel()) - if xd.Type != nil { - x.L1.Kind = protoreflect.Kind(xd.GetType()) - } - if xd.JsonName != nil { - x.L2.StringName.InitJSON(xd.GetJsonName()) - } - } - return xs, nil -} - -func (r descsByName) initServiceDeclarations(sds []*descriptorpb.ServiceDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ss []filedesc.Service, err error) { - ss = make([]filedesc.Service, len(sds)) // allocate up-front to ensure stable pointers - for i, sd := range sds { - s := &ss[i] - s.L2 = new(filedesc.ServiceL2) - if s.L0, err = r.makeBase(s, parent, sd.GetName(), i, sb); err != nil { - return nil, err - } - if opts := sd.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.ServiceOptions) - s.L2.Options = func() protoreflect.ProtoMessage { return opts } - } - if s.L2.Methods.List, err = r.initMethodsFromDescriptorProto(sd.GetMethod(), s, sb); err != nil { - return nil, err - } - } - return ss, nil -} - -func (r descsByName) initMethodsFromDescriptorProto(mds []*descriptorpb.MethodDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Method, err error) { - ms = make([]filedesc.Method, len(mds)) // allocate up-front to ensure stable pointers - for i, md := range mds { - m := &ms[i] - if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { - return nil, err - } - if opts := md.GetOptions(); opts != nil { - opts = proto.Clone(opts).(*descriptorpb.MethodOptions) - m.L1.Options = func() protoreflect.ProtoMessage { return opts } - } - m.L1.IsStreamingClient = md.GetClientStreaming() - m.L1.IsStreamingServer = md.GetServerStreaming() - } - return ms, nil -} - -func (r descsByName) makeBase(child, parent protoreflect.Descriptor, name string, idx int, sb *strs.Builder) (filedesc.BaseL0, error) { - if !protoreflect.Name(name).IsValid() { - return filedesc.BaseL0{}, errors.New("descriptor %q has an invalid nested name: %q", parent.FullName(), name) - } - - // Derive the full name of the child. - // Note that enum values are a sibling to the enum parent in the namespace. - var fullName protoreflect.FullName - if _, ok := parent.(protoreflect.EnumDescriptor); ok { - fullName = sb.AppendFullName(parent.FullName().Parent(), protoreflect.Name(name)) - } else { - fullName = sb.AppendFullName(parent.FullName(), protoreflect.Name(name)) - } - if _, ok := r[fullName]; ok { - return filedesc.BaseL0{}, errors.New("descriptor %q already declared", fullName) - } - r[fullName] = child - - // TODO: Verify that the full name does not already exist in the resolver? - // This is not as critical since most usages of NewFile will register - // the created file back into the registry, which will perform this check. - - return filedesc.BaseL0{ - FullName: fullName, - ParentFile: parent.ParentFile().(*filedesc.File), - Parent: parent, - Index: idx, - }, nil -} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go deleted file mode 100644 index 27d7e350..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ /dev/null @@ -1,286 +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 protodesc - -import ( - "google.golang.org/protobuf/internal/encoding/defval" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - - "google.golang.org/protobuf/types/descriptorpb" -) - -// resolver is a wrapper around a local registry of declarations within the file -// and the remote resolver. The remote resolver is restricted to only return -// descriptors that have been imported. -type resolver struct { - local descsByName - remote Resolver - imports importSet - - allowUnresolvable bool -} - -func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) (err error) { - for i, md := range mds { - m := &ms[i] - for j, fd := range md.GetField() { - f := &m.L2.Fields.List[j] - if f.L1.Cardinality == protoreflect.Required { - m.L2.RequiredNumbers.List = append(m.L2.RequiredNumbers.List, f.L1.Number) - } - if fd.OneofIndex != nil { - k := int(fd.GetOneofIndex()) - if !(0 <= k && k < len(md.GetOneofDecl())) { - return errors.New("message field %q has an invalid oneof index: %d", f.FullName(), k) - } - o := &m.L2.Oneofs.List[k] - f.L1.ContainingOneof = o - o.L1.Fields.List = append(o.L1.Fields.List, f) - } - - if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { - return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) - } - if fd.DefaultValue != nil { - v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) - if err != nil { - return errors.New("message field %q has invalid default: %v", f.FullName(), err) - } - f.L1.Default = filedesc.DefaultValue(v, ev) - } - } - - if err := r.resolveMessageDependencies(m.L1.Messages.List, md.GetNestedType()); err != nil { - return err - } - if err := r.resolveExtensionDependencies(m.L1.Extensions.List, md.GetExtension()); err != nil { - return err - } - } - return nil -} - -func (r *resolver) resolveExtensionDependencies(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) (err error) { - for i, xd := range xds { - x := &xs[i] - if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee()), false); err != nil { - return errors.New("extension field %q cannot resolve extendee: %v", x.FullName(), err) - } - if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName()), false); err != nil { - return errors.New("extension field %q cannot resolve type: %v", x.FullName(), err) - } - if xd.DefaultValue != nil { - v, ev, err := unmarshalDefault(xd.GetDefaultValue(), x, r.allowUnresolvable) - if err != nil { - return errors.New("extension field %q has invalid default: %v", x.FullName(), err) - } - x.L2.Default = filedesc.DefaultValue(v, ev) - } - } - return nil -} - -func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*descriptorpb.ServiceDescriptorProto) (err error) { - for i, sd := range sds { - s := &ss[i] - for j, md := range sd.GetMethod() { - m := &s.L2.Methods.List[j] - m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()), false) - if err != nil { - return errors.New("service method %q cannot resolve input: %v", m.FullName(), err) - } - m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()), false) - if err != nil { - return errors.New("service method %q cannot resolve output: %v", m.FullName(), err) - } - } - } - return nil -} - -// findTarget finds an enum or message descriptor if k is an enum, message, -// group, or unknown. If unknown, and the name could be resolved, the kind -// returned kind is set based on the type of the resolved descriptor. -func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) { - switch k { - case protoreflect.EnumKind: - ed, err := r.findEnumDescriptor(scope, ref, isWeak) - if err != nil { - return 0, nil, nil, err - } - return k, ed, nil, nil - case protoreflect.MessageKind, protoreflect.GroupKind: - md, err := r.findMessageDescriptor(scope, ref, isWeak) - if err != nil { - return 0, nil, nil, err - } - return k, nil, md, nil - case 0: - // Handle unspecified kinds (possible with parsers that operate - // on a per-file basis without knowledge of dependencies). - d, err := r.findDescriptor(scope, ref) - if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { - return k, filedesc.PlaceholderEnum(ref.FullName()), filedesc.PlaceholderMessage(ref.FullName()), nil - } else if err == protoregistry.NotFound { - return 0, nil, nil, errors.New("%q not found", ref.FullName()) - } else if err != nil { - return 0, nil, nil, err - } - switch d := d.(type) { - case protoreflect.EnumDescriptor: - return protoreflect.EnumKind, d, nil, nil - case protoreflect.MessageDescriptor: - return protoreflect.MessageKind, nil, d, nil - default: - return 0, nil, nil, errors.New("unknown kind") - } - default: - if ref != "" { - return 0, nil, nil, errors.New("target name cannot be specified for %v", k) - } - if !k.IsValid() { - return 0, nil, nil, errors.New("invalid kind: %d", k) - } - return k, nil, nil, nil - } -} - -// findDescriptor finds the descriptor by name, -// which may be a relative name within some scope. -// -// Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar", -// then the following full names are searched: -// - fizz.buzz.Foo.Bar -// - fizz.Foo.Bar -// - Foo.Bar -func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) { - if !ref.IsValid() { - return nil, errors.New("invalid name reference: %q", ref) - } - if ref.IsFull() { - scope, ref = "", ref[1:] - } - var foundButNotImported protoreflect.Descriptor - for { - // Derive the full name to search. - s := protoreflect.FullName(ref) - if scope != "" { - s = scope + "." + s - } - - // Check the current file for the descriptor. - if d, ok := r.local[s]; ok { - return d, nil - } - - // Check the remote registry for the descriptor. - d, err := r.remote.FindDescriptorByName(s) - if err == nil { - // Only allow descriptors covered by one of the imports. - if r.imports[d.ParentFile().Path()] { - return d, nil - } - foundButNotImported = d - } else if err != protoregistry.NotFound { - return nil, errors.Wrap(err, "%q", s) - } - - // Continue on at a higher level of scoping. - if scope == "" { - if d := foundButNotImported; d != nil { - return nil, errors.New("resolved %q, but %q is not imported", d.FullName(), d.ParentFile().Path()) - } - return nil, protoregistry.NotFound - } - scope = scope.Parent() - } -} - -func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.EnumDescriptor, error) { - d, err := r.findDescriptor(scope, ref) - if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { - return filedesc.PlaceholderEnum(ref.FullName()), nil - } else if err == protoregistry.NotFound { - return nil, errors.New("%q not found", ref.FullName()) - } else if err != nil { - return nil, err - } - ed, ok := d.(protoreflect.EnumDescriptor) - if !ok { - return nil, errors.New("resolved %q, but it is not an enum", d.FullName()) - } - return ed, nil -} - -func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.MessageDescriptor, error) { - d, err := r.findDescriptor(scope, ref) - if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { - return filedesc.PlaceholderMessage(ref.FullName()), nil - } else if err == protoregistry.NotFound { - return nil, errors.New("%q not found", ref.FullName()) - } else if err != nil { - return nil, err - } - md, ok := d.(protoreflect.MessageDescriptor) - if !ok { - return nil, errors.New("resolved %q, but it is not an message", d.FullName()) - } - return md, nil -} - -// partialName is the partial name. A leading dot means that the name is full, -// otherwise the name is relative to some current scope. -// See google.protobuf.FieldDescriptorProto.type_name. -type partialName string - -func (s partialName) IsFull() bool { - return len(s) > 0 && s[0] == '.' -} - -func (s partialName) IsValid() bool { - if s.IsFull() { - return protoreflect.FullName(s[1:]).IsValid() - } - return protoreflect.FullName(s).IsValid() -} - -const unknownPrefix = "*." - -// FullName converts the partial name to a full name on a best-effort basis. -// If relative, it creates an invalid full name, using a "*." prefix -// to indicate that the start of the full name is unknown. -func (s partialName) FullName() protoreflect.FullName { - if s.IsFull() { - return protoreflect.FullName(s[1:]) - } - return protoreflect.FullName(unknownPrefix + s) -} - -func unmarshalDefault(s string, fd protoreflect.FieldDescriptor, allowUnresolvable bool) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) { - var evs protoreflect.EnumValueDescriptors - if fd.Enum() != nil { - evs = fd.Enum().Values() - } - v, ev, err := defval.Unmarshal(s, fd.Kind(), evs, defval.Descriptor) - if err != nil && allowUnresolvable && evs != nil && protoreflect.Name(s).IsValid() { - v = protoreflect.ValueOfEnum(0) - if evs.Len() > 0 { - v = protoreflect.ValueOfEnum(evs.Get(0).Number()) - } - ev = filedesc.PlaceholderEnumValue(fd.Enum().FullName().Parent().Append(protoreflect.Name(s))) - } else if err != nil { - return v, ev, err - } - if fd.Syntax() == protoreflect.Proto3 { - return v, ev, errors.New("cannot be specified under proto3 semantics") - } - if fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind || fd.Cardinality() == protoreflect.Repeated { - return v, ev, errors.New("cannot be specified on composite types") - } - return v, ev, nil -} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go deleted file mode 100644 index 9af1d564..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ /dev/null @@ -1,374 +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 protodesc - -import ( - "strings" - "unicode" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/genid" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/reflect/protoreflect" - - "google.golang.org/protobuf/types/descriptorpb" -) - -func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescriptorProto) error { - for i, ed := range eds { - e := &es[i] - if err := e.L2.ReservedNames.CheckValid(); err != nil { - return errors.New("enum %q reserved names has %v", e.FullName(), err) - } - if err := e.L2.ReservedRanges.CheckValid(); err != nil { - return errors.New("enum %q reserved ranges has %v", e.FullName(), err) - } - if len(ed.GetValue()) == 0 { - return errors.New("enum %q must contain at least one value declaration", e.FullName()) - } - allowAlias := ed.GetOptions().GetAllowAlias() - foundAlias := false - for i := 0; i < e.Values().Len(); i++ { - v1 := e.Values().Get(i) - if v2 := e.Values().ByNumber(v1.Number()); v1 != v2 { - foundAlias = true - if !allowAlias { - return errors.New("enum %q has conflicting non-aliased values on number %d: %q with %q", e.FullName(), v1.Number(), v1.Name(), v2.Name()) - } - } - } - if allowAlias && !foundAlias { - return errors.New("enum %q allows aliases, but none were found", e.FullName()) - } - if e.Syntax() == protoreflect.Proto3 { - if v := e.Values().Get(0); v.Number() != 0 { - return errors.New("enum %q using proto3 semantics must have zero number for the first value", v.FullName()) - } - // Verify that value names in proto3 do not conflict if the - // case-insensitive prefix is removed. - // See protoc v3.8.0: src/google/protobuf/descriptor.cc:4991-5055 - names := map[string]protoreflect.EnumValueDescriptor{} - prefix := strings.Replace(strings.ToLower(string(e.Name())), "_", "", -1) - for i := 0; i < e.Values().Len(); i++ { - v1 := e.Values().Get(i) - s := strs.EnumValueName(strs.TrimEnumPrefix(string(v1.Name()), prefix)) - if v2, ok := names[s]; ok && v1.Number() != v2.Number() { - return errors.New("enum %q using proto3 semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) - } - names[s] = v1 - } - } - - for j, vd := range ed.GetValue() { - v := &e.L2.Values.List[j] - if vd.Number == nil { - return errors.New("enum value %q must have a specified number", v.FullName()) - } - if e.L2.ReservedNames.Has(v.Name()) { - return errors.New("enum value %q must not use reserved name", v.FullName()) - } - if e.L2.ReservedRanges.Has(v.Number()) { - return errors.New("enum value %q must not use reserved number %d", v.FullName(), v.Number()) - } - } - } - return nil -} - -func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { - for i, md := range mds { - m := &ms[i] - - // Handle the message descriptor itself. - isMessageSet := md.GetOptions().GetMessageSetWireFormat() - if err := m.L2.ReservedNames.CheckValid(); err != nil { - return errors.New("message %q reserved names has %v", m.FullName(), err) - } - if err := m.L2.ReservedRanges.CheckValid(isMessageSet); err != nil { - return errors.New("message %q reserved ranges has %v", m.FullName(), err) - } - if err := m.L2.ExtensionRanges.CheckValid(isMessageSet); err != nil { - return errors.New("message %q extension ranges has %v", m.FullName(), err) - } - if err := (*filedesc.FieldRanges).CheckOverlap(&m.L2.ReservedRanges, &m.L2.ExtensionRanges); err != nil { - return errors.New("message %q reserved and extension ranges has %v", m.FullName(), err) - } - for i := 0; i < m.Fields().Len(); i++ { - f1 := m.Fields().Get(i) - if f2 := m.Fields().ByNumber(f1.Number()); f1 != f2 { - return errors.New("message %q has conflicting fields: %q with %q", m.FullName(), f1.Name(), f2.Name()) - } - } - if isMessageSet && !flags.ProtoLegacy { - return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName()) - } - if isMessageSet && (m.Syntax() != protoreflect.Proto2 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { - return errors.New("message %q is an invalid proto1 MessageSet", m.FullName()) - } - if m.Syntax() == protoreflect.Proto3 { - if m.ExtensionRanges().Len() > 0 { - return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) - } - // Verify that field names in proto3 do not conflict if lowercased - // with all underscores removed. - // See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847 - names := map[string]protoreflect.FieldDescriptor{} - for i := 0; i < m.Fields().Len(); i++ { - f1 := m.Fields().Get(i) - s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1) - if f2, ok := names[s]; ok { - return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name()) - } - names[s] = f1 - } - } - - for j, fd := range md.GetField() { - f := &m.L2.Fields.List[j] - if m.L2.ReservedNames.Has(f.Name()) { - return errors.New("message field %q must not use reserved name", f.FullName()) - } - if !f.Number().IsValid() { - return errors.New("message field %q has an invalid number: %d", f.FullName(), f.Number()) - } - if !f.Cardinality().IsValid() { - return errors.New("message field %q has an invalid cardinality: %d", f.FullName(), f.Cardinality()) - } - if m.L2.ReservedRanges.Has(f.Number()) { - return errors.New("message field %q must not use reserved number %d", f.FullName(), f.Number()) - } - if m.L2.ExtensionRanges.Has(f.Number()) { - return errors.New("message field %q with number %d in extension range", f.FullName(), f.Number()) - } - if fd.Extendee != nil { - return errors.New("message field %q may not have extendee: %q", f.FullName(), fd.GetExtendee()) - } - if f.L1.IsProto3Optional { - if f.Syntax() != protoreflect.Proto3 { - return errors.New("message field %q under proto3 optional semantics must be specified in the proto3 syntax", f.FullName()) - } - if f.Cardinality() != protoreflect.Optional { - return errors.New("message field %q under proto3 optional semantics must have optional cardinality", f.FullName()) - } - if f.ContainingOneof() != nil && f.ContainingOneof().Fields().Len() != 1 { - return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName()) - } - } - if f.IsWeak() && !flags.ProtoLegacy { - return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) - } - if f.IsWeak() && (f.Syntax() != protoreflect.Proto2 || !isOptionalMessage(f) || f.ContainingOneof() != nil) { - return errors.New("message field %q may only be weak for an optional message", f.FullName()) - } - if f.IsPacked() && !isPackable(f) { - return errors.New("message field %q is not packable", f.FullName()) - } - if err := checkValidGroup(f); err != nil { - return errors.New("message field %q is an invalid group: %v", f.FullName(), err) - } - if err := checkValidMap(f); err != nil { - return errors.New("message field %q is an invalid map: %v", f.FullName(), err) - } - if f.Syntax() == protoreflect.Proto3 { - if f.Cardinality() == protoreflect.Required { - return errors.New("message field %q using proto3 semantics cannot be required", f.FullName()) - } - if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().Syntax() != protoreflect.Proto3 { - return errors.New("message field %q using proto3 semantics may only depend on a proto3 enum", f.FullName()) - } - } - } - seenSynthetic := false // synthetic oneofs for proto3 optional must come after real oneofs - for j := range md.GetOneofDecl() { - o := &m.L2.Oneofs.List[j] - if o.Fields().Len() == 0 { - return errors.New("message oneof %q must contain at least one field declaration", o.FullName()) - } - if n := o.Fields().Len(); n-1 != (o.Fields().Get(n-1).Index() - o.Fields().Get(0).Index()) { - return errors.New("message oneof %q must have consecutively declared fields", o.FullName()) - } - - if o.IsSynthetic() { - seenSynthetic = true - continue - } - if !o.IsSynthetic() && seenSynthetic { - return errors.New("message oneof %q must be declared before synthetic oneofs", o.FullName()) - } - - for i := 0; i < o.Fields().Len(); i++ { - f := o.Fields().Get(i) - if f.Cardinality() != protoreflect.Optional { - return errors.New("message field %q belongs in a oneof and must be optional", f.FullName()) - } - if f.IsWeak() { - return errors.New("message field %q belongs in a oneof and must not be a weak reference", f.FullName()) - } - } - } - - if err := validateEnumDeclarations(m.L1.Enums.List, md.GetEnumType()); err != nil { - return err - } - if err := validateMessageDeclarations(m.L1.Messages.List, md.GetNestedType()); err != nil { - return err - } - if err := validateExtensionDeclarations(m.L1.Extensions.List, md.GetExtension()); err != nil { - return err - } - } - return nil -} - -func validateExtensionDeclarations(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { - for i, xd := range xds { - x := &xs[i] - // NOTE: Avoid using the IsValid method since extensions to MessageSet - // may have a field number higher than normal. This check only verifies - // that the number is not negative or reserved. We check again later - // if we know that the extendee is definitely not a MessageSet. - if n := x.Number(); n < 0 || (protowire.FirstReservedNumber <= n && n <= protowire.LastReservedNumber) { - return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) - } - if !x.Cardinality().IsValid() || x.Cardinality() == protoreflect.Required { - return errors.New("extension field %q has an invalid cardinality: %d", x.FullName(), x.Cardinality()) - } - if xd.JsonName != nil { - // A bug in older versions of protoc would always populate the - // "json_name" option for extensions when it is meaningless. - // When it did so, it would always use the camel-cased field name. - if xd.GetJsonName() != strs.JSONCamelCase(string(x.Name())) { - return errors.New("extension field %q may not have an explicitly set JSON name: %q", x.FullName(), xd.GetJsonName()) - } - } - if xd.OneofIndex != nil { - return errors.New("extension field %q may not be part of a oneof", x.FullName()) - } - if md := x.ContainingMessage(); !md.IsPlaceholder() { - if !md.ExtensionRanges().Has(x.Number()) { - return errors.New("extension field %q extends %q with non-extension field number: %d", x.FullName(), md.FullName(), x.Number()) - } - isMessageSet := md.Options().(*descriptorpb.MessageOptions).GetMessageSetWireFormat() - if isMessageSet && !isOptionalMessage(x) { - return errors.New("extension field %q extends MessageSet and must be an optional message", x.FullName()) - } - if !isMessageSet && !x.Number().IsValid() { - return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) - } - } - if xd.GetOptions().GetWeak() { - return errors.New("extension field %q cannot be a weak reference", x.FullName()) - } - if x.IsPacked() && !isPackable(x) { - return errors.New("extension field %q is not packable", x.FullName()) - } - if err := checkValidGroup(x); err != nil { - return errors.New("extension field %q is an invalid group: %v", x.FullName(), err) - } - if md := x.Message(); md != nil && md.IsMapEntry() { - return errors.New("extension field %q cannot be a map entry", x.FullName()) - } - if x.Syntax() == protoreflect.Proto3 { - switch x.ContainingMessage().FullName() { - case (*descriptorpb.FileOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.EnumOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.EnumValueOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.MessageOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.FieldOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.OneofOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.ExtensionRangeOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.ServiceOptions)(nil).ProtoReflect().Descriptor().FullName(): - case (*descriptorpb.MethodOptions)(nil).ProtoReflect().Descriptor().FullName(): - default: - return errors.New("extension field %q cannot be declared in proto3 unless extended descriptor options", x.FullName()) - } - } - } - return nil -} - -// isOptionalMessage reports whether this is an optional message. -// If the kind is unknown, it is assumed to be a message. -func isOptionalMessage(fd protoreflect.FieldDescriptor) bool { - return (fd.Kind() == 0 || fd.Kind() == protoreflect.MessageKind) && fd.Cardinality() == protoreflect.Optional -} - -// isPackable checks whether the pack option can be specified. -func isPackable(fd protoreflect.FieldDescriptor) bool { - switch fd.Kind() { - case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: - return false - } - return fd.IsList() -} - -// checkValidGroup reports whether fd is a valid group according to the same -// rules that protoc imposes. -func checkValidGroup(fd protoreflect.FieldDescriptor) error { - md := fd.Message() - switch { - case fd.Kind() != protoreflect.GroupKind: - return nil - case fd.Syntax() != protoreflect.Proto2: - return errors.New("invalid under proto2 semantics") - case md == nil || md.IsPlaceholder(): - return errors.New("message must be resolvable") - case fd.FullName().Parent() != md.FullName().Parent(): - return errors.New("message and field must be declared in the same scope") - case !unicode.IsUpper(rune(md.Name()[0])): - return errors.New("message name must start with an uppercase") - case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): - return errors.New("field name must be lowercased form of the message name") - } - return nil -} - -// checkValidMap checks whether the field is a valid map according to the same -// rules that protoc imposes. -// See protoc v3.8.0: src/google/protobuf/descriptor.cc:6045-6115 -func checkValidMap(fd protoreflect.FieldDescriptor) error { - md := fd.Message() - switch { - case md == nil || !md.IsMapEntry(): - return nil - case fd.FullName().Parent() != md.FullName().Parent(): - return errors.New("message and field must be declared in the same scope") - case md.Name() != protoreflect.Name(strs.MapEntryName(string(fd.Name()))): - return errors.New("incorrect implicit map entry name") - case fd.Cardinality() != protoreflect.Repeated: - return errors.New("field must be repeated") - case md.Fields().Len() != 2: - return errors.New("message must have exactly two fields") - case md.ExtensionRanges().Len() > 0: - return errors.New("message must not have any extension ranges") - case md.Enums().Len()+md.Messages().Len()+md.Extensions().Len() > 0: - return errors.New("message must not have any nested declarations") - } - kf := md.Fields().Get(0) - vf := md.Fields().Get(1) - switch { - case kf.Name() != genid.MapEntry_Key_field_name || kf.Number() != genid.MapEntry_Key_field_number || kf.Cardinality() != protoreflect.Optional || kf.ContainingOneof() != nil || kf.HasDefault(): - return errors.New("invalid key field") - case vf.Name() != genid.MapEntry_Value_field_name || vf.Number() != genid.MapEntry_Value_field_number || vf.Cardinality() != protoreflect.Optional || vf.ContainingOneof() != nil || vf.HasDefault(): - return errors.New("invalid value field") - } - switch kf.Kind() { - case protoreflect.BoolKind: // bool - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: // int32 - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: // int64 - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: // uint32 - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: // uint64 - case protoreflect.StringKind: // string - default: - return errors.New("invalid key kind: %v", kf.Kind()) - } - if e := vf.Enum(); e != nil && e.Values().Len() > 0 && e.Values().Get(0).Number() != 0 { - return errors.New("map enum value must have zero number for the first value") - } - return nil -} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go deleted file mode 100644 index 7352926c..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ /dev/null @@ -1,177 +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 protodesc - -import ( - _ "embed" - "fmt" - "os" - "sync" - - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - SupportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2 - SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023 -) - -//go:embed editions_defaults.binpb -var binaryEditionDefaults []byte -var defaults = &descriptorpb.FeatureSetDefaults{} -var defaultsCacheMu sync.Mutex -var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet) - -func init() { - err := proto.Unmarshal(binaryEditionDefaults, defaults) - if err != nil { - fmt.Fprintf(os.Stderr, "unmarshal editions defaults: %v\n", err) - os.Exit(1) - } -} - -func fromEditionProto(epb descriptorpb.Edition) filedesc.Edition { - return filedesc.Edition(epb) -} - -func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { - switch ed { - case filedesc.EditionUnknown: - return descriptorpb.Edition_EDITION_UNKNOWN - case filedesc.EditionProto2: - return descriptorpb.Edition_EDITION_PROTO2 - case filedesc.EditionProto3: - return descriptorpb.Edition_EDITION_PROTO3 - case filedesc.Edition2023: - return descriptorpb.Edition_EDITION_2023 - default: - panic(fmt.Sprintf("unknown value for edition: %v", ed)) - } -} - -func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { - defaultsCacheMu.Lock() - defer defaultsCacheMu.Unlock() - if def, ok := defaultsCache[ed]; ok { - return def - } - edpb := toEditionProto(ed) - if defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb { - // This should never happen protodesc.(FileOptions).New would fail when - // initializing the file descriptor. - // This most likely means the embedded defaults were not updated. - fmt.Fprintf(os.Stderr, "internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\n", edpb) - os.Exit(1) - } - fs := defaults.GetDefaults()[0].GetFeatures() - // Using a linear search for now. - // Editions are guaranteed to be sorted and thus we could use a binary search. - // Given that there are only a handful of editions (with one more per year) - // there is not much reason to use a binary search. - for _, def := range defaults.GetDefaults() { - if def.GetEdition() <= edpb { - fs = def.GetFeatures() - } else { - break - } - } - defaultsCache[ed] = fs - return fs -} - -func resolveFeatureHasFieldPresence(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.FieldPresence == nil { - return fileDesc.L1.EditionFeatures.IsFieldPresence - } - return fs.GetFieldPresence() == descriptorpb.FeatureSet_LEGACY_REQUIRED || - fs.GetFieldPresence() == descriptorpb.FeatureSet_EXPLICIT -} - -func resolveFeatureRepeatedFieldEncodingPacked(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.RepeatedFieldEncoding == nil { - return fileDesc.L1.EditionFeatures.IsPacked - } - return fs.GetRepeatedFieldEncoding() == descriptorpb.FeatureSet_PACKED -} - -func resolveFeatureEnforceUTF8(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.Utf8Validation == nil { - return fileDesc.L1.EditionFeatures.IsUTF8Validated - } - return fs.GetUtf8Validation() == descriptorpb.FeatureSet_VERIFY -} - -func resolveFeatureDelimitedEncoding(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.MessageEncoding == nil { - return fileDesc.L1.EditionFeatures.IsDelimitedEncoded - } - return fs.GetMessageEncoding() == descriptorpb.FeatureSet_DELIMITED -} - -// initFileDescFromFeatureSet initializes editions related fields in fd based -// on fs. If fs is nil it is assumed to be an empty featureset and all fields -// will be initialized with the appropriate default. fd.L1.Edition must be set -// before calling this function. -func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) { - dfs := getFeatureSetFor(fd.L1.Edition) - if fs == nil { - fs = &descriptorpb.FeatureSet{} - } - - var fieldPresence descriptorpb.FeatureSet_FieldPresence - if fp := fs.FieldPresence; fp != nil { - fieldPresence = *fp - } else { - fieldPresence = *dfs.FieldPresence - } - fd.L1.EditionFeatures.IsFieldPresence = fieldPresence == descriptorpb.FeatureSet_LEGACY_REQUIRED || - fieldPresence == descriptorpb.FeatureSet_EXPLICIT - - var enumType descriptorpb.FeatureSet_EnumType - if et := fs.EnumType; et != nil { - enumType = *et - } else { - enumType = *dfs.EnumType - } - fd.L1.EditionFeatures.IsOpenEnum = enumType == descriptorpb.FeatureSet_OPEN - - var respeatedFieldEncoding descriptorpb.FeatureSet_RepeatedFieldEncoding - if rfe := fs.RepeatedFieldEncoding; rfe != nil { - respeatedFieldEncoding = *rfe - } else { - respeatedFieldEncoding = *dfs.RepeatedFieldEncoding - } - fd.L1.EditionFeatures.IsPacked = respeatedFieldEncoding == descriptorpb.FeatureSet_PACKED - - var isUTF8Validated descriptorpb.FeatureSet_Utf8Validation - if utf8val := fs.Utf8Validation; utf8val != nil { - isUTF8Validated = *utf8val - } else { - isUTF8Validated = *dfs.Utf8Validation - } - fd.L1.EditionFeatures.IsUTF8Validated = isUTF8Validated == descriptorpb.FeatureSet_VERIFY - - var messageEncoding descriptorpb.FeatureSet_MessageEncoding - if me := fs.MessageEncoding; me != nil { - messageEncoding = *me - } else { - messageEncoding = *dfs.MessageEncoding - } - fd.L1.EditionFeatures.IsDelimitedEncoded = messageEncoding == descriptorpb.FeatureSet_DELIMITED - - var jsonFormat descriptorpb.FeatureSet_JsonFormat - if jf := fs.JsonFormat; jf != nil { - jsonFormat = *jf - } else { - jsonFormat = *dfs.JsonFormat - } - fd.L1.EditionFeatures.IsJSONCompliant = jsonFormat == descriptorpb.FeatureSet_ALLOW -} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb b/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb deleted file mode 100644 index 1a8610a8..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb +++ /dev/null @@ -1,4 +0,0 @@ - -  (0 -  (0 -  (0 ( \ No newline at end of file diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go deleted file mode 100644 index 9d6e0542..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +++ /dev/null @@ -1,252 +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 protodesc - -import ( - "fmt" - "strings" - - "google.golang.org/protobuf/internal/encoding/defval" - "google.golang.org/protobuf/internal/strs" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - "google.golang.org/protobuf/types/descriptorpb" -) - -// ToFileDescriptorProto copies a [protoreflect.FileDescriptor] into a -// google.protobuf.FileDescriptorProto message. -func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto { - p := &descriptorpb.FileDescriptorProto{ - Name: proto.String(file.Path()), - Options: proto.Clone(file.Options()).(*descriptorpb.FileOptions), - } - if file.Package() != "" { - p.Package = proto.String(string(file.Package())) - } - for i, imports := 0, file.Imports(); i < imports.Len(); i++ { - imp := imports.Get(i) - p.Dependency = append(p.Dependency, imp.Path()) - if imp.IsPublic { - p.PublicDependency = append(p.PublicDependency, int32(i)) - } - if imp.IsWeak { - p.WeakDependency = append(p.WeakDependency, int32(i)) - } - } - for i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ { - loc := locs.Get(i) - l := &descriptorpb.SourceCodeInfo_Location{} - l.Path = append(l.Path, loc.Path...) - if loc.StartLine == loc.EndLine { - l.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndColumn)} - } else { - l.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndLine), int32(loc.EndColumn)} - } - l.LeadingDetachedComments = append([]string(nil), loc.LeadingDetachedComments...) - if loc.LeadingComments != "" { - l.LeadingComments = proto.String(loc.LeadingComments) - } - if loc.TrailingComments != "" { - l.TrailingComments = proto.String(loc.TrailingComments) - } - if p.SourceCodeInfo == nil { - p.SourceCodeInfo = &descriptorpb.SourceCodeInfo{} - } - p.SourceCodeInfo.Location = append(p.SourceCodeInfo.Location, l) - - } - for i, messages := 0, file.Messages(); i < messages.Len(); i++ { - p.MessageType = append(p.MessageType, ToDescriptorProto(messages.Get(i))) - } - for i, enums := 0, file.Enums(); i < enums.Len(); i++ { - p.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i))) - } - for i, services := 0, file.Services(); i < services.Len(); i++ { - p.Service = append(p.Service, ToServiceDescriptorProto(services.Get(i))) - } - for i, exts := 0, file.Extensions(); i < exts.Len(); i++ { - p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) - } - if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() { - p.Syntax = proto.String(file.Syntax().String()) - } - return p -} - -// ToDescriptorProto copies a [protoreflect.MessageDescriptor] into a -// google.protobuf.DescriptorProto message. -func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto { - p := &descriptorpb.DescriptorProto{ - Name: proto.String(string(message.Name())), - Options: proto.Clone(message.Options()).(*descriptorpb.MessageOptions), - } - for i, fields := 0, message.Fields(); i < fields.Len(); i++ { - p.Field = append(p.Field, ToFieldDescriptorProto(fields.Get(i))) - } - for i, exts := 0, message.Extensions(); i < exts.Len(); i++ { - p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) - } - for i, messages := 0, message.Messages(); i < messages.Len(); i++ { - p.NestedType = append(p.NestedType, ToDescriptorProto(messages.Get(i))) - } - for i, enums := 0, message.Enums(); i < enums.Len(); i++ { - p.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i))) - } - for i, xranges := 0, message.ExtensionRanges(); i < xranges.Len(); i++ { - xrange := xranges.Get(i) - p.ExtensionRange = append(p.ExtensionRange, &descriptorpb.DescriptorProto_ExtensionRange{ - Start: proto.Int32(int32(xrange[0])), - End: proto.Int32(int32(xrange[1])), - Options: proto.Clone(message.ExtensionRangeOptions(i)).(*descriptorpb.ExtensionRangeOptions), - }) - } - for i, oneofs := 0, message.Oneofs(); i < oneofs.Len(); i++ { - p.OneofDecl = append(p.OneofDecl, ToOneofDescriptorProto(oneofs.Get(i))) - } - for i, ranges := 0, message.ReservedRanges(); i < ranges.Len(); i++ { - rrange := ranges.Get(i) - p.ReservedRange = append(p.ReservedRange, &descriptorpb.DescriptorProto_ReservedRange{ - Start: proto.Int32(int32(rrange[0])), - End: proto.Int32(int32(rrange[1])), - }) - } - for i, names := 0, message.ReservedNames(); i < names.Len(); i++ { - p.ReservedName = append(p.ReservedName, string(names.Get(i))) - } - return p -} - -// ToFieldDescriptorProto copies a [protoreflect.FieldDescriptor] into a -// google.protobuf.FieldDescriptorProto message. -func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto { - p := &descriptorpb.FieldDescriptorProto{ - Name: proto.String(string(field.Name())), - Number: proto.Int32(int32(field.Number())), - Label: descriptorpb.FieldDescriptorProto_Label(field.Cardinality()).Enum(), - Options: proto.Clone(field.Options()).(*descriptorpb.FieldOptions), - } - if field.IsExtension() { - p.Extendee = fullNameOf(field.ContainingMessage()) - } - if field.Kind().IsValid() { - p.Type = descriptorpb.FieldDescriptorProto_Type(field.Kind()).Enum() - } - if field.Enum() != nil { - p.TypeName = fullNameOf(field.Enum()) - } - if field.Message() != nil { - p.TypeName = fullNameOf(field.Message()) - } - if field.HasJSONName() { - // A bug in older versions of protoc would always populate the - // "json_name" option for extensions when it is meaningless. - // When it did so, it would always use the camel-cased field name. - if field.IsExtension() { - p.JsonName = proto.String(strs.JSONCamelCase(string(field.Name()))) - } else { - p.JsonName = proto.String(field.JSONName()) - } - } - if field.Syntax() == protoreflect.Proto3 && field.HasOptionalKeyword() { - p.Proto3Optional = proto.Bool(true) - } - if field.HasDefault() { - def, err := defval.Marshal(field.Default(), field.DefaultEnumValue(), field.Kind(), defval.Descriptor) - if err != nil && field.DefaultEnumValue() != nil { - def = string(field.DefaultEnumValue().Name()) // occurs for unresolved enum values - } else if err != nil { - panic(fmt.Sprintf("%v: %v", field.FullName(), err)) - } - p.DefaultValue = proto.String(def) - } - if oneof := field.ContainingOneof(); oneof != nil { - p.OneofIndex = proto.Int32(int32(oneof.Index())) - } - return p -} - -// ToOneofDescriptorProto copies a [protoreflect.OneofDescriptor] into a -// google.protobuf.OneofDescriptorProto message. -func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto { - return &descriptorpb.OneofDescriptorProto{ - Name: proto.String(string(oneof.Name())), - Options: proto.Clone(oneof.Options()).(*descriptorpb.OneofOptions), - } -} - -// ToEnumDescriptorProto copies a [protoreflect.EnumDescriptor] into a -// google.protobuf.EnumDescriptorProto message. -func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto { - p := &descriptorpb.EnumDescriptorProto{ - Name: proto.String(string(enum.Name())), - Options: proto.Clone(enum.Options()).(*descriptorpb.EnumOptions), - } - for i, values := 0, enum.Values(); i < values.Len(); i++ { - p.Value = append(p.Value, ToEnumValueDescriptorProto(values.Get(i))) - } - for i, ranges := 0, enum.ReservedRanges(); i < ranges.Len(); i++ { - rrange := ranges.Get(i) - p.ReservedRange = append(p.ReservedRange, &descriptorpb.EnumDescriptorProto_EnumReservedRange{ - Start: proto.Int32(int32(rrange[0])), - End: proto.Int32(int32(rrange[1])), - }) - } - for i, names := 0, enum.ReservedNames(); i < names.Len(); i++ { - p.ReservedName = append(p.ReservedName, string(names.Get(i))) - } - return p -} - -// ToEnumValueDescriptorProto copies a [protoreflect.EnumValueDescriptor] into a -// google.protobuf.EnumValueDescriptorProto message. -func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto { - return &descriptorpb.EnumValueDescriptorProto{ - Name: proto.String(string(value.Name())), - Number: proto.Int32(int32(value.Number())), - Options: proto.Clone(value.Options()).(*descriptorpb.EnumValueOptions), - } -} - -// ToServiceDescriptorProto copies a [protoreflect.ServiceDescriptor] into a -// google.protobuf.ServiceDescriptorProto message. -func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto { - p := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String(string(service.Name())), - Options: proto.Clone(service.Options()).(*descriptorpb.ServiceOptions), - } - for i, methods := 0, service.Methods(); i < methods.Len(); i++ { - p.Method = append(p.Method, ToMethodDescriptorProto(methods.Get(i))) - } - return p -} - -// ToMethodDescriptorProto copies a [protoreflect.MethodDescriptor] into a -// google.protobuf.MethodDescriptorProto message. -func ToMethodDescriptorProto(method protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto { - p := &descriptorpb.MethodDescriptorProto{ - Name: proto.String(string(method.Name())), - InputType: fullNameOf(method.Input()), - OutputType: fullNameOf(method.Output()), - Options: proto.Clone(method.Options()).(*descriptorpb.MethodOptions), - } - if method.IsStreamingClient() { - p.ClientStreaming = proto.Bool(true) - } - if method.IsStreamingServer() { - p.ServerStreaming = proto.Bool(true) - } - return p -} - -func fullNameOf(d protoreflect.Descriptor) *string { - if d == nil { - return nil - } - if strings.HasPrefix(string(d.FullName()), unknownPrefix) { - return proto.String(string(d.FullName()[len(unknownPrefix):])) - } - return proto.String("." + string(d.FullName())) -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go deleted file mode 100644 index d5d5af6e..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +++ /dev/null @@ -1,78 +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 protoreflect - -import ( - "google.golang.org/protobuf/internal/pragma" -) - -// The following types are used by the fast-path Message.ProtoMethods method. -// -// To avoid polluting the public protoreflect API with types used only by -// low-level implementations, the canonical definitions of these types are -// in the runtime/protoiface package. The definitions here and in protoiface -// must be kept in sync. -type ( - methods = struct { - pragma.NoUnkeyedLiterals - Flags supportFlags - Size func(sizeInput) sizeOutput - Marshal func(marshalInput) (marshalOutput, error) - Unmarshal func(unmarshalInput) (unmarshalOutput, error) - Merge func(mergeInput) mergeOutput - CheckInitialized func(checkInitializedInput) (checkInitializedOutput, error) - } - supportFlags = uint64 - sizeInput = struct { - pragma.NoUnkeyedLiterals - Message Message - Flags uint8 - } - sizeOutput = struct { - pragma.NoUnkeyedLiterals - Size int - } - marshalInput = struct { - pragma.NoUnkeyedLiterals - Message Message - Buf []byte - Flags uint8 - } - marshalOutput = struct { - pragma.NoUnkeyedLiterals - Buf []byte - } - unmarshalInput = struct { - pragma.NoUnkeyedLiterals - Message Message - Buf []byte - Flags uint8 - Resolver interface { - FindExtensionByName(field FullName) (ExtensionType, error) - FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) - } - Depth int - } - unmarshalOutput = struct { - pragma.NoUnkeyedLiterals - Flags uint8 - } - mergeInput = struct { - pragma.NoUnkeyedLiterals - Source Message - Destination Message - } - mergeOutput = struct { - pragma.NoUnkeyedLiterals - Flags uint8 - } - checkInitializedInput = struct { - pragma.NoUnkeyedLiterals - Message Message - } - checkInitializedOutput = struct { - pragma.NoUnkeyedLiterals - } -) diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go deleted file mode 100644 index ec6572df..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +++ /dev/null @@ -1,511 +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. - -// Package protoreflect provides interfaces to dynamically manipulate messages. -// -// This package includes type descriptors which describe the structure of types -// defined in proto source files and value interfaces which provide the -// ability to examine and manipulate the contents of messages. -// -// # Protocol Buffer Descriptors -// -// Protobuf descriptors (e.g., [EnumDescriptor] or [MessageDescriptor]) -// are immutable objects that represent protobuf type information. -// They are wrappers around the messages declared in descriptor.proto. -// Protobuf descriptors alone lack any information regarding Go types. -// -// Enums and messages generated by this module implement [Enum] and [ProtoMessage], -// where the Descriptor and ProtoReflect.Descriptor accessors respectively -// return the protobuf descriptor for the values. -// -// The protobuf descriptor interfaces are not meant to be implemented by -// user code since they might need to be extended in the future to support -// additions to the protobuf language. -// The [google.golang.org/protobuf/reflect/protodesc] package converts between -// google.protobuf.DescriptorProto messages and protobuf descriptors. -// -// # Go Type Descriptors -// -// A type descriptor (e.g., [EnumType] or [MessageType]) is a constructor for -// a concrete Go type that represents the associated protobuf descriptor. -// There is commonly a one-to-one relationship between protobuf descriptors and -// Go type descriptors, but it can potentially be a one-to-many relationship. -// -// Enums and messages generated by this module implement [Enum] and [ProtoMessage], -// where the Type and ProtoReflect.Type accessors respectively -// return the protobuf descriptor for the values. -// -// The [google.golang.org/protobuf/types/dynamicpb] package can be used to -// create Go type descriptors from protobuf descriptors. -// -// # Value Interfaces -// -// The [Enum] and [Message] interfaces provide a reflective view over an -// enum or message instance. For enums, it provides the ability to retrieve -// the enum value number for any concrete enum type. For messages, it provides -// the ability to access or manipulate fields of the message. -// -// To convert a [google.golang.org/protobuf/proto.Message] to a [protoreflect.Message], use the -// former's ProtoReflect method. Since the ProtoReflect method is new to the -// v2 message interface, it may not be present on older message implementations. -// The [github.com/golang/protobuf/proto.MessageReflect] function can be used -// to obtain a reflective view on older messages. -// -// # Relationships -// -// The following diagrams demonstrate the relationships between -// various types declared in this package. -// -// ┌───────────────────────────────────┐ -// V │ -// ┌────────────── New(n) ─────────────┐ │ -// │ │ │ -// │ ┌──── Descriptor() ──┐ │ ┌── Number() ──┐ │ -// │ │ V V │ V │ -// ╔════════════╗ ╔════════════════╗ ╔════════╗ ╔════════════╗ -// ║ EnumType ║ ║ EnumDescriptor ║ ║ Enum ║ ║ EnumNumber ║ -// ╚════════════╝ ╚════════════════╝ ╚════════╝ ╚════════════╝ -// Λ Λ │ │ -// │ └─── Descriptor() ──┘ │ -// │ │ -// └────────────────── Type() ───────┘ -// -// • An [EnumType] describes a concrete Go enum type. -// It has an EnumDescriptor and can construct an Enum instance. -// -// • An [EnumDescriptor] describes an abstract protobuf enum type. -// -// • An [Enum] is a concrete enum instance. Generated enums implement Enum. -// -// ┌──────────────── New() ─────────────────┐ -// │ │ -// │ ┌─── Descriptor() ─────┐ │ ┌── Interface() ───┐ -// │ │ V V │ V -// ╔═════════════╗ ╔═══════════════════╗ ╔═════════╗ ╔══════════════╗ -// ║ MessageType ║ ║ MessageDescriptor ║ ║ Message ║ ║ ProtoMessage ║ -// ╚═════════════╝ ╚═══════════════════╝ ╚═════════╝ ╚══════════════╝ -// Λ Λ │ │ Λ │ -// │ └──── Descriptor() ────┘ │ └─ ProtoReflect() ─┘ -// │ │ -// └─────────────────── Type() ─────────┘ -// -// • A [MessageType] describes a concrete Go message type. -// It has a [MessageDescriptor] and can construct a [Message] instance. -// Just as how Go's [reflect.Type] is a reflective description of a Go type, -// a [MessageType] is a reflective description of a Go type for a protobuf message. -// -// • A [MessageDescriptor] describes an abstract protobuf message type. -// It has no understanding of Go types. In order to construct a [MessageType] -// from just a [MessageDescriptor], you can consider looking up the message type -// in the global registry using the FindMessageByName method on -// [google.golang.org/protobuf/reflect/protoregistry.GlobalTypes] -// or constructing a dynamic [MessageType] using -// [google.golang.org/protobuf/types/dynamicpb.NewMessageType]. -// -// • A [Message] is a reflective view over a concrete message instance. -// Generated messages implement [ProtoMessage], which can convert to a [Message]. -// Just as how Go's [reflect.Value] is a reflective view over a Go value, -// a [Message] is a reflective view over a concrete protobuf message instance. -// Using Go reflection as an analogy, the [ProtoMessage.ProtoReflect] method is similar to -// calling [reflect.ValueOf], and the [Message.Interface] method is similar to -// calling [reflect.Value.Interface]. -// -// ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐ -// │ V │ V -// ╔═══════════════╗ ╔═════════════════════════╗ ╔═════════════════════╗ -// ║ ExtensionType ║ ║ ExtensionTypeDescriptor ║ ║ ExtensionDescriptor ║ -// ╚═══════════════╝ ╚═════════════════════════╝ ╚═════════════════════╝ -// Λ │ │ Λ │ Λ -// └─────── Type() ───────┘ │ └─── may implement ────┘ │ -// │ │ -// └────── implements ────────┘ -// -// • An [ExtensionType] describes a concrete Go implementation of an extension. -// It has an [ExtensionTypeDescriptor] and can convert to/from -// an abstract [Value] and a Go value. -// -// • An [ExtensionTypeDescriptor] is an [ExtensionDescriptor] -// which also has an [ExtensionType]. -// -// • An [ExtensionDescriptor] describes an abstract protobuf extension field and -// may not always be an [ExtensionTypeDescriptor]. -package protoreflect - -import ( - "fmt" - "strings" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/pragma" -) - -type doNotImplement pragma.DoNotImplement - -// ProtoMessage is the top-level interface that all proto messages implement. -// This is declared in the protoreflect package to avoid a cyclic dependency; -// use the [google.golang.org/protobuf/proto.Message] type instead, which aliases this type. -type ProtoMessage interface{ ProtoReflect() Message } - -// Syntax is the language version of the proto file. -type Syntax syntax - -type syntax int8 // keep exact type opaque as the int type may change - -const ( - Proto2 Syntax = 2 - Proto3 Syntax = 3 - Editions Syntax = 4 -) - -// IsValid reports whether the syntax is valid. -func (s Syntax) IsValid() bool { - switch s { - case Proto2, Proto3: - return true - default: - return false - } -} - -// String returns s as a proto source identifier (e.g., "proto2"). -func (s Syntax) String() string { - switch s { - case Proto2: - return "proto2" - case Proto3: - return "proto3" - default: - return fmt.Sprintf("", s) - } -} - -// GoString returns s as a Go source identifier (e.g., "Proto2"). -func (s Syntax) GoString() string { - switch s { - case Proto2: - return "Proto2" - case Proto3: - return "Proto3" - default: - return fmt.Sprintf("Syntax(%d)", s) - } -} - -// Cardinality determines whether a field is optional, required, or repeated. -type Cardinality cardinality - -type cardinality int8 // keep exact type opaque as the int type may change - -// Constants as defined by the google.protobuf.Cardinality enumeration. -const ( - Optional Cardinality = 1 // appears zero or one times - Required Cardinality = 2 // appears exactly one time; invalid with Proto3 - Repeated Cardinality = 3 // appears zero or more times -) - -// IsValid reports whether the cardinality is valid. -func (c Cardinality) IsValid() bool { - switch c { - case Optional, Required, Repeated: - return true - default: - return false - } -} - -// String returns c as a proto source identifier (e.g., "optional"). -func (c Cardinality) String() string { - switch c { - case Optional: - return "optional" - case Required: - return "required" - case Repeated: - return "repeated" - default: - return fmt.Sprintf("", c) - } -} - -// GoString returns c as a Go source identifier (e.g., "Optional"). -func (c Cardinality) GoString() string { - switch c { - case Optional: - return "Optional" - case Required: - return "Required" - case Repeated: - return "Repeated" - default: - return fmt.Sprintf("Cardinality(%d)", c) - } -} - -// Kind indicates the basic proto kind of a field. -type Kind kind - -type kind int8 // keep exact type opaque as the int type may change - -// Constants as defined by the google.protobuf.Field.Kind enumeration. -const ( - BoolKind Kind = 8 - EnumKind Kind = 14 - Int32Kind Kind = 5 - Sint32Kind Kind = 17 - Uint32Kind Kind = 13 - Int64Kind Kind = 3 - Sint64Kind Kind = 18 - Uint64Kind Kind = 4 - Sfixed32Kind Kind = 15 - Fixed32Kind Kind = 7 - FloatKind Kind = 2 - Sfixed64Kind Kind = 16 - Fixed64Kind Kind = 6 - DoubleKind Kind = 1 - StringKind Kind = 9 - BytesKind Kind = 12 - MessageKind Kind = 11 - GroupKind Kind = 10 -) - -// IsValid reports whether the kind is valid. -func (k Kind) IsValid() bool { - switch k { - case BoolKind, EnumKind, - Int32Kind, Sint32Kind, Uint32Kind, - Int64Kind, Sint64Kind, Uint64Kind, - Sfixed32Kind, Fixed32Kind, FloatKind, - Sfixed64Kind, Fixed64Kind, DoubleKind, - StringKind, BytesKind, MessageKind, GroupKind: - return true - default: - return false - } -} - -// String returns k as a proto source identifier (e.g., "bool"). -func (k Kind) String() string { - switch k { - case BoolKind: - return "bool" - case EnumKind: - return "enum" - case Int32Kind: - return "int32" - case Sint32Kind: - return "sint32" - case Uint32Kind: - return "uint32" - case Int64Kind: - return "int64" - case Sint64Kind: - return "sint64" - case Uint64Kind: - return "uint64" - case Sfixed32Kind: - return "sfixed32" - case Fixed32Kind: - return "fixed32" - case FloatKind: - return "float" - case Sfixed64Kind: - return "sfixed64" - case Fixed64Kind: - return "fixed64" - case DoubleKind: - return "double" - case StringKind: - return "string" - case BytesKind: - return "bytes" - case MessageKind: - return "message" - case GroupKind: - return "group" - default: - return fmt.Sprintf("", k) - } -} - -// GoString returns k as a Go source identifier (e.g., "BoolKind"). -func (k Kind) GoString() string { - switch k { - case BoolKind: - return "BoolKind" - case EnumKind: - return "EnumKind" - case Int32Kind: - return "Int32Kind" - case Sint32Kind: - return "Sint32Kind" - case Uint32Kind: - return "Uint32Kind" - case Int64Kind: - return "Int64Kind" - case Sint64Kind: - return "Sint64Kind" - case Uint64Kind: - return "Uint64Kind" - case Sfixed32Kind: - return "Sfixed32Kind" - case Fixed32Kind: - return "Fixed32Kind" - case FloatKind: - return "FloatKind" - case Sfixed64Kind: - return "Sfixed64Kind" - case Fixed64Kind: - return "Fixed64Kind" - case DoubleKind: - return "DoubleKind" - case StringKind: - return "StringKind" - case BytesKind: - return "BytesKind" - case MessageKind: - return "MessageKind" - case GroupKind: - return "GroupKind" - default: - return fmt.Sprintf("Kind(%d)", k) - } -} - -// FieldNumber is the field number in a message. -type FieldNumber = protowire.Number - -// FieldNumbers represent a list of field numbers. -type FieldNumbers interface { - // Len reports the number of fields in the list. - Len() int - // Get returns the ith field number. It panics if out of bounds. - Get(i int) FieldNumber - // Has reports whether n is within the list of fields. - Has(n FieldNumber) bool - - doNotImplement -} - -// FieldRanges represent a list of field number ranges. -type FieldRanges interface { - // Len reports the number of ranges in the list. - Len() int - // Get returns the ith range. It panics if out of bounds. - Get(i int) [2]FieldNumber // start inclusive; end exclusive - // Has reports whether n is within any of the ranges. - Has(n FieldNumber) bool - - doNotImplement -} - -// EnumNumber is the numeric value for an enum. -type EnumNumber int32 - -// EnumRanges represent a list of enum number ranges. -type EnumRanges interface { - // Len reports the number of ranges in the list. - Len() int - // Get returns the ith range. It panics if out of bounds. - Get(i int) [2]EnumNumber // start inclusive; end inclusive - // Has reports whether n is within any of the ranges. - Has(n EnumNumber) bool - - doNotImplement -} - -// Name is the short name for a proto declaration. This is not the name -// as used in Go source code, which might not be identical to the proto name. -type Name string // e.g., "Kind" - -// IsValid reports whether s is a syntactically valid name. -// An empty name is invalid. -func (s Name) IsValid() bool { - return consumeIdent(string(s)) == len(s) -} - -// Names represent a list of names. -type Names interface { - // Len reports the number of names in the list. - Len() int - // Get returns the ith name. It panics if out of bounds. - Get(i int) Name - // Has reports whether s matches any names in the list. - Has(s Name) bool - - doNotImplement -} - -// FullName is a qualified name that uniquely identifies a proto declaration. -// A qualified name is the concatenation of the proto package along with the -// fully-declared name (i.e., name of parent preceding the name of the child), -// with a '.' delimiter placed between each [Name]. -// -// This should not have any leading or trailing dots. -type FullName string // e.g., "google.protobuf.Field.Kind" - -// IsValid reports whether s is a syntactically valid full name. -// An empty full name is invalid. -func (s FullName) IsValid() bool { - i := consumeIdent(string(s)) - if i < 0 { - return false - } - for len(s) > i { - if s[i] != '.' { - return false - } - i++ - n := consumeIdent(string(s[i:])) - if n < 0 { - return false - } - i += n - } - return true -} - -func consumeIdent(s string) (i int) { - if len(s) == 0 || !isLetter(s[i]) { - return -1 - } - i++ - for len(s) > i && isLetterDigit(s[i]) { - i++ - } - return i -} -func isLetter(c byte) bool { - return c == '_' || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') -} -func isLetterDigit(c byte) bool { - return isLetter(c) || ('0' <= c && c <= '9') -} - -// Name returns the short name, which is the last identifier segment. -// A single segment FullName is the [Name] itself. -func (n FullName) Name() Name { - if i := strings.LastIndexByte(string(n), '.'); i >= 0 { - return Name(n[i+1:]) - } - return Name(n) -} - -// Parent returns the full name with the trailing identifier removed. -// A single segment FullName has no parent. -func (n FullName) Parent() FullName { - if i := strings.LastIndexByte(string(n), '.'); i >= 0 { - return n[:i] - } - return "" -} - -// Append returns the qualified name appended with the provided short name. -// -// Invariant: n == n.Parent().Append(n.Name()) // assuming n is valid -func (n FullName) Append(s Name) FullName { - if n == "" { - return FullName(s) - } - return n + "." + FullName(s) -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go deleted file mode 100644 index 0b994288..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go +++ /dev/null @@ -1,129 +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 protoreflect - -import ( - "strconv" -) - -// SourceLocations is a list of source locations. -type SourceLocations interface { - // Len reports the number of source locations in the proto file. - Len() int - // Get returns the ith SourceLocation. It panics if out of bounds. - Get(int) SourceLocation - - // ByPath returns the SourceLocation for the given path, - // returning the first location if multiple exist for the same path. - // If multiple locations exist for the same path, - // then SourceLocation.Next index can be used to identify the - // index of the next SourceLocation. - // If no location exists for this path, it returns the zero value. - ByPath(path SourcePath) SourceLocation - - // ByDescriptor returns the SourceLocation for the given descriptor, - // returning the first location if multiple exist for the same path. - // If no location exists for this descriptor, it returns the zero value. - ByDescriptor(desc Descriptor) SourceLocation - - doNotImplement -} - -// SourceLocation describes a source location and -// corresponds with the google.protobuf.SourceCodeInfo.Location message. -type SourceLocation struct { - // Path is the path to the declaration from the root file descriptor. - // The contents of this slice must not be mutated. - Path SourcePath - - // StartLine and StartColumn are the zero-indexed starting location - // in the source file for the declaration. - StartLine, StartColumn int - // EndLine and EndColumn are the zero-indexed ending location - // in the source file for the declaration. - // In the descriptor.proto, the end line may be omitted if it is identical - // to the start line. Here, it is always populated. - EndLine, EndColumn int - - // LeadingDetachedComments are the leading detached comments - // for the declaration. The contents of this slice must not be mutated. - LeadingDetachedComments []string - // LeadingComments is the leading attached comment for the declaration. - LeadingComments string - // TrailingComments is the trailing attached comment for the declaration. - TrailingComments string - - // Next is an index into SourceLocations for the next source location that - // has the same Path. It is zero if there is no next location. - Next int -} - -// SourcePath identifies part of a file descriptor for a source location. -// The SourcePath is a sequence of either field numbers or indexes into -// a repeated field that form a path starting from the root file descriptor. -// -// See google.protobuf.SourceCodeInfo.Location.path. -type SourcePath []int32 - -// Equal reports whether p1 equals p2. -func (p1 SourcePath) Equal(p2 SourcePath) bool { - if len(p1) != len(p2) { - return false - } - for i := range p1 { - if p1[i] != p2[i] { - return false - } - } - return true -} - -// String formats the path in a humanly readable manner. -// The output is guaranteed to be deterministic, -// making it suitable for use as a key into a Go map. -// It is not guaranteed to be stable as the exact output could change -// in a future version of this module. -// -// Example output: -// -// .message_type[6].nested_type[15].field[3] -func (p SourcePath) String() string { - b := p.appendFileDescriptorProto(nil) - for _, i := range p { - b = append(b, '.') - b = strconv.AppendInt(b, int64(i), 10) - } - return string(b) -} - -type appendFunc func(*SourcePath, []byte) []byte - -func (p *SourcePath) appendSingularField(b []byte, name string, f appendFunc) []byte { - if len(*p) == 0 { - return b - } - b = append(b, '.') - b = append(b, name...) - *p = (*p)[1:] - if f != nil { - b = f(p, b) - } - return b -} - -func (p *SourcePath) appendRepeatedField(b []byte, name string, f appendFunc) []byte { - b = p.appendSingularField(b, name, nil) - if len(*p) == 0 || (*p)[0] < 0 { - return b - } - b = append(b, '[') - b = strconv.AppendUint(b, uint64((*p)[0]), 10) - b = append(b, ']') - *p = (*p)[1:] - if f != nil { - b = f(p, b) - } - return b -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go deleted file mode 100644 index 0c045db6..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ /dev/null @@ -1,554 +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. - -// Code generated by generate-protos. DO NOT EDIT. - -package protoreflect - -func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendSingularField(b, "package", nil) - case 3: - b = p.appendRepeatedField(b, "dependency", nil) - case 10: - b = p.appendRepeatedField(b, "public_dependency", nil) - case 11: - b = p.appendRepeatedField(b, "weak_dependency", nil) - case 4: - b = p.appendRepeatedField(b, "message_type", (*SourcePath).appendDescriptorProto) - case 5: - b = p.appendRepeatedField(b, "enum_type", (*SourcePath).appendEnumDescriptorProto) - case 6: - b = p.appendRepeatedField(b, "service", (*SourcePath).appendServiceDescriptorProto) - case 7: - b = p.appendRepeatedField(b, "extension", (*SourcePath).appendFieldDescriptorProto) - case 8: - b = p.appendSingularField(b, "options", (*SourcePath).appendFileOptions) - case 9: - b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo) - case 12: - b = p.appendSingularField(b, "syntax", nil) - case 14: - b = p.appendSingularField(b, "edition", nil) - } - return b -} - -func (p *SourcePath) appendDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendRepeatedField(b, "field", (*SourcePath).appendFieldDescriptorProto) - case 6: - b = p.appendRepeatedField(b, "extension", (*SourcePath).appendFieldDescriptorProto) - case 3: - b = p.appendRepeatedField(b, "nested_type", (*SourcePath).appendDescriptorProto) - case 4: - b = p.appendRepeatedField(b, "enum_type", (*SourcePath).appendEnumDescriptorProto) - case 5: - b = p.appendRepeatedField(b, "extension_range", (*SourcePath).appendDescriptorProto_ExtensionRange) - case 8: - b = p.appendRepeatedField(b, "oneof_decl", (*SourcePath).appendOneofDescriptorProto) - case 7: - b = p.appendSingularField(b, "options", (*SourcePath).appendMessageOptions) - case 9: - b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendDescriptorProto_ReservedRange) - case 10: - b = p.appendRepeatedField(b, "reserved_name", nil) - } - return b -} - -func (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendRepeatedField(b, "value", (*SourcePath).appendEnumValueDescriptorProto) - case 3: - b = p.appendSingularField(b, "options", (*SourcePath).appendEnumOptions) - case 4: - b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange) - case 5: - b = p.appendRepeatedField(b, "reserved_name", nil) - } - return b -} - -func (p *SourcePath) appendServiceDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendRepeatedField(b, "method", (*SourcePath).appendMethodDescriptorProto) - case 3: - b = p.appendSingularField(b, "options", (*SourcePath).appendServiceOptions) - } - return b -} - -func (p *SourcePath) appendFieldDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 3: - b = p.appendSingularField(b, "number", nil) - case 4: - b = p.appendSingularField(b, "label", nil) - case 5: - b = p.appendSingularField(b, "type", nil) - case 6: - b = p.appendSingularField(b, "type_name", nil) - case 2: - b = p.appendSingularField(b, "extendee", nil) - case 7: - b = p.appendSingularField(b, "default_value", nil) - case 9: - b = p.appendSingularField(b, "oneof_index", nil) - case 10: - b = p.appendSingularField(b, "json_name", nil) - case 8: - b = p.appendSingularField(b, "options", (*SourcePath).appendFieldOptions) - case 17: - b = p.appendSingularField(b, "proto3_optional", nil) - } - return b -} - -func (p *SourcePath) appendFileOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "java_package", nil) - case 8: - b = p.appendSingularField(b, "java_outer_classname", nil) - case 10: - b = p.appendSingularField(b, "java_multiple_files", nil) - case 20: - b = p.appendSingularField(b, "java_generate_equals_and_hash", nil) - case 27: - b = p.appendSingularField(b, "java_string_check_utf8", nil) - case 9: - b = p.appendSingularField(b, "optimize_for", nil) - case 11: - b = p.appendSingularField(b, "go_package", nil) - case 16: - b = p.appendSingularField(b, "cc_generic_services", nil) - case 17: - b = p.appendSingularField(b, "java_generic_services", nil) - case 18: - b = p.appendSingularField(b, "py_generic_services", nil) - case 42: - b = p.appendSingularField(b, "php_generic_services", nil) - case 23: - b = p.appendSingularField(b, "deprecated", nil) - case 31: - b = p.appendSingularField(b, "cc_enable_arenas", nil) - case 36: - b = p.appendSingularField(b, "objc_class_prefix", nil) - case 37: - b = p.appendSingularField(b, "csharp_namespace", nil) - case 39: - b = p.appendSingularField(b, "swift_prefix", nil) - case 40: - b = p.appendSingularField(b, "php_class_prefix", nil) - case 41: - b = p.appendSingularField(b, "php_namespace", nil) - case 44: - b = p.appendSingularField(b, "php_metadata_namespace", nil) - case 45: - b = p.appendSingularField(b, "ruby_package", nil) - case 50: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendSourceCodeInfo(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendRepeatedField(b, "location", (*SourcePath).appendSourceCodeInfo_Location) - } - return b -} - -func (p *SourcePath) appendDescriptorProto_ExtensionRange(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "start", nil) - case 2: - b = p.appendSingularField(b, "end", nil) - case 3: - b = p.appendSingularField(b, "options", (*SourcePath).appendExtensionRangeOptions) - } - return b -} - -func (p *SourcePath) appendOneofDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendSingularField(b, "options", (*SourcePath).appendOneofOptions) - } - return b -} - -func (p *SourcePath) appendMessageOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "message_set_wire_format", nil) - case 2: - b = p.appendSingularField(b, "no_standard_descriptor_accessor", nil) - case 3: - b = p.appendSingularField(b, "deprecated", nil) - case 7: - b = p.appendSingularField(b, "map_entry", nil) - case 11: - b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil) - case 12: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendDescriptorProto_ReservedRange(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "start", nil) - case 2: - b = p.appendSingularField(b, "end", nil) - } - return b -} - -func (p *SourcePath) appendEnumValueDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendSingularField(b, "number", nil) - case 3: - b = p.appendSingularField(b, "options", (*SourcePath).appendEnumValueOptions) - } - return b -} - -func (p *SourcePath) appendEnumOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 2: - b = p.appendSingularField(b, "allow_alias", nil) - case 3: - b = p.appendSingularField(b, "deprecated", nil) - case 6: - b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil) - case 7: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendEnumDescriptorProto_EnumReservedRange(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "start", nil) - case 2: - b = p.appendSingularField(b, "end", nil) - } - return b -} - -func (p *SourcePath) appendMethodDescriptorProto(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name", nil) - case 2: - b = p.appendSingularField(b, "input_type", nil) - case 3: - b = p.appendSingularField(b, "output_type", nil) - case 4: - b = p.appendSingularField(b, "options", (*SourcePath).appendMethodOptions) - case 5: - b = p.appendSingularField(b, "client_streaming", nil) - case 6: - b = p.appendSingularField(b, "server_streaming", nil) - } - return b -} - -func (p *SourcePath) appendServiceOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 34: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 33: - b = p.appendSingularField(b, "deprecated", nil) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendFieldOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "ctype", nil) - case 2: - b = p.appendSingularField(b, "packed", nil) - case 6: - b = p.appendSingularField(b, "jstype", nil) - case 5: - b = p.appendSingularField(b, "lazy", nil) - case 15: - b = p.appendSingularField(b, "unverified_lazy", nil) - case 3: - b = p.appendSingularField(b, "deprecated", nil) - case 10: - b = p.appendSingularField(b, "weak", nil) - case 16: - b = p.appendSingularField(b, "debug_redact", nil) - case 17: - b = p.appendSingularField(b, "retention", nil) - case 19: - b = p.appendRepeatedField(b, "targets", nil) - case 20: - b = p.appendRepeatedField(b, "edition_defaults", (*SourcePath).appendFieldOptions_EditionDefault) - case 21: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendFeatureSet(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "field_presence", nil) - case 2: - b = p.appendSingularField(b, "enum_type", nil) - case 3: - b = p.appendSingularField(b, "repeated_field_encoding", nil) - case 4: - b = p.appendSingularField(b, "utf8_validation", nil) - case 5: - b = p.appendSingularField(b, "message_encoding", nil) - case 6: - b = p.appendSingularField(b, "json_format", nil) - } - return b -} - -func (p *SourcePath) appendUninterpretedOption(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 2: - b = p.appendRepeatedField(b, "name", (*SourcePath).appendUninterpretedOption_NamePart) - case 3: - b = p.appendSingularField(b, "identifier_value", nil) - case 4: - b = p.appendSingularField(b, "positive_int_value", nil) - case 5: - b = p.appendSingularField(b, "negative_int_value", nil) - case 6: - b = p.appendSingularField(b, "double_value", nil) - case 7: - b = p.appendSingularField(b, "string_value", nil) - case 8: - b = p.appendSingularField(b, "aggregate_value", nil) - } - return b -} - -func (p *SourcePath) appendSourceCodeInfo_Location(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendRepeatedField(b, "path", nil) - case 2: - b = p.appendRepeatedField(b, "span", nil) - case 3: - b = p.appendSingularField(b, "leading_comments", nil) - case 4: - b = p.appendSingularField(b, "trailing_comments", nil) - case 6: - b = p.appendRepeatedField(b, "leading_detached_comments", nil) - } - return b -} - -func (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - case 2: - b = p.appendRepeatedField(b, "declaration", (*SourcePath).appendExtensionRangeOptions_Declaration) - case 50: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 3: - b = p.appendSingularField(b, "verification", nil) - } - return b -} - -func (p *SourcePath) appendOneofOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "deprecated", nil) - case 2: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 3: - b = p.appendSingularField(b, "debug_redact", nil) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendMethodOptions(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 33: - b = p.appendSingularField(b, "deprecated", nil) - case 34: - b = p.appendSingularField(b, "idempotency_level", nil) - case 35: - b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) - case 999: - b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) - } - return b -} - -func (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 3: - b = p.appendSingularField(b, "edition", nil) - case 2: - b = p.appendSingularField(b, "value", nil) - } - return b -} - -func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "name_part", nil) - case 2: - b = p.appendSingularField(b, "is_extension", nil) - } - return b -} - -func (p *SourcePath) appendExtensionRangeOptions_Declaration(b []byte) []byte { - if len(*p) == 0 { - return b - } - switch (*p)[0] { - case 1: - b = p.appendSingularField(b, "number", nil) - case 2: - b = p.appendSingularField(b, "full_name", nil) - case 3: - b = p.appendSingularField(b, "type", nil) - case 5: - b = p.appendSingularField(b, "reserved", nil) - case 6: - b = p.appendSingularField(b, "repeated", nil) - } - return b -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go deleted file mode 100644 index 60ff62b4..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ /dev/null @@ -1,666 +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. - -package protoreflect - -// Descriptor provides a set of accessors that are common to every descriptor. -// Each descriptor type wraps the equivalent google.protobuf.XXXDescriptorProto, -// but provides efficient lookup and immutability. -// -// Each descriptor is comparable. Equality implies that the two types are -// exactly identical. However, it is possible for the same semantically -// identical proto type to be represented by multiple type descriptors. -// -// For example, suppose we have t1 and t2 which are both an [MessageDescriptor]. -// If t1 == t2, then the types are definitely equal and all accessors return -// the same information. However, if t1 != t2, then it is still possible that -// they still represent the same proto type (e.g., t1.FullName == t2.FullName). -// This can occur if a descriptor type is created dynamically, or multiple -// versions of the same proto type are accidentally linked into the Go binary. -type Descriptor interface { - // ParentFile returns the parent file descriptor that this descriptor - // is declared within. The parent file for the file descriptor is itself. - // - // Support for this functionality is optional and may return nil. - ParentFile() FileDescriptor - - // Parent returns the parent containing this descriptor declaration. - // The following shows the mapping from child type to possible parent types: - // - // ╔═════════════════════╤═══════════════════════════════════╗ - // ║ Child type │ Possible parent types ║ - // ╠═════════════════════╪═══════════════════════════════════╣ - // ║ FileDescriptor │ nil ║ - // ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ - // ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ - // ║ OneofDescriptor │ MessageDescriptor ║ - // ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ - // ║ EnumValueDescriptor │ EnumDescriptor ║ - // ║ ServiceDescriptor │ FileDescriptor ║ - // ║ MethodDescriptor │ ServiceDescriptor ║ - // ╚═════════════════════╧═══════════════════════════════════╝ - // - // Support for this functionality is optional and may return nil. - Parent() Descriptor - - // Index returns the index of this descriptor within its parent. - // It returns 0 if the descriptor does not have a parent or if the parent - // is unknown. - Index() int - - // Syntax is the protobuf syntax. - Syntax() Syntax // e.g., Proto2 or Proto3 - - // Name is the short name of the declaration (i.e., FullName.Name). - Name() Name // e.g., "Any" - - // FullName is the fully-qualified name of the declaration. - // - // The FullName is a concatenation of the full name of the type that this - // type is declared within and the declaration name. For example, - // field "foo_field" in message "proto.package.MyMessage" is - // uniquely identified as "proto.package.MyMessage.foo_field". - // Enum values are an exception to the rule (see EnumValueDescriptor). - FullName() FullName // e.g., "google.protobuf.Any" - - // IsPlaceholder reports whether type information is missing since a - // dependency is not resolved, in which case only name information is known. - // - // Placeholder types may only be returned by the following accessors - // as a result of unresolved dependencies or weak imports: - // - // ╔═══════════════════════════════════╤═════════════════════╗ - // ║ Accessor │ Descriptor ║ - // ╠═══════════════════════════════════╪═════════════════════╣ - // ║ FileImports.FileDescriptor │ FileDescriptor ║ - // ║ FieldDescriptor.Enum │ EnumDescriptor ║ - // ║ FieldDescriptor.Message │ MessageDescriptor ║ - // ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ - // ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ - // ║ MethodDescriptor.Input │ MessageDescriptor ║ - // ║ MethodDescriptor.Output │ MessageDescriptor ║ - // ╚═══════════════════════════════════╧═════════════════════╝ - // - // If true, only Name and FullName are valid. - // For FileDescriptor, the Path is also valid. - IsPlaceholder() bool - - // Options returns the descriptor options. The caller must not modify - // the returned value. - // - // To avoid a dependency cycle, this function returns a proto.Message value. - // The proto message type returned for each descriptor type is as follows: - // ╔═════════════════════╤══════════════════════════════════════════╗ - // ║ Go type │ Protobuf message type ║ - // ╠═════════════════════╪══════════════════════════════════════════╣ - // ║ FileDescriptor │ google.protobuf.FileOptions ║ - // ║ EnumDescriptor │ google.protobuf.EnumOptions ║ - // ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ - // ║ MessageDescriptor │ google.protobuf.MessageOptions ║ - // ║ FieldDescriptor │ google.protobuf.FieldOptions ║ - // ║ OneofDescriptor │ google.protobuf.OneofOptions ║ - // ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ - // ║ MethodDescriptor │ google.protobuf.MethodOptions ║ - // ╚═════════════════════╧══════════════════════════════════════════╝ - // - // This method returns a typed nil-pointer if no options are present. - // The caller must import the descriptorpb package to use this. - Options() ProtoMessage - - doNotImplement -} - -// FileDescriptor describes the types in a complete proto file and -// corresponds with the google.protobuf.FileDescriptorProto message. -// -// Top-level declarations: -// [EnumDescriptor], [MessageDescriptor], [FieldDescriptor], and/or [ServiceDescriptor]. -type FileDescriptor interface { - Descriptor // Descriptor.FullName is identical to Package - - // Path returns the file name, relative to the source tree root. - Path() string // e.g., "path/to/file.proto" - // Package returns the protobuf package namespace. - Package() FullName // e.g., "google.protobuf" - - // Imports is a list of imported proto files. - Imports() FileImports - - // Enums is a list of the top-level enum declarations. - Enums() EnumDescriptors - // Messages is a list of the top-level message declarations. - Messages() MessageDescriptors - // Extensions is a list of the top-level extension declarations. - Extensions() ExtensionDescriptors - // Services is a list of the top-level service declarations. - Services() ServiceDescriptors - - // SourceLocations is a list of source locations. - SourceLocations() SourceLocations - - isFileDescriptor -} -type isFileDescriptor interface{ ProtoType(FileDescriptor) } - -// FileImports is a list of file imports. -type FileImports interface { - // Len reports the number of files imported by this proto file. - Len() int - // Get returns the ith FileImport. It panics if out of bounds. - Get(i int) FileImport - - doNotImplement -} - -// FileImport is the declaration for a proto file import. -type FileImport struct { - // FileDescriptor is the file type for the given import. - // It is a placeholder descriptor if IsWeak is set or if a dependency has - // not been regenerated to implement the new reflection APIs. - FileDescriptor - - // IsPublic reports whether this is a public import, which causes this file - // to alias declarations within the imported file. The intended use cases - // for this feature is the ability to move proto files without breaking - // existing dependencies. - // - // The current file and the imported file must be within proto package. - IsPublic bool - - // IsWeak reports whether this is a weak import, which does not impose - // a direct dependency on the target file. - // - // Weak imports are a legacy proto1 feature. Equivalent behavior is - // achieved using proto2 extension fields or proto3 Any messages. - IsWeak bool -} - -// MessageDescriptor describes a message and -// corresponds with the google.protobuf.DescriptorProto message. -// -// Nested declarations: -// [FieldDescriptor], [OneofDescriptor], [FieldDescriptor], [EnumDescriptor], -// and/or [MessageDescriptor]. -type MessageDescriptor interface { - Descriptor - - // IsMapEntry indicates that this is an auto-generated message type to - // represent the entry type for a map field. - // - // Map entry messages have only two fields: - // • a "key" field with a field number of 1 - // • a "value" field with a field number of 2 - // The key and value types are determined by these two fields. - // - // If IsMapEntry is true, it implies that FieldDescriptor.IsMap is true - // for some field with this message type. - IsMapEntry() bool - - // Fields is a list of nested field declarations. - Fields() FieldDescriptors - // Oneofs is a list of nested oneof declarations. - Oneofs() OneofDescriptors - - // ReservedNames is a list of reserved field names. - ReservedNames() Names - // ReservedRanges is a list of reserved ranges of field numbers. - ReservedRanges() FieldRanges - // RequiredNumbers is a list of required field numbers. - // In Proto3, it is always an empty list. - RequiredNumbers() FieldNumbers - // ExtensionRanges is the field ranges used for extension fields. - // In Proto3, it is always an empty ranges. - ExtensionRanges() FieldRanges - // ExtensionRangeOptions returns the ith extension range options. - // - // To avoid a dependency cycle, this method returns a proto.Message] value, - // which always contains a google.protobuf.ExtensionRangeOptions message. - // This method returns a typed nil-pointer if no options are present. - // The caller must import the descriptorpb package to use this. - ExtensionRangeOptions(i int) ProtoMessage - - // Enums is a list of nested enum declarations. - Enums() EnumDescriptors - // Messages is a list of nested message declarations. - Messages() MessageDescriptors - // Extensions is a list of nested extension declarations. - Extensions() ExtensionDescriptors - - isMessageDescriptor -} -type isMessageDescriptor interface{ ProtoType(MessageDescriptor) } - -// MessageType encapsulates a [MessageDescriptor] with a concrete Go implementation. -// It is recommended that implementations of this interface also implement the -// [MessageFieldTypes] interface. -type MessageType interface { - // New returns a newly allocated empty message. - // It may return nil for synthetic messages representing a map entry. - New() Message - - // Zero returns an empty, read-only message. - // It may return nil for synthetic messages representing a map entry. - Zero() Message - - // Descriptor returns the message descriptor. - // - // Invariant: t.Descriptor() == t.New().Descriptor() - Descriptor() MessageDescriptor -} - -// MessageFieldTypes extends a [MessageType] by providing type information -// regarding enums and messages referenced by the message fields. -type MessageFieldTypes interface { - MessageType - - // Enum returns the EnumType for the ith field in MessageDescriptor.Fields. - // It returns nil if the ith field is not an enum kind. - // It panics if out of bounds. - // - // Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum() - Enum(i int) EnumType - - // Message returns the MessageType for the ith field in MessageDescriptor.Fields. - // It returns nil if the ith field is not a message or group kind. - // It panics if out of bounds. - // - // Invariant: mt.Message(i).Descriptor() == mt.Descriptor().Fields(i).Message() - Message(i int) MessageType -} - -// MessageDescriptors is a list of message declarations. -type MessageDescriptors interface { - // Len reports the number of messages. - Len() int - // Get returns the ith MessageDescriptor. It panics if out of bounds. - Get(i int) MessageDescriptor - // ByName returns the MessageDescriptor for a message named s. - // It returns nil if not found. - ByName(s Name) MessageDescriptor - - doNotImplement -} - -// FieldDescriptor describes a field within a message and -// corresponds with the google.protobuf.FieldDescriptorProto message. -// -// It is used for both normal fields defined within the parent message -// (e.g., [MessageDescriptor.Fields]) and fields that extend some remote message -// (e.g., [FileDescriptor.Extensions] or [MessageDescriptor.Extensions]). -type FieldDescriptor interface { - Descriptor - - // Number reports the unique number for this field. - Number() FieldNumber - // Cardinality reports the cardinality for this field. - Cardinality() Cardinality - // Kind reports the basic kind for this field. - Kind() Kind - - // HasJSONName reports whether this field has an explicitly set JSON name. - HasJSONName() bool - - // JSONName reports the name used for JSON serialization. - // It is usually the camel-cased form of the field name. - // Extension fields are represented by the full name surrounded by brackets. - JSONName() string - - // TextName reports the name used for text serialization. - // It is usually the name of the field, except that groups use the name - // of the inlined message, and extension fields are represented by the - // full name surrounded by brackets. - TextName() string - - // HasPresence reports whether the field distinguishes between unpopulated - // and default values. - HasPresence() bool - - // IsExtension reports whether this is an extension field. If false, - // then Parent and ContainingMessage refer to the same message. - // Otherwise, ContainingMessage and Parent likely differ. - IsExtension() bool - - // HasOptionalKeyword reports whether the "optional" keyword was explicitly - // specified in the source .proto file. - HasOptionalKeyword() bool - - // IsWeak reports whether this is a weak field, which does not impose a - // direct dependency on the target type. - // If true, then Message returns a placeholder type. - IsWeak() bool - - // IsPacked reports whether repeated primitive numeric kinds should be - // serialized using a packed encoding. - // If true, then it implies Cardinality is Repeated. - IsPacked() bool - - // IsList reports whether this field represents a list, - // where the value type for the associated field is a List. - // It is equivalent to checking whether Cardinality is Repeated and - // that IsMap reports false. - IsList() bool - - // IsMap reports whether this field represents a map, - // where the value type for the associated field is a Map. - // It is equivalent to checking whether Cardinality is Repeated, - // that the Kind is MessageKind, and that MessageDescriptor.IsMapEntry reports true. - IsMap() bool - - // MapKey returns the field descriptor for the key in the map entry. - // It returns nil if IsMap reports false. - MapKey() FieldDescriptor - - // MapValue returns the field descriptor for the value in the map entry. - // It returns nil if IsMap reports false. - MapValue() FieldDescriptor - - // HasDefault reports whether this field has a default value. - HasDefault() bool - - // Default returns the default value for scalar fields. - // For proto2, it is the default value as specified in the proto file, - // or the zero value if unspecified. - // For proto3, it is always the zero value of the scalar. - // The Value type is determined by the Kind. - Default() Value - - // DefaultEnumValue returns the enum value descriptor for the default value - // of an enum field, and is nil for any other kind of field. - DefaultEnumValue() EnumValueDescriptor - - // ContainingOneof is the containing oneof that this field belongs to, - // and is nil if this field is not part of a oneof. - ContainingOneof() OneofDescriptor - - // ContainingMessage is the containing message that this field belongs to. - // For extension fields, this may not necessarily be the parent message - // that the field is declared within. - ContainingMessage() MessageDescriptor - - // Enum is the enum descriptor if Kind is EnumKind. - // It returns nil for any other Kind. - Enum() EnumDescriptor - - // Message is the message descriptor if Kind is - // MessageKind or GroupKind. It returns nil for any other Kind. - Message() MessageDescriptor - - isFieldDescriptor -} -type isFieldDescriptor interface{ ProtoType(FieldDescriptor) } - -// FieldDescriptors is a list of field declarations. -type FieldDescriptors interface { - // Len reports the number of fields. - Len() int - // Get returns the ith FieldDescriptor. It panics if out of bounds. - Get(i int) FieldDescriptor - // ByName returns the FieldDescriptor for a field named s. - // It returns nil if not found. - ByName(s Name) FieldDescriptor - // ByJSONName returns the FieldDescriptor for a field with s as the JSON name. - // It returns nil if not found. - ByJSONName(s string) FieldDescriptor - // ByTextName returns the FieldDescriptor for a field with s as the text name. - // It returns nil if not found. - ByTextName(s string) FieldDescriptor - // ByNumber returns the FieldDescriptor for a field numbered n. - // It returns nil if not found. - ByNumber(n FieldNumber) FieldDescriptor - - doNotImplement -} - -// OneofDescriptor describes a oneof field set within a given message and -// corresponds with the google.protobuf.OneofDescriptorProto message. -type OneofDescriptor interface { - Descriptor - - // IsSynthetic reports whether this is a synthetic oneof created to support - // proto3 optional semantics. If true, Fields contains exactly one field - // with FieldDescriptor.HasOptionalKeyword specified. - IsSynthetic() bool - - // Fields is a list of fields belonging to this oneof. - Fields() FieldDescriptors - - isOneofDescriptor -} -type isOneofDescriptor interface{ ProtoType(OneofDescriptor) } - -// OneofDescriptors is a list of oneof declarations. -type OneofDescriptors interface { - // Len reports the number of oneof fields. - Len() int - // Get returns the ith OneofDescriptor. It panics if out of bounds. - Get(i int) OneofDescriptor - // ByName returns the OneofDescriptor for a oneof named s. - // It returns nil if not found. - ByName(s Name) OneofDescriptor - - doNotImplement -} - -// ExtensionDescriptor is an alias of [FieldDescriptor] for documentation. -type ExtensionDescriptor = FieldDescriptor - -// ExtensionTypeDescriptor is an [ExtensionDescriptor] with an associated [ExtensionType]. -type ExtensionTypeDescriptor interface { - ExtensionDescriptor - - // Type returns the associated ExtensionType. - Type() ExtensionType - - // Descriptor returns the plain ExtensionDescriptor without the - // associated ExtensionType. - Descriptor() ExtensionDescriptor -} - -// ExtensionDescriptors is a list of field declarations. -type ExtensionDescriptors interface { - // Len reports the number of fields. - Len() int - // Get returns the ith ExtensionDescriptor. It panics if out of bounds. - Get(i int) ExtensionDescriptor - // ByName returns the ExtensionDescriptor for a field named s. - // It returns nil if not found. - ByName(s Name) ExtensionDescriptor - - doNotImplement -} - -// ExtensionType encapsulates an [ExtensionDescriptor] with a concrete -// Go implementation. The nested field descriptor must be for a extension field. -// -// While a normal field is a member of the parent message that it is declared -// within (see [Descriptor.Parent]), an extension field is a member of some other -// target message (see [FieldDescriptor.ContainingMessage]) and may have no -// relationship with the parent. However, the full name of an extension field is -// relative to the parent that it is declared within. -// -// For example: -// -// syntax = "proto2"; -// package example; -// message FooMessage { -// extensions 100 to max; -// } -// message BarMessage { -// extends FooMessage { optional BarMessage bar_field = 100; } -// } -// -// Field "bar_field" is an extension of FooMessage, but its full name is -// "example.BarMessage.bar_field" instead of "example.FooMessage.bar_field". -type ExtensionType interface { - // New returns a new value for the field. - // For scalars, this returns the default value in native Go form. - New() Value - - // Zero returns a new value for the field. - // For scalars, this returns the default value in native Go form. - // For composite types, this returns an empty, read-only message, list, or map. - Zero() Value - - // TypeDescriptor returns the extension type descriptor. - TypeDescriptor() ExtensionTypeDescriptor - - // ValueOf wraps the input and returns it as a Value. - // ValueOf panics if the input value is invalid or not the appropriate type. - // - // ValueOf is more extensive than protoreflect.ValueOf for a given field's - // value as it has more type information available. - ValueOf(interface{}) Value - - // InterfaceOf completely unwraps the Value to the underlying Go type. - // InterfaceOf panics if the input is nil or does not represent the - // appropriate underlying Go type. For composite types, it panics if the - // value is not mutable. - // - // InterfaceOf is able to unwrap the Value further than Value.Interface - // as it has more type information available. - InterfaceOf(Value) interface{} - - // IsValidValue reports whether the Value is valid to assign to the field. - IsValidValue(Value) bool - - // IsValidInterface reports whether the input is valid to assign to the field. - IsValidInterface(interface{}) bool -} - -// EnumDescriptor describes an enum and -// corresponds with the google.protobuf.EnumDescriptorProto message. -// -// Nested declarations: -// [EnumValueDescriptor]. -type EnumDescriptor interface { - Descriptor - - // Values is a list of nested enum value declarations. - Values() EnumValueDescriptors - - // ReservedNames is a list of reserved enum names. - ReservedNames() Names - // ReservedRanges is a list of reserved ranges of enum numbers. - ReservedRanges() EnumRanges - - isEnumDescriptor -} -type isEnumDescriptor interface{ ProtoType(EnumDescriptor) } - -// EnumType encapsulates an [EnumDescriptor] with a concrete Go implementation. -type EnumType interface { - // New returns an instance of this enum type with its value set to n. - New(n EnumNumber) Enum - - // Descriptor returns the enum descriptor. - // - // Invariant: t.Descriptor() == t.New(0).Descriptor() - Descriptor() EnumDescriptor -} - -// EnumDescriptors is a list of enum declarations. -type EnumDescriptors interface { - // Len reports the number of enum types. - Len() int - // Get returns the ith EnumDescriptor. It panics if out of bounds. - Get(i int) EnumDescriptor - // ByName returns the EnumDescriptor for an enum named s. - // It returns nil if not found. - ByName(s Name) EnumDescriptor - - doNotImplement -} - -// EnumValueDescriptor describes an enum value and -// corresponds with the google.protobuf.EnumValueDescriptorProto message. -// -// All other proto declarations are in the namespace of the parent. -// However, enum values do not follow this rule and are within the namespace -// of the parent's parent (i.e., they are a sibling of the containing enum). -// Thus, a value named "FOO_VALUE" declared within an enum uniquely identified -// as "proto.package.MyEnum" has a full name of "proto.package.FOO_VALUE". -type EnumValueDescriptor interface { - Descriptor - - // Number returns the enum value as an integer. - Number() EnumNumber - - isEnumValueDescriptor -} -type isEnumValueDescriptor interface{ ProtoType(EnumValueDescriptor) } - -// EnumValueDescriptors is a list of enum value declarations. -type EnumValueDescriptors interface { - // Len reports the number of enum values. - Len() int - // Get returns the ith EnumValueDescriptor. It panics if out of bounds. - Get(i int) EnumValueDescriptor - // ByName returns the EnumValueDescriptor for the enum value named s. - // It returns nil if not found. - ByName(s Name) EnumValueDescriptor - // ByNumber returns the EnumValueDescriptor for the enum value numbered n. - // If multiple have the same number, the first one defined is returned - // It returns nil if not found. - ByNumber(n EnumNumber) EnumValueDescriptor - - doNotImplement -} - -// ServiceDescriptor describes a service and -// corresponds with the google.protobuf.ServiceDescriptorProto message. -// -// Nested declarations: [MethodDescriptor]. -type ServiceDescriptor interface { - Descriptor - - // Methods is a list of nested message declarations. - Methods() MethodDescriptors - - isServiceDescriptor -} -type isServiceDescriptor interface{ ProtoType(ServiceDescriptor) } - -// ServiceDescriptors is a list of service declarations. -type ServiceDescriptors interface { - // Len reports the number of services. - Len() int - // Get returns the ith ServiceDescriptor. It panics if out of bounds. - Get(i int) ServiceDescriptor - // ByName returns the ServiceDescriptor for a service named s. - // It returns nil if not found. - ByName(s Name) ServiceDescriptor - - doNotImplement -} - -// MethodDescriptor describes a method and -// corresponds with the google.protobuf.MethodDescriptorProto message. -type MethodDescriptor interface { - Descriptor - - // Input is the input message descriptor. - Input() MessageDescriptor - // Output is the output message descriptor. - Output() MessageDescriptor - // IsStreamingClient reports whether the client streams multiple messages. - IsStreamingClient() bool - // IsStreamingServer reports whether the server streams multiple messages. - IsStreamingServer() bool - - isMethodDescriptor -} -type isMethodDescriptor interface{ ProtoType(MethodDescriptor) } - -// MethodDescriptors is a list of method declarations. -type MethodDescriptors interface { - // Len reports the number of methods. - Len() int - // Get returns the ith MethodDescriptor. It panics if out of bounds. - Get(i int) MethodDescriptor - // ByName returns the MethodDescriptor for a service method named s. - // It returns nil if not found. - ByName(s Name) MethodDescriptor - - doNotImplement -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go deleted file mode 100644 index a7b0d06f..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +++ /dev/null @@ -1,285 +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. - -package protoreflect - -import "google.golang.org/protobuf/encoding/protowire" - -// Enum is a reflection interface for a concrete enum value, -// which provides type information and a getter for the enum number. -// Enum does not provide a mutable API since enums are commonly backed by -// Go constants, which are not addressable. -type Enum interface { - // Descriptor returns enum descriptor, which contains only the protobuf - // type information for the enum. - Descriptor() EnumDescriptor - - // Type returns the enum type, which encapsulates both Go and protobuf - // type information. If the Go type information is not needed, - // it is recommended that the enum descriptor be used instead. - Type() EnumType - - // Number returns the enum value as an integer. - Number() EnumNumber -} - -// Message is a reflective interface for a concrete message value, -// encapsulating both type and value information for the message. -// -// Accessor/mutators for individual fields are keyed by [FieldDescriptor]. -// For non-extension fields, the descriptor must exactly match the -// field known by the parent message. -// For extension fields, the descriptor must implement [ExtensionTypeDescriptor], -// extend the parent message (i.e., have the same message [FullName]), and -// be within the parent's extension range. -// -// Each field [Value] can be a scalar or a composite type ([Message], [List], or [Map]). -// See [Value] for the Go types associated with a [FieldDescriptor]. -// Providing a [Value] that is invalid or of an incorrect type panics. -type Message interface { - // Descriptor returns message descriptor, which contains only the protobuf - // type information for the message. - Descriptor() MessageDescriptor - - // Type returns the message type, which encapsulates both Go and protobuf - // type information. If the Go type information is not needed, - // it is recommended that the message descriptor be used instead. - Type() MessageType - - // New returns a newly allocated and mutable empty message. - New() Message - - // Interface unwraps the message reflection interface and - // returns the underlying ProtoMessage interface. - Interface() ProtoMessage - - // Range iterates over every populated field in an undefined order, - // calling f for each field descriptor and value encountered. - // Range returns immediately if f returns false. - // While iterating, mutating operations may only be performed - // on the current field descriptor. - Range(f func(FieldDescriptor, Value) bool) - - // Has reports whether a field is populated. - // - // Some fields have the property of nullability where it is possible to - // distinguish between the default value of a field and whether the field - // was explicitly populated with the default value. Singular message fields, - // member fields of a oneof, and proto2 scalar fields are nullable. Such - // fields are populated only if explicitly set. - // - // In other cases (aside from the nullable cases above), - // a proto3 scalar field is populated if it contains a non-zero value, and - // a repeated field is populated if it is non-empty. - Has(FieldDescriptor) bool - - // Clear clears the field such that a subsequent Has call reports false. - // - // Clearing an extension field clears both the extension type and value - // associated with the given field number. - // - // Clear is a mutating operation and unsafe for concurrent use. - Clear(FieldDescriptor) - - // Get retrieves the value for a field. - // - // For unpopulated scalars, it returns the default value, where - // the default value of a bytes scalar is guaranteed to be a copy. - // For unpopulated composite types, it returns an empty, read-only view - // of the value; to obtain a mutable reference, use Mutable. - Get(FieldDescriptor) Value - - // Set stores the value for a field. - // - // For a field belonging to a oneof, it implicitly clears any other field - // that may be currently set within the same oneof. - // For extension fields, it implicitly stores the provided ExtensionType. - // When setting a composite type, it is unspecified whether the stored value - // aliases the source's memory in any way. If the composite value is an - // empty, read-only value, then it panics. - // - // Set is a mutating operation and unsafe for concurrent use. - Set(FieldDescriptor, Value) - - // Mutable returns a mutable reference to a composite type. - // - // If the field is unpopulated, it may allocate a composite value. - // For a field belonging to a oneof, it implicitly clears any other field - // that may be currently set within the same oneof. - // For extension fields, it implicitly stores the provided ExtensionType - // if not already stored. - // It panics if the field does not contain a composite type. - // - // Mutable is a mutating operation and unsafe for concurrent use. - Mutable(FieldDescriptor) Value - - // NewField returns a new value that is assignable to the field - // for the given descriptor. For scalars, this returns the default value. - // For lists, maps, and messages, this returns a new, empty, mutable value. - NewField(FieldDescriptor) Value - - // WhichOneof reports which field within the oneof is populated, - // returning nil if none are populated. - // It panics if the oneof descriptor does not belong to this message. - WhichOneof(OneofDescriptor) FieldDescriptor - - // GetUnknown retrieves the entire list of unknown fields. - // The caller may only mutate the contents of the RawFields - // if the mutated bytes are stored back into the message with SetUnknown. - GetUnknown() RawFields - - // SetUnknown stores an entire list of unknown fields. - // The raw fields must be syntactically valid according to the wire format. - // An implementation may panic if this is not the case. - // Once stored, the caller must not mutate the content of the RawFields. - // An empty RawFields may be passed to clear the fields. - // - // SetUnknown is a mutating operation and unsafe for concurrent use. - SetUnknown(RawFields) - - // IsValid reports whether the message is valid. - // - // An invalid message is an empty, read-only value. - // - // An invalid message often corresponds to a nil pointer of the concrete - // message type, but the details are implementation dependent. - // Validity is not part of the protobuf data model, and may not - // be preserved in marshaling or other operations. - IsValid() bool - - // ProtoMethods returns optional fast-path implementations of various operations. - // This method may return nil. - // - // The returned methods type is identical to - // google.golang.org/protobuf/runtime/protoiface.Methods. - // Consult the protoiface package documentation for details. - ProtoMethods() *methods -} - -// RawFields is the raw bytes for an ordered sequence of fields. -// Each field contains both the tag (representing field number and wire type), -// and also the wire data itself. -type RawFields []byte - -// IsValid reports whether b is syntactically correct wire format. -func (b RawFields) IsValid() bool { - for len(b) > 0 { - _, _, n := protowire.ConsumeField(b) - if n < 0 { - return false - } - b = b[n:] - } - return true -} - -// List is a zero-indexed, ordered list. -// The element [Value] type is determined by [FieldDescriptor.Kind]. -// Providing a [Value] that is invalid or of an incorrect type panics. -type List interface { - // Len reports the number of entries in the List. - // Get, Set, and Truncate panic with out of bound indexes. - Len() int - - // Get retrieves the value at the given index. - // It never returns an invalid value. - Get(int) Value - - // Set stores a value for the given index. - // When setting a composite type, it is unspecified whether the set - // value aliases the source's memory in any way. - // - // Set is a mutating operation and unsafe for concurrent use. - Set(int, Value) - - // Append appends the provided value to the end of the list. - // When appending a composite type, it is unspecified whether the appended - // value aliases the source's memory in any way. - // - // Append is a mutating operation and unsafe for concurrent use. - Append(Value) - - // AppendMutable appends a new, empty, mutable message value to the end - // of the list and returns it. - // It panics if the list does not contain a message type. - AppendMutable() Value - - // Truncate truncates the list to a smaller length. - // - // Truncate is a mutating operation and unsafe for concurrent use. - Truncate(int) - - // NewElement returns a new value for a list element. - // For enums, this returns the first enum value. - // For other scalars, this returns the zero value. - // For messages, this returns a new, empty, mutable value. - NewElement() Value - - // IsValid reports whether the list is valid. - // - // An invalid list is an empty, read-only value. - // - // Validity is not part of the protobuf data model, and may not - // be preserved in marshaling or other operations. - IsValid() bool -} - -// Map is an unordered, associative map. -// The entry [MapKey] type is determined by [FieldDescriptor.MapKey].Kind. -// The entry [Value] type is determined by [FieldDescriptor.MapValue].Kind. -// Providing a [MapKey] or [Value] that is invalid or of an incorrect type panics. -type Map interface { - // Len reports the number of elements in the map. - Len() int - - // Range iterates over every map entry in an undefined order, - // calling f for each key and value encountered. - // Range calls f Len times unless f returns false, which stops iteration. - // While iterating, mutating operations may only be performed - // on the current map key. - Range(f func(MapKey, Value) bool) - - // Has reports whether an entry with the given key is in the map. - Has(MapKey) bool - - // Clear clears the entry associated with they given key. - // The operation does nothing if there is no entry associated with the key. - // - // Clear is a mutating operation and unsafe for concurrent use. - Clear(MapKey) - - // Get retrieves the value for an entry with the given key. - // It returns an invalid value for non-existent entries. - Get(MapKey) Value - - // Set stores the value for an entry with the given key. - // It panics when given a key or value that is invalid or the wrong type. - // When setting a composite type, it is unspecified whether the set - // value aliases the source's memory in any way. - // - // Set is a mutating operation and unsafe for concurrent use. - Set(MapKey, Value) - - // Mutable retrieves a mutable reference to the entry for the given key. - // If no entry exists for the key, it creates a new, empty, mutable value - // and stores it as the entry for the key. - // It panics if the map value is not a message. - Mutable(MapKey) Value - - // NewValue returns a new value assignable as a map value. - // For enums, this returns the first enum value. - // For other scalars, this returns the zero value. - // For messages, this returns a new, empty, mutable value. - NewValue() Value - - // IsValid reports whether the map is valid. - // - // An invalid map is an empty, read-only value. - // - // An invalid message often corresponds to a nil Go map value, - // but the details are implementation dependent. - // Validity is not part of the protobuf data model, and may not - // be preserved in marshaling or other operations. - IsValid() bool -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go deleted file mode 100644 index 654599d4..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go +++ /dev/null @@ -1,168 +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 protoreflect - -import ( - "bytes" - "fmt" - "math" - "reflect" - - "google.golang.org/protobuf/encoding/protowire" -) - -// Equal reports whether v1 and v2 are recursively equal. -// -// - Values of different types are always unequal. -// -// - Bytes values are equal if they contain identical bytes. -// Empty bytes (regardless of nil-ness) are considered equal. -// -// - Floating point values are equal if they contain the same value. -// Unlike the == operator, a NaN is equal to another NaN. -// -// - Enums are equal if they contain the same number. -// Since [Value] does not contain an enum descriptor, -// enum values do not consider the type of the enum. -// -// - Other scalar values are equal if they contain the same value. -// -// - [Message] values are equal if they belong to the same message descriptor, -// have the same set of populated known and extension field values, -// and the same set of unknown fields values. -// -// - [List] values are equal if they are the same length and -// each corresponding element is equal. -// -// - [Map] values are equal if they have the same set of keys and -// the corresponding value for each key is equal. -func (v1 Value) Equal(v2 Value) bool { - return equalValue(v1, v2) -} - -func equalValue(x, y Value) bool { - eqType := x.typ == y.typ - switch x.typ { - case nilType: - return eqType - case boolType: - return eqType && x.Bool() == y.Bool() - case int32Type, int64Type: - return eqType && x.Int() == y.Int() - case uint32Type, uint64Type: - return eqType && x.Uint() == y.Uint() - case float32Type, float64Type: - return eqType && equalFloat(x.Float(), y.Float()) - case stringType: - return eqType && x.String() == y.String() - case bytesType: - return eqType && bytes.Equal(x.Bytes(), y.Bytes()) - case enumType: - return eqType && x.Enum() == y.Enum() - default: - switch x := x.Interface().(type) { - case Message: - y, ok := y.Interface().(Message) - return ok && equalMessage(x, y) - case List: - y, ok := y.Interface().(List) - return ok && equalList(x, y) - case Map: - y, ok := y.Interface().(Map) - return ok && equalMap(x, y) - default: - panic(fmt.Sprintf("unknown type: %T", x)) - } - } -} - -// equalFloat compares two floats, where NaNs are treated as equal. -func equalFloat(x, y float64) bool { - if math.IsNaN(x) || math.IsNaN(y) { - return math.IsNaN(x) && math.IsNaN(y) - } - return x == y -} - -// equalMessage compares two messages. -func equalMessage(mx, my Message) bool { - if mx.Descriptor() != my.Descriptor() { - return false - } - - nx := 0 - equal := true - mx.Range(func(fd FieldDescriptor, vx Value) bool { - nx++ - vy := my.Get(fd) - equal = my.Has(fd) && equalValue(vx, vy) - return equal - }) - if !equal { - return false - } - ny := 0 - my.Range(func(fd FieldDescriptor, vx Value) bool { - ny++ - return true - }) - if nx != ny { - return false - } - - return equalUnknown(mx.GetUnknown(), my.GetUnknown()) -} - -// equalList compares two lists. -func equalList(x, y List) bool { - if x.Len() != y.Len() { - return false - } - for i := x.Len() - 1; i >= 0; i-- { - if !equalValue(x.Get(i), y.Get(i)) { - return false - } - } - return true -} - -// equalMap compares two maps. -func equalMap(x, y Map) bool { - if x.Len() != y.Len() { - return false - } - equal := true - x.Range(func(k MapKey, vx Value) bool { - vy := y.Get(k) - equal = y.Has(k) && equalValue(vx, vy) - return equal - }) - return equal -} - -// equalUnknown compares unknown fields by direct comparison on the raw bytes -// of each individual field number. -func equalUnknown(x, y RawFields) bool { - if len(x) != len(y) { - return false - } - if bytes.Equal([]byte(x), []byte(y)) { - return true - } - - mx := make(map[FieldNumber]RawFields) - my := make(map[FieldNumber]RawFields) - for len(x) > 0 { - fnum, _, n := protowire.ConsumeField(x) - mx[fnum] = append(mx[fnum], x[:n]...) - x = x[n:] - } - for len(y) > 0 { - fnum, _, n := protowire.ConsumeField(y) - my[fnum] = append(my[fnum], y[:n]...) - y = y[n:] - } - return reflect.DeepEqual(mx, my) -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go deleted file mode 100644 index 7ced876f..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ /dev/null @@ -1,60 +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 purego || appengine -// +build purego appengine - -package protoreflect - -import "google.golang.org/protobuf/internal/pragma" - -type valueType int - -const ( - nilType valueType = iota - boolType - int32Type - int64Type - uint32Type - uint64Type - float32Type - float64Type - stringType - bytesType - enumType - ifaceType -) - -// value is a union where only one type can be represented at a time. -// This uses a distinct field for each type. This is type safe in Go, but -// occupies more memory than necessary (72B). -type value struct { - pragma.DoNotCompare // 0B - - typ valueType // 8B - num uint64 // 8B - str string // 16B - bin []byte // 24B - iface interface{} // 16B -} - -func valueOfString(v string) Value { - return Value{typ: stringType, str: v} -} -func valueOfBytes(v []byte) Value { - return Value{typ: bytesType, bin: v} -} -func valueOfIface(v interface{}) Value { - return Value{typ: ifaceType, iface: v} -} - -func (v Value) getString() string { - return v.str -} -func (v Value) getBytes() []byte { - return v.bin -} -func (v Value) getIface() interface{} { - return v.iface -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go deleted file mode 100644 index 16030973..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ /dev/null @@ -1,438 +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. - -package protoreflect - -import ( - "fmt" - "math" -) - -// Value is a union where only one Go type may be set at a time. -// The Value is used to represent all possible values a field may take. -// The following shows which Go type is used to represent each proto [Kind]: -// -// ╔════════════╤═════════════════════════════════════╗ -// ║ Go type │ Protobuf kind ║ -// ╠════════════╪═════════════════════════════════════╣ -// ║ bool │ BoolKind ║ -// ║ int32 │ Int32Kind, Sint32Kind, Sfixed32Kind ║ -// ║ int64 │ Int64Kind, Sint64Kind, Sfixed64Kind ║ -// ║ uint32 │ Uint32Kind, Fixed32Kind ║ -// ║ uint64 │ Uint64Kind, Fixed64Kind ║ -// ║ float32 │ FloatKind ║ -// ║ float64 │ DoubleKind ║ -// ║ string │ StringKind ║ -// ║ []byte │ BytesKind ║ -// ║ EnumNumber │ EnumKind ║ -// ║ Message │ MessageKind, GroupKind ║ -// ╚════════════╧═════════════════════════════════════╝ -// -// Multiple protobuf Kinds may be represented by a single Go type if the type -// can losslessly represent the information for the proto kind. For example, -// [Int64Kind], [Sint64Kind], and [Sfixed64Kind] are all represented by int64, -// but use different integer encoding methods. -// -// The [List] or [Map] types are used if the field cardinality is repeated. -// A field is a [List] if [FieldDescriptor.IsList] reports true. -// A field is a [Map] if [FieldDescriptor.IsMap] reports true. -// -// Converting to/from a Value and a concrete Go value panics on type mismatch. -// For example, [ValueOf]("hello").Int() panics because this attempts to -// retrieve an int64 from a string. -// -// [List], [Map], and [Message] Values are called "composite" values. -// -// A composite Value may alias (reference) memory at some location, -// such that changes to the Value updates the that location. -// A composite value acquired with a Mutable method, such as [Message.Mutable], -// always references the source object. -// -// For example: -// -// // Append a 0 to a "repeated int32" field. -// // Since the Value returned by Mutable is guaranteed to alias -// // the source message, modifying the Value modifies the message. -// message.Mutable(fieldDesc).List().Append(protoreflect.ValueOfInt32(0)) -// -// // Assign [0] to a "repeated int32" field by creating a new Value, -// // modifying it, and assigning it. -// list := message.NewField(fieldDesc).List() -// list.Append(protoreflect.ValueOfInt32(0)) -// message.Set(fieldDesc, list) -// // ERROR: Since it is not defined whether Set aliases the source, -// // appending to the List here may or may not modify the message. -// list.Append(protoreflect.ValueOfInt32(0)) -// -// Some operations, such as [Message.Get], may return an "empty, read-only" -// composite Value. Modifying an empty, read-only value panics. -type Value value - -// The protoreflect API uses a custom Value union type instead of interface{} -// to keep the future open for performance optimizations. Using an interface{} -// always incurs an allocation for primitives (e.g., int64) since it needs to -// be boxed on the heap (as interfaces can only contain pointers natively). -// Instead, we represent the Value union as a flat struct that internally keeps -// track of which type is set. Using unsafe, the Value union can be reduced -// down to 24B, which is identical in size to a slice. -// -// The latest compiler (Go1.11) currently suffers from some limitations: -// • With inlining, the compiler should be able to statically prove that -// only one of these switch cases are taken and inline one specific case. -// See https://golang.org/issue/22310. - -// ValueOf returns a Value initialized with the concrete value stored in v. -// This panics if the type does not match one of the allowed types in the -// Value union. -func ValueOf(v interface{}) Value { - switch v := v.(type) { - case nil: - return Value{} - case bool: - return ValueOfBool(v) - case int32: - return ValueOfInt32(v) - case int64: - return ValueOfInt64(v) - case uint32: - return ValueOfUint32(v) - case uint64: - return ValueOfUint64(v) - case float32: - return ValueOfFloat32(v) - case float64: - return ValueOfFloat64(v) - case string: - return ValueOfString(v) - case []byte: - return ValueOfBytes(v) - case EnumNumber: - return ValueOfEnum(v) - case Message, List, Map: - return valueOfIface(v) - case ProtoMessage: - panic(fmt.Sprintf("invalid proto.Message(%T) type, expected a protoreflect.Message type", v)) - default: - panic(fmt.Sprintf("invalid type: %T", v)) - } -} - -// ValueOfBool returns a new boolean value. -func ValueOfBool(v bool) Value { - if v { - return Value{typ: boolType, num: 1} - } else { - return Value{typ: boolType, num: 0} - } -} - -// ValueOfInt32 returns a new int32 value. -func ValueOfInt32(v int32) Value { - return Value{typ: int32Type, num: uint64(v)} -} - -// ValueOfInt64 returns a new int64 value. -func ValueOfInt64(v int64) Value { - return Value{typ: int64Type, num: uint64(v)} -} - -// ValueOfUint32 returns a new uint32 value. -func ValueOfUint32(v uint32) Value { - return Value{typ: uint32Type, num: uint64(v)} -} - -// ValueOfUint64 returns a new uint64 value. -func ValueOfUint64(v uint64) Value { - return Value{typ: uint64Type, num: v} -} - -// ValueOfFloat32 returns a new float32 value. -func ValueOfFloat32(v float32) Value { - return Value{typ: float32Type, num: uint64(math.Float64bits(float64(v)))} -} - -// ValueOfFloat64 returns a new float64 value. -func ValueOfFloat64(v float64) Value { - return Value{typ: float64Type, num: uint64(math.Float64bits(float64(v)))} -} - -// ValueOfString returns a new string value. -func ValueOfString(v string) Value { - return valueOfString(v) -} - -// ValueOfBytes returns a new bytes value. -func ValueOfBytes(v []byte) Value { - return valueOfBytes(v[:len(v):len(v)]) -} - -// ValueOfEnum returns a new enum value. -func ValueOfEnum(v EnumNumber) Value { - return Value{typ: enumType, num: uint64(v)} -} - -// ValueOfMessage returns a new Message value. -func ValueOfMessage(v Message) Value { - return valueOfIface(v) -} - -// ValueOfList returns a new List value. -func ValueOfList(v List) Value { - return valueOfIface(v) -} - -// ValueOfMap returns a new Map value. -func ValueOfMap(v Map) Value { - return valueOfIface(v) -} - -// IsValid reports whether v is populated with a value. -func (v Value) IsValid() bool { - return v.typ != nilType -} - -// Interface returns v as an interface{}. -// -// Invariant: v == ValueOf(v).Interface() -func (v Value) Interface() interface{} { - switch v.typ { - case nilType: - return nil - case boolType: - return v.Bool() - case int32Type: - return int32(v.Int()) - case int64Type: - return int64(v.Int()) - case uint32Type: - return uint32(v.Uint()) - case uint64Type: - return uint64(v.Uint()) - case float32Type: - return float32(v.Float()) - case float64Type: - return float64(v.Float()) - case stringType: - return v.String() - case bytesType: - return v.Bytes() - case enumType: - return v.Enum() - default: - return v.getIface() - } -} - -func (v Value) typeName() string { - switch v.typ { - case nilType: - return "nil" - case boolType: - return "bool" - case int32Type: - return "int32" - case int64Type: - return "int64" - case uint32Type: - return "uint32" - case uint64Type: - return "uint64" - case float32Type: - return "float32" - case float64Type: - return "float64" - case stringType: - return "string" - case bytesType: - return "bytes" - case enumType: - return "enum" - default: - switch v := v.getIface().(type) { - case Message: - return "message" - case List: - return "list" - case Map: - return "map" - default: - return fmt.Sprintf("", v) - } - } -} - -func (v Value) panicMessage(what string) string { - return fmt.Sprintf("type mismatch: cannot convert %v to %s", v.typeName(), what) -} - -// Bool returns v as a bool and panics if the type is not a bool. -func (v Value) Bool() bool { - switch v.typ { - case boolType: - return v.num > 0 - default: - panic(v.panicMessage("bool")) - } -} - -// Int returns v as a int64 and panics if the type is not a int32 or int64. -func (v Value) Int() int64 { - switch v.typ { - case int32Type, int64Type: - return int64(v.num) - default: - panic(v.panicMessage("int")) - } -} - -// Uint returns v as a uint64 and panics if the type is not a uint32 or uint64. -func (v Value) Uint() uint64 { - switch v.typ { - case uint32Type, uint64Type: - return uint64(v.num) - default: - panic(v.panicMessage("uint")) - } -} - -// Float returns v as a float64 and panics if the type is not a float32 or float64. -func (v Value) Float() float64 { - switch v.typ { - case float32Type, float64Type: - return math.Float64frombits(uint64(v.num)) - default: - panic(v.panicMessage("float")) - } -} - -// String returns v as a string. Since this method implements [fmt.Stringer], -// this returns the formatted string value for any non-string type. -func (v Value) String() string { - switch v.typ { - case stringType: - return v.getString() - default: - return fmt.Sprint(v.Interface()) - } -} - -// Bytes returns v as a []byte and panics if the type is not a []byte. -func (v Value) Bytes() []byte { - switch v.typ { - case bytesType: - return v.getBytes() - default: - panic(v.panicMessage("bytes")) - } -} - -// Enum returns v as a [EnumNumber] and panics if the type is not a [EnumNumber]. -func (v Value) Enum() EnumNumber { - switch v.typ { - case enumType: - return EnumNumber(v.num) - default: - panic(v.panicMessage("enum")) - } -} - -// Message returns v as a [Message] and panics if the type is not a [Message]. -func (v Value) Message() Message { - switch vi := v.getIface().(type) { - case Message: - return vi - default: - panic(v.panicMessage("message")) - } -} - -// List returns v as a [List] and panics if the type is not a [List]. -func (v Value) List() List { - switch vi := v.getIface().(type) { - case List: - return vi - default: - panic(v.panicMessage("list")) - } -} - -// Map returns v as a [Map] and panics if the type is not a [Map]. -func (v Value) Map() Map { - switch vi := v.getIface().(type) { - case Map: - return vi - default: - panic(v.panicMessage("map")) - } -} - -// MapKey returns v as a [MapKey] and panics for invalid [MapKey] types. -func (v Value) MapKey() MapKey { - switch v.typ { - case boolType, int32Type, int64Type, uint32Type, uint64Type, stringType: - return MapKey(v) - default: - panic(v.panicMessage("map key")) - } -} - -// MapKey is used to index maps, where the Go type of the MapKey must match -// the specified key [Kind] (see [MessageDescriptor.IsMapEntry]). -// The following shows what Go type is used to represent each proto [Kind]: -// -// ╔═════════╤═════════════════════════════════════╗ -// ║ Go type │ Protobuf kind ║ -// ╠═════════╪═════════════════════════════════════╣ -// ║ bool │ BoolKind ║ -// ║ int32 │ Int32Kind, Sint32Kind, Sfixed32Kind ║ -// ║ int64 │ Int64Kind, Sint64Kind, Sfixed64Kind ║ -// ║ uint32 │ Uint32Kind, Fixed32Kind ║ -// ║ uint64 │ Uint64Kind, Fixed64Kind ║ -// ║ string │ StringKind ║ -// ╚═════════╧═════════════════════════════════════╝ -// -// A MapKey is constructed and accessed through a [Value]: -// -// k := ValueOf("hash").MapKey() // convert string to MapKey -// s := k.String() // convert MapKey to string -// -// The MapKey is a strict subset of valid types used in [Value]; -// converting a [Value] to a MapKey with an invalid type panics. -type MapKey value - -// IsValid reports whether k is populated with a value. -func (k MapKey) IsValid() bool { - return Value(k).IsValid() -} - -// Interface returns k as an interface{}. -func (k MapKey) Interface() interface{} { - return Value(k).Interface() -} - -// Bool returns k as a bool and panics if the type is not a bool. -func (k MapKey) Bool() bool { - return Value(k).Bool() -} - -// Int returns k as a int64 and panics if the type is not a int32 or int64. -func (k MapKey) Int() int64 { - return Value(k).Int() -} - -// Uint returns k as a uint64 and panics if the type is not a uint32 or uint64. -func (k MapKey) Uint() uint64 { - return Value(k).Uint() -} - -// String returns k as a string. Since this method implements [fmt.Stringer], -// this returns the formatted string value for any non-string type. -func (k MapKey) String() string { - return Value(k).String() -} - -// Value returns k as a [Value]. -func (k MapKey) Value() Value { - return Value(k) -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go deleted file mode 100644 index b1fdbe3e..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +++ /dev/null @@ -1,99 +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 !purego && !appengine && !go1.21 -// +build !purego,!appengine,!go1.21 - -package protoreflect - -import ( - "unsafe" - - "google.golang.org/protobuf/internal/pragma" -) - -type ( - stringHeader struct { - Data unsafe.Pointer - Len int - } - sliceHeader struct { - Data unsafe.Pointer - Len int - Cap int - } - ifaceHeader struct { - Type unsafe.Pointer - Data unsafe.Pointer - } -) - -var ( - nilType = typeOf(nil) - boolType = typeOf(*new(bool)) - int32Type = typeOf(*new(int32)) - int64Type = typeOf(*new(int64)) - uint32Type = typeOf(*new(uint32)) - uint64Type = typeOf(*new(uint64)) - float32Type = typeOf(*new(float32)) - float64Type = typeOf(*new(float64)) - stringType = typeOf(*new(string)) - bytesType = typeOf(*new([]byte)) - enumType = typeOf(*new(EnumNumber)) -) - -// typeOf returns a pointer to the Go type information. -// The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { - return (*ifaceHeader)(unsafe.Pointer(&t)).Type -} - -// value is a union where only one type can be represented at a time. -// The struct is 24B large on 64-bit systems and requires the minimum storage -// necessary to represent each possible type. -// -// The Go GC needs to be able to scan variables containing pointers. -// As such, pointers and non-pointers cannot be intermixed. -type value struct { - pragma.DoNotCompare // 0B - - // typ stores the type of the value as a pointer to the Go type. - typ unsafe.Pointer // 8B - - // ptr stores the data pointer for a String, Bytes, or interface value. - ptr unsafe.Pointer // 8B - - // num stores a Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, or - // Enum value as a raw uint64. - // - // It is also used to store the length of a String or Bytes value; - // the capacity is ignored. - num uint64 // 8B -} - -func valueOfString(v string) Value { - p := (*stringHeader)(unsafe.Pointer(&v)) - return Value{typ: stringType, ptr: p.Data, num: uint64(len(v))} -} -func valueOfBytes(v []byte) Value { - p := (*sliceHeader)(unsafe.Pointer(&v)) - return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} -} -func valueOfIface(v interface{}) Value { - p := (*ifaceHeader)(unsafe.Pointer(&v)) - return Value{typ: p.Type, ptr: p.Data} -} - -func (v Value) getString() (x string) { - *(*stringHeader)(unsafe.Pointer(&x)) = stringHeader{Data: v.ptr, Len: int(v.num)} - return x -} -func (v Value) getBytes() (x []byte) { - *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} - return x -} -func (v Value) getIface() (x interface{}) { - *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} - return x -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go deleted file mode 100644 index 43547011..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +++ /dev/null @@ -1,87 +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 !purego && !appengine && go1.21 -// +build !purego,!appengine,go1.21 - -package protoreflect - -import ( - "unsafe" - - "google.golang.org/protobuf/internal/pragma" -) - -type ( - ifaceHeader struct { - _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. - Type unsafe.Pointer - Data unsafe.Pointer - } -) - -var ( - nilType = typeOf(nil) - boolType = typeOf(*new(bool)) - int32Type = typeOf(*new(int32)) - int64Type = typeOf(*new(int64)) - uint32Type = typeOf(*new(uint32)) - uint64Type = typeOf(*new(uint64)) - float32Type = typeOf(*new(float32)) - float64Type = typeOf(*new(float64)) - stringType = typeOf(*new(string)) - bytesType = typeOf(*new([]byte)) - enumType = typeOf(*new(EnumNumber)) -) - -// typeOf returns a pointer to the Go type information. -// The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { - return (*ifaceHeader)(unsafe.Pointer(&t)).Type -} - -// value is a union where only one type can be represented at a time. -// The struct is 24B large on 64-bit systems and requires the minimum storage -// necessary to represent each possible type. -// -// The Go GC needs to be able to scan variables containing pointers. -// As such, pointers and non-pointers cannot be intermixed. -type value struct { - pragma.DoNotCompare // 0B - - // typ stores the type of the value as a pointer to the Go type. - typ unsafe.Pointer // 8B - - // ptr stores the data pointer for a String, Bytes, or interface value. - ptr unsafe.Pointer // 8B - - // num stores a Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, or - // Enum value as a raw uint64. - // - // It is also used to store the length of a String or Bytes value; - // the capacity is ignored. - num uint64 // 8B -} - -func valueOfString(v string) Value { - return Value{typ: stringType, ptr: unsafe.Pointer(unsafe.StringData(v)), num: uint64(len(v))} -} -func valueOfBytes(v []byte) Value { - return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} -} -func valueOfIface(v interface{}) Value { - p := (*ifaceHeader)(unsafe.Pointer(&v)) - return Value{typ: p.Type, ptr: p.Data} -} - -func (v Value) getString() string { - return unsafe.String((*byte)(v.ptr), v.num) -} -func (v Value) getBytes() []byte { - return unsafe.Slice((*byte)(v.ptr), v.num) -} -func (v Value) getIface() (x interface{}) { - *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} - return x -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go deleted file mode 100644 index 6267dc52..00000000 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ /dev/null @@ -1,882 +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. - -// Package protoregistry provides data structures to register and lookup -// protobuf descriptor types. -// -// The [Files] registry contains file descriptors and provides the ability -// to iterate over the files or lookup a specific descriptor within the files. -// [Files] only contains protobuf descriptors and has no understanding of Go -// type information that may be associated with each descriptor. -// -// The [Types] registry contains descriptor types for which there is a known -// Go type associated with that descriptor. It provides the ability to iterate -// over the registered types or lookup a type by name. -package protoregistry - -import ( - "fmt" - "os" - "strings" - "sync" - - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// conflictPolicy configures the policy for handling registration conflicts. -// -// It can be over-written at compile time with a linker-initialized variable: -// -// go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" -// -// It can be over-written at program execution with an environment variable: -// -// GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main -// -// Neither of the above are covered by the compatibility promise and -// may be removed in a future release of this module. -var conflictPolicy = "panic" // "panic" | "warn" | "ignore" - -// ignoreConflict reports whether to ignore a registration conflict -// given the descriptor being registered and the error. -// It is a variable so that the behavior is easily overridden in another file. -var ignoreConflict = func(d protoreflect.Descriptor, err error) bool { - const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT" - const faq = "https://protobuf.dev/reference/go/faq#namespace-conflict" - policy := conflictPolicy - if v := os.Getenv(env); v != "" { - policy = v - } - switch policy { - case "panic": - panic(fmt.Sprintf("%v\nSee %v\n", err, faq)) - case "warn": - fmt.Fprintf(os.Stderr, "WARNING: %v\nSee %v\n\n", err, faq) - return true - case "ignore": - return true - default: - panic("invalid " + env + " value: " + os.Getenv(env)) - } -} - -var globalMutex sync.RWMutex - -// GlobalFiles is a global registry of file descriptors. -var GlobalFiles *Files = new(Files) - -// GlobalTypes is the registry used by default for type lookups -// unless a local registry is provided by the user. -var GlobalTypes *Types = new(Types) - -// NotFound is a sentinel error value to indicate that the type was not found. -// -// Since registry lookup can happen in the critical performance path, resolvers -// must return this exact error value, not an error wrapping it. -var NotFound = errors.New("not found") - -// Files is a registry for looking up or iterating over files and the -// descriptors contained within them. -// The Find and Range methods are safe for concurrent use. -type Files struct { - // The map of descsByName contains: - // EnumDescriptor - // EnumValueDescriptor - // MessageDescriptor - // ExtensionDescriptor - // ServiceDescriptor - // *packageDescriptor - // - // Note that files are stored as a slice, since a package may contain - // multiple files. Only top-level declarations are registered. - // Note that enum values are in the top-level since that are in the same - // scope as the parent enum. - descsByName map[protoreflect.FullName]interface{} - filesByPath map[string][]protoreflect.FileDescriptor - numFiles int -} - -type packageDescriptor struct { - files []protoreflect.FileDescriptor -} - -// RegisterFile registers the provided file descriptor. -// -// If any descriptor within the file conflicts with the descriptor of any -// previously registered file (e.g., two enums with the same full name), -// then the file is not registered and an error is returned. -// -// It is permitted for multiple files to have the same file path. -func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { - if r == GlobalFiles { - globalMutex.Lock() - defer globalMutex.Unlock() - } - if r.descsByName == nil { - r.descsByName = map[protoreflect.FullName]interface{}{ - "": &packageDescriptor{}, - } - r.filesByPath = make(map[string][]protoreflect.FileDescriptor) - } - path := file.Path() - if prev := r.filesByPath[path]; len(prev) > 0 { - r.checkGenProtoConflict(path) - err := errors.New("file %q is already registered", file.Path()) - err = amendErrorWithCaller(err, prev[0], file) - if !(r == GlobalFiles && ignoreConflict(file, err)) { - return err - } - } - - for name := file.Package(); name != ""; name = name.Parent() { - switch prev := r.descsByName[name]; prev.(type) { - case nil, *packageDescriptor: - default: - err := errors.New("file %q has a package name conflict over %v", file.Path(), name) - err = amendErrorWithCaller(err, prev, file) - if r == GlobalFiles && ignoreConflict(file, err) { - err = nil - } - return err - } - } - var err error - var hasConflict bool - rangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) { - if prev := r.descsByName[d.FullName()]; prev != nil { - hasConflict = true - err = errors.New("file %q has a name conflict over %v", file.Path(), d.FullName()) - err = amendErrorWithCaller(err, prev, file) - if r == GlobalFiles && ignoreConflict(d, err) { - err = nil - } - } - }) - if hasConflict { - return err - } - - for name := file.Package(); name != ""; name = name.Parent() { - if r.descsByName[name] == nil { - r.descsByName[name] = &packageDescriptor{} - } - } - p := r.descsByName[file.Package()].(*packageDescriptor) - p.files = append(p.files, file) - rangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) { - r.descsByName[d.FullName()] = d - }) - r.filesByPath[path] = append(r.filesByPath[path], file) - r.numFiles++ - return nil -} - -// Several well-known types were hosted in the google.golang.org/genproto module -// but were later moved to this module. To avoid a weak dependency on the -// genproto module (and its relatively large set of transitive dependencies), -// we rely on a registration conflict to determine whether the genproto version -// is too old (i.e., does not contain aliases to the new type declarations). -func (r *Files) checkGenProtoConflict(path string) { - if r != GlobalFiles { - return - } - var prevPath string - const prevModule = "google.golang.org/genproto" - const prevVersion = "cb27e3aa (May 26th, 2020)" - switch path { - case "google/protobuf/field_mask.proto": - prevPath = prevModule + "/protobuf/field_mask" - case "google/protobuf/api.proto": - prevPath = prevModule + "/protobuf/api" - case "google/protobuf/type.proto": - prevPath = prevModule + "/protobuf/ptype" - case "google/protobuf/source_context.proto": - prevPath = prevModule + "/protobuf/source_context" - default: - return - } - pkgName := strings.TrimSuffix(strings.TrimPrefix(path, "google/protobuf/"), ".proto") - pkgName = strings.Replace(pkgName, "_", "", -1) + "pb" // e.g., "field_mask" => "fieldmaskpb" - currPath := "google.golang.org/protobuf/types/known/" + pkgName - panic(fmt.Sprintf(""+ - "duplicate registration of %q\n"+ - "\n"+ - "The generated definition for this file has moved:\n"+ - "\tfrom: %q\n"+ - "\tto: %q\n"+ - "A dependency on the %q module must\n"+ - "be at version %v or higher.\n"+ - "\n"+ - "Upgrade the dependency by running:\n"+ - "\tgo get -u %v\n", - path, prevPath, currPath, prevModule, prevVersion, prevPath)) -} - -// FindDescriptorByName looks up a descriptor by the full name. -// -// This returns (nil, [NotFound]) if not found. -func (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) { - if r == nil { - return nil, NotFound - } - if r == GlobalFiles { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - prefix := name - suffix := nameSuffix("") - for prefix != "" { - if d, ok := r.descsByName[prefix]; ok { - switch d := d.(type) { - case protoreflect.EnumDescriptor: - if d.FullName() == name { - return d, nil - } - case protoreflect.EnumValueDescriptor: - if d.FullName() == name { - return d, nil - } - case protoreflect.MessageDescriptor: - if d.FullName() == name { - return d, nil - } - if d := findDescriptorInMessage(d, suffix); d != nil && d.FullName() == name { - return d, nil - } - case protoreflect.ExtensionDescriptor: - if d.FullName() == name { - return d, nil - } - case protoreflect.ServiceDescriptor: - if d.FullName() == name { - return d, nil - } - if d := d.Methods().ByName(suffix.Pop()); d != nil && d.FullName() == name { - return d, nil - } - } - return nil, NotFound - } - prefix = prefix.Parent() - suffix = nameSuffix(name[len(prefix)+len("."):]) - } - return nil, NotFound -} - -func findDescriptorInMessage(md protoreflect.MessageDescriptor, suffix nameSuffix) protoreflect.Descriptor { - name := suffix.Pop() - if suffix == "" { - if ed := md.Enums().ByName(name); ed != nil { - return ed - } - for i := md.Enums().Len() - 1; i >= 0; i-- { - if vd := md.Enums().Get(i).Values().ByName(name); vd != nil { - return vd - } - } - if xd := md.Extensions().ByName(name); xd != nil { - return xd - } - if fd := md.Fields().ByName(name); fd != nil { - return fd - } - if od := md.Oneofs().ByName(name); od != nil { - return od - } - } - if md := md.Messages().ByName(name); md != nil { - if suffix == "" { - return md - } - return findDescriptorInMessage(md, suffix) - } - return nil -} - -type nameSuffix string - -func (s *nameSuffix) Pop() (name protoreflect.Name) { - if i := strings.IndexByte(string(*s), '.'); i >= 0 { - name, *s = protoreflect.Name((*s)[:i]), (*s)[i+1:] - } else { - name, *s = protoreflect.Name((*s)), "" - } - return name -} - -// FindFileByPath looks up a file by the path. -// -// This returns (nil, [NotFound]) if not found. -// This returns an error if multiple files have the same path. -func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) { - if r == nil { - return nil, NotFound - } - if r == GlobalFiles { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - fds := r.filesByPath[path] - switch len(fds) { - case 0: - return nil, NotFound - case 1: - return fds[0], nil - default: - return nil, errors.New("multiple files named %q", path) - } -} - -// NumFiles reports the number of registered files, -// including duplicate files with the same name. -func (r *Files) NumFiles() int { - if r == nil { - return 0 - } - if r == GlobalFiles { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - return r.numFiles -} - -// RangeFiles iterates over all registered files while f returns true. -// If multiple files have the same name, RangeFiles iterates over all of them. -// The iteration order is undefined. -func (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) { - if r == nil { - return - } - if r == GlobalFiles { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - for _, files := range r.filesByPath { - for _, file := range files { - if !f(file) { - return - } - } - } -} - -// NumFilesByPackage reports the number of registered files in a proto package. -func (r *Files) NumFilesByPackage(name protoreflect.FullName) int { - if r == nil { - return 0 - } - if r == GlobalFiles { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - p, ok := r.descsByName[name].(*packageDescriptor) - if !ok { - return 0 - } - return len(p.files) -} - -// RangeFilesByPackage iterates over all registered files in a given proto package -// while f returns true. The iteration order is undefined. -func (r *Files) RangeFilesByPackage(name protoreflect.FullName, f func(protoreflect.FileDescriptor) bool) { - if r == nil { - return - } - if r == GlobalFiles { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - p, ok := r.descsByName[name].(*packageDescriptor) - if !ok { - return - } - for _, file := range p.files { - if !f(file) { - return - } - } -} - -// rangeTopLevelDescriptors iterates over all top-level descriptors in a file -// which will be directly entered into the registry. -func rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflect.Descriptor)) { - eds := fd.Enums() - for i := eds.Len() - 1; i >= 0; i-- { - f(eds.Get(i)) - vds := eds.Get(i).Values() - for i := vds.Len() - 1; i >= 0; i-- { - f(vds.Get(i)) - } - } - mds := fd.Messages() - for i := mds.Len() - 1; i >= 0; i-- { - f(mds.Get(i)) - } - xds := fd.Extensions() - for i := xds.Len() - 1; i >= 0; i-- { - f(xds.Get(i)) - } - sds := fd.Services() - for i := sds.Len() - 1; i >= 0; i-- { - f(sds.Get(i)) - } -} - -// MessageTypeResolver is an interface for looking up messages. -// -// A compliant implementation must deterministically return the same type -// if no error is encountered. -// -// The [Types] type implements this interface. -type MessageTypeResolver interface { - // FindMessageByName looks up a message by its full name. - // E.g., "google.protobuf.Any" - // - // This return (nil, NotFound) if not found. - FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) - - // FindMessageByURL looks up a message by a URL identifier. - // See documentation on google.protobuf.Any.type_url for the URL format. - // - // This returns (nil, NotFound) if not found. - FindMessageByURL(url string) (protoreflect.MessageType, error) -} - -// ExtensionTypeResolver is an interface for looking up extensions. -// -// A compliant implementation must deterministically return the same type -// if no error is encountered. -// -// The [Types] type implements this interface. -type ExtensionTypeResolver interface { - // FindExtensionByName looks up a extension field by the field's full name. - // Note that this is the full name of the field as determined by - // where the extension is declared and is unrelated to the full name of the - // message being extended. - // - // This returns (nil, NotFound) if not found. - FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) - - // FindExtensionByNumber looks up a extension field by the field number - // within some parent message, identified by full name. - // - // This returns (nil, NotFound) if not found. - FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) -} - -var ( - _ MessageTypeResolver = (*Types)(nil) - _ ExtensionTypeResolver = (*Types)(nil) -) - -// Types is a registry for looking up or iterating over descriptor types. -// The Find and Range methods are safe for concurrent use. -type Types struct { - typesByName typesByName - extensionsByMessage extensionsByMessage - - numEnums int - numMessages int - numExtensions int -} - -type ( - typesByName map[protoreflect.FullName]interface{} - extensionsByMessage map[protoreflect.FullName]extensionsByNumber - extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType -) - -// RegisterMessage registers the provided message type. -// -// If a naming conflict occurs, the type is not registered and an error is returned. -func (r *Types) RegisterMessage(mt protoreflect.MessageType) error { - // Under rare circumstances getting the descriptor might recursively - // examine the registry, so fetch it before locking. - md := mt.Descriptor() - - if r == GlobalTypes { - globalMutex.Lock() - defer globalMutex.Unlock() - } - - if err := r.register("message", md, mt); err != nil { - return err - } - r.numMessages++ - return nil -} - -// RegisterEnum registers the provided enum type. -// -// If a naming conflict occurs, the type is not registered and an error is returned. -func (r *Types) RegisterEnum(et protoreflect.EnumType) error { - // Under rare circumstances getting the descriptor might recursively - // examine the registry, so fetch it before locking. - ed := et.Descriptor() - - if r == GlobalTypes { - globalMutex.Lock() - defer globalMutex.Unlock() - } - - if err := r.register("enum", ed, et); err != nil { - return err - } - r.numEnums++ - return nil -} - -// RegisterExtension registers the provided extension type. -// -// If a naming conflict occurs, the type is not registered and an error is returned. -func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { - // Under rare circumstances getting the descriptor might recursively - // examine the registry, so fetch it before locking. - // - // A known case where this can happen: Fetching the TypeDescriptor for a - // legacy ExtensionDesc can consult the global registry. - xd := xt.TypeDescriptor() - - if r == GlobalTypes { - globalMutex.Lock() - defer globalMutex.Unlock() - } - - field := xd.Number() - message := xd.ContainingMessage().FullName() - if prev := r.extensionsByMessage[message][field]; prev != nil { - err := errors.New("extension number %d is already registered on message %v", field, message) - err = amendErrorWithCaller(err, prev, xt) - if !(r == GlobalTypes && ignoreConflict(xd, err)) { - return err - } - } - - if err := r.register("extension", xd, xt); err != nil { - return err - } - if r.extensionsByMessage == nil { - r.extensionsByMessage = make(extensionsByMessage) - } - if r.extensionsByMessage[message] == nil { - r.extensionsByMessage[message] = make(extensionsByNumber) - } - r.extensionsByMessage[message][field] = xt - r.numExtensions++ - return nil -} - -func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { - name := desc.FullName() - prev := r.typesByName[name] - if prev != nil { - err := errors.New("%v %v is already registered", kind, name) - err = amendErrorWithCaller(err, prev, typ) - if !(r == GlobalTypes && ignoreConflict(desc, err)) { - return err - } - } - if r.typesByName == nil { - r.typesByName = make(typesByName) - } - r.typesByName[name] = typ - return nil -} - -// FindEnumByName looks up an enum by its full name. -// E.g., "google.protobuf.Field.Kind". -// -// This returns (nil, [NotFound]) if not found. -func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) { - if r == nil { - return nil, NotFound - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - if v := r.typesByName[enum]; v != nil { - if et, _ := v.(protoreflect.EnumType); et != nil { - return et, nil - } - return nil, errors.New("found wrong type: got %v, want enum", typeName(v)) - } - return nil, NotFound -} - -// FindMessageByName looks up a message by its full name, -// e.g. "google.protobuf.Any". -// -// This returns (nil, [NotFound]) if not found. -func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) { - if r == nil { - return nil, NotFound - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - if v := r.typesByName[message]; v != nil { - if mt, _ := v.(protoreflect.MessageType); mt != nil { - return mt, nil - } - return nil, errors.New("found wrong type: got %v, want message", typeName(v)) - } - return nil, NotFound -} - -// FindMessageByURL looks up a message by a URL identifier. -// See documentation on google.protobuf.Any.type_url for the URL format. -// -// This returns (nil, [NotFound]) if not found. -func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) { - // This function is similar to FindMessageByName but - // truncates anything before and including '/' in the URL. - if r == nil { - return nil, NotFound - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - message := protoreflect.FullName(url) - if i := strings.LastIndexByte(url, '/'); i >= 0 { - message = message[i+len("/"):] - } - - if v := r.typesByName[message]; v != nil { - if mt, _ := v.(protoreflect.MessageType); mt != nil { - return mt, nil - } - return nil, errors.New("found wrong type: got %v, want message", typeName(v)) - } - return nil, NotFound -} - -// FindExtensionByName looks up a extension field by the field's full name. -// Note that this is the full name of the field as determined by -// where the extension is declared and is unrelated to the full name of the -// message being extended. -// -// This returns (nil, [NotFound]) if not found. -func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) { - if r == nil { - return nil, NotFound - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - if v := r.typesByName[field]; v != nil { - if xt, _ := v.(protoreflect.ExtensionType); xt != nil { - return xt, nil - } - - // MessageSet extensions are special in that the name of the extension - // is the name of the message type used to extend the MessageSet. - // This naming scheme is used by text and JSON serialization. - // - // This feature is protected by the ProtoLegacy flag since MessageSets - // are a proto1 feature that is long deprecated. - if flags.ProtoLegacy { - if _, ok := v.(protoreflect.MessageType); ok { - field := field.Append(messageset.ExtensionName) - if v := r.typesByName[field]; v != nil { - if xt, _ := v.(protoreflect.ExtensionType); xt != nil { - if messageset.IsMessageSetExtension(xt.TypeDescriptor()) { - return xt, nil - } - } - } - } - } - - return nil, errors.New("found wrong type: got %v, want extension", typeName(v)) - } - return nil, NotFound -} - -// FindExtensionByNumber looks up a extension field by the field number -// within some parent message, identified by full name. -// -// This returns (nil, [NotFound]) if not found. -func (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) { - if r == nil { - return nil, NotFound - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - if xt, ok := r.extensionsByMessage[message][field]; ok { - return xt, nil - } - return nil, NotFound -} - -// NumEnums reports the number of registered enums. -func (r *Types) NumEnums() int { - if r == nil { - return 0 - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - return r.numEnums -} - -// RangeEnums iterates over all registered enums while f returns true. -// Iteration order is undefined. -func (r *Types) RangeEnums(f func(protoreflect.EnumType) bool) { - if r == nil { - return - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - for _, typ := range r.typesByName { - if et, ok := typ.(protoreflect.EnumType); ok { - if !f(et) { - return - } - } - } -} - -// NumMessages reports the number of registered messages. -func (r *Types) NumMessages() int { - if r == nil { - return 0 - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - return r.numMessages -} - -// RangeMessages iterates over all registered messages while f returns true. -// Iteration order is undefined. -func (r *Types) RangeMessages(f func(protoreflect.MessageType) bool) { - if r == nil { - return - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - for _, typ := range r.typesByName { - if mt, ok := typ.(protoreflect.MessageType); ok { - if !f(mt) { - return - } - } - } -} - -// NumExtensions reports the number of registered extensions. -func (r *Types) NumExtensions() int { - if r == nil { - return 0 - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - return r.numExtensions -} - -// RangeExtensions iterates over all registered extensions while f returns true. -// Iteration order is undefined. -func (r *Types) RangeExtensions(f func(protoreflect.ExtensionType) bool) { - if r == nil { - return - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - for _, typ := range r.typesByName { - if xt, ok := typ.(protoreflect.ExtensionType); ok { - if !f(xt) { - return - } - } - } -} - -// NumExtensionsByMessage reports the number of registered extensions for -// a given message type. -func (r *Types) NumExtensionsByMessage(message protoreflect.FullName) int { - if r == nil { - return 0 - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - return len(r.extensionsByMessage[message]) -} - -// RangeExtensionsByMessage iterates over all registered extensions filtered -// by a given message type while f returns true. Iteration order is undefined. -func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool) { - if r == nil { - return - } - if r == GlobalTypes { - globalMutex.RLock() - defer globalMutex.RUnlock() - } - for _, xt := range r.extensionsByMessage[message] { - if !f(xt) { - return - } - } -} - -func typeName(t interface{}) string { - switch t.(type) { - case protoreflect.EnumType: - return "enum" - case protoreflect.MessageType: - return "message" - case protoreflect.ExtensionType: - return "extension" - default: - return fmt.Sprintf("%T", t) - } -} - -func amendErrorWithCaller(err error, prev, curr interface{}) error { - prevPkg := goPackage(prev) - currPkg := goPackage(curr) - if prevPkg == "" || currPkg == "" || prevPkg == currPkg { - return err - } - return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) -} - -func goPackage(v interface{}) string { - switch d := v.(type) { - case protoreflect.EnumType: - v = d.Descriptor() - case protoreflect.MessageType: - v = d.Descriptor() - case protoreflect.ExtensionType: - v = d.TypeDescriptor() - } - if d, ok := v.(protoreflect.Descriptor); ok { - v = d.ParentFile() - } - if d, ok := v.(interface{ GoPackagePath() string }); ok { - return d.GoPackagePath() - } - return "" -} diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go b/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go deleted file mode 100644 index c5872767..00000000 --- a/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go +++ /dev/null @@ -1,15 +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. - -package protoiface - -type MessageV1 interface { - Reset() - String() string - ProtoMessage() -} - -type ExtensionRangeV1 struct { - Start, End int32 // both inclusive -} diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go deleted file mode 100644 index 44cf467d..00000000 --- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ /dev/null @@ -1,168 +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 protoiface contains types referenced or implemented by messages. -// -// WARNING: This package should only be imported by message implementations. -// The functionality found in this package should be accessed through -// higher-level abstractions provided by the proto package. -package protoiface - -import ( - "google.golang.org/protobuf/internal/pragma" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// Methods is a set of optional fast-path implementations of various operations. -type Methods = struct { - pragma.NoUnkeyedLiterals - - // Flags indicate support for optional features. - Flags SupportFlags - - // Size returns the size in bytes of the wire-format encoding of a message. - // Marshal must be provided if a custom Size is provided. - Size func(SizeInput) SizeOutput - - // Marshal formats a message in the wire-format encoding to the provided buffer. - // Size should be provided if a custom Marshal is provided. - // It must not return an error for a partial message. - Marshal func(MarshalInput) (MarshalOutput, error) - - // Unmarshal parses the wire-format encoding and merges the result into a message. - // It must not reset the target message or return an error for a partial message. - Unmarshal func(UnmarshalInput) (UnmarshalOutput, error) - - // Merge merges the contents of a source message into a destination message. - Merge func(MergeInput) MergeOutput - - // CheckInitialized returns an error if any required fields in the message are not set. - CheckInitialized func(CheckInitializedInput) (CheckInitializedOutput, error) -} - -// SupportFlags indicate support for optional features. -type SupportFlags = uint64 - -const ( - // SupportMarshalDeterministic reports whether MarshalOptions.Deterministic is supported. - SupportMarshalDeterministic SupportFlags = 1 << iota - - // SupportUnmarshalDiscardUnknown reports whether UnmarshalOptions.DiscardUnknown is supported. - SupportUnmarshalDiscardUnknown -) - -// SizeInput is input to the Size method. -type SizeInput = struct { - pragma.NoUnkeyedLiterals - - Message protoreflect.Message - Flags MarshalInputFlags -} - -// SizeOutput is output from the Size method. -type SizeOutput = struct { - pragma.NoUnkeyedLiterals - - Size int -} - -// MarshalInput is input to the Marshal method. -type MarshalInput = struct { - pragma.NoUnkeyedLiterals - - Message protoreflect.Message - Buf []byte // output is appended to this buffer - Flags MarshalInputFlags -} - -// MarshalOutput is output from the Marshal method. -type MarshalOutput = struct { - pragma.NoUnkeyedLiterals - - Buf []byte // contains marshaled message -} - -// MarshalInputFlags configure the marshaler. -// Most flags correspond to fields in proto.MarshalOptions. -type MarshalInputFlags = uint8 - -const ( - MarshalDeterministic MarshalInputFlags = 1 << iota - MarshalUseCachedSize -) - -// UnmarshalInput is input to the Unmarshal method. -type UnmarshalInput = struct { - pragma.NoUnkeyedLiterals - - Message protoreflect.Message - Buf []byte // input buffer - Flags UnmarshalInputFlags - Resolver interface { - FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) - FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) - } - Depth int -} - -// UnmarshalOutput is output from the Unmarshal method. -type UnmarshalOutput = struct { - pragma.NoUnkeyedLiterals - - Flags UnmarshalOutputFlags -} - -// UnmarshalInputFlags configure the unmarshaler. -// Most flags correspond to fields in proto.UnmarshalOptions. -type UnmarshalInputFlags = uint8 - -const ( - UnmarshalDiscardUnknown UnmarshalInputFlags = 1 << iota -) - -// UnmarshalOutputFlags are output from the Unmarshal method. -type UnmarshalOutputFlags = uint8 - -const ( - // UnmarshalInitialized may be set on return if all required fields are known to be set. - // If unset, then it does not necessarily indicate that the message is uninitialized, - // only that its status could not be confirmed. - UnmarshalInitialized UnmarshalOutputFlags = 1 << iota -) - -// MergeInput is input to the Merge method. -type MergeInput = struct { - pragma.NoUnkeyedLiterals - - Source protoreflect.Message - Destination protoreflect.Message -} - -// MergeOutput is output from the Merge method. -type MergeOutput = struct { - pragma.NoUnkeyedLiterals - - Flags MergeOutputFlags -} - -// MergeOutputFlags are output from the Merge method. -type MergeOutputFlags = uint8 - -const ( - // MergeComplete reports whether the merge was performed. - // If unset, the merger must have made no changes to the destination. - MergeComplete MergeOutputFlags = 1 << iota -) - -// CheckInitializedInput is input to the CheckInitialized method. -type CheckInitializedInput = struct { - pragma.NoUnkeyedLiterals - - Message protoreflect.Message -} - -// CheckInitializedOutput is output from the CheckInitialized method. -type CheckInitializedOutput = struct { - pragma.NoUnkeyedLiterals -} diff --git a/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go b/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go deleted file mode 100644 index 4a1ab7fb..00000000 --- a/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +++ /dev/null @@ -1,44 +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. - -// Package protoimpl contains the default implementation for messages -// generated by protoc-gen-go. -// -// WARNING: This package should only ever be imported by generated messages. -// The compatibility agreement covers nothing except for functionality needed -// to keep existing generated messages operational. Breakages that occur due -// to unauthorized usages of this package are not the author's responsibility. -package protoimpl - -import ( - "google.golang.org/protobuf/internal/filedesc" - "google.golang.org/protobuf/internal/filetype" - "google.golang.org/protobuf/internal/impl" -) - -// UnsafeEnabled specifies whether package unsafe can be used. -const UnsafeEnabled = impl.UnsafeEnabled - -type ( - // Types used by generated code in init functions. - DescBuilder = filedesc.Builder - TypeBuilder = filetype.Builder - - // Types used by generated code to implement EnumType, MessageType, and ExtensionType. - EnumInfo = impl.EnumInfo - MessageInfo = impl.MessageInfo - ExtensionInfo = impl.ExtensionInfo - - // Types embedded in generated messages. - MessageState = impl.MessageState - SizeCache = impl.SizeCache - WeakFields = impl.WeakFields - UnknownFields = impl.UnknownFields - ExtensionFields = impl.ExtensionFields - ExtensionFieldV1 = impl.ExtensionField - - Pointer = impl.Pointer -) - -var X impl.Export diff --git a/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go b/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go deleted file mode 100644 index a105cb23..00000000 --- a/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go +++ /dev/null @@ -1,60 +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 protoimpl - -import ( - "google.golang.org/protobuf/internal/version" -) - -const ( - // MaxVersion is the maximum supported version for generated .pb.go files. - // It is always the current version of the module. - MaxVersion = version.Minor - - // GenVersion is the runtime version required by generated .pb.go files. - // This is incremented when generated code relies on new functionality - // in the runtime. - GenVersion = 20 - - // MinVersion is the minimum supported version for generated .pb.go files. - // This is incremented when the runtime drops support for old code. - MinVersion = 0 -) - -// EnforceVersion is used by code generated by protoc-gen-go -// to statically enforce minimum and maximum versions of this package. -// A compilation failure implies either that: -// - the runtime package is too old and needs to be updated OR -// - the generated code is too old and needs to be regenerated. -// -// The runtime package can be upgraded by running: -// -// go get google.golang.org/protobuf -// -// The generated code can be regenerated by running: -// -// protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES} -// -// Example usage by generated code: -// -// const ( -// // Verify that this generated code is sufficiently up-to-date. -// _ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion) -// // Verify that runtime/protoimpl is sufficiently up-to-date. -// _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - genVersion) -// ) -// -// The genVersion is the current minor version used to generated the code. -// This compile-time check relies on negative integer overflow of a uint -// being a compilation failure (guaranteed by the Go specification). -type EnforceVersion uint - -// This enforces the following invariant: -// -// MinVersion ≤ GenVersion ≤ MaxVersion -const ( - _ = EnforceVersion(GenVersion - MinVersion) - _ = EnforceVersion(MaxVersion - GenVersion) -) diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go deleted file mode 100644 index 38daa858..00000000 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ /dev/null @@ -1,5656 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// 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 -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/descriptor.proto - -package descriptorpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -// The full set of known editions. -type Edition int32 - -const ( - // A placeholder for an unknown edition value. - Edition_EDITION_UNKNOWN Edition = 0 - // Legacy syntax "editions". These pre-date editions, but behave much like - // distinct editions. These can't be used to specify the edition of proto - // files, but feature definitions must supply proto2/proto3 defaults for - // backwards compatibility. - Edition_EDITION_PROTO2 Edition = 998 - Edition_EDITION_PROTO3 Edition = 999 - // Editions that have been released. The specific values are arbitrary and - // should not be depended on, but they will always be time-ordered for easy - // comparison. - Edition_EDITION_2023 Edition = 1000 - // Placeholder editions for testing feature resolution. These should not be - // used or relyed on outside of tests. - Edition_EDITION_1_TEST_ONLY Edition = 1 - Edition_EDITION_2_TEST_ONLY Edition = 2 - Edition_EDITION_99997_TEST_ONLY Edition = 99997 - Edition_EDITION_99998_TEST_ONLY Edition = 99998 - Edition_EDITION_99999_TEST_ONLY Edition = 99999 -) - -// Enum value maps for Edition. -var ( - Edition_name = map[int32]string{ - 0: "EDITION_UNKNOWN", - 998: "EDITION_PROTO2", - 999: "EDITION_PROTO3", - 1000: "EDITION_2023", - 1: "EDITION_1_TEST_ONLY", - 2: "EDITION_2_TEST_ONLY", - 99997: "EDITION_99997_TEST_ONLY", - 99998: "EDITION_99998_TEST_ONLY", - 99999: "EDITION_99999_TEST_ONLY", - } - Edition_value = map[string]int32{ - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - } -) - -func (x Edition) Enum() *Edition { - p := new(Edition) - *p = x - return p -} - -func (x Edition) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Edition) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor() -} - -func (Edition) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[0] -} - -func (x Edition) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *Edition) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = Edition(num) - return nil -} - -// Deprecated: Use Edition.Descriptor instead. -func (Edition) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0} -} - -// The verification state of the extension range. -type ExtensionRangeOptions_VerificationState int32 - -const ( - // All the extensions of the range must be declared. - ExtensionRangeOptions_DECLARATION ExtensionRangeOptions_VerificationState = 0 - ExtensionRangeOptions_UNVERIFIED ExtensionRangeOptions_VerificationState = 1 -) - -// Enum value maps for ExtensionRangeOptions_VerificationState. -var ( - ExtensionRangeOptions_VerificationState_name = map[int32]string{ - 0: "DECLARATION", - 1: "UNVERIFIED", - } - ExtensionRangeOptions_VerificationState_value = map[string]int32{ - "DECLARATION": 0, - "UNVERIFIED": 1, - } -) - -func (x ExtensionRangeOptions_VerificationState) Enum() *ExtensionRangeOptions_VerificationState { - p := new(ExtensionRangeOptions_VerificationState) - *p = x - return p -} - -func (x ExtensionRangeOptions_VerificationState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor() -} - -func (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[1] -} - -func (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *ExtensionRangeOptions_VerificationState) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = ExtensionRangeOptions_VerificationState(num) - return nil -} - -// Deprecated: Use ExtensionRangeOptions_VerificationState.Descriptor instead. -func (ExtensionRangeOptions_VerificationState) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0} -} - -type FieldDescriptorProto_Type int32 - -const ( - // 0 is reserved for errors. - // Order is weird for historical reasons. - FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 - FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 - FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 - FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 - FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 - FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 - FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 - // Tag-delimited aggregate. - // Group type is deprecated and not supported after google.protobuf. However, Proto3 - // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. In Editions, the group wire format - // can be enabled via the `message_encoding` feature. - FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 - FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 // Length-delimited aggregate. - // New in version 2. - FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 - FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 - FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 - FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 - FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 - FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 // Uses ZigZag encoding. - FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 // Uses ZigZag encoding. -) - -// Enum value maps for FieldDescriptorProto_Type. -var ( - FieldDescriptorProto_Type_name = map[int32]string{ - 1: "TYPE_DOUBLE", - 2: "TYPE_FLOAT", - 3: "TYPE_INT64", - 4: "TYPE_UINT64", - 5: "TYPE_INT32", - 6: "TYPE_FIXED64", - 7: "TYPE_FIXED32", - 8: "TYPE_BOOL", - 9: "TYPE_STRING", - 10: "TYPE_GROUP", - 11: "TYPE_MESSAGE", - 12: "TYPE_BYTES", - 13: "TYPE_UINT32", - 14: "TYPE_ENUM", - 15: "TYPE_SFIXED32", - 16: "TYPE_SFIXED64", - 17: "TYPE_SINT32", - 18: "TYPE_SINT64", - } - FieldDescriptorProto_Type_value = map[string]int32{ - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18, - } -) - -func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { - p := new(FieldDescriptorProto_Type) - *p = x - return p -} - -func (x FieldDescriptorProto_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor() -} - -func (FieldDescriptorProto_Type) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[2] -} - -func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FieldDescriptorProto_Type) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FieldDescriptorProto_Type(num) - return nil -} - -// Deprecated: Use FieldDescriptorProto_Type.Descriptor instead. -func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 0} -} - -type FieldDescriptorProto_Label int32 - -const ( - // 0 is reserved for errors - FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 - FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 - // The required label is only allowed in google.protobuf. In proto3 and Editions - // it's explicitly prohibited. In Editions, the `field_presence` feature - // can be used to get this behavior. - FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 -) - -// Enum value maps for FieldDescriptorProto_Label. -var ( - FieldDescriptorProto_Label_name = map[int32]string{ - 1: "LABEL_OPTIONAL", - 3: "LABEL_REPEATED", - 2: "LABEL_REQUIRED", - } - FieldDescriptorProto_Label_value = map[string]int32{ - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2, - } -) - -func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { - p := new(FieldDescriptorProto_Label) - *p = x - return p -} - -func (x FieldDescriptorProto_Label) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor() -} - -func (FieldDescriptorProto_Label) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[3] -} - -func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FieldDescriptorProto_Label) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FieldDescriptorProto_Label(num) - return nil -} - -// Deprecated: Use FieldDescriptorProto_Label.Descriptor instead. -func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 1} -} - -// Generated classes can be optimized for speed or code size. -type FileOptions_OptimizeMode int32 - -const ( - FileOptions_SPEED FileOptions_OptimizeMode = 1 // Generate complete code for parsing, serialization, - // etc. - FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 // Use ReflectionOps to implement these methods. - FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 // Generate code using MessageLite and the lite runtime. -) - -// Enum value maps for FileOptions_OptimizeMode. -var ( - FileOptions_OptimizeMode_name = map[int32]string{ - 1: "SPEED", - 2: "CODE_SIZE", - 3: "LITE_RUNTIME", - } - FileOptions_OptimizeMode_value = map[string]int32{ - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3, - } -) - -func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { - p := new(FileOptions_OptimizeMode) - *p = x - return p -} - -func (x FileOptions_OptimizeMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor() -} - -func (FileOptions_OptimizeMode) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[4] -} - -func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FileOptions_OptimizeMode) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FileOptions_OptimizeMode(num) - return nil -} - -// Deprecated: Use FileOptions_OptimizeMode.Descriptor instead. -func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10, 0} -} - -type FieldOptions_CType int32 - -const ( - // Default mode. - FieldOptions_STRING FieldOptions_CType = 0 - // The option [ctype=CORD] may be applied to a non-repeated field of type - // "bytes". It indicates that in C++, the data should be stored in a Cord - // instead of a string. For very large strings, this may reduce memory - // fragmentation. It may also allow better performance when parsing from a - // Cord, or when parsing with aliasing enabled, as the parsed Cord may then - // alias the original buffer. - FieldOptions_CORD FieldOptions_CType = 1 - FieldOptions_STRING_PIECE FieldOptions_CType = 2 -) - -// Enum value maps for FieldOptions_CType. -var ( - FieldOptions_CType_name = map[int32]string{ - 0: "STRING", - 1: "CORD", - 2: "STRING_PIECE", - } - FieldOptions_CType_value = map[string]int32{ - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2, - } -) - -func (x FieldOptions_CType) Enum() *FieldOptions_CType { - p := new(FieldOptions_CType) - *p = x - return p -} - -func (x FieldOptions_CType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() -} - -func (FieldOptions_CType) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[5] -} - -func (x FieldOptions_CType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FieldOptions_CType) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FieldOptions_CType(num) - return nil -} - -// Deprecated: Use FieldOptions_CType.Descriptor instead. -func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0} -} - -type FieldOptions_JSType int32 - -const ( - // Use the default type. - FieldOptions_JS_NORMAL FieldOptions_JSType = 0 - // Use JavaScript strings. - FieldOptions_JS_STRING FieldOptions_JSType = 1 - // Use JavaScript numbers. - FieldOptions_JS_NUMBER FieldOptions_JSType = 2 -) - -// Enum value maps for FieldOptions_JSType. -var ( - FieldOptions_JSType_name = map[int32]string{ - 0: "JS_NORMAL", - 1: "JS_STRING", - 2: "JS_NUMBER", - } - FieldOptions_JSType_value = map[string]int32{ - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2, - } -) - -func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { - p := new(FieldOptions_JSType) - *p = x - return p -} - -func (x FieldOptions_JSType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor() -} - -func (FieldOptions_JSType) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[6] -} - -func (x FieldOptions_JSType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FieldOptions_JSType(num) - return nil -} - -// Deprecated: Use FieldOptions_JSType.Descriptor instead. -func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} -} - -// If set to RETENTION_SOURCE, the option will be omitted from the binary. -// Note: as of January 2023, support for this is in progress and does not yet -// have an effect (b/264593489). -type FieldOptions_OptionRetention int32 - -const ( - FieldOptions_RETENTION_UNKNOWN FieldOptions_OptionRetention = 0 - FieldOptions_RETENTION_RUNTIME FieldOptions_OptionRetention = 1 - FieldOptions_RETENTION_SOURCE FieldOptions_OptionRetention = 2 -) - -// Enum value maps for FieldOptions_OptionRetention. -var ( - FieldOptions_OptionRetention_name = map[int32]string{ - 0: "RETENTION_UNKNOWN", - 1: "RETENTION_RUNTIME", - 2: "RETENTION_SOURCE", - } - FieldOptions_OptionRetention_value = map[string]int32{ - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2, - } -) - -func (x FieldOptions_OptionRetention) Enum() *FieldOptions_OptionRetention { - p := new(FieldOptions_OptionRetention) - *p = x - return p -} - -func (x FieldOptions_OptionRetention) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor() -} - -func (FieldOptions_OptionRetention) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[7] -} - -func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FieldOptions_OptionRetention) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FieldOptions_OptionRetention(num) - return nil -} - -// Deprecated: Use FieldOptions_OptionRetention.Descriptor instead. -func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 2} -} - -// This indicates the types of entities that the field may apply to when used -// as an option. If it is unset, then the field may be freely used as an -// option on any kind of entity. Note: as of January 2023, support for this is -// in progress and does not yet have an effect (b/264593489). -type FieldOptions_OptionTargetType int32 - -const ( - FieldOptions_TARGET_TYPE_UNKNOWN FieldOptions_OptionTargetType = 0 - FieldOptions_TARGET_TYPE_FILE FieldOptions_OptionTargetType = 1 - FieldOptions_TARGET_TYPE_EXTENSION_RANGE FieldOptions_OptionTargetType = 2 - FieldOptions_TARGET_TYPE_MESSAGE FieldOptions_OptionTargetType = 3 - FieldOptions_TARGET_TYPE_FIELD FieldOptions_OptionTargetType = 4 - FieldOptions_TARGET_TYPE_ONEOF FieldOptions_OptionTargetType = 5 - FieldOptions_TARGET_TYPE_ENUM FieldOptions_OptionTargetType = 6 - FieldOptions_TARGET_TYPE_ENUM_ENTRY FieldOptions_OptionTargetType = 7 - FieldOptions_TARGET_TYPE_SERVICE FieldOptions_OptionTargetType = 8 - FieldOptions_TARGET_TYPE_METHOD FieldOptions_OptionTargetType = 9 -) - -// Enum value maps for FieldOptions_OptionTargetType. -var ( - FieldOptions_OptionTargetType_name = map[int32]string{ - 0: "TARGET_TYPE_UNKNOWN", - 1: "TARGET_TYPE_FILE", - 2: "TARGET_TYPE_EXTENSION_RANGE", - 3: "TARGET_TYPE_MESSAGE", - 4: "TARGET_TYPE_FIELD", - 5: "TARGET_TYPE_ONEOF", - 6: "TARGET_TYPE_ENUM", - 7: "TARGET_TYPE_ENUM_ENTRY", - 8: "TARGET_TYPE_SERVICE", - 9: "TARGET_TYPE_METHOD", - } - FieldOptions_OptionTargetType_value = map[string]int32{ - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9, - } -) - -func (x FieldOptions_OptionTargetType) Enum() *FieldOptions_OptionTargetType { - p := new(FieldOptions_OptionTargetType) - *p = x - return p -} - -func (x FieldOptions_OptionTargetType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor() -} - -func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[8] -} - -func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FieldOptions_OptionTargetType) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FieldOptions_OptionTargetType(num) - return nil -} - -// Deprecated: Use FieldOptions_OptionTargetType.Descriptor instead. -func (FieldOptions_OptionTargetType) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 3} -} - -// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, -// or neither? HTTP based RPC implementation may choose GET verb for safe -// methods, and PUT verb for idempotent methods instead of the default POST. -type MethodOptions_IdempotencyLevel int32 - -const ( - MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 - MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 // implies idempotent - MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 // idempotent, but may have side effects -) - -// Enum value maps for MethodOptions_IdempotencyLevel. -var ( - MethodOptions_IdempotencyLevel_name = map[int32]string{ - 0: "IDEMPOTENCY_UNKNOWN", - 1: "NO_SIDE_EFFECTS", - 2: "IDEMPOTENT", - } - MethodOptions_IdempotencyLevel_value = map[string]int32{ - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2, - } -) - -func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { - p := new(MethodOptions_IdempotencyLevel) - *p = x - return p -} - -func (x MethodOptions_IdempotencyLevel) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor() -} - -func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[9] -} - -func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = MethodOptions_IdempotencyLevel(num) - return nil -} - -// Deprecated: Use MethodOptions_IdempotencyLevel.Descriptor instead. -func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0} -} - -type FeatureSet_FieldPresence int32 - -const ( - FeatureSet_FIELD_PRESENCE_UNKNOWN FeatureSet_FieldPresence = 0 - FeatureSet_EXPLICIT FeatureSet_FieldPresence = 1 - FeatureSet_IMPLICIT FeatureSet_FieldPresence = 2 - FeatureSet_LEGACY_REQUIRED FeatureSet_FieldPresence = 3 -) - -// Enum value maps for FeatureSet_FieldPresence. -var ( - FeatureSet_FieldPresence_name = map[int32]string{ - 0: "FIELD_PRESENCE_UNKNOWN", - 1: "EXPLICIT", - 2: "IMPLICIT", - 3: "LEGACY_REQUIRED", - } - FeatureSet_FieldPresence_value = map[string]int32{ - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3, - } -) - -func (x FeatureSet_FieldPresence) Enum() *FeatureSet_FieldPresence { - p := new(FeatureSet_FieldPresence) - *p = x - return p -} - -func (x FeatureSet_FieldPresence) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor() -} - -func (FeatureSet_FieldPresence) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[10] -} - -func (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FeatureSet_FieldPresence) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FeatureSet_FieldPresence(num) - return nil -} - -// Deprecated: Use FeatureSet_FieldPresence.Descriptor instead. -func (FeatureSet_FieldPresence) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0} -} - -type FeatureSet_EnumType int32 - -const ( - FeatureSet_ENUM_TYPE_UNKNOWN FeatureSet_EnumType = 0 - FeatureSet_OPEN FeatureSet_EnumType = 1 - FeatureSet_CLOSED FeatureSet_EnumType = 2 -) - -// Enum value maps for FeatureSet_EnumType. -var ( - FeatureSet_EnumType_name = map[int32]string{ - 0: "ENUM_TYPE_UNKNOWN", - 1: "OPEN", - 2: "CLOSED", - } - FeatureSet_EnumType_value = map[string]int32{ - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2, - } -) - -func (x FeatureSet_EnumType) Enum() *FeatureSet_EnumType { - p := new(FeatureSet_EnumType) - *p = x - return p -} - -func (x FeatureSet_EnumType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor() -} - -func (FeatureSet_EnumType) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[11] -} - -func (x FeatureSet_EnumType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FeatureSet_EnumType) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FeatureSet_EnumType(num) - return nil -} - -// Deprecated: Use FeatureSet_EnumType.Descriptor instead. -func (FeatureSet_EnumType) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 1} -} - -type FeatureSet_RepeatedFieldEncoding int32 - -const ( - FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN FeatureSet_RepeatedFieldEncoding = 0 - FeatureSet_PACKED FeatureSet_RepeatedFieldEncoding = 1 - FeatureSet_EXPANDED FeatureSet_RepeatedFieldEncoding = 2 -) - -// Enum value maps for FeatureSet_RepeatedFieldEncoding. -var ( - FeatureSet_RepeatedFieldEncoding_name = map[int32]string{ - 0: "REPEATED_FIELD_ENCODING_UNKNOWN", - 1: "PACKED", - 2: "EXPANDED", - } - FeatureSet_RepeatedFieldEncoding_value = map[string]int32{ - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2, - } -) - -func (x FeatureSet_RepeatedFieldEncoding) Enum() *FeatureSet_RepeatedFieldEncoding { - p := new(FeatureSet_RepeatedFieldEncoding) - *p = x - return p -} - -func (x FeatureSet_RepeatedFieldEncoding) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor() -} - -func (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[12] -} - -func (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FeatureSet_RepeatedFieldEncoding) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FeatureSet_RepeatedFieldEncoding(num) - return nil -} - -// Deprecated: Use FeatureSet_RepeatedFieldEncoding.Descriptor instead. -func (FeatureSet_RepeatedFieldEncoding) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 2} -} - -type FeatureSet_Utf8Validation int32 - -const ( - FeatureSet_UTF8_VALIDATION_UNKNOWN FeatureSet_Utf8Validation = 0 - FeatureSet_NONE FeatureSet_Utf8Validation = 1 - FeatureSet_VERIFY FeatureSet_Utf8Validation = 2 -) - -// Enum value maps for FeatureSet_Utf8Validation. -var ( - FeatureSet_Utf8Validation_name = map[int32]string{ - 0: "UTF8_VALIDATION_UNKNOWN", - 1: "NONE", - 2: "VERIFY", - } - FeatureSet_Utf8Validation_value = map[string]int32{ - "UTF8_VALIDATION_UNKNOWN": 0, - "NONE": 1, - "VERIFY": 2, - } -) - -func (x FeatureSet_Utf8Validation) Enum() *FeatureSet_Utf8Validation { - p := new(FeatureSet_Utf8Validation) - *p = x - return p -} - -func (x FeatureSet_Utf8Validation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor() -} - -func (FeatureSet_Utf8Validation) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[13] -} - -func (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FeatureSet_Utf8Validation) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FeatureSet_Utf8Validation(num) - return nil -} - -// Deprecated: Use FeatureSet_Utf8Validation.Descriptor instead. -func (FeatureSet_Utf8Validation) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 3} -} - -type FeatureSet_MessageEncoding int32 - -const ( - FeatureSet_MESSAGE_ENCODING_UNKNOWN FeatureSet_MessageEncoding = 0 - FeatureSet_LENGTH_PREFIXED FeatureSet_MessageEncoding = 1 - FeatureSet_DELIMITED FeatureSet_MessageEncoding = 2 -) - -// Enum value maps for FeatureSet_MessageEncoding. -var ( - FeatureSet_MessageEncoding_name = map[int32]string{ - 0: "MESSAGE_ENCODING_UNKNOWN", - 1: "LENGTH_PREFIXED", - 2: "DELIMITED", - } - FeatureSet_MessageEncoding_value = map[string]int32{ - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2, - } -) - -func (x FeatureSet_MessageEncoding) Enum() *FeatureSet_MessageEncoding { - p := new(FeatureSet_MessageEncoding) - *p = x - return p -} - -func (x FeatureSet_MessageEncoding) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor() -} - -func (FeatureSet_MessageEncoding) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[14] -} - -func (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FeatureSet_MessageEncoding) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FeatureSet_MessageEncoding(num) - return nil -} - -// Deprecated: Use FeatureSet_MessageEncoding.Descriptor instead. -func (FeatureSet_MessageEncoding) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 4} -} - -type FeatureSet_JsonFormat int32 - -const ( - FeatureSet_JSON_FORMAT_UNKNOWN FeatureSet_JsonFormat = 0 - FeatureSet_ALLOW FeatureSet_JsonFormat = 1 - FeatureSet_LEGACY_BEST_EFFORT FeatureSet_JsonFormat = 2 -) - -// Enum value maps for FeatureSet_JsonFormat. -var ( - FeatureSet_JsonFormat_name = map[int32]string{ - 0: "JSON_FORMAT_UNKNOWN", - 1: "ALLOW", - 2: "LEGACY_BEST_EFFORT", - } - FeatureSet_JsonFormat_value = map[string]int32{ - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2, - } -) - -func (x FeatureSet_JsonFormat) Enum() *FeatureSet_JsonFormat { - p := new(FeatureSet_JsonFormat) - *p = x - return p -} - -func (x FeatureSet_JsonFormat) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor() -} - -func (FeatureSet_JsonFormat) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[15] -} - -func (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *FeatureSet_JsonFormat) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = FeatureSet_JsonFormat(num) - return nil -} - -// Deprecated: Use FeatureSet_JsonFormat.Descriptor instead. -func (FeatureSet_JsonFormat) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 5} -} - -// Represents the identified object's effect on the element in the original -// .proto file. -type GeneratedCodeInfo_Annotation_Semantic int32 - -const ( - // There is no effect or the effect is indescribable. - GeneratedCodeInfo_Annotation_NONE GeneratedCodeInfo_Annotation_Semantic = 0 - // The element is set or otherwise mutated. - GeneratedCodeInfo_Annotation_SET GeneratedCodeInfo_Annotation_Semantic = 1 - // An alias to the element is returned. - GeneratedCodeInfo_Annotation_ALIAS GeneratedCodeInfo_Annotation_Semantic = 2 -) - -// Enum value maps for GeneratedCodeInfo_Annotation_Semantic. -var ( - GeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{ - 0: "NONE", - 1: "SET", - 2: "ALIAS", - } - GeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{ - "NONE": 0, - "SET": 1, - "ALIAS": 2, - } -) - -func (x GeneratedCodeInfo_Annotation_Semantic) Enum() *GeneratedCodeInfo_Annotation_Semantic { - p := new(GeneratedCodeInfo_Annotation_Semantic) - *p = x - return p -} - -func (x GeneratedCodeInfo_Annotation_Semantic) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor() -} - -func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[16] -} - -func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *GeneratedCodeInfo_Annotation_Semantic) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = GeneratedCodeInfo_Annotation_Semantic(num) - return nil -} - -// Deprecated: Use GeneratedCodeInfo_Annotation_Semantic.Descriptor instead. -func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0, 0} -} - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -type FileDescriptorSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` -} - -func (x *FileDescriptorSet) Reset() { - *x = FileDescriptorSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileDescriptorSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileDescriptorSet) ProtoMessage() {} - -func (x *FileDescriptorSet) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileDescriptorSet.ProtoReflect.Descriptor instead. -func (*FileDescriptorSet) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0} -} - -func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto { - if x != nil { - return x.File - } - return nil -} - -// Describes a complete .proto file. -type FileDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. - // Names of files imported by this file. - Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` - // Indexes of the public imported files in the dependency list above. - PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` - // All top-level definitions in this file. - MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` - Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` - Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` - // The syntax of the proto file. - // The supported values are "proto2", "proto3", and "editions". - // - // If `edition` is present, this value must be "editions". - Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` - // The edition of the proto file. - Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` -} - -func (x *FileDescriptorProto) Reset() { - *x = FileDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileDescriptorProto) ProtoMessage() {} - -func (x *FileDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileDescriptorProto.ProtoReflect.Descriptor instead. -func (*FileDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1} -} - -func (x *FileDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *FileDescriptorProto) GetPackage() string { - if x != nil && x.Package != nil { - return *x.Package - } - return "" -} - -func (x *FileDescriptorProto) GetDependency() []string { - if x != nil { - return x.Dependency - } - return nil -} - -func (x *FileDescriptorProto) GetPublicDependency() []int32 { - if x != nil { - return x.PublicDependency - } - return nil -} - -func (x *FileDescriptorProto) GetWeakDependency() []int32 { - if x != nil { - return x.WeakDependency - } - return nil -} - -func (x *FileDescriptorProto) GetMessageType() []*DescriptorProto { - if x != nil { - return x.MessageType - } - return nil -} - -func (x *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { - if x != nil { - return x.EnumType - } - return nil -} - -func (x *FileDescriptorProto) GetService() []*ServiceDescriptorProto { - if x != nil { - return x.Service - } - return nil -} - -func (x *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { - if x != nil { - return x.Extension - } - return nil -} - -func (x *FileDescriptorProto) GetOptions() *FileOptions { - if x != nil { - return x.Options - } - return nil -} - -func (x *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { - if x != nil { - return x.SourceCodeInfo - } - return nil -} - -func (x *FileDescriptorProto) GetSyntax() string { - if x != nil && x.Syntax != nil { - return *x.Syntax - } - return "" -} - -func (x *FileDescriptorProto) GetEdition() Edition { - if x != nil && x.Edition != nil { - return *x.Edition - } - return Edition_EDITION_UNKNOWN -} - -// Describes a message type. -type DescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` - Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` - NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` - EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` - ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` - OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` - Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` - ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` -} - -func (x *DescriptorProto) Reset() { - *x = DescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DescriptorProto) ProtoMessage() {} - -func (x *DescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DescriptorProto.ProtoReflect.Descriptor instead. -func (*DescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2} -} - -func (x *DescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *DescriptorProto) GetField() []*FieldDescriptorProto { - if x != nil { - return x.Field - } - return nil -} - -func (x *DescriptorProto) GetExtension() []*FieldDescriptorProto { - if x != nil { - return x.Extension - } - return nil -} - -func (x *DescriptorProto) GetNestedType() []*DescriptorProto { - if x != nil { - return x.NestedType - } - return nil -} - -func (x *DescriptorProto) GetEnumType() []*EnumDescriptorProto { - if x != nil { - return x.EnumType - } - return nil -} - -func (x *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { - if x != nil { - return x.ExtensionRange - } - return nil -} - -func (x *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { - if x != nil { - return x.OneofDecl - } - return nil -} - -func (x *DescriptorProto) GetOptions() *MessageOptions { - if x != nil { - return x.Options - } - return nil -} - -func (x *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { - if x != nil { - return x.ReservedRange - } - return nil -} - -func (x *DescriptorProto) GetReservedName() []string { - if x != nil { - return x.ReservedName - } - return nil -} - -type ExtensionRangeOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - // For external users: DO NOT USE. We are in the process of open sourcing - // extension declaration and executing internal cleanups before it can be - // used externally. - Declaration []*ExtensionRangeOptions_Declaration `protobuf:"bytes,2,rep,name=declaration" json:"declaration,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"` - // The verification state of the range. - // TODO: flip the default to DECLARATION once all empty ranges - // are marked as UNVERIFIED. - Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` -} - -// Default values for ExtensionRangeOptions fields. -const ( - Default_ExtensionRangeOptions_Verification = ExtensionRangeOptions_UNVERIFIED -) - -func (x *ExtensionRangeOptions) Reset() { - *x = ExtensionRangeOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionRangeOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionRangeOptions) ProtoMessage() {} - -func (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionRangeOptions.ProtoReflect.Descriptor instead. -func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3} -} - -func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -func (x *ExtensionRangeOptions) GetDeclaration() []*ExtensionRangeOptions_Declaration { - if x != nil { - return x.Declaration - } - return nil -} - -func (x *ExtensionRangeOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_VerificationState { - if x != nil && x.Verification != nil { - return *x.Verification - } - return Default_ExtensionRangeOptions_Verification -} - -// Describes a field within a message. -type FieldDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` - Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` - Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - // If true, this is a proto3 "optional". When a proto3 field is optional, it - // tracks presence regardless of field type. - // - // When proto3_optional is true, this field must be belong to a oneof to - // signal to old proto3 clients that presence is tracked for this field. This - // oneof is known as a "synthetic" oneof, and this field must be its sole - // member (each proto3 optional field gets its own synthetic oneof). Synthetic - // oneofs exist in the descriptor only, and do not generate any API. Synthetic - // oneofs must be ordered after all "real" oneofs. - // - // For message fields, proto3_optional doesn't create any semantic change, - // since non-repeated message fields always track presence. However it still - // indicates the semantic detail of whether the user wrote "optional" or not. - // This can be useful for round-tripping the .proto file. For consistency we - // give message fields a synthetic oneof also, even though it is not required - // to track presence. This is especially important because the parser can't - // tell if a field is a message or an enum, so it must always create a - // synthetic oneof. - // - // Proto2 optional fields do not set this flag, because they already indicate - // optional with `LABEL_OPTIONAL`. - Proto3Optional *bool `protobuf:"varint,17,opt,name=proto3_optional,json=proto3Optional" json:"proto3_optional,omitempty"` -} - -func (x *FieldDescriptorProto) Reset() { - *x = FieldDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldDescriptorProto) ProtoMessage() {} - -func (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldDescriptorProto.ProtoReflect.Descriptor instead. -func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4} -} - -func (x *FieldDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *FieldDescriptorProto) GetNumber() int32 { - if x != nil && x.Number != nil { - return *x.Number - } - return 0 -} - -func (x *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { - if x != nil && x.Label != nil { - return *x.Label - } - return FieldDescriptorProto_LABEL_OPTIONAL -} - -func (x *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { - if x != nil && x.Type != nil { - return *x.Type - } - return FieldDescriptorProto_TYPE_DOUBLE -} - -func (x *FieldDescriptorProto) GetTypeName() string { - if x != nil && x.TypeName != nil { - return *x.TypeName - } - return "" -} - -func (x *FieldDescriptorProto) GetExtendee() string { - if x != nil && x.Extendee != nil { - return *x.Extendee - } - return "" -} - -func (x *FieldDescriptorProto) GetDefaultValue() string { - if x != nil && x.DefaultValue != nil { - return *x.DefaultValue - } - return "" -} - -func (x *FieldDescriptorProto) GetOneofIndex() int32 { - if x != nil && x.OneofIndex != nil { - return *x.OneofIndex - } - return 0 -} - -func (x *FieldDescriptorProto) GetJsonName() string { - if x != nil && x.JsonName != nil { - return *x.JsonName - } - return "" -} - -func (x *FieldDescriptorProto) GetOptions() *FieldOptions { - if x != nil { - return x.Options - } - return nil -} - -func (x *FieldDescriptorProto) GetProto3Optional() bool { - if x != nil && x.Proto3Optional != nil { - return *x.Proto3Optional - } - return false -} - -// Describes a oneof. -type OneofDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` -} - -func (x *OneofDescriptorProto) Reset() { - *x = OneofDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OneofDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OneofDescriptorProto) ProtoMessage() {} - -func (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OneofDescriptorProto.ProtoReflect.Descriptor instead. -func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{5} -} - -func (x *OneofDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *OneofDescriptorProto) GetOptions() *OneofOptions { - if x != nil { - return x.Options - } - return nil -} - -// Describes an enum type. -type EnumDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - // Range of reserved numeric values. Reserved numeric values may not be used - // by enum values in the same enum declaration. Reserved ranges may not - // overlap. - ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` -} - -func (x *EnumDescriptorProto) Reset() { - *x = EnumDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumDescriptorProto) ProtoMessage() {} - -func (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumDescriptorProto.ProtoReflect.Descriptor instead. -func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6} -} - -func (x *EnumDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { - if x != nil { - return x.Value - } - return nil -} - -func (x *EnumDescriptorProto) GetOptions() *EnumOptions { - if x != nil { - return x.Options - } - return nil -} - -func (x *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { - if x != nil { - return x.ReservedRange - } - return nil -} - -func (x *EnumDescriptorProto) GetReservedName() []string { - if x != nil { - return x.ReservedName - } - return nil -} - -// Describes a value within an enum. -type EnumValueDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` -} - -func (x *EnumValueDescriptorProto) Reset() { - *x = EnumValueDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumValueDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumValueDescriptorProto) ProtoMessage() {} - -func (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumValueDescriptorProto.ProtoReflect.Descriptor instead. -func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{7} -} - -func (x *EnumValueDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *EnumValueDescriptorProto) GetNumber() int32 { - if x != nil && x.Number != nil { - return *x.Number - } - return 0 -} - -func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { - if x != nil { - return x.Options - } - return nil -} - -// Describes a service. -type ServiceDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` -} - -func (x *ServiceDescriptorProto) Reset() { - *x = ServiceDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServiceDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceDescriptorProto) ProtoMessage() {} - -func (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServiceDescriptorProto.ProtoReflect.Descriptor instead. -func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{8} -} - -func (x *ServiceDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { - if x != nil { - return x.Method - } - return nil -} - -func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions { - if x != nil { - return x.Options - } - return nil -} - -// Describes a method of a service. -type MethodDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` - OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` - Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` - // Identifies if client streams multiple client messages - ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` - // Identifies if server streams multiple server messages - ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` -} - -// Default values for MethodDescriptorProto fields. -const ( - Default_MethodDescriptorProto_ClientStreaming = bool(false) - Default_MethodDescriptorProto_ServerStreaming = bool(false) -) - -func (x *MethodDescriptorProto) Reset() { - *x = MethodDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodDescriptorProto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodDescriptorProto) ProtoMessage() {} - -func (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodDescriptorProto.ProtoReflect.Descriptor instead. -func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{9} -} - -func (x *MethodDescriptorProto) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *MethodDescriptorProto) GetInputType() string { - if x != nil && x.InputType != nil { - return *x.InputType - } - return "" -} - -func (x *MethodDescriptorProto) GetOutputType() string { - if x != nil && x.OutputType != nil { - return *x.OutputType - } - return "" -} - -func (x *MethodDescriptorProto) GetOptions() *MethodOptions { - if x != nil { - return x.Options - } - return nil -} - -func (x *MethodDescriptorProto) GetClientStreaming() bool { - if x != nil && x.ClientStreaming != nil { - return *x.ClientStreaming - } - return Default_MethodDescriptorProto_ClientStreaming -} - -func (x *MethodDescriptorProto) GetServerStreaming() bool { - if x != nil && x.ServerStreaming != nil { - return *x.ServerStreaming - } - return Default_MethodDescriptorProto_ServerStreaming -} - -type FileOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` - // Controls the name of the wrapper Java class generated for the .proto file. - // That class will always contain the .proto file's getDescriptor() method as - // well as any top-level extensions defined in the .proto file. - // If java_multiple_files is disabled, then all the other classes from the - // .proto file will be nested inside the single wrapper outer class. - JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` - // If enabled, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the wrapper class - // named by java_outer_classname. However, the wrapper class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` - // This option does nothing. - // - // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. - JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` - OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` - JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` - PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` - PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=1" json:"cc_enable_arenas,omitempty"` - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` - // Namespace for generated classes; defaults to the package. - CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` - // By default Swift generators will take the proto package and CamelCase it - // replacing '.' with underscore and use that to prefix the types/symbols - // defined. When this options is provided, they will use this value instead - // to prefix the types/symbols defined. - SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` - // Use this option to change the namespace of php generated classes. Default - // is empty. When this option is empty, the package name will be used for - // determining the namespace. - PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` - // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be - // used for determining the namespace. - PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` - // Use this option to change the package of ruby generated classes. Default - // is empty. When this option is not set, the package name will be used for - // determining the ruby package. - RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"` - // The parser stores options it doesn't recognize here. - // See the documentation for the "Options" section above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for FileOptions fields. -const ( - Default_FileOptions_JavaMultipleFiles = bool(false) - Default_FileOptions_JavaStringCheckUtf8 = bool(false) - Default_FileOptions_OptimizeFor = FileOptions_SPEED - Default_FileOptions_CcGenericServices = bool(false) - Default_FileOptions_JavaGenericServices = bool(false) - Default_FileOptions_PyGenericServices = bool(false) - Default_FileOptions_PhpGenericServices = bool(false) - Default_FileOptions_Deprecated = bool(false) - Default_FileOptions_CcEnableArenas = bool(true) -) - -func (x *FileOptions) Reset() { - *x = FileOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileOptions) ProtoMessage() {} - -func (x *FileOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileOptions.ProtoReflect.Descriptor instead. -func (*FileOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10} -} - -func (x *FileOptions) GetJavaPackage() string { - if x != nil && x.JavaPackage != nil { - return *x.JavaPackage - } - return "" -} - -func (x *FileOptions) GetJavaOuterClassname() string { - if x != nil && x.JavaOuterClassname != nil { - return *x.JavaOuterClassname - } - return "" -} - -func (x *FileOptions) GetJavaMultipleFiles() bool { - if x != nil && x.JavaMultipleFiles != nil { - return *x.JavaMultipleFiles - } - return Default_FileOptions_JavaMultipleFiles -} - -// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. -func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool { - if x != nil && x.JavaGenerateEqualsAndHash != nil { - return *x.JavaGenerateEqualsAndHash - } - return false -} - -func (x *FileOptions) GetJavaStringCheckUtf8() bool { - if x != nil && x.JavaStringCheckUtf8 != nil { - return *x.JavaStringCheckUtf8 - } - return Default_FileOptions_JavaStringCheckUtf8 -} - -func (x *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { - if x != nil && x.OptimizeFor != nil { - return *x.OptimizeFor - } - return Default_FileOptions_OptimizeFor -} - -func (x *FileOptions) GetGoPackage() string { - if x != nil && x.GoPackage != nil { - return *x.GoPackage - } - return "" -} - -func (x *FileOptions) GetCcGenericServices() bool { - if x != nil && x.CcGenericServices != nil { - return *x.CcGenericServices - } - return Default_FileOptions_CcGenericServices -} - -func (x *FileOptions) GetJavaGenericServices() bool { - if x != nil && x.JavaGenericServices != nil { - return *x.JavaGenericServices - } - return Default_FileOptions_JavaGenericServices -} - -func (x *FileOptions) GetPyGenericServices() bool { - if x != nil && x.PyGenericServices != nil { - return *x.PyGenericServices - } - return Default_FileOptions_PyGenericServices -} - -func (x *FileOptions) GetPhpGenericServices() bool { - if x != nil && x.PhpGenericServices != nil { - return *x.PhpGenericServices - } - return Default_FileOptions_PhpGenericServices -} - -func (x *FileOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_FileOptions_Deprecated -} - -func (x *FileOptions) GetCcEnableArenas() bool { - if x != nil && x.CcEnableArenas != nil { - return *x.CcEnableArenas - } - return Default_FileOptions_CcEnableArenas -} - -func (x *FileOptions) GetObjcClassPrefix() string { - if x != nil && x.ObjcClassPrefix != nil { - return *x.ObjcClassPrefix - } - return "" -} - -func (x *FileOptions) GetCsharpNamespace() string { - if x != nil && x.CsharpNamespace != nil { - return *x.CsharpNamespace - } - return "" -} - -func (x *FileOptions) GetSwiftPrefix() string { - if x != nil && x.SwiftPrefix != nil { - return *x.SwiftPrefix - } - return "" -} - -func (x *FileOptions) GetPhpClassPrefix() string { - if x != nil && x.PhpClassPrefix != nil { - return *x.PhpClassPrefix - } - return "" -} - -func (x *FileOptions) GetPhpNamespace() string { - if x != nil && x.PhpNamespace != nil { - return *x.PhpNamespace - } - return "" -} - -func (x *FileOptions) GetPhpMetadataNamespace() string { - if x != nil && x.PhpMetadataNamespace != nil { - return *x.PhpMetadataNamespace - } - return "" -} - -func (x *FileOptions) GetRubyPackage() string { - if x != nil && x.RubyPackage != nil { - return *x.RubyPackage - } - return "" -} - -func (x *FileOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type MessageOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - // - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // - // map map_field = 1; - // - // The parsed descriptor looks like: - // - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementations still need to work as - // if the field is a repeated message field. - MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` - // Enable the legacy handling of JSON field name conflicts. This lowercases - // and strips underscored from the fields before comparison in proto3 only. - // The new behavior takes `json_name` into account and applies to proto2 as - // well. - // - // This should only be used as a temporary measure against broken builds due - // to the change in behavior for JSON field name conflicts. - // - // TODO This is legacy behavior we plan to remove once downstream - // teams have had time to migrate. - // - // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. - DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,11,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for MessageOptions fields. -const ( - Default_MessageOptions_MessageSetWireFormat = bool(false) - Default_MessageOptions_NoStandardDescriptorAccessor = bool(false) - Default_MessageOptions_Deprecated = bool(false) -) - -func (x *MessageOptions) Reset() { - *x = MessageOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessageOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageOptions) ProtoMessage() {} - -func (x *MessageOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead. -func (*MessageOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{11} -} - -func (x *MessageOptions) GetMessageSetWireFormat() bool { - if x != nil && x.MessageSetWireFormat != nil { - return *x.MessageSetWireFormat - } - return Default_MessageOptions_MessageSetWireFormat -} - -func (x *MessageOptions) GetNoStandardDescriptorAccessor() bool { - if x != nil && x.NoStandardDescriptorAccessor != nil { - return *x.NoStandardDescriptorAccessor - } - return Default_MessageOptions_NoStandardDescriptorAccessor -} - -func (x *MessageOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_MessageOptions_Deprecated -} - -func (x *MessageOptions) GetMapEntry() bool { - if x != nil && x.MapEntry != nil { - return *x.MapEntry - } - return false -} - -// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. -func (x *MessageOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { - if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { - return *x.DeprecatedLegacyJsonFieldConflicts - } - return false -} - -func (x *MessageOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type FieldOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is only implemented to support use of - // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - // type "bytes" in the open source release -- sorry, we'll try to include - // other types in a future version! - Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. This option is prohibited in - // Editions, but the `repeated_field_encoding` feature can be used to control - // the behavior. - Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - // is represented as JavaScript string, which avoids loss of precision that - // can happen when a large value is converted to a floating point JavaScript. - // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - // use the JavaScript "number" type. The behavior of the default option - // JS_NORMAL is implementation dependent. - // - // This option is an enum to permit additional types to be added, e.g. - // goog.math.Integer. - Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - // - // As of May 2022, lazy verifies the contents of the byte stream during - // parsing. An invalid byte stream will cause the overall parsing to fail. - Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` - // unverified_lazy does no correctness checks on the byte stream. This should - // only be used where lazy with verification is prohibitive for performance - // reasons. - UnverifiedLazy *bool `protobuf:"varint,15,opt,name=unverified_lazy,json=unverifiedLazy,def=0" json:"unverified_lazy,omitempty"` - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // For Google-internal migration only. Do not use. - Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` - // Indicate that the field value should not be printed out when using debug - // formats, e.g. when the field contains sensitive credentials. - DebugRedact *bool `protobuf:"varint,16,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` - Retention *FieldOptions_OptionRetention `protobuf:"varint,17,opt,name=retention,enum=google.protobuf.FieldOptions_OptionRetention" json:"retention,omitempty"` - Targets []FieldOptions_OptionTargetType `protobuf:"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType" json:"targets,omitempty"` - EditionDefaults []*FieldOptions_EditionDefault `protobuf:"bytes,20,rep,name=edition_defaults,json=editionDefaults" json:"edition_defaults,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for FieldOptions fields. -const ( - Default_FieldOptions_Ctype = FieldOptions_STRING - Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL - Default_FieldOptions_Lazy = bool(false) - Default_FieldOptions_UnverifiedLazy = bool(false) - Default_FieldOptions_Deprecated = bool(false) - Default_FieldOptions_Weak = bool(false) - Default_FieldOptions_DebugRedact = bool(false) -) - -func (x *FieldOptions) Reset() { - *x = FieldOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldOptions) ProtoMessage() {} - -func (x *FieldOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead. -func (*FieldOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12} -} - -func (x *FieldOptions) GetCtype() FieldOptions_CType { - if x != nil && x.Ctype != nil { - return *x.Ctype - } - return Default_FieldOptions_Ctype -} - -func (x *FieldOptions) GetPacked() bool { - if x != nil && x.Packed != nil { - return *x.Packed - } - return false -} - -func (x *FieldOptions) GetJstype() FieldOptions_JSType { - if x != nil && x.Jstype != nil { - return *x.Jstype - } - return Default_FieldOptions_Jstype -} - -func (x *FieldOptions) GetLazy() bool { - if x != nil && x.Lazy != nil { - return *x.Lazy - } - return Default_FieldOptions_Lazy -} - -func (x *FieldOptions) GetUnverifiedLazy() bool { - if x != nil && x.UnverifiedLazy != nil { - return *x.UnverifiedLazy - } - return Default_FieldOptions_UnverifiedLazy -} - -func (x *FieldOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_FieldOptions_Deprecated -} - -func (x *FieldOptions) GetWeak() bool { - if x != nil && x.Weak != nil { - return *x.Weak - } - return Default_FieldOptions_Weak -} - -func (x *FieldOptions) GetDebugRedact() bool { - if x != nil && x.DebugRedact != nil { - return *x.DebugRedact - } - return Default_FieldOptions_DebugRedact -} - -func (x *FieldOptions) GetRetention() FieldOptions_OptionRetention { - if x != nil && x.Retention != nil { - return *x.Retention - } - return FieldOptions_RETENTION_UNKNOWN -} - -func (x *FieldOptions) GetTargets() []FieldOptions_OptionTargetType { - if x != nil { - return x.Targets - } - return nil -} - -func (x *FieldOptions) GetEditionDefaults() []*FieldOptions_EditionDefault { - if x != nil { - return x.EditionDefaults - } - return nil -} - -func (x *FieldOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type OneofOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -func (x *OneofOptions) Reset() { - *x = OneofOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OneofOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OneofOptions) ProtoMessage() {} - -func (x *OneofOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OneofOptions.ProtoReflect.Descriptor instead. -func (*OneofOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13} -} - -func (x *OneofOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type EnumOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Set this option to true to allow mapping different tag names to the same - // value. - AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Enable the legacy handling of JSON field name conflicts. This lowercases - // and strips underscored from the fields before comparison in proto3 only. - // The new behavior takes `json_name` into account and applies to proto2 as - // well. - // TODO Remove this legacy behavior once downstream teams have - // had time to migrate. - // - // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. - DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,6,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for EnumOptions fields. -const ( - Default_EnumOptions_Deprecated = bool(false) -) - -func (x *EnumOptions) Reset() { - *x = EnumOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumOptions) ProtoMessage() {} - -func (x *EnumOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead. -func (*EnumOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{14} -} - -func (x *EnumOptions) GetAllowAlias() bool { - if x != nil && x.AllowAlias != nil { - return *x.AllowAlias - } - return false -} - -func (x *EnumOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_EnumOptions_Deprecated -} - -// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. -func (x *EnumOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { - if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { - return *x.DeprecatedLegacyJsonFieldConflicts - } - return false -} - -func (x *EnumOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type EnumValueOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` - // Indicate that fields annotated with this enum value should not be printed - // out when using debug formats, e.g. when the field contains sensitive - // credentials. - DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for EnumValueOptions fields. -const ( - Default_EnumValueOptions_Deprecated = bool(false) - Default_EnumValueOptions_DebugRedact = bool(false) -) - -func (x *EnumValueOptions) Reset() { - *x = EnumValueOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumValueOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumValueOptions) ProtoMessage() {} - -func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead. -func (*EnumValueOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{15} -} - -func (x *EnumValueOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_EnumValueOptions_Deprecated -} - -func (x *EnumValueOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *EnumValueOptions) GetDebugRedact() bool { - if x != nil && x.DebugRedact != nil { - return *x.DebugRedact - } - return Default_EnumValueOptions_DebugRedact -} - -func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type ServiceOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"` - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for ServiceOptions fields. -const ( - Default_ServiceOptions_Deprecated = bool(false) -) - -func (x *ServiceOptions) Reset() { - *x = ServiceOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServiceOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceOptions) ProtoMessage() {} - -func (x *ServiceOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead. -func (*ServiceOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16} -} - -func (x *ServiceOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *ServiceOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_ServiceOptions_Deprecated -} - -func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -type MethodOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` - // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"` - // The parser stores options it doesn't recognize here. See above. - UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} - -// Default values for MethodOptions fields. -const ( - Default_MethodOptions_Deprecated = bool(false) - Default_MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN -) - -func (x *MethodOptions) Reset() { - *x = MethodOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodOptions) ProtoMessage() {} - -func (x *MethodOptions) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead. -func (*MethodOptions) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17} -} - -func (x *MethodOptions) GetDeprecated() bool { - if x != nil && x.Deprecated != nil { - return *x.Deprecated - } - return Default_MethodOptions_Deprecated -} - -func (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { - if x != nil && x.IdempotencyLevel != nil { - return *x.IdempotencyLevel - } - return Default_MethodOptions_IdempotencyLevel -} - -func (x *MethodOptions) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { - if x != nil { - return x.UninterpretedOption - } - return nil -} - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -type UninterpretedOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` - PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` - NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` - StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` - AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` -} - -func (x *UninterpretedOption) Reset() { - *x = UninterpretedOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UninterpretedOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UninterpretedOption) ProtoMessage() {} - -func (x *UninterpretedOption) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UninterpretedOption.ProtoReflect.Descriptor instead. -func (*UninterpretedOption) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18} -} - -func (x *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { - if x != nil { - return x.Name - } - return nil -} - -func (x *UninterpretedOption) GetIdentifierValue() string { - if x != nil && x.IdentifierValue != nil { - return *x.IdentifierValue - } - return "" -} - -func (x *UninterpretedOption) GetPositiveIntValue() uint64 { - if x != nil && x.PositiveIntValue != nil { - return *x.PositiveIntValue - } - return 0 -} - -func (x *UninterpretedOption) GetNegativeIntValue() int64 { - if x != nil && x.NegativeIntValue != nil { - return *x.NegativeIntValue - } - return 0 -} - -func (x *UninterpretedOption) GetDoubleValue() float64 { - if x != nil && x.DoubleValue != nil { - return *x.DoubleValue - } - return 0 -} - -func (x *UninterpretedOption) GetStringValue() []byte { - if x != nil { - return x.StringValue - } - return nil -} - -func (x *UninterpretedOption) GetAggregateValue() string { - if x != nil && x.AggregateValue != nil { - return *x.AggregateValue - } - return "" -} - -// TODO Enums in C++ gencode (and potentially other languages) are -// not well scoped. This means that each of the feature enums below can clash -// with each other. The short names we've chosen maximize call-site -// readability, but leave us very open to this scenario. A future feature will -// be designed and implemented to handle this, hopefully before we ever hit a -// conflict here. -type FeatureSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - - FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"` - EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"` - RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"` - Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"` - MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"` - JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"` -} - -func (x *FeatureSet) Reset() { - *x = FeatureSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeatureSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeatureSet) ProtoMessage() {} - -func (x *FeatureSet) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FeatureSet.ProtoReflect.Descriptor instead. -func (*FeatureSet) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19} -} - -func (x *FeatureSet) GetFieldPresence() FeatureSet_FieldPresence { - if x != nil && x.FieldPresence != nil { - return *x.FieldPresence - } - return FeatureSet_FIELD_PRESENCE_UNKNOWN -} - -func (x *FeatureSet) GetEnumType() FeatureSet_EnumType { - if x != nil && x.EnumType != nil { - return *x.EnumType - } - return FeatureSet_ENUM_TYPE_UNKNOWN -} - -func (x *FeatureSet) GetRepeatedFieldEncoding() FeatureSet_RepeatedFieldEncoding { - if x != nil && x.RepeatedFieldEncoding != nil { - return *x.RepeatedFieldEncoding - } - return FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN -} - -func (x *FeatureSet) GetUtf8Validation() FeatureSet_Utf8Validation { - if x != nil && x.Utf8Validation != nil { - return *x.Utf8Validation - } - return FeatureSet_UTF8_VALIDATION_UNKNOWN -} - -func (x *FeatureSet) GetMessageEncoding() FeatureSet_MessageEncoding { - if x != nil && x.MessageEncoding != nil { - return *x.MessageEncoding - } - return FeatureSet_MESSAGE_ENCODING_UNKNOWN -} - -func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat { - if x != nil && x.JsonFormat != nil { - return *x.JsonFormat - } - return FeatureSet_JSON_FORMAT_UNKNOWN -} - -// A compiled specification for the defaults of a set of features. These -// messages are generated from FeatureSet extensions and can be used to seed -// feature resolution. The resolution with this object becomes a simple search -// for the closest matching edition, followed by proto merges. -type FeatureSetDefaults struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"` - // The minimum supported edition (inclusive) when this was constructed. - // Editions before this will not have defaults. - MinimumEdition *Edition `protobuf:"varint,4,opt,name=minimum_edition,json=minimumEdition,enum=google.protobuf.Edition" json:"minimum_edition,omitempty"` - // The maximum known edition (inclusive) when this was constructed. Editions - // after this will not have reliable defaults. - MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"` -} - -func (x *FeatureSetDefaults) Reset() { - *x = FeatureSetDefaults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeatureSetDefaults) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeatureSetDefaults) ProtoMessage() {} - -func (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FeatureSetDefaults.ProtoReflect.Descriptor instead. -func (*FeatureSetDefaults) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20} -} - -func (x *FeatureSetDefaults) GetDefaults() []*FeatureSetDefaults_FeatureSetEditionDefault { - if x != nil { - return x.Defaults - } - return nil -} - -func (x *FeatureSetDefaults) GetMinimumEdition() Edition { - if x != nil && x.MinimumEdition != nil { - return *x.MinimumEdition - } - return Edition_EDITION_UNKNOWN -} - -func (x *FeatureSetDefaults) GetMaximumEdition() Edition { - if x != nil && x.MaximumEdition != nil { - return *x.MaximumEdition - } - return Edition_EDITION_UNKNOWN -} - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -type SourceCodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // - // message Foo { - // optional string foo = 1; - // } - // - // Let's look at just the field definition: - // - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // - // We have the following locations: - // - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendant. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` -} - -func (x *SourceCodeInfo) Reset() { - *x = SourceCodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SourceCodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceCodeInfo) ProtoMessage() {} - -func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceCodeInfo.ProtoReflect.Descriptor instead. -func (*SourceCodeInfo) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21} -} - -func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { - if x != nil { - return x.Location - } - return nil -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -type GeneratedCodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` -} - -func (x *GeneratedCodeInfo) Reset() { - *x = GeneratedCodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GeneratedCodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GeneratedCodeInfo) ProtoMessage() {} - -func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GeneratedCodeInfo.ProtoReflect.Descriptor instead. -func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22} -} - -func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { - if x != nil { - return x.Annotation - } - return nil -} - -type DescriptorProto_ExtensionRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. - Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` -} - -func (x *DescriptorProto_ExtensionRange) Reset() { - *x = DescriptorProto_ExtensionRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DescriptorProto_ExtensionRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DescriptorProto_ExtensionRange) ProtoMessage() {} - -func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DescriptorProto_ExtensionRange.ProtoReflect.Descriptor instead. -func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *DescriptorProto_ExtensionRange) GetStart() int32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *DescriptorProto_ExtensionRange) GetEnd() int32 { - if x != nil && x.End != nil { - return *x.End - } - return 0 -} - -func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { - if x != nil { - return x.Options - } - return nil -} - -// Range of reserved tag numbers. Reserved tag numbers may not be used by -// fields or extension ranges in the same message. Reserved ranges may -// not overlap. -type DescriptorProto_ReservedRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. -} - -func (x *DescriptorProto_ReservedRange) Reset() { - *x = DescriptorProto_ReservedRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DescriptorProto_ReservedRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DescriptorProto_ReservedRange) ProtoMessage() {} - -func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Descriptor instead. -func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1} -} - -func (x *DescriptorProto_ReservedRange) GetStart() int32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *DescriptorProto_ReservedRange) GetEnd() int32 { - if x != nil && x.End != nil { - return *x.End - } - return 0 -} - -type ExtensionRangeOptions_Declaration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The extension number declared within the extension range. - Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` - // The fully-qualified name of the extension field. There must be a leading - // dot in front of the full name. - FullName *string `protobuf:"bytes,2,opt,name=full_name,json=fullName" json:"full_name,omitempty"` - // The fully-qualified type name of the extension field. Unlike - // Metadata.type, Declaration.type must have a leading dot for messages - // and enums. - Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"` - // If true, indicates that the number is reserved in the extension range, - // and any extension field with the number will fail to compile. Set this - // when a declared extension field is deleted. - Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"` - // If true, indicates that the extension must be defined as repeated. - // Otherwise the extension must be defined as optional. - Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` -} - -func (x *ExtensionRangeOptions_Declaration) Reset() { - *x = ExtensionRangeOptions_Declaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionRangeOptions_Declaration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionRangeOptions_Declaration) ProtoMessage() {} - -func (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionRangeOptions_Declaration.ProtoReflect.Descriptor instead. -func (*ExtensionRangeOptions_Declaration) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ExtensionRangeOptions_Declaration) GetNumber() int32 { - if x != nil && x.Number != nil { - return *x.Number - } - return 0 -} - -func (x *ExtensionRangeOptions_Declaration) GetFullName() string { - if x != nil && x.FullName != nil { - return *x.FullName - } - return "" -} - -func (x *ExtensionRangeOptions_Declaration) GetType() string { - if x != nil && x.Type != nil { - return *x.Type - } - return "" -} - -func (x *ExtensionRangeOptions_Declaration) GetReserved() bool { - if x != nil && x.Reserved != nil { - return *x.Reserved - } - return false -} - -func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool { - if x != nil && x.Repeated != nil { - return *x.Repeated - } - return false -} - -// Range of reserved numeric values. Reserved values may not be used by -// entries in the same enum. Reserved ranges may not overlap. -// -// Note that this is distinct from DescriptorProto.ReservedRange in that it -// is inclusive such that it can appropriately represent the entire int32 -// domain. -type EnumDescriptorProto_EnumReservedRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. -} - -func (x *EnumDescriptorProto_EnumReservedRange) Reset() { - *x = EnumDescriptorProto_EnumReservedRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumDescriptorProto_EnumReservedRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} - -func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumDescriptorProto_EnumReservedRange.ProtoReflect.Descriptor instead. -func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { - if x != nil && x.End != nil { - return *x.End - } - return 0 -} - -type FieldOptions_EditionDefault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. -} - -func (x *FieldOptions_EditionDefault) Reset() { - *x = FieldOptions_EditionDefault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldOptions_EditionDefault) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldOptions_EditionDefault) ProtoMessage() {} - -func (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldOptions_EditionDefault.ProtoReflect.Descriptor instead. -func (*FieldOptions_EditionDefault) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0} -} - -func (x *FieldOptions_EditionDefault) GetEdition() Edition { - if x != nil && x.Edition != nil { - return *x.Edition - } - return Edition_EDITION_UNKNOWN -} - -func (x *FieldOptions_EditionDefault) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -// The name of the uninterpreted option. Each string represents a segment in -// a dot-separated name. is_extension is true iff a segment represents an -// extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents -// "foo.(bar.baz).moo". -type UninterpretedOption_NamePart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` -} - -func (x *UninterpretedOption_NamePart) Reset() { - *x = UninterpretedOption_NamePart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UninterpretedOption_NamePart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UninterpretedOption_NamePart) ProtoMessage() {} - -func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UninterpretedOption_NamePart.ProtoReflect.Descriptor instead. -func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18, 0} -} - -func (x *UninterpretedOption_NamePart) GetNamePart() string { - if x != nil && x.NamePart != nil { - return *x.NamePart - } - return "" -} - -func (x *UninterpretedOption_NamePart) GetIsExtension() bool { - if x != nil && x.IsExtension != nil { - return *x.IsExtension - } - return false -} - -// A map from every known edition with a unique set of defaults to its -// defaults. Not all editions may be contained here. For a given edition, -// the defaults at the closest matching edition ordered at or before it should -// be used. This field must be in strict ascending order by edition. -type FeatureSetDefaults_FeatureSetEditionDefault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` -} - -func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { - *x = FeatureSetDefaults_FeatureSetEditionDefault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {} - -func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FeatureSetDefaults_FeatureSetEditionDefault.ProtoReflect.Descriptor instead. -func (*FeatureSetDefaults_FeatureSetEditionDefault) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0} -} - -func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition { - if x != nil && x.Edition != nil { - return *x.Edition - } - return Edition_EDITION_UNKNOWN -} - -func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFeatures() *FeatureSet { - if x != nil { - return x.Features - } - return nil -} - -type SourceCodeInfo_Location struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition occurs. - // For example, this path: - // - // [ 4, 3, 2, 7, 1 ] - // - // refers to: - // - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // - // This is because FileDescriptorProto.message_type has field number 4: - // - // repeated DescriptorProto message_type = 4; - // - // and DescriptorProto.field has field number 2: - // - // repeated FieldDescriptorProto field = 2; - // - // and FieldDescriptorProto.name has field number 1: - // - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // - // [ 4, 3, 2, 7 ] - // - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to moo. - // // - // // Another line attached to moo. - // optional double moo = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to moo or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` - TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` - LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` -} - -func (x *SourceCodeInfo_Location) Reset() { - *x = SourceCodeInfo_Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SourceCodeInfo_Location) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceCodeInfo_Location) ProtoMessage() {} - -func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Descriptor instead. -func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21, 0} -} - -func (x *SourceCodeInfo_Location) GetPath() []int32 { - if x != nil { - return x.Path - } - return nil -} - -func (x *SourceCodeInfo_Location) GetSpan() []int32 { - if x != nil { - return x.Span - } - return nil -} - -func (x *SourceCodeInfo_Location) GetLeadingComments() string { - if x != nil && x.LeadingComments != nil { - return *x.LeadingComments - } - return "" -} - -func (x *SourceCodeInfo_Location) GetTrailingComments() string { - if x != nil && x.TrailingComments != nil { - return *x.TrailingComments - } - return "" -} - -func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { - if x != nil { - return x.LeadingDetachedComments - } - return nil -} - -type GeneratedCodeInfo_Annotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` - // Identifies the filesystem path to the original source .proto. - SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` - // Identifies the ending offset in bytes in the generated code that - // relates to the identified object. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` -} - -func (x *GeneratedCodeInfo_Annotation) Reset() { - *x = GeneratedCodeInfo_Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GeneratedCodeInfo_Annotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} - -func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead. -func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0} -} - -func (x *GeneratedCodeInfo_Annotation) GetPath() []int32 { - if x != nil { - return x.Path - } - return nil -} - -func (x *GeneratedCodeInfo_Annotation) GetSourceFile() string { - if x != nil && x.SourceFile != nil { - return *x.SourceFile - } - return "" -} - -func (x *GeneratedCodeInfo_Annotation) GetBegin() int32 { - if x != nil && x.Begin != nil { - return *x.Begin - } - return 0 -} - -func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 { - if x != nil && x.End != nil { - return *x.End - } - return 0 -} - -func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotation_Semantic { - if x != nil && x.Semantic != nil { - return *x.Semantic - } - return GeneratedCodeInfo_Annotation_NONE -} - -var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor - -var file_google_protobuf_descriptor_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, - 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, - 0x77, 0x65, 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, - 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, - 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, - 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, - 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, - 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, - 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xc7, 0x04, 0x0a, 0x15, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, - 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, - 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x68, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x52, 0x0c, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, 0x01, 0x0a, 0x0b, - 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x4e, 0x56, 0x45, - 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, - 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, - 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, - 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, - 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, - 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, - 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, - 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, - 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, - 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, - 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, - 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, - 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, - 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, - 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, - 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a, - 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, - 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0xca, - 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61, - 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61, - 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53, - 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, - 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, - 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, - 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, - 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, - 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, - 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, - 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, - 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, - 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, - 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, 0x0a, 0x0e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, - 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, - 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, - 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, - 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, - 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, - 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, - 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, - 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, - 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, - 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, - 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, - 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, - 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, - 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, - 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, - 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, - 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, - 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, - 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, - 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, - 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2f, 0x0a, - 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, - 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, - 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, - 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, - 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, - 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, - 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, - 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, - 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, - 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, - 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, - 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, - 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, - 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, - 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, - 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, - 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, - 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, - 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, - 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, - 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, - 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, - 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, - 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, - 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, - 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, - 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, - 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, - 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, - 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, - 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, - 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfc, 0x09, 0x0a, 0x0a, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x39, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, - 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, - 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, - 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, 0x12, 0x06, - 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4f, 0x50, - 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, - 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, - 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, 0x15, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, - 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, 0x07, - 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0x52, 0x0e, - 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, - 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, - 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, - 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, - 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, - 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, - 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, - 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x02, 0x12, - 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, - 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, 0x56, 0x0a, - 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, - 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, - 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, 0x38, 0x5f, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, - 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x02, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, - 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, - 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, - 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, - 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, - 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, - 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9, - 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, - 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, - 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, - 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, - 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, - 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, - 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, - 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, - 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, - 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xea, 0x01, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, - 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, - 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, - 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, - 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, - 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, - 0x10, 0x9f, 0x8d, 0x06, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, - 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, - 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, -} - -var ( - file_google_protobuf_descriptor_proto_rawDescOnce sync.Once - file_google_protobuf_descriptor_proto_rawDescData = file_google_protobuf_descriptor_proto_rawDesc -) - -func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { - file_google_protobuf_descriptor_proto_rawDescOnce.Do(func() { - file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_descriptor_proto_rawDescData) - }) - return file_google_protobuf_descriptor_proto_rawDescData -} - -var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) -var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 32) -var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ - (Edition)(0), // 0: google.protobuf.Edition - (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState - (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type - (FieldDescriptorProto_Label)(0), // 3: google.protobuf.FieldDescriptorProto.Label - (FileOptions_OptimizeMode)(0), // 4: google.protobuf.FileOptions.OptimizeMode - (FieldOptions_CType)(0), // 5: google.protobuf.FieldOptions.CType - (FieldOptions_JSType)(0), // 6: google.protobuf.FieldOptions.JSType - (FieldOptions_OptionRetention)(0), // 7: google.protobuf.FieldOptions.OptionRetention - (FieldOptions_OptionTargetType)(0), // 8: google.protobuf.FieldOptions.OptionTargetType - (MethodOptions_IdempotencyLevel)(0), // 9: google.protobuf.MethodOptions.IdempotencyLevel - (FeatureSet_FieldPresence)(0), // 10: google.protobuf.FeatureSet.FieldPresence - (FeatureSet_EnumType)(0), // 11: google.protobuf.FeatureSet.EnumType - (FeatureSet_RepeatedFieldEncoding)(0), // 12: google.protobuf.FeatureSet.RepeatedFieldEncoding - (FeatureSet_Utf8Validation)(0), // 13: google.protobuf.FeatureSet.Utf8Validation - (FeatureSet_MessageEncoding)(0), // 14: google.protobuf.FeatureSet.MessageEncoding - (FeatureSet_JsonFormat)(0), // 15: google.protobuf.FeatureSet.JsonFormat - (GeneratedCodeInfo_Annotation_Semantic)(0), // 16: google.protobuf.GeneratedCodeInfo.Annotation.Semantic - (*FileDescriptorSet)(nil), // 17: google.protobuf.FileDescriptorSet - (*FileDescriptorProto)(nil), // 18: google.protobuf.FileDescriptorProto - (*DescriptorProto)(nil), // 19: google.protobuf.DescriptorProto - (*ExtensionRangeOptions)(nil), // 20: google.protobuf.ExtensionRangeOptions - (*FieldDescriptorProto)(nil), // 21: google.protobuf.FieldDescriptorProto - (*OneofDescriptorProto)(nil), // 22: google.protobuf.OneofDescriptorProto - (*EnumDescriptorProto)(nil), // 23: google.protobuf.EnumDescriptorProto - (*EnumValueDescriptorProto)(nil), // 24: google.protobuf.EnumValueDescriptorProto - (*ServiceDescriptorProto)(nil), // 25: google.protobuf.ServiceDescriptorProto - (*MethodDescriptorProto)(nil), // 26: google.protobuf.MethodDescriptorProto - (*FileOptions)(nil), // 27: google.protobuf.FileOptions - (*MessageOptions)(nil), // 28: google.protobuf.MessageOptions - (*FieldOptions)(nil), // 29: google.protobuf.FieldOptions - (*OneofOptions)(nil), // 30: google.protobuf.OneofOptions - (*EnumOptions)(nil), // 31: google.protobuf.EnumOptions - (*EnumValueOptions)(nil), // 32: google.protobuf.EnumValueOptions - (*ServiceOptions)(nil), // 33: google.protobuf.ServiceOptions - (*MethodOptions)(nil), // 34: google.protobuf.MethodOptions - (*UninterpretedOption)(nil), // 35: google.protobuf.UninterpretedOption - (*FeatureSet)(nil), // 36: google.protobuf.FeatureSet - (*FeatureSetDefaults)(nil), // 37: google.protobuf.FeatureSetDefaults - (*SourceCodeInfo)(nil), // 38: google.protobuf.SourceCodeInfo - (*GeneratedCodeInfo)(nil), // 39: google.protobuf.GeneratedCodeInfo - (*DescriptorProto_ExtensionRange)(nil), // 40: google.protobuf.DescriptorProto.ExtensionRange - (*DescriptorProto_ReservedRange)(nil), // 41: google.protobuf.DescriptorProto.ReservedRange - (*ExtensionRangeOptions_Declaration)(nil), // 42: google.protobuf.ExtensionRangeOptions.Declaration - (*EnumDescriptorProto_EnumReservedRange)(nil), // 43: google.protobuf.EnumDescriptorProto.EnumReservedRange - (*FieldOptions_EditionDefault)(nil), // 44: google.protobuf.FieldOptions.EditionDefault - (*UninterpretedOption_NamePart)(nil), // 45: google.protobuf.UninterpretedOption.NamePart - (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 46: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - (*SourceCodeInfo_Location)(nil), // 47: google.protobuf.SourceCodeInfo.Location - (*GeneratedCodeInfo_Annotation)(nil), // 48: google.protobuf.GeneratedCodeInfo.Annotation -} -var file_google_protobuf_descriptor_proto_depIdxs = []int32{ - 18, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto - 19, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto - 23, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto - 25, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto - 21, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto - 27, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions - 38, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo - 0, // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition - 21, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto - 21, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto - 19, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto - 23, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto - 40, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange - 22, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto - 28, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions - 41, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange - 35, // 16: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 42, // 17: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration - 36, // 18: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet - 1, // 19: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState - 3, // 20: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label - 2, // 21: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type - 29, // 22: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions - 30, // 23: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions - 24, // 24: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto - 31, // 25: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions - 43, // 26: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange - 32, // 27: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions - 26, // 28: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto - 33, // 29: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions - 34, // 30: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions - 4, // 31: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode - 36, // 32: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 33: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 34: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 35: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 5, // 36: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType - 6, // 37: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType - 7, // 38: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention - 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType - 44, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault - 36, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 42: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 43: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 44: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 45: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 46: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 47: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 48: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 49: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 50: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 9, // 51: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel - 36, // 52: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 53: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 45, // 54: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart - 10, // 55: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence - 11, // 56: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType - 12, // 57: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding - 13, // 58: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation - 14, // 59: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding - 15, // 60: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat - 46, // 61: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - 0, // 62: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition - 0, // 63: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition - 47, // 64: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location - 48, // 65: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation - 20, // 66: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions - 0, // 67: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition - 0, // 68: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition - 36, // 69: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features:type_name -> google.protobuf.FeatureSet - 16, // 70: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic - 71, // [71:71] is the sub-list for method output_type - 71, // [71:71] is the sub-list for method input_type - 71, // [71:71] is the sub-list for extension type_name - 71, // [71:71] is the sub-list for extension extendee - 0, // [0:71] is the sub-list for field type_name -} - -func init() { file_google_protobuf_descriptor_proto_init() } -func file_google_protobuf_descriptor_proto_init() { - if File_google_protobuf_descriptor_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileDescriptorSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionRangeOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OneofDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumValueDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OneofOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumValueOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UninterpretedOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeatureSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeatureSetDefaults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceCodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GeneratedCodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DescriptorProto_ExtensionRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DescriptorProto_ReservedRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionRangeOptions_Declaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldOptions_EditionDefault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UninterpretedOption_NamePart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceCodeInfo_Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GeneratedCodeInfo_Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, - NumEnums: 17, - NumMessages: 32, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_protobuf_descriptor_proto_goTypes, - DependencyIndexes: file_google_protobuf_descriptor_proto_depIdxs, - EnumInfos: file_google_protobuf_descriptor_proto_enumTypes, - MessageInfos: file_google_protobuf_descriptor_proto_msgTypes, - }.Build() - File_google_protobuf_descriptor_proto = out.File - file_google_protobuf_descriptor_proto_rawDesc = nil - file_google_protobuf_descriptor_proto_goTypes = nil - file_google_protobuf_descriptor_proto_depIdxs = nil -} diff --git a/vendor/gopkg.in/yaml.v3/LICENSE b/vendor/gopkg.in/yaml.v3/LICENSE deleted file mode 100644 index 2683e4bb..00000000 --- a/vendor/gopkg.in/yaml.v3/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ - -This project is covered by two different licenses: MIT and Apache. - -#### MIT License #### - -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original MIT license, with the additional -copyright staring in 2011 when the project was ported over: - - apic.go emitterc.go parserc.go readerc.go scannerc.go - writerc.go yamlh.go yamlprivateh.go - -Copyright (c) 2006-2010 Kirill Simonov -Copyright (c) 2006-2011 Kirill Simonov - -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. - -### Apache License ### - -All the remaining project files are covered by the Apache license: - -Copyright (c) 2011-2019 Canonical Ltd - -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/gopkg.in/yaml.v3/NOTICE b/vendor/gopkg.in/yaml.v3/NOTICE deleted file mode 100644 index 866d74a7..00000000 --- a/vendor/gopkg.in/yaml.v3/NOTICE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2011-2016 Canonical Ltd. - -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/gopkg.in/yaml.v3/README.md b/vendor/gopkg.in/yaml.v3/README.md deleted file mode 100644 index 08eb1bab..00000000 --- a/vendor/gopkg.in/yaml.v3/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# YAML support for the Go language - -Introduction ------------- - -The yaml package enables Go programs to comfortably encode and decode YAML -values. It was developed within [Canonical](https://www.canonical.com) as -part of the [juju](https://juju.ubuntu.com) project, and is based on a -pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) -C library to parse and generate YAML data quickly and reliably. - -Compatibility -------------- - -The yaml package supports most of YAML 1.2, but preserves some behavior -from 1.1 for backwards compatibility. - -Specifically, as of v3 of the yaml package: - - - YAML 1.1 bools (_yes/no, on/off_) are supported as long as they are being - decoded into a typed bool value. Otherwise they behave as a string. Booleans - in YAML 1.2 are _true/false_ only. - - Octals encode and decode as _0777_ per YAML 1.1, rather than _0o777_ - as specified in YAML 1.2, because most parsers still use the old format. - Octals in the _0o777_ format are supported though, so new files work. - - Does not support base-60 floats. These are gone from YAML 1.2, and were - actually never supported by this package as it's clearly a poor choice. - -and offers backwards -compatibility with YAML 1.1 in some cases. -1.2, including support for -anchors, tags, map merging, etc. Multi-document unmarshalling is not yet -implemented, and base-60 floats from YAML 1.1 are purposefully not -supported since they're a poor design and are gone in YAML 1.2. - -Installation and usage ----------------------- - -The import path for the package is *gopkg.in/yaml.v3*. - -To install it, run: - - go get gopkg.in/yaml.v3 - -API documentation ------------------ - -If opened in a browser, the import path itself leads to the API documentation: - - - [https://gopkg.in/yaml.v3](https://gopkg.in/yaml.v3) - -API stability -------------- - -The package API for yaml v3 will remain stable as described in [gopkg.in](https://gopkg.in). - - -License -------- - -The yaml package is licensed under the MIT and Apache License 2.0 licenses. -Please see the LICENSE file for details. - - -Example -------- - -```Go -package main - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v3" -) - -var data = ` -a: Easy! -b: - c: 2 - d: [3, 4] -` - -// Note: struct fields must be public in order for unmarshal to -// correctly populate the data. -type T struct { - A string - B struct { - RenamedC int `yaml:"c"` - D []int `yaml:",flow"` - } -} - -func main() { - t := T{} - - err := yaml.Unmarshal([]byte(data), &t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t:\n%v\n\n", t) - - d, err := yaml.Marshal(&t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t dump:\n%s\n\n", string(d)) - - m := make(map[interface{}]interface{}) - - err = yaml.Unmarshal([]byte(data), &m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m:\n%v\n\n", m) - - d, err = yaml.Marshal(&m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m dump:\n%s\n\n", string(d)) -} -``` - -This example will generate the following output: - -``` ---- t: -{Easy! {2 [3 4]}} - ---- t dump: -a: Easy! -b: - c: 2 - d: [3, 4] - - ---- m: -map[a:Easy! b:map[c:2 d:[3 4]]] - ---- m dump: -a: Easy! -b: - c: 2 - d: - - 3 - - 4 -``` - diff --git a/vendor/gopkg.in/yaml.v3/apic.go b/vendor/gopkg.in/yaml.v3/apic.go deleted file mode 100644 index ae7d049f..00000000 --- a/vendor/gopkg.in/yaml.v3/apic.go +++ /dev/null @@ -1,747 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -import ( - "io" -) - -func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { - //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) - - // Check if we can move the queue at the beginning of the buffer. - if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { - if parser.tokens_head != len(parser.tokens) { - copy(parser.tokens, parser.tokens[parser.tokens_head:]) - } - parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] - parser.tokens_head = 0 - } - parser.tokens = append(parser.tokens, *token) - if pos < 0 { - return - } - copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) - parser.tokens[parser.tokens_head+pos] = *token -} - -// Create a new parser object. -func yaml_parser_initialize(parser *yaml_parser_t) bool { - *parser = yaml_parser_t{ - raw_buffer: make([]byte, 0, input_raw_buffer_size), - buffer: make([]byte, 0, input_buffer_size), - } - return true -} - -// Destroy a parser object. -func yaml_parser_delete(parser *yaml_parser_t) { - *parser = yaml_parser_t{} -} - -// String read handler. -func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - if parser.input_pos == len(parser.input) { - return 0, io.EOF - } - n = copy(buffer, parser.input[parser.input_pos:]) - parser.input_pos += n - return n, nil -} - -// Reader read handler. -func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - return parser.input_reader.Read(buffer) -} - -// Set a string input. -func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_string_read_handler - parser.input = input - parser.input_pos = 0 -} - -// Set a file input. -func yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_reader_read_handler - parser.input_reader = r -} - -// Set the source encoding. -func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { - if parser.encoding != yaml_ANY_ENCODING { - panic("must set the encoding only once") - } - parser.encoding = encoding -} - -// Create a new emitter object. -func yaml_emitter_initialize(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{ - buffer: make([]byte, output_buffer_size), - raw_buffer: make([]byte, 0, output_raw_buffer_size), - states: make([]yaml_emitter_state_t, 0, initial_stack_size), - events: make([]yaml_event_t, 0, initial_queue_size), - best_width: -1, - } -} - -// Destroy an emitter object. -func yaml_emitter_delete(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{} -} - -// String write handler. -func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - *emitter.output_buffer = append(*emitter.output_buffer, buffer...) - return nil -} - -// yaml_writer_write_handler uses emitter.output_writer to write the -// emitted text. -func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - _, err := emitter.output_writer.Write(buffer) - return err -} - -// Set a string output. -func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_string_write_handler - emitter.output_buffer = output_buffer -} - -// Set a file output. -func yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_writer_write_handler - emitter.output_writer = w -} - -// Set the output encoding. -func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { - if emitter.encoding != yaml_ANY_ENCODING { - panic("must set the output encoding only once") - } - emitter.encoding = encoding -} - -// Set the canonical output style. -func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { - emitter.canonical = canonical -} - -// Set the indentation increment. -func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { - if indent < 2 || indent > 9 { - indent = 2 - } - emitter.best_indent = indent -} - -// Set the preferred line width. -func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { - if width < 0 { - width = -1 - } - emitter.best_width = width -} - -// Set if unescaped non-ASCII characters are allowed. -func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { - emitter.unicode = unicode -} - -// Set the preferred line break character. -func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { - emitter.line_break = line_break -} - -///* -// * Destroy a token object. -// */ -// -//YAML_DECLARE(void) -//yaml_token_delete(yaml_token_t *token) -//{ -// assert(token); // Non-NULL token object expected. -// -// switch (token.type) -// { -// case YAML_TAG_DIRECTIVE_TOKEN: -// yaml_free(token.data.tag_directive.handle); -// yaml_free(token.data.tag_directive.prefix); -// break; -// -// case YAML_ALIAS_TOKEN: -// yaml_free(token.data.alias.value); -// break; -// -// case YAML_ANCHOR_TOKEN: -// yaml_free(token.data.anchor.value); -// break; -// -// case YAML_TAG_TOKEN: -// yaml_free(token.data.tag.handle); -// yaml_free(token.data.tag.suffix); -// break; -// -// case YAML_SCALAR_TOKEN: -// yaml_free(token.data.scalar.value); -// break; -// -// default: -// break; -// } -// -// memset(token, 0, sizeof(yaml_token_t)); -//} -// -///* -// * Check if a string is a valid UTF-8 sequence. -// * -// * Check 'reader.c' for more details on UTF-8 encoding. -// */ -// -//static int -//yaml_check_utf8(yaml_char_t *start, size_t length) -//{ -// yaml_char_t *end = start+length; -// yaml_char_t *pointer = start; -// -// while (pointer < end) { -// unsigned char octet; -// unsigned int width; -// unsigned int value; -// size_t k; -// -// octet = pointer[0]; -// width = (octet & 0x80) == 0x00 ? 1 : -// (octet & 0xE0) == 0xC0 ? 2 : -// (octet & 0xF0) == 0xE0 ? 3 : -// (octet & 0xF8) == 0xF0 ? 4 : 0; -// value = (octet & 0x80) == 0x00 ? octet & 0x7F : -// (octet & 0xE0) == 0xC0 ? octet & 0x1F : -// (octet & 0xF0) == 0xE0 ? octet & 0x0F : -// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; -// if (!width) return 0; -// if (pointer+width > end) return 0; -// for (k = 1; k < width; k ++) { -// octet = pointer[k]; -// if ((octet & 0xC0) != 0x80) return 0; -// value = (value << 6) + (octet & 0x3F); -// } -// if (!((width == 1) || -// (width == 2 && value >= 0x80) || -// (width == 3 && value >= 0x800) || -// (width == 4 && value >= 0x10000))) return 0; -// -// pointer += width; -// } -// -// return 1; -//} -// - -// Create STREAM-START. -func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) { - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - encoding: encoding, - } -} - -// Create STREAM-END. -func yaml_stream_end_event_initialize(event *yaml_event_t) { - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - } -} - -// Create DOCUMENT-START. -func yaml_document_start_event_initialize( - event *yaml_event_t, - version_directive *yaml_version_directive_t, - tag_directives []yaml_tag_directive_t, - implicit bool, -) { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: implicit, - } -} - -// Create DOCUMENT-END. -func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - implicit: implicit, - } -} - -// Create ALIAS. -func yaml_alias_event_initialize(event *yaml_event_t, anchor []byte) bool { - *event = yaml_event_t{ - typ: yaml_ALIAS_EVENT, - anchor: anchor, - } - return true -} - -// Create SCALAR. -func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - anchor: anchor, - tag: tag, - value: value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-START. -func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-END. -func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - } - return true -} - -// Create MAPPING-START. -func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) { - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } -} - -// Create MAPPING-END. -func yaml_mapping_end_event_initialize(event *yaml_event_t) { - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - } -} - -// Destroy an event object. -func yaml_event_delete(event *yaml_event_t) { - *event = yaml_event_t{} -} - -///* -// * Create a document object. -// */ -// -//YAML_DECLARE(int) -//yaml_document_initialize(document *yaml_document_t, -// version_directive *yaml_version_directive_t, -// tag_directives_start *yaml_tag_directive_t, -// tag_directives_end *yaml_tag_directive_t, -// start_implicit int, end_implicit int) -//{ -// struct { -// error yaml_error_type_t -// } context -// struct { -// start *yaml_node_t -// end *yaml_node_t -// top *yaml_node_t -// } nodes = { NULL, NULL, NULL } -// version_directive_copy *yaml_version_directive_t = NULL -// struct { -// start *yaml_tag_directive_t -// end *yaml_tag_directive_t -// top *yaml_tag_directive_t -// } tag_directives_copy = { NULL, NULL, NULL } -// value yaml_tag_directive_t = { NULL, NULL } -// mark yaml_mark_t = { 0, 0, 0 } -// -// assert(document) // Non-NULL document object is expected. -// assert((tag_directives_start && tag_directives_end) || -// (tag_directives_start == tag_directives_end)) -// // Valid tag directives are expected. -// -// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error -// -// if (version_directive) { -// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) -// if (!version_directive_copy) goto error -// version_directive_copy.major = version_directive.major -// version_directive_copy.minor = version_directive.minor -// } -// -// if (tag_directives_start != tag_directives_end) { -// tag_directive *yaml_tag_directive_t -// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) -// goto error -// for (tag_directive = tag_directives_start -// tag_directive != tag_directives_end; tag_directive ++) { -// assert(tag_directive.handle) -// assert(tag_directive.prefix) -// if (!yaml_check_utf8(tag_directive.handle, -// strlen((char *)tag_directive.handle))) -// goto error -// if (!yaml_check_utf8(tag_directive.prefix, -// strlen((char *)tag_directive.prefix))) -// goto error -// value.handle = yaml_strdup(tag_directive.handle) -// value.prefix = yaml_strdup(tag_directive.prefix) -// if (!value.handle || !value.prefix) goto error -// if (!PUSH(&context, tag_directives_copy, value)) -// goto error -// value.handle = NULL -// value.prefix = NULL -// } -// } -// -// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, -// tag_directives_copy.start, tag_directives_copy.top, -// start_implicit, end_implicit, mark, mark) -// -// return 1 -// -//error: -// STACK_DEL(&context, nodes) -// yaml_free(version_directive_copy) -// while (!STACK_EMPTY(&context, tag_directives_copy)) { -// value yaml_tag_directive_t = POP(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// } -// STACK_DEL(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// -// return 0 -//} -// -///* -// * Destroy a document object. -// */ -// -//YAML_DECLARE(void) -//yaml_document_delete(document *yaml_document_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// tag_directive *yaml_tag_directive_t -// -// context.error = YAML_NO_ERROR // Eliminate a compiler warning. -// -// assert(document) // Non-NULL document object is expected. -// -// while (!STACK_EMPTY(&context, document.nodes)) { -// node yaml_node_t = POP(&context, document.nodes) -// yaml_free(node.tag) -// switch (node.type) { -// case YAML_SCALAR_NODE: -// yaml_free(node.data.scalar.value) -// break -// case YAML_SEQUENCE_NODE: -// STACK_DEL(&context, node.data.sequence.items) -// break -// case YAML_MAPPING_NODE: -// STACK_DEL(&context, node.data.mapping.pairs) -// break -// default: -// assert(0) // Should not happen. -// } -// } -// STACK_DEL(&context, document.nodes) -// -// yaml_free(document.version_directive) -// for (tag_directive = document.tag_directives.start -// tag_directive != document.tag_directives.end -// tag_directive++) { -// yaml_free(tag_directive.handle) -// yaml_free(tag_directive.prefix) -// } -// yaml_free(document.tag_directives.start) -// -// memset(document, 0, sizeof(yaml_document_t)) -//} -// -///** -// * Get a document node. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_node(document *yaml_document_t, index int) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (index > 0 && document.nodes.start + index <= document.nodes.top) { -// return document.nodes.start + index - 1 -// } -// return NULL -//} -// -///** -// * Get the root object. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_root_node(document *yaml_document_t) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (document.nodes.top != document.nodes.start) { -// return document.nodes.start -// } -// return NULL -//} -// -///* -// * Add a scalar node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_scalar(document *yaml_document_t, -// tag *yaml_char_t, value *yaml_char_t, length int, -// style yaml_scalar_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// value_copy *yaml_char_t = NULL -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// assert(value) // Non-NULL value is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (length < 0) { -// length = strlen((char *)value) -// } -// -// if (!yaml_check_utf8(value, length)) goto error -// value_copy = yaml_malloc(length+1) -// if (!value_copy) goto error -// memcpy(value_copy, value, length) -// value_copy[length] = '\0' -// -// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// yaml_free(tag_copy) -// yaml_free(value_copy) -// -// return 0 -//} -// -///* -// * Add a sequence node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_sequence(document *yaml_document_t, -// tag *yaml_char_t, style yaml_sequence_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_item_t -// end *yaml_node_item_t -// top *yaml_node_item_t -// } items = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error -// -// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, items) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Add a mapping node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_mapping(document *yaml_document_t, -// tag *yaml_char_t, style yaml_mapping_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_pair_t -// end *yaml_node_pair_t -// top *yaml_node_pair_t -// } pairs = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error -// -// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, pairs) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Append an item to a sequence node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_sequence_item(document *yaml_document_t, -// sequence int, item int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// assert(document) // Non-NULL document is required. -// assert(sequence > 0 -// && document.nodes.start + sequence <= document.nodes.top) -// // Valid sequence id is required. -// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) -// // A sequence node is required. -// assert(item > 0 && document.nodes.start + item <= document.nodes.top) -// // Valid item id is required. -// -// if (!PUSH(&context, -// document.nodes.start[sequence-1].data.sequence.items, item)) -// return 0 -// -// return 1 -//} -// -///* -// * Append a pair of a key and a value to a mapping node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_mapping_pair(document *yaml_document_t, -// mapping int, key int, value int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// pair yaml_node_pair_t -// -// assert(document) // Non-NULL document is required. -// assert(mapping > 0 -// && document.nodes.start + mapping <= document.nodes.top) -// // Valid mapping id is required. -// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) -// // A mapping node is required. -// assert(key > 0 && document.nodes.start + key <= document.nodes.top) -// // Valid key id is required. -// assert(value > 0 && document.nodes.start + value <= document.nodes.top) -// // Valid value id is required. -// -// pair.key = key -// pair.value = value -// -// if (!PUSH(&context, -// document.nodes.start[mapping-1].data.mapping.pairs, pair)) -// return 0 -// -// return 1 -//} -// -// diff --git a/vendor/gopkg.in/yaml.v3/decode.go b/vendor/gopkg.in/yaml.v3/decode.go deleted file mode 100644 index 0173b698..00000000 --- a/vendor/gopkg.in/yaml.v3/decode.go +++ /dev/null @@ -1,1000 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// -// 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 yaml - -import ( - "encoding" - "encoding/base64" - "fmt" - "io" - "math" - "reflect" - "strconv" - "time" -) - -// ---------------------------------------------------------------------------- -// Parser, produces a node tree out of a libyaml event stream. - -type parser struct { - parser yaml_parser_t - event yaml_event_t - doc *Node - anchors map[string]*Node - doneInit bool - textless bool -} - -func newParser(b []byte) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - if len(b) == 0 { - b = []byte{'\n'} - } - yaml_parser_set_input_string(&p.parser, b) - return &p -} - -func newParserFromReader(r io.Reader) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - yaml_parser_set_input_reader(&p.parser, r) - return &p -} - -func (p *parser) init() { - if p.doneInit { - return - } - p.anchors = make(map[string]*Node) - p.expect(yaml_STREAM_START_EVENT) - p.doneInit = true -} - -func (p *parser) destroy() { - if p.event.typ != yaml_NO_EVENT { - yaml_event_delete(&p.event) - } - yaml_parser_delete(&p.parser) -} - -// expect consumes an event from the event stream and -// checks that it's of the expected type. -func (p *parser) expect(e yaml_event_type_t) { - if p.event.typ == yaml_NO_EVENT { - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } - } - if p.event.typ == yaml_STREAM_END_EVENT { - failf("attempted to go past the end of stream; corrupted value?") - } - if p.event.typ != e { - p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) - p.fail() - } - yaml_event_delete(&p.event) - p.event.typ = yaml_NO_EVENT -} - -// peek peeks at the next event in the event stream, -// puts the results into p.event and returns the event type. -func (p *parser) peek() yaml_event_type_t { - if p.event.typ != yaml_NO_EVENT { - return p.event.typ - } - // It's curious choice from the underlying API to generally return a - // positive result on success, but on this case return true in an error - // scenario. This was the source of bugs in the past (issue #666). - if !yaml_parser_parse(&p.parser, &p.event) || p.parser.error != yaml_NO_ERROR { - p.fail() - } - return p.event.typ -} - -func (p *parser) fail() { - var where string - var line int - if p.parser.context_mark.line != 0 { - line = p.parser.context_mark.line - // Scanner errors don't iterate line before returning error - if p.parser.error == yaml_SCANNER_ERROR { - line++ - } - } else if p.parser.problem_mark.line != 0 { - line = p.parser.problem_mark.line - // Scanner errors don't iterate line before returning error - if p.parser.error == yaml_SCANNER_ERROR { - line++ - } - } - if line != 0 { - where = "line " + strconv.Itoa(line) + ": " - } - var msg string - if len(p.parser.problem) > 0 { - msg = p.parser.problem - } else { - msg = "unknown problem parsing YAML content" - } - failf("%s%s", where, msg) -} - -func (p *parser) anchor(n *Node, anchor []byte) { - if anchor != nil { - n.Anchor = string(anchor) - p.anchors[n.Anchor] = n - } -} - -func (p *parser) parse() *Node { - p.init() - switch p.peek() { - case yaml_SCALAR_EVENT: - return p.scalar() - case yaml_ALIAS_EVENT: - return p.alias() - case yaml_MAPPING_START_EVENT: - return p.mapping() - case yaml_SEQUENCE_START_EVENT: - return p.sequence() - case yaml_DOCUMENT_START_EVENT: - return p.document() - case yaml_STREAM_END_EVENT: - // Happens when attempting to decode an empty buffer. - return nil - case yaml_TAIL_COMMENT_EVENT: - panic("internal error: unexpected tail comment event (please report)") - default: - panic("internal error: attempted to parse unknown event (please report): " + p.event.typ.String()) - } -} - -func (p *parser) node(kind Kind, defaultTag, tag, value string) *Node { - var style Style - if tag != "" && tag != "!" { - tag = shortTag(tag) - style = TaggedStyle - } else if defaultTag != "" { - tag = defaultTag - } else if kind == ScalarNode { - tag, _ = resolve("", value) - } - n := &Node{ - Kind: kind, - Tag: tag, - Value: value, - Style: style, - } - if !p.textless { - n.Line = p.event.start_mark.line + 1 - n.Column = p.event.start_mark.column + 1 - n.HeadComment = string(p.event.head_comment) - n.LineComment = string(p.event.line_comment) - n.FootComment = string(p.event.foot_comment) - } - return n -} - -func (p *parser) parseChild(parent *Node) *Node { - child := p.parse() - parent.Content = append(parent.Content, child) - return child -} - -func (p *parser) document() *Node { - n := p.node(DocumentNode, "", "", "") - p.doc = n - p.expect(yaml_DOCUMENT_START_EVENT) - p.parseChild(n) - if p.peek() == yaml_DOCUMENT_END_EVENT { - n.FootComment = string(p.event.foot_comment) - } - p.expect(yaml_DOCUMENT_END_EVENT) - return n -} - -func (p *parser) alias() *Node { - n := p.node(AliasNode, "", "", string(p.event.anchor)) - n.Alias = p.anchors[n.Value] - if n.Alias == nil { - failf("unknown anchor '%s' referenced", n.Value) - } - p.expect(yaml_ALIAS_EVENT) - return n -} - -func (p *parser) scalar() *Node { - var parsedStyle = p.event.scalar_style() - var nodeStyle Style - switch { - case parsedStyle&yaml_DOUBLE_QUOTED_SCALAR_STYLE != 0: - nodeStyle = DoubleQuotedStyle - case parsedStyle&yaml_SINGLE_QUOTED_SCALAR_STYLE != 0: - nodeStyle = SingleQuotedStyle - case parsedStyle&yaml_LITERAL_SCALAR_STYLE != 0: - nodeStyle = LiteralStyle - case parsedStyle&yaml_FOLDED_SCALAR_STYLE != 0: - nodeStyle = FoldedStyle - } - var nodeValue = string(p.event.value) - var nodeTag = string(p.event.tag) - var defaultTag string - if nodeStyle == 0 { - if nodeValue == "<<" { - defaultTag = mergeTag - } - } else { - defaultTag = strTag - } - n := p.node(ScalarNode, defaultTag, nodeTag, nodeValue) - n.Style |= nodeStyle - p.anchor(n, p.event.anchor) - p.expect(yaml_SCALAR_EVENT) - return n -} - -func (p *parser) sequence() *Node { - n := p.node(SequenceNode, seqTag, string(p.event.tag), "") - if p.event.sequence_style()&yaml_FLOW_SEQUENCE_STYLE != 0 { - n.Style |= FlowStyle - } - p.anchor(n, p.event.anchor) - p.expect(yaml_SEQUENCE_START_EVENT) - for p.peek() != yaml_SEQUENCE_END_EVENT { - p.parseChild(n) - } - n.LineComment = string(p.event.line_comment) - n.FootComment = string(p.event.foot_comment) - p.expect(yaml_SEQUENCE_END_EVENT) - return n -} - -func (p *parser) mapping() *Node { - n := p.node(MappingNode, mapTag, string(p.event.tag), "") - block := true - if p.event.mapping_style()&yaml_FLOW_MAPPING_STYLE != 0 { - block = false - n.Style |= FlowStyle - } - p.anchor(n, p.event.anchor) - p.expect(yaml_MAPPING_START_EVENT) - for p.peek() != yaml_MAPPING_END_EVENT { - k := p.parseChild(n) - if block && k.FootComment != "" { - // Must be a foot comment for the prior value when being dedented. - if len(n.Content) > 2 { - n.Content[len(n.Content)-3].FootComment = k.FootComment - k.FootComment = "" - } - } - v := p.parseChild(n) - if k.FootComment == "" && v.FootComment != "" { - k.FootComment = v.FootComment - v.FootComment = "" - } - if p.peek() == yaml_TAIL_COMMENT_EVENT { - if k.FootComment == "" { - k.FootComment = string(p.event.foot_comment) - } - p.expect(yaml_TAIL_COMMENT_EVENT) - } - } - n.LineComment = string(p.event.line_comment) - n.FootComment = string(p.event.foot_comment) - if n.Style&FlowStyle == 0 && n.FootComment != "" && len(n.Content) > 1 { - n.Content[len(n.Content)-2].FootComment = n.FootComment - n.FootComment = "" - } - p.expect(yaml_MAPPING_END_EVENT) - return n -} - -// ---------------------------------------------------------------------------- -// Decoder, unmarshals a node into a provided value. - -type decoder struct { - doc *Node - aliases map[*Node]bool - terrors []string - - stringMapType reflect.Type - generalMapType reflect.Type - - knownFields bool - uniqueKeys bool - decodeCount int - aliasCount int - aliasDepth int - - mergedFields map[interface{}]bool -} - -var ( - nodeType = reflect.TypeOf(Node{}) - durationType = reflect.TypeOf(time.Duration(0)) - stringMapType = reflect.TypeOf(map[string]interface{}{}) - generalMapType = reflect.TypeOf(map[interface{}]interface{}{}) - ifaceType = generalMapType.Elem() - timeType = reflect.TypeOf(time.Time{}) - ptrTimeType = reflect.TypeOf(&time.Time{}) -) - -func newDecoder() *decoder { - d := &decoder{ - stringMapType: stringMapType, - generalMapType: generalMapType, - uniqueKeys: true, - } - d.aliases = make(map[*Node]bool) - return d -} - -func (d *decoder) terror(n *Node, tag string, out reflect.Value) { - if n.Tag != "" { - tag = n.Tag - } - value := n.Value - if tag != seqTag && tag != mapTag { - if len(value) > 10 { - value = " `" + value[:7] + "...`" - } else { - value = " `" + value + "`" - } - } - d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.Line, shortTag(tag), value, out.Type())) -} - -func (d *decoder) callUnmarshaler(n *Node, u Unmarshaler) (good bool) { - err := u.UnmarshalYAML(n) - if e, ok := err.(*TypeError); ok { - d.terrors = append(d.terrors, e.Errors...) - return false - } - if err != nil { - fail(err) - } - return true -} - -func (d *decoder) callObsoleteUnmarshaler(n *Node, u obsoleteUnmarshaler) (good bool) { - terrlen := len(d.terrors) - err := u.UnmarshalYAML(func(v interface{}) (err error) { - defer handleErr(&err) - d.unmarshal(n, reflect.ValueOf(v)) - if len(d.terrors) > terrlen { - issues := d.terrors[terrlen:] - d.terrors = d.terrors[:terrlen] - return &TypeError{issues} - } - return nil - }) - if e, ok := err.(*TypeError); ok { - d.terrors = append(d.terrors, e.Errors...) - return false - } - if err != nil { - fail(err) - } - return true -} - -// d.prepare initializes and dereferences pointers and calls UnmarshalYAML -// if a value is found to implement it. -// It returns the initialized and dereferenced out value, whether -// unmarshalling was already done by UnmarshalYAML, and if so whether -// its types unmarshalled appropriately. -// -// If n holds a null value, prepare returns before doing anything. -func (d *decoder) prepare(n *Node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { - if n.ShortTag() == nullTag { - return out, false, false - } - again := true - for again { - again = false - if out.Kind() == reflect.Ptr { - if out.IsNil() { - out.Set(reflect.New(out.Type().Elem())) - } - out = out.Elem() - again = true - } - if out.CanAddr() { - outi := out.Addr().Interface() - if u, ok := outi.(Unmarshaler); ok { - good = d.callUnmarshaler(n, u) - return out, true, good - } - if u, ok := outi.(obsoleteUnmarshaler); ok { - good = d.callObsoleteUnmarshaler(n, u) - return out, true, good - } - } - } - return out, false, false -} - -func (d *decoder) fieldByIndex(n *Node, v reflect.Value, index []int) (field reflect.Value) { - if n.ShortTag() == nullTag { - return reflect.Value{} - } - for _, num := range index { - for { - if v.Kind() == reflect.Ptr { - if v.IsNil() { - v.Set(reflect.New(v.Type().Elem())) - } - v = v.Elem() - continue - } - break - } - v = v.Field(num) - } - return v -} - -const ( - // 400,000 decode operations is ~500kb of dense object declarations, or - // ~5kb of dense object declarations with 10000% alias expansion - alias_ratio_range_low = 400000 - - // 4,000,000 decode operations is ~5MB of dense object declarations, or - // ~4.5MB of dense object declarations with 10% alias expansion - alias_ratio_range_high = 4000000 - - // alias_ratio_range is the range over which we scale allowed alias ratios - alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) -) - -func allowedAliasRatio(decodeCount int) float64 { - switch { - case decodeCount <= alias_ratio_range_low: - // allow 99% to come from alias expansion for small-to-medium documents - return 0.99 - case decodeCount >= alias_ratio_range_high: - // allow 10% to come from alias expansion for very large documents - return 0.10 - default: - // scale smoothly from 99% down to 10% over the range. - // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. - // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). - return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) - } -} - -func (d *decoder) unmarshal(n *Node, out reflect.Value) (good bool) { - d.decodeCount++ - if d.aliasDepth > 0 { - d.aliasCount++ - } - if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { - failf("document contains excessive aliasing") - } - if out.Type() == nodeType { - out.Set(reflect.ValueOf(n).Elem()) - return true - } - switch n.Kind { - case DocumentNode: - return d.document(n, out) - case AliasNode: - return d.alias(n, out) - } - out, unmarshaled, good := d.prepare(n, out) - if unmarshaled { - return good - } - switch n.Kind { - case ScalarNode: - good = d.scalar(n, out) - case MappingNode: - good = d.mapping(n, out) - case SequenceNode: - good = d.sequence(n, out) - case 0: - if n.IsZero() { - return d.null(out) - } - fallthrough - default: - failf("cannot decode node with unknown kind %d", n.Kind) - } - return good -} - -func (d *decoder) document(n *Node, out reflect.Value) (good bool) { - if len(n.Content) == 1 { - d.doc = n - d.unmarshal(n.Content[0], out) - return true - } - return false -} - -func (d *decoder) alias(n *Node, out reflect.Value) (good bool) { - if d.aliases[n] { - // TODO this could actually be allowed in some circumstances. - failf("anchor '%s' value contains itself", n.Value) - } - d.aliases[n] = true - d.aliasDepth++ - good = d.unmarshal(n.Alias, out) - d.aliasDepth-- - delete(d.aliases, n) - return good -} - -var zeroValue reflect.Value - -func resetMap(out reflect.Value) { - for _, k := range out.MapKeys() { - out.SetMapIndex(k, zeroValue) - } -} - -func (d *decoder) null(out reflect.Value) bool { - if out.CanAddr() { - switch out.Kind() { - case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: - out.Set(reflect.Zero(out.Type())) - return true - } - } - return false -} - -func (d *decoder) scalar(n *Node, out reflect.Value) bool { - var tag string - var resolved interface{} - if n.indicatedString() { - tag = strTag - resolved = n.Value - } else { - tag, resolved = resolve(n.Tag, n.Value) - if tag == binaryTag { - data, err := base64.StdEncoding.DecodeString(resolved.(string)) - if err != nil { - failf("!!binary value contains invalid base64 data") - } - resolved = string(data) - } - } - if resolved == nil { - return d.null(out) - } - if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { - // We've resolved to exactly the type we want, so use that. - out.Set(resolvedv) - return true - } - // Perhaps we can use the value as a TextUnmarshaler to - // set its value. - if out.CanAddr() { - u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) - if ok { - var text []byte - if tag == binaryTag { - text = []byte(resolved.(string)) - } else { - // We let any value be unmarshaled into TextUnmarshaler. - // That might be more lax than we'd like, but the - // TextUnmarshaler itself should bowl out any dubious values. - text = []byte(n.Value) - } - err := u.UnmarshalText(text) - if err != nil { - fail(err) - } - return true - } - } - switch out.Kind() { - case reflect.String: - if tag == binaryTag { - out.SetString(resolved.(string)) - return true - } - out.SetString(n.Value) - return true - case reflect.Interface: - out.Set(reflect.ValueOf(resolved)) - return true - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - // This used to work in v2, but it's very unfriendly. - isDuration := out.Type() == durationType - - switch resolved := resolved.(type) { - case int: - if !isDuration && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case int64: - if !isDuration && !out.OverflowInt(resolved) { - out.SetInt(resolved) - return true - } - case uint64: - if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case float64: - if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case string: - if out.Type() == durationType { - d, err := time.ParseDuration(resolved) - if err == nil { - out.SetInt(int64(d)) - return true - } - } - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch resolved := resolved.(type) { - case int: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case int64: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case uint64: - if !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case float64: - if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - } - case reflect.Bool: - switch resolved := resolved.(type) { - case bool: - out.SetBool(resolved) - return true - case string: - // This offers some compatibility with the 1.1 spec (https://yaml.org/type/bool.html). - // It only works if explicitly attempting to unmarshal into a typed bool value. - switch resolved { - case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON": - out.SetBool(true) - return true - case "n", "N", "no", "No", "NO", "off", "Off", "OFF": - out.SetBool(false) - return true - } - } - case reflect.Float32, reflect.Float64: - switch resolved := resolved.(type) { - case int: - out.SetFloat(float64(resolved)) - return true - case int64: - out.SetFloat(float64(resolved)) - return true - case uint64: - out.SetFloat(float64(resolved)) - return true - case float64: - out.SetFloat(resolved) - return true - } - case reflect.Struct: - if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { - out.Set(resolvedv) - return true - } - case reflect.Ptr: - panic("yaml internal error: please report the issue") - } - d.terror(n, tag, out) - return false -} - -func settableValueOf(i interface{}) reflect.Value { - v := reflect.ValueOf(i) - sv := reflect.New(v.Type()).Elem() - sv.Set(v) - return sv -} - -func (d *decoder) sequence(n *Node, out reflect.Value) (good bool) { - l := len(n.Content) - - var iface reflect.Value - switch out.Kind() { - case reflect.Slice: - out.Set(reflect.MakeSlice(out.Type(), l, l)) - case reflect.Array: - if l != out.Len() { - failf("invalid array: want %d elements but got %d", out.Len(), l) - } - case reflect.Interface: - // No type hints. Will have to use a generic sequence. - iface = out - out = settableValueOf(make([]interface{}, l)) - default: - d.terror(n, seqTag, out) - return false - } - et := out.Type().Elem() - - j := 0 - for i := 0; i < l; i++ { - e := reflect.New(et).Elem() - if ok := d.unmarshal(n.Content[i], e); ok { - out.Index(j).Set(e) - j++ - } - } - if out.Kind() != reflect.Array { - out.Set(out.Slice(0, j)) - } - if iface.IsValid() { - iface.Set(out) - } - return true -} - -func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { - l := len(n.Content) - if d.uniqueKeys { - nerrs := len(d.terrors) - for i := 0; i < l; i += 2 { - ni := n.Content[i] - for j := i + 2; j < l; j += 2 { - nj := n.Content[j] - if ni.Kind == nj.Kind && ni.Value == nj.Value { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: mapping key %#v already defined at line %d", nj.Line, nj.Value, ni.Line)) - } - } - } - if len(d.terrors) > nerrs { - return false - } - } - switch out.Kind() { - case reflect.Struct: - return d.mappingStruct(n, out) - case reflect.Map: - // okay - case reflect.Interface: - iface := out - if isStringMap(n) { - out = reflect.MakeMap(d.stringMapType) - } else { - out = reflect.MakeMap(d.generalMapType) - } - iface.Set(out) - default: - d.terror(n, mapTag, out) - return false - } - - outt := out.Type() - kt := outt.Key() - et := outt.Elem() - - stringMapType := d.stringMapType - generalMapType := d.generalMapType - if outt.Elem() == ifaceType { - if outt.Key().Kind() == reflect.String { - d.stringMapType = outt - } else if outt.Key() == ifaceType { - d.generalMapType = outt - } - } - - mergedFields := d.mergedFields - d.mergedFields = nil - - var mergeNode *Node - - mapIsNew := false - if out.IsNil() { - out.Set(reflect.MakeMap(outt)) - mapIsNew = true - } - for i := 0; i < l; i += 2 { - if isMerge(n.Content[i]) { - mergeNode = n.Content[i+1] - continue - } - k := reflect.New(kt).Elem() - if d.unmarshal(n.Content[i], k) { - if mergedFields != nil { - ki := k.Interface() - if mergedFields[ki] { - continue - } - mergedFields[ki] = true - } - kkind := k.Kind() - if kkind == reflect.Interface { - kkind = k.Elem().Kind() - } - if kkind == reflect.Map || kkind == reflect.Slice { - failf("invalid map key: %#v", k.Interface()) - } - e := reflect.New(et).Elem() - if d.unmarshal(n.Content[i+1], e) || n.Content[i+1].ShortTag() == nullTag && (mapIsNew || !out.MapIndex(k).IsValid()) { - out.SetMapIndex(k, e) - } - } - } - - d.mergedFields = mergedFields - if mergeNode != nil { - d.merge(n, mergeNode, out) - } - - d.stringMapType = stringMapType - d.generalMapType = generalMapType - return true -} - -func isStringMap(n *Node) bool { - if n.Kind != MappingNode { - return false - } - l := len(n.Content) - for i := 0; i < l; i += 2 { - shortTag := n.Content[i].ShortTag() - if shortTag != strTag && shortTag != mergeTag { - return false - } - } - return true -} - -func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { - sinfo, err := getStructInfo(out.Type()) - if err != nil { - panic(err) - } - - var inlineMap reflect.Value - var elemType reflect.Type - if sinfo.InlineMap != -1 { - inlineMap = out.Field(sinfo.InlineMap) - elemType = inlineMap.Type().Elem() - } - - for _, index := range sinfo.InlineUnmarshalers { - field := d.fieldByIndex(n, out, index) - d.prepare(n, field) - } - - mergedFields := d.mergedFields - d.mergedFields = nil - var mergeNode *Node - var doneFields []bool - if d.uniqueKeys { - doneFields = make([]bool, len(sinfo.FieldsList)) - } - name := settableValueOf("") - l := len(n.Content) - for i := 0; i < l; i += 2 { - ni := n.Content[i] - if isMerge(ni) { - mergeNode = n.Content[i+1] - continue - } - if !d.unmarshal(ni, name) { - continue - } - sname := name.String() - if mergedFields != nil { - if mergedFields[sname] { - continue - } - mergedFields[sname] = true - } - if info, ok := sinfo.FieldsMap[sname]; ok { - if d.uniqueKeys { - if doneFields[info.Id] { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.Line, name.String(), out.Type())) - continue - } - doneFields[info.Id] = true - } - var field reflect.Value - if info.Inline == nil { - field = out.Field(info.Num) - } else { - field = d.fieldByIndex(n, out, info.Inline) - } - d.unmarshal(n.Content[i+1], field) - } else if sinfo.InlineMap != -1 { - if inlineMap.IsNil() { - inlineMap.Set(reflect.MakeMap(inlineMap.Type())) - } - value := reflect.New(elemType).Elem() - d.unmarshal(n.Content[i+1], value) - inlineMap.SetMapIndex(name, value) - } else if d.knownFields { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.Line, name.String(), out.Type())) - } - } - - d.mergedFields = mergedFields - if mergeNode != nil { - d.merge(n, mergeNode, out) - } - return true -} - -func failWantMap() { - failf("map merge requires map or sequence of maps as the value") -} - -func (d *decoder) merge(parent *Node, merge *Node, out reflect.Value) { - mergedFields := d.mergedFields - if mergedFields == nil { - d.mergedFields = make(map[interface{}]bool) - for i := 0; i < len(parent.Content); i += 2 { - k := reflect.New(ifaceType).Elem() - if d.unmarshal(parent.Content[i], k) { - d.mergedFields[k.Interface()] = true - } - } - } - - switch merge.Kind { - case MappingNode: - d.unmarshal(merge, out) - case AliasNode: - if merge.Alias != nil && merge.Alias.Kind != MappingNode { - failWantMap() - } - d.unmarshal(merge, out) - case SequenceNode: - for i := 0; i < len(merge.Content); i++ { - ni := merge.Content[i] - if ni.Kind == AliasNode { - if ni.Alias != nil && ni.Alias.Kind != MappingNode { - failWantMap() - } - } else if ni.Kind != MappingNode { - failWantMap() - } - d.unmarshal(ni, out) - } - default: - failWantMap() - } - - d.mergedFields = mergedFields -} - -func isMerge(n *Node) bool { - return n.Kind == ScalarNode && n.Value == "<<" && (n.Tag == "" || n.Tag == "!" || shortTag(n.Tag) == mergeTag) -} diff --git a/vendor/gopkg.in/yaml.v3/emitterc.go b/vendor/gopkg.in/yaml.v3/emitterc.go deleted file mode 100644 index 0f47c9ca..00000000 --- a/vendor/gopkg.in/yaml.v3/emitterc.go +++ /dev/null @@ -1,2020 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -import ( - "bytes" - "fmt" -) - -// Flush the buffer if needed. -func flush(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) { - return yaml_emitter_flush(emitter) - } - return true -} - -// Put a character to the output buffer. -func put(emitter *yaml_emitter_t, value byte) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - emitter.buffer[emitter.buffer_pos] = value - emitter.buffer_pos++ - emitter.column++ - return true -} - -// Put a line break to the output buffer. -func put_break(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - switch emitter.line_break { - case yaml_CR_BREAK: - emitter.buffer[emitter.buffer_pos] = '\r' - emitter.buffer_pos += 1 - case yaml_LN_BREAK: - emitter.buffer[emitter.buffer_pos] = '\n' - emitter.buffer_pos += 1 - case yaml_CRLN_BREAK: - emitter.buffer[emitter.buffer_pos+0] = '\r' - emitter.buffer[emitter.buffer_pos+1] = '\n' - emitter.buffer_pos += 2 - default: - panic("unknown line break setting") - } - if emitter.column == 0 { - emitter.space_above = true - } - emitter.column = 0 - emitter.line++ - // [Go] Do this here and below and drop from everywhere else (see commented lines). - emitter.indention = true - return true -} - -// Copy a character from a string into buffer. -func write(emitter *yaml_emitter_t, s []byte, i *int) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - p := emitter.buffer_pos - w := width(s[*i]) - switch w { - case 4: - emitter.buffer[p+3] = s[*i+3] - fallthrough - case 3: - emitter.buffer[p+2] = s[*i+2] - fallthrough - case 2: - emitter.buffer[p+1] = s[*i+1] - fallthrough - case 1: - emitter.buffer[p+0] = s[*i+0] - default: - panic("unknown character width") - } - emitter.column++ - emitter.buffer_pos += w - *i += w - return true -} - -// Write a whole string into buffer. -func write_all(emitter *yaml_emitter_t, s []byte) bool { - for i := 0; i < len(s); { - if !write(emitter, s, &i) { - return false - } - } - return true -} - -// Copy a line break character from a string into buffer. -func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { - if s[*i] == '\n' { - if !put_break(emitter) { - return false - } - *i++ - } else { - if !write(emitter, s, i) { - return false - } - if emitter.column == 0 { - emitter.space_above = true - } - emitter.column = 0 - emitter.line++ - // [Go] Do this here and above and drop from everywhere else (see commented lines). - emitter.indention = true - } - return true -} - -// Set an emitter error and return false. -func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_EMITTER_ERROR - emitter.problem = problem - return false -} - -// Emit an event. -func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.events = append(emitter.events, *event) - for !yaml_emitter_need_more_events(emitter) { - event := &emitter.events[emitter.events_head] - if !yaml_emitter_analyze_event(emitter, event) { - return false - } - if !yaml_emitter_state_machine(emitter, event) { - return false - } - yaml_event_delete(event) - emitter.events_head++ - } - return true -} - -// Check if we need to accumulate more events before emitting. -// -// We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// -func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { - if emitter.events_head == len(emitter.events) { - return true - } - var accumulate int - switch emitter.events[emitter.events_head].typ { - case yaml_DOCUMENT_START_EVENT: - accumulate = 1 - break - case yaml_SEQUENCE_START_EVENT: - accumulate = 2 - break - case yaml_MAPPING_START_EVENT: - accumulate = 3 - break - default: - return false - } - if len(emitter.events)-emitter.events_head > accumulate { - return false - } - var level int - for i := emitter.events_head; i < len(emitter.events); i++ { - switch emitter.events[i].typ { - case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: - level++ - case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: - level-- - } - if level == 0 { - return false - } - } - return true -} - -// Append a directive to the directives stack. -func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { - for i := 0; i < len(emitter.tag_directives); i++ { - if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") - } - } - - // [Go] Do we actually need to copy this given garbage collection - // and the lack of deallocating destructors? - tag_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(tag_copy.handle, value.handle) - copy(tag_copy.prefix, value.prefix) - emitter.tag_directives = append(emitter.tag_directives, tag_copy) - return true -} - -// Increase the indentation level. -func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { - emitter.indents = append(emitter.indents, emitter.indent) - if emitter.indent < 0 { - if flow { - emitter.indent = emitter.best_indent - } else { - emitter.indent = 0 - } - } else if !indentless { - // [Go] This was changed so that indentations are more regular. - if emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { - // The first indent inside a sequence will just skip the "- " indicator. - emitter.indent += 2 - } else { - // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) - } - } - return true -} - -// State dispatcher. -func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { - switch emitter.state { - default: - case yaml_EMIT_STREAM_START_STATE: - return yaml_emitter_emit_stream_start(emitter, event) - - case yaml_EMIT_FIRST_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, true) - - case yaml_EMIT_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, false) - - case yaml_EMIT_DOCUMENT_CONTENT_STATE: - return yaml_emitter_emit_document_content(emitter, event) - - case yaml_EMIT_DOCUMENT_END_STATE: - return yaml_emitter_emit_document_end(emitter, event) - - case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, true, false) - - case yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, false, true) - - case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, false, false) - - case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, true, false) - - case yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, false, true) - - case yaml_EMIT_FLOW_MAPPING_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, false, false) - - case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, false) - - case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, true) - - case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, false) - - case yaml_EMIT_END_STATE: - return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") - } - panic("invalid emitter state") -} - -// Expect STREAM-START. -func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_STREAM_START_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") - } - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = event.encoding - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = yaml_UTF8_ENCODING - } - } - if emitter.best_indent < 2 || emitter.best_indent > 9 { - emitter.best_indent = 2 - } - if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { - emitter.best_width = 80 - } - if emitter.best_width < 0 { - emitter.best_width = 1<<31 - 1 - } - if emitter.line_break == yaml_ANY_BREAK { - emitter.line_break = yaml_LN_BREAK - } - - emitter.indent = -1 - emitter.line = 0 - emitter.column = 0 - emitter.whitespace = true - emitter.indention = true - emitter.space_above = true - emitter.foot_indent = -1 - - if emitter.encoding != yaml_UTF8_ENCODING { - if !yaml_emitter_write_bom(emitter) { - return false - } - } - emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE - return true -} - -// Expect DOCUMENT-START or STREAM-END. -func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - - if event.typ == yaml_DOCUMENT_START_EVENT { - - if event.version_directive != nil { - if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { - return false - } - } - - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { - return false - } - if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { - return false - } - } - - for i := 0; i < len(default_tag_directives); i++ { - tag_directive := &default_tag_directives[i] - if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { - return false - } - } - - implicit := event.implicit - if !first || emitter.canonical { - implicit = false - } - - if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if event.version_directive != nil { - implicit = false - if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if len(event.tag_directives) > 0 { - implicit = false - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { - return false - } - if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - if yaml_emitter_check_empty_document(emitter) { - implicit = false - } - if !implicit { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { - return false - } - if emitter.canonical || true { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - if len(emitter.head_comment) > 0 { - if !yaml_emitter_process_head_comment(emitter) { - return false - } - if !put_break(emitter) { - return false - } - } - - emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE - return true - } - - if event.typ == yaml_STREAM_END_EVENT { - if emitter.open_ended { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_END_STATE - return true - } - - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") -} - -// Expect the root node. -func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) - - if !yaml_emitter_process_head_comment(emitter) { - return false - } - if !yaml_emitter_emit_node(emitter, event, true, false, false, false) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - return true -} - -// Expect DOCUMENT-END. -func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_DOCUMENT_END_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") - } - // [Go] Force document foot separation. - emitter.foot_indent = 0 - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - emitter.foot_indent = -1 - if !yaml_emitter_write_indent(emitter) { - return false - } - if !event.implicit { - // [Go] Allocate the slice elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_DOCUMENT_START_STATE - emitter.tag_directives = emitter.tag_directives[:0] - return true -} - -// Expect a flow item node. -func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_SEQUENCE_END_EVENT { - if emitter.canonical && !first && !trail { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.column == 0 || emitter.canonical && !first { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - - return true - } - - if !first && !trail { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - - if !yaml_emitter_process_head_comment(emitter) { - return false - } - if emitter.column == 0 { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE) - } else { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) - } - if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { - return false - } - if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - return true -} - -// Expect a flow key node. -func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_MAPPING_END_EVENT { - if (emitter.canonical || len(emitter.head_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0) && !first && !trail { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if !yaml_emitter_process_head_comment(emitter) { - return false - } - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - - if !first && !trail { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - - if !yaml_emitter_process_head_comment(emitter) { - return false - } - - if emitter.column == 0 { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a flow value node. -func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { - return false - } - } - if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE) - } else { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) - } - if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { - return false - } - if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - return true -} - -// Expect a block item node. -func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, false) { - return false - } - } - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_process_head_comment(emitter) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) - if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - return true -} - -// Expect a block key node. -func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, false) { - return false - } - } - if !yaml_emitter_process_head_comment(emitter) { - return false - } - if event.typ == yaml_MAPPING_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if len(emitter.line_comment) > 0 { - // [Go] A line comment was provided for the key. That's unusual as the - // scanner associates line comments with the value. Either way, - // save the line comment and render it appropriately later. - emitter.key_line_comment = emitter.line_comment - emitter.line_comment = nil - } - if yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block value node. -func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { - return false - } - } - if len(emitter.key_line_comment) > 0 { - // [Go] Line comments are generally associated with the value, but when there's - // no value on the same line as a mapping key they end up attached to the - // key itself. - if event.typ == yaml_SCALAR_EVENT { - if len(emitter.line_comment) == 0 { - // A scalar is coming and it has no line comments by itself yet, - // so just let it handle the line comment as usual. If it has a - // line comment, we can't have both so the one from the key is lost. - emitter.line_comment = emitter.key_line_comment - emitter.key_line_comment = nil - } - } else if event.sequence_style() != yaml_FLOW_SEQUENCE_STYLE && (event.typ == yaml_MAPPING_START_EVENT || event.typ == yaml_SEQUENCE_START_EVENT) { - // An indented block follows, so write the comment right now. - emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment - if !yaml_emitter_process_line_comment(emitter) { - return false - } - emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment - } - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) - if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - if !yaml_emitter_process_foot_comment(emitter) { - return false - } - return true -} - -func yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { - return event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0 -} - -// Expect a node. -func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, - root bool, sequence bool, mapping bool, simple_key bool) bool { - - emitter.root_context = root - emitter.sequence_context = sequence - emitter.mapping_context = mapping - emitter.simple_key_context = simple_key - - switch event.typ { - case yaml_ALIAS_EVENT: - return yaml_emitter_emit_alias(emitter, event) - case yaml_SCALAR_EVENT: - return yaml_emitter_emit_scalar(emitter, event) - case yaml_SEQUENCE_START_EVENT: - return yaml_emitter_emit_sequence_start(emitter, event) - case yaml_MAPPING_START_EVENT: - return yaml_emitter_emit_mapping_start(emitter, event) - default: - return yaml_emitter_set_emitter_error(emitter, - fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) - } -} - -// Expect ALIAS. -func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SCALAR. -func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_select_scalar_style(emitter, event) { - return false - } - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - if !yaml_emitter_process_scalar(emitter) { - return false - } - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SEQUENCE-START. -func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || - yaml_emitter_check_empty_sequence(emitter) { - emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE - } - return true -} - -// Expect MAPPING-START. -func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || - yaml_emitter_check_empty_mapping(emitter) { - emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE - } - return true -} - -// Check if the document content is an empty scalar. -func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { - return false // [Go] Huh? -} - -// Check if the next events represent an empty sequence. -func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT -} - -// Check if the next events represent an empty mapping. -func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT -} - -// Check if the next node can be expressed as a simple key. -func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { - length := 0 - switch emitter.events[emitter.events_head].typ { - case yaml_ALIAS_EVENT: - length += len(emitter.anchor_data.anchor) - case yaml_SCALAR_EVENT: - if emitter.scalar_data.multiline { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) + - len(emitter.scalar_data.value) - case yaml_SEQUENCE_START_EVENT: - if !yaml_emitter_check_empty_sequence(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - case yaml_MAPPING_START_EVENT: - if !yaml_emitter_check_empty_mapping(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - default: - return false - } - return length <= 128 -} - -// Determine an acceptable scalar style. -func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 - if no_tag && !event.implicit && !event.quoted_implicit { - return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") - } - - style := event.scalar_style() - if style == yaml_ANY_SCALAR_STYLE { - style = yaml_PLAIN_SCALAR_STYLE - } - if emitter.canonical { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - if emitter.simple_key_context && emitter.scalar_data.multiline { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - - if style == yaml_PLAIN_SCALAR_STYLE { - if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || - emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if no_tag && !event.implicit { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { - if !emitter.scalar_data.single_quoted_allowed { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { - if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - - if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { - emitter.tag_data.handle = []byte{'!'} - } - emitter.scalar_data.style = style - return true -} - -// Write an anchor. -func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { - if emitter.anchor_data.anchor == nil { - return true - } - c := []byte{'&'} - if emitter.anchor_data.alias { - c[0] = '*' - } - if !yaml_emitter_write_indicator(emitter, c, true, false, false) { - return false - } - return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) -} - -// Write a tag. -func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { - if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { - return true - } - if len(emitter.tag_data.handle) > 0 { - if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { - return false - } - if len(emitter.tag_data.suffix) > 0 { - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - } - } else { - // [Go] Allocate these slices elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { - return false - } - } - return true -} - -// Write a scalar. -func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { - switch emitter.scalar_data.style { - case yaml_PLAIN_SCALAR_STYLE: - return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_SINGLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_DOUBLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_LITERAL_SCALAR_STYLE: - return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) - - case yaml_FOLDED_SCALAR_STYLE: - return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) - } - panic("unknown scalar style") -} - -// Write a head comment. -func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool { - if len(emitter.tail_comment) > 0 { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_comment(emitter, emitter.tail_comment) { - return false - } - emitter.tail_comment = emitter.tail_comment[:0] - emitter.foot_indent = emitter.indent - if emitter.foot_indent < 0 { - emitter.foot_indent = 0 - } - } - - if len(emitter.head_comment) == 0 { - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_comment(emitter, emitter.head_comment) { - return false - } - emitter.head_comment = emitter.head_comment[:0] - return true -} - -// Write an line comment. -func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool { - if len(emitter.line_comment) == 0 { - return true - } - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !yaml_emitter_write_comment(emitter, emitter.line_comment) { - return false - } - emitter.line_comment = emitter.line_comment[:0] - return true -} - -// Write a foot comment. -func yaml_emitter_process_foot_comment(emitter *yaml_emitter_t) bool { - if len(emitter.foot_comment) == 0 { - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_comment(emitter, emitter.foot_comment) { - return false - } - emitter.foot_comment = emitter.foot_comment[:0] - emitter.foot_indent = emitter.indent - if emitter.foot_indent < 0 { - emitter.foot_indent = 0 - } - return true -} - -// Check if a %YAML directive is valid. -func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { - if version_directive.major != 1 || version_directive.minor != 1 { - return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") - } - return true -} - -// Check if a %TAG directive is valid. -func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { - handle := tag_directive.handle - prefix := tag_directive.prefix - if len(handle) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") - } - if handle[0] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") - } - if handle[len(handle)-1] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") - } - for i := 1; i < len(handle)-1; i += width(handle[i]) { - if !is_alpha(handle, i) { - return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") - } - } - if len(prefix) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") - } - return true -} - -// Check if an anchor is valid. -func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { - if len(anchor) == 0 { - problem := "anchor value must not be empty" - if alias { - problem = "alias value must not be empty" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - for i := 0; i < len(anchor); i += width(anchor[i]) { - if !is_alpha(anchor, i) { - problem := "anchor value must contain alphanumerical characters only" - if alias { - problem = "alias value must contain alphanumerical characters only" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - } - emitter.anchor_data.anchor = anchor - emitter.anchor_data.alias = alias - return true -} - -// Check if a tag is valid. -func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { - if len(tag) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") - } - for i := 0; i < len(emitter.tag_directives); i++ { - tag_directive := &emitter.tag_directives[i] - if bytes.HasPrefix(tag, tag_directive.prefix) { - emitter.tag_data.handle = tag_directive.handle - emitter.tag_data.suffix = tag[len(tag_directive.prefix):] - return true - } - } - emitter.tag_data.suffix = tag - return true -} - -// Check if a scalar is valid. -func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { - var ( - block_indicators = false - flow_indicators = false - line_breaks = false - special_characters = false - tab_characters = false - - leading_space = false - leading_break = false - trailing_space = false - trailing_break = false - break_space = false - space_break = false - - preceded_by_whitespace = false - followed_by_whitespace = false - previous_space = false - previous_break = false - ) - - emitter.scalar_data.value = value - - if len(value) == 0 { - emitter.scalar_data.multiline = false - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = false - return true - } - - if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { - block_indicators = true - flow_indicators = true - } - - preceded_by_whitespace = true - for i, w := 0, 0; i < len(value); i += w { - w = width(value[i]) - followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) - - if i == 0 { - switch value[i] { - case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': - flow_indicators = true - block_indicators = true - case '?', ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '-': - if followed_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } else { - switch value[i] { - case ',', '?', '[', ']', '{', '}': - flow_indicators = true - case ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '#': - if preceded_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } - - if value[i] == '\t' { - tab_characters = true - } else if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { - special_characters = true - } - if is_space(value, i) { - if i == 0 { - leading_space = true - } - if i+width(value[i]) == len(value) { - trailing_space = true - } - if previous_break { - break_space = true - } - previous_space = true - previous_break = false - } else if is_break(value, i) { - line_breaks = true - if i == 0 { - leading_break = true - } - if i+width(value[i]) == len(value) { - trailing_break = true - } - if previous_space { - space_break = true - } - previous_space = false - previous_break = true - } else { - previous_space = false - previous_break = false - } - - // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceded_by_whitespace = is_blankz(value, i) - } - - emitter.scalar_data.multiline = line_breaks - emitter.scalar_data.flow_plain_allowed = true - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = true - - if leading_space || leading_break || trailing_space || trailing_break { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if trailing_space { - emitter.scalar_data.block_allowed = false - } - if break_space { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - } - if space_break || tab_characters || special_characters { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - } - if space_break || special_characters { - emitter.scalar_data.block_allowed = false - } - if line_breaks { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if flow_indicators { - emitter.scalar_data.flow_plain_allowed = false - } - if block_indicators { - emitter.scalar_data.block_plain_allowed = false - } - return true -} - -// Check if the event data is valid. -func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - emitter.anchor_data.anchor = nil - emitter.tag_data.handle = nil - emitter.tag_data.suffix = nil - emitter.scalar_data.value = nil - - if len(event.head_comment) > 0 { - emitter.head_comment = event.head_comment - } - if len(event.line_comment) > 0 { - emitter.line_comment = event.line_comment - } - if len(event.foot_comment) > 0 { - emitter.foot_comment = event.foot_comment - } - if len(event.tail_comment) > 0 { - emitter.tail_comment = event.tail_comment - } - - switch event.typ { - case yaml_ALIAS_EVENT: - if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { - return false - } - - case yaml_SCALAR_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - if !yaml_emitter_analyze_scalar(emitter, event.value) { - return false - } - - case yaml_SEQUENCE_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - - case yaml_MAPPING_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - } - return true -} - -// Write the BOM character. -func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { - if !flush(emitter) { - return false - } - pos := emitter.buffer_pos - emitter.buffer[pos+0] = '\xEF' - emitter.buffer[pos+1] = '\xBB' - emitter.buffer[pos+2] = '\xBF' - emitter.buffer_pos += 3 - return true -} - -func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { - indent := emitter.indent - if indent < 0 { - indent = 0 - } - if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { - if !put_break(emitter) { - return false - } - } - if emitter.foot_indent == indent { - if !put_break(emitter) { - return false - } - } - for emitter.column < indent { - if !put(emitter, ' ') { - return false - } - } - emitter.whitespace = true - //emitter.indention = true - emitter.space_above = false - emitter.foot_indent = -1 - return true -} - -func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, indicator) { - return false - } - emitter.whitespace = is_whitespace - emitter.indention = (emitter.indention && is_indention) - emitter.open_ended = false - return true -} - -func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - for i := 0; i < len(value); { - var must_write bool - switch value[i] { - case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': - must_write = true - default: - must_write = is_alpha(value, i) - } - if must_write { - if !write(emitter, value, &i) { - return false - } - } else { - w := width(value[i]) - for k := 0; k < w; k++ { - octet := value[i] - i++ - if !put(emitter, '%') { - return false - } - - c := octet >> 4 - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - - c = octet & 0x0f - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - } - } - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - if len(value) > 0 && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - //emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - - if len(value) > 0 { - emitter.whitespace = false - } - emitter.indention = false - if emitter.root_context { - emitter.open_ended = true - } - - return true -} - -func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { - return false - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - //emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if value[i] == '\'' { - if !put(emitter, '\'') { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - spaces := false - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { - return false - } - - for i := 0; i < len(value); { - if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || - is_bom(value, i) || is_break(value, i) || - value[i] == '"' || value[i] == '\\' { - - octet := value[i] - - var w int - var v rune - switch { - case octet&0x80 == 0x00: - w, v = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, v = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, v = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, v = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = value[i+k] - v = (v << 6) + (rune(octet) & 0x3F) - } - i += w - - if !put(emitter, '\\') { - return false - } - - var ok bool - switch v { - case 0x00: - ok = put(emitter, '0') - case 0x07: - ok = put(emitter, 'a') - case 0x08: - ok = put(emitter, 'b') - case 0x09: - ok = put(emitter, 't') - case 0x0A: - ok = put(emitter, 'n') - case 0x0b: - ok = put(emitter, 'v') - case 0x0c: - ok = put(emitter, 'f') - case 0x0d: - ok = put(emitter, 'r') - case 0x1b: - ok = put(emitter, 'e') - case 0x22: - ok = put(emitter, '"') - case 0x5c: - ok = put(emitter, '\\') - case 0x85: - ok = put(emitter, 'N') - case 0xA0: - ok = put(emitter, '_') - case 0x2028: - ok = put(emitter, 'L') - case 0x2029: - ok = put(emitter, 'P') - default: - if v <= 0xFF { - ok = put(emitter, 'x') - w = 2 - } else if v <= 0xFFFF { - ok = put(emitter, 'u') - w = 4 - } else { - ok = put(emitter, 'U') - w = 8 - } - for k := (w - 1) * 4; ok && k >= 0; k -= 4 { - digit := byte((v >> uint(k)) & 0x0F) - if digit < 10 { - ok = put(emitter, digit+'0') - } else { - ok = put(emitter, digit+'A'-10) - } - } - } - if !ok { - return false - } - spaces = false - } else if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { - if !yaml_emitter_write_indent(emitter) { - return false - } - if is_space(value, i+1) { - if !put(emitter, '\\') { - return false - } - } - i += width(value[i]) - } else if !write(emitter, value, &i) { - return false - } - spaces = true - } else { - if !write(emitter, value, &i) { - return false - } - spaces = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { - if is_space(value, 0) || is_break(value, 0) { - indent_hint := []byte{'0' + byte(emitter.best_indent)} - if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { - return false - } - } - - emitter.open_ended = false - - var chomp_hint [1]byte - if len(value) == 0 { - chomp_hint[0] = '-' - } else { - i := len(value) - 1 - for value[i]&0xC0 == 0x80 { - i-- - } - if !is_break(value, i) { - chomp_hint[0] = '-' - } else if i == 0 { - chomp_hint[0] = '+' - emitter.open_ended = true - } else { - i-- - for value[i]&0xC0 == 0x80 { - i-- - } - if is_break(value, i) { - chomp_hint[0] = '+' - emitter.open_ended = true - } - } - } - if chomp_hint[0] != 0 { - if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { - return false - } - } - return true -} - -func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - //emitter.indention = true - emitter.whitespace = true - breaks := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !write_break(emitter, value, &i) { - return false - } - //emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - breaks = false - } - } - - return true -} - -func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - if !yaml_emitter_process_line_comment(emitter) { - return false - } - - //emitter.indention = true - emitter.whitespace = true - - breaks := true - leading_spaces := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !breaks && !leading_spaces && value[i] == '\n' { - k := 0 - for is_break(value, k) { - k += width(value[k]) - } - if !is_blankz(value, k) { - if !put_break(emitter) { - return false - } - } - } - if !write_break(emitter, value, &i) { - return false - } - //emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - leading_spaces = is_blank(value, i) - } - if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - emitter.indention = false - breaks = false - } - } - return true -} - -func yaml_emitter_write_comment(emitter *yaml_emitter_t, comment []byte) bool { - breaks := false - pound := false - for i := 0; i < len(comment); { - if is_break(comment, i) { - if !write_break(emitter, comment, &i) { - return false - } - //emitter.indention = true - breaks = true - pound = false - } else { - if breaks && !yaml_emitter_write_indent(emitter) { - return false - } - if !pound { - if comment[i] != '#' && (!put(emitter, '#') || !put(emitter, ' ')) { - return false - } - pound = true - } - if !write(emitter, comment, &i) { - return false - } - emitter.indention = false - breaks = false - } - } - if !breaks && !put_break(emitter) { - return false - } - - emitter.whitespace = true - //emitter.indention = true - return true -} diff --git a/vendor/gopkg.in/yaml.v3/encode.go b/vendor/gopkg.in/yaml.v3/encode.go deleted file mode 100644 index de9e72a3..00000000 --- a/vendor/gopkg.in/yaml.v3/encode.go +++ /dev/null @@ -1,577 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// -// 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 yaml - -import ( - "encoding" - "fmt" - "io" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode/utf8" -) - -type encoder struct { - emitter yaml_emitter_t - event yaml_event_t - out []byte - flow bool - indent int - doneInit bool -} - -func newEncoder() *encoder { - e := &encoder{} - yaml_emitter_initialize(&e.emitter) - yaml_emitter_set_output_string(&e.emitter, &e.out) - yaml_emitter_set_unicode(&e.emitter, true) - return e -} - -func newEncoderWithWriter(w io.Writer) *encoder { - e := &encoder{} - yaml_emitter_initialize(&e.emitter) - yaml_emitter_set_output_writer(&e.emitter, w) - yaml_emitter_set_unicode(&e.emitter, true) - return e -} - -func (e *encoder) init() { - if e.doneInit { - return - } - if e.indent == 0 { - e.indent = 4 - } - e.emitter.best_indent = e.indent - yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) - e.emit() - e.doneInit = true -} - -func (e *encoder) finish() { - e.emitter.open_ended = false - yaml_stream_end_event_initialize(&e.event) - e.emit() -} - -func (e *encoder) destroy() { - yaml_emitter_delete(&e.emitter) -} - -func (e *encoder) emit() { - // This will internally delete the e.event value. - e.must(yaml_emitter_emit(&e.emitter, &e.event)) -} - -func (e *encoder) must(ok bool) { - if !ok { - msg := e.emitter.problem - if msg == "" { - msg = "unknown problem generating YAML content" - } - failf("%s", msg) - } -} - -func (e *encoder) marshalDoc(tag string, in reflect.Value) { - e.init() - var node *Node - if in.IsValid() { - node, _ = in.Interface().(*Node) - } - if node != nil && node.Kind == DocumentNode { - e.nodev(in) - } else { - yaml_document_start_event_initialize(&e.event, nil, nil, true) - e.emit() - e.marshal(tag, in) - yaml_document_end_event_initialize(&e.event, true) - e.emit() - } -} - -func (e *encoder) marshal(tag string, in reflect.Value) { - tag = shortTag(tag) - if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { - e.nilv() - return - } - iface := in.Interface() - switch value := iface.(type) { - case *Node: - e.nodev(in) - return - case Node: - if !in.CanAddr() { - var n = reflect.New(in.Type()).Elem() - n.Set(in) - in = n - } - e.nodev(in.Addr()) - return - case time.Time: - e.timev(tag, in) - return - case *time.Time: - e.timev(tag, in.Elem()) - return - case time.Duration: - e.stringv(tag, reflect.ValueOf(value.String())) - return - case Marshaler: - v, err := value.MarshalYAML() - if err != nil { - fail(err) - } - if v == nil { - e.nilv() - return - } - e.marshal(tag, reflect.ValueOf(v)) - return - case encoding.TextMarshaler: - text, err := value.MarshalText() - if err != nil { - fail(err) - } - in = reflect.ValueOf(string(text)) - case nil: - e.nilv() - return - } - switch in.Kind() { - case reflect.Interface: - e.marshal(tag, in.Elem()) - case reflect.Map: - e.mapv(tag, in) - case reflect.Ptr: - e.marshal(tag, in.Elem()) - case reflect.Struct: - e.structv(tag, in) - case reflect.Slice, reflect.Array: - e.slicev(tag, in) - case reflect.String: - e.stringv(tag, in) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - e.intv(tag, in) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - e.uintv(tag, in) - case reflect.Float32, reflect.Float64: - e.floatv(tag, in) - case reflect.Bool: - e.boolv(tag, in) - default: - panic("cannot marshal type: " + in.Type().String()) - } -} - -func (e *encoder) mapv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - keys := keyList(in.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - e.marshal("", k) - e.marshal("", in.MapIndex(k)) - } - }) -} - -func (e *encoder) fieldByIndex(v reflect.Value, index []int) (field reflect.Value) { - for _, num := range index { - for { - if v.Kind() == reflect.Ptr { - if v.IsNil() { - return reflect.Value{} - } - v = v.Elem() - continue - } - break - } - v = v.Field(num) - } - return v -} - -func (e *encoder) structv(tag string, in reflect.Value) { - sinfo, err := getStructInfo(in.Type()) - if err != nil { - panic(err) - } - e.mappingv(tag, func() { - for _, info := range sinfo.FieldsList { - var value reflect.Value - if info.Inline == nil { - value = in.Field(info.Num) - } else { - value = e.fieldByIndex(in, info.Inline) - if !value.IsValid() { - continue - } - } - if info.OmitEmpty && isZero(value) { - continue - } - e.marshal("", reflect.ValueOf(info.Key)) - e.flow = info.Flow - e.marshal("", value) - } - if sinfo.InlineMap >= 0 { - m := in.Field(sinfo.InlineMap) - if m.Len() > 0 { - e.flow = false - keys := keyList(m.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - if _, found := sinfo.FieldsMap[k.String()]; found { - panic(fmt.Sprintf("cannot have key %q in inlined map: conflicts with struct field", k.String())) - } - e.marshal("", k) - e.flow = false - e.marshal("", m.MapIndex(k)) - } - } - } - }) -} - -func (e *encoder) mappingv(tag string, f func()) { - implicit := tag == "" - style := yaml_BLOCK_MAPPING_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_MAPPING_STYLE - } - yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) - e.emit() - f() - yaml_mapping_end_event_initialize(&e.event) - e.emit() -} - -func (e *encoder) slicev(tag string, in reflect.Value) { - implicit := tag == "" - style := yaml_BLOCK_SEQUENCE_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_SEQUENCE_STYLE - } - e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - n := in.Len() - for i := 0; i < n; i++ { - e.marshal("", in.Index(i)) - } - e.must(yaml_sequence_end_event_initialize(&e.event)) - e.emit() -} - -// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. -// -// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported -// in YAML 1.2 and by this package, but these should be marshalled quoted for -// the time being for compatibility with other parsers. -func isBase60Float(s string) (result bool) { - // Fast path. - if s == "" { - return false - } - c := s[0] - if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { - return false - } - // Do the full match. - return base60float.MatchString(s) -} - -// From http://yaml.org/type/float.html, except the regular expression there -// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. -var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) - -// isOldBool returns whether s is bool notation as defined in YAML 1.1. -// -// We continue to force strings that YAML 1.1 would interpret as booleans to be -// rendered as quotes strings so that the marshalled output valid for YAML 1.1 -// parsing. -func isOldBool(s string) (result bool) { - switch s { - case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON", - "n", "N", "no", "No", "NO", "off", "Off", "OFF": - return true - default: - return false - } -} - -func (e *encoder) stringv(tag string, in reflect.Value) { - var style yaml_scalar_style_t - s := in.String() - canUsePlain := true - switch { - case !utf8.ValidString(s): - if tag == binaryTag { - failf("explicitly tagged !!binary data must be base64-encoded") - } - if tag != "" { - failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) - } - // It can't be encoded directly as YAML so use a binary tag - // and encode it as base64. - tag = binaryTag - s = encodeBase64(s) - case tag == "": - // Check to see if it would resolve to a specific - // tag when encoded unquoted. If it doesn't, - // there's no need to quote it. - rtag, _ := resolve("", s) - canUsePlain = rtag == strTag && !(isBase60Float(s) || isOldBool(s)) - } - // Note: it's possible for user code to emit invalid YAML - // if they explicitly specify a tag and a string containing - // text that's incompatible with that tag. - switch { - case strings.Contains(s, "\n"): - if e.flow { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } else { - style = yaml_LITERAL_SCALAR_STYLE - } - case canUsePlain: - style = yaml_PLAIN_SCALAR_STYLE - default: - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - e.emitScalar(s, "", tag, style, nil, nil, nil, nil) -} - -func (e *encoder) boolv(tag string, in reflect.Value) { - var s string - if in.Bool() { - s = "true" - } else { - s = "false" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) -} - -func (e *encoder) intv(tag string, in reflect.Value) { - s := strconv.FormatInt(in.Int(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) -} - -func (e *encoder) uintv(tag string, in reflect.Value) { - s := strconv.FormatUint(in.Uint(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) -} - -func (e *encoder) timev(tag string, in reflect.Value) { - t := in.Interface().(time.Time) - s := t.Format(time.RFC3339Nano) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) -} - -func (e *encoder) floatv(tag string, in reflect.Value) { - // Issue #352: When formatting, use the precision of the underlying value - precision := 64 - if in.Kind() == reflect.Float32 { - precision = 32 - } - - s := strconv.FormatFloat(in.Float(), 'g', -1, precision) - switch s { - case "+Inf": - s = ".inf" - case "-Inf": - s = "-.inf" - case "NaN": - s = ".nan" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) -} - -func (e *encoder) nilv() { - e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) -} - -func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) { - // TODO Kill this function. Replace all initialize calls by their underlining Go literals. - implicit := tag == "" - if !implicit { - tag = longTag(tag) - } - e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) - e.event.head_comment = head - e.event.line_comment = line - e.event.foot_comment = foot - e.event.tail_comment = tail - e.emit() -} - -func (e *encoder) nodev(in reflect.Value) { - e.node(in.Interface().(*Node), "") -} - -func (e *encoder) node(node *Node, tail string) { - // Zero nodes behave as nil. - if node.Kind == 0 && node.IsZero() { - e.nilv() - return - } - - // If the tag was not explicitly requested, and dropping it won't change the - // implicit tag of the value, don't include it in the presentation. - var tag = node.Tag - var stag = shortTag(tag) - var forceQuoting bool - if tag != "" && node.Style&TaggedStyle == 0 { - if node.Kind == ScalarNode { - if stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 { - tag = "" - } else { - rtag, _ := resolve("", node.Value) - if rtag == stag { - tag = "" - } else if stag == strTag { - tag = "" - forceQuoting = true - } - } - } else { - var rtag string - switch node.Kind { - case MappingNode: - rtag = mapTag - case SequenceNode: - rtag = seqTag - } - if rtag == stag { - tag = "" - } - } - } - - switch node.Kind { - case DocumentNode: - yaml_document_start_event_initialize(&e.event, nil, nil, true) - e.event.head_comment = []byte(node.HeadComment) - e.emit() - for _, node := range node.Content { - e.node(node, "") - } - yaml_document_end_event_initialize(&e.event, true) - e.event.foot_comment = []byte(node.FootComment) - e.emit() - - case SequenceNode: - style := yaml_BLOCK_SEQUENCE_STYLE - if node.Style&FlowStyle != 0 { - style = yaml_FLOW_SEQUENCE_STYLE - } - e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style)) - e.event.head_comment = []byte(node.HeadComment) - e.emit() - for _, node := range node.Content { - e.node(node, "") - } - e.must(yaml_sequence_end_event_initialize(&e.event)) - e.event.line_comment = []byte(node.LineComment) - e.event.foot_comment = []byte(node.FootComment) - e.emit() - - case MappingNode: - style := yaml_BLOCK_MAPPING_STYLE - if node.Style&FlowStyle != 0 { - style = yaml_FLOW_MAPPING_STYLE - } - yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style) - e.event.tail_comment = []byte(tail) - e.event.head_comment = []byte(node.HeadComment) - e.emit() - - // The tail logic below moves the foot comment of prior keys to the following key, - // since the value for each key may be a nested structure and the foot needs to be - // processed only the entirety of the value is streamed. The last tail is processed - // with the mapping end event. - var tail string - for i := 0; i+1 < len(node.Content); i += 2 { - k := node.Content[i] - foot := k.FootComment - if foot != "" { - kopy := *k - kopy.FootComment = "" - k = &kopy - } - e.node(k, tail) - tail = foot - - v := node.Content[i+1] - e.node(v, "") - } - - yaml_mapping_end_event_initialize(&e.event) - e.event.tail_comment = []byte(tail) - e.event.line_comment = []byte(node.LineComment) - e.event.foot_comment = []byte(node.FootComment) - e.emit() - - case AliasNode: - yaml_alias_event_initialize(&e.event, []byte(node.Value)) - e.event.head_comment = []byte(node.HeadComment) - e.event.line_comment = []byte(node.LineComment) - e.event.foot_comment = []byte(node.FootComment) - e.emit() - - case ScalarNode: - value := node.Value - if !utf8.ValidString(value) { - if stag == binaryTag { - failf("explicitly tagged !!binary data must be base64-encoded") - } - if stag != "" { - failf("cannot marshal invalid UTF-8 data as %s", stag) - } - // It can't be encoded directly as YAML so use a binary tag - // and encode it as base64. - tag = binaryTag - value = encodeBase64(value) - } - - style := yaml_PLAIN_SCALAR_STYLE - switch { - case node.Style&DoubleQuotedStyle != 0: - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - case node.Style&SingleQuotedStyle != 0: - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - case node.Style&LiteralStyle != 0: - style = yaml_LITERAL_SCALAR_STYLE - case node.Style&FoldedStyle != 0: - style = yaml_FOLDED_SCALAR_STYLE - case strings.Contains(value, "\n"): - style = yaml_LITERAL_SCALAR_STYLE - case forceQuoting: - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - - e.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail)) - default: - failf("cannot encode node with unknown kind %d", node.Kind) - } -} diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go deleted file mode 100644 index 268558a0..00000000 --- a/vendor/gopkg.in/yaml.v3/parserc.go +++ /dev/null @@ -1,1258 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -import ( - "bytes" -) - -// The parser implements the following grammar: -// -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// implicit_document ::= block_node DOCUMENT-END* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// block_node_or_indentless_sequence ::= -// ALIAS -// | properties (block_content | indentless_block_sequence)? -// | block_content -// | indentless_block_sequence -// block_node ::= ALIAS -// | properties block_content? -// | block_content -// flow_node ::= ALIAS -// | properties flow_content? -// | flow_content -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// block_content ::= block_collection | flow_collection | SCALAR -// flow_content ::= flow_collection | SCALAR -// block_collection ::= block_sequence | block_mapping -// flow_collection ::= flow_sequence | flow_mapping -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// block_mapping ::= BLOCK-MAPPING_START -// ((KEY block_node_or_indentless_sequence?)? -// (VALUE block_node_or_indentless_sequence?)?)* -// BLOCK-END -// flow_sequence ::= FLOW-SEQUENCE-START -// (flow_sequence_entry FLOW-ENTRY)* -// flow_sequence_entry? -// FLOW-SEQUENCE-END -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// flow_mapping ::= FLOW-MAPPING-START -// (flow_mapping_entry FLOW-ENTRY)* -// flow_mapping_entry? -// FLOW-MAPPING-END -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? - -// Peek the next token in the token queue. -func peek_token(parser *yaml_parser_t) *yaml_token_t { - if parser.token_available || yaml_parser_fetch_more_tokens(parser) { - token := &parser.tokens[parser.tokens_head] - yaml_parser_unfold_comments(parser, token) - return token - } - return nil -} - -// yaml_parser_unfold_comments walks through the comments queue and joins all -// comments behind the position of the provided token into the respective -// top-level comment slices in the parser. -func yaml_parser_unfold_comments(parser *yaml_parser_t, token *yaml_token_t) { - for parser.comments_head < len(parser.comments) && token.start_mark.index >= parser.comments[parser.comments_head].token_mark.index { - comment := &parser.comments[parser.comments_head] - if len(comment.head) > 0 { - if token.typ == yaml_BLOCK_END_TOKEN { - // No heads on ends, so keep comment.head for a follow up token. - break - } - if len(parser.head_comment) > 0 { - parser.head_comment = append(parser.head_comment, '\n') - } - parser.head_comment = append(parser.head_comment, comment.head...) - } - if len(comment.foot) > 0 { - if len(parser.foot_comment) > 0 { - parser.foot_comment = append(parser.foot_comment, '\n') - } - parser.foot_comment = append(parser.foot_comment, comment.foot...) - } - if len(comment.line) > 0 { - if len(parser.line_comment) > 0 { - parser.line_comment = append(parser.line_comment, '\n') - } - parser.line_comment = append(parser.line_comment, comment.line...) - } - *comment = yaml_comment_t{} - parser.comments_head++ - } -} - -// Remove the next token from the queue (must be called after peek_token). -func skip_token(parser *yaml_parser_t) { - parser.token_available = false - parser.tokens_parsed++ - parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN - parser.tokens_head++ -} - -// Get the next event. -func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { - // Erase the event object. - *event = yaml_event_t{} - - // No events after the end of the stream or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { - return true - } - - // Generate the next event. - return yaml_parser_state_machine(parser, event) -} - -// Set parser error. -func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -// State dispatcher. -func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { - //trace("yaml_parser_state_machine", "state:", parser.state.String()) - - switch parser.state { - case yaml_PARSE_STREAM_START_STATE: - return yaml_parser_parse_stream_start(parser, event) - - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, true) - - case yaml_PARSE_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, false) - - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return yaml_parser_parse_document_content(parser, event) - - case yaml_PARSE_DOCUMENT_END_STATE: - return yaml_parser_parse_document_end(parser, event) - - case yaml_PARSE_BLOCK_NODE_STATE: - return yaml_parser_parse_node(parser, event, true, false) - - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return yaml_parser_parse_node(parser, event, true, true) - - case yaml_PARSE_FLOW_NODE_STATE: - return yaml_parser_parse_node(parser, event, false, false) - - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, true) - - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, false) - - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_indentless_sequence_entry(parser, event) - - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, true) - - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, false) - - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return yaml_parser_parse_block_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, true) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, false) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) - - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, true) - - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, true) - - default: - panic("invalid parser state") - } -} - -// Parse the production: -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ -func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_STREAM_START_TOKEN { - return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) - } - parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - encoding: token.encoding, - } - skip_token(parser) - return true -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// * -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* -func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { - - token := peek_token(parser) - if token == nil { - return false - } - - // Parse extra document end indicators. - if !implicit { - for token.typ == yaml_DOCUMENT_END_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && - token.typ != yaml_TAG_DIRECTIVE_TOKEN && - token.typ != yaml_DOCUMENT_START_TOKEN && - token.typ != yaml_STREAM_END_TOKEN { - // Parse an implicit document. - if !yaml_parser_process_directives(parser, nil, nil) { - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_BLOCK_NODE_STATE - - var head_comment []byte - if len(parser.head_comment) > 0 { - // [Go] Scan the header comment backwards, and if an empty line is found, break - // the header so the part before the last empty line goes into the - // document header, while the bottom of it goes into a follow up event. - for i := len(parser.head_comment) - 1; i > 0; i-- { - if parser.head_comment[i] == '\n' { - if i == len(parser.head_comment)-1 { - head_comment = parser.head_comment[:i] - parser.head_comment = parser.head_comment[i+1:] - break - } else if parser.head_comment[i-1] == '\n' { - head_comment = parser.head_comment[:i-1] - parser.head_comment = parser.head_comment[i+1:] - break - } - } - } - } - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - - head_comment: head_comment, - } - - } else if token.typ != yaml_STREAM_END_TOKEN { - // Parse an explicit document. - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - start_mark := token.start_mark - if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { - return false - } - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_DOCUMENT_START_TOKEN { - yaml_parser_set_parser_error(parser, - "did not find expected ", token.start_mark) - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE - end_mark := token.end_mark - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: false, - } - skip_token(parser) - - } else { - // Parse the stream end. - parser.state = yaml_PARSE_END_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - } - - return true -} - -// Parse the productions: -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** -// -func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || - token.typ == yaml_TAG_DIRECTIVE_TOKEN || - token.typ == yaml_DOCUMENT_START_TOKEN || - token.typ == yaml_DOCUMENT_END_TOKEN || - token.typ == yaml_STREAM_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - return yaml_parser_process_empty_scalar(parser, event, - token.start_mark) - } - return yaml_parser_parse_node(parser, event, true, false) -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// -func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - start_mark := token.start_mark - end_mark := token.start_mark - - implicit := true - if token.typ == yaml_DOCUMENT_END_TOKEN { - end_mark = token.end_mark - skip_token(parser) - implicit = false - } - - parser.tag_directives = parser.tag_directives[:0] - - parser.state = yaml_PARSE_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - start_mark: start_mark, - end_mark: end_mark, - implicit: implicit, - } - yaml_parser_set_event_comments(parser, event) - if len(event.head_comment) > 0 && len(event.foot_comment) == 0 { - event.foot_comment = event.head_comment - event.head_comment = nil - } - return true -} - -func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) { - event.head_comment = parser.head_comment - event.line_comment = parser.line_comment - event.foot_comment = parser.foot_comment - parser.head_comment = nil - parser.line_comment = nil - parser.foot_comment = nil - parser.tail_comment = nil - parser.stem_comment = nil -} - -// Parse the productions: -// block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * -// block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * -// flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* -// block_content ::= block_collection | flow_collection | SCALAR -// ****** -// flow_content ::= flow_collection | SCALAR -// ****** -func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { - //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_ALIAS_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - *event = yaml_event_t{ - typ: yaml_ALIAS_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - anchor: token.value, - } - yaml_parser_set_event_comments(parser, event) - skip_token(parser) - return true - } - - start_mark := token.start_mark - end_mark := token.start_mark - - var tag_token bool - var tag_handle, tag_suffix, anchor []byte - var tag_mark yaml_mark_t - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - start_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } else if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - start_mark = token.start_mark - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - var tag []byte - if tag_token { - if len(tag_handle) == 0 { - tag = tag_suffix - tag_suffix = nil - } else { - for i := range parser.tag_directives { - if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { - tag = append([]byte(nil), parser.tag_directives[i].prefix...) - tag = append(tag, tag_suffix...) - break - } - } - if len(tag) == 0 { - yaml_parser_set_parser_error_context(parser, - "while parsing a node", start_mark, - "found undefined tag handle", tag_mark) - return false - } - } - } - - implicit := len(tag) == 0 - if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_SCALAR_TOKEN { - var plain_implicit, quoted_implicit bool - end_mark = token.end_mark - if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { - plain_implicit = true - } else if len(tag) == 0 { - quoted_implicit = true - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - value: token.value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(token.style), - } - yaml_parser_set_event_comments(parser, event) - skip_token(parser) - return true - } - if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { - // [Go] Some of the events below can be merged as they differ only on style. - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), - } - yaml_parser_set_event_comments(parser, event) - return true - } - if token.typ == yaml_FLOW_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - yaml_parser_set_event_comments(parser, event) - return true - } - if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - if parser.stem_comment != nil { - event.head_comment = parser.stem_comment - parser.stem_comment = nil - } - return true - } - if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), - } - if parser.stem_comment != nil { - event.head_comment = parser.stem_comment - parser.stem_comment = nil - } - return true - } - if len(anchor) > 0 || len(tag) > 0 { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - quoted_implicit: false, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true - } - - context := "while parsing a flow node" - if block { - context = "while parsing a block node" - } - yaml_parser_set_parser_error_context(parser, context, start_mark, - "did not find expected node content", token.start_mark) - return false -} - -// Parse the productions: -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* -// -func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - if token == nil { - return false - } - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - prior_head_len := len(parser.head_comment) - skip_token(parser) - yaml_parser_split_stem_comment(parser, prior_head_len) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } else { - parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } - if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block collection", context_mark, - "did not find expected '-' indicator", token.start_mark) -} - -// Parse the productions: -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * -func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - prior_head_len := len(parser.head_comment) - skip_token(parser) - yaml_parser_split_stem_comment(parser, prior_head_len) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && - token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? - } - return true -} - -// Split stem comment from head comment. -// -// When a sequence or map is found under a sequence entry, the former head comment -// is assigned to the underlying sequence or map as a whole, not the individual -// sequence or map entry as would be expected otherwise. To handle this case the -// previous head comment is moved aside as the stem comment. -func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { - if stem_len == 0 { - return - } - - token := peek_token(parser) - if token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { - return - } - - parser.stem_comment = parser.head_comment[:stem_len] - if len(parser.head_comment) == stem_len { - parser.head_comment = nil - } else { - // Copy suffix to prevent very strange bugs if someone ever appends - // further bytes to the prefix in the stem_comment slice above. - parser.head_comment = append([]byte(nil), parser.head_comment[stem_len+1:]...) - } -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* -// -// BLOCK-END -// ********* -// -func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - if token == nil { - return false - } - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - // [Go] A tail comment was left from the prior mapping value processed. Emit an event - // as it needs to be processed with that value and not the following key. - if len(parser.tail_comment) > 0 { - *event = yaml_event_t{ - typ: yaml_TAIL_COMMENT_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - foot_comment: parser.tail_comment, - } - parser.tail_comment = nil - return true - } - - if token.typ == yaml_KEY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } else { - parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } else if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - yaml_parser_set_event_comments(parser, event) - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block mapping", context_mark, - "did not find expected key", token.start_mark) -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// -// -func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - if token == nil { - return false - } - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow sequence", context_mark, - "did not find expected ',' or ']'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - implicit: true, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - skip_token(parser) - return true - } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - yaml_parser_set_event_comments(parser, event) - - skip_token(parser) - return true -} - -// -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - mark := token.end_mark - skip_token(parser) - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? - } - return true -} - -// Parse the productions: -// flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * -// -func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow mapping", context_mark, - "did not find expected ',' or '}'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } else { - parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - yaml_parser_set_event_comments(parser, event) - skip_token(parser) - return true -} - -// Parse the productions: -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// -func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { - token := peek_token(parser) - if token == nil { - return false - } - if empty { - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Generate an empty scalar event. -func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: mark, - end_mark: mark, - value: nil, // Empty - implicit: true, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true -} - -var default_tag_directives = []yaml_tag_directive_t{ - {[]byte("!"), []byte("!")}, - {[]byte("!!"), []byte("tag:yaml.org,2002:")}, -} - -// Parse directives. -func yaml_parser_process_directives(parser *yaml_parser_t, - version_directive_ref **yaml_version_directive_t, - tag_directives_ref *[]yaml_tag_directive_t) bool { - - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - - token := peek_token(parser) - if token == nil { - return false - } - - for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { - if version_directive != nil { - yaml_parser_set_parser_error(parser, - "found duplicate %YAML directive", token.start_mark) - return false - } - if token.major != 1 || token.minor != 1 { - yaml_parser_set_parser_error(parser, - "found incompatible YAML document", token.start_mark) - return false - } - version_directive = &yaml_version_directive_t{ - major: token.major, - minor: token.minor, - } - } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { - value := yaml_tag_directive_t{ - handle: token.value, - prefix: token.prefix, - } - if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { - return false - } - tag_directives = append(tag_directives, value) - } - - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - - for i := range default_tag_directives { - if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { - return false - } - } - - if version_directive_ref != nil { - *version_directive_ref = version_directive - } - if tag_directives_ref != nil { - *tag_directives_ref = tag_directives - } - return true -} - -// Append a tag directive to the directives stack. -func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { - for i := range parser.tag_directives { - if bytes.Equal(value.handle, parser.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) - } - } - - // [Go] I suspect the copy is unnecessary. This was likely done - // because there was no way to track ownership of the data. - value_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(value_copy.handle, value.handle) - copy(value_copy.prefix, value.prefix) - parser.tag_directives = append(parser.tag_directives, value_copy) - return true -} diff --git a/vendor/gopkg.in/yaml.v3/readerc.go b/vendor/gopkg.in/yaml.v3/readerc.go deleted file mode 100644 index b7de0a89..00000000 --- a/vendor/gopkg.in/yaml.v3/readerc.go +++ /dev/null @@ -1,434 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -import ( - "io" -) - -// Set the reader error and return 0. -func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { - parser.error = yaml_READER_ERROR - parser.problem = problem - parser.problem_offset = offset - parser.problem_value = value - return false -} - -// Byte order marks. -const ( - bom_UTF8 = "\xef\xbb\xbf" - bom_UTF16LE = "\xff\xfe" - bom_UTF16BE = "\xfe\xff" -) - -// Determine the input stream encoding by checking the BOM symbol. If no BOM is -// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. -func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { - // Ensure that we had enough bytes in the raw buffer. - for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { - if !yaml_parser_update_raw_buffer(parser) { - return false - } - } - - // Determine the encoding. - buf := parser.raw_buffer - pos := parser.raw_buffer_pos - avail := len(buf) - pos - if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { - parser.encoding = yaml_UTF16LE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { - parser.encoding = yaml_UTF16BE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { - parser.encoding = yaml_UTF8_ENCODING - parser.raw_buffer_pos += 3 - parser.offset += 3 - } else { - parser.encoding = yaml_UTF8_ENCODING - } - return true -} - -// Update the raw buffer. -func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { - size_read := 0 - - // Return if the raw buffer is full. - if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { - return true - } - - // Return on EOF. - if parser.eof { - return true - } - - // Move the remaining bytes in the raw buffer to the beginning. - if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { - copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) - } - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] - parser.raw_buffer_pos = 0 - - // Call the read handler to fill the buffer. - size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] - if err == io.EOF { - parser.eof = true - } else if err != nil { - return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) - } - return true -} - -// Ensure that the buffer contains at least `length` characters. -// Return true on success, false on failure. -// -// The length is supposed to be significantly less that the buffer size. -func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { - if parser.read_handler == nil { - panic("read handler must be set") - } - - // [Go] This function was changed to guarantee the requested length size at EOF. - // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests - - // If the EOF flag is set and the raw buffer is empty, do nothing. - if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { - // [Go] ACTUALLY! Read the documentation of this function above. - // This is just broken. To return true, we need to have the - // given length in the buffer. Not doing that means every single - // check that calls this function to make sure the buffer has a - // given length is Go) panicking; or C) accessing invalid memory. - //return true - } - - // Return if the buffer contains enough characters. - if parser.unread >= length { - return true - } - - // Determine the input encoding if it is not known yet. - if parser.encoding == yaml_ANY_ENCODING { - if !yaml_parser_determine_encoding(parser) { - return false - } - } - - // Move the unread characters to the beginning of the buffer. - buffer_len := len(parser.buffer) - if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { - copy(parser.buffer, parser.buffer[parser.buffer_pos:]) - buffer_len -= parser.buffer_pos - parser.buffer_pos = 0 - } else if parser.buffer_pos == buffer_len { - buffer_len = 0 - parser.buffer_pos = 0 - } - - // Open the whole buffer for writing, and cut it before returning. - parser.buffer = parser.buffer[:cap(parser.buffer)] - - // Fill the buffer until it has enough characters. - first := true - for parser.unread < length { - - // Fill the raw buffer if necessary. - if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { - if !yaml_parser_update_raw_buffer(parser) { - parser.buffer = parser.buffer[:buffer_len] - return false - } - } - first = false - - // Decode the raw buffer. - inner: - for parser.raw_buffer_pos != len(parser.raw_buffer) { - var value rune - var width int - - raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos - - // Decode the next character. - switch parser.encoding { - case yaml_UTF8_ENCODING: - // Decode a UTF-8 character. Check RFC 3629 - // (http://www.ietf.org/rfc/rfc3629.txt) for more details. - // - // The following table (taken from the RFC) is used for - // decoding. - // - // Char. number range | UTF-8 octet sequence - // (hexadecimal) | (binary) - // --------------------+------------------------------------ - // 0000 0000-0000 007F | 0xxxxxxx - // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx - // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx - // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // - // Additionally, the characters in the range 0xD800-0xDFFF - // are prohibited as they are reserved for use with UTF-16 - // surrogate pairs. - - // Determine the length of the UTF-8 sequence. - octet := parser.raw_buffer[parser.raw_buffer_pos] - switch { - case octet&0x80 == 0x00: - width = 1 - case octet&0xE0 == 0xC0: - width = 2 - case octet&0xF0 == 0xE0: - width = 3 - case octet&0xF8 == 0xF0: - width = 4 - default: - // The leading octet is invalid. - return yaml_parser_set_reader_error(parser, - "invalid leading UTF-8 octet", - parser.offset, int(octet)) - } - - // Check if the raw buffer contains an incomplete character. - if width > raw_unread { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-8 octet sequence", - parser.offset, -1) - } - break inner - } - - // Decode the leading octet. - switch { - case octet&0x80 == 0x00: - value = rune(octet & 0x7F) - case octet&0xE0 == 0xC0: - value = rune(octet & 0x1F) - case octet&0xF0 == 0xE0: - value = rune(octet & 0x0F) - case octet&0xF8 == 0xF0: - value = rune(octet & 0x07) - default: - value = 0 - } - - // Check and decode the trailing octets. - for k := 1; k < width; k++ { - octet = parser.raw_buffer[parser.raw_buffer_pos+k] - - // Check if the octet is valid. - if (octet & 0xC0) != 0x80 { - return yaml_parser_set_reader_error(parser, - "invalid trailing UTF-8 octet", - parser.offset+k, int(octet)) - } - - // Decode the octet. - value = (value << 6) + rune(octet&0x3F) - } - - // Check the length of the sequence against the value. - switch { - case width == 1: - case width == 2 && value >= 0x80: - case width == 3 && value >= 0x800: - case width == 4 && value >= 0x10000: - default: - return yaml_parser_set_reader_error(parser, - "invalid length of a UTF-8 sequence", - parser.offset, -1) - } - - // Check the range of the value. - if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { - return yaml_parser_set_reader_error(parser, - "invalid Unicode character", - parser.offset, int(value)) - } - - case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: - var low, high int - if parser.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - low, high = 1, 0 - } - - // The UTF-16 encoding is not as simple as one might - // naively think. Check RFC 2781 - // (http://www.ietf.org/rfc/rfc2781.txt). - // - // Normally, two subsequent bytes describe a Unicode - // character. However a special technique (called a - // surrogate pair) is used for specifying character - // values larger than 0xFFFF. - // - // A surrogate pair consists of two pseudo-characters: - // high surrogate area (0xD800-0xDBFF) - // low surrogate area (0xDC00-0xDFFF) - // - // The following formulas are used for decoding - // and encoding characters using surrogate pairs: - // - // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) - // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) - // W1 = 110110yyyyyyyyyy - // W2 = 110111xxxxxxxxxx - // - // where U is the character value, W1 is the high surrogate - // area, W2 is the low surrogate area. - - // Check for incomplete UTF-16 character. - if raw_unread < 2 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 character", - parser.offset, -1) - } - break inner - } - - // Get the character. - value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) - - // Check for unexpected low surrogate area. - if value&0xFC00 == 0xDC00 { - return yaml_parser_set_reader_error(parser, - "unexpected low surrogate area", - parser.offset, int(value)) - } - - // Check for a high surrogate area. - if value&0xFC00 == 0xD800 { - width = 4 - - // Check for incomplete surrogate pair. - if raw_unread < 4 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 surrogate pair", - parser.offset, -1) - } - break inner - } - - // Get the next character. - value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) - - // Check for a low surrogate area. - if value2&0xFC00 != 0xDC00 { - return yaml_parser_set_reader_error(parser, - "expected low surrogate area", - parser.offset+2, int(value2)) - } - - // Generate the value of the surrogate pair. - value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) - } else { - width = 2 - } - - default: - panic("impossible") - } - - // Check if the character is in the allowed range: - // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) - // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) - // | [#x10000-#x10FFFF] (32 bit) - switch { - case value == 0x09: - case value == 0x0A: - case value == 0x0D: - case value >= 0x20 && value <= 0x7E: - case value == 0x85: - case value >= 0xA0 && value <= 0xD7FF: - case value >= 0xE000 && value <= 0xFFFD: - case value >= 0x10000 && value <= 0x10FFFF: - default: - return yaml_parser_set_reader_error(parser, - "control characters are not allowed", - parser.offset, int(value)) - } - - // Move the raw pointers. - parser.raw_buffer_pos += width - parser.offset += width - - // Finally put the character into the buffer. - if value <= 0x7F { - // 0000 0000-0000 007F . 0xxxxxxx - parser.buffer[buffer_len+0] = byte(value) - buffer_len += 1 - } else if value <= 0x7FF { - // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) - parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) - buffer_len += 2 - } else if value <= 0xFFFF { - // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) - buffer_len += 3 - } else { - // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) - buffer_len += 4 - } - - parser.unread++ - } - - // On EOF, put NUL into the buffer and return. - if parser.eof { - parser.buffer[buffer_len] = 0 - buffer_len++ - parser.unread++ - break - } - } - // [Go] Read the documentation of this function above. To return true, - // we need to have the given length in the buffer. Not doing that means - // every single check that calls this function to make sure the buffer - // has a given length is Go) panicking; or C) accessing invalid memory. - // This happens here due to the EOF above breaking early. - for buffer_len < length { - parser.buffer[buffer_len] = 0 - buffer_len++ - } - parser.buffer = parser.buffer[:buffer_len] - return true -} diff --git a/vendor/gopkg.in/yaml.v3/resolve.go b/vendor/gopkg.in/yaml.v3/resolve.go deleted file mode 100644 index 64ae8880..00000000 --- a/vendor/gopkg.in/yaml.v3/resolve.go +++ /dev/null @@ -1,326 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// -// 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 yaml - -import ( - "encoding/base64" - "math" - "regexp" - "strconv" - "strings" - "time" -) - -type resolveMapItem struct { - value interface{} - tag string -} - -var resolveTable = make([]byte, 256) -var resolveMap = make(map[string]resolveMapItem) - -func init() { - t := resolveTable - t[int('+')] = 'S' // Sign - t[int('-')] = 'S' - for _, c := range "0123456789" { - t[int(c)] = 'D' // Digit - } - for _, c := range "yYnNtTfFoO~" { - t[int(c)] = 'M' // In map - } - t[int('.')] = '.' // Float (potentially in map) - - var resolveMapList = []struct { - v interface{} - tag string - l []string - }{ - {true, boolTag, []string{"true", "True", "TRUE"}}, - {false, boolTag, []string{"false", "False", "FALSE"}}, - {nil, nullTag, []string{"", "~", "null", "Null", "NULL"}}, - {math.NaN(), floatTag, []string{".nan", ".NaN", ".NAN"}}, - {math.Inf(+1), floatTag, []string{".inf", ".Inf", ".INF"}}, - {math.Inf(+1), floatTag, []string{"+.inf", "+.Inf", "+.INF"}}, - {math.Inf(-1), floatTag, []string{"-.inf", "-.Inf", "-.INF"}}, - {"<<", mergeTag, []string{"<<"}}, - } - - m := resolveMap - for _, item := range resolveMapList { - for _, s := range item.l { - m[s] = resolveMapItem{item.v, item.tag} - } - } -} - -const ( - nullTag = "!!null" - boolTag = "!!bool" - strTag = "!!str" - intTag = "!!int" - floatTag = "!!float" - timestampTag = "!!timestamp" - seqTag = "!!seq" - mapTag = "!!map" - binaryTag = "!!binary" - mergeTag = "!!merge" -) - -var longTags = make(map[string]string) -var shortTags = make(map[string]string) - -func init() { - for _, stag := range []string{nullTag, boolTag, strTag, intTag, floatTag, timestampTag, seqTag, mapTag, binaryTag, mergeTag} { - ltag := longTag(stag) - longTags[stag] = ltag - shortTags[ltag] = stag - } -} - -const longTagPrefix = "tag:yaml.org,2002:" - -func shortTag(tag string) string { - if strings.HasPrefix(tag, longTagPrefix) { - if stag, ok := shortTags[tag]; ok { - return stag - } - return "!!" + tag[len(longTagPrefix):] - } - return tag -} - -func longTag(tag string) string { - if strings.HasPrefix(tag, "!!") { - if ltag, ok := longTags[tag]; ok { - return ltag - } - return longTagPrefix + tag[2:] - } - return tag -} - -func resolvableTag(tag string) bool { - switch tag { - case "", strTag, boolTag, intTag, floatTag, nullTag, timestampTag: - return true - } - return false -} - -var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) - -func resolve(tag string, in string) (rtag string, out interface{}) { - tag = shortTag(tag) - if !resolvableTag(tag) { - return tag, in - } - - defer func() { - switch tag { - case "", rtag, strTag, binaryTag: - return - case floatTag: - if rtag == intTag { - switch v := out.(type) { - case int64: - rtag = floatTag - out = float64(v) - return - case int: - rtag = floatTag - out = float64(v) - return - } - } - } - failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) - }() - - // Any data is accepted as a !!str or !!binary. - // Otherwise, the prefix is enough of a hint about what it might be. - hint := byte('N') - if in != "" { - hint = resolveTable[in[0]] - } - if hint != 0 && tag != strTag && tag != binaryTag { - // Handle things we can lookup in a map. - if item, ok := resolveMap[in]; ok { - return item.tag, item.value - } - - // Base 60 floats are a bad idea, were dropped in YAML 1.2, and - // are purposefully unsupported here. They're still quoted on - // the way out for compatibility with other parser, though. - - switch hint { - case 'M': - // We've already checked the map above. - - case '.': - // Not in the map, so maybe a normal float. - floatv, err := strconv.ParseFloat(in, 64) - if err == nil { - return floatTag, floatv - } - - case 'D', 'S': - // Int, float, or timestamp. - // Only try values as a timestamp if the value is unquoted or there's an explicit - // !!timestamp tag. - if tag == "" || tag == timestampTag { - t, ok := parseTimestamp(in) - if ok { - return timestampTag, t - } - } - - plain := strings.Replace(in, "_", "", -1) - intv, err := strconv.ParseInt(plain, 0, 64) - if err == nil { - if intv == int64(int(intv)) { - return intTag, int(intv) - } else { - return intTag, intv - } - } - uintv, err := strconv.ParseUint(plain, 0, 64) - if err == nil { - return intTag, uintv - } - if yamlStyleFloat.MatchString(plain) { - floatv, err := strconv.ParseFloat(plain, 64) - if err == nil { - return floatTag, floatv - } - } - if strings.HasPrefix(plain, "0b") { - intv, err := strconv.ParseInt(plain[2:], 2, 64) - if err == nil { - if intv == int64(int(intv)) { - return intTag, int(intv) - } else { - return intTag, intv - } - } - uintv, err := strconv.ParseUint(plain[2:], 2, 64) - if err == nil { - return intTag, uintv - } - } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) - if err == nil { - if true || intv == int64(int(intv)) { - return intTag, int(intv) - } else { - return intTag, intv - } - } - } - // Octals as introduced in version 1.2 of the spec. - // Octals from the 1.1 spec, spelled as 0777, are still - // decoded by default in v3 as well for compatibility. - // May be dropped in v4 depending on how usage evolves. - if strings.HasPrefix(plain, "0o") { - intv, err := strconv.ParseInt(plain[2:], 8, 64) - if err == nil { - if intv == int64(int(intv)) { - return intTag, int(intv) - } else { - return intTag, intv - } - } - uintv, err := strconv.ParseUint(plain[2:], 8, 64) - if err == nil { - return intTag, uintv - } - } else if strings.HasPrefix(plain, "-0o") { - intv, err := strconv.ParseInt("-"+plain[3:], 8, 64) - if err == nil { - if true || intv == int64(int(intv)) { - return intTag, int(intv) - } else { - return intTag, intv - } - } - } - default: - panic("internal error: missing handler for resolver table: " + string(rune(hint)) + " (with " + in + ")") - } - } - return strTag, in -} - -// encodeBase64 encodes s as base64 that is broken up into multiple lines -// as appropriate for the resulting length. -func encodeBase64(s string) string { - const lineLen = 70 - encLen := base64.StdEncoding.EncodedLen(len(s)) - lines := encLen/lineLen + 1 - buf := make([]byte, encLen*2+lines) - in := buf[0:encLen] - out := buf[encLen:] - base64.StdEncoding.Encode(in, []byte(s)) - k := 0 - for i := 0; i < len(in); i += lineLen { - j := i + lineLen - if j > len(in) { - j = len(in) - } - k += copy(out[k:], in[i:j]) - if lines > 1 { - out[k] = '\n' - k++ - } - } - return string(out[:k]) -} - -// This is a subset of the formats allowed by the regular expression -// defined at http://yaml.org/type/timestamp.html. -var allowedTimestampFormats = []string{ - "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. - "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". - "2006-1-2 15:4:5.999999999", // space separated with no time zone - "2006-1-2", // date only - // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" - // from the set of examples. -} - -// parseTimestamp parses s as a timestamp string and -// returns the timestamp and reports whether it succeeded. -// Timestamp formats are defined at http://yaml.org/type/timestamp.html -func parseTimestamp(s string) (time.Time, bool) { - // TODO write code to check all the formats supported by - // http://yaml.org/type/timestamp.html instead of using time.Parse. - - // Quick check: all date formats start with YYYY-. - i := 0 - for ; i < len(s); i++ { - if c := s[i]; c < '0' || c > '9' { - break - } - } - if i != 4 || i == len(s) || s[i] != '-' { - return time.Time{}, false - } - for _, format := range allowedTimestampFormats { - if t, err := time.Parse(format, s); err == nil { - return t, true - } - } - return time.Time{}, false -} diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go deleted file mode 100644 index ca007010..00000000 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ /dev/null @@ -1,3038 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -import ( - "bytes" - "fmt" -) - -// Introduction -// ************ -// -// The following notes assume that you are familiar with the YAML specification -// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in -// some cases we are less restrictive that it requires. -// -// The process of transforming a YAML stream into a sequence of events is -// divided on two steps: Scanning and Parsing. -// -// The Scanner transforms the input stream into a sequence of tokens, while the -// parser transform the sequence of tokens produced by the Scanner into a -// sequence of parsing events. -// -// The Scanner is rather clever and complicated. The Parser, on the contrary, -// is a straightforward implementation of a recursive-descendant parser (or, -// LL(1) parser, as it is usually called). -// -// Actually there are two issues of Scanning that might be called "clever", the -// rest is quite straightforward. The issues are "block collection start" and -// "simple keys". Both issues are explained below in details. -// -// Here the Scanning step is explained and implemented. We start with the list -// of all the tokens produced by the Scanner together with short descriptions. -// -// Now, tokens: -// -// STREAM-START(encoding) # The stream start. -// STREAM-END # The stream end. -// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. -// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. -// DOCUMENT-START # '---' -// DOCUMENT-END # '...' -// BLOCK-SEQUENCE-START # Indentation increase denoting a block -// BLOCK-MAPPING-START # sequence or a block mapping. -// BLOCK-END # Indentation decrease. -// FLOW-SEQUENCE-START # '[' -// FLOW-SEQUENCE-END # ']' -// BLOCK-SEQUENCE-START # '{' -// BLOCK-SEQUENCE-END # '}' -// BLOCK-ENTRY # '-' -// FLOW-ENTRY # ',' -// KEY # '?' or nothing (simple keys). -// VALUE # ':' -// ALIAS(anchor) # '*anchor' -// ANCHOR(anchor) # '&anchor' -// TAG(handle,suffix) # '!handle!suffix' -// SCALAR(value,style) # A scalar. -// -// The following two tokens are "virtual" tokens denoting the beginning and the -// end of the stream: -// -// STREAM-START(encoding) -// STREAM-END -// -// We pass the information about the input stream encoding with the -// STREAM-START token. -// -// The next two tokens are responsible for tags: -// -// VERSION-DIRECTIVE(major,minor) -// TAG-DIRECTIVE(handle,prefix) -// -// Example: -// -// %YAML 1.1 -// %TAG ! !foo -// %TAG !yaml! tag:yaml.org,2002: -// --- -// -// The correspoding sequence of tokens: -// -// STREAM-START(utf-8) -// VERSION-DIRECTIVE(1,1) -// TAG-DIRECTIVE("!","!foo") -// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") -// DOCUMENT-START -// STREAM-END -// -// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole -// line. -// -// The document start and end indicators are represented by: -// -// DOCUMENT-START -// DOCUMENT-END -// -// Note that if a YAML stream contains an implicit document (without '---' -// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be -// produced. -// -// In the following examples, we present whole documents together with the -// produced tokens. -// -// 1. An implicit document: -// -// 'a scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// STREAM-END -// -// 2. An explicit document: -// -// --- -// 'a scalar' -// ... -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// SCALAR("a scalar",single-quoted) -// DOCUMENT-END -// STREAM-END -// -// 3. Several documents in a stream: -// -// 'a scalar' -// --- -// 'another scalar' -// --- -// 'yet another scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// DOCUMENT-START -// SCALAR("another scalar",single-quoted) -// DOCUMENT-START -// SCALAR("yet another scalar",single-quoted) -// STREAM-END -// -// We have already introduced the SCALAR token above. The following tokens are -// used to describe aliases, anchors, tag, and scalars: -// -// ALIAS(anchor) -// ANCHOR(anchor) -// TAG(handle,suffix) -// SCALAR(value,style) -// -// The following series of examples illustrate the usage of these tokens: -// -// 1. A recursive sequence: -// -// &A [ *A ] -// -// Tokens: -// -// STREAM-START(utf-8) -// ANCHOR("A") -// FLOW-SEQUENCE-START -// ALIAS("A") -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A tagged scalar: -// -// !!float "3.14" # A good approximation. -// -// Tokens: -// -// STREAM-START(utf-8) -// TAG("!!","float") -// SCALAR("3.14",double-quoted) -// STREAM-END -// -// 3. Various scalar styles: -// -// --- # Implicit empty plain scalars do not produce tokens. -// --- a plain scalar -// --- 'a single-quoted scalar' -// --- "a double-quoted scalar" -// --- |- -// a literal scalar -// --- >- -// a folded -// scalar -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// DOCUMENT-START -// SCALAR("a plain scalar",plain) -// DOCUMENT-START -// SCALAR("a single-quoted scalar",single-quoted) -// DOCUMENT-START -// SCALAR("a double-quoted scalar",double-quoted) -// DOCUMENT-START -// SCALAR("a literal scalar",literal) -// DOCUMENT-START -// SCALAR("a folded scalar",folded) -// STREAM-END -// -// Now it's time to review collection-related tokens. We will start with -// flow collections: -// -// FLOW-SEQUENCE-START -// FLOW-SEQUENCE-END -// FLOW-MAPPING-START -// FLOW-MAPPING-END -// FLOW-ENTRY -// KEY -// VALUE -// -// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and -// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' -// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the -// indicators '?' and ':', which are used for denoting mapping keys and values, -// are represented by the KEY and VALUE tokens. -// -// The following examples show flow collections: -// -// 1. A flow sequence: -// -// [item 1, item 2, item 3] -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-SEQUENCE-START -// SCALAR("item 1",plain) -// FLOW-ENTRY -// SCALAR("item 2",plain) -// FLOW-ENTRY -// SCALAR("item 3",plain) -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A flow mapping: -// -// { -// a simple key: a value, # Note that the KEY token is produced. -// ? a complex key: another value, -// } -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// FLOW-ENTRY -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// FLOW-ENTRY -// FLOW-MAPPING-END -// STREAM-END -// -// A simple key is a key which is not denoted by the '?' indicator. Note that -// the Scanner still produce the KEY token whenever it encounters a simple key. -// -// For scanning block collections, the following tokens are used (note that we -// repeat KEY and VALUE here): -// -// BLOCK-SEQUENCE-START -// BLOCK-MAPPING-START -// BLOCK-END -// BLOCK-ENTRY -// KEY -// VALUE -// -// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation -// increase that precedes a block collection (cf. the INDENT token in Python). -// The token BLOCK-END denote indentation decrease that ends a block collection -// (cf. the DEDENT token in Python). However YAML has some syntax pecularities -// that makes detections of these tokens more complex. -// -// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators -// '-', '?', and ':' correspondingly. -// -// The following examples show how the tokens BLOCK-SEQUENCE-START, -// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: -// -// 1. Block sequences: -// -// - item 1 -// - item 2 -// - -// - item 3.1 -// - item 3.2 -// - -// key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 3.1",plain) -// BLOCK-ENTRY -// SCALAR("item 3.2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Block mappings: -// -// a simple key: a value # The KEY token is produced here. -// ? a complex key -// : another value -// a mapping: -// key 1: value 1 -// key 2: value 2 -// a sequence: -// - item 1 -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// KEY -// SCALAR("a mapping",plain) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML does not always require to start a new block collection from a new -// line. If the current line contains only '-', '?', and ':' indicators, a new -// block collection may start at the current line. The following examples -// illustrate this case: -// -// 1. Collections in a sequence: -// -// - - item 1 -// - item 2 -// - key 1: value 1 -// key 2: value 2 -// - ? complex key -// : complex value -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("complex key") -// VALUE -// SCALAR("complex value") -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Collections in a mapping: -// -// ? a sequence -// : - item 1 -// - item 2 -// ? a mapping -// : key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// KEY -// SCALAR("a mapping",plain) -// VALUE -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML also permits non-indented sequences if they are included into a block -// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: -// -// key: -// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key",plain) -// VALUE -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// - -// Ensure that the buffer contains the required number of characters. -// Return true on success, false on failure (reader error or memory error). -func cache(parser *yaml_parser_t, length int) bool { - // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) - return parser.unread >= length || yaml_parser_update_buffer(parser, length) -} - -// Advance the buffer pointer. -func skip(parser *yaml_parser_t) { - if !is_blank(parser.buffer, parser.buffer_pos) { - parser.newlines = 0 - } - parser.mark.index++ - parser.mark.column++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) -} - -func skip_line(parser *yaml_parser_t) { - if is_crlf(parser.buffer, parser.buffer_pos) { - parser.mark.index += 2 - parser.mark.column = 0 - parser.mark.line++ - parser.unread -= 2 - parser.buffer_pos += 2 - parser.newlines++ - } else if is_break(parser.buffer, parser.buffer_pos) { - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) - parser.newlines++ - } -} - -// Copy a character to a string buffer and advance pointers. -func read(parser *yaml_parser_t, s []byte) []byte { - if !is_blank(parser.buffer, parser.buffer_pos) { - parser.newlines = 0 - } - w := width(parser.buffer[parser.buffer_pos]) - if w == 0 { - panic("invalid character sequence") - } - if len(s) == 0 { - s = make([]byte, 0, 32) - } - if w == 1 && len(s)+w <= cap(s) { - s = s[:len(s)+1] - s[len(s)-1] = parser.buffer[parser.buffer_pos] - parser.buffer_pos++ - } else { - s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) - parser.buffer_pos += w - } - parser.mark.index++ - parser.mark.column++ - parser.unread-- - return s -} - -// Copy a line break character to a string buffer and advance pointers. -func read_line(parser *yaml_parser_t, s []byte) []byte { - buf := parser.buffer - pos := parser.buffer_pos - switch { - case buf[pos] == '\r' && buf[pos+1] == '\n': - // CR LF . LF - s = append(s, '\n') - parser.buffer_pos += 2 - parser.mark.index++ - parser.unread-- - case buf[pos] == '\r' || buf[pos] == '\n': - // CR|LF . LF - s = append(s, '\n') - parser.buffer_pos += 1 - case buf[pos] == '\xC2' && buf[pos+1] == '\x85': - // NEL . LF - s = append(s, '\n') - parser.buffer_pos += 2 - case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): - // LS|PS . LS|PS - s = append(s, buf[parser.buffer_pos:pos+3]...) - parser.buffer_pos += 3 - default: - return s - } - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - parser.newlines++ - return s -} - -// Get the next token. -func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { - // Erase the token object. - *token = yaml_token_t{} // [Go] Is this necessary? - - // No tokens after STREAM-END or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR { - return true - } - - // Ensure that the tokens queue contains enough tokens. - if !parser.token_available { - if !yaml_parser_fetch_more_tokens(parser) { - return false - } - } - - // Fetch the next token from the queue. - *token = parser.tokens[parser.tokens_head] - parser.tokens_head++ - parser.tokens_parsed++ - parser.token_available = false - - if token.typ == yaml_STREAM_END_TOKEN { - parser.stream_end_produced = true - } - return true -} - -// Set the scanner error and return false. -func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { - parser.error = yaml_SCANNER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = parser.mark - return false -} - -func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { - context := "while parsing a tag" - if directive { - context = "while parsing a %TAG directive" - } - return yaml_parser_set_scanner_error(parser, context, context_mark, problem) -} - -func trace(args ...interface{}) func() { - pargs := append([]interface{}{"+++"}, args...) - fmt.Println(pargs...) - pargs = append([]interface{}{"---"}, args...) - return func() { fmt.Println(pargs...) } -} - -// Ensure that the tokens queue contains at least one token which can be -// returned to the Parser. -func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { - // While we need more tokens to fetch, do it. - for { - // [Go] The comment parsing logic requires a lookahead of two tokens - // so that foot comments may be parsed in time of associating them - // with the tokens that are parsed before them, and also for line - // comments to be transformed into head comments in some edge cases. - if parser.tokens_head < len(parser.tokens)-2 { - // If a potential simple key is at the head position, we need to fetch - // the next token to disambiguate it. - head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] - if !ok { - break - } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { - return false - } else if !valid { - break - } - } - // Fetch the next token. - if !yaml_parser_fetch_next_token(parser) { - return false - } - } - - parser.token_available = true - return true -} - -// The dispatcher for token fetchers. -func yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) { - // Ensure that the buffer is initialized. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we just started scanning. Fetch STREAM-START then. - if !parser.stream_start_produced { - return yaml_parser_fetch_stream_start(parser) - } - - scan_mark := parser.mark - - // Eat whitespaces and comments until we reach the next token. - if !yaml_parser_scan_to_next_token(parser) { - return false - } - - // [Go] While unrolling indents, transform the head comments of prior - // indentation levels observed after scan_start into foot comments at - // the respective indexes. - - // Check the indentation level against the current column. - if !yaml_parser_unroll_indent(parser, parser.mark.column, scan_mark) { - return false - } - - // Ensure that the buffer contains at least 4 characters. 4 is the length - // of the longest indicators ('--- ' and '... '). - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - // Is it the end of the stream? - if is_z(parser.buffer, parser.buffer_pos) { - return yaml_parser_fetch_stream_end(parser) - } - - // Is it a directive? - if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { - return yaml_parser_fetch_directive(parser) - } - - buf := parser.buffer - pos := parser.buffer_pos - - // Is it the document start indicator? - if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) - } - - // Is it the document end indicator? - if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) - } - - comment_mark := parser.mark - if len(parser.tokens) > 0 && (parser.flow_level == 0 && buf[pos] == ':' || parser.flow_level > 0 && buf[pos] == ',') { - // Associate any following comments with the prior token. - comment_mark = parser.tokens[len(parser.tokens)-1].start_mark - } - defer func() { - if !ok { - return - } - if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN { - // Sequence indicators alone have no line comments. It becomes - // a head comment for whatever follows. - return - } - if !yaml_parser_scan_line_comment(parser, comment_mark) { - ok = false - return - } - }() - - // Is it the flow sequence start indicator? - if buf[pos] == '[' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) - } - - // Is it the flow mapping start indicator? - if parser.buffer[parser.buffer_pos] == '{' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) - } - - // Is it the flow sequence end indicator? - if parser.buffer[parser.buffer_pos] == ']' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_SEQUENCE_END_TOKEN) - } - - // Is it the flow mapping end indicator? - if parser.buffer[parser.buffer_pos] == '}' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_MAPPING_END_TOKEN) - } - - // Is it the flow entry indicator? - if parser.buffer[parser.buffer_pos] == ',' { - return yaml_parser_fetch_flow_entry(parser) - } - - // Is it the block entry indicator? - if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { - return yaml_parser_fetch_block_entry(parser) - } - - // Is it the key indicator? - if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_key(parser) - } - - // Is it the value indicator? - if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_value(parser) - } - - // Is it an alias? - if parser.buffer[parser.buffer_pos] == '*' { - return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) - } - - // Is it an anchor? - if parser.buffer[parser.buffer_pos] == '&' { - return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) - } - - // Is it a tag? - if parser.buffer[parser.buffer_pos] == '!' { - return yaml_parser_fetch_tag(parser) - } - - // Is it a literal scalar? - if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, true) - } - - // Is it a folded scalar? - if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, false) - } - - // Is it a single-quoted scalar? - if parser.buffer[parser.buffer_pos] == '\'' { - return yaml_parser_fetch_flow_scalar(parser, true) - } - - // Is it a double-quoted scalar? - if parser.buffer[parser.buffer_pos] == '"' { - return yaml_parser_fetch_flow_scalar(parser, false) - } - - // Is it a plain scalar? - // - // A plain scalar may start with any non-blank characters except - // - // '-', '?', ':', ',', '[', ']', '{', '}', - // '#', '&', '*', '!', '|', '>', '\'', '\"', - // '%', '@', '`'. - // - // In the block context (and, for the '-' indicator, in the flow context - // too), it may also start with the characters - // - // '-', '?', ':' - // - // if it is followed by a non-space character. - // - // The last rule is more restrictive than the specification requires. - // [Go] TODO Make this logic more reasonable. - //switch parser.buffer[parser.buffer_pos] { - //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': - //} - if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || - parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || - parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || - (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level == 0 && - (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && - !is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_plain_scalar(parser) - } - - // If we don't determine the token type so far, it is an error. - return yaml_parser_set_scanner_error(parser, - "while scanning for the next token", parser.mark, - "found character that cannot start any token") -} - -func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { - if !simple_key.possible { - return false, true - } - - // The 1.2 specification says: - // - // "If the ? indicator is omitted, parsing needs to see past the - // implicit key to recognize it as such. To limit the amount of - // lookahead required, the “:” indicator must appear at most 1024 - // Unicode characters beyond the start of the key. In addition, the key - // is restricted to a single line." - // - if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index { - // Check if the potential simple key to be removed is required. - if simple_key.required { - return false, yaml_parser_set_scanner_error(parser, - "while scanning a simple key", simple_key.mark, - "could not find expected ':'") - } - simple_key.possible = false - return false, true - } - return true, true -} - -// Check if a simple key may start at the current position and add it if -// needed. -func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { - // A simple key is required at the current position if the scanner is in - // the block context and the current column coincides with the indentation - // level. - - required := parser.flow_level == 0 && parser.indent == parser.mark.column - - // - // If the current position may start a simple key, save it. - // - if parser.simple_key_allowed { - simple_key := yaml_simple_key_t{ - possible: true, - required: required, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - mark: parser.mark, - } - - if !yaml_parser_remove_simple_key(parser) { - return false - } - parser.simple_keys[len(parser.simple_keys)-1] = simple_key - parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 - } - return true -} - -// Remove a potential simple key at the current flow level. -func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { - i := len(parser.simple_keys) - 1 - if parser.simple_keys[i].possible { - // If the key is required, it is an error. - if parser.simple_keys[i].required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", parser.simple_keys[i].mark, - "could not find expected ':'") - } - // Remove the key from the stack. - parser.simple_keys[i].possible = false - delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) - } - return true -} - -// max_flow_level limits the flow_level -const max_flow_level = 10000 - -// Increase the flow level and resize the simple key list if needed. -func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { - // Reset the simple key on the next level. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{ - possible: false, - required: false, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - mark: parser.mark, - }) - - // Increase the flow level. - parser.flow_level++ - if parser.flow_level > max_flow_level { - return yaml_parser_set_scanner_error(parser, - "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, - fmt.Sprintf("exceeded max depth of %d", max_flow_level)) - } - return true -} - -// Decrease the flow level. -func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { - if parser.flow_level > 0 { - parser.flow_level-- - last := len(parser.simple_keys) - 1 - delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) - parser.simple_keys = parser.simple_keys[:last] - } - return true -} - -// max_indents limits the indents stack size -const max_indents = 10000 - -// Push the current indentation level to the stack and set the new level -// the current column is greater than the indentation level. In this case, -// append or insert the specified token into the token queue. -func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - if parser.indent < column { - // Push the current indentation level to the stack and set the new - // indentation level. - parser.indents = append(parser.indents, parser.indent) - parser.indent = column - if len(parser.indents) > max_indents { - return yaml_parser_set_scanner_error(parser, - "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, - fmt.Sprintf("exceeded max depth of %d", max_indents)) - } - - // Create a token and insert it into the queue. - token := yaml_token_t{ - typ: typ, - start_mark: mark, - end_mark: mark, - } - if number > -1 { - number -= parser.tokens_parsed - } - yaml_insert_token(parser, number, &token) - } - return true -} - -// Pop indentation levels from the indents stack until the current level -// becomes less or equal to the column. For each indentation level, append -// the BLOCK-END token. -func yaml_parser_unroll_indent(parser *yaml_parser_t, column int, scan_mark yaml_mark_t) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - block_mark := scan_mark - block_mark.index-- - - // Loop through the indentation levels in the stack. - for parser.indent > column { - - // [Go] Reposition the end token before potential following - // foot comments of parent blocks. For that, search - // backwards for recent comments that were at the same - // indent as the block that is ending now. - stop_index := block_mark.index - for i := len(parser.comments) - 1; i >= 0; i-- { - comment := &parser.comments[i] - - if comment.end_mark.index < stop_index { - // Don't go back beyond the start of the comment/whitespace scan, unless column < 0. - // If requested indent column is < 0, then the document is over and everything else - // is a foot anyway. - break - } - if comment.start_mark.column == parser.indent+1 { - // This is a good match. But maybe there's a former comment - // at that same indent level, so keep searching. - block_mark = comment.start_mark - } - - // While the end of the former comment matches with - // the start of the following one, we know there's - // nothing in between and scanning is still safe. - stop_index = comment.scan_mark.index - } - - // Create a token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_END_TOKEN, - start_mark: block_mark, - end_mark: block_mark, - } - yaml_insert_token(parser, -1, &token) - - // Pop the indentation level. - parser.indent = parser.indents[len(parser.indents)-1] - parser.indents = parser.indents[:len(parser.indents)-1] - } - return true -} - -// Initialize the scanner and produce the STREAM-START token. -func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { - - // Set the initial indentation. - parser.indent = -1 - - // Initialize the simple key stack. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - parser.simple_keys_by_tok = make(map[int]int) - - // A simple key is allowed at the beginning of the stream. - parser.simple_key_allowed = true - - // We have started. - parser.stream_start_produced = true - - // Create the STREAM-START token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_START_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - encoding: parser.encoding, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the STREAM-END token and shut down the scanner. -func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { - - // Force new line. - if parser.mark.column != 0 { - parser.mark.column = 0 - parser.mark.line++ - } - - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1, parser.mark) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the STREAM-END token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. -func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1, parser.mark) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. - token := yaml_token_t{} - if !yaml_parser_scan_directive(parser, &token) { - return false - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the DOCUMENT-START or DOCUMENT-END token. -func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1, parser.mark) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Consume the token. - start_mark := parser.mark - - skip(parser) - skip(parser) - skip(parser) - - end_mark := parser.mark - - // Create the DOCUMENT-START or DOCUMENT-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. -func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { - - // The indicators '[' and '{' may start a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // Increase the flow level. - if !yaml_parser_increase_flow_level(parser) { - return false - } - - // A simple key may follow the indicators '[' and '{'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. -func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset any potential simple key on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Decrease the flow level. - if !yaml_parser_decrease_flow_level(parser) { - return false - } - - // No simple keys after the indicators ']' and '}'. - parser.simple_key_allowed = false - - // Consume the token. - - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-ENTRY token. -func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after ','. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_FLOW_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the BLOCK-ENTRY token. -func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { - // Check if the scanner is in the block context. - if parser.flow_level == 0 { - // Check if we are allowed to start a new entry. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "block sequence entries are not allowed in this context") - } - // Add the BLOCK-SEQUENCE-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { - return false - } - } else { - // It is an error for the '-' indicator to occur in the flow context, - // but we let the Parser detect and report about it because the Parser - // is able to point to the context. - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '-'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the BLOCK-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the KEY token. -func yaml_parser_fetch_key(parser *yaml_parser_t) bool { - - // In the block context, additional checks are required. - if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping keys are not allowed in this context") - } - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '?' in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the KEY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the VALUE token. -func yaml_parser_fetch_value(parser *yaml_parser_t) bool { - - simple_key := &parser.simple_keys[len(parser.simple_keys)-1] - - // Have we found a simple key? - if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { - return false - - } else if valid { - - // Create the KEY token and insert it into the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: simple_key.mark, - end_mark: simple_key.mark, - } - yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) - - // In the block context, we may need to add the BLOCK-MAPPING-START token. - if !yaml_parser_roll_indent(parser, simple_key.mark.column, - simple_key.token_number, - yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { - return false - } - - // Remove the simple key. - simple_key.possible = false - delete(parser.simple_keys_by_tok, simple_key.token_number) - - // A simple key cannot follow another simple key. - parser.simple_key_allowed = false - - } else { - // The ':' indicator follows a complex key. - - // In the block context, extra checks are required. - if parser.flow_level == 0 { - - // Check if we are allowed to start a complex value. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping values are not allowed in this context") - } - - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Simple keys after ':' are allowed in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - } - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the VALUE token and append it to the queue. - token := yaml_token_t{ - typ: yaml_VALUE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the ALIAS or ANCHOR token. -func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // An anchor or an alias could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow an anchor or an alias. - parser.simple_key_allowed = false - - // Create the ALIAS or ANCHOR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_anchor(parser, &token, typ) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the TAG token. -func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { - // A tag could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a tag. - parser.simple_key_allowed = false - - // Create the TAG token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_tag(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. -func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { - // Remove any potential simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // A simple key may follow a block scalar. - parser.simple_key_allowed = true - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_block_scalar(parser, &token, literal) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. -func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_flow_scalar(parser, &token, single) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,plain) token. -func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_plain_scalar(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Eat whitespaces and comments until the next token is found. -func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { - - scan_mark := parser.mark - - // Until the next token is not found. - for { - // Allow the BOM mark to start a line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { - skip(parser) - } - - // Eat whitespaces. - // Tabs are allowed: - // - in the flow context - // - in the block context, but not at the beginning of the line or - // after '-', '?', or ':' (complex value). - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if we just had a line comment under a sequence entry that - // looks more like a header to the following content. Similar to this: - // - // - # The comment - // - Some data - // - // If so, transform the line comment to a head comment and reposition. - if len(parser.comments) > 0 && len(parser.tokens) > 1 { - tokenA := parser.tokens[len(parser.tokens)-2] - tokenB := parser.tokens[len(parser.tokens)-1] - comment := &parser.comments[len(parser.comments)-1] - if tokenA.typ == yaml_BLOCK_SEQUENCE_START_TOKEN && tokenB.typ == yaml_BLOCK_ENTRY_TOKEN && len(comment.line) > 0 && !is_break(parser.buffer, parser.buffer_pos) { - // If it was in the prior line, reposition so it becomes a - // header of the follow up token. Otherwise, keep it in place - // so it becomes a header of the former. - comment.head = comment.line - comment.line = nil - if comment.start_mark.line == parser.mark.line-1 { - comment.token_mark = parser.mark - } - } - } - - // Eat a comment until a line break. - if parser.buffer[parser.buffer_pos] == '#' { - if !yaml_parser_scan_comments(parser, scan_mark) { - return false - } - } - - // If it is a line break, eat it. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - - // In the block context, a new line may start a simple key. - if parser.flow_level == 0 { - parser.simple_key_allowed = true - } - } else { - break // We have found a token. - } - } - - return true -} - -// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { - // Eat '%'. - start_mark := parser.mark - skip(parser) - - // Scan the directive name. - var name []byte - if !yaml_parser_scan_directive_name(parser, start_mark, &name) { - return false - } - - // Is it a YAML directive? - if bytes.Equal(name, []byte("YAML")) { - // Scan the VERSION directive value. - var major, minor int8 - if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { - return false - } - end_mark := parser.mark - - // Create a VERSION-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_VERSION_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - major: major, - minor: minor, - } - - // Is it a TAG directive? - } else if bytes.Equal(name, []byte("TAG")) { - // Scan the TAG directive value. - var handle, prefix []byte - if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { - return false - } - end_mark := parser.mark - - // Create a TAG-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_TAG_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - prefix: prefix, - } - - // Unknown directive. - } else { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unknown directive name") - return false - } - - // Eat the rest of the line including any comments. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - if parser.buffer[parser.buffer_pos] == '#' { - // [Go] Discard this inline comment for the time being. - //if !yaml_parser_scan_line_comment(parser, start_mark) { - // return false - //} - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - return true -} - -// Scan the directive name. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ -// -func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { - // Consume the directive name. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - var s []byte - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the name is empty. - if len(s) == 0 { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "could not find expected directive name") - return false - } - - // Check for an blank character after the name. - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unexpected non-alphabetical character") - return false - } - *name = s - return true -} - -// Scan the value of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ -func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the major version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { - return false - } - - // Eat '.'. - if parser.buffer[parser.buffer_pos] != '.' { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected digit or '.' character") - } - - skip(parser) - - // Consume the minor version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { - return false - } - return true -} - -const max_number_length = 2 - -// Scan the version number of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ -func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { - - // Repeat while the next character is digit. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var value, length int8 - for is_digit(parser.buffer, parser.buffer_pos) { - // Check if the number is too long. - length++ - if length > max_number_length { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "found extremely long version number") - } - value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the number was present. - if length == 0 { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected version number") - } - *number = value - return true -} - -// Scan the value of a TAG-DIRECTIVE token. -// -// Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { - var handle_value, prefix_value []byte - - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a handle. - if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { - return false - } - - // Expect a whitespace. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blank(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace") - return false - } - - // Eat whitespaces. - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a prefix. - if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { - return false - } - - // Expect a whitespace or line break. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace or line break") - return false - } - - *handle = handle_value - *prefix = prefix_value - return true -} - -func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { - var s []byte - - // Eat the indicator character. - start_mark := parser.mark - skip(parser) - - // Consume the value. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - end_mark := parser.mark - - /* - * Check if length of the anchor is greater than 0 and it is followed by - * a whitespace character or one of the indicators: - * - * '?', ':', ',', ']', '}', '%', '@', '`'. - */ - - if len(s) == 0 || - !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || - parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '`') { - context := "while scanning an alias" - if typ == yaml_ANCHOR_TOKEN { - context = "while scanning an anchor" - } - yaml_parser_set_scanner_error(parser, context, start_mark, - "did not find expected alphabetic or numeric character") - return false - } - - // Create a token. - *token = yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - value: s, - } - - return true -} - -/* - * Scan a TAG token. - */ - -func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { - var handle, suffix []byte - - start_mark := parser.mark - - // Check if the tag is in the canonical form. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - if parser.buffer[parser.buffer_pos+1] == '<' { - // Keep the handle as '' - - // Eat '!<' - skip(parser) - skip(parser) - - // Consume the tag value. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - - // Check for '>' and eat it. - if parser.buffer[parser.buffer_pos] != '>' { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find the expected '>'") - return false - } - - skip(parser) - } else { - // The tag has either the '!suffix' or the '!handle!suffix' form. - - // First, try to scan a handle. - if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { - return false - } - - // Check if it is, indeed, handle. - if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { - // Scan the suffix now. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - } else { - // It wasn't a handle after all. Scan the rest of the tag. - if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { - return false - } - - // Set the handle to '!'. - handle = []byte{'!'} - - // A special case: the '!' tag. Set the handle to '' and the - // suffix to '!'. - if len(suffix) == 0 { - handle, suffix = suffix, handle - } - } - } - - // Check the character which ends the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find expected whitespace or line break") - return false - } - - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_TAG_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - suffix: suffix, - } - return true -} - -// Scan a tag handle. -func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { - // Check the initial '!' character. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] != '!' { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - - var s []byte - - // Copy the '!' character. - s = read(parser, s) - - // Copy all subsequent alphabetical and numerical characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the trailing character is '!' and copy it. - if parser.buffer[parser.buffer_pos] == '!' { - s = read(parser, s) - } else { - // It's either the '!' tag or not really a tag handle. If it's a %TAG - // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && string(s) != "!" { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - } - - *handle = s - return true -} - -// Scan a tag. -func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { - //size_t length = head ? strlen((char *)head) : 0 - var s []byte - hasTag := len(head) > 0 - - // Copy the head if needed. - // - // Note that we don't copy the leading '!' character. - if len(head) > 1 { - s = append(s, head[1:]...) - } - - // Scan the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // The set of characters that may appear in URI is as follows: - // - // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', - // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', - // '%'. - // [Go] TODO Convert this into more reasonable logic. - for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || - parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || - parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || - parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || - parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || - parser.buffer[parser.buffer_pos] == '%' { - // Check if it is a URI-escape sequence. - if parser.buffer[parser.buffer_pos] == '%' { - if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { - return false - } - } else { - s = read(parser, s) - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - hasTag = true - } - - if !hasTag { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected tag URI") - return false - } - *uri = s - return true -} - -// Decode an URI-escape sequence corresponding to a single UTF-8 character. -func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { - - // Decode the required number of characters. - w := 1024 - for w > 0 { - // Check for a URI-escaped octet. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - - if !(parser.buffer[parser.buffer_pos] == '%' && - is_hex(parser.buffer, parser.buffer_pos+1) && - is_hex(parser.buffer, parser.buffer_pos+2)) { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find URI escaped octet") - } - - // Get the octet. - octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) - - // If it is the leading octet, determine the length of the UTF-8 sequence. - if w == 1024 { - w = width(octet) - if w == 0 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect leading UTF-8 octet") - } - } else { - // Check if the trailing octet is correct. - if octet&0xC0 != 0x80 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect trailing UTF-8 octet") - } - } - - // Copy the octet and move the pointers. - *s = append(*s, octet) - skip(parser) - skip(parser) - skip(parser) - w-- - } - return true -} - -// Scan a block scalar. -func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { - // Eat the indicator '|' or '>'. - start_mark := parser.mark - skip(parser) - - // Scan the additional block scalar indicators. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check for a chomping indicator. - var chomping, increment int - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - // Set the chomping method and eat the indicator. - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - - // Check for an indentation indicator. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_digit(parser.buffer, parser.buffer_pos) { - // Check that the indentation is greater than 0. - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an indentation indicator equal to 0") - return false - } - - // Get the indentation level and eat the indicator. - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - } - - } else if is_digit(parser.buffer, parser.buffer_pos) { - // Do the same as above, but in the opposite order. - - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an indentation indicator equal to 0") - return false - } - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - } - } - - // Eat whitespaces and comments to the end of the line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.buffer[parser.buffer_pos] == '#' { - if !yaml_parser_scan_line_comment(parser, start_mark) { - return false - } - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - end_mark := parser.mark - - // Set the indentation level if it was specified. - var indent int - if increment > 0 { - if parser.indent >= 0 { - indent = parser.indent + increment - } else { - indent = increment - } - } - - // Scan the leading line breaks and determine the indentation level if needed. - var s, leading_break, trailing_breaks []byte - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - - // Scan the block scalar content. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var leading_blank, trailing_blank bool - for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { - // We are at the beginning of a non-empty line. - - // Is it a trailing whitespace? - trailing_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Check if we need to fold the leading line break. - if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { - // Do we need to join the lines by space? - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } - } else { - s = append(s, leading_break...) - } - leading_break = leading_break[:0] - - // Append the remaining line breaks. - s = append(s, trailing_breaks...) - trailing_breaks = trailing_breaks[:0] - - // Is it a leading whitespace? - leading_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Consume the current line. - for !is_breakz(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - leading_break = read_line(parser, leading_break) - - // Eat the following indentation spaces and line breaks. - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - } - - // Chomp the tail. - if chomping != -1 { - s = append(s, leading_break...) - } - if chomping == 1 { - s = append(s, trailing_breaks...) - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_LITERAL_SCALAR_STYLE, - } - if !literal { - token.style = yaml_FOLDED_SCALAR_STYLE - } - return true -} - -// Scan indentation spaces and line breaks for a block scalar. Determine the -// indentation level if needed. -func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { - *end_mark = parser.mark - - // Eat the indentation spaces and line breaks. - max_indent := 0 - for { - // Eat the indentation spaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.mark.column > max_indent { - max_indent = parser.mark.column - } - - // Check for a tab character messing the indentation. - if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { - return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found a tab character where an indentation space is expected") - } - - // Have we found a non-empty line? - if !is_break(parser.buffer, parser.buffer_pos) { - break - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - // [Go] Should really be returning breaks instead. - *breaks = read_line(parser, *breaks) - *end_mark = parser.mark - } - - // Determine the indentation level if needed. - if *indent == 0 { - *indent = max_indent - if *indent < parser.indent+1 { - *indent = parser.indent + 1 - } - if *indent < 1 { - *indent = 1 - } - } - return true -} - -// Scan a quoted scalar. -func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { - // Eat the left quote. - start_mark := parser.mark - skip(parser) - - // Consume the content of the quoted scalar. - var s, leading_break, trailing_breaks, whitespaces []byte - for { - // Check that there are no document indicators at the beginning of the line. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected document indicator") - return false - } - - // Check for EOF. - if is_z(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected end of stream") - return false - } - - // Consume non-blank characters. - leading_blanks := false - for !is_blankz(parser.buffer, parser.buffer_pos) { - if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { - // Is is an escaped single quote. - s = append(s, '\'') - skip(parser) - skip(parser) - - } else if single && parser.buffer[parser.buffer_pos] == '\'' { - // It is a right single quote. - break - } else if !single && parser.buffer[parser.buffer_pos] == '"' { - // It is a right double quote. - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { - // It is an escaped line break. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - skip(parser) - skip_line(parser) - leading_blanks = true - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' { - // It is an escape sequence. - code_length := 0 - - // Check the escape character. - switch parser.buffer[parser.buffer_pos+1] { - case '0': - s = append(s, 0) - case 'a': - s = append(s, '\x07') - case 'b': - s = append(s, '\x08') - case 't', '\t': - s = append(s, '\x09') - case 'n': - s = append(s, '\x0A') - case 'v': - s = append(s, '\x0B') - case 'f': - s = append(s, '\x0C') - case 'r': - s = append(s, '\x0D') - case 'e': - s = append(s, '\x1B') - case ' ': - s = append(s, '\x20') - case '"': - s = append(s, '"') - case '\'': - s = append(s, '\'') - case '\\': - s = append(s, '\\') - case 'N': // NEL (#x85) - s = append(s, '\xC2') - s = append(s, '\x85') - case '_': // #xA0 - s = append(s, '\xC2') - s = append(s, '\xA0') - case 'L': // LS (#x2028) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA8') - case 'P': // PS (#x2029) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA9') - case 'x': - code_length = 2 - case 'u': - code_length = 4 - case 'U': - code_length = 8 - default: - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found unknown escape character") - return false - } - - skip(parser) - skip(parser) - - // Consume an arbitrary escape code. - if code_length > 0 { - var value int - - // Scan the character value. - if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { - return false - } - for k := 0; k < code_length; k++ { - if !is_hex(parser.buffer, parser.buffer_pos+k) { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "did not find expected hexdecimal number") - return false - } - value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) - } - - // Check the value and write the character. - if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found invalid Unicode character escape code") - return false - } - if value <= 0x7F { - s = append(s, byte(value)) - } else if value <= 0x7FF { - s = append(s, byte(0xC0+(value>>6))) - s = append(s, byte(0x80+(value&0x3F))) - } else if value <= 0xFFFF { - s = append(s, byte(0xE0+(value>>12))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } else { - s = append(s, byte(0xF0+(value>>18))) - s = append(s, byte(0x80+((value>>12)&0x3F))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } - - // Advance the pointer. - for k := 0; k < code_length; k++ { - skip(parser) - } - } - } else { - // It is a non-escaped non-blank character. - s = read(parser, s) - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we are at the end of the scalar. - if single { - if parser.buffer[parser.buffer_pos] == '\'' { - break - } - } else { - if parser.buffer[parser.buffer_pos] == '"' { - break - } - } - - // Consume blank characters. - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Join the whitespaces or fold line breaks. - if leading_blanks { - // Do we need to fold line breaks? - if len(leading_break) > 0 && leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Eat the right quote. - skip(parser) - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_SINGLE_QUOTED_SCALAR_STYLE, - } - if !single { - token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - return true -} - -// Scan a plain scalar. -func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { - - var s, leading_break, trailing_breaks, whitespaces []byte - var leading_blanks bool - var indent = parser.indent + 1 - - start_mark := parser.mark - end_mark := parser.mark - - // Consume the content of the plain scalar. - for { - // Check for a document indicator. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - break - } - - // Check for a comment. - if parser.buffer[parser.buffer_pos] == '#' { - break - } - - // Consume non-blank characters. - for !is_blankz(parser.buffer, parser.buffer_pos) { - - // Check for indicators that may end a plain scalar. - if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level > 0 && - (parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}')) { - break - } - - // Check if we need to join whitespaces and breaks. - if leading_blanks || len(whitespaces) > 0 { - if leading_blanks { - // Do we need to fold line breaks? - if leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - leading_blanks = false - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Copy the character. - s = read(parser, s) - - end_mark = parser.mark - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Is it the end? - if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { - break - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - - // Check for tab characters that abuse indentation. - if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found a tab character that violates indentation") - return false - } - - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check indentation level. - if parser.flow_level == 0 && parser.mark.column < indent { - break - } - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_PLAIN_SCALAR_STYLE, - } - - // Note that we change the 'simple_key_allowed' flag. - if leading_blanks { - parser.simple_key_allowed = true - } - return true -} - -func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t) bool { - if parser.newlines > 0 { - return true - } - - var start_mark yaml_mark_t - var text []byte - - for peek := 0; peek < 512; peek++ { - if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { - break - } - if is_blank(parser.buffer, parser.buffer_pos+peek) { - continue - } - if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek - for { - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_breakz(parser.buffer, parser.buffer_pos) { - if parser.mark.index >= seen { - break - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } else if parser.mark.index >= seen { - if len(text) == 0 { - start_mark = parser.mark - } - text = read(parser, text) - } else { - skip(parser) - } - } - } - break - } - if len(text) > 0 { - parser.comments = append(parser.comments, yaml_comment_t{ - token_mark: token_mark, - start_mark: start_mark, - line: text, - }) - } - return true -} - -func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) bool { - token := parser.tokens[len(parser.tokens)-1] - - if token.typ == yaml_FLOW_ENTRY_TOKEN && len(parser.tokens) > 1 { - token = parser.tokens[len(parser.tokens)-2] - } - - var token_mark = token.start_mark - var start_mark yaml_mark_t - var next_indent = parser.indent - if next_indent < 0 { - next_indent = 0 - } - - var recent_empty = false - var first_empty = parser.newlines <= 1 - - var line = parser.mark.line - var column = parser.mark.column - - var text []byte - - // The foot line is the place where a comment must start to - // still be considered as a foot of the prior content. - // If there's some content in the currently parsed line, then - // the foot is the line below it. - var foot_line = -1 - if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 - if parser.newlines == 0 && parser.mark.column > 1 { - foot_line++ - } - } - - var peek = 0 - for ; peek < 512; peek++ { - if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { - break - } - column++ - if is_blank(parser.buffer, parser.buffer_pos+peek) { - continue - } - c := parser.buffer[parser.buffer_pos+peek] - var close_flow = parser.flow_level > 0 && (c == ']' || c == '}') - if close_flow || is_breakz(parser.buffer, parser.buffer_pos+peek) { - // Got line break or terminator. - if close_flow || !recent_empty { - if close_flow || first_empty && (start_mark.line == foot_line && token.typ != yaml_VALUE_TOKEN || start_mark.column-1 < next_indent) { - // This is the first empty line and there were no empty lines before, - // so this initial part of the comment is a foot of the prior token - // instead of being a head for the following one. Split it up. - // Alternatively, this might also be the last comment inside a flow - // scope, so it must be a footer. - if len(text) > 0 { - if start_mark.column-1 < next_indent { - // If dedented it's unrelated to the prior token. - token_mark = start_mark - } - parser.comments = append(parser.comments, yaml_comment_t{ - scan_mark: scan_mark, - token_mark: token_mark, - start_mark: start_mark, - end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, - foot: text, - }) - scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} - token_mark = scan_mark - text = nil - } - } else { - if len(text) > 0 && parser.buffer[parser.buffer_pos+peek] != 0 { - text = append(text, '\n') - } - } - } - if !is_break(parser.buffer, parser.buffer_pos+peek) { - break - } - first_empty = false - recent_empty = true - column = 0 - line++ - continue - } - - if len(text) > 0 && (close_flow || column-1 < next_indent && column != start_mark.column) { - // The comment at the different indentation is a foot of the - // preceding data rather than a head of the upcoming one. - parser.comments = append(parser.comments, yaml_comment_t{ - scan_mark: scan_mark, - token_mark: token_mark, - start_mark: start_mark, - end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, - foot: text, - }) - scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} - token_mark = scan_mark - text = nil - } - - if parser.buffer[parser.buffer_pos+peek] != '#' { - break - } - - if len(text) == 0 { - start_mark = yaml_mark_t{parser.mark.index + peek, line, column} - } else { - text = append(text, '\n') - } - - recent_empty = false - - // Consume until after the consumed comment line. - seen := parser.mark.index+peek - for { - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_breakz(parser.buffer, parser.buffer_pos) { - if parser.mark.index >= seen { - break - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } else if parser.mark.index >= seen { - text = read(parser, text) - } else { - skip(parser) - } - } - - peek = 0 - column = 0 - line = parser.mark.line - next_indent = parser.indent - if next_indent < 0 { - next_indent = 0 - } - } - - if len(text) > 0 { - parser.comments = append(parser.comments, yaml_comment_t{ - scan_mark: scan_mark, - token_mark: start_mark, - start_mark: start_mark, - end_mark: yaml_mark_t{parser.mark.index + peek - 1, line, column}, - head: text, - }) - } - return true -} diff --git a/vendor/gopkg.in/yaml.v3/sorter.go b/vendor/gopkg.in/yaml.v3/sorter.go deleted file mode 100644 index 9210ece7..00000000 --- a/vendor/gopkg.in/yaml.v3/sorter.go +++ /dev/null @@ -1,134 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// -// 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 yaml - -import ( - "reflect" - "unicode" -) - -type keyList []reflect.Value - -func (l keyList) Len() int { return len(l) } -func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l keyList) Less(i, j int) bool { - a := l[i] - b := l[j] - ak := a.Kind() - bk := b.Kind() - for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { - a = a.Elem() - ak = a.Kind() - } - for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { - b = b.Elem() - bk = b.Kind() - } - af, aok := keyFloat(a) - bf, bok := keyFloat(b) - if aok && bok { - if af != bf { - return af < bf - } - if ak != bk { - return ak < bk - } - return numLess(a, b) - } - if ak != reflect.String || bk != reflect.String { - return ak < bk - } - ar, br := []rune(a.String()), []rune(b.String()) - digits := false - for i := 0; i < len(ar) && i < len(br); i++ { - if ar[i] == br[i] { - digits = unicode.IsDigit(ar[i]) - continue - } - al := unicode.IsLetter(ar[i]) - bl := unicode.IsLetter(br[i]) - if al && bl { - return ar[i] < br[i] - } - if al || bl { - if digits { - return al - } else { - return bl - } - } - var ai, bi int - var an, bn int64 - if ar[i] == '0' || br[i] == '0' { - for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { - if ar[j] != '0' { - an = 1 - bn = 1 - break - } - } - } - for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { - an = an*10 + int64(ar[ai]-'0') - } - for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { - bn = bn*10 + int64(br[bi]-'0') - } - if an != bn { - return an < bn - } - if ai != bi { - return ai < bi - } - return ar[i] < br[i] - } - return len(ar) < len(br) -} - -// keyFloat returns a float value for v if it is a number/bool -// and whether it is a number/bool or not. -func keyFloat(v reflect.Value) (f float64, ok bool) { - switch v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return float64(v.Int()), true - case reflect.Float32, reflect.Float64: - return v.Float(), true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return float64(v.Uint()), true - case reflect.Bool: - if v.Bool() { - return 1, true - } - return 0, true - } - return 0, false -} - -// numLess returns whether a < b. -// a and b must necessarily have the same kind. -func numLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return a.Int() < b.Int() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Bool: - return !a.Bool() && b.Bool() - } - panic("not a number") -} diff --git a/vendor/gopkg.in/yaml.v3/writerc.go b/vendor/gopkg.in/yaml.v3/writerc.go deleted file mode 100644 index b8a116bf..00000000 --- a/vendor/gopkg.in/yaml.v3/writerc.go +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -// Set the writer error and return false. -func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_WRITER_ERROR - emitter.problem = problem - return false -} - -// Flush the output buffer. -func yaml_emitter_flush(emitter *yaml_emitter_t) bool { - if emitter.write_handler == nil { - panic("write handler not set") - } - - // Check if the buffer is empty. - if emitter.buffer_pos == 0 { - return true - } - - if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - return true -} diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go deleted file mode 100644 index 8cec6da4..00000000 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ /dev/null @@ -1,698 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// -// 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 yaml implements YAML support for the Go language. -// -// Source code and other details for the project are available at GitHub: -// -// https://github.com/go-yaml/yaml -// -package yaml - -import ( - "errors" - "fmt" - "io" - "reflect" - "strings" - "sync" - "unicode/utf8" -) - -// The Unmarshaler interface may be implemented by types to customize their -// behavior when being unmarshaled from a YAML document. -type Unmarshaler interface { - UnmarshalYAML(value *Node) error -} - -type obsoleteUnmarshaler interface { - UnmarshalYAML(unmarshal func(interface{}) error) error -} - -// The Marshaler interface may be implemented by types to customize their -// behavior when being marshaled into a YAML document. The returned value -// is marshaled in place of the original value implementing Marshaler. -// -// If an error is returned by MarshalYAML, the marshaling procedure stops -// and returns with the provided error. -type Marshaler interface { - MarshalYAML() (interface{}, error) -} - -// Unmarshal decodes the first document found within the in byte slice -// and assigns decoded values into the out value. -// -// Maps and pointers (to a struct, string, int, etc) are accepted as out -// values. If an internal pointer within a struct is not initialized, -// the yaml package will initialize it if necessary for unmarshalling -// the provided data. The out parameter must not be nil. -// -// The type of the decoded values should be compatible with the respective -// values in out. If one or more values cannot be decoded due to a type -// mismatches, decoding continues partially until the end of the YAML -// content, and a *yaml.TypeError is returned with details for all -// missed values. -// -// Struct fields are only unmarshalled if they are exported (have an -// upper case first letter), and are unmarshalled using the field name -// lowercased as the default key. Custom keys may be defined via the -// "yaml" name in the field tag: the content preceding the first comma -// is used as the key, and the following comma-separated options are -// used to tweak the marshalling process (see Marshal). -// Conflicting names result in a runtime error. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) -// -// See the documentation of Marshal for the format of tags and a list of -// supported tag options. -// -func Unmarshal(in []byte, out interface{}) (err error) { - return unmarshal(in, out, false) -} - -// A Decoder reads and decodes YAML values from an input stream. -type Decoder struct { - parser *parser - knownFields bool -} - -// NewDecoder returns a new decoder that reads from r. -// -// The decoder introduces its own buffering and may read -// data from r beyond the YAML values requested. -func NewDecoder(r io.Reader) *Decoder { - return &Decoder{ - parser: newParserFromReader(r), - } -} - -// KnownFields ensures that the keys in decoded mappings to -// exist as fields in the struct being decoded into. -func (dec *Decoder) KnownFields(enable bool) { - dec.knownFields = enable -} - -// Decode reads the next YAML-encoded value from its input -// and stores it in the value pointed to by v. -// -// See the documentation for Unmarshal for details about the -// conversion of YAML into a Go value. -func (dec *Decoder) Decode(v interface{}) (err error) { - d := newDecoder() - d.knownFields = dec.knownFields - defer handleErr(&err) - node := dec.parser.parse() - if node == nil { - return io.EOF - } - out := reflect.ValueOf(v) - if out.Kind() == reflect.Ptr && !out.IsNil() { - out = out.Elem() - } - d.unmarshal(node, out) - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -// Decode decodes the node and stores its data into the value pointed to by v. -// -// See the documentation for Unmarshal for details about the -// conversion of YAML into a Go value. -func (n *Node) Decode(v interface{}) (err error) { - d := newDecoder() - defer handleErr(&err) - out := reflect.ValueOf(v) - if out.Kind() == reflect.Ptr && !out.IsNil() { - out = out.Elem() - } - d.unmarshal(n, out) - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -func unmarshal(in []byte, out interface{}, strict bool) (err error) { - defer handleErr(&err) - d := newDecoder() - p := newParser(in) - defer p.destroy() - node := p.parse() - if node != nil { - v := reflect.ValueOf(out) - if v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - d.unmarshal(node, v) - } - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -// Marshal serializes the value provided into a YAML document. The structure -// of the generated document will reflect the structure of the value itself. -// Maps and pointers (to struct, string, int, etc) are accepted as the in value. -// -// Struct fields are only marshalled if they are exported (have an upper case -// first letter), and are marshalled using the field name lowercased as the -// default key. Custom keys may be defined via the "yaml" name in the field -// tag: the content preceding the first comma is used as the key, and the -// following comma-separated options are used to tweak the marshalling process. -// Conflicting names result in a runtime error. -// -// The field tag format accepted is: -// -// `(...) yaml:"[][,[,]]" (...)` -// -// The following flags are currently supported: -// -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. -// -// flow Marshal using a flow style (useful for structs, -// sequences and maps). -// -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. -// -// In addition, if the key is "-", the field is ignored. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// -func Marshal(in interface{}) (out []byte, err error) { - defer handleErr(&err) - e := newEncoder() - defer e.destroy() - e.marshalDoc("", reflect.ValueOf(in)) - e.finish() - out = e.out - return -} - -// An Encoder writes YAML values to an output stream. -type Encoder struct { - encoder *encoder -} - -// NewEncoder returns a new encoder that writes to w. -// The Encoder should be closed after use to flush all data -// to w. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ - encoder: newEncoderWithWriter(w), - } -} - -// Encode writes the YAML encoding of v to the stream. -// If multiple items are encoded to the stream, the -// second and subsequent document will be preceded -// with a "---" document separator, but the first will not. -// -// See the documentation for Marshal for details about the conversion of Go -// values to YAML. -func (e *Encoder) Encode(v interface{}) (err error) { - defer handleErr(&err) - e.encoder.marshalDoc("", reflect.ValueOf(v)) - return nil -} - -// Encode encodes value v and stores its representation in n. -// -// See the documentation for Marshal for details about the -// conversion of Go values into YAML. -func (n *Node) Encode(v interface{}) (err error) { - defer handleErr(&err) - e := newEncoder() - defer e.destroy() - e.marshalDoc("", reflect.ValueOf(v)) - e.finish() - p := newParser(e.out) - p.textless = true - defer p.destroy() - doc := p.parse() - *n = *doc.Content[0] - return nil -} - -// SetIndent changes the used indentation used when encoding. -func (e *Encoder) SetIndent(spaces int) { - if spaces < 0 { - panic("yaml: cannot indent to a negative number of spaces") - } - e.encoder.indent = spaces -} - -// Close closes the encoder by writing any remaining data. -// It does not write a stream terminating string "...". -func (e *Encoder) Close() (err error) { - defer handleErr(&err) - e.encoder.finish() - return nil -} - -func handleErr(err *error) { - if v := recover(); v != nil { - if e, ok := v.(yamlError); ok { - *err = e.err - } else { - panic(v) - } - } -} - -type yamlError struct { - err error -} - -func fail(err error) { - panic(yamlError{err}) -} - -func failf(format string, args ...interface{}) { - panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) -} - -// A TypeError is returned by Unmarshal when one or more fields in -// the YAML document cannot be properly decoded into the requested -// types. When this error is returned, the value is still -// unmarshaled partially. -type TypeError struct { - Errors []string -} - -func (e *TypeError) Error() string { - return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) -} - -type Kind uint32 - -const ( - DocumentNode Kind = 1 << iota - SequenceNode - MappingNode - ScalarNode - AliasNode -) - -type Style uint32 - -const ( - TaggedStyle Style = 1 << iota - DoubleQuotedStyle - SingleQuotedStyle - LiteralStyle - FoldedStyle - FlowStyle -) - -// Node represents an element in the YAML document hierarchy. While documents -// are typically encoded and decoded into higher level types, such as structs -// and maps, Node is an intermediate representation that allows detailed -// control over the content being decoded or encoded. -// -// It's worth noting that although Node offers access into details such as -// line numbers, colums, and comments, the content when re-encoded will not -// have its original textual representation preserved. An effort is made to -// render the data plesantly, and to preserve comments near the data they -// describe, though. -// -// Values that make use of the Node type interact with the yaml package in the -// same way any other type would do, by encoding and decoding yaml data -// directly or indirectly into them. -// -// For example: -// -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: -// -// var person Node -// err := yaml.Unmarshal(data, &person) -// -type Node struct { - // Kind defines whether the node is a document, a mapping, a sequence, - // a scalar value, or an alias to another node. The specific data type of - // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind - - // Style allows customizing the apperance of the node in the tree. - Style Style - - // Tag holds the YAML tag defining the data type for the value. - // When decoding, this field will always be set to the resolved tag, - // even when it wasn't explicitly provided in the YAML content. - // When encoding, if this field is unset the value type will be - // implied from the node properties, and if it is set, it will only - // be serialized into the representation if TaggedStyle is used or - // the implicit tag diverges from the provided one. - Tag string - - // Value holds the unescaped and unquoted represenation of the value. - Value string - - // Anchor holds the anchor name for this node, which allows aliases to point to it. - Anchor string - - // Alias holds the node that this alias points to. Only valid when Kind is AliasNode. - Alias *Node - - // Content holds contained nodes for documents, mappings, and sequences. - Content []*Node - - // HeadComment holds any comments in the lines preceding the node and - // not separated by an empty line. - HeadComment string - - // LineComment holds any comments at the end of the line where the node is in. - LineComment string - - // FootComment holds any comments following the node and before empty lines. - FootComment string - - // Line and Column hold the node position in the decoded YAML text. - // These fields are not respected when encoding the node. - Line int - Column int -} - -// IsZero returns whether the node has all of its fields unset. -func (n *Node) IsZero() bool { - return n.Kind == 0 && n.Style == 0 && n.Tag == "" && n.Value == "" && n.Anchor == "" && n.Alias == nil && n.Content == nil && - n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 -} - - -// LongTag returns the long form of the tag that indicates the data type for -// the node. If the Tag field isn't explicitly defined, one will be computed -// based on the node properties. -func (n *Node) LongTag() string { - return longTag(n.ShortTag()) -} - -// ShortTag returns the short form of the YAML tag that indicates data type for -// the node. If the Tag field isn't explicitly defined, one will be computed -// based on the node properties. -func (n *Node) ShortTag() string { - if n.indicatedString() { - return strTag - } - if n.Tag == "" || n.Tag == "!" { - switch n.Kind { - case MappingNode: - return mapTag - case SequenceNode: - return seqTag - case AliasNode: - if n.Alias != nil { - return n.Alias.ShortTag() - } - case ScalarNode: - tag, _ := resolve("", n.Value) - return tag - case 0: - // Special case to make the zero value convenient. - if n.IsZero() { - return nullTag - } - } - return "" - } - return shortTag(n.Tag) -} - -func (n *Node) indicatedString() bool { - return n.Kind == ScalarNode && - (shortTag(n.Tag) == strTag || - (n.Tag == "" || n.Tag == "!") && n.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0) -} - -// SetString is a convenience function that sets the node to a string value -// and defines its style in a pleasant way depending on its content. -func (n *Node) SetString(s string) { - n.Kind = ScalarNode - if utf8.ValidString(s) { - n.Value = s - n.Tag = strTag - } else { - n.Value = encodeBase64(s) - n.Tag = binaryTag - } - if strings.Contains(n.Value, "\n") { - n.Style = LiteralStyle - } -} - -// -------------------------------------------------------------------------- -// Maintain a mapping of keys to structure field indexes - -// The code in this section was copied from mgo/bson. - -// structInfo holds details for the serialization of fields of -// a given struct. -type structInfo struct { - FieldsMap map[string]fieldInfo - FieldsList []fieldInfo - - // InlineMap is the number of the field in the struct that - // contains an ,inline map, or -1 if there's none. - InlineMap int - - // InlineUnmarshalers holds indexes to inlined fields that - // contain unmarshaler values. - InlineUnmarshalers [][]int -} - -type fieldInfo struct { - Key string - Num int - OmitEmpty bool - Flow bool - // Id holds the unique field identifier, so we can cheaply - // check for field duplicates without maintaining an extra map. - Id int - - // Inline holds the field index if the field is part of an inlined struct. - Inline []int -} - -var structMap = make(map[reflect.Type]*structInfo) -var fieldMapMutex sync.RWMutex -var unmarshalerType reflect.Type - -func init() { - var v Unmarshaler - unmarshalerType = reflect.ValueOf(&v).Elem().Type() -} - -func getStructInfo(st reflect.Type) (*structInfo, error) { - fieldMapMutex.RLock() - sinfo, found := structMap[st] - fieldMapMutex.RUnlock() - if found { - return sinfo, nil - } - - n := st.NumField() - fieldsMap := make(map[string]fieldInfo) - fieldsList := make([]fieldInfo, 0, n) - inlineMap := -1 - inlineUnmarshalers := [][]int(nil) - for i := 0; i != n; i++ { - field := st.Field(i) - if field.PkgPath != "" && !field.Anonymous { - continue // Private field - } - - info := fieldInfo{Num: i} - - tag := field.Tag.Get("yaml") - if tag == "" && strings.Index(string(field.Tag), ":") < 0 { - tag = string(field.Tag) - } - if tag == "-" { - continue - } - - inline := false - fields := strings.Split(tag, ",") - if len(fields) > 1 { - for _, flag := range fields[1:] { - switch flag { - case "omitempty": - info.OmitEmpty = true - case "flow": - info.Flow = true - case "inline": - inline = true - default: - return nil, errors.New(fmt.Sprintf("unsupported flag %q in tag %q of type %s", flag, tag, st)) - } - } - tag = fields[0] - } - - if inline { - switch field.Type.Kind() { - case reflect.Map: - if inlineMap >= 0 { - return nil, errors.New("multiple ,inline maps in struct " + st.String()) - } - if field.Type.Key() != reflect.TypeOf("") { - return nil, errors.New("option ,inline needs a map with string keys in struct " + st.String()) - } - inlineMap = info.Num - case reflect.Struct, reflect.Ptr: - ftype := field.Type - for ftype.Kind() == reflect.Ptr { - ftype = ftype.Elem() - } - if ftype.Kind() != reflect.Struct { - return nil, errors.New("option ,inline may only be used on a struct or map field") - } - if reflect.PtrTo(ftype).Implements(unmarshalerType) { - inlineUnmarshalers = append(inlineUnmarshalers, []int{i}) - } else { - sinfo, err := getStructInfo(ftype) - if err != nil { - return nil, err - } - for _, index := range sinfo.InlineUnmarshalers { - inlineUnmarshalers = append(inlineUnmarshalers, append([]int{i}, index...)) - } - for _, finfo := range sinfo.FieldsList { - if _, found := fieldsMap[finfo.Key]; found { - msg := "duplicated key '" + finfo.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - if finfo.Inline == nil { - finfo.Inline = []int{i, finfo.Num} - } else { - finfo.Inline = append([]int{i}, finfo.Inline...) - } - finfo.Id = len(fieldsList) - fieldsMap[finfo.Key] = finfo - fieldsList = append(fieldsList, finfo) - } - } - default: - return nil, errors.New("option ,inline may only be used on a struct or map field") - } - continue - } - - if tag != "" { - info.Key = tag - } else { - info.Key = strings.ToLower(field.Name) - } - - if _, found = fieldsMap[info.Key]; found { - msg := "duplicated key '" + info.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - - info.Id = len(fieldsList) - fieldsList = append(fieldsList, info) - fieldsMap[info.Key] = info - } - - sinfo = &structInfo{ - FieldsMap: fieldsMap, - FieldsList: fieldsList, - InlineMap: inlineMap, - InlineUnmarshalers: inlineUnmarshalers, - } - - fieldMapMutex.Lock() - structMap[st] = sinfo - fieldMapMutex.Unlock() - return sinfo, nil -} - -// IsZeroer is used to check whether an object is zero to -// determine whether it should be omitted when marshaling -// with the omitempty flag. One notable implementation -// is time.Time. -type IsZeroer interface { - IsZero() bool -} - -func isZero(v reflect.Value) bool { - kind := v.Kind() - if z, ok := v.Interface().(IsZeroer); ok { - if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { - return true - } - return z.IsZero() - } - switch kind { - case reflect.String: - return len(v.String()) == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Slice: - return v.Len() == 0 - case reflect.Map: - return v.Len() == 0 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Struct: - vt := v.Type() - for i := v.NumField() - 1; i >= 0; i-- { - if vt.Field(i).PkgPath != "" { - continue // Private field - } - if !isZero(v.Field(i)) { - return false - } - } - return true - } - return false -} diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go deleted file mode 100644 index 7c6d0077..00000000 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ /dev/null @@ -1,807 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -import ( - "fmt" - "io" -) - -// The version directive data. -type yaml_version_directive_t struct { - major int8 // The major version number. - minor int8 // The minor version number. -} - -// The tag directive data. -type yaml_tag_directive_t struct { - handle []byte // The tag handle. - prefix []byte // The tag prefix. -} - -type yaml_encoding_t int - -// The stream encoding. -const ( - // Let the parser choose the encoding. - yaml_ANY_ENCODING yaml_encoding_t = iota - - yaml_UTF8_ENCODING // The default UTF-8 encoding. - yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. - yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. -) - -type yaml_break_t int - -// Line break types. -const ( - // Let the parser choose the break type. - yaml_ANY_BREAK yaml_break_t = iota - - yaml_CR_BREAK // Use CR for line breaks (Mac style). - yaml_LN_BREAK // Use LN for line breaks (Unix style). - yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). -) - -type yaml_error_type_t int - -// Many bad things could happen with the parser and emitter. -const ( - // No error is produced. - yaml_NO_ERROR yaml_error_type_t = iota - - yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. - yaml_READER_ERROR // Cannot read or decode the input stream. - yaml_SCANNER_ERROR // Cannot scan the input stream. - yaml_PARSER_ERROR // Cannot parse the input stream. - yaml_COMPOSER_ERROR // Cannot compose a YAML document. - yaml_WRITER_ERROR // Cannot write to the output stream. - yaml_EMITTER_ERROR // Cannot emit a YAML stream. -) - -// The pointer position. -type yaml_mark_t struct { - index int // The position index. - line int // The position line. - column int // The position column. -} - -// Node Styles - -type yaml_style_t int8 - -type yaml_scalar_style_t yaml_style_t - -// Scalar styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = 0 - - yaml_PLAIN_SCALAR_STYLE yaml_scalar_style_t = 1 << iota // The plain scalar style. - yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. - yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. - yaml_LITERAL_SCALAR_STYLE // The literal scalar style. - yaml_FOLDED_SCALAR_STYLE // The folded scalar style. -) - -type yaml_sequence_style_t yaml_style_t - -// Sequence styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota - - yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. - yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. -) - -type yaml_mapping_style_t yaml_style_t - -// Mapping styles. -const ( - // Let the emitter choose the style. - yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota - - yaml_BLOCK_MAPPING_STYLE // The block mapping style. - yaml_FLOW_MAPPING_STYLE // The flow mapping style. -) - -// Tokens - -type yaml_token_type_t int - -// Token types. -const ( - // An empty token. - yaml_NO_TOKEN yaml_token_type_t = iota - - yaml_STREAM_START_TOKEN // A STREAM-START token. - yaml_STREAM_END_TOKEN // A STREAM-END token. - - yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. - yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. - yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. - yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. - - yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. - yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. - yaml_BLOCK_END_TOKEN // A BLOCK-END token. - - yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. - yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. - yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. - yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. - - yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. - yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. - yaml_KEY_TOKEN // A KEY token. - yaml_VALUE_TOKEN // A VALUE token. - - yaml_ALIAS_TOKEN // An ALIAS token. - yaml_ANCHOR_TOKEN // An ANCHOR token. - yaml_TAG_TOKEN // A TAG token. - yaml_SCALAR_TOKEN // A SCALAR token. -) - -func (tt yaml_token_type_t) String() string { - switch tt { - case yaml_NO_TOKEN: - return "yaml_NO_TOKEN" - case yaml_STREAM_START_TOKEN: - return "yaml_STREAM_START_TOKEN" - case yaml_STREAM_END_TOKEN: - return "yaml_STREAM_END_TOKEN" - case yaml_VERSION_DIRECTIVE_TOKEN: - return "yaml_VERSION_DIRECTIVE_TOKEN" - case yaml_TAG_DIRECTIVE_TOKEN: - return "yaml_TAG_DIRECTIVE_TOKEN" - case yaml_DOCUMENT_START_TOKEN: - return "yaml_DOCUMENT_START_TOKEN" - case yaml_DOCUMENT_END_TOKEN: - return "yaml_DOCUMENT_END_TOKEN" - case yaml_BLOCK_SEQUENCE_START_TOKEN: - return "yaml_BLOCK_SEQUENCE_START_TOKEN" - case yaml_BLOCK_MAPPING_START_TOKEN: - return "yaml_BLOCK_MAPPING_START_TOKEN" - case yaml_BLOCK_END_TOKEN: - return "yaml_BLOCK_END_TOKEN" - case yaml_FLOW_SEQUENCE_START_TOKEN: - return "yaml_FLOW_SEQUENCE_START_TOKEN" - case yaml_FLOW_SEQUENCE_END_TOKEN: - return "yaml_FLOW_SEQUENCE_END_TOKEN" - case yaml_FLOW_MAPPING_START_TOKEN: - return "yaml_FLOW_MAPPING_START_TOKEN" - case yaml_FLOW_MAPPING_END_TOKEN: - return "yaml_FLOW_MAPPING_END_TOKEN" - case yaml_BLOCK_ENTRY_TOKEN: - return "yaml_BLOCK_ENTRY_TOKEN" - case yaml_FLOW_ENTRY_TOKEN: - return "yaml_FLOW_ENTRY_TOKEN" - case yaml_KEY_TOKEN: - return "yaml_KEY_TOKEN" - case yaml_VALUE_TOKEN: - return "yaml_VALUE_TOKEN" - case yaml_ALIAS_TOKEN: - return "yaml_ALIAS_TOKEN" - case yaml_ANCHOR_TOKEN: - return "yaml_ANCHOR_TOKEN" - case yaml_TAG_TOKEN: - return "yaml_TAG_TOKEN" - case yaml_SCALAR_TOKEN: - return "yaml_SCALAR_TOKEN" - } - return "" -} - -// The token structure. -type yaml_token_t struct { - // The token type. - typ yaml_token_type_t - - // The start/end of the token. - start_mark, end_mark yaml_mark_t - - // The stream encoding (for yaml_STREAM_START_TOKEN). - encoding yaml_encoding_t - - // The alias/anchor/scalar value or tag/tag directive handle - // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). - value []byte - - // The tag suffix (for yaml_TAG_TOKEN). - suffix []byte - - // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). - prefix []byte - - // The scalar style (for yaml_SCALAR_TOKEN). - style yaml_scalar_style_t - - // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). - major, minor int8 -} - -// Events - -type yaml_event_type_t int8 - -// Event types. -const ( - // An empty event. - yaml_NO_EVENT yaml_event_type_t = iota - - yaml_STREAM_START_EVENT // A STREAM-START event. - yaml_STREAM_END_EVENT // A STREAM-END event. - yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. - yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. - yaml_ALIAS_EVENT // An ALIAS event. - yaml_SCALAR_EVENT // A SCALAR event. - yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. - yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. - yaml_MAPPING_START_EVENT // A MAPPING-START event. - yaml_MAPPING_END_EVENT // A MAPPING-END event. - yaml_TAIL_COMMENT_EVENT -) - -var eventStrings = []string{ - yaml_NO_EVENT: "none", - yaml_STREAM_START_EVENT: "stream start", - yaml_STREAM_END_EVENT: "stream end", - yaml_DOCUMENT_START_EVENT: "document start", - yaml_DOCUMENT_END_EVENT: "document end", - yaml_ALIAS_EVENT: "alias", - yaml_SCALAR_EVENT: "scalar", - yaml_SEQUENCE_START_EVENT: "sequence start", - yaml_SEQUENCE_END_EVENT: "sequence end", - yaml_MAPPING_START_EVENT: "mapping start", - yaml_MAPPING_END_EVENT: "mapping end", - yaml_TAIL_COMMENT_EVENT: "tail comment", -} - -func (e yaml_event_type_t) String() string { - if e < 0 || int(e) >= len(eventStrings) { - return fmt.Sprintf("unknown event %d", e) - } - return eventStrings[e] -} - -// The event structure. -type yaml_event_t struct { - - // The event type. - typ yaml_event_type_t - - // The start and end of the event. - start_mark, end_mark yaml_mark_t - - // The document encoding (for yaml_STREAM_START_EVENT). - encoding yaml_encoding_t - - // The version directive (for yaml_DOCUMENT_START_EVENT). - version_directive *yaml_version_directive_t - - // The list of tag directives (for yaml_DOCUMENT_START_EVENT). - tag_directives []yaml_tag_directive_t - - // The comments - head_comment []byte - line_comment []byte - foot_comment []byte - tail_comment []byte - - // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). - anchor []byte - - // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - tag []byte - - // The scalar value (for yaml_SCALAR_EVENT). - value []byte - - // Is the document start/end indicator implicit, or the tag optional? - // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). - implicit bool - - // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). - quoted_implicit bool - - // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - style yaml_style_t -} - -func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } -func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } -func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } - -// Nodes - -const ( - yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. - yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. - yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. - yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. - yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. - yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. - - yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. - yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. - - // Not in original libyaml. - yaml_BINARY_TAG = "tag:yaml.org,2002:binary" - yaml_MERGE_TAG = "tag:yaml.org,2002:merge" - - yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. - yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. - yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. -) - -type yaml_node_type_t int - -// Node types. -const ( - // An empty node. - yaml_NO_NODE yaml_node_type_t = iota - - yaml_SCALAR_NODE // A scalar node. - yaml_SEQUENCE_NODE // A sequence node. - yaml_MAPPING_NODE // A mapping node. -) - -// An element of a sequence node. -type yaml_node_item_t int - -// An element of a mapping node. -type yaml_node_pair_t struct { - key int // The key of the element. - value int // The value of the element. -} - -// The node structure. -type yaml_node_t struct { - typ yaml_node_type_t // The node type. - tag []byte // The node tag. - - // The node data. - - // The scalar parameters (for yaml_SCALAR_NODE). - scalar struct { - value []byte // The scalar value. - length int // The length of the scalar value. - style yaml_scalar_style_t // The scalar style. - } - - // The sequence parameters (for YAML_SEQUENCE_NODE). - sequence struct { - items_data []yaml_node_item_t // The stack of sequence items. - style yaml_sequence_style_t // The sequence style. - } - - // The mapping parameters (for yaml_MAPPING_NODE). - mapping struct { - pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). - pairs_start *yaml_node_pair_t // The beginning of the stack. - pairs_end *yaml_node_pair_t // The end of the stack. - pairs_top *yaml_node_pair_t // The top of the stack. - style yaml_mapping_style_t // The mapping style. - } - - start_mark yaml_mark_t // The beginning of the node. - end_mark yaml_mark_t // The end of the node. - -} - -// The document structure. -type yaml_document_t struct { - - // The document nodes. - nodes []yaml_node_t - - // The version directive. - version_directive *yaml_version_directive_t - - // The list of tag directives. - tag_directives_data []yaml_tag_directive_t - tag_directives_start int // The beginning of the tag directives list. - tag_directives_end int // The end of the tag directives list. - - start_implicit int // Is the document start indicator implicit? - end_implicit int // Is the document end indicator implicit? - - // The start/end of the document. - start_mark, end_mark yaml_mark_t -} - -// The prototype of a read handler. -// -// The read handler is called when the parser needs to read more bytes from the -// source. The handler should write not more than size bytes to the buffer. -// The number of written bytes should be set to the size_read variable. -// -// [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). -// [out] buffer The buffer to write the data from the source. -// [in] size The size of the buffer. -// [out] size_read The actual number of bytes read from the source. -// -// On success, the handler should return 1. If the handler failed, -// the returned value should be 0. On EOF, the handler should set the -// size_read to 0 and return 1. -type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) - -// This structure holds information about a potential simple key. -type yaml_simple_key_t struct { - possible bool // Is a simple key possible? - required bool // Is a simple key required? - token_number int // The number of the token. - mark yaml_mark_t // The position mark. -} - -// The states of the parser. -type yaml_parser_state_t int - -const ( - yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota - - yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. - yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. - yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. - yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. - yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. - yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. - yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. - yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. - yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. - yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. - yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. - yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. - yaml_PARSE_END_STATE // Expect nothing. -) - -func (ps yaml_parser_state_t) String() string { - switch ps { - case yaml_PARSE_STREAM_START_STATE: - return "yaml_PARSE_STREAM_START_STATE" - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_START_STATE: - return "yaml_PARSE_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return "yaml_PARSE_DOCUMENT_CONTENT_STATE" - case yaml_PARSE_DOCUMENT_END_STATE: - return "yaml_PARSE_DOCUMENT_END_STATE" - case yaml_PARSE_BLOCK_NODE_STATE: - return "yaml_PARSE_BLOCK_NODE_STATE" - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" - case yaml_PARSE_FLOW_NODE_STATE: - return "yaml_PARSE_FLOW_NODE_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" - case yaml_PARSE_END_STATE: - return "yaml_PARSE_END_STATE" - } - return "" -} - -// This structure holds aliases data. -type yaml_alias_data_t struct { - anchor []byte // The anchor. - index int // The node id. - mark yaml_mark_t // The anchor mark. -} - -// The parser structure. -// -// All members are internal. Manage the structure using the -// yaml_parser_ family of functions. -type yaml_parser_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - - problem string // Error description. - - // The byte about which the problem occurred. - problem_offset int - problem_value int - problem_mark yaml_mark_t - - // The error context. - context string - context_mark yaml_mark_t - - // Reader stuff - - read_handler yaml_read_handler_t // Read handler. - - input_reader io.Reader // File input data. - input []byte // String input data. - input_pos int - - eof bool // EOF flag - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - unread int // The number of unread characters in the buffer. - - newlines int // The number of line breaks since last non-break/non-blank character - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The input encoding. - - offset int // The offset of the current position (in bytes). - mark yaml_mark_t // The mark of the current position. - - // Comments - - head_comment []byte // The current head comments - line_comment []byte // The current line comments - foot_comment []byte // The current foot comments - tail_comment []byte // Foot comment that happens at the end of a block. - stem_comment []byte // Comment in item preceding a nested structure (list inside list item, etc) - - comments []yaml_comment_t // The folded comments for all parsed tokens - comments_head int - - // Scanner stuff - - stream_start_produced bool // Have we started to scan the input stream? - stream_end_produced bool // Have we reached the end of the input stream? - - flow_level int // The number of unclosed '[' and '{' indicators. - - tokens []yaml_token_t // The tokens queue. - tokens_head int // The head of the tokens queue. - tokens_parsed int // The number of tokens fetched from the queue. - token_available bool // Does the tokens queue contain a token ready for dequeueing. - - indent int // The current indentation level. - indents []int // The indentation levels stack. - - simple_key_allowed bool // May a simple key occur at the current position? - simple_keys []yaml_simple_key_t // The stack of simple keys. - simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number - - // Parser stuff - - state yaml_parser_state_t // The current parser state. - states []yaml_parser_state_t // The parser states stack. - marks []yaml_mark_t // The stack of marks. - tag_directives []yaml_tag_directive_t // The list of TAG directives. - - // Dumper stuff - - aliases []yaml_alias_data_t // The alias data. - - document *yaml_document_t // The currently parsed document. -} - -type yaml_comment_t struct { - - scan_mark yaml_mark_t // Position where scanning for comments started - token_mark yaml_mark_t // Position after which tokens will be associated with this comment - start_mark yaml_mark_t // Position of '#' comment mark - end_mark yaml_mark_t // Position where comment terminated - - head []byte - line []byte - foot []byte -} - -// Emitter Definitions - -// The prototype of a write handler. -// -// The write handler is called when the emitter needs to flush the accumulated -// characters to the output. The handler should write @a size bytes of the -// @a buffer to the output. -// -// @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). -// @param[in] buffer The buffer with bytes to be written. -// @param[in] size The size of the buffer. -// -// @returns On success, the handler should return @c 1. If the handler failed, -// the returned value should be @c 0. -// -type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error - -type yaml_emitter_state_t int - -// The emitter states. -const ( - // Expect STREAM-START. - yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota - - yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. - yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE // Expect the next item of a flow sequence, with the comma already written out - yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. - yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE // Expect the next key of a flow mapping, with the comma already written out - yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. - yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. - yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. - yaml_EMIT_END_STATE // Expect nothing. -) - -// The emitter structure. -// -// All members are internal. Manage the structure using the @c yaml_emitter_ -// family of functions. -type yaml_emitter_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - problem string // Error description. - - // Writer stuff - - write_handler yaml_write_handler_t // Write handler. - - output_buffer *[]byte // String output data. - output_writer io.Writer // File output data. - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The stream encoding. - - // Emitter stuff - - canonical bool // If the output is in the canonical style? - best_indent int // The number of indentation spaces. - best_width int // The preferred width of the output lines. - unicode bool // Allow unescaped non-ASCII characters? - line_break yaml_break_t // The preferred line break. - - state yaml_emitter_state_t // The current emitter state. - states []yaml_emitter_state_t // The stack of states. - - events []yaml_event_t // The event queue. - events_head int // The head of the event queue. - - indents []int // The stack of indentation levels. - - tag_directives []yaml_tag_directive_t // The list of tag directives. - - indent int // The current indentation level. - - flow_level int // The current flow level. - - root_context bool // Is it the document root context? - sequence_context bool // Is it a sequence context? - mapping_context bool // Is it a mapping context? - simple_key_context bool // Is it a simple mapping key context? - - line int // The current line. - column int // The current column. - whitespace bool // If the last character was a whitespace? - indention bool // If the last character was an indentation character (' ', '-', '?', ':')? - open_ended bool // If an explicit document end is required? - - space_above bool // Is there's an empty line above? - foot_indent int // The indent used to write the foot comment above, or -1 if none. - - // Anchor analysis. - anchor_data struct { - anchor []byte // The anchor value. - alias bool // Is it an alias? - } - - // Tag analysis. - tag_data struct { - handle []byte // The tag handle. - suffix []byte // The tag suffix. - } - - // Scalar analysis. - scalar_data struct { - value []byte // The scalar value. - multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? - block_plain_allowed bool // Can the scalar be expressed in the block plain style? - single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? - block_allowed bool // Can the scalar be expressed in the literal or folded styles? - style yaml_scalar_style_t // The output style. - } - - // Comments - head_comment []byte - line_comment []byte - foot_comment []byte - tail_comment []byte - - key_line_comment []byte - - // Dumper stuff - - opened bool // If the stream was already opened? - closed bool // If the stream was already closed? - - // The information associated with the document nodes. - anchors *struct { - references int // The number of references. - anchor int // The anchor id. - serialized bool // If the node has been emitted? - } - - last_anchor_id int // The last assigned anchor id. - - document *yaml_document_t // The currently emitted document. -} diff --git a/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/vendor/gopkg.in/yaml.v3/yamlprivateh.go deleted file mode 100644 index e88f9c54..00000000 --- a/vendor/gopkg.in/yaml.v3/yamlprivateh.go +++ /dev/null @@ -1,198 +0,0 @@ -// -// Copyright (c) 2011-2019 Canonical Ltd -// Copyright (c) 2006-2010 Kirill Simonov -// -// 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. - -package yaml - -const ( - // The size of the input raw buffer. - input_raw_buffer_size = 512 - - // The size of the input buffer. - // It should be possible to decode the whole raw buffer. - input_buffer_size = input_raw_buffer_size * 3 - - // The size of the output buffer. - output_buffer_size = 128 - - // The size of the output raw buffer. - // It should be possible to encode the whole output buffer. - output_raw_buffer_size = (output_buffer_size*2 + 2) - - // The size of other stacks and queues. - initial_stack_size = 16 - initial_queue_size = 16 - initial_string_size = 16 -) - -// Check if the character at the specified position is an alphabetical -// character, a digit, '_', or '-'. -func is_alpha(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' -} - -// Check if the character at the specified position is a digit. -func is_digit(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' -} - -// Get the value of a digit. -func as_digit(b []byte, i int) int { - return int(b[i]) - '0' -} - -// Check if the character at the specified position is a hex-digit. -func is_hex(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' -} - -// Get the value of a hex-digit. -func as_hex(b []byte, i int) int { - bi := b[i] - if bi >= 'A' && bi <= 'F' { - return int(bi) - 'A' + 10 - } - if bi >= 'a' && bi <= 'f' { - return int(bi) - 'a' + 10 - } - return int(bi) - '0' -} - -// Check if the character is ASCII. -func is_ascii(b []byte, i int) bool { - return b[i] <= 0x7F -} - -// Check if the character at the start of the buffer can be printed unescaped. -func is_printable(b []byte, i int) bool { - return ((b[i] == 0x0A) || // . == #x0A - (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E - (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF - (b[i] > 0xC2 && b[i] < 0xED) || - (b[i] == 0xED && b[i+1] < 0xA0) || - (b[i] == 0xEE) || - (b[i] == 0xEF && // #xE000 <= . <= #xFFFD - !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF - !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) -} - -// Check if the character at the specified position is NUL. -func is_z(b []byte, i int) bool { - return b[i] == 0x00 -} - -// Check if the beginning of the buffer is a BOM. -func is_bom(b []byte, i int) bool { - return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF -} - -// Check if the character at the specified position is space. -func is_space(b []byte, i int) bool { - return b[i] == ' ' -} - -// Check if the character at the specified position is tab. -func is_tab(b []byte, i int) bool { - return b[i] == '\t' -} - -// Check if the character at the specified position is blank (space or tab). -func is_blank(b []byte, i int) bool { - //return is_space(b, i) || is_tab(b, i) - return b[i] == ' ' || b[i] == '\t' -} - -// Check if the character at the specified position is a line break. -func is_break(b []byte, i int) bool { - return (b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) -} - -func is_crlf(b []byte, i int) bool { - return b[i] == '\r' && b[i+1] == '\n' -} - -// Check if the character is a line break or NUL. -func is_breakz(b []byte, i int) bool { - //return is_break(b, i) || is_z(b, i) - return ( - // is_break: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - // is_z: - b[i] == 0) -} - -// Check if the character is a line break, space, or NUL. -func is_spacez(b []byte, i int) bool { - //return is_space(b, i) || is_breakz(b, i) - return ( - // is_space: - b[i] == ' ' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Check if the character is a line break, space, tab, or NUL. -func is_blankz(b []byte, i int) bool { - //return is_blank(b, i) || is_breakz(b, i) - return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Determine the width of the character. -func width(b byte) int { - // Don't replace these by a switch without first - // confirming that it is being inlined. - if b&0x80 == 0x00 { - return 1 - } - if b&0xE0 == 0xC0 { - return 2 - } - if b&0xF0 == 0xE0 { - return 3 - } - if b&0xF8 == 0xF0 { - return 4 - } - return 0 - -} diff --git a/vendor/modules.txt b/vendor/modules.txt deleted file mode 100644 index b96cc2dd..00000000 --- a/vendor/modules.txt +++ /dev/null @@ -1,114 +0,0 @@ -# github.com/K-Phoen/sdk v0.12.4 -## explicit; go 1.19 -github.com/K-Phoen/sdk -# github.com/blang/semver v3.5.1+incompatible -## explicit -github.com/blang/semver -# github.com/davecgh/go-spew v1.1.1 -## explicit -github.com/davecgh/go-spew/spew -# github.com/golang/protobuf v1.5.3 -## explicit; go 1.9 -github.com/golang/protobuf/proto -# github.com/google/go-github/v30 v30.1.0 -## explicit; go 1.13 -github.com/google/go-github/v30/github -# github.com/google/go-querystring v1.1.0 -## explicit; go 1.10 -github.com/google/go-querystring/query -# github.com/gosimple/slug v1.13.1 -## explicit; go 1.11 -github.com/gosimple/slug -# github.com/gosimple/unidecode v1.0.1 -## explicit; go 1.16 -github.com/gosimple/unidecode -# github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf -## explicit -github.com/inconshreveable/go-update -github.com/inconshreveable/go-update/internal/binarydist -github.com/inconshreveable/go-update/internal/osext -# github.com/inconshreveable/mousetrap v1.1.0 -## explicit; go 1.18 -github.com/inconshreveable/mousetrap -# github.com/pmezard/go-difflib v1.0.0 -## explicit -github.com/pmezard/go-difflib/difflib -# github.com/prometheus/common v0.45.0 -## explicit; go 1.20 -github.com/prometheus/common/model -# github.com/rhysd/go-github-selfupdate v1.2.3 -## explicit; go 1.13 -github.com/rhysd/go-github-selfupdate/selfupdate -# github.com/spf13/cobra v1.8.0 -## explicit; go 1.15 -github.com/spf13/cobra -# github.com/spf13/pflag v1.0.5 -## explicit; go 1.12 -github.com/spf13/pflag -# github.com/stretchr/testify v1.8.2 -## explicit; go 1.13 -github.com/stretchr/testify/assert -github.com/stretchr/testify/require -# github.com/tcnksm/go-gitconfig v0.1.2 -## explicit -github.com/tcnksm/go-gitconfig -# github.com/ulikunitz/xz v0.5.11 -## explicit; go 1.12 -github.com/ulikunitz/xz -github.com/ulikunitz/xz/internal/hash -github.com/ulikunitz/xz/internal/xlog -github.com/ulikunitz/xz/lzma -# golang.org/x/crypto v0.17.0 -## explicit; go 1.18 -golang.org/x/crypto/cast5 -golang.org/x/crypto/openpgp -golang.org/x/crypto/openpgp/armor -golang.org/x/crypto/openpgp/elgamal -golang.org/x/crypto/openpgp/errors -golang.org/x/crypto/openpgp/packet -golang.org/x/crypto/openpgp/s2k -# golang.org/x/oauth2 v0.15.0 -## explicit; go 1.18 -golang.org/x/oauth2 -golang.org/x/oauth2/internal -# google.golang.org/appengine v1.6.8 -## explicit; go 1.11 -google.golang.org/appengine/internal -google.golang.org/appengine/internal/base -google.golang.org/appengine/internal/datastore -google.golang.org/appengine/internal/log -google.golang.org/appengine/internal/remote_api -google.golang.org/appengine/internal/urlfetch -google.golang.org/appengine/urlfetch -# google.golang.org/protobuf v1.32.0 -## explicit; go 1.17 -google.golang.org/protobuf/encoding/prototext -google.golang.org/protobuf/encoding/protowire -google.golang.org/protobuf/internal/descfmt -google.golang.org/protobuf/internal/descopts -google.golang.org/protobuf/internal/detrand -google.golang.org/protobuf/internal/encoding/defval -google.golang.org/protobuf/internal/encoding/messageset -google.golang.org/protobuf/internal/encoding/tag -google.golang.org/protobuf/internal/encoding/text -google.golang.org/protobuf/internal/errors -google.golang.org/protobuf/internal/filedesc -google.golang.org/protobuf/internal/filetype -google.golang.org/protobuf/internal/flags -google.golang.org/protobuf/internal/genid -google.golang.org/protobuf/internal/impl -google.golang.org/protobuf/internal/order -google.golang.org/protobuf/internal/pragma -google.golang.org/protobuf/internal/set -google.golang.org/protobuf/internal/strs -google.golang.org/protobuf/internal/version -google.golang.org/protobuf/proto -google.golang.org/protobuf/reflect/protodesc -google.golang.org/protobuf/reflect/protoreflect -google.golang.org/protobuf/reflect/protoregistry -google.golang.org/protobuf/runtime/protoiface -google.golang.org/protobuf/runtime/protoimpl -google.golang.org/protobuf/types/descriptorpb -# gopkg.in/yaml.v3 v3.0.1 -## explicit -gopkg.in/yaml.v3